#include #include #include #include #include #include #include void Game_PlaySound(const char* pName) { if (EmbeddedPlayer::s_isActive) { EmbeddedPlayer::Play(pName); } else { guest_stack_var soundPlayer; GuestToHostFunction(sub_82B4DF50, soundPlayer.get(), ((be*)g_memory.Translate(0x83367900))->get(), 7, 0, 0); auto soundPlayerVtable = (be*)g_memory.Translate(*(be*)soundPlayer->get()); uint32_t virtualFunction = *(soundPlayerVtable + 1); size_t strLen = strlen(pName); void *strAllocation = g_userHeap.Alloc(strLen + 1); memcpy(strAllocation, pName, strLen + 1); GuestToHostFunction(virtualFunction, soundPlayer->get(), strAllocation, 0); g_userHeap.Free(strAllocation); } } void Window_SetDisplay(int displayIndex) { GameWindow::SetDisplay(displayIndex); } void Window_SetFullscreen(bool isEnabled) { GameWindow::SetFullscreen(isEnabled); }