summaryrefslogtreecommitdiff
path: root/src/randtiles.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-07-23 23:55:14 +0200
committerTreeki <treeki@gmail.com>2011-07-23 23:55:14 +0200
commit803c43cce9a5494d842856dd2e2aeb40666fe48a (patch)
tree14ced075735b06eb5768302602d92c1f01891b25 /src/randtiles.cpp
parent77d7cadea5d8762a0e2a7d9a1a40f314748a6dcf (diff)
parent693dc221a8af9a90754a3e500f459c4a9517b439 (diff)
downloadkamek-803c43cce9a5494d842856dd2e2aeb40666fe48a.tar.gz
kamek-803c43cce9a5494d842856dd2e2aeb40666fe48a.zip
merged
Diffstat (limited to '')
-rw-r--r--src/randtiles.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/randtiles.cpp b/src/randtiles.cpp
index c7388dd..0bc2ede 100644
--- a/src/randtiles.cpp
+++ b/src/randtiles.cpp
@@ -1,22 +1,22 @@
-#include "randtiles.h"
-
-u32 djb2(u8 *str) {
- u32 hash = 5381;
- int c;
-
- while (c = *str++)
- hash = ((hash << 5) + hash) + c;
-
- return hash;
-}
-
-RandTiles_Section *RandTiles_Search(void *file, u32 nameHash) {
- for (int i = 0; i < RandTiles_GetSectionCount(file); i++) {
- RandTiles_Section *sect = RandTiles_GetSection(file, i);
-
- if (sect->nameHash == nameHash)
- return sect;
- }
-
- return 0;
-}
+#include "randtiles.h"
+
+u32 djb2(u8 *str) {
+ u32 hash = 5381;
+ int c;
+
+ while (c = *str++)
+ hash = ((hash << 5) + hash) + c;
+
+ return hash;
+}
+
+RandTiles_Section *RandTiles_Search(void *file, u32 nameHash) {
+ for (int i = 0; i < RandTiles_GetSectionCount(file); i++) {
+ RandTiles_Section *sect = RandTiles_GetSection(file, i);
+
+ if (sect->nameHash == nameHash)
+ return sect;
+ }
+
+ return 0;
+}