summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/compare-gold.sh11
-rwxr-xr-xtools/compare-silver.sh11
-rw-r--r--tools/gfx.py39
-rw-r--r--tools/scan_includes.py35
-rwxr-xr-xtools/unused_sources.sh18
5 files changed, 38 insertions, 76 deletions
diff --git a/tools/compare-gold.sh b/tools/compare-gold.sh
deleted file mode 100755
index e75cb743..00000000
--- a/tools/compare-gold.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# Compares baserom-gold.gbc and pokegold.gbc
-
-# create baserom-gold.txt if necessary
-if [ ! -f baserom-gold.txt ]; then
- hexdump -C baserom-gold.gbc > baserom-gold.txt
-fi
-
-hexdump -C pokegold.gbc > pokegold.txt
-
-diff -u baserom-gold.txt pokegold.txt | less
diff --git a/tools/compare-silver.sh b/tools/compare-silver.sh
deleted file mode 100755
index f8881cd2..00000000
--- a/tools/compare-silver.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-# Compares baserom-silver.gbc and pokesilver.gbc
-
-# create baserom-silver.txt if necessary
-if [ ! -f baserom-silver.txt ]; then
- hexdump -C baserom-silver.gbc > baserom-silver.txt
-fi
-
-hexdump -C pokesilver.gbc > pokesilver.txt
-
-diff -u baserom-silver.txt pokesilver.txt | less
diff --git a/tools/gfx.py b/tools/gfx.py
index c53110a7..7007d37e 100644
--- a/tools/gfx.py
+++ b/tools/gfx.py
@@ -163,6 +163,23 @@ def filepath_rules(filepath):
args['width'] = 104
elif name == 'copyright':
args['width'] = 240
+ elif name == 'charizard1':
+ args['width'] = 72
+ args['rows'] = [
+ (1, 8), (1, 8), (1, 8), (1, 8), (1, 8), (1, 8), (1, 8), (1, 8),
+ (0, 9), (0, 9), (0, 9), (0, 9), (0, 9), (0, 9), (0, 9)
+ ]
+ elif name == 'charizard2':
+ args['width'] = 72
+ args['pad_indices'] = [0]
+ elif name == 'charizard3':
+ args['width'] = 64
+ args['rows'] = [
+ (0, 8), (0, 8), (0, 0), (1, 6), (1, 6), (1, 6), (1, 6), (1, 6), (1, 6),
+ (1, 6), (1, 6), (1, 6), (1, 6), (1, 6), (1, 6), (1, 6), (1, 6)
+ ]
+ elif name in ['grass1', 'grass2', 'water1', 'water2']:
+ args['width'] = 128
elif 'gfx/mail' in filedir:
if name in mail_px8:
@@ -272,6 +289,14 @@ def filepath_rules(filepath):
elif 'gfx/title' in filedir:
if name in ['logo_bottom_gold', 'logo_bottom_silver', 'logo_top_gold', 'logo_top_silver']:
args['width'] = 160
+ elif name == 'lugia_silver':
+ args['width'] = 64
+ args['pic_dimensions'] = 8, 4
+ elif name == 'hooh_gold':
+ args['width'] = 64
+ args['pic_dimensions'] = 8, 6
+ elif name in ['title_trail_gold', 'title_trail_silver']:
+ args['width'] = 32
elif 'gfx/trainer_card' in filedir:
if name in ['badges', 'trainer_card']:
@@ -352,7 +377,16 @@ def to_2bpp(filename, **kwargs):
def to_png(filename, **kwargs):
name, ext = os.path.splitext(filename)
- if ext == '.1bpp': gfx.export_1bpp_to_png(filename, **kwargs)
+ if ext == '.1bpp':
+ basedir, basename = os.path.split(filename)
+ name, ext = os.path.splitext(basename)
+ # Ignoring these for convenience only
+ if basedir in ['gfx/footprints', 'gfx/font']:
+ return
+ # Ignoring these for convenience only
+ if name in ['hp_exp_bar_border']:
+ return
+ gfx.export_1bpp_to_png(filename, **kwargs)
elif ext == '.2bpp':
basedir, basename = os.path.split(filename)
name, ext = os.path.splitext(basename)
@@ -362,6 +396,9 @@ def to_png(filename, **kwargs):
# TODO: same question for most/all battle anims
if basedir == 'gfx/battle_anims':
return
+ # Ignoring these for convenience only
+ if basedir == 'gfx/font':
+ return
if name in ['back_gold', 'back_silver']:
kwargs['fileout'] = os.path.join(basedir, 'back.png')
gfx.export_2bpp_to_png(filename, **kwargs)
diff --git a/tools/scan_includes.py b/tools/scan_includes.py
deleted file mode 100644
index 60929d3f..00000000
--- a/tools/scan_includes.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/python
-# coding: utf-8
-
-"""
-Recursively scan an asm file for dependencies.
-"""
-
-import sys
-import argparse
-
-includes = set()
-
-def scan_file(filename):
- for line in open(filename):
- if 'INC' not in line:
- continue
- line = line.split(';')[0]
- if 'INCLUDE' in line:
- include = line.split('"')[1]
- includes.add(include)
- scan_file(include)
- elif 'INCBIN' in line:
- include = line.split('"')[1]
- includes.add(include)
-
-def main():
- ap = argparse.ArgumentParser()
- ap.add_argument('filenames', nargs='*')
- args = ap.parse_args()
- for filename in set(args.filenames):
- scan_file(filename)
- sys.stdout.write(' '.join(includes))
-
-if __name__ == '__main__':
- main()
diff --git a/tools/unused_sources.sh b/tools/unused_sources.sh
deleted file mode 100755
index b0b9e368..00000000
--- a/tools/unused_sources.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-# Finds files that aren't included in the build
-
-# top-level sources listed in Makefile
-toplevel='audio.asm data/text/common.asm data/pokemon/dex_entries.asm wram.asm
-main.asm home.asm gfx/sprites.asm gfx/pics_gold.asm gfx/pics_silver.asm
-data/maps/map_data.asm engine/overworld/events.asm rgbdscheck.asm
-data/pokemon/egg_moves.asm data/pokemon/evos_attacks.asm gfx/tilesets.asm
-engine/movie/credits.asm'
-
-for asm in $toplevel; do
- echo "$asm"
- python tools/scan_includes.py "$asm"
- echo
-done | tr ' ' '\n' | sort -u > includes.txt
-git ls-files | grep -E '\.(asm|gbcpal|pal|lz|[1,2]bpp|blk|bin|rle|attrmap|tilemap|dimensions)$' | sort -u > sources.txt
-comm -23 sources.txt includes.txt
-rm sources.txt includes.txt