spidey-decomp/ob.cpp

40 lines
635 B
C++
Raw Normal View History

2023-11-13 18:23:10 +00:00
#include "ob.h"
#include "mem.h"
#include <cstring>
#include "validate.h"
2023-11-13 18:23:10 +00:00
void* CItem::operator new(unsigned int size) {
void *result = DCMem_New(size, 0, 1, 0, 1);
unsigned int adjusted_size = ((size + 3) & 0xFFFFFFFC) >> 2;
if ( adjusted_size )
memset(result, 0, 4 * adjusted_size);
return result;
}
CItem::CItem(){}
CItem::~CItem(){}
//TODO
void CItem::InitItem(const char *)
{
this->mRegion = 69;
this->mModel = 0;
}
void validate_CItem(void){
VALIDATE(CItem, mFlags, 0x4);
VALIDATE(CItem, mPos, 0x8);
VALIDATE(CItem, mAngles, 0x14);
VALIDATE(CItem, mModel, 0x1A);
VALIDATE(CItem, mRegion, 0x1F);
2023-11-13 18:23:10 +00:00
}