remove SOE deprecated code and files - leaving in the #if 0 blocks with TODO and other possible uses for later

This commit is contained in:
DarthArgus
2016-03-24 21:07:31 +00:00
parent f275628817
commit 3b430656ba
58 changed files with 7 additions and 2481 deletions
@@ -43,9 +43,6 @@ voidpf ZlibCompressorNamespace::allocateWrapper(voidpf opaque, uInt items, uInt
UNREF(opaque);
void *result = 0;
#if 0
result = operator new(items * size);
#else
int totalSize = items * size;
if (totalSize > cms_poolElementThreshold)
{
@@ -67,7 +64,6 @@ voidpf ZlibCompressorNamespace::allocateWrapper(voidpf opaque, uInt items, uInt
ms_mutex.leave();
}
#endif
return result;
}
@@ -78,9 +74,6 @@ void ZlibCompressorNamespace::freeWrapper(voidpf opaque, voidpf address)
{
UNREF(opaque);
#if 0
operator delete(address);
#else
if (address < ms_memoryBottom || address >= ms_memoryTop)
operator delete(address);
else
@@ -89,7 +82,6 @@ void ZlibCompressorNamespace::freeWrapper(voidpf opaque, voidpf address)
ms_memoryPool.push_back(address);
ms_mutex.leave();
}
#endif
}
// ======================================================================
@@ -417,10 +417,6 @@ void DebugMonitor::flushOutput()
const int input = wgetch(s_outputWindow);
if (input != ERR)
{
#if 0
DEBUG_REPORT_LOG(true, ("DebugMonitor: received key [index=%d].\n", input));
#endif
//-- Handle input.
switch (input)
{
@@ -248,10 +248,6 @@ public:
void read_string(Unicode::String &str);
Unicode::String read_unicodeString();
#if 0
real *read_float (int count, real *array=nullptr);
#endif
};
// ----------------------------------------------------------------------
@@ -115,26 +115,14 @@ void FloatingPointUnit::update(void)
WORD FloatingPointUnit::getControlWord(void)
{
//TODO wtf is this asm statement?
#if 0
WORD controlWord = 0;
__asm fnstcw controlWord;
return controlWord;
#else
return status;
#endif
}
// ----------------------------------------------------------------------
void FloatingPointUnit::setControlWord(WORD controlWord)
{
//TODO see above?
UNREF(controlWord);
#if 0
__asm fldcw controlWord;
#endif
}
// ----------------------------------------------------------------------
@@ -88,11 +88,6 @@ void Os::installCommon(void)
ExitChain::add(Os::remove, "Os::remove", 0, true);
#if 0 //TODO For now we won't screw with the priority of the process
HANDLE threadHandle = GetCurrentThread();
DEBUG_FATAL(!SetThreadPriority(threadHandle, THREAD_PRIORITY_ABOVE_NORMAL), ("Failed to set game thread priority"));
#endif
numberOfUpdates = 0;
mainThreadId = pthread_self();
@@ -299,19 +294,6 @@ bool Os::update(void)
++numberOfUpdates;
#if 0
#ifdef _DEBUG
if (DEBUG_FLAG_PLATFORM(validateHeap))
{
PROFILER_START("validate heap");
MemoryManager::validate();
PROFILER_STOP("validate heap");
}
#endif
#endif
Clock::update();
wasPaused = false;
@@ -179,13 +179,6 @@ DWORD GetFileSize(FILE* hFile, DWORD* lpHighSize)
endPos = ftell(hFile);
fseek(hFile, curPos, SEEK_SET);
return endPos;
#if 0
//This is what I want to do, but I have no file des number
struct stat buf;
fstat(hFile, &buf);
return buf->st_size;
#endif
}
BOOL FileExists(const char* filename)
@@ -44,12 +44,6 @@ void SetupSharedFoundation::install(const Data &data)
if (data.argc)
CommandLine::absorbStrings(const_cast<const char**>(data.argv+1), data.argc-1);
#if 0
//currently there's a problem that we cannot override the defaults here.
if (data.configFile)
IGNORE_RETURN(ConfigFile::loadFile(data.configFile));
#endif
// get the post command-line text for the ConfigFile (key-value pairs)
const char *configString = CommandLine::getPostCommandLineString();
if (configString)
@@ -254,24 +254,6 @@ void Clock::update(void)
ms_lastFrameRate = RECIP(ms_lastFrameTime);
}
#if 0
// -qq- debugging W2K QueryPerformanceCounter
static DWORD lastTick;
DWORD newTick = GetTickCount();
DEBUG_REPORT_LOG_PRINT(true, ("Clock::update %I64d %I64d %6I64d %10d %10d %3d %6.2f=fps %6.4f=time\n", ms_lastPoll, newPoll, newPoll - ms_lastPoll, lastTick, newTick, newTick - lastTick, ms_lastFrameRate, ms_lastFrameTime));
static int bad = 0;
if (bad && ++bad > 64)
__asm int 3;
if (ms_lastFrameTime > 3.0)
bad = 1;
lastTick = newTick;
#endif
ms_lastPoll = newPoll;
@@ -78,25 +78,6 @@ uint32 Crc::calculate(const char *string)
// ----------------------------------------------------------------------
#if 0
uint32 Crc::calculateWithToLower(const char *string)
{
uint32 crc;
if (!string)
return 0;
for (crc = CRC_INIT; *string; ++string)
crc = crctable[((crc>>24) ^ static_cast<uint32>(tolower(*string))) & 0xFF] ^ (crc << 8);
return (crc ^ CRC_INIT);
}
#endif
// ----------------------------------------------------------------------
uint32 Crc::calculate(const void *data, int length, uint32 initCrc)
{
DEBUG_FATAL(!data, ("nullptr data arg"));
@@ -321,16 +321,6 @@ WearableAppearanceMap::MapResult::MapResult(MapResult const &rhs) :
// ----------------------------------------------------------------------
#if 0
WearableAppearanceMap::MapResult &WearableAppearanceMap::MapResult::operator =(MapResult const &rhs)
{
}
#endif
// ----------------------------------------------------------------------
bool WearableAppearanceMap::MapResult::hasMapping() const
{
return m_hasMapping;
@@ -485,15 +485,6 @@ int Quest::getMoneyRewardCredits() const
// ----------------------------------------------------------------------
#if 0
std::vector<QuestTask *> const & Quest::getTasks() const
{
return *m_tasks;
}
#endif
// ----------------------------------------------------------------------
/**
* Conversts a comma-delimited list of strings into a vector or the CRCs
* of those strings.
@@ -367,13 +367,6 @@ void ImageManipulation::install(const InstallData &installData)
//-- make sure we've got valid function pointers for all
NOT_NULL(ms_nextMipmapFunction);
#if 0
NOT_NULL(ms_convertFormatFunction);
NOT_NULL(ms_copyIgnoreAlphaFunction);
NOT_NULL(ms_copyRespectAlphaFunction);
NOT_NULL(ms_blendFunction);
NOT_NULL(ms_blendTwoFunction);
#endif
}
// ----------------------------------------------------------------------
@@ -55,20 +55,7 @@ public:
static void install(const InstallData &installData);
static void generateNextSmallerMipmap(const Image &sourceImage, Image &destImage);
#if 0
static void convertFormatSameSize(const Image &sourceImage, Image &destImage);
// these functions require same pixel format. they do not stretch or compress pixels.
static void copyIgnoreAlpha(const Image &sourceImage, int sourceX, int sourceY, int width, int height, Image &destImage, int destX, int destY);
static void copyRespectAlpha(const Image &sourceImage, int sourceX, int sourceY, int width, int height, Image &destImage, int destX, int destY);
// these two always respect alpha
static void blend(float sourceBlendFactor, const Image &sourceImage, int sourceX, int sourceY, int width, int height, Image &destImage, int destX, int destY);
static void blendTwo(float firstSourceBlendFactor, float resultToDestBlendFactor, const Image &sourceImage1, const Image &sourceImage2, int sourceX, int sourceY, int width, int height, Image &destImage, int destX, int destY);
#endif
static void generateNextSmallerMipmap(const Image &sourceImage, Image &destImage);
private:
static void remove();
@@ -146,7 +146,7 @@ void PaletteArgb::release() const
--m_referenceCount;
//-- We are going to let the PaletteArgbList keep references to the palettes and clean them up at the end.
#if 0
#if 0 //TODO: should we use the below or nuke it?
if (m_referenceCount == 0)
{
PaletteArgbList::stopTracking(*this);
@@ -41,11 +41,6 @@ public:
virtual void deleteLinksTo(const CustomizationData &customizationData) = 0;
virtual bool isLocalDirectory() const = 0;
#if 0
virtual std::string writeLocalDirectoryToString() const = 0;
virtual void loadLocalDirectoryFromString(int version, const std::string &string, int startIndex) = 0;
#endif
CustomizationData &getOwner();
const CustomizationData &getOwner() const;
@@ -395,231 +395,4 @@ bool CustomizationData::LocalDirectory::isLocalDirectory() const
return true;
}
// ----------------------------------------------------------------------
#if 0
std::string CustomizationData::LocalDirectory::writeLocalDirectoryToString() const
{
char scratchBuffer[1024];
std::string data;
//-- count # persistable variables
int variableCount = 0;
{
const CustomizationVariableMap::const_iterator endIt = m_variables.end();
for (CustomizationVariableMap::const_iterator it = m_variables.begin(); it != endIt; ++it)
{
//-- verify it's a non-nullptr variable
const CustomizationVariable *const variable = it->second;
if (variable && variable->doesVariablePersist())
{
// we will write this variable
++variableCount;
}
}
}
//-- write # variables
sprintf(scratchBuffer, "%x%c", variableCount, cms_stringFieldSeparator);
data += scratchBuffer;
//-- write each variable
{
const CustomizationVariableMap::const_iterator endIt = m_variables.end();
for (CustomizationVariableMap::const_iterator it = m_variables.begin(); it != endIt; ++it)
{
//-- verify it's a non-nullptr variable
const CustomizationVariable *const variable = it->second;
if (!variable)
{
WARNING(true, ("writeLocalDirectoryToString: nullptr variable for [%s], skipping variable writing."));
continue;
}
//-- skip variables that should not be written. typically this will be constant data
// that doesn't need to be customized or transmitted/persisted.
if (!variable->doesVariablePersist())
continue;
//-- write variable name
data += it->first.getString();
data += cms_stringFieldSeparator;
//-- write variable data
// get variable content data
const std::string variableContents = variable->writeToString();
// write content length (we do this so we can skip a variable if its not supported at load time)
sprintf(scratchBuffer, "%x%c", variableContents.size(), cms_stringFieldSeparator);
data += scratchBuffer;
// write variable content
data += variableContents;
}
}
//-- get # local directories to write
int directoryCount = 0;
{
const DirectoryMap::const_iterator endIt = m_directories.end();
for (DirectoryMap::const_iterator it = m_directories.begin(); it != endIt; ++it)
{
if (it->second && it->second->isLocalDirectory())
++directoryCount;
}
}
//-- write # directories
sprintf(scratchBuffer, "%x%c", directoryCount, cms_stringFieldSeparator);
data += scratchBuffer;
//-- write directory contents
{
const DirectoryMap::const_iterator endIt = m_directories.end();
for (DirectoryMap::const_iterator it = m_directories.begin(); it != endIt; ++it)
{
if (it->second && it->second->isLocalDirectory())
{
// write directory name
data += it->first.getString();
data += cms_stringFieldSeparator;
// get directory data contents
const std::string subdirData = it->second->writeLocalDirectoryToString();
// write directory data size (we do this so we can skip a directory if its not supported at load time)
sprintf(scratchBuffer, "%x%c", subdirData.size(), cms_stringFieldSeparator);
data += scratchBuffer;
// write directory contents
data += subdirData;
}
}
}
return data;
}
#endif
// ----------------------------------------------------------------------
#if 0
void CustomizationData::LocalDirectory::loadLocalDirectoryFromString(int version, const std::string &string, int startIndex)
{
if (version == 2)
loadLocalDirectoryFromString_0002(string, startIndex);
else
WARNING(true, ("loadLocalDirectoryFromString(): unsupported version [%d]", version));
}
#endif
// ======================================================================
#if 0
void CustomizationData::LocalDirectory::loadLocalDirectoryFromString_0002(const std::string &data, int startIndex)
{
int currentPosition = startIndex;
//-- get # variables
const int variableCount = parseSeparatedHexInt(data, currentPosition, currentPosition);
if (currentPosition == static_cast<int>(std::string::npos))
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): failed to load variable count, aborting load."));
return;
}
//-- load each variable
{
for (int i = 0; i < variableCount; ++i)
{
//-- load the variable name
const std::string variableName = parseSeparatedString(data, currentPosition, currentPosition);
if (currentPosition == static_cast<int>(std::string::npos))
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): failed to load variable name, aborting load."));
return;
}
//-- load the # characters in the value data
const int valueCharacterCount = parseSeparatedHexInt(data, currentPosition, currentPosition);
if (currentPosition == static_cast<int>(std::string::npos))
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): failed to load variable data size, aborting load."));
return;
}
//-- find the customization variable
CustomizationVariable *const variable = findVariable(variableName, 0);
if (!variable)
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): variable [%s] does not exist to be restored.", variableName.c_str()));
return;
}
else
{
//-- load the data
if (!variable->loadFromString(2, std::string(data, static_cast<std::string::size_type>(currentPosition), static_cast<std::string::size_type>(valueCharacterCount))))
WARNING(true, ("loadLocalDirectoryFromString_0002(): variable [%s] failed to load.", variableName.c_str()));
}
//-- pass the variable data
currentPosition += valueCharacterCount;
}
}
//-- get # subdirectories
const int directoryCount = parseSeparatedHexInt(data, currentPosition, currentPosition);
if (currentPosition == static_cast<int>(std::string::npos))
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): failed to load directory count, aborting load."));
return;
}
//-- load each subdirectory
{
for (int i = 0; i < directoryCount; ++i)
{
//-- load the directory name
const std::string directoryName = parseSeparatedString(data, currentPosition, currentPosition);
if (currentPosition == static_cast<int>(std::string::npos))
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): failed to load directory name, aborting load."));
return;
}
//-- load the # characters in the value data
const int directoryCharacterCount = parseSeparatedHexInt(data, currentPosition, currentPosition);
if (currentPosition == static_cast<int>(std::string::npos))
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): failed to load directory data size, aborting load."));
return;
}
//-- find the customization variable
Directory *const directory = findDirectory(directoryName, 0);
if (!directory)
{
WARNING(true, ("loadLocalDirectoryFromString_0002(): object id=[%s], directory [%s] does not exist to be restored.", getOwner().getOwnerObject().getNetworkId().getValueString().c_str(), directoryName.c_str()));
return;
}
else
{
//-- load the data
directory->loadLocalDirectoryFromString(2, data, currentPosition);
}
//-- pass the variable data
currentPosition += directoryCharacterCount;
}
}
}
#endif
// ======================================================================
@@ -49,11 +49,6 @@ public:
virtual void deleteLinksTo(const CustomizationData &customizationData);
virtual bool isLocalDirectory() const;
#if 0
virtual std::string writeLocalDirectoryToString() const;
virtual void loadLocalDirectoryFromString(int version, const std::string &string, int startIndex);
#endif
private:
@@ -61,11 +56,6 @@ private:
typedef stdmap<const CrcLowerString, CustomizationVariable*>::fwd CustomizationVariableMap;
private:
#if 0
void loadLocalDirectoryFromString_0002(const std::string &string, int startIndex);
#endif
// Disabled.
LocalDirectory();
LocalDirectory(const LocalDirectory&);
@@ -164,31 +164,4 @@ bool CustomizationData::RemoteDirectory::isLocalDirectory() const
return false;
}
// ----------------------------------------------------------------------
#if 0
std::string CustomizationData::RemoteDirectory::writeLocalDirectoryToString() const
{
WARNING(true, ("writeLocalDirectoryToString(): operation makes no sense on RemoteDirectory instances.\n"));
return "";
}
#endif
// ----------------------------------------------------------------------
#if 0
void CustomizationData::RemoteDirectory::loadLocalDirectoryFromString(int version, const std::string &string, int startIndex)
{
UNREF(version);
UNREF(string);
UNREF(startIndex);
WARNING(true, ("loadLocalDirectoryFromString(): operation makes no sense on RemoteDirectory instances."));
}
#endif
// ======================================================================
@@ -47,11 +47,6 @@ public:
virtual void deleteLinksTo(const CustomizationData &customizationData);
virtual bool isLocalDirectory() const;
#if 0
virtual std::string writeLocalDirectoryToString() const;
virtual void loadLocalDirectoryFromString(int version, const std::string &string, int startIndex);
#endif
private:
@@ -52,36 +52,6 @@ int RangedIntCustomizationVariable::getPersistedDataByteCount() const
// ----------------------------------------------------------------------
#if 0
std::string RangedIntCustomizationVariable::writeToString() const
{
char buffer[64];
sprintf(buffer, "%x", getValue());
return std::string(buffer);
}
#endif
// ----------------------------------------------------------------------
#if 0
bool RangedIntCustomizationVariable::loadFromString(int version, const std::string &data)
{
if (version == 2)
return loadFromString_0002(data);
else
{
WARNING(true, ("loadFromString(): version %d unsupported.\n", version));
return false;
}
}
#endif
// ----------------------------------------------------------------------
void RangedIntCustomizationVariable::saveToByteVector(ByteVector &data) const
{
int const byteCount = getPersistedDataByteCount();
@@ -179,29 +149,6 @@ RangedIntCustomizationVariable::RangedIntCustomizationVariable()
// ======================================================================
#if 0
bool RangedIntCustomizationVariable::loadFromString_0002(const std::string &data)
{
int newValue;
const int scanfResult = sscanf(data.c_str(), "%x", &newValue);
if (scanfResult != 1)
{
// failed
return false;
}
else
{
setValue(newValue);
return true;
}
}
#endif
//----------------------------------------------------------------------
/**
* This function computes the normalized value.
* @return a number in [0.0,1.0]
@@ -46,10 +46,6 @@ protected:
private:
#if 0
bool loadFromString_0002(const std::string &data);
#endif
// disabled
RangedIntCustomizationVariable(const RangedIntCustomizationVariable&);
RangedIntCustomizationVariable &operator =(const RangedIntCustomizationVariable&);
@@ -1390,10 +1390,6 @@ void Object::setParentCell(CellProperty *cellProperty)
if (getParentCell() == cellProperty)
return;
#if 0
DEBUG_FATAL(isChildObject(), ("Object::setParentCell called on child object [id=%s template=%s] with parent object [id=%s template=%s]", getNetworkId().getValueString().c_str(), getObjectTemplateName(), m_attachedToObject->getNetworkId().getValueString().c_str(), m_attachedToObject->getObjectTemplateName()));
#endif
// if we were in another cell, detach us. This will leave out object in world space.
if (!isInWorldCell())
detachFromObject(DF_world);
@@ -722,14 +722,6 @@ CellProperty *CellProperty::getDestinationCell(const Vector &startPosition, cons
CellProperty *cellProperty = 0;
closestPortalT = FLT_MAX;
#if 0
if ((startPosition - endPosition).magnitude() > 2.0f)
{
static volatile int debug = 0;
++debug;
}
#endif
const PortalObjectList::const_iterator iEnd = m_portalObjectList->end();
for (PortalObjectList::const_iterator i = m_portalObjectList->begin(); i != iEnd; ++i)
{
@@ -229,7 +229,7 @@ bool PortalProperty::serverEndBaselines(int serverObjectCrc, std::vector<Object*
//-- fixupObject() causes the fixedup object to get added to the world before its parent has been
//-- for now, we won't queue anything for fixup
#if 0
#if 0 //TODO: see above
// go through the cells and remove objects
for (size_t cell=1 ; cell< numberOfCells; ++cell)
{
@@ -374,130 +374,6 @@ bool SamplerProceduralTerrainAppearance::SamplerChunk::getHeightAt (const Vector
return false;
}
//-------------------------------------------------------------------
#if 0
bool SamplerProceduralTerrainAppearance::SamplerChunk::getHeightAt2(const Vector& pos, float* const height, Vector* const normal) const
{
// ------------------------------------------------
// make sure we're in the chunk
const Vector vmin = m_boxExtent.getMin ();
const Vector vmax = m_boxExtent.getMax ();
if (pos.x < vmin.x || pos.x > vmax.x || pos.z < vmin.z || pos.z > vmax.z)
{
DEBUG_WARNING (true, ("called getHeightAt for position not within chunk"));
return false;
}
// ------------------------------------------------
// ------------------------------------------------
// get height pole and tile coordinate.
const Vector localPos = pos - vmin;
const ProceduralTerrainAppearanceTemplate *proceduralTerrainAppearanceTemplate = getAppearanceTemplate();
const float distanceBetweenPoles = proceduralTerrainAppearanceTemplate->getTileWidthInMeters() / 2.0f;
const int numberOfPolesPerChunk = proceduralTerrainAppearanceTemplate->getNumberOfTilesPerChunk() * 2;
int poleX = int(floor(localPos.x / distanceBetweenPoles));
if (poleX>=numberOfPolesPerChunk)
{
poleX=numberOfPolesPerChunk-1;
}
int poleZ = int(floor(localPos.z / distanceBetweenPoles));
if (poleZ>=numberOfPolesPerChunk)
{
poleZ=numberOfPolesPerChunk-1;
}
const int tileX = poleX>>1;
const int tileZ = poleZ>>1;
// ------------------------------------------------
// ------------------------------------------------
// if the tile at x,z is excluded, return failure.
// DEBUG
{
int dbgTileX, dbgTileZ;
_findTileXz(pos, dbgTileX, dbgTileZ);
DEBUG_FATAL(dbgTileX!=tileX, (""));
DEBUG_FATAL(dbgTileZ!=tileZ, (""));
}
if (isExcluded(tileX, tileZ))
{
return false;
}
// ------------------------------------------------
// ------------------------------------------------
// construct vertical vector at x,z that goes
// from the highest point in the chunk to the
// lowest point in the chunk.
const Vector start(pos.x, vmax.y + 0.1f, pos.z);
const Vector end(pos.x, vmin.y - 0.1f, pos.z);
const Vector dir = end - start;
// ------------------------------------------------
//-- collide with the 8 polygons in the tile
bool found = false;
CollisionInfo result;
result.setPoint (end);
Vector intersection;
const int numberOfTilesPerChunk = m_proceduralTerrainAppearance.getNumberOfTilesPerChunk();
const int tileIndex = tileZ * numberOfTilesPerChunk + tileX;
const int triangleOffset = tileIndex * 8;
for (int tri = triangleOffset; tri < triangleOffset + 8; ++tri)
{
const Plane& plane = (*m_planeList) [tri];
const Vector& normal = plane.getNormal ();
if ( dir.dot(normal)<0.f // if triangle is facing upward
&& plane.findIntersection(start, end, intersection)
)
{
const int i0 = (*ms_indexList)[tri*3 + 0];
const int i1 = (*ms_indexList)[tri*3 + 1];
const int i2 = (*ms_indexList)[tri*3 + 2];
const Vector& v0 = (*m_vertexList)[i0];
const Vector& v1 = (*m_vertexList)[i1];
const Vector& v2 = (*m_vertexList)[i2];
DenormalizedLine2d const line01 (Vector2d (v0.x, v0.z), Vector2d (v1.x, v1.z));
DenormalizedLine2d const line12 (Vector2d (v1.x, v1.z), Vector2d (v2.x, v2.z));
DenormalizedLine2d const line20 (Vector2d (v2.x, v2.z), Vector2d (v0.x, v0.z));
if (line01.computeDistanceTo (Vector2d (start.x, start.z)) <= 0 &&
line12.computeDistanceTo (Vector2d (start.x, start.z)) <= 0 &&
line20.computeDistanceTo (Vector2d (start.x, start.z)) <= 0)
{
found = true;
result.setPoint (intersection);
result.setNormal (normal);
}
}
}
if (found)
{
if (height)
*height = result.getPoint ().y;
if (normal)
*normal = result.getNormal ();
return true;
}
return false;
}
#endif
//-------------------------------------------------------------------
#define ALLOW_BACKFACING_COLLISION 0
@@ -209,25 +209,4 @@ float CoordinateHash::makeFloat(unsigned long hash)
return returnValue;
}
#if 0
long CoordinateHash::hashTuple(float x, float z)
{
const unsigned long ix = (*(unsigned long *)&x)^0x5a5a5a5a;
const unsigned long iz = (*(unsigned long *)&z)^0xa5a5a5a5;
const unsigned long hx = _hash1((ix>>8) | (ix<<24));
const unsigned long hz = _hash1((iz>>16) | (iz<<16));
const unsigned long hmix1 = hx^hz;
const unsigned long h = hmix1;
/*
FastRandomGenerator rngx(hx);
FastRandomGenerator rngz(hz);
const long rnx = rngx.random();
const long rnz = rngz.random();
return rnx^rnz;
*/
return h;
}
#endif
//===================================================================
@@ -142,18 +142,3 @@ void Thread::setPriority(ePriority priority)
pthread_setschedparam(thread, policies[priority], &p);
}
// Make sure the header-only files compile :)
#if 0
#include "sharedSynchronization/CountingSemaphore.h"
#include "sharedSynchronization/BlockingPointer.h"
#include "sharedSynchronization/BlockingQueue.h"
#include "sharedSynchronization/WriteOnce.h"
Mutex t;
BlockingQueue<int> bqint(t, 0, 0);
BlockingPointer<int> bpint(t, 0, 0);
WriteOnce<int> woint;
#endif
@@ -19,26 +19,3 @@ FuncPtrThreadZero::Handle runNamedThread(const std::string &name, void (* func)(
{
return TypedThreadHandle<FuncPtrThreadZero> (new FuncPtrThreadZero(name, func));
}
#if 0
// Testing stuff
class testclass
{
public:
void zeroArg() {}
void oneArg(testclass *) {}
void twoArg(testclass *, int) {}
};
testclass m;
typedef MemberFunctionThreadZero<testclass>::Handle AsyncTestMemberFunctionZero;
AsyncTestMemberFunctionZero temp = runThread(m, testclass::zeroArg);
typedef MemberFunctionThreadOne<testclass, testclass *>::Handle AsyncTestMemberFunctionOne;
AsyncTestMemberFunctionOne temp2 = runThread(m, testclass::oneArg, &m);
typedef MemberFunctionThreadTwo<testclass, testclass *, int>::Handle AsyncTestMemberFunctionTwo;
AsyncTestMemberFunctionTwo temp3 = runThread(m, testclass::twoArg, &m, 4);
#endif
@@ -278,12 +278,3 @@ void FileName::stripSpecificPathAndExt (Path path, char* nameBuffer, int nameBuf
}
//-------------------------------------------------------------------
#if 0
DEBUG_REPORT_LOG_PRINT (true, ("%s\n", FileName (FileName::P_none, "test")));
DEBUG_REPORT_LOG_PRINT (true, ("%s\n", FileName (FileName::P_none, "test", "iff")));
DEBUG_REPORT_LOG_PRINT (true, ("%s\n", FileName (FileName::P_sound, "test")));
DEBUG_REPORT_LOG_PRINT (true, ("%s\n", FileName (FileName::P_sound, "test", "iff")));
#endif