From bdac7c7a3e32f84eace9fa686f7e6f67dc4d0886 Mon Sep 17 00:00:00 2001 From: XProger Date: Thu, 14 Dec 2017 04:22:34 +0300 Subject: [PATCH] #15 fix warnings and emscripten compilation --- src/sound.h | 2 +- src/texture.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/sound.h b/src/sound.h index 0acdb76..d97cfd3 100644 --- a/src/sound.h +++ b/src/sound.h @@ -5,7 +5,7 @@ #define DECODE_ADPCM #define DECODE_OGG -#ifndef __EMSCRIPTEN +#ifndef __EMSCRIPTEN__ #define DECODE_MP3 #endif diff --git a/src/texture.h b/src/texture.h index db34efc..a065fb0 100644 --- a/src/texture.h +++ b/src/texture.h @@ -557,8 +557,10 @@ struct Texture { offset = bs.readByte() + 1; } - while (length--) - *dst++ = dst[-offset]; + while (length--) { + *dst = dst[-offset]; + dst++; + } } else { length = bs.readBit() + 4; if (bs.readBit()) @@ -567,8 +569,10 @@ struct Texture { if (length != 9) { rncGetOffset(bs, offset); - while (length--) - *dst++ = dst[-offset]; + while (length--) { + *dst = dst[-offset]; + dst++; + } } else { length = (bs.readBits(4) << 2) + 12; while (length--)