aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Kropf <josh@slashdev.ca>2011-04-21 17:21:25 (GMT)
committerJosh Kropf <josh@slashdev.ca>2011-04-21 17:21:25 (GMT)
commitf340d4f55f22b3044cd323f02a08586af6cd97f2 (patch)
treeca59a2eb5bdae797aae3c96b9d6f8f00c4baba25
parent18f149fa6a389050b6309e84ab65e87f9c4c35c8 (diff)
downloadballdemo-f340d4f55f22b3044cd323f02a08586af6cd97f2.zip
balldemo-f340d4f55f22b3044cd323f02a08586af6cd97f2.tar.gz
balldemo-f340d4f55f22b3044cd323f02a08586af6cd97f2.tar.bz2
fixed compile error in mingw due to missing uint type
-rw-r--r--common/tex.cpp4
-rw-r--r--common/tex.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/tex.cpp b/common/tex.cpp
index fd84ce9..f8a6513 100644
--- a/common/tex.cpp
+++ b/common/tex.cpp
@@ -43,7 +43,7 @@ tex_t* texLoadTGA(const asset_t * asset)
texture->width = header->width;
texture->height = header->height;
- uint bufsz = header->width * header->height * (header->bits_per_pixel/8);
+ int bufsz = header->width * header->height * (header->bits_per_pixel/8);
texture->pixels = new uint8_t[bufsz];
if (bufsz > (asset->size - cursor)) {
@@ -55,7 +55,7 @@ tex_t* texLoadTGA(const asset_t * asset)
memcpy(texture->pixels, asset->data + cursor, bufsz);
// TGA pixel data is BGR packed, convert to RGB
- for (uint i=0; i<bufsz; i+=4) {
+ for (int i=0; i<bufsz; i+=4) {
uint8_t b = texture->pixels[i];
texture->pixels[i] = texture->pixels[i+2];
texture->pixels[i+2] = b;
diff --git a/common/tex.h b/common/tex.h
index a799089..b0f9d94 100644
--- a/common/tex.h
+++ b/common/tex.h
@@ -11,7 +11,7 @@
#define TEX_H_
typedef struct tex_t {
- uint width, height;
+ unsigned int width, height;
uint8_t *pixels;
} tex_t;