forked from metin-server/m2dev-client-src
some ptr type conversions fixed
This commit is contained in:
@@ -662,14 +662,14 @@ void CDXTCImage::DecompressDXT1(int miplevel, DWORD * pdwDest)
|
||||
for (y = 0; y < yblocks; ++y)
|
||||
{
|
||||
// 8 bytes per block
|
||||
pBlock = (DXTColBlock *) ((DWORD) pPos + y * xblocks * 8);
|
||||
pBlock = (DXTColBlock *) ((uintptr_t) pPos + y * xblocks * 8);
|
||||
|
||||
for (x = 0; x < xblocks; ++x, ++pBlock)
|
||||
{
|
||||
// inline func:
|
||||
GetColorBlockColors(pBlock, &col_0, &col_1, &col_2, &col_3, wrd);
|
||||
|
||||
pImPos = (DWORD *) ((DWORD) pBase + x*16 + (y*4) * nWidth * 4);
|
||||
pImPos = (DWORD *) ((uintptr_t) pBase + x*16 + (y*4) * nWidth * 4);
|
||||
DecodeColorBlock(pImPos, pBlock, nWidth, (DWORD *)&col_0, (DWORD *)&col_1, (DWORD *)&col_2, (DWORD *)&col_3);
|
||||
// Set to RGB test pattern
|
||||
// pImPos = (DWORD*) ((DWORD) pBase + i * 4 + j * m_nWidth * 4);
|
||||
@@ -716,7 +716,7 @@ void CDXTCImage::DecompressDXT3(int miplevel, DWORD* pdwDest)
|
||||
{
|
||||
// 8 bytes per block
|
||||
// 1 block for alpha, 1 block for color
|
||||
pBlock = (DXTColBlock *) ((DWORD) (pPos + y * xblocks * 16));
|
||||
pBlock = (DXTColBlock *) ((uintptr_t) (pPos + y * xblocks * 16));
|
||||
|
||||
for (x = 0; x < xblocks; ++x, ++pBlock)
|
||||
{
|
||||
@@ -731,7 +731,7 @@ void CDXTCImage::DecompressDXT3(int miplevel, DWORD* pdwDest)
|
||||
|
||||
// Decode the color block into the bitmap bits
|
||||
// inline func:
|
||||
pImPos = (DWORD *) ((DWORD) (pBase + x * 16 + (y * 4) * nWidth * 4));
|
||||
pImPos = (DWORD *) ((uintptr_t) (pBase + x * 16 + (y * 4) * nWidth * 4));
|
||||
|
||||
DecodeColorBlock(pImPos,
|
||||
pBlock,
|
||||
@@ -780,7 +780,7 @@ void CDXTCImage::DecompressDXT5(int level, DWORD * pdwDest)
|
||||
{
|
||||
// 8 bytes per block
|
||||
// 1 block for alpha, 1 block for color
|
||||
pBlock = (DXTColBlock*) ((DWORD) (pPos + y * xblocks * 16));
|
||||
pBlock = (DXTColBlock*) ((uintptr_t) (pPos + y * xblocks * 16));
|
||||
|
||||
for (x = 0; x < xblocks; ++x, ++pBlock)
|
||||
{
|
||||
@@ -797,7 +797,7 @@ void CDXTCImage::DecompressDXT5(int level, DWORD * pdwDest)
|
||||
|
||||
// Decode the color block into the bitmap bits
|
||||
// inline func:
|
||||
pImPos = (DWORD *) ((DWORD) (pBase + x * 16 + (y * 4) * nWidth * 4));
|
||||
pImPos = (DWORD *) ((uintptr_t) (pBase + x * 16 + (y * 4) * nWidth * 4));
|
||||
|
||||
//DecodeColorBlock(pImPos, pBlock, nWidth, (DWORD *)&col_0, (DWORD *)&col_1, (DWORD *)&col_2, (DWORD *)&col_3);
|
||||
DecodeColorBlock(pImPos, pBlock, nWidth, (DWORD *)&col_0, (DWORD *)&col_1, (DWORD *)&col_2, (DWORD *)&col_3);
|
||||
|
||||
@@ -82,8 +82,8 @@ PyObject* grpImageGenerateExpanded(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
PyObject* grpImageGenerateFromHandle(PyObject * poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BadArgument();
|
||||
|
||||
CGraphicImageInstance * pImageInstance = CGraphicImageInstance::New();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
bool PyTuple_GetTextInstance(PyObject* poArgs, int pos, CGraphicTextInstance** ppTextInstance)
|
||||
{
|
||||
int handle;
|
||||
if (!PyTuple_GetInteger(poArgs, pos, &handle))
|
||||
unsigned long long handle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, pos, &handle))
|
||||
return false;
|
||||
|
||||
if (!handle)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
bool PyTuple_GetThingInstance(PyObject* poArgs, int pos, CGraphicThingInstance** ppRetThingInstance)
|
||||
{
|
||||
int handle;
|
||||
if (!PyTuple_GetInteger(poArgs, pos, &handle))
|
||||
unsigned long long handle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, pos, &handle))
|
||||
return false;
|
||||
|
||||
if (!handle)
|
||||
|
||||
@@ -287,8 +287,8 @@ PyObject * itemGetIconInstance(PyObject * poSelf, PyObject * poArgs)
|
||||
|
||||
PyObject * itemDeleteIconInstance(PyObject * poSelf, PyObject * poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BadArgument();
|
||||
|
||||
CGraphicImageInstance::Delete((CGraphicImageInstance *) iHandle);
|
||||
|
||||
@@ -2092,8 +2092,8 @@ PyObject * skillGetIconInstanceNew(PyObject * poSelf, PyObject * poArgs)
|
||||
|
||||
PyObject * skillDeleteIconInstance(PyObject * poSelf, PyObject * poArgs)
|
||||
{
|
||||
int iHandle;
|
||||
if (!PyTuple_GetInteger(poArgs, 0, &iHandle))
|
||||
unsigned long long iHandle;
|
||||
if (!PyTuple_GetUnsignedLongLong(poArgs, 0, &iHandle))
|
||||
return Py_BadArgument();
|
||||
|
||||
CGraphicImageInstance::Delete((CGraphicImageInstance *) iHandle);
|
||||
|
||||
Reference in New Issue
Block a user