mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-05 19:19:43 -06:00
Add SDL and create basic window
This commit is contained in:
@@ -1 +1,19 @@
|
||||
#include "Window.h"
|
||||
#include "window.h"
|
||||
#include <config.h>
|
||||
#include <kernel/function.h>
|
||||
|
||||
SDL_Window* Window::s_window = nullptr;
|
||||
void* Window::s_windowHandle = nullptr;
|
||||
|
||||
void Window::Init()
|
||||
{
|
||||
auto title = Config::Language == ELanguage_Japanese
|
||||
? "Sonic World Adventure"
|
||||
: "SONIC UNLEASHED";
|
||||
|
||||
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
||||
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
|
||||
|
||||
s_window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_RESIZABLE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <SDL.h>
|
||||
|
||||
struct Window
|
||||
{
|
||||
static SDL_Window* s_window;
|
||||
static void* s_windowHandle;
|
||||
|
||||
static void Init();
|
||||
};
|
||||
|
||||
23
UnleashedRecomp/gpu/video.cpp
Normal file
23
UnleashedRecomp/gpu/video.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <stdafx.h>
|
||||
#include "video.h"
|
||||
#include "window.h"
|
||||
#include "kernel/function.h"
|
||||
|
||||
void VdInitializeSystem()
|
||||
{
|
||||
Window::Init();
|
||||
}
|
||||
|
||||
void* VdGetGlobalDevice()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Direct3D stubs
|
||||
GUEST_FUNCTION_STUB(sub_824EB290);
|
||||
GUEST_FUNCTION_STUB(sub_82BDA8C0);
|
||||
GUEST_FUNCTION_STUB(sub_82BE05B8);
|
||||
|
||||
// Movie player stubs
|
||||
GUEST_FUNCTION_STUB(sub_82AE3638);
|
||||
GUEST_FUNCTION_STUB(sub_82AE2BF8);
|
||||
4
UnleashedRecomp/gpu/video.h
Normal file
4
UnleashedRecomp/gpu/video.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
void VdInitializeSystem();
|
||||
SWA_API void* VdGetGlobalDevice();
|
||||
Reference in New Issue
Block a user