Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sectionful refactor #631

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d3b41cd
Initial section split
mid-kid Apr 15, 2019
181b4c5
Split phone callees
mid-kid Apr 17, 2019
14cae16
Split BlankScreen
mid-kid Apr 17, 2019
1b4777e
Merge objects.asm
mid-kid Apr 17, 2019
7001436
Remove useless "Crystal Sound Effects" section
mid-kid Apr 17, 2019
0857f70
Further split bank $01
mid-kid Apr 19, 2019
d014052
Further split bank $03
mid-kid Apr 20, 2019
e17aba2
Further split bank $04
mid-kid Apr 20, 2019
7e88727
Further split bank $09
mid-kid Apr 20, 2019
01f9150
Further split bank $0e
mid-kid Apr 21, 2019
0bc1e17
Further split bank $14
mid-kid Apr 21, 2019
ae1e8bb
Further split bank $22
mid-kid Apr 22, 2019
979cca5
Forther split bank $23
mid-kid Apr 23, 2019
35fba04
Further split bank $38
mid-kid Apr 24, 2019
2b8bb5a
Split some questionable things
mid-kid Apr 24, 2019
c29a263
Final splitting pass
mid-kid Apr 25, 2019
973e617
Reorganize INCLUDEs to reduce the amount of top-level files
mid-kid Apr 27, 2019
4e77dd3
Restructure the battle animation core file
mid-kid Apr 28, 2019
f2c5503
Giving up on start menu
mid-kid Apr 28, 2019
87552dd
Split intertwined map scripts
mid-kid Apr 28, 2019
28bf848
"split" battle tower map scripts
mid-kid Apr 28, 2019
5072712
Finish splitting all of the music
mid-kid Apr 28, 2019
af83b94
Forgot to split the link rooms' map scripts
mid-kid Apr 28, 2019
c44dc76
Add constants for BANK[] statements
mid-kid Apr 28, 2019
e57ed43
Do the obvious reorganizations
mid-kid Apr 28, 2019
21a6233
Give all sections more proper names
mid-kid May 1, 2019
8707481
Split out KrisBackpic
mid-kid May 1, 2019
4fafcc9
Make engine/pokemon/evolve.asm the main file
mid-kid May 11, 2019
0072977
Split everything into separate `.o` files
mid-kid Apr 29, 2019
ba6c472
Don't export every single label
mid-kid May 2, 2019
b57cd1a
Cache scan_includes output
mid-kid May 2, 2019
63f6649
Add travis support for checking unused globals
mid-kid May 6, 2019
1000418
First draft of optimizing includes
mid-kid May 14, 2019
d5b3b79
Create constants/music_common.inc
mid-kid May 14, 2019
c6abcec
Create constants/maps_common.inc
mid-kid May 14, 2019
af31496
Rewrite Makefile to support i18n
mid-kid May 23, 2019
8695545
Implement makefile improvements
mid-kid May 25, 2019
e4126c6
Remove unnecessary newlines at top of files
mid-kid May 25, 2019
fcfb431
Misc changes
mid-kid May 25, 2019
17b07a7
Make ram directory
mid-kid May 25, 2019
3840b87
Add header guards and include dependent files where they need to be
mid-kid May 26, 2019
5f2d8f0
Include legacy.inc where necessary
mid-kid May 26, 2019
d3948e7
Fix up the makefile to scan for sources in version/
mid-kid May 26, 2019
7355ec4
charmap.inc is now implicitly included by macros/scripts/text.inc
mid-kid May 27, 2019
709087c
Remove top-level ram.asm
mid-kid May 27, 2019
51cfa80
Update travis stuff
mid-kid May 27, 2019
3915519
Update docs/ to match .o-ification changes
mid-kid May 27, 2019
7583b7f
Split `font.asm` from `footprints.asm`
mid-kid May 27, 2019
f15ad02
Fix build using make 3.81
mid-kid May 28, 2019
334e46f
Tell github what highlighting to use.
mid-kid May 28, 2019
a8ab122
Fix build for Mac OSX
mid-kid May 28, 2019
2a27be0
Cygwin is incredibly slow
mid-kid May 28, 2019
3b5c710
Include some constants inside of maps
mid-kid May 30, 2019
d35b0a2
Forgot to fix TODOs after the fact...
mid-kid Jun 1, 2019
bd4abff
Fix unusedglobals.py when not ignoring anything
mid-kid Jun 2, 2019
0f24d29
Rename some things back to what they were
mid-kid Aug 9, 2019
e16ad2f
Merge branch 'master' of https://github.com/pret/pokecrystal into spl…
mid-kid Feb 6, 2020
f3d3376
Remove ASCII-related bank constants
mid-kid Feb 9, 2020
1cc46f3
Sort includes
mid-kid Feb 11, 2020
ccb0505
Export vram labels
mid-kid Feb 11, 2020
a3d6968
Split home/
mid-kid Feb 22, 2020
6eb368a
Remove unnecessary includes
mid-kid Feb 22, 2020
2761e5a
Document Makefile
mid-kid Feb 24, 2020
d51fd40
Merge branch 'master' of https://github.com/pret/pokecrystal into spl…
mid-kid Feb 25, 2020
7e5aa33
Re-checked diffs with origin/master and fixed quirks
mid-kid Feb 26, 2020
5bd33d5
Update unusedglobals.py for future rgbds
mid-kid Feb 26, 2020
307e1c7
Merge branch 'master' of https://github.com/pret/pokecrystal into spl…
mid-kid Feb 26, 2020
ca456b5
Fix Makefile
mid-kid Feb 26, 2020
75e1424
Remove .asm suffix from every section name
mid-kid Feb 26, 2020
1a910fd
Move charmap.inc to constants/charmap.inc
mid-kid Feb 26, 2020
cedf137
Create BANK_CRYSTAL to split some files
mid-kid Feb 26, 2020
6cc3ca3
Include data/items/marts in engine/items/mart
mid-kid Feb 27, 2020
064c721
Split pokedex_3 further
mid-kid Feb 27, 2020
786c3c0
Move tiffany's family out
mid-kid Mar 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# to native line endings on checkout.

# files part of the build
*.asm text
*.asm text linguist-language=Assembly
*.inc text linguist-language=Assembly
*.pal text
*.link text
*.txt text
Expand Down
32 changes: 11 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
# generated
*.tx
*.o

# precompiled python
*.pyc
*$py.class

# no binaries
*.exe

# roms
*.gbc
*.gb
*.map
*.sym

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

# rgbds extras
*.map
*.sym
*.sg*

# compare.sh
baserom.txt
Expand All @@ -39,13 +25,17 @@ pokecrystal.txt
# osx files
.DS_STORE

# generated
*.o
*.d
*.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
gfx/pokemon/*/bitmask.inc
gfx/pokemon/*/frames.inc
!gfx/pokemon/unown/bitmask.inc
!gfx/pokemon/unown/frames.inc
build/
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ before_script:
}
script:
- make -j2 compare
- tools/unusedglobals.py -b build/crystal/ -i ram/wram.o -i ram/vram.o -i engine/predef.o -i engine/events/specials.o -i gfx/tilesets.o -i data/text/common_1.o -i data/text/common_2.o -i data/text/common_3.o -i data/text/battle.o
- check_status
after_success:
- |-
Expand Down
2 changes: 1 addition & 1 deletion .travis/webhook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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)"
content="$("$root/tools/unnamed.py" -b "$root/build/crystal" "$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
{
Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ If you are using 64-bit Windows, download [**64-bit Cygwin**][cygwin] and [**64-

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.
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 [layout.link](layout.link) lists which `SECTION`s go in which banks. Try moving some code into a new section.

### "Invalid file or object file version"

Expand Down
6 changes: 4 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ cd pokecrystal
To build **pokecrystal.gbc**:

```bash
make
make -j4
Copy link
Member

@Rangi42 Rangi42 May 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

make -j`nproc`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Or make -j$(nproc), either works.)

Copy link
Member Author

@mid-kid mid-kid May 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just following the precedent set by pokeruby, and this is a sane, easy to remember (and type!) default. How about adding this section or at least linking to it, instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess -j4 is a good compromise between minimal-but-slow make and optimal-but-long -j$(nproc). Please do add a section explaining the multiple and parallel builds like pokeruby has.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This depends on the amount of processors your CPU has. Would be more useful to go the nproc route imo

```

To build **pokecrystal11.gbc**:

```bash
make crystal11
make -j4 crystal11
```

For more information about the `make` command, see [docs/makefile\_usage.md](docs/makefile_usage.md)
Loading