Unmodified copy of fmodex/fmod (lib/, src/, win32/) plus LICENSE.TXT and revision.txt, at the original location Engine/Source/SoundEngine/fmodex (12340/Mac 13682 paths). 12340's exact FMOD version is unknown; version differences are expected. Not built yet. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
128 lines
1.1 KiB
C++
128 lines
1.1 KiB
C++
#include "fmod_settings.h"
|
|
|
|
#include "fmod_stack.h"
|
|
|
|
namespace FMOD
|
|
{
|
|
|
|
|
|
/*
|
|
[
|
|
[DESCRIPTION]
|
|
|
|
[PARAMETERS]
|
|
|
|
[RETURN_VALUE]
|
|
|
|
[REMARKS]
|
|
|
|
[PLATFORMS]
|
|
PS3
|
|
|
|
[SEE_ALSO]
|
|
]
|
|
*/
|
|
Stack::Stack()
|
|
{
|
|
mTop = 0;
|
|
mNext = 0;
|
|
mPrevious = 0;
|
|
}
|
|
|
|
|
|
/*
|
|
[
|
|
[DESCRIPTION]
|
|
|
|
[PARAMETERS]
|
|
|
|
[RETURN_VALUE]
|
|
|
|
[REMARKS]
|
|
|
|
[PLATFORMS]
|
|
PS3
|
|
|
|
[SEE_ALSO]
|
|
]
|
|
*/
|
|
void Stack::push(Stack *object)
|
|
{
|
|
if (!mTop)
|
|
{
|
|
/*
|
|
We have just pushed on the first object
|
|
*/
|
|
|
|
mTop = object;
|
|
|
|
return;
|
|
}
|
|
|
|
mTop->mNext = object;
|
|
object->mPrevious = mTop;
|
|
mTop = object;
|
|
}
|
|
|
|
|
|
/*
|
|
[
|
|
[DESCRIPTION]
|
|
|
|
[PARAMETERS]
|
|
|
|
[RETURN_VALUE]
|
|
|
|
[REMARKS]
|
|
|
|
[PLATFORMS]
|
|
PS3
|
|
|
|
[SEE_ALSO]
|
|
]
|
|
*/
|
|
Stack *Stack::pop()
|
|
{
|
|
Stack *popped;
|
|
|
|
if (!mTop)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
popped = mTop;
|
|
|
|
mTop = mTop->mPrevious;
|
|
|
|
return popped;
|
|
}
|
|
|
|
|
|
/*
|
|
[
|
|
[DESCRIPTION]
|
|
|
|
[PARAMETERS]
|
|
|
|
[RETURN_VALUE]
|
|
|
|
[REMARKS]
|
|
|
|
[PLATFORMS]
|
|
PS3
|
|
|
|
[SEE_ALSO]
|
|
]
|
|
*/
|
|
bool Stack::stackEmpty()
|
|
{
|
|
if (mTop)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
}
|