diff --git a/README.md b/README.md index 12025d3..b450bf5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://travis-ci.org/LiquidityC/breakhack.svg?branch=master)](https://travis-ci.org/LiquidityC/breakhack) +[![Build status](https://ci.appveyor.com/api/projects/status/2nvna97cmm4cf535?svg=true)](https://ci.appveyor.com/project/LiquidityC/breakhack) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/fc02d56fa7194e61b2c7d260fd2e4186)](https://www.codacy.com/app/LiquidityC/breakhack?utm_source=github.com&utm_medium=referral&utm_content=LiquidityC/breakhack&utm_campaign=Badge_Grade) Something in the ways of NETHACK diff --git a/src/actiontext.c b/src/actiontext.c index 0377ef3..10bcba6 100644 --- a/src/actiontext.c +++ b/src/actiontext.c @@ -1,3 +1,4 @@ +#include #include "actiontext.h" #include "util.h" diff --git a/src/hashtable.c b/src/hashtable.c index 541ab9f..4e7a66a 100644 --- a/src/hashtable.c +++ b/src/hashtable.c @@ -44,6 +44,8 @@ hash(Hashtable *table, const char *key) unsigned long int hashval = 0; unsigned int i = 0; + // TODO(Linus): This isn't very good, + // bad distribution on similar strings while (hashval < ULONG_MAX && i < strlen(key)) { hashval = hashval << 8; hashval += key[i++]; diff --git a/src/monster.c b/src/monster.c index b8e6873..6f3257b 100644 --- a/src/monster.c +++ b/src/monster.c @@ -1,3 +1,4 @@ +#include #include #include "monster.h" #include "util.h" diff --git a/src/roommatrix.c b/src/roommatrix.c index cbb19f0..f91267c 100644 --- a/src/roommatrix.c +++ b/src/roommatrix.c @@ -62,6 +62,8 @@ void roommatrix_populate_from_map(RoomMatrix *rm, Map *m) } } +// TODO(Linus): These should probably be macros +#undef min #ifndef min static int min(int a, int b) @@ -70,6 +72,7 @@ min(int a, int b) } #endif // min +#undef max #ifndef max static int max(int a, int b) diff --git a/src/util.c b/src/util.c index 79f403e..5e65cbe 100644 --- a/src/util.c +++ b/src/util.c @@ -1,10 +1,13 @@ #include "defines.h" #include #include +#include +#ifdef __MINGW32__ +#include +#endif // __MINGW32__ #ifndef _WIN32 #include #endif // _WIN32 -#include #include "util.h"