Skip to content

Commit 3a2da2b

Browse files
committed
add meson build system support
Teaching a new dog some old tricks by showcasing pokered being built with Meson.
1 parent a891fc1 commit 3a2da2b

24 files changed

Lines changed: 938 additions & 0 deletions

File tree

crossfile.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[binaries]
2+
c = 'gcc'
3+
strip = 'false'
4+
5+
[host_machine]
6+
system = 'dmg'
7+
cpu_family = 'sm83'
8+
cpu = 'sm8320'
9+
endian = 'little'

gfx/battle/meson.build

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
pngs = [
2+
'balls',
3+
]
4+
foreach f : pngs
5+
gen = custom_target(output: '@0@_conv.png'.format(f),
6+
input: '@0@.png'.format(f),
7+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
8+
gfx += custom_target(output: '@0@.2bpp'.format(f),
9+
input: gen,
10+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
11+
endforeach
12+
13+
pngs = [
14+
'move_anim_0',
15+
'move_anim_1',
16+
]
17+
foreach f : pngs
18+
gen = custom_target(output: '@0@_conv.png'.format(f),
19+
input: '@0@.png'.format(f),
20+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
21+
gfx += custom_target(output: '@0@.2bpp'.format(f),
22+
input: gen,
23+
command: [tools_gfx, '--trim-whitespace', '-o', '@OUTPUT@', '@INPUT@'])
24+
endforeach
25+
26+
pngs = [
27+
'battle_hud_1',
28+
'battle_hud_2',
29+
'battle_hud_3',
30+
]
31+
foreach f : pngs
32+
gen = custom_target(output: '@0@_conv.png'.format(f),
33+
input: '@0@.png'.format(f),
34+
command: [rgbgfx, '--depth', '1', '-o', '@OUTPUT@', '@INPUT@'])
35+
gfx += custom_target(output: '@0@.1bpp'.format(f),
36+
input: gen,
37+
command: [tools_gfx, '--depth', '1', '-o', '@OUTPUT@', '@INPUT@'])
38+
endforeach
39+
40+
pngs = [
41+
'oldmanb',
42+
'ghost',
43+
]
44+
45+
foreach f : pngs
46+
gen = custom_target(output: '@0@_conv.png'.format(f),
47+
input: '@0@.png'.format(f),
48+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
49+
gen = custom_target(output: '@0@.2bpp'.format(f),
50+
input: gen,
51+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
52+
gfx += custom_target(output: '@0@.pic'.format(f),
53+
input: gen,
54+
command: [tools_pkmncompress, '@INPUT@', '@OUTPUT@'])
55+
endforeach

gfx/credits/meson.build

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pngs = [
2+
'the_end',
3+
]
4+
foreach f : pngs
5+
orig = files('@0@.png'.format(f))
6+
gen = custom_target(output: '@0@_conv.png'.format(f),
7+
input: orig,
8+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
9+
gfx += custom_target(output: '@0@.2bpp'.format(f),
10+
input: gen,
11+
command: [tools_gfx, '--interleave', '--png', orig, '-o', '@OUTPUT@', '@INPUT@'])
12+
endforeach

gfx/emotes/meson.build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pngs = [
2+
'happy',
3+
'question',
4+
'shock',
5+
]
6+
foreach f : pngs
7+
gen = custom_target(output: '@0@_conv.png'.format(f),
8+
input: '@0@.png'.format(f),
9+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
10+
gfx += custom_target(output: '@0@.2bpp'.format(f),
11+
input: gen,
12+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
13+
endforeach

gfx/font/meson.build

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
pngs = [
2+
'AB',
3+
'font_battle_extra',
4+
'font_extra',
5+
]
6+
foreach f : pngs
7+
gen = custom_target(output: '@0@_conv.png'.format(f),
8+
input: '@0@.png'.format(f),
9+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
10+
gfx += custom_target(output: '@0@.2bpp'.format(f),
11+
input: gen,
12+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
13+
endforeach
14+
15+
pngs = [
16+
'ED',
17+
'P',
18+
'font'
19+
]
20+
21+
foreach f : pngs
22+
gen = custom_target(output: '@0@_conv.png'.format(f),
23+
input: '@0@.png'.format(f),
24+
command: [rgbgfx, '--depth', '1', '-o', '@OUTPUT@', '@INPUT@'])
25+
gfx += custom_target(output: '@0@.1bpp'.format(f),
26+
input: gen,
27+
command: [tools_gfx, '--depth', '1', '-o', '@OUTPUT@', '@INPUT@'])
28+
endforeach

gfx/icons/meson.build

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pngs = [
2+
'bug',
3+
'plant',
4+
'snake',
5+
'quadruped',
6+
]
7+
foreach f : pngs
8+
gen = custom_target(output: '@0@_conv.png'.format(f),
9+
input: '@0@.png'.format(f),
10+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
11+
gfx += custom_target(output: '@0@.2bpp'.format(f),
12+
input: gen,
13+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
14+
endforeach

gfx/intro/meson.build

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pngs = [
2+
'gengar',
3+
]
4+
foreach f : pngs
5+
gen = custom_target(output: '@0@_conv.2bpp'.format(f),
6+
input: '@0@.png'.format(f),
7+
command: [rgbgfx, '--columns', '-o', '@OUTPUT@', '@INPUT@'])
8+
gfx += custom_target(output: '@0@.2bpp'.format(f),
9+
input: gen,
10+
command: [tools_gfx, '--remove-duplicates', '--preserve=0x19,0x76', '-o', '@OUTPUT@', '@INPUT@'])
11+
endforeach
12+
13+
pngs = [
14+
'red_nidorino_1',
15+
'red_nidorino_2',
16+
'red_nidorino_3',
17+
]
18+
foreach f : pngs
19+
gen = custom_target(output: '@0@_conv.png'.format(f),
20+
input: '@0@.png'.format(f),
21+
command: [rgbgfx, '--columns', '-o', '@OUTPUT@', '@INPUT@'])
22+
gfx += custom_target(output: '@0@.2bpp'.format(f),
23+
input: gen,
24+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
25+
endforeach

gfx/overworld/meson.build

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
pngs = [
2+
'battle_transition',
3+
'fishing_rod',
4+
'heal_machine',
5+
'red_fish_back',
6+
'red_fish_front',
7+
'red_fish_side',
8+
'smoke',
9+
'spinners',
10+
]
11+
foreach f : pngs
12+
gen = custom_target(output: '@0@_conv.png'.format(f),
13+
input: '@0@.png'.format(f),
14+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
15+
gfx += custom_target(output: '@0@.2bpp'.format(f),
16+
input: gen,
17+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
18+
endforeach
19+
20+
pngs = ['shadow']
21+
foreach f : pngs
22+
gen = custom_target(output: '@0@_conv.png'.format(f),
23+
input: '@0@.png'.format(f),
24+
command: [rgbgfx, '--depth', '1', '-o', '@OUTPUT@', '@INPUT@'])
25+
gfx += custom_target(output: '@0@.1bpp'.format(f),
26+
input: gen,
27+
command: [tools_gfx, '--depth', '1', '-o', '@OUTPUT@', '@INPUT@'])
28+
endforeach

gfx/player/meson.build

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pngs = [
2+
'red',
3+
'redb',
4+
'shrink1',
5+
'shrink2',
6+
]
7+
8+
foreach f : pngs
9+
gen = custom_target(output: '@0@_conv.png'.format(f),
10+
input: '@0@.png'.format(f),
11+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
12+
gen = custom_target(output: '@0@.2bpp'.format(f),
13+
input: gen,
14+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
15+
gfx += custom_target(output: '@0@.pic'.format(f),
16+
input: gen,
17+
command: [tools_pkmncompress, '@INPUT@', '@OUTPUT@'])
18+
endforeach

gfx/pokedex/meson.build

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
pngs = [
2+
'pokedex'
3+
]
4+
foreach f : pngs
5+
gen = custom_target(output: '@0@_conv.png'.format(f),
6+
input: '@0@.png'.format(f),
7+
command: [rgbgfx, '-o', '@OUTPUT@', '@INPUT@'])
8+
gfx += custom_target(output: '@0@.2bpp'.format(f),
9+
input: gen,
10+
command: [tools_gfx, '-o', '@OUTPUT@', '@INPUT@'])
11+
endforeach

0 commit comments

Comments
 (0)