Skip to content

Commit

Permalink
Add all of pokecrystal in one single package (latest commit: 01618d3c…
Browse files Browse the repository at this point in the history
…c46af567eea6c72ec88a2488002ca2b0)
  • Loading branch information
aaaaaa123456789 committed Jul 17, 2019
0 parents commit c012271
Show file tree
Hide file tree
Showing 5,337 changed files with 466,177 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
34 changes: 34 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Auto detect text files and perform LF normalization
* text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.

# files part of the build
*.asm text
*.pal text
*.link text
*.txt text

# extra files
*.awk text
*.c text
*.h text
*.md text
*.py text
*.sh text
*.sha1 text

# Denote all files that are truly binary and should not be modified.
*.png binary diff=hex
*.lz.* binary diff=hex
*.bin binary diff=hex
*.blk binary diff=hex
*.rle binary diff=hex
*.attrmap binary diff=hex
*.tilemap binary diff=hex

# these are generated but just in case
*.lz binary diff=hex
*.2bpp binary diff=hex
*.1bpp binary diff=hex
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# generated
*.tx
*.o

# precompiled python
*.pyc
*$py.class

# no binaries
*.exe

# roms
*.gbc
*.gb

# for any of the poor souls with save game files in their working directory
*.sgm
*.sav
*.rtc
*.sn*
*.sa*
*.sg1

# rgbds extras
*.map
*.sym

# compare.sh
baserom.txt
pokecrystal.txt

# for vim configuration
# url: http://www.vim.org/scripts/script.php?script_id=441
.lvimrc
# swap files for vim
.*.swp
# swap files for gedit
*~

*.dimensions
*.gbcpal
*.2bpp
*.1bpp
*.lz
*.animated.tilemap
gfx/pokemon/*/bitmask.asm
gfx/pokemon/*/frames.asm
!gfx/pokemon/unown/bitmask.asm
!gfx/pokemon/unown/frames.asm
Empty file added .gitmodules
Empty file.
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
language: c
os:
- linux
- osx
install:
- |-
( cd
git clone --depth=1 https://github.com/rednex/rgbds
sudo make -C rgbds CFLAGS=-O2 install
rm -rf rgbds
)
before_script:
- |-
function check_status() {
if ! git diff-index --quiet --ignore-submodules=all HEAD --; then
echo 'Uncommitted changes detected:';
git diff-index HEAD --;
return 1;
fi;
}
script:
- make -j2 compare
- check_status
after_success:
- |-
if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_OS_NAME" = linux ]; then
./.travis/webhook.sh
fi
15 changes: 15 additions & 0 deletions .travis/webhook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
set -e

root="$(readlink -e "$(dirname "$0")/..")"

# Report unnamed symbols
content="$("$root/tools/unnamed.py" -r "$root" "$root/pokecrystal.sym" | grep -v -e '^lib/mobile/' -e '^mobile/' | head)"

curl -H 'Content-Type: application/json' -X POST "$POKECRYSTAL_DISCORD_WEBHOOK_URL" -d@- << EOF
{
"username": "$POKECRYSTAL_DISCORD_WEBHOOK_USERNAME",
"avatar_url": "$POKECRYSTAL_DISCORD_WEBHOOK_AVATAR_URL",
"content": "\`\`\`$(echo "$content" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')\`\`\`"
}
EOF
99 changes: 99 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# FAQ


## Questions

- [What is pokecrystal11.gbc?](#what-is-pokecrystal11gbc)
- [What is pokecrystal-au.gbc?](#what-is-pokecrystal-augbc)
- [I can't build the ROM, `make` just prints an error!](#i-cant-build-the-rom-make-just-prints-an-error)
- [`gcc`: command not found](#gcc-command-not-found)
- ["ERROR: `UNION` already defined"](#error-union-already-defined)
- ["Expression must be 8-bit"](#expression-must-be-8-bit)
- ["Segmentation fault" from `rgbgfx`](#segmentation-fault-from-rgbgfx)
- ["Section is too big" or "Unable to place section in bank"](#section-is-too-big-or-unable-to-place-section-in-bank)
- ["Invalid file or object file version"](#invalid-file-or-object-file-version)
- ["Syntax error"](#syntax-error)
- [How do I edit maps?](#how-do-i-edit-maps)
- [How do I edit the colors of an image?](#how-do-i-edit-the-colors-of-an-image)
- [How do I write new features?](#how-do-i-write-new-features)
- [I need more help!](#i-need-more-help)


## What is pokecrystal11.gbc?

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.

## What is pokecrystal-au.gbc?

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.


## I can't build the ROM, `make` just prints an error!

Reread [INSTALL.md](INSTALL.md) carefully, and make sure you're following all its steps.

### `gcc`: command not found

You need to install `gcc`. If you're using Cygwin, re-run its setup, and at "Select Packages", choose to install `gcc-core`.

### "ERROR: `UNION` already defined"

Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.

### "Expression must be 8-bit"

Download [**rgbds 0.3.8**][rgbds]. Older versions will not work.

### "Segmentation fault" from `rgbgfx`

If you are using 64-bit Windows, download [**64-bit Cygwin**][cygwin] and [**64-bit rgbds**][rgbds].

### "Section is too big" or "Unable to place section in bank"

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)).

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.

### "Invalid file or object file version"

Run `make clean` to remove all the old `o` files, then re-run `make`.

### "Syntax error"

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)).

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.


## How do I edit maps?

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].


## How do I edit the colors of an image?

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.

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.

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.


## How do I write new features?

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.


## I need more help!

Try asking on IRC or Discord (see [README.md](README.md)).

[cygwin]: https://cygwin.com/install.html
[rgbds]: https://github.com/rednex/rgbds/releases
[polished-map]: https://github.com/Rangi42/polished-map
[gimp]: https://www.gimp.org/
[paintdotnet]: https://www.getpaint.net/
[graphicsgale]: https://graphicsgale.com/us/
[irfanview]: https://www.irfanview.com/
[asm]: https://github.com/pret/pokecrystal/wiki/Assembly-programming
[tutorials]: https://github.com/pret/pokecrystal/wiki/Tutorials
Loading

0 comments on commit c012271

Please sign in to comment.