mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-11 00:28:30 +00:00
Use standard buffer types for in-memory TPD data
This commit is contained in:
parent
37aa3463be
commit
5f991ccd6a
|
|
@ -5426,7 +5426,7 @@ void CMinecraftApp::GetMemFileDetails(const std::wstring &wName, std::uint8_t **
|
|||
LeaveCriticalSection(&csMemFilesLock);
|
||||
}
|
||||
|
||||
void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
|
||||
void CMinecraftApp::AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned int dwBytes)
|
||||
{
|
||||
EnterCriticalSection(&csMemTPDLock);
|
||||
// check it's not already in
|
||||
|
|
@ -5515,7 +5515,7 @@ bool CMinecraftApp::IsFileInTPD(int iConfig)
|
|||
return val;
|
||||
}
|
||||
|
||||
void CMinecraftApp::GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes)
|
||||
void CMinecraftApp::GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pdwBytes)
|
||||
{
|
||||
EnterCriticalSection(&csMemTPDLock);
|
||||
AUTO_VAR(it, m_MEM_TPD.find(iConfig));
|
||||
|
|
|
|||
|
|
@ -347,10 +347,10 @@ public:
|
|||
bool IsFileInMemoryTextures(const std::wstring &wName);
|
||||
|
||||
// Texture Pack Data files (icon, banner, comparison shot & text)
|
||||
void AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes);
|
||||
void AddMemoryTPDFile(int iConfig, std::uint8_t *pbData, unsigned int dwBytes);
|
||||
void RemoveMemoryTPDFile(int iConfig);
|
||||
bool IsFileInTPD(int iConfig);
|
||||
void GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes);
|
||||
void GetTPD(int iConfig, std::uint8_t **ppbData, unsigned int *pdwBytes);
|
||||
int GetTPDSize() {return m_MEM_TPD.size();}
|
||||
#ifndef __PS3__
|
||||
int GetTPConfigVal(WCHAR *pwchDataFile);
|
||||
|
|
|
|||
|
|
@ -140,8 +140,10 @@ void IUIScene_StartGame::UpdateTexturePackDescription(int index)
|
|||
#if TO_BE_IMPLEMENTED
|
||||
// this is probably a texture pack icon added from TMS
|
||||
|
||||
DWORD dwBytes=0,dwFileBytes=0;
|
||||
PBYTE pbData=NULL,pbFileData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
DWORD dwFileBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
PBYTE pbFileData=NULL;
|
||||
|
||||
CXuiCtrl4JList::LIST_ITEM_INFO ListItem;
|
||||
// get the current index of the list, and then get the data
|
||||
|
|
|
|||
|
|
@ -708,8 +708,8 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
|
|||
{
|
||||
if(m_iConfigA[i]!=-1)
|
||||
{
|
||||
DWORD dwBytes=0;
|
||||
PBYTE pbData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
//app.DebugPrintf("Retrieving iConfig %d from TPD\n",m_iConfigA[i]);
|
||||
|
||||
app.GetTPD(m_iConfigA[i],&pbData,&dwBytes);
|
||||
|
|
|
|||
|
|
@ -1696,8 +1696,8 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
|
|||
|
||||
if(tp==NULL)
|
||||
{
|
||||
DWORD dwBytes=0;
|
||||
PBYTE pbData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
app.GetTPD(sessionInfo->data.texturePackParentId,&pbData,&dwBytes);
|
||||
|
||||
// is it in the tpd data ?
|
||||
|
|
|
|||
|
|
@ -783,8 +783,8 @@ HRESULT CScene_LoadGameSettings::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandle
|
|||
{
|
||||
if(m_iConfigA[i]!=-1)
|
||||
{
|
||||
DWORD dwBytes=0;
|
||||
PBYTE pbData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
app.GetTPD(m_iConfigA[i],&pbData,&dwBytes);
|
||||
|
||||
ZeroMemory(&ListInfo,sizeof(CXuiCtrl4JList::LIST_ITEM_INFO));
|
||||
|
|
@ -1241,8 +1241,10 @@ void CScene_LoadGameSettings::UpdateTexturePackDescription(int index)
|
|||
if(tp==NULL)
|
||||
{
|
||||
// this is probably a texture pack icon added from TMS
|
||||
DWORD dwBytes=0,dwFileBytes=0;
|
||||
PBYTE pbData=NULL,pbFileData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
DWORD dwFileBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
PBYTE pbFileData=NULL;
|
||||
|
||||
CXuiCtrl4JList::LIST_ITEM_INFO ListItem;
|
||||
// get the current index of the list, and then get the data
|
||||
|
|
|
|||
|
|
@ -705,8 +705,8 @@ HRESULT CScene_MultiGameCreate::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled
|
|||
{
|
||||
if(m_iConfigA[i]!=-1)
|
||||
{
|
||||
DWORD dwBytes=0;
|
||||
PBYTE pbData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
//app.DebugPrintf("Retrieving iConfig %d from TPD\n",m_iConfigA[i]);
|
||||
|
||||
app.GetTPD(m_iConfigA[i],&pbData,&dwBytes);
|
||||
|
|
@ -1099,8 +1099,10 @@ void CScene_MultiGameCreate::UpdateTexturePackDescription(int index)
|
|||
{
|
||||
// this is probably a texture pack icon added from TMS
|
||||
|
||||
DWORD dwBytes=0,dwFileBytes=0;
|
||||
PBYTE pbData=NULL,pbFileData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
DWORD dwFileBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
PBYTE pbFileData=NULL;
|
||||
|
||||
CXuiCtrl4JList::LIST_ITEM_INFO ListItem;
|
||||
// get the current index of the list, and then get the data
|
||||
|
|
|
|||
|
|
@ -1275,8 +1275,8 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
|
|||
|
||||
if(tp==NULL)
|
||||
{
|
||||
DWORD dwBytes=0;
|
||||
PBYTE pbData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
app.GetTPD(sessionInfo->data.texturePackParentId,&pbData,&dwBytes);
|
||||
|
||||
// is it in the tpd data ?
|
||||
|
|
@ -1744,8 +1744,8 @@ HRESULT CScene_MultiGameJoinLoad::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandl
|
|||
{
|
||||
if(m_iConfigA[i]!=-1)
|
||||
{
|
||||
DWORD dwBytes=0;
|
||||
PBYTE pbData=NULL;
|
||||
unsigned int dwBytes=0;
|
||||
std::uint8_t *pbData=NULL;
|
||||
//app.DebugPrintf("Retrieving iConfig %d from TPD\n",m_iConfigA[i]);
|
||||
|
||||
app.GetTPD(m_iConfigA[i],&pbData,&dwBytes);
|
||||
|
|
|
|||
Loading…
Reference in a new issue