From 0d30afd74dea285cc7704586f2bc8c41eca72d4c Mon Sep 17 00:00:00 2001 From: ScrelliCopter Date: Sat, 26 Sep 2015 16:04:45 +1000 Subject: [PATCH] Added some more stuff to the gitignore. Added some casts and fixed up the type param of a call to std::max. --- .gitignore | 11 ++++++++--- src/tmx2gba.cpp | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 43612f5..00c70e0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,11 @@ # VS rubbish. Debug/ Release/ -tmx2gba.opensdf -tmx2gba.sdf -tmx2gba.v12.suo +*.opensdf +*.sdf +*.v12.suo +*.vcxproj.user + +# Some files I used for testing. +*.tmx +*.raw diff --git a/src/tmx2gba.cpp b/src/tmx2gba.cpp index 054553a..1d66ee1 100644 --- a/src/tmx2gba.cpp +++ b/src/tmx2gba.cpp @@ -278,7 +278,7 @@ int main ( int argc, char** argv ) vucCharDat.reserve ( info.width * info.height ); for ( size_t i = 0; i < size_t(info.width * info.height * 2); ++i ) { - uint16_t usTile = std::max ( (*pRead++) + iOffset, 0 ); + uint16_t usTile = std::max ( (*pRead++) + (uint16_t)iOffset, 0 ); bool bFlipH = ( 0x8000 & *pRead ) ? true : false; bool bFlipV = ( 0x4000 & *pRead++ ) ? true : false;