Skip to content

Commit 7c4471d

Browse files
author
Zahl
committed
blindly tried to fix a 32bit memory issue by adding random uint64 casts
1 parent 0ec4c32 commit 7c4471d

7 files changed

+8
-7
lines changed

draw.cpp

+1-1
Large diffs are not rendered by default.

draw.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ bool loadImagePartBmp(FILE* fh, int startx, int starty, int width, int height);
99
void setPixelBmp(size_t x, size_t y, uint8_t color, float fsub);
1010
void blendPixelBmp(size_t x, size_t y, uint8_t color, float fsub);
1111
bool saveImagePartBmp(FILE* fh);
12-
size_t calcImageSizeBmp(int mapChunksX, int mapChunksZ, size_t mapHeight, int &pixelsX, int &pixelsY, bool tight = false);
12+
uint64_t calcImageSizeBmp(int mapChunksX, int mapChunksZ, size_t mapHeight, int &pixelsX, int &pixelsY, bool tight = false);
1313

1414
#endif

draw_png.cpp

+1-1
Large diffs are not rendered by default.

draw_png.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ void setPixelPng(size_t x, size_t y, uint8_t color, float fsub);
1010
void blendPixelPng(size_t x, size_t y, uint8_t color, float fsub);
1111
bool saveImagePartPng(FILE* fh);
1212
bool composeFinalImagePng();
13-
size_t calcImageSizePng(int mapChunksX, int mapChunksZ, size_t mapHeight, int &pixelsX, int &pixelsY, bool tight = false);
13+
uint64_t calcImageSizePng(int mapChunksX, int mapChunksZ, size_t mapHeight, int &pixelsX, int &pixelsY, bool tight = false);
1414

1515
#endif

main.cpp

+1-1
Large diffs are not rendered by default.

worldloader.cpp

+1-1
Large diffs are not rendered by default.

worldloader.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
#define _WORLDLOADER_H_
33

44
#include <cstdlib>
5+
#include <stdint.h>
56

67
bool scanWorldDirectory(const char *fromPath);
78
bool loadTerrain(const char *fromPath);
89
bool loadEntireTerrain();
9-
size_t calcTerrainSize(int chunksX, int chunksZ);
10+
uint64_t calcTerrainSize(int chunksX, int chunksZ);
1011
void clearLightmap();
1112
void calcBitmapOverdraw(int &left, int &right, int &top, int &bottom);
1213

0 commit comments

Comments
 (0)