Esempio n. 1
0
BSFaceGenBaseMorphExtraData* BSFaceGenBaseMorphExtraData::Create(const BSFixedString & name, UInt32 vertexCount)
{
	void* memory = Heap_Allocate(sizeof(BSFaceGenBaseMorphExtraData));
	memset(memory, 0, sizeof(BSFaceGenBaseMorphExtraData));
	((UInt64*)memory)[0] = s_BSFaceGenBaseMorphExtraDataVtbl.GetUIntPtr();
	BSFaceGenBaseMorphExtraData * data = (BSFaceGenBaseMorphExtraData*)memory;
	data->m_name = name;
	data->modelVertexCount = vertexCount;
	data->vertexCount = vertexCount;
	data->vertexData = (NiPoint3*)Heap_Allocate(sizeof(NiPoint3) * vertexCount);
	memset(data->vertexData, 0, sizeof(NiPoint3) * vertexCount);
	return data;
}
int main(void){
  Heap_Init();
  Pt1 = Heap_Allocate();
  for(;;){
    Pt2 = Heap_Allocate();
    Pt3 = Heap_Allocate();
    Pt4 = Heap_Allocate();
    Pt5 = Heap_Allocate();
    Heap_Release(Pt4);
    Heap_Release(Pt3);
    Heap_Release(Pt2);
    Heap_Release(Pt5);
    count = count + 1;
  }
}
Esempio n. 3
0
InventoryEntryData * InventoryEntryData::Create(TESForm * item, UInt32 count)
{
	InventoryEntryData * p = (InventoryEntryData *)Heap_Allocate(sizeof(InventoryEntryData));
	ASSERT(p);

	new (p) InventoryEntryData(item, count);
	p->extendDataList = ExtendDataList::Create();

	return p;
}
Esempio n. 4
0
NiStringExtraData * NiStringExtraData::Create(const BSFixedString & name, const BSFixedString & string)
{
	void* memory = Heap_Allocate(sizeof(NiStringExtraData));
	memset(memory, 0, sizeof(NiStringExtraData));
	((UInt64*)memory)[0] = s_NiStringExtraDataVtbl.GetUIntPtr();
	NiStringExtraData * data = (NiStringExtraData*)memory;
	data->m_name = name;
	data->m_string = string;
	return data;
}
Esempio n. 5
0
BSFaceGenBaseMorphExtraData * BSFaceGenBaseMorphExtraData::Create(BSTriShape * shape)
{
	BSFaceGenBaseMorphExtraData * data = (BSFaceGenBaseMorphExtraData*)Heap_Allocate(sizeof(BSFaceGenBaseMorphExtraData));
	CALL_MEMBER_FN(data, ctor)(shape);
	return data;
}