--- a/src/bmp.cpp Mon Dec 03 23:39:38 2007 +0000
+++ b/src/bmp.cpp Tue Jan 22 21:00:30 2008 +0000
@@ -3,11 +3,9 @@
/** @file bmp.cpp */
#include "stdafx.h"
-#include "openttd.h"
-#include "gfx.h"
#include "bmp.h"
-#include "macros.h"
-#include "helpers.hpp"
+#include "core/bitmath_func.hpp"
+#include "core/alloc_func.hpp"
void BmpInitializeBuffer(BmpBuffer *buffer, FILE *file)
{
@@ -354,7 +352,7 @@
{
assert(info != NULL && data != NULL);
- data->bitmap = (byte*)calloc(info->width * info->height, ((info->bpp == 24) ? 3 : 1) * sizeof(byte));
+ data->bitmap = CallocT<byte>(info->width * info->height * ((info->bpp == 24) ? 3 : 1));
if (data->bitmap == NULL) return false;
/* Load image */