shithub: pokecrystal

Download patch

ref: 94188ee0f76934417db7929c696a54440bfc45cb
parent: 02e8b4c7b68d52f5e7d470564fd7696041912005
author: yenatch <[email protected]>
date: Thu Nov 21 19:09:51 EST 2013

version-sensitive objects for egg moves and evos/attacks

this way main.o and wram.o are version-neutral

--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@
 TEXTFILES := $(shell find ./ -type f -name '*.asm' | grep -v globals.asm)
 TEXTQUEUE :=
 
-CRYSTAL_OBJS := wram.o main.o
+CRYSTAL_OBJS := wram.o main.o stats/egg_moves_crystal.o stats/evos_attacks_crystal.o
 OBJS := $(CRYSTAL_OBJS)
 
 ROMS := pokecrystal.gbc
--- a/constants.asm
+++ b/constants.asm
@@ -1,10 +1,3 @@
-_CRYSTAL EQU 1
-
-if _CRYSTAL
-VERSION EQU 0
-else
-VERSION EQU 1
-endc
 
 ; wram constants
 ; MonType: ; cf5f
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -2018,7 +2018,7 @@
 ; 0x976ad
 
 Version: ; 976ad
-	db VERSION
+	db 0 ; VERSION
 ; 976ae
 
 Script_pokenamemem: ; 0x976ae
--- a/main.asm
+++ b/main.asm
@@ -31423,10 +31423,7 @@
 
 INCLUDE "tilesets/data_3.asm"
 
-EggMovePointers: ; 0x23b11
-INCLUDE "stats/egg_move_pointers.asm"
 
-INCLUDE "stats/egg_moves.asm"
 
 
 SECTION "bank9",ROMX,BANK[$9]
@@ -54674,10 +54671,7 @@
 ; 425b1
 
 
-EvosAttacksPointers: ; 0x425b1
-INCLUDE "stats/evos_attacks_pointers.asm"
 
-INCLUDE "stats/evos_attacks.asm"
 
 
 SECTION "bank11",ROMX,BANK[$11]
--- a/stats/egg_move_pointers.asm
+++ b/stats/egg_move_pointers.asm
@@ -1,3 +1,4 @@
+EggMovePointers: ; 0x23b11
 	dw BulbasaurEggMoves
 	dw NoEggMoves
 	dw NoEggMoves
--- /dev/null
+++ b/stats/egg_moves_crystal.asm
@@ -1,0 +1,6 @@
+INCLUDE "pokecrystal.asm"
+INCLUDE "includes.asm"
+
+SECTION "eggmoves", ROMX, BANK[$8]
+INCLUDE "stats/egg_move_pointers.asm"
+INCLUDE "stats/egg_moves.asm"
--- /dev/null
+++ b/stats/evos_attacks_crystal.asm
@@ -1,0 +1,6 @@
+INCLUDE "pokecrystal.asm"
+INCLUDE "includes.asm"
+
+SECTION "evosattacks", ROMx, BANK[$10]
+INCLUDE "stats/evos_attacks_pointers.asm"
+INCLUDE "stats/evos_attacks.asm"
--- a/stats/evos_attacks_pointers.asm
+++ b/stats/evos_attacks_pointers.asm
@@ -2,6 +2,7 @@
 
 ; These are grouped together since they're both checked at level-up.
 
+EvosAttacksPointers: ; 0x425b1
 	dw BulbasaurEvosAttacks
 	dw IvysaurEvosAttacks
 	dw VenusaurEvosAttacks