File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 2525#include < math.h>
2626#include < sstream>
2727#include < stdlib.h>
28+
29+ inline uint64_t tilechecksum (uint8_t * data)
30+ {
31+ uint64_t r = 0 ;
32+ for (int x = 0 ; x < 32 * 32 * 4 ; x++) {
33+ r += data[x] * 63018038201L * x * x;
34+ r ^= 13091204281L ;
35+ r *= 13091204281L * x;
36+ r *= 108086391056891903ULL * data[x];
37+ }
38+ Crc32 c;
39+ c.AddData (data, 32 * 32 * 4 );
40+ r *= c.GetCrc32 ();
41+ return r;
42+ }
43+
2844inline float tilediff (uint8_t * t1, uint8_t * t2)
2945{
3046 float diff = 0.0 ;
Original file line number Diff line number Diff line change 2424#include < stdint.h>
2525#include < stdio.h>
2626#include < vector>
27- inline uint64_t tilechecksum (uint8_t * data)
28- {
29- uint64_t r = 0 ;
30- for (int x = 0 ; x < 32 * 32 * 4 ; x++) {
31- r += data[x] * 63018038201L * x * x;
32- r ^= 13091204281L ;
33- r *= 13091204281L * x;
34- r *= 108086391056891903ULL * data[x];
35- }
36- Crc32 c;
37- c.AddData (data, 32 * 32 * 4 );
38- r *= c.GetCrc32 ();
39- return r;
40- }
27+
4128class InvalidTileIndexException
4229{
4330};
You can’t perform that action at this time.
0 commit comments