Browse Source

get rid of a few warnings

pull/1024/head
pionere 5 years ago committed by Anders Jenbo
parent
commit
d5a0fa8e85
  1. 2
      3rdParty/Storm/Source/storm.h
  2. 2
      Source/automap.cpp
  3. 2
      Source/encrypt.cpp
  4. 2
      Source/encrypt.h
  5. 6
      Source/engine.cpp
  6. 4
      Source/engine.h
  7. 3
      Source/gendung.cpp
  8. 3
      Source/gmenu.cpp
  9. 6
      Source/interfac.cpp
  10. 1
      Source/mpqapi.cpp
  11. 7
      Source/msg.cpp
  12. 7
      Source/multi.cpp
  13. 2
      Source/nthread.cpp
  14. 2
      Source/render.cpp
  15. 6
      Source/scrollrt.cpp
  16. 4
      Source/sha.cpp
  17. 58
      Source/stores.cpp
  18. 2
      SourceX/dvlnet/abstract_net.h
  19. 2
      SourceX/dvlnet/base.cpp
  20. 2
      SourceX/dvlnet/base.h
  21. 4
      SourceX/dvlnet/cdwrap.h
  22. 2
      SourceX/dvlnet/loopback.cpp
  23. 2
      SourceX/dvlnet/loopback.h
  24. 2
      SourceX/storm/storm_net.cpp

2
3rdParty/Storm/Source/storm.h vendored

@ -109,7 +109,7 @@ SNetGetGameInfo(
BOOL
STORMAPI
SNetGetTurnsInTransit(
int *turns);
DWORD *turns);
// Network provider structures
typedef struct _client_info

2
Source/automap.cpp

@ -72,7 +72,7 @@ void InitAutomap()
DWORD dwTiles;
int x, y;
BYTE *pAFile, *pTmp;
int i;
DWORD i;
memset(automaptype, 0, sizeof(automaptype));

2
Source/encrypt.cpp

@ -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;

2
Source/encrypt.h

@ -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

6
Source/engine.cpp

@ -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;

4
Source/engine.h

@ -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);

3
Source/gendung.cpp

@ -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));

3
Source/gmenu.cpp

@ -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) {

6
Source/interfac.cpp

@ -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)

1
Source/mpqapi.cpp

@ -651,7 +651,6 @@ BOOL mpqapi_has_file(const char *pszName)
BOOL OpenMPQ(const char *pszArchive, DWORD dwChar)
{
DWORD dwFlagsAndAttributes;
DWORD key;
_FILEHEADER fhdr;

7
Source/msg.cpp

@ -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;

7
Source/multi.cpp

@ -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);

2
Source/nthread.cpp

@ -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)) {

2
Source/render.cpp

@ -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)

6
Source/scrollrt.cpp

@ -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;

4
Source/sha.cpp

@ -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])

58
Source/stores.cpp

@ -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()

2
SourceX/dvlnet/abstract_net.h

@ -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;

2
SourceX/dvlnet/base.cpp

@ -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;

2
SourceX/dvlnet/base.h

@ -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;

4
SourceX/dvlnet/cdwrap.h

@ -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);
}

2
SourceX/dvlnet/loopback.cpp

@ -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;

2
SourceX/dvlnet/loopback.h

@ -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);
};

2
SourceX/storm/storm_net.cpp

@ -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);
}

Loading…
Cancel
Save