Skip to content

Commit ecf93a3

Browse files
authored
Merge pull request #14 from AsparagusEduardo/pokeesmeralda_merge
2 parents c4e8214 + dab7bae commit ecf93a3

File tree

1,954 files changed

+116790
-107583
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,954 files changed

+116790
-107583
lines changed

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ Makefile text eol=lf
1010
*.inc text eol=lf
1111
*.sha1 text eol=lf
1212
*.json text eol=lf
13+
*.sed text eol=lf
14+
*.cpp text eol=lf
15+
.gitattributes text eol=lf
16+
.gitignore text eol=lf
17+
*.hpp text eol=lf
18+
*.md text eol=lf
19+
*.ps1 text eol=crlf
20+
*.yml text eol=lf
1321

1422
*.png binary
1523
*.bin binary

.travis/calcrom/calcrom.pl .github/calcrom/calcrom.pl

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/perl
22

33
use IPC::Cmd qw[ run ];
4+
use Getopt::Long;
5+
6+
my $usage = "Usage: calcrom.pl file.map [--data]\n";
7+
8+
my $showData;
9+
GetOptions("data" => \$showData) or die $usage;
410

511
(@ARGV == 1)
6-
or die "ERROR: no map file specified.\n";
12+
or die $usage;
713
open(my $file, $ARGV[0])
814
or die "ERROR: could not open file '$ARGV[0]'.\n";
915

@@ -149,17 +155,13 @@
149155
print "$undocumented symbols undocumented ($undocPct%)\n";
150156
}
151157

152-
print "\n";
153-
my $dataTotal = $srcdata + $data;
154-
my $srcDataPct = sprintf("%.4f", 100 * $srcdata / $dataTotal);
155-
my $dataPct = sprintf("%.4f", 100 * $data / $dataTotal);
156-
157-
if ($data == 0)
158-
{
159-
print "Data porting to C is 100% complete\n"
160-
}
161-
else
158+
if ($showData)
162159
{
160+
print "\n";
161+
my $dataTotal = $srcdata + $data;
162+
my $srcDataPct = sprintf("%.4f", 100 * $srcdata / $dataTotal);
163+
my $dataPct = sprintf("%.4f", 100 * $data / $dataTotal);
164+
163165
print "$dataTotal total bytes of data\n";
164166
print "$srcdata bytes of data in src ($srcDataPct%)\n";
165167
print "$data bytes of data in data ($dataPct%)\n";
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
#!/bin/bash -ex
22

3-
# Only run this script if it's the master branch build.
4-
if [[ "$TRAVIS_BRANCH" != "master" || "$TRAVIS_PULL_REQUEST" != "false" ]]; then
5-
exit 0
6-
fi
7-
83
build_name=$1
94
map_file=$build_name.map
105
if [ ! -f $map_file ]; then
@@ -13,4 +8,4 @@ if [ ! -f $map_file ]; then
138
fi
149

1510
output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
16-
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST $CALCROM_DISCORD_WEBHOOK_URL
11+
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL"

.github/pull_request_template.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
<!--- Describe your changes in detail -->
5+
6+
## **Discord contact info**
7+
<!--- formatted as name#numbers, e.g. PikalaxALT#5823 -->
8+
<!--- Contributors must join https://discord.gg/d5dubZ3 -->

.github/workflows/build.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
env:
12+
GAME_VERSION: EMERALD
13+
GAME_REVISION: 0
14+
GAME_LANGUAGE: ENGLISH
15+
MODERN: 0
16+
COMPARE: 1
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@master
20+
21+
- name: Checkout syms
22+
if: ${{ github.event_name == 'push' }}
23+
uses: actions/checkout@master
24+
with:
25+
path: symbols
26+
ref: symbols
27+
28+
- name: Checkout agbcc
29+
uses: actions/checkout@master
30+
with:
31+
path: agbcc
32+
repository: pret/agbcc
33+
34+
- name: Install binutils
35+
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
36+
# build-essential, git, and libpng-dev are already installed
37+
# gcc-arm-none-eabi is only needed for the modern build
38+
# as an alternative to dkP
39+
40+
- name: Install agbcc
41+
run: |
42+
./build.sh
43+
./install.sh ../
44+
working-directory: agbcc
45+
46+
- name: Compare
47+
run: make -j${nproc} all syms
48+
49+
- name: Modern
50+
env:
51+
MODERN: 1
52+
COMPARE: 0
53+
run: make -j${nproc} all
54+
55+
- name: Webhook
56+
if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }}
57+
env:
58+
CALCROM_DISCORD_WEBHOOK_USERNAME: OK
59+
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: https://i.imgur.com/38BQHdd.png
60+
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
61+
run: sh .github/calcrom/webhook.sh pokeemerald
62+
63+
- name: Move symfiles
64+
if: ${{ github.event_name == 'push' }}
65+
run: |
66+
cp -v *.sym symbols/
67+
echo "SYMBOLS_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV
68+
69+
- name: Update symfiles
70+
if: ${{ github.event_name == 'push' }}
71+
uses: EndBug/add-and-commit@v7
72+
with:
73+
branch: symbols
74+
cwd: "./symbols"
75+
add: "*.sym"
76+
message: ${{ env.SYMBOLS_COMMIT_MSG }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ porymap.project.cfg
3333
.vscode/
3434
*.a
3535
.fuse_hidden*
36+
*.sna

.travis.yml

-39
This file was deleted.

0 commit comments

Comments
 (0)