Let game boot again (#404)

This commit is contained in:
Christian Semmler 2024-01-04 16:46:16 -05:00 committed by GitHub
parent 5aef35d9c7
commit eeb980fa0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 5 deletions

View file

@ -18,7 +18,7 @@ Lego3DView::~Lego3DView()
// STUB: LEGO1 0x100aaf90
BOOL Lego3DView::Create(TglSurface::CreateStruct& p_createStruct, Tgl::Renderer* p_renderer)
{
return FALSE;
return TRUE;
}
// STUB: LEGO1 0x100ab100

View file

@ -16,10 +16,30 @@ ViewLODListManager::~ViewLODListManager()
}
// STUB: LEGO1 0x100a72c0
ViewLODList* ViewLODListManager::Create(const ROIName&, int lodCount)
ViewLODList* ViewLODListManager::Create(const ROIName& rROIName, int lodCount)
{
// TODO
return NULL;
// returned ViewLODList has a refCount of 1, i.e. caller must call Release()
// when it no longer holds on to the list
ViewLODList* pLODList;
int refCount;
char* pROIName;
assert(!Lookup(rROIName));
pLODList = new ViewLODList(lodCount);
refCount = pLODList->AddRef();
assert(refCount == 1);
pROIName = new char[strlen(rROIName) + 1];
strcpy(pROIName, rROIName);
m_map[pROIName] = pLODList;
// NOTE: Lookup() adds a refCount
assert((Lookup(rROIName) == pLODList) && (pLODList->Release() == 1));
return pLODList;
}
// STUB: LEGO1 0x100a7680

View file

@ -75,7 +75,7 @@ class ViewLODListManager {
// creates an LODList with room for lodCount LODs for a named ROI
// returned LODList has a refCount of 1, i.e. caller must call Release()
// when it no longer holds on to the list
ViewLODList* Create(const ROIName&, int lodCount);
ViewLODList* Create(const ROIName& rROIName, int lodCount);
// returns an LODList for a named ROI
// returned LODList's refCount is increased, i.e. caller must call Release()