mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
get rid of a few warnings
This commit is contained in:
Vendored
+1
-1
@@ -109,7 +109,7 @@ SNetGetGameInfo(
|
||||
BOOL
|
||||
STORMAPI
|
||||
SNetGetTurnsInTransit(
|
||||
int *turns);
|
||||
DWORD *turns);
|
||||
|
||||
// Network provider structures
|
||||
typedef struct _client_info
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ void InitAutomap()
|
||||
DWORD dwTiles;
|
||||
int x, y;
|
||||
BYTE *pAFile, *pTmp;
|
||||
int i;
|
||||
DWORD i;
|
||||
|
||||
memset(automaptype, 0, sizeof(automaptype));
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ static void PkwareBufferWrite(char *buf, unsigned int *size, void *param)
|
||||
pInfo->destOffset += *size;
|
||||
}
|
||||
|
||||
int PkwareCompress(BYTE *srcData, int size)
|
||||
DWORD PkwareCompress(BYTE *srcData, DWORD size)
|
||||
{
|
||||
BYTE *destData;
|
||||
char *ptr;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ void Decrypt(DWORD *castBlock, DWORD size, DWORD key);
|
||||
void Encrypt(DWORD *castBlock, DWORD size, DWORD key);
|
||||
DWORD Hash(const char *s, int type);
|
||||
void InitHash();
|
||||
int PkwareCompress(BYTE *srcData, int size);
|
||||
DWORD PkwareCompress(BYTE *srcData, DWORD size);
|
||||
void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
+3
-3
@@ -616,7 +616,7 @@ void CelBlitWidth(BYTE *pBuff, int x, int y, int wdt, BYTE *pCelBuff, int nCel,
|
||||
* @param nCel CEL frame number
|
||||
* @param nWidth Width of sprite
|
||||
*/
|
||||
void CelBlitOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
|
||||
void CelBlitOutline(BYTE col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
|
||||
{
|
||||
int nDataSize, w;
|
||||
BYTE *src, *dst, *end;
|
||||
@@ -1055,7 +1055,7 @@ static void Cl2BlitSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWi
|
||||
* @param nWidth Width of sprite
|
||||
* @param col Color index from current palette
|
||||
*/
|
||||
static void Cl2BlitOutlineSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, char col)
|
||||
static void Cl2BlitOutlineSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE col)
|
||||
{
|
||||
int w;
|
||||
char width;
|
||||
@@ -1246,7 +1246,7 @@ void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
|
||||
* @param nCel CL2 frame number
|
||||
* @param nWidth Width of sprite
|
||||
*/
|
||||
void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
|
||||
void Cl2DrawOutline(BYTE col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth)
|
||||
{
|
||||
int nDataSize;
|
||||
BYTE *pRLEBytes;
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@ void CelClippedDrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void CelBlitLightSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth, BYTE *tbl);
|
||||
void CelDrawLightRedSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, char light);
|
||||
void CelBlitWidth(BYTE *pBuff, int x, int y, int wdt, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void CelBlitOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void CelBlitOutline(BYTE col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void ENG_set_pixel(int sx, int sy, BYTE col);
|
||||
void engine_draw_pixel(int sx, int sy);
|
||||
void DrawLine(int x0, int y0, int x1, int y1, BYTE col);
|
||||
@@ -77,7 +77,7 @@ BYTE *LoadFileInMem(const char *pszName, DWORD *pdwFileLen);
|
||||
DWORD LoadFileWithMem(const char *pszName, BYTE *p);
|
||||
void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel);
|
||||
void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void Cl2DrawOutline(BYTE col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, char light);
|
||||
void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth);
|
||||
void PlayInGameMovie(const char *pszMovie);
|
||||
|
||||
+1
-2
@@ -156,9 +156,8 @@ THEME_LOC themeLoc[MAXTHEMES];
|
||||
void FillSolidBlockTbls()
|
||||
{
|
||||
BYTE bv;
|
||||
DWORD dwTiles;
|
||||
DWORD i, dwTiles;
|
||||
BYTE *pSBFile, *pTmp;
|
||||
int i;
|
||||
|
||||
memset(nBlockTable, 0, sizeof(nBlockTable));
|
||||
memset(nSolidTable, 0, sizeof(nSolidTable));
|
||||
|
||||
+1
-2
@@ -332,8 +332,7 @@ BOOL gmenu_on_mouse_move()
|
||||
BOOL gmenu_left_mouse(BOOL isDown)
|
||||
{
|
||||
TMenuItem *pItem;
|
||||
DWORD i, w;
|
||||
int dummy;
|
||||
int i, w, dummy;
|
||||
|
||||
if (!isDown) {
|
||||
if (mouseNavigation) {
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
DEVILUTION_BEGIN_NAMESPACE
|
||||
|
||||
BYTE *sgpBackCel;
|
||||
int sgdwProgress;
|
||||
DWORD sgdwProgress;
|
||||
int progress_id;
|
||||
|
||||
/** The colour used for the progress bar as an index into the palette. */
|
||||
@@ -277,11 +277,11 @@ BOOL IncProgress()
|
||||
{
|
||||
interface_msg_pump();
|
||||
sgdwProgress += 23;
|
||||
if ((DWORD)sgdwProgress > 534)
|
||||
if (sgdwProgress > 534)
|
||||
sgdwProgress = 534;
|
||||
if (sgpBackCel)
|
||||
DrawCutscene();
|
||||
return (DWORD)sgdwProgress >= 534;
|
||||
return sgdwProgress >= 534;
|
||||
}
|
||||
|
||||
void ShowProgress(unsigned int uMsg)
|
||||
|
||||
@@ -651,7 +651,6 @@ BOOL mpqapi_has_file(const char *pszName)
|
||||
|
||||
BOOL OpenMPQ(const char *pszArchive, DWORD dwChar)
|
||||
{
|
||||
DWORD dwFlagsAndAttributes;
|
||||
DWORD key;
|
||||
_FILEHEADER fhdr;
|
||||
|
||||
|
||||
+4
-3
@@ -312,10 +312,11 @@ static void DeltaImportJunk(BYTE *src)
|
||||
}
|
||||
}
|
||||
|
||||
static int msg_comp_level(BYTE *buffer, BYTE *end)
|
||||
static DWORD msg_comp_level(BYTE *buffer, BYTE *end)
|
||||
{
|
||||
int size = end - buffer - 1;
|
||||
int pkSize = PkwareCompress(buffer + 1, size);
|
||||
DWORD size = end - buffer - 1;
|
||||
DWORD pkSize = PkwareCompress(buffer + 1, size);
|
||||
|
||||
*buffer = size != pkSize;
|
||||
|
||||
return pkSize + 1;
|
||||
|
||||
+3
-4
@@ -17,7 +17,7 @@ WORD sgwPackPlrOffsetTbl[MAX_PLRS];
|
||||
PkPlayerStruct netplr[MAX_PLRS];
|
||||
BOOLEAN sgbPlayerTurnBitTbl[MAX_PLRS];
|
||||
BOOLEAN sgbPlayerLeftGameTbl[MAX_PLRS];
|
||||
int sgbSentThisCycle;
|
||||
DWORD sgbSentThisCycle;
|
||||
BOOL gbShouldValidatePackage;
|
||||
BYTE gbActivePlayers;
|
||||
BOOLEAN gbGameDestroyed;
|
||||
@@ -77,7 +77,7 @@ static void multi_copy_packet(TBuffer *buf, void *packet, BYTE size)
|
||||
p[size] = 0;
|
||||
}
|
||||
|
||||
static BYTE *multi_recv_packet(TBuffer *pBuf, BYTE *body, int *size)
|
||||
static BYTE *multi_recv_packet(TBuffer *pBuf, BYTE *body, DWORD *size)
|
||||
{
|
||||
BYTE *src_ptr;
|
||||
size_t chunk_size;
|
||||
@@ -147,9 +147,8 @@ void NetSendHiPri(BYTE *pbMsg, BYTE bLen)
|
||||
{
|
||||
BYTE *hipri_body;
|
||||
BYTE *lowpri_body;
|
||||
DWORD len;
|
||||
DWORD size, len;
|
||||
TPkt pkt;
|
||||
int size;
|
||||
|
||||
if (pbMsg && bLen) {
|
||||
multi_copy_packet(&sgHiPriBuf, pbMsg, bLen);
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ DWORD nthread_send_and_recv_turn(DWORD cur_turn, int turn_delta)
|
||||
{
|
||||
DWORD new_cur_turn;
|
||||
int turn, turn_tmp;
|
||||
int curTurnsInTransit;
|
||||
DWORD curTurnsInTransit;
|
||||
|
||||
new_cur_turn = cur_turn;
|
||||
if (!SNetGetTurnsInTransit(&curTurnsInTransit)) {
|
||||
|
||||
+1
-1
@@ -579,7 +579,7 @@ RenderTile(BYTE *pBuff)
|
||||
*/
|
||||
void world_draw_black_tile(int sx, int sy)
|
||||
{
|
||||
int i, j, k;
|
||||
int i, j;
|
||||
BYTE *dst;
|
||||
|
||||
if (sx >= SCREEN_X + SCREEN_WIDTH || sy >= SCREEN_Y + VIEWPORT_HEIGHT + TILE_WIDTH / 2)
|
||||
|
||||
+2
-4
@@ -142,8 +142,9 @@ static void scrollrt_draw_cursor_back_buffer()
|
||||
*/
|
||||
static void scrollrt_draw_cursor_item()
|
||||
{
|
||||
int i, mx, my, col;
|
||||
int i, mx, my;
|
||||
BYTE *src, *dst;
|
||||
BYTE col;
|
||||
|
||||
assert(!sgdwCursWdt);
|
||||
|
||||
@@ -1339,7 +1340,6 @@ static void DrawFPS()
|
||||
{
|
||||
DWORD tc, frames;
|
||||
char String[12];
|
||||
HDC hdc;
|
||||
|
||||
if (frameflag && gbActive && pPanelText) {
|
||||
frameend++;
|
||||
@@ -1392,8 +1392,6 @@ static void DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt)
|
||||
static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BOOL draw_sbar, BOOL draw_btn)
|
||||
{
|
||||
int ysize;
|
||||
DWORD dwTicks;
|
||||
BOOL retry;
|
||||
|
||||
ysize = dwHgt;
|
||||
|
||||
|
||||
+2
-2
@@ -109,9 +109,9 @@ static void SHA1ProcessMessageBlock(SHA1Context *context)
|
||||
context->state[4] += E;
|
||||
}
|
||||
|
||||
static void SHA1Input(SHA1Context *context, const char *message_array, int len)
|
||||
static void SHA1Input(SHA1Context *context, const char *message_array, DWORD len)
|
||||
{
|
||||
int i, count;
|
||||
DWORD i, count;
|
||||
|
||||
count = context->count[0] + 8 * len;
|
||||
if (count < context->count[0])
|
||||
|
||||
+29
-29
@@ -2428,37 +2428,37 @@ void HealerBuyItem()
|
||||
|
||||
void S_BBuyEnter()
|
||||
{
|
||||
BOOL done;
|
||||
int i;
|
||||
|
||||
if (stextsel == 10) {
|
||||
stextshold = STORE_BBOY;
|
||||
stextvhold = stextsval;
|
||||
stextlhold = 10;
|
||||
int price = boyitem._iIvalue;
|
||||
if (gbIsHellfire)
|
||||
price -= boyitem._iIvalue >> 2;
|
||||
else
|
||||
price += boyitem._iIvalue >> 1;
|
||||
if (plr[myplr]._pGold < price) {
|
||||
StartStore(STORE_NOMONEY);
|
||||
} else {
|
||||
plr[myplr].HoldItem = boyitem;
|
||||
plr[myplr].HoldItem._iIvalue = price;
|
||||
SetCursor_(plr[myplr].HoldItem._iCurs + CURSOR_FIRSTITEM);
|
||||
done = FALSE;
|
||||
for (i = 0; i < NUM_INV_GRID_ELEM && !done; i++) {
|
||||
done = AutoPlace(myplr, i, cursW / 28, cursH / 28, FALSE);
|
||||
}
|
||||
if (done)
|
||||
StartStore(STORE_CONFIRM);
|
||||
else
|
||||
StartStore(STORE_NOROOM);
|
||||
SetCursor_(CURSOR_HAND);
|
||||
}
|
||||
} else {
|
||||
if (stextsel != 10) {
|
||||
stextflag = STORE_NONE;
|
||||
return;
|
||||
}
|
||||
|
||||
stextshold = STORE_BBOY;
|
||||
stextvhold = stextsval;
|
||||
stextlhold = 10;
|
||||
int price = boyitem._iIvalue;
|
||||
if (gbIsHellfire)
|
||||
price -= boyitem._iIvalue >> 2;
|
||||
else
|
||||
price += boyitem._iIvalue >> 1;
|
||||
|
||||
if (plr[myplr]._pGold < price) {
|
||||
StartStore(STORE_NOMONEY);
|
||||
return;
|
||||
}
|
||||
|
||||
plr[myplr].HoldItem = boyitem;
|
||||
plr[myplr].HoldItem._iIvalue = price;
|
||||
SetCursor_(plr[myplr].HoldItem._iCurs + CURSOR_FIRSTITEM);
|
||||
|
||||
bool done = false;
|
||||
for (int i = 0; i < NUM_INV_GRID_ELEM && !done; i++) {
|
||||
done = AutoPlace(myplr, i, cursW / 28, cursH / 28, false);
|
||||
}
|
||||
|
||||
StartStore(done ? STORE_CONFIRM : STORE_NOROOM);
|
||||
|
||||
SetCursor_(CURSOR_HAND);
|
||||
}
|
||||
|
||||
void StoryIdItem()
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
virtual bool SNetLeaveGame(int type) = 0;
|
||||
virtual bool SNetDropPlayer(int playerid, DWORD flags) = 0;
|
||||
virtual bool SNetGetOwnerTurnsWaiting(DWORD *turns) = 0;
|
||||
virtual bool SNetGetTurnsInTransit(int *turns) = 0;
|
||||
virtual bool SNetGetTurnsInTransit(DWORD *turns) = 0;
|
||||
virtual void setup_gameinfo(buffer_t info) = 0;
|
||||
virtual ~abstract_net() = default;
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ bool base::SNetGetOwnerTurnsWaiting(DWORD *turns)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool base::SNetGetTurnsInTransit(int *turns)
|
||||
bool base::SNetGetTurnsInTransit(DWORD *turns)
|
||||
{
|
||||
*turns = turn_queue[plr_self].size();
|
||||
return true;
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
virtual bool SNetLeaveGame(int type);
|
||||
virtual bool SNetDropPlayer(int playerid, DWORD flags);
|
||||
virtual bool SNetGetOwnerTurnsWaiting(DWORD *turns);
|
||||
virtual bool SNetGetTurnsInTransit(int *turns);
|
||||
virtual bool SNetGetTurnsInTransit(DWORD *turns);
|
||||
|
||||
virtual void poll() = 0;
|
||||
virtual void send(packet &pkt) = 0;
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
virtual bool SNetLeaveGame(int type);
|
||||
virtual bool SNetDropPlayer(int playerid, DWORD flags);
|
||||
virtual bool SNetGetOwnerTurnsWaiting(DWORD *turns);
|
||||
virtual bool SNetGetTurnsInTransit(int *turns);
|
||||
virtual bool SNetGetTurnsInTransit(DWORD *turns);
|
||||
virtual void setup_gameinfo(buffer_t info);
|
||||
|
||||
virtual ~cdwrap() = default;
|
||||
@@ -146,7 +146,7 @@ bool cdwrap<T>::SNetGetOwnerTurnsWaiting(DWORD *turns)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool cdwrap<T>::SNetGetTurnsInTransit(int *turns)
|
||||
bool cdwrap<T>::SNetGetTurnsInTransit(DWORD *turns)
|
||||
{
|
||||
return dvlnet_wrap->SNetGetTurnsInTransit(turns);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ bool loopback::SNetGetOwnerTurnsWaiting(DWORD *turns)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool loopback::SNetGetTurnsInTransit(int *turns)
|
||||
bool loopback::SNetGetTurnsInTransit(DWORD *turns)
|
||||
{
|
||||
*turns = 0;
|
||||
return true;
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
virtual bool SNetLeaveGame(int type);
|
||||
virtual bool SNetDropPlayer(int playerid, DWORD flags);
|
||||
virtual bool SNetGetOwnerTurnsWaiting(DWORD *turns);
|
||||
virtual bool SNetGetTurnsInTransit(int *turns);
|
||||
virtual bool SNetGetTurnsInTransit(DWORD *turns);
|
||||
virtual void setup_gameinfo(buffer_t info);
|
||||
};
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ BOOL SNetGetOwnerTurnsWaiting(DWORD *turns)
|
||||
return dvlnet_inst->SNetGetOwnerTurnsWaiting(turns);
|
||||
}
|
||||
|
||||
BOOL SNetGetTurnsInTransit(int *turns)
|
||||
BOOL SNetGetTurnsInTransit(DWORD *turns)
|
||||
{
|
||||
return dvlnet_inst->SNetGetTurnsInTransit(turns);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user