feat: game can now save and display thumbnails, code rebuilt from the xbox one edition of the game

fix: Renderer::CaptureThumbnail now can capture thumbnails correctly
fix: renderTargetViews and renderTargetShaderResourceViews are no longer null
fix: texture saving functions were using BGRA instead of RGBA format
This commit is contained in:
Patoke
2026-03-04 06:51:35 -03:00
parent d7f4651c52
commit 36d18b209e
5 changed files with 262 additions and 37 deletions
+13
View File
@@ -53,6 +53,10 @@ public:
void CreateSaveUniqueName(void);
// @Patoke add: definition taken from the Xbox One binaries
void AddTextFieldToPNG(PBYTE pbImageData, DWORD dwImageBytes, PBYTE pbTextData, DWORD dwTextBytes, DWORD dwTotalSizeAllocated);
unsigned int ReverseBytes(unsigned int uiValue);
void *m_pSaveData;
unsigned int m_uiSaveSize;
char m_szSaveUniqueName[32];
@@ -60,4 +64,13 @@ public:
bool m_bIsSafeDisabled;
bool m_bHasSaveDetails;
SAVE_DETAILS *m_pSaveDetails;
// @Patoke add
PBYTE m_pbThumbnailData;
unsigned int m_uiThumbnailSize;
PBYTE m_pbImageData;
unsigned int m_uiImageSize;
static char szPNGHeader[];
};