2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 09:26:09 +00:00

Various imps

This commit is contained in:
2016-05-03 01:27:28 -07:00
parent 7085549a42
commit 4101ea78a2
21 changed files with 371 additions and 70 deletions

View File

@@ -0,0 +1,29 @@
#include "CSfxHandle.hpp"
namespace urde
{
u32 CSfxHandle::mRefCount = 0;
CSfxHandle::CSfxHandle(u32 idx)
{
x0_index = (idx & 0xFFF) | ((++mRefCount) << 14);
}
void CSfxHandle::operator =(const CSfxHandle& other)
{
if (x0_index == other.x0_index)
return;
x0_index = other.x0_index;
}
bool CSfxHandle::operator !=(const CSfxHandle& other) const
{
return x0_index != other.x0_index;
}
bool CSfxHandle::operator ==(const CSfxHandle& other) const
{
return x0_index == other.x0_index;
}
}