本文整理汇总了C++中vm::ptr::addr方法的典型用法代码示例。如果您正苦于以下问题:C++ ptr::addr方法的具体用法?C++ ptr::addr怎么用?C++ ptr::addr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vm::ptr
的用法示例。
在下文中一共展示了ptr::addr方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: send
s32 send(s32 s, vm::ptr<const char> buf, u32 len, s32 flags)
{
sys_net.Warning("send(s=%d, buf_addr=0x%x, len=%d, flags=0x%x)", s, buf.addr(), len, flags);
int ret = ::send(s, buf.get_ptr(), len, flags);
*g_lastError = getLastError();
return ret;
}
示例2: cellFontOpenFontFile
int cellFontOpenFontFile(vm::ptr<CellFontLibrary> library, vm::ptr<const char> fontPath, u32 subNum, s32 uniqueId, vm::ptr<CellFont> font)
{
std::string fp(fontPath.get_ptr());
cellFont->Warning("cellFontOpenFontFile(library_addr=0x%x, fontPath=\"%s\", subNum=%d, uniqueId=%d, font_addr=0x%x)",
library.addr(), fp.c_str(), subNum, uniqueId, font.addr());
vfsFile f(fp);
if (!f.IsOpened())
return CELL_FONT_ERROR_FONT_OPEN_FAILED;
u32 fileSize = (u32)f.GetSize();
u32 bufferAddr = (u32)Memory.Alloc(fileSize, 1); // Freed in cellFontCloseFont
f.Read(vm::get_ptr<void>(bufferAddr), fileSize);
int ret = cellFontOpenFontMemory(library, bufferAddr, fileSize, subNum, uniqueId, font);
font->origin = CELL_FONT_OPEN_FONT_FILE;
return ret;
}
示例3: cellFontSetScalePixel
int cellFontSetScalePixel(vm::ptr<CellFont> font, float w, float h)
{
cellFont->Log("cellFontSetScalePixel(font_addr=0x%x, w=%f, h=%f)", font.addr(), w, h);
font->scale_x = w;
font->scale_y = h;
return CELL_FONT_OK;
}
示例4: _sys_printf
s32 _sys_printf(vm::ptr<const char> fmt)
{
sysPrxForUser->Todo("_sys_printf(fmt_addr=0x%x, ...)", fmt.addr());
// probably, assertion failed
sysPrxForUser->Warning("_sys_printf: \n%s", fmt.get_ptr());
return CELL_OK;
}
示例5: sys_tty_read
s32 sys_tty_read(s32 ch, vm::ptr<void> buf, u32 len, vm::ptr<u32> preadlen)
{
sys_tty.Error("sys_tty_read(ch=%d, buf_addr=0x%x, len=%d, preadlen_addr=0x%x)", ch, buf.addr(), len, preadlen.addr());
// We currently do not support reading from the Console
*preadlen = 0;
Emu.Pause();
return CELL_OK;
}
示例6: cellSailDescriptorIsAutoSelection
s32 cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
{
cellSail.Warning("cellSailDescriptorIsAutoSelection(pSelf_addr=0x%x)", pSelf.addr());
if (pSelf)
return pSelf->autoSelection;
return CELL_OK;
}
示例7: cellSailPlayerDestroyDescriptor
s32 cellSailPlayerDestroyDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
{
cellSail.Todo("cellSailPlayerAddDescriptor(pSelf_addr=0x%x, pDesc_addr=0x%x)", pSelf.addr(), pDesc.addr());
if (pDesc->registered)
return CELL_SAIL_ERROR_INVALID_STATE;
return CELL_OK;
}
示例8: sys_spinlock_unlock
void sys_spinlock_unlock(vm::ptr<atomic_be_t<u32>> lock)
{
sysPrxForUser.Log("sys_spinlock_unlock(lock=*0x%x)", lock);
// prx: sync and set 0
lock->exchange(be_t<u32>::make(0));
g_sys_spinlock_wm.notify(lock.addr());
}
示例9: cellNetCtlNetStartDialogLoadAsync
int cellNetCtlNetStartDialogLoadAsync(vm::ptr<CellNetCtlNetStartDialogParam> param)
{
cellNetCtl.Warning("cellNetCtlNetStartDialogLoadAsync(param_addr=0x%x)", param.addr());
// TODO: Actually sign into PSN
sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0);
return CELL_OK;
}
示例10: cellWebBrowserEstimate2
int cellWebBrowserEstimate2(const vm::ptr<const CellWebBrowserConfig2> config, vm::ptr<u32> memSize)
{
cellSysutil.Warning("cellWebBrowserEstimate2(config_addr=0x%x, memSize_addr=0x%x)", config.addr(), memSize.addr());
// TODO: When cellWebBrowser stuff is implemented, change this to some real
// needed memory buffer size.
*memSize = 1 * 1024 * 1024; // 1 MB
return CELL_OK;
}
示例11: cellFontOpenFontMemory
int cellFontOpenFontMemory(vm::ptr<CellFontLibrary> library, u32 fontAddr, u32 fontSize, u32 subNum, u32 uniqueId, vm::ptr<CellFont> font)
{
cellFont->Warning("cellFontOpenFontMemory(library_addr=0x%x, fontAddr=0x%x, fontSize=%d, subNum=%d, uniqueId=%d, font_addr=0x%x)",
library.addr(), fontAddr, fontSize, subNum, uniqueId, font.addr());
if (!s_fontInternalInstance->m_bInitialized)
return CELL_FONT_ERROR_UNINITIALIZED;
font->stbfont = (stbtt_fontinfo*)((u8*)&(font->stbfont) + sizeof(void*)); // hack: use next bytes of the struct
if (!stbtt_InitFont(font->stbfont, (unsigned char*)Memory.VirtualToRealAddr(fontAddr), 0))
return CELL_FONT_ERROR_FONT_OPEN_FAILED;
font->renderer_addr = 0;
font->fontdata_addr = fontAddr;
font->origin = CELL_FONT_OPEN_MEMORY;
return CELL_FONT_OK;
}
示例12: sys_memory_get_user_memory_size
s32 sys_memory_get_user_memory_size(vm::ptr<sys_memory_info_t> mem_info)
{
sys_memory.Warning("sys_memory_get_user_memory_size(mem_info_addr=0x%x)", mem_info.addr());
// Fetch the user memory available.
mem_info->total_user_memory = Memory.GetUserMemTotalSize();
mem_info->available_user_memory = Memory.GetUserMemAvailSize();
return CELL_OK;
}
示例13: cellFontInit
int cellFontInit(vm::ptr<CellFontConfig> config)
{
cellFont->Log("cellFontInit(config=0x%x)", config.addr());
vm::var<be_t<u64>> revisionFlags;
revisionFlags.value() = 0;
cellFontGetRevisionFlags(revisionFlags);
return cellFontInitializeWithRevision(revisionFlags.value(), config);
}
示例14: cellSysutilDisableBgmPlaybackEx
int cellSysutilDisableBgmPlaybackEx(vm::ptr<CellSysutilBgmPlaybackExtraParam> param)
{
cellSysutil.Warning("cellSysutilDisableBgmPlaybackEx(param_addr=0x%x)", param.addr());
// TODO
bgm_playback_enabled = false;
return CELL_OK;
}
示例15: cellFontSetEffectSlant
int cellFontSetEffectSlant(vm::ptr<CellFont> font, float slantParam)
{
cellFont->Log("cellFontSetEffectSlant(font_addr=0x%x, slantParam=%f)", font.addr(), slantParam);
if (slantParam < -1.0 || slantParam > 1.0)
return CELL_FONT_ERROR_INVALID_PARAMETER;
font->slant = slantParam;
return CELL_FONT_OK;
}