Skip to content

Commit

Permalink
Make sure everything compiles in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 26, 2004
1 parent 6aee97b commit 944cf68
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion doomsday/Src/dpMapLoad/glBSP/blockmap.c
Expand Up @@ -264,7 +264,11 @@ static void CreateBlockmap(void)
}


static int BlockCompare(const void *p1, const void *p2)
static int
#ifdef WIN32
__cdecl
#endif
BlockCompare(const void *p1, const void *p2)
{
int blk_num1 = ((const uint16_g *) p1)[0];
int blk_num2 = ((const uint16_g *) p2)[0];
Expand Down
12 changes: 9 additions & 3 deletions doomsday/Src/dpMapLoad/glBSP/level.c
Expand Up @@ -666,7 +666,13 @@ void FindPolyobjSectors(void)

/* ----- analysis routines ----------------------------- */

static int VertexCompare(const void *p1, const void *p2)
#ifdef WIN32
# define C_DECL __cdecl
#else
# define C_DECL
#endif

static int C_DECL VertexCompare(const void *p1, const void *p2)
{
int vert1 = ((const uint16_g *) p1)[0];
int vert2 = ((const uint16_g *) p2)[0];
Expand All @@ -683,7 +689,7 @@ static int VertexCompare(const void *p1, const void *p2)
return (int)A->y - (int)B->y;
}

static int SidedefCompare(const void *p1, const void *p2)
static int C_DECL SidedefCompare(const void *p1, const void *p2)
{
int comp;

Expand Down Expand Up @@ -1016,7 +1022,7 @@ static INLINE_G int TransformAngle(angle_g angle)
return (result & 0xFFFF);
}

static int SegCompare(const void *p1, const void *p2)
static int C_DECL SegCompare(const void *p1, const void *p2)
{
const seg_t *A = ((const seg_t **) p1)[0];
const seg_t *B = ((const seg_t **) p2)[0];
Expand Down
5 changes: 5 additions & 0 deletions doomsday/Src/dpMapLoad/maploader.c
Expand Up @@ -31,6 +31,11 @@
* directory (in "bspcache/(game-mode)/").
*/

#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif

#include "doomsday.h"
#include "dd_api.h"

Expand Down

0 comments on commit 944cf68

Please sign in to comment.