mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
implement a few mxstream* methods (#252)
* commit code * commit code * Update mxdiskstreamprovider.cpp * Update mxstreamprovider.h * improve match + add html file to gitignore * improve match of MxRAMStreamController::Open * MxDiskStreamController::Open * Match some functions, relocate m_target to `MxThread` --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
#include "mxdiskstreamcontroller.h"
|
||||
|
||||
#include "mxautolocker.h"
|
||||
#include "mxdiskstreamprovider.h"
|
||||
#include "mxomni.h"
|
||||
#include "mxticklemanager.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100c7120 STUB
|
||||
MxDiskStreamController::MxDiskStreamController()
|
||||
{
|
||||
@@ -19,11 +24,30 @@ MxResult MxDiskStreamController::Tickle()
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c7790 STUB
|
||||
// OFFSET: LEGO1 0x100c7790
|
||||
MxResult MxDiskStreamController::Open(const char* p_filename)
|
||||
{
|
||||
// TODO
|
||||
return FAILURE;
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
MxResult result = MxStreamController::Open(p_filename);
|
||||
|
||||
if (result == SUCCESS) {
|
||||
m_provider = new MxDiskStreamProvider();
|
||||
if (m_provider == NULL) {
|
||||
result = FAILURE;
|
||||
}
|
||||
else {
|
||||
result = m_provider->SetResourceToGet(this);
|
||||
if (result != SUCCESS) {
|
||||
delete m_provider;
|
||||
m_provider = NULL;
|
||||
}
|
||||
else {
|
||||
TickleManager()->RegisterClient(this, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c7880
|
||||
|
Reference in New Issue
Block a user