Skip to content

Commit

Permalink
Remove duplicated tiles and maps which are shared between several BG …
Browse files Browse the repository at this point in the history
…images
  • Loading branch information
laqieer committed Oct 9, 2022
1 parent a8b4e1d commit cca987a
Show file tree
Hide file tree
Showing 32 changed files with 95 additions and 127 deletions.
Binary file removed graphics/bg/bg_11.bin
Binary file not shown.
Binary file removed graphics/bg/bg_11.png
Binary file not shown.
Binary file removed graphics/bg/bg_13.bin
Binary file not shown.
Binary file removed graphics/bg/bg_13.png
Binary file not shown.
Binary file removed graphics/bg/bg_15.bin
Binary file not shown.
Binary file removed graphics/bg/bg_15.png
Binary file not shown.
Binary file removed graphics/bg/bg_17.bin
Binary file not shown.
Binary file removed graphics/bg/bg_17.png
Binary file not shown.
Binary file removed graphics/bg/bg_20.bin
Binary file not shown.
Binary file removed graphics/bg/bg_20.png
Binary file not shown.
Binary file removed graphics/bg/bg_22.bin
Binary file not shown.
Binary file removed graphics/bg/bg_22.png
Binary file not shown.
Binary file removed graphics/bg/bg_25.bin
Binary file not shown.
Binary file removed graphics/bg/bg_25.png
Binary file not shown.
Binary file removed graphics/bg/bg_26.bin
Binary file not shown.
Binary file removed graphics/bg/bg_26.png
Binary file not shown.
Binary file removed graphics/bg/bg_30.bin
Binary file not shown.
Binary file removed graphics/bg/bg_30.png
Binary file not shown.
Binary file removed graphics/bg/bg_31.bin
Binary file not shown.
Binary file removed graphics/bg/bg_31.png
Binary file not shown.
Binary file removed graphics/bg/bg_32.bin
Binary file not shown.
Binary file removed graphics/bg/bg_32.png
Binary file not shown.
Binary file removed graphics/bg/bg_39.bin
Binary file not shown.
Binary file removed graphics/bg/bg_39.png
Binary file not shown.
Binary file removed graphics/bg/bg_4.bin
Binary file not shown.
Binary file removed graphics/bg/bg_4.png
Binary file not shown.
Binary file removed graphics/bg/bg_45.bin
Binary file not shown.
Binary file removed graphics/bg/bg_45.png
Binary file not shown.
Binary file removed graphics/bg/bg_6.bin
Binary file not shown.
Binary file removed graphics/bg/bg_6.png
Binary file not shown.
216 changes: 93 additions & 123 deletions include/bg.h
Original file line number Diff line number Diff line change
@@ -1,162 +1,132 @@
extern unsigned char bg_0_tiles[];
extern unsigned short bg_0_map[];
extern unsigned short bg_0_palette[];
extern unsigned char bg_0_map[];
extern unsigned char bg_0_palette[];
extern unsigned char bg_1_tiles[];
extern unsigned short bg_1_map[];
extern unsigned short bg_1_palette[];
extern unsigned char bg_1_map[];
extern unsigned char bg_1_palette[];
extern unsigned char bg_2_tiles[];
extern unsigned short bg_2_map[];
extern unsigned short bg_2_palette[];
extern unsigned char bg_2_map[];
extern unsigned char bg_2_palette[];
extern unsigned char bg_3_tiles[];
extern unsigned short bg_3_map[];
extern unsigned short bg_3_palette[];
extern unsigned char bg_4_tiles[];
extern unsigned short bg_4_map[];
extern unsigned short bg_4_palette[];
extern unsigned char bg_3_map[];
extern unsigned char bg_3_palette[];
extern unsigned char bg_4_palette[];
extern unsigned char bg_5_tiles[];
extern unsigned short bg_5_map[];
extern unsigned short bg_5_palette[];
extern unsigned char bg_6_tiles[];
extern unsigned short bg_6_map[];
extern unsigned short bg_6_palette[];
extern unsigned char bg_5_map[];
extern unsigned char bg_5_palette[];
extern unsigned char bg_6_palette[];
extern unsigned char bg_7_tiles[];
extern unsigned short bg_7_map[];
extern unsigned short bg_7_palette[];
extern unsigned char bg_7_map[];
extern unsigned char bg_7_palette[];
extern unsigned char bg_8_tiles[];
extern unsigned short bg_8_map[];
extern unsigned short bg_8_palette[];
extern unsigned char bg_8_map[];
extern unsigned char bg_8_palette[];
extern unsigned char bg_9_tiles[];
extern unsigned short bg_9_map[];
extern unsigned short bg_9_palette[];
extern unsigned char bg_9_map[];
extern unsigned char bg_9_palette[];
extern unsigned char bg_10_tiles[];
extern unsigned short bg_10_map[];
extern unsigned short bg_10_palette[];
extern unsigned char bg_11_tiles[];
extern unsigned short bg_11_map[];
extern unsigned short bg_11_palette[];
extern unsigned char bg_10_map[];
extern unsigned char bg_10_palette[];
extern unsigned char bg_11_palette[];
extern unsigned char bg_12_tiles[];
extern unsigned short bg_12_map[];
extern unsigned short bg_12_palette[];
extern unsigned char bg_13_tiles[];
extern unsigned short bg_13_map[];
extern unsigned short bg_13_palette[];
extern unsigned char bg_12_map[];
extern unsigned char bg_12_palette[];
extern unsigned char bg_13_palette[];
extern unsigned char bg_14_tiles[];
extern unsigned short bg_14_map[];
extern unsigned short bg_14_palette[];
extern unsigned char bg_15_tiles[];
extern unsigned short bg_15_map[];
extern unsigned short bg_15_palette[];
extern unsigned char bg_14_map[];
extern unsigned char bg_14_palette[];
extern unsigned char bg_15_palette[];
extern unsigned char bg_16_tiles[];
extern unsigned short bg_16_map[];
extern unsigned short bg_16_palette[];
extern unsigned char bg_17_tiles[];
extern unsigned short bg_17_map[];
extern unsigned short bg_17_palette[];
extern unsigned char bg_16_map[];
extern unsigned char bg_16_palette[];
extern unsigned char bg_17_palette[];
extern unsigned char bg_18_tiles[];
extern unsigned short bg_18_map[];
extern unsigned short bg_18_palette[];
extern unsigned char bg_18_map[];
extern unsigned char bg_18_palette[];
extern unsigned char bg_19_tiles[];
extern unsigned short bg_19_map[];
extern unsigned short bg_19_palette[];
extern unsigned char bg_20_tiles[];
extern unsigned short bg_20_map[];
extern unsigned short bg_20_palette[];
extern unsigned char bg_19_map[];
extern unsigned char bg_19_palette[];
extern unsigned char bg_20_palette[];
extern unsigned char bg_21_tiles[];
extern unsigned short bg_21_map[];
extern unsigned short bg_21_palette[];
extern unsigned char bg_22_tiles[];
extern unsigned short bg_22_map[];
extern unsigned short bg_22_palette[];
extern unsigned char bg_21_map[];
extern unsigned char bg_21_palette[];
extern unsigned char bg_22_palette[];
extern unsigned char bg_23_tiles[];
extern unsigned short bg_23_map[];
extern unsigned short bg_23_palette[];
extern unsigned char bg_23_map[];
extern unsigned char bg_23_palette[];
extern unsigned char bg_24_tiles[];
extern unsigned short bg_24_map[];
extern unsigned short bg_24_palette[];
extern unsigned char bg_25_tiles[];
extern unsigned short bg_25_map[];
extern unsigned short bg_25_palette[];
extern unsigned char bg_26_tiles[];
extern unsigned short bg_26_map[];
extern unsigned short bg_26_palette[];
extern unsigned char bg_24_map[];
extern unsigned char bg_24_palette[];
extern unsigned char bg_25_palette[];
extern unsigned char bg_26_palette[];
extern unsigned char bg_27_tiles[];
extern unsigned short bg_27_map[];
extern unsigned short bg_27_palette[];
extern unsigned char bg_27_map[];
extern unsigned char bg_27_palette[];
extern unsigned char bg_28_tiles[];
extern unsigned short bg_28_map[];
extern unsigned short bg_28_palette[];
extern unsigned char bg_28_map[];
extern unsigned char bg_28_palette[];
extern unsigned char bg_29_tiles[];
extern unsigned short bg_29_map[];
extern unsigned short bg_29_palette[];
extern unsigned char bg_30_tiles[];
extern unsigned short bg_30_map[];
extern unsigned short bg_30_palette[];
extern unsigned char bg_31_tiles[];
extern unsigned short bg_31_map[];
extern unsigned short bg_31_palette[];
extern unsigned char bg_32_tiles[];
extern unsigned short bg_32_map[];
extern unsigned short bg_32_palette[];
extern unsigned char bg_29_map[];
extern unsigned char bg_29_palette[];
extern unsigned char bg_30_palette[];
extern unsigned char bg_31_palette[];
extern unsigned char bg_32_palette[];
extern unsigned char bg_33_tiles[];
extern unsigned short bg_33_map[];
extern unsigned short bg_33_palette[];
extern unsigned char bg_33_map[];
extern unsigned char bg_33_palette[];
extern unsigned char bg_34_tiles[];
extern unsigned short bg_34_map[];
extern unsigned short bg_34_palette[];
extern unsigned char bg_34_map[];
extern unsigned char bg_34_palette[];
extern unsigned char bg_35_tiles[];
extern unsigned short bg_35_map[];
extern unsigned short bg_35_palette[];
extern unsigned char bg_35_map[];
extern unsigned char bg_35_palette[];
extern unsigned char bg_36_tiles[];
extern unsigned short bg_36_map[];
extern unsigned short bg_36_palette[];
extern unsigned char bg_36_map[];
extern unsigned char bg_36_palette[];
extern unsigned char bg_37_tiles[];
extern unsigned short bg_37_map[];
extern unsigned short bg_37_palette[];
extern unsigned char bg_37_map[];
extern unsigned char bg_37_palette[];
extern unsigned char bg_38_tiles[];
extern unsigned short bg_38_map[];
extern unsigned short bg_38_palette[];
extern unsigned char bg_39_tiles[];
extern unsigned short bg_39_map[];
extern unsigned short bg_39_palette[];
extern unsigned char bg_38_map[];
extern unsigned char bg_38_palette[];
extern unsigned char bg_39_palette[];
extern unsigned char bg_40_tiles[];
extern unsigned short bg_40_map[];
extern unsigned short bg_40_palette[];
extern unsigned char bg_40_map[];
extern unsigned char bg_40_palette[];
extern unsigned char bg_41_tiles[];
extern unsigned short bg_41_map[];
extern unsigned short bg_41_palette[];
extern unsigned char bg_41_map[];
extern unsigned char bg_41_palette[];
extern unsigned char bg_42_tiles[];
extern unsigned short bg_42_map[];
extern unsigned short bg_42_palette[];
extern unsigned char bg_42_map[];
extern unsigned char bg_42_palette[];
extern unsigned char bg_43_tiles[];
extern unsigned short bg_43_map[];
extern unsigned short bg_43_palette[];
extern unsigned char bg_43_map[];
extern unsigned char bg_43_palette[];
extern unsigned char bg_44_tiles[];
extern unsigned short bg_44_map[];
extern unsigned short bg_44_palette[];
extern unsigned char bg_45_tiles[];
extern unsigned short bg_45_map[];
extern unsigned short bg_45_palette[];
extern unsigned char bg_44_map[];
extern unsigned char bg_44_palette[];
extern unsigned char bg_45_palette[];
extern unsigned char bg_46_tiles[];
extern unsigned short bg_46_map[];
extern unsigned short bg_46_palette[];
extern unsigned char bg_46_map[];
extern unsigned char bg_46_palette[];
extern unsigned char bg_47_tiles[];
extern unsigned short bg_47_map[];
extern unsigned short bg_47_palette[];
extern unsigned char bg_47_map[];
extern unsigned char bg_47_palette[];
extern unsigned char bg_48_tiles[];
extern unsigned short bg_48_map[];
extern unsigned short bg_48_palette[];
extern unsigned char bg_48_map[];
extern unsigned char bg_48_palette[];
extern unsigned char bg_49_tiles[];
extern unsigned short bg_49_map[];
extern unsigned short bg_49_palette[];
extern unsigned char bg_49_map[];
extern unsigned char bg_49_palette[];
extern unsigned char bg_50_tiles[];
extern unsigned short bg_50_map[];
extern unsigned short bg_50_palette[];
extern unsigned char bg_50_map[];
extern unsigned char bg_50_palette[];
extern unsigned char bg_51_tiles[];
extern unsigned short bg_51_map[];
extern unsigned short bg_51_palette[];
extern unsigned char bg_51_map[];
extern unsigned char bg_51_palette[];
extern unsigned char bg_52_tiles[];
extern unsigned short bg_52_map[];
extern unsigned short bg_52_palette[];
extern unsigned char bg_52_map[];
extern unsigned char bg_52_palette[];
extern unsigned char bg_53_tiles[];
extern unsigned short bg_53_map[];
extern unsigned short bg_53_palette[];
extern unsigned char bg_53_map[];
extern unsigned char bg_53_palette[];
6 changes: 2 additions & 4 deletions scripts/dump_bgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@
f'\t.incbin "graphics/bg/{filename}"\n',])

with open('../include/bg.h', 'w') as f:
for i in range(table_entries):
f.writelines([f'extern unsigned char bg_{i}_tiles[];\n',
f'extern unsigned short bg_{i}_map[];\n',
f'extern unsigned short bg_{i}_palette[];\n'])
for ptr in sorted(ptrs.keys()):
f.write(f'extern unsigned char {ptrs[ptr]}[];\n')

with open('../src/ectscr_.c', 'a') as f:
f.write('\nstruct CONST_DATA gfx_set gConvoBackgroundData[] = {\n')
Expand Down

0 comments on commit cca987a

Please sign in to comment.