Skip to content

Commit c012271

Browse files
Add all of pokecrystal in one single package (latest commit: 01618d3cc46af567eea6c72ec88a2488002ca2b0)
0 parents  commit c012271

File tree

5,337 files changed

+466177
-0
lines changed

Some content is hidden

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

5,337 files changed

+466177
-0
lines changed

.gitattributes

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Auto detect text files and perform LF normalization
2+
* text eol=lf
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
7+
# files part of the build
8+
*.asm text
9+
*.pal text
10+
*.link text
11+
*.txt text
12+
13+
# extra files
14+
*.awk text
15+
*.c text
16+
*.h text
17+
*.md text
18+
*.py text
19+
*.sh text
20+
*.sha1 text
21+
22+
# Denote all files that are truly binary and should not be modified.
23+
*.png binary diff=hex
24+
*.lz.* binary diff=hex
25+
*.bin binary diff=hex
26+
*.blk binary diff=hex
27+
*.rle binary diff=hex
28+
*.attrmap binary diff=hex
29+
*.tilemap binary diff=hex
30+
31+
# these are generated but just in case
32+
*.lz binary diff=hex
33+
*.2bpp binary diff=hex
34+
*.1bpp binary diff=hex

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# generated
2+
*.tx
3+
*.o
4+
5+
# precompiled python
6+
*.pyc
7+
*$py.class
8+
9+
# no binaries
10+
*.exe
11+
12+
# roms
13+
*.gbc
14+
*.gb
15+
16+
# for any of the poor souls with save game files in their working directory
17+
*.sgm
18+
*.sav
19+
*.rtc
20+
*.sn*
21+
*.sa*
22+
*.sg1
23+
24+
# rgbds extras
25+
*.map
26+
*.sym
27+
28+
# compare.sh
29+
baserom.txt
30+
pokecrystal.txt
31+
32+
# for vim configuration
33+
# url: http://www.vim.org/scripts/script.php?script_id=441
34+
.lvimrc
35+
# swap files for vim
36+
.*.swp
37+
# swap files for gedit
38+
*~
39+
40+
*.dimensions
41+
*.gbcpal
42+
*.2bpp
43+
*.1bpp
44+
*.lz
45+
*.animated.tilemap
46+
gfx/pokemon/*/bitmask.asm
47+
gfx/pokemon/*/frames.asm
48+
!gfx/pokemon/unown/bitmask.asm
49+
!gfx/pokemon/unown/frames.asm

.gitmodules

Whitespace-only changes.

.travis.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
language: c
2+
os:
3+
- linux
4+
- osx
5+
install:
6+
- |-
7+
( cd
8+
git clone --depth=1 https://github.com/rednex/rgbds
9+
sudo make -C rgbds CFLAGS=-O2 install
10+
rm -rf rgbds
11+
)
12+
before_script:
13+
- |-
14+
function check_status() {
15+
if ! git diff-index --quiet --ignore-submodules=all HEAD --; then
16+
echo 'Uncommitted changes detected:';
17+
git diff-index HEAD --;
18+
return 1;
19+
fi;
20+
}
21+
script:
22+
- make -j2 compare
23+
- check_status
24+
after_success:
25+
- |-
26+
if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_OS_NAME" = linux ]; then
27+
./.travis/webhook.sh
28+
fi

.travis/webhook.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
set -e
3+
4+
root="$(readlink -e "$(dirname "$0")/..")"
5+
6+
# Report unnamed symbols
7+
content="$("$root/tools/unnamed.py" -r "$root" "$root/pokecrystal.sym" | grep -v -e '^lib/mobile/' -e '^mobile/' | head)"
8+
9+
curl -H 'Content-Type: application/json' -X POST "$POKECRYSTAL_DISCORD_WEBHOOK_URL" -d@- << EOF
10+
{
11+
"username": "$POKECRYSTAL_DISCORD_WEBHOOK_USERNAME",
12+
"avatar_url": "$POKECRYSTAL_DISCORD_WEBHOOK_AVATAR_URL",
13+
"content": "\`\`\`$(echo "$content" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')\`\`\`"
14+
}
15+
EOF

FAQ.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# FAQ
2+
3+
4+
## Questions
5+
6+
- [What is pokecrystal11.gbc?](#what-is-pokecrystal11gbc)
7+
- [What is pokecrystal-au.gbc?](#what-is-pokecrystal-augbc)
8+
- [I can't build the ROM, `make` just prints an error!](#i-cant-build-the-rom-make-just-prints-an-error)
9+
- [`gcc`: command not found](#gcc-command-not-found)
10+
- ["ERROR: `UNION` already defined"](#error-union-already-defined)
11+
- ["Expression must be 8-bit"](#expression-must-be-8-bit)
12+
- ["Segmentation fault" from `rgbgfx`](#segmentation-fault-from-rgbgfx)
13+
- ["Section is too big" or "Unable to place section in bank"](#section-is-too-big-or-unable-to-place-section-in-bank)
14+
- ["Invalid file or object file version"](#invalid-file-or-object-file-version)
15+
- ["Syntax error"](#syntax-error)
16+
- [How do I edit maps?](#how-do-i-edit-maps)
17+
- [How do I edit the colors of an image?](#how-do-i-edit-the-colors-of-an-image)
18+
- [How do I write new features?](#how-do-i-write-new-features)
19+
- [I need more help!](#i-need-more-help)
20+
21+
22+
## What is pokecrystal11.gbc?
23+
24+
Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `_CRYSTAL11` so the assembly builds the changed version.
25+
26+
## What is pokecrystal-au.gbc?
27+
28+
The Australian release of Pokémon Crystal, which is based on the international 1.1 release but censors gambling references from the Game Corners. `make crystal-au` defines `_CRYSTAL11` and `_CRYSTAL_AU` so the assembly builds the changed version.
29+
30+
31+
## I can't build the ROM, `make` just prints an error!
32+
33+
Reread [INSTALL.md](INSTALL.md) carefully, and make sure you're following all its steps.
34+
35+
### `gcc`: command not found
36+
37+
You need to install `gcc`. If you're using Cygwin, re-run its setup, and at "Select Packages", choose to install `gcc-core`.
38+
39+
### "ERROR: `UNION` already defined"
40+
41+
Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.
42+
43+
### "Expression must be 8-bit"
44+
45+
Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.
46+
47+
### "Segmentation fault" from `rgbgfx`
48+
49+
If you are using 64-bit Windows, download [**64-bit Cygwin**][cygwin] and [**64-bit rgbds**][rgbds].
50+
51+
### "Section is too big" or "Unable to place section in bank"
52+
53+
If you have not changed any of the asm, make sure you have the latest version of pokecrystal and the correct version of rgbds (see [INSTALL.md](INSTALL.md)).
54+
55+
If you added or changed any code, it has to fit in the **memory banks**. The 2MB ROM is divided into 128 banks of 4KB ($4000 bytes) each, numbered $00 to $7F. The linkerscript [pokecrystal.link](pokecrystal.link) lists which `SECTION`s go in which banks. Try moving some code into a new section.
56+
57+
### "Invalid file or object file version"
58+
59+
Run `make clean` to remove all the old `o` files, then re-run `make`.
60+
61+
### "Syntax error"
62+
63+
If you have not changed any of the asm, make sure you have the latest version of pokecrystal and the correct version of rgbds (see [INSTALL.md](INSTALL.md)).
64+
65+
If you added or changed any code, you've made a mistake while writing some of it. Re-read the modifications you've made to the file it complains about and try to compare them with other code.
66+
67+
68+
## How do I edit maps?
69+
70+
For `asm` scripts, read [docs/map_event_scripts.md](https://pret.github.io/pokecrystal/map_event_scripts). For `blk` layouts, use [Polished Map][polished-map].
71+
72+
73+
## How do I edit the colors of an image?
74+
75+
Most `.png` images are paletted PNGs. You can edit these with any program that supports creating PNGs with palette information. These palettes should consist of exactly 4 colors. Additionally, for Pokémon images, the first color should be white, and the last black. Tools such as Paint and [GIMP](gimp) will do the right job, while other tools such as [paint.net](paintdotnet) or Photoshop might mess it up and output palettes of 255 colors even though only using 4. You may try using tools like [GraphicsGale](graphicsgale) or [IrfanView](irfanview) to fix this, or sometimes resaving the image in Paint seems to help.
76+
77+
Some image `.png` files are greyscale. This indicates that even though these images do have proper colors in-game, they're shared with something else, and as such changing them will affect other things as well. Don't try opening the `.2bpp` files, these only contain the image data as well, not the palettes.
78+
79+
It really depends on what image you're trying to change the colors of, where these colors are specified. Try looking for related files or `.pal` files.
80+
81+
82+
## How do I write new features?
83+
84+
There are a number of special-purpose scripting languages, as described in [docs](https://pret.github.io/pokecrystal/). For more general features, you'll need to code directly in [assembly language][asm]. Some of the [tutorials][tutorials] for specific features may also be helpful.
85+
86+
87+
## I need more help!
88+
89+
Try asking on IRC or Discord (see [README.md](README.md)).
90+
91+
[cygwin]: https://cygwin.com/install.html
92+
[rgbds]: https://github.com/rednex/rgbds/releases
93+
[polished-map]: https://github.com/Rangi42/polished-map
94+
[gimp]: https://www.gimp.org/
95+
[paintdotnet]: https://www.getpaint.net/
96+
[graphicsgale]: https://graphicsgale.com/us/
97+
[irfanview]: https://www.irfanview.com/
98+
[asm]: https://github.com/pret/pokecrystal/wiki/Assembly-programming
99+
[tutorials]: https://github.com/pret/pokecrystal/wiki/Tutorials

0 commit comments

Comments
 (0)