ICT290 / src / ShaysWorld / SoundTime.cpp
SoundTime.cpp
Raw
// SoundTime.cpp: implementation of the CSoundTime class.
//
//////////////////////////////////////////////////////////////////////

#include "SoundTime.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CSoundTime::CSoundTime(Uint32 time)
    : m_minutes(0),
      m_seconds(0),
      m_milliseconds(0),
      m_time(time) {
    // convert to mins, sec and ms <- someone need to do this one
}

CSoundTime::CSoundTime(int min, int sec, int ms)
    : m_minutes(min),
      m_seconds(sec),
      m_milliseconds(ms),
      m_time(Uint32((100.0 / 60.0 * (double)min * 100000.0)
                    + (100.0 / 60.0 * (double)sec * 1000.0) + (double)ms)) {}

CSoundTime::~CSoundTime() {}

Uint32 CSoundTime::GetSDLTime() {
    return (Uint32)m_time;
}

CSoundTime& CSoundTime::operator+=(CSoundTime*) {
    return *this;
}

CSoundTime& CSoundTime::operator-=(CSoundTime*) {
    return *this;
}

CSoundTime& CSoundTime::operator+=(int) {
    return *this;
}

CSoundTime& CSoundTime::operator-=(int) {
    return *this;
}

CSoundTime& CSoundTime::operator++() {
    return *this;
}

CSoundTime& CSoundTime::operator--() {
    return *this;
}

// int CSoundTime::operator== (const CSoundTime& cst1, const CSoundTime& cst2)
//{
//	return 0;
// }

int CSoundTime::operator==(const CSoundTime&) {
    return 0;
}