void PrintMessage(LPCSTR fmt, ...) { static char dest[4096]; LPCSTR *ppc = (LPCSTR*)_ADDRESSOF(fmt); vsprintf_s(dest, 4095, fmt, (va_list)&(ppc[1])); OutputDebugString(dest); printf(dest); if(fileOut) fprintf(fileOut, dest); }
bool AssetBase::load_asset_file_header( std::ifstream &file, AssetFileHeader &fileHeader) { file.read(_ADDRESSOF(fileHeader.type), sizeof(fileHeader.type)); size_t len; file.read(_ADDRESSOF(len), sizeof(len)); fileHeader.name.resize(len+1); file.read(_ADDRESSOF(*fileHeader.name.c_data()), len); switch(fileHeader.type) { case AssetType::AT_TEXT: case AssetType::AT_BITMAP: case AssetType::AT_MODEL: case AssetType::AT_TEXTURE: case AssetType::AT_CUSTOM: { return true; } break; default: return false; } }
uintptr_t call(const char* name, ...) { func_value const* nf = jass_func(name); if (!nf) { nf = japi_func(name); if (!nf) { return 0; } } return call(nf->get_address(), (const uintptr_t*)((va_list)_ADDRESSOF(name) + _INTSIZEOF(name)), nf->get_param().size()); }
//==================================================================================== void MWTHISCALL CAnimation::__ChangeAnimGroup(BYTE AnimGroup, long AnimType, long Unkn00, long Unkn01) { MORROWIND::PCObjREFR ObjectRef = ((MORROWIND::PCObjREFR*)(((char*)_ADDRESSOF(Unkn01))+_INTSIZEOF(Unkn01)))[0]; this->_ChangeAnimGroup(AnimGroup, AnimType, Unkn00, Unkn01); }