Decompile 11 functions in Source/Render/DCSurface.cpp, Source/Render/DCSurface.h
Batch #136 by ragnarok-clanker: 11 byte-identical, 0 confirmed by peer review. - fn_02274 RenderSystemHolder::CreateRenderer: byte-identical - fn_02278 RenderSystemHolder::Close: byte-identical - fn_02280 RenderSystemHolder::UpdateOption: byte-identical - fn_02281 RenderSystemHolder::RestoreDisplayMode: byte-identical - fn_02282 RenderSystemHolder::PrepareErrorDialog: byte-identical - fn_02285 RenderSystemHolder::Backend: byte-identical - fn_02287 RenderSystemHolder::BackBufferTexture: byte-identical - fn_02288 RenderSystemHolder::Height: byte-identical - fn_02292 RenderSystemHolder::Width: byte-identical - fn_02294 RenderSystemHolder::IsWindowed: byte-identical - fn_02295 RenderSystemHolder::TestDevice: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
9822c2fdf5
commit
bb8ac68b8e
2 changed files with 85 additions and 25 deletions
|
|
@ -10,6 +10,73 @@ std::shared_ptr<CSurface> AcquireBackBufferSurface(CRenderSystemBase* system) {
|
|||
return system ? system->BackBufferSurface() : std::shared_ptr<CSurface>{};
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02274
|
||||
CRenderer* RenderSystemHolder::CreateRenderer() {
|
||||
return this->system ? this->system->CreateRenderer() : nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// FUNCTION: fn_02278
|
||||
HRESULT RenderSystemHolder::Close() {
|
||||
return this->system ? this->system->Close() : static_cast<HRESULT>(0x8000000E);
|
||||
}
|
||||
|
||||
|
||||
// FUNCTION: fn_02280
|
||||
void RenderSystemHolder::UpdateOption() {
|
||||
if (this->system) {
|
||||
this->system->UpdateOption();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02281
|
||||
void RenderSystemHolder::RestoreDisplayMode() {
|
||||
if (this->system) {
|
||||
this->system->RestoreDisplayMode();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02282
|
||||
void RenderSystemHolder::PrepareErrorDialog() {
|
||||
if (this->system) {
|
||||
this->system->PrepareErrorDialog();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02285
|
||||
std::int32_t RenderSystemHolder::Backend() const {
|
||||
return this->system ? this->system->Backend() : -1;
|
||||
}
|
||||
|
||||
|
||||
// FUNCTION: fn_02287
|
||||
CTexture* RenderSystemHolder::BackBufferTexture() const {
|
||||
return this->system ? this->system->BackBufferTexture() : nullptr;
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02288
|
||||
std::uint32_t RenderSystemHolder::Height() const {
|
||||
return this->system ? this->system->Height() : 0;
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02292
|
||||
std::uint32_t RenderSystemHolder::Width() const {
|
||||
return this->system ? this->system->Width() : 0;
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02294
|
||||
bool RenderSystemHolder::IsWindowed() const {
|
||||
return this->system ? this->system->IsWindowed() : false;
|
||||
}
|
||||
|
||||
// FUNCTION: fn_02295
|
||||
HRESULT RenderSystemHolder::TestDevice() const {
|
||||
return this->system ? this->system->TestDevice() : static_cast<HRESULT>(0x8000000E);
|
||||
}
|
||||
|
||||
|
||||
// OFFSET: 0x00548FE0
|
||||
// FUNCTION: fn_01864
|
||||
CDCSurface::CDCSurface(std::shared_ptr<CSurface> surface) : m_surface(std::move(surface)) {
|
||||
|
|
|
|||
|
|
@ -15,34 +15,27 @@ struct ScreenDimensions {
|
|||
int width;
|
||||
};
|
||||
|
||||
inline ScreenDimensions DefaultResolution() {
|
||||
return ScreenDimensions{768, 1024};
|
||||
}
|
||||
ScreenDimensions* DefaultResolution(ScreenDimensions* output);
|
||||
|
||||
struct RenderSystemHolder {
|
||||
CRenderSystemBase* system;
|
||||
/* 0000 */ CRenderSystemBase* system;
|
||||
|
||||
std::int32_t Backend() const {
|
||||
return this->system ? this->system->Backend() : -1;
|
||||
}
|
||||
CTexture* BackBufferTexture() const {
|
||||
return this->system ? this->system->BackBufferTexture() : nullptr;
|
||||
}
|
||||
std::uint32_t Width() const {
|
||||
return this->system ? this->system->Width() : 0;
|
||||
}
|
||||
std::uint32_t Height() const {
|
||||
return this->system ? this->system->Height() : 0;
|
||||
}
|
||||
bool IsWindowed() const {
|
||||
return this->system ? this->system->IsWindowed() : false;
|
||||
}
|
||||
HRESULT TestDevice() const {
|
||||
return this->system ? this->system->TestDevice() : static_cast<HRESULT>(0x8000000E);
|
||||
}
|
||||
HRESULT Present(bool option) const {
|
||||
return this->system ? this->system->Present(option) : static_cast<HRESULT>(0x8000000E);
|
||||
}
|
||||
CRenderer* CreateRenderer();
|
||||
CSurface* CreateSurface(std::uint32_t width, std::uint32_t height);
|
||||
CTexture* CreateTexture(std::uint32_t width, std::uint32_t height, std::int32_t format, bool dynamic, bool renderTarget);
|
||||
CSurface* CreateSurfaceOrTexture(std::uint32_t width, std::uint32_t height);
|
||||
HRESULT Close();
|
||||
void DestroySurface(CSurface* surface);
|
||||
void UpdateOption();
|
||||
void RestoreDisplayMode();
|
||||
void PrepareErrorDialog();
|
||||
std::int32_t Backend() const;
|
||||
CTexture* BackBufferTexture() const;
|
||||
std::uint32_t Width() const;
|
||||
std::uint32_t Height() const;
|
||||
bool IsWindowed() const;
|
||||
HRESULT TestDevice() const;
|
||||
HRESULT Present(bool option) const;
|
||||
};
|
||||
|
||||
__declspec(noinline) inline RenderSystemHolder* GetRenderSystemHolder() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue