diff --git a/Makefile b/Makefile index 48a027255..666cdff82 100644 --- a/Makefile +++ b/Makefile @@ -59,13 +59,13 @@ tools: %.o: %.asm $$(dep) rgbasm -o $@ $< -pokecrystal11.gbc: $(crystal11_obj) - rgblink -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.ld -o $@ $^ +pokecrystal11.gbc: $(crystal11_obj) pokecrystal.ld + rgblink -n pokecrystal11.sym -m pokecrystal11.map -l pokecrystal.ld -o $@ $(crystal11_obj) rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@ sort pokecrystal11.sym -o pokecrystal11.sym -pokecrystal.gbc: $(crystal_obj) - rgblink -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.ld -o $@ $^ +pokecrystal.gbc: $(crystal_obj) pokecrystal.ld + rgblink -n pokecrystal.sym -m pokecrystal.map -l pokecrystal.ld -o $@ $(crystal_obj) rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ sort pokecrystal.sym -o pokecrystal.sym diff --git a/contents.asm b/contents.asm deleted file mode 100644 index c13fffc7b..000000000 --- a/contents.asm +++ /dev/null @@ -1,130 +0,0 @@ -; Doubles as bank constants. - -; main.o - -ROOFS EQU $7 -TILESETS_1 EQU $6 -TILESETS_2 EQU $7 -TILESETS_3 EQU $8 -TILESETS_4 EQU $C -TILESETS_5 EQU $2D -TILESETS_6 EQU $37 -TILESETS_7 EQU $77 -TILESETS_8 EQU $78 - - -; data/egg_moves.o - -EGG_MOVES EQU $8 - - -; data/evos_attacks.o - -EVOS_ATTACKS EQU $10 - - -; data/pokedex/entries.o - -POKEDEX_ENTRIES_1 EQU $60 -POKEDEX_ENTRIES_2 EQU $6E -POKEDEX_ENTRIES_3 EQU $73 -POKEDEX_ENTRIES_4 EQU $74 - - -; engine/events.o -; engine/scripting.o -; engine/events_2.o -EVENTS EQU $25 - - -; engine/credits.o - -CREDITS EQU $42 - - -; gfx/pics.o - -PIC_POINTERS EQU $48 -UNOWN_PIC_POINTERS EQU $49 -TRAINER_PIC_POINTERS EQU $4A - -PICS_FIX EQU $36 - -PICS_1 EQU $48 -PICS_2 EQU $49 -PICS_3 EQU $4A -PICS_4 EQU $4B -PICS_5 EQU $4C -PICS_6 EQU $4D -PICS_7 EQU $4E -PICS_8 EQU $4F -PICS_9 EQU $50 -PICS_10 EQU $51 -PICS_11 EQU $52 -PICS_12 EQU $53 -PICS_13 EQU $54 -PICS_14 EQU $55 -PICS_15 EQU $56 -PICS_16 EQU $57 -PICS_17 EQU $58 -PICS_18 EQU $59 -PICS_19 EQU $5A - - -; maps.o - -MAP_HEADERS EQU $25 - -MAPS_1 EQU $2A -MAPS_2 EQU $2B -MAPS_3 EQU $2C - -MAP_SCRIPTS_1 EQU $15 -MAP_SCRIPTS_2 EQU $16 -MAP_SCRIPTS_3 EQU $17 -MAP_SCRIPTS_4 EQU $18 -MAP_SCRIPTS_5 EQU $1A -MAP_SCRIPTS_6 EQU $1B -MAP_SCRIPTS_7 EQU $1C -MAP_SCRIPTS_8 EQU $1D -MAP_SCRIPTS_9 EQU $1E -MAP_SCRIPTS_10 EQU $1F -MAP_SCRIPTS_11 EQU $26 -MAP_SCRIPTS_12 EQU $27 -MAP_SCRIPTS_13 EQU $60 -MAP_SCRIPTS_14 EQU $61 -MAP_SCRIPTS_15 EQU $62 -MAP_SCRIPTS_16 EQU $63 -MAP_SCRIPTS_17 EQU $64 -MAP_SCRIPTS_18 EQU $65 -MAP_SCRIPTS_19 EQU $66 -MAP_SCRIPTS_20 EQU $67 -MAP_SCRIPTS_21 EQU $68 -MAP_SCRIPTS_22 EQU $69 -MAP_SCRIPTS_23 EQU $6A -MAP_SCRIPTS_24 EQU $6B -MAP_SCRIPTS_25 EQU $6C - - -; audio.o - -AUDIO EQU $3A - -SONGS_1 EQU $3A -SONGS_2 EQU $3B -SONGS_3 EQU $3C -SONGS_4 EQU $3D -SONGS_5 EQU $5E - -EXTRA_SONGS_1 EQU $7 -EXTRA_SONGS_2 EQU $33 - -SOUND_EFFECTS EQU $3C -CRYSTAL_SOUND_EFFECTS EQU $5E - -CRIES EQU $3C - - -; misc.o - -MISC_CRYSTAL EQU $5E diff --git a/gfx/load_pics.asm b/gfx/load_pics.asm index 26e984831..b66117de9 100755 --- a/gfx/load_pics.asm +++ b/gfx/load_pics.asm @@ -250,9 +250,13 @@ GetBackpic: ; 5116c FixPicBank: ; 511c5 ; This is a thing for some reason. + +PICS_FIX EQU $36 +GLOBAL PICS_FIX + push hl push bc - sub PICS_1 - PICS_FIX + sub BANK(Pics_1) - PICS_FIX ld c, a ld b, 0 ld hl, .PicsBanks @@ -263,30 +267,30 @@ FixPicBank: ; 511c5 ret .PicsBanks: ; 511d4 - db PICS_1 - db PICS_2 - db PICS_3 - db PICS_4 - db PICS_5 - db PICS_6 - db PICS_7 - db PICS_8 - db PICS_9 - db PICS_10 - db PICS_11 - db PICS_12 - db PICS_13 - db PICS_14 - db PICS_15 - db PICS_16 - db PICS_17 - db PICS_18 - db PICS_19 - db PICS_19 + 1 - db PICS_19 + 2 - db PICS_19 + 3 - db PICS_19 + 4 - db PICS_19 + 5 + db BANK(Pics_1) + 0 + db BANK(Pics_1) + 1 + db BANK(Pics_1) + 2 + db BANK(Pics_1) + 3 + db BANK(Pics_1) + 4 + db BANK(Pics_1) + 5 + db BANK(Pics_1) + 6 + db BANK(Pics_1) + 7 + db BANK(Pics_1) + 8 + db BANK(Pics_1) + 9 + db BANK(Pics_1) + 10 + db BANK(Pics_1) + 11 + db BANK(Pics_1) + 12 + db BANK(Pics_1) + 13 + db BANK(Pics_1) + 14 + db BANK(Pics_1) + 15 + db BANK(Pics_1) + 16 + db BANK(Pics_1) + 17 + db BANK(Pics_1) + 18 + db BANK(Pics_1) + 19 + db BANK(Pics_1) + 20 + db BANK(Pics_1) + 21 + db BANK(Pics_1) + 22 + db BANK(Pics_1) + 23 Function511ec: ; 511ec ld a, c diff --git a/gfx/pics.asm b/gfx/pics.asm index 0aea68ed8..c48106e3c 100644 --- a/gfx/pics.asm +++ b/gfx/pics.asm @@ -16,6 +16,7 @@ TrainerPicPointers:: INCLUDE "gfx/pics/trainer_pic_pointers.asm" SECTION "Pics 1", ROMX +Pics_1:: HoOhFrontpic: INCBIN "gfx/pics/ho_oh/front.animated.2bpp.lz" MachampFrontpic: INCBIN "gfx/pics/machamp/front.animated.2bpp.lz" diff --git a/includes.asm b/includes.asm index 1b3d6bed5..a97cda944 100644 --- a/includes.asm +++ b/includes.asm @@ -1,3 +1,2 @@ INCLUDE "version.asm" -INCLUDE "contents.asm" INCLUDE "constants.asm" diff --git a/macros/pic.asm b/macros/pic.asm index a01ce7a31..f06c6cd4f 100644 --- a/macros/pic.asm +++ b/macros/pic.asm @@ -1,4 +1,4 @@ add_pic: MACRO - db BANK(\1) - $36 + db BANK(\1) - PICS_FIX dw \1 ENDM diff --git a/pokecrystal.ld b/pokecrystal.ld index 289571659..462833f14 100644 --- a/pokecrystal.ld +++ b/pokecrystal.ld @@ -311,6 +311,7 @@ WRAM0 "Audio RAM" "WRAM" "wSpriteAnims" + align 8 "Sprites" "Tilemap" "Battle" diff --git a/tools/Makefile b/tools/Makefile index a4f691074..36c643d41 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,7 @@ .PHONY: all clean CC := gcc -CFLAGS := -std=c99 -Wall -Wextra +CFLAGS := -O3 -std=c99 -Wall -Wextra tools := \ lzcomp \ diff --git a/wram.asm b/wram.asm index d80578e79..582ad30c0 100644 --- a/wram.asm +++ b/wram.asm @@ -299,6 +299,7 @@ wGlobalAnimXOffset:: ds 1 wSpriteAnimsEnd:: ds 11 + wc3cc:: ds 1 wc3cd:: ds 31 wc3ec:: ds 1 @@ -317,7 +318,9 @@ wc3f8:: ds 1 wc3f9:: ds 1 wc3fa:: ds 1 wc3fb:: ds 1 -wc3fc:: ds 4 +wc3fc:: ds 1 + + ds 3 SECTION "Sprites", WRAM0