mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 11:12:29 +00:00
chore(style): normalize memory allocations
This commit is contained in:
parent
90403bfd29
commit
97a6a8dd91
27 changed files with 147 additions and 279 deletions
|
|
@ -166,8 +166,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* backgroundTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* backgroundTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto backgroundTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND, 1);
|
||||
|
||||
this->m_backgroundTexture = backgroundTexture;
|
||||
|
||||
|
|
@ -185,8 +185,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* leftTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* leftTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto leftTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_leftTexture = leftTexture;
|
||||
|
||||
|
|
@ -204,8 +204,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* rightTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* rightTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto rightTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_rightTexture = rightTexture;
|
||||
|
||||
|
|
@ -223,8 +223,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* topTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* topTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto topTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_topTexture = topTexture;
|
||||
|
||||
|
|
@ -242,8 +242,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* bottomTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* bottomTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto bottomTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_bottomTexture = bottomTexture;
|
||||
|
||||
|
|
@ -261,8 +261,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* topLeftTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* topLeftTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto topLeftTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_topLeftTexture = topLeftTexture;
|
||||
|
||||
|
|
@ -284,8 +284,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* topRightTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* topRightTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto topRightTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_topRightTexture = topRightTexture;
|
||||
|
||||
|
|
@ -307,8 +307,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* bottomLeftTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* bottomLeftTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto bottomLeftTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_bottomLeftTexture = bottomLeftTexture;
|
||||
|
||||
|
|
@ -330,8 +330,8 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
|||
// TODO
|
||||
// CSimpleTexture* bottomRightTexture = CSimpleTexture::s_allocator.GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
CSimpleTexture* bottomRightTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto bottomRightTexture = new (m) CSimpleTexture(frame, DRAWLAYER_BACKGROUND_BORDER, 1);
|
||||
|
||||
this->m_bottomRightTexture = bottomRightTexture;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ void CFrameStrata::AddFrame(CSimpleFrame* frame) {
|
|||
this->levels.SetCount(frame->m_level + 1);
|
||||
|
||||
for (int32_t i = count; i < frame->m_level + 1; i++) {
|
||||
void* m = SMemAlloc(sizeof(CFrameStrataNode), __FILE__, __LINE__, 0);
|
||||
CFrameStrataNode* node = m ? new (m) CFrameStrataNode() : nullptr;
|
||||
auto m = SMemAlloc(sizeof(CFrameStrataNode), __FILE__, __LINE__, 0x0);
|
||||
auto node = new (m) CFrameStrataNode();
|
||||
this->levels[i] = node;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -692,8 +692,8 @@ void CLayoutFrame::SetAllPoints(CLayoutFrame* relative, int32_t doResize) {
|
|||
// TODO
|
||||
// CFramePoint::s_framePointHeap->GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CFramePoint), __FILE__, __LINE__, 0);
|
||||
topLeft = m ? new (m) CFramePoint(relative, FRAMEPOINT_TOPLEFT, 0.0f, 0.0f) : nullptr;
|
||||
auto m = SMemAlloc(sizeof(CFramePoint), __FILE__, __LINE__, 0x0);
|
||||
topLeft = new (m) CFramePoint(relative, FRAMEPOINT_TOPLEFT, 0.0f, 0.0f);
|
||||
|
||||
this->m_points[FRAMEPOINT_TOPLEFT] = topLeft;
|
||||
}
|
||||
|
|
@ -707,7 +707,7 @@ void CLayoutFrame::SetAllPoints(CLayoutFrame* relative, int32_t doResize) {
|
|||
// CFramePoint::s_framePointHeap->GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CFramePoint), __FILE__, __LINE__, 0);
|
||||
bottomRight = m ? new (m) CFramePoint(relative, FRAMEPOINT_BOTTOMRIGHT, 0.0f, 0.0f) : nullptr;
|
||||
bottomRight = new (m) CFramePoint(relative, FRAMEPOINT_BOTTOMRIGHT, 0.0f, 0.0f);
|
||||
|
||||
this->m_points[FRAMEPOINT_BOTTOMRIGHT] = bottomRight;
|
||||
}
|
||||
|
|
@ -798,7 +798,8 @@ void CLayoutFrame::SetPoint(FRAMEPOINT point, CLayoutFrame* relative, FRAMEPOINT
|
|||
// CFramePoint::s_framePointHeap->GetData(0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CFramePoint), __FILE__, __LINE__, 0);
|
||||
framePoint = m ? new (m) CFramePoint(relative, relativePoint, offsetX, offsetY) : nullptr;
|
||||
framePoint = new (m) CFramePoint(relative, relativePoint, offsetX, offsetY);
|
||||
|
||||
this->m_points[point] = framePoint;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -459,8 +459,8 @@ int32_t CSimpleButton::SetHighlight(const char* texFile, EGxBlend blendMode) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
// TODO void* m = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
// TODO auto m = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto texture = new (m) CSimpleTexture(this, DRAWLAYER_HIGHLIGHT, 1);
|
||||
|
||||
if (!texture->SetTexture(texFile, false, false, CSimpleTexture::s_textureFilterMode, ImageMode_UI)) {
|
||||
|
|
@ -556,7 +556,7 @@ int32_t CSimpleButton::SetStateTexture(CSimpleButtonState state, const char* tex
|
|||
}
|
||||
|
||||
// TODO void* m = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto texture = new (m) CSimpleTexture(nullptr, 2, 1);
|
||||
|
||||
if (texture->SetTexture(texFile, false, false, CSimpleTexture::s_textureFilterMode, ImageMode_UI)) {
|
||||
|
|
@ -577,17 +577,10 @@ void CSimpleButton::SetText(const char* string) {
|
|||
if ((string && *string) || this->m_text) {
|
||||
if (!this->m_text) {
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0x0);
|
||||
|
||||
CSimpleFontString* text;
|
||||
|
||||
if (m) {
|
||||
text = new (m) CSimpleFontString(this, 2, 1);
|
||||
} else {
|
||||
text = nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0x0);
|
||||
auto text = new (m) CSimpleFontString(this, 2, 1);
|
||||
|
||||
this->SetFontString(text);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,16 +95,16 @@ CSimpleEditBox::CSimpleEditBox(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
|||
memset(textInfo, 0, sizeof(uint32_t) * this->m_textSize);
|
||||
this->m_textInfo = textInfo;
|
||||
|
||||
void* fontMem = SMemAlloc(sizeof(CSimpleFontedFrameFont), __FILE__, __LINE__, 0);
|
||||
CSimpleFontedFrameFont* font = new (fontMem) CSimpleFontedFrameFont(this);
|
||||
auto fontMem = SMemAlloc(sizeof(CSimpleFontedFrameFont), __FILE__, __LINE__, 0x0);
|
||||
auto font = new (fontMem) CSimpleFontedFrameFont(this);
|
||||
this->m_font = font;
|
||||
|
||||
this->m_font->m_attributes.SetJustifyH(0x1);
|
||||
|
||||
// TODO
|
||||
// void* stringMem = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0, __FILE__, __LINE__);
|
||||
void* stringMem = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0);
|
||||
CSimpleFontString* string = new (stringMem) CSimpleFontString(this, DRAWLAYER_ARTWORK, 1);
|
||||
// auto stringMem = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0, __FILE__, __LINE__);
|
||||
auto stringMem = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0x0);
|
||||
auto string = new (stringMem) CSimpleFontString(this, DRAWLAYER_ARTWORK, 1);
|
||||
this->m_string = string;
|
||||
|
||||
this->m_string->SetFontObject(this->m_font);
|
||||
|
|
@ -113,9 +113,9 @@ CSimpleEditBox::CSimpleEditBox(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
|||
|
||||
for (int32_t i = 0; i < 3; i++) {
|
||||
// TODO
|
||||
// void* highlightMem = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
void* highlightMem = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0);
|
||||
CSimpleTexture* highlight = new (highlightMem) CSimpleTexture(this, DRAWLAYER_ARTWORK, 0);
|
||||
// auto highlightMem = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
auto highlightMem = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto highlight = new (highlightMem) CSimpleTexture(this, DRAWLAYER_ARTWORK, 0);
|
||||
this->m_highlight[i] = highlight;
|
||||
}
|
||||
|
||||
|
|
@ -126,9 +126,9 @@ CSimpleEditBox::CSimpleEditBox(CSimpleFrame* parent) : CSimpleFrame(parent) {
|
|||
}
|
||||
|
||||
// TODO
|
||||
// void* cursorMem = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
void* cursorMem = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0);
|
||||
CSimpleTexture* cursor = new (cursorMem) CSimpleTexture(this, DRAWLAYER_ARTWORK_OVERLAY, 1);
|
||||
// auto cursorMem = CDataAllocator::GetData(CSimpleTexture::s_allocator, 0, __FILE__, __LINE__);
|
||||
auto cursorMem = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto cursor = new (cursorMem) CSimpleTexture(this, DRAWLAYER_ARTWORK_OVERLAY, 1);
|
||||
cursor->Hide();
|
||||
this->m_cursor = cursor;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,13 +15,8 @@ int32_t CSimpleFont::s_metatable;
|
|||
int32_t CSimpleFont::s_objectType;
|
||||
|
||||
SIMPLEFONT::SIMPLEFONT() : TSHashObject<SIMPLEFONT, HASHKEY_STRI>() {
|
||||
void* m = SMemAlloc(sizeof(CSimpleFont), __FILE__, __LINE__, 0);
|
||||
|
||||
if (m) {
|
||||
this->font = new (m) CSimpleFont();
|
||||
} else {
|
||||
this->font = nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleFont), __FILE__, __LINE__, 0x0);
|
||||
this->font = new (m) CSimpleFont();
|
||||
}
|
||||
|
||||
void CSimpleFont::CreateScriptMetaTable() {
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ void CSimpleFrame::LoadXML_Attributes(XMLNode* node, CStatus* status) {
|
|||
}
|
||||
|
||||
void CSimpleFrame::LoadXML_Backdrop(XMLNode* node, CStatus* status) {
|
||||
void* m = SMemAlloc(sizeof(CBackdropGenerator), __FILE__, __LINE__, 0x0);
|
||||
auto m = SMemAlloc(sizeof(CBackdropGenerator), __FILE__, __LINE__, 0x0);
|
||||
auto backdrop = new (m) CBackdropGenerator();
|
||||
|
||||
backdrop->LoadXML(node, status);
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ CSimpleHTML::CSimpleHTML(CSimpleFrame* parent) : CSimpleHyperlinkedFrame(parent)
|
|||
}
|
||||
|
||||
void CSimpleHTML::AddText(const char* text, HTML_TEXT_TYPE type, uint32_t justify) {
|
||||
// TODO void* stringMem = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0x0, __FILE__, __LINE__);
|
||||
void* stringMem = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0x0);
|
||||
CSimpleFontString* string = new (stringMem) CSimpleFontString(this, DRAWLAYER_ARTWORK, 1);
|
||||
// TODO auto stringMem = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0x0, __FILE__, __LINE__);
|
||||
auto stringMem = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0x0);
|
||||
auto string = new (stringMem) CSimpleFontString(this, DRAWLAYER_ARTWORK, 1);
|
||||
|
||||
if (this->m_layoutAnchor) {
|
||||
string->SetPoint(
|
||||
|
|
|
|||
|
|
@ -8,15 +8,9 @@ int32_t CSimpleModelFFX::s_metatable;
|
|||
|
||||
CSimpleFrame* CSimpleModelFFX::Create(CSimpleFrame* parent) {
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleModelFFX::s_simpleModelFFXHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleModelFFX), __FILE__, __LINE__, 0);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleModelFFX(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
// auto m = CDataAllocator::GetData(CSimpleModelFFX::s_simpleModelFFXHeap, 0, __FILE__, __LINE__);
|
||||
auto m = SMemAlloc(sizeof(CSimpleModelFFX), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleModelFFX(parent);
|
||||
}
|
||||
|
||||
void CSimpleModelFFX::Render(void* arg) {
|
||||
|
|
|
|||
|
|
@ -371,8 +371,8 @@ CSimpleTop::CSimpleTop() : CLayoutFrame() {
|
|||
// TODO
|
||||
|
||||
for (int32_t s = 0; s < NUM_FRAME_STRATA; s++) {
|
||||
void* m = SMemAlloc(sizeof(CFrameStrata), __FILE__, __LINE__, 0);
|
||||
this->m_strata[s] = m ? new (m) CFrameStrata() : nullptr;
|
||||
auto m = SMemAlloc(sizeof(CFrameStrata), __FILE__, __LINE__, 0x0);
|
||||
this->m_strata[s] = new (m) CFrameStrata();
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
|
|
|||
|
|
@ -21,55 +21,35 @@ TSHashTable<FrameFactoryNode, HASHKEY_STRI> FrameXML::s_factoryHash;
|
|||
TSHashTable<HashedNode, HASHKEY_STRI> FrameXML::s_nodeHash;
|
||||
|
||||
CSimpleFrame* Create_SimpleButton(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleButton), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleFrame::s_simpleButtonHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleFrame::s_simpleButtonHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleButton(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleButton), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleButton(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleCheckButton(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleCheckbox), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleCheckbox::s_simpleCheckboxHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleCheckbox::s_simpleCheckboxHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleCheckbox(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleCheckbox), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleCheckbox(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleEditBox(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleEditBox), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleEditBox::s_simpleEditBoxHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleEditBox::s_simpleEditBoxHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleEditBox(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleEditBox), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleEditBox(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleFrame(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleFrame), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleFrame::s_simpleFrameHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleFrame::s_simpleFrameHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleFrame(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleFrame), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleFrame(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleMessageFrame(CSimpleFrame* parent) {
|
||||
|
|
@ -79,29 +59,19 @@ CSimpleFrame* Create_SimpleMessageFrame(CSimpleFrame* parent) {
|
|||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleModel(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleModel), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleFrame::s_simpleModelHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleFrame::s_simpleModelHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleModel(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleModel), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleModel(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleScrollFrame(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleScrollFrame), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleScrollFrame::s_simpleScrollHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleScrollFrame::s_simpleScrollHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleScrollFrame(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleScrollFrame), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleScrollFrame(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleScrollingMessageFrame(CSimpleFrame* parent) {
|
||||
|
|
@ -111,29 +81,19 @@ CSimpleFrame* Create_SimpleScrollingMessageFrame(CSimpleFrame* parent) {
|
|||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleSlider(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleSlider), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleSlider::s_simpleSliderHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleSlider::s_simpleSliderHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleSlider(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleSlider), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleSlider(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleHTML(CSimpleFrame* parent) {
|
||||
void* m = SMemAlloc(sizeof(CSimpleHTML), __FILE__, __LINE__, 0);
|
||||
|
||||
// TODO
|
||||
// void* m = CDataAllocator::GetData(CSimpleHTML::s_simpleHTMLHeap, 0, __FILE__, __LINE__);
|
||||
// auto m = CDataAllocator::GetData(CSimpleHTML::s_simpleHTMLHeap, 0, __FILE__, __LINE__);
|
||||
|
||||
if (m) {
|
||||
return new (m) CSimpleHTML(parent);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleHTML), __FILE__, __LINE__, 0x0);
|
||||
return new (m) CSimpleHTML(parent);
|
||||
}
|
||||
|
||||
CSimpleFrame* Create_SimpleStatusBar(CSimpleFrame* parent) {
|
||||
|
|
|
|||
|
|
@ -245,17 +245,10 @@ int32_t LoadXML_Insets(XMLNode* node, float& left, float& right, float& top, flo
|
|||
|
||||
CSimpleFontString* LoadXML_String(XMLNode* node, CSimpleFrame* frame, CStatus* status) {
|
||||
// TODO
|
||||
// v3 = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0, a__avcsimplefon, -2);
|
||||
// auto m = CDataAllocator::GetData(CSimpleFontString::s_allocator, 0, a__avcsimplefon, -2);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0);
|
||||
|
||||
CSimpleFontString* fontString;
|
||||
|
||||
if (m) {
|
||||
fontString = new (m) CSimpleFontString(frame, 2, 1);
|
||||
} else {
|
||||
fontString = nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleFontString), __FILE__, __LINE__, 0x0);
|
||||
auto fontString = new (m) CSimpleFontString(frame, 2, 1);
|
||||
|
||||
fontString->PreLoadXML(node, status);
|
||||
fontString->LoadXML(node, status);
|
||||
|
|
@ -266,17 +259,10 @@ CSimpleFontString* LoadXML_String(XMLNode* node, CSimpleFrame* frame, CStatus* s
|
|||
|
||||
CSimpleTexture* LoadXML_Texture(XMLNode* node, CSimpleFrame* frame, CStatus* status) {
|
||||
// TODO
|
||||
// v3 = (CSimpleTexture *)CDataAllocator::GetData((int)CSimpleTexture::s_allocator, 0, a__avcsimpletex, -2);
|
||||
// auto m = (CSimpleTexture *)CDataAllocator::GetData((int)CSimpleTexture::s_allocator, 0, a__avcsimpletex, -2);
|
||||
|
||||
void* m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0);
|
||||
|
||||
CSimpleTexture* texture;
|
||||
|
||||
if (m) {
|
||||
texture = new (m) CSimpleTexture(frame, 2, 1);
|
||||
} else {
|
||||
texture = nullptr;
|
||||
}
|
||||
auto m = SMemAlloc(sizeof(CSimpleTexture), __FILE__, __LINE__, 0x0);
|
||||
auto texture = new (m) CSimpleTexture(frame, 2, 1);
|
||||
|
||||
texture->PreLoadXML(node, status);
|
||||
texture->LoadXML(node, status);
|
||||
|
|
|
|||
|
|
@ -6,24 +6,17 @@
|
|||
#include <storm/Memory.hpp>
|
||||
|
||||
void* luaM_initPool() {
|
||||
void* v0 = SMemAlloc(sizeof(MemPool*) * 9, ".\\src\\lmemPool.cpp", 243, 0);
|
||||
MemPool** pools = (MemPool**)v0;
|
||||
void* m = SMemAlloc(sizeof(MemPool*) * 9, __FILE__, __LINE__, 0x0);
|
||||
MemPool** pools = (MemPool**)m;
|
||||
|
||||
uint32_t v2 = 0;
|
||||
|
||||
void* v3;
|
||||
MemPool* v4;
|
||||
size_t v5;
|
||||
size_t v6;
|
||||
|
||||
do {
|
||||
v3 = SMemAlloc(sizeof(MemPool), ".\\src\\lmemPool.cpp", 245, 0);
|
||||
|
||||
if (v3) {
|
||||
v4 = new (v3) MemPool();
|
||||
} else {
|
||||
v4 = 0;
|
||||
}
|
||||
auto poolMem = SMemAlloc(sizeof(MemPool), __FILE__, __LINE__, 0x0);
|
||||
auto v4 = new (poolMem) MemPool();
|
||||
|
||||
pools[v2] = v4;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue