diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 49b25f403..1cf3c4769 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -187,7 +187,7 @@ static void P_SetSideNum (DWORD *sidenum_p, WORD sidenum); static int GetMapIndex(const char * mapname, int lastindex, const char * lumpname) { - static struct + static struct checkstruct { char * lumpname; bool required; @@ -923,7 +923,7 @@ void P_LoadSegs (MapData * map) void P_LoadSubsectors (MapData * map) { int i; - int maxseg = map->Size(ML_SEGS) / sizeof(mapseg_t); + DWORD maxseg = map->Size(ML_SEGS) / sizeof(mapseg_t); numsubsectors = map->MapLumps[ML_SSECTORS].Size / sizeof(mapsubsector_t); diff --git a/src/p_setup.h b/src/p_setup.h index ceee29f87..5a3166942 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -51,26 +51,26 @@ struct MapData file = NULL; } - void Seek(int lumpindex) + void Seek(unsigned int lumpindex) { - if (lumpindex>=0 && lumpindexSeek(MapLumps[lumpindex].FilePos, SEEK_SET); } } - void Read(int lumpindex, void * buffer) + void Read(unsigned int lumpindex, void * buffer) { - if (lumpindex>=0 && lumpindexSeek(MapLumps[lumpindex].FilePos, SEEK_SET); file->Read(buffer, MapLumps[lumpindex].Size); } } - DWORD Size(int lumpindex) + DWORD Size(unsigned int lumpindex) { - if (lumpindex>=0 && lumpindex