summaryrefslogtreecommitdiff
path: root/tools/gbagfx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gbagfx')
-rw-r--r--tools/gbagfx/LICENSE38
-rw-r--r--tools/gbagfx/Makefile12
-rw-r--r--tools/gbagfx/gfx.c2
-rw-r--r--tools/gbagfx/main.c1
-rw-r--r--tools/gbagfx/rl.c2
5 files changed, 31 insertions, 24 deletions
diff --git a/tools/gbagfx/LICENSE b/tools/gbagfx/LICENSE
index 01c9d12..b66bf81 100644
--- a/tools/gbagfx/LICENSE
+++ b/tools/gbagfx/LICENSE
@@ -1,19 +1,19 @@
-Copyright (c) 2015 YamaArashi
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+Copyright (c) 2015 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/gbagfx/Makefile b/tools/gbagfx/Makefile
index f063841..b4244aa 100644
--- a/tools/gbagfx/Makefile
+++ b/tools/gbagfx/Makefile
@@ -6,15 +6,21 @@ LIBS = -lpng -lz
SRCS = main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c
+ifeq ($(OS),Windows_NT)
+EXE := .exe
+else
+EXE :=
+endif
+
.PHONY: all clean
-all: gbagfx
+all: gbagfx$(EXE)
@:
-gbagfx-debug: $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h
+gbagfx-debug$(EXE): $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h
$(CC) $(CFLAGS) -DDEBUG $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
-gbagfx: $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h
+gbagfx$(EXE): $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h
$(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
clean:
diff --git a/tools/gbagfx/gfx.c b/tools/gbagfx/gfx.c
index 8d95946..4e85953 100644
--- a/tools/gbagfx/gfx.c
+++ b/tools/gbagfx/gfx.c
@@ -282,7 +282,7 @@ static void HflipTile(unsigned char * tile, int bitDepth)
for (i = 0; i < 8; i++)
{
SWAP_NYBBLES(&tile[4 * i + 0], &tile[4 * i + 3]);
- SWAP_NYBBLES(&tile[4 * i + 1], &tile[4 * i + 2]);;
+ SWAP_NYBBLES(&tile[4 * i + 1], &tile[4 * i + 2]);
}
break;
case 8:
diff --git a/tools/gbagfx/main.c b/tools/gbagfx/main.c
index 61e93ea..cf30316 100644
--- a/tools/gbagfx/main.c
+++ b/tools/gbagfx/main.c
@@ -92,6 +92,7 @@ void HandleGbaToPngCommand(char *inputPath, char *outputPath, int argc, char **a
options.width = 1;
options.metatileWidth = 1;
options.metatileHeight = 1;
+ options.tilemapFilePath = NULL;
options.isAffineMap = false;
for (int i = 3; i < argc; i++)
diff --git a/tools/gbagfx/rl.c b/tools/gbagfx/rl.c
index 968c934..993ac64 100644
--- a/tools/gbagfx/rl.c
+++ b/tools/gbagfx/rl.c
@@ -101,7 +101,7 @@ unsigned char *RLCompress(unsigned char *src, int srcSize, int *compressedSize)
srcPos++;
uncompressedLength++;
}
-
+
if (uncompressedLength > 0)
{
dest[destPos++] = uncompressedLength - 1;