shithub: pokered

Download patch

ref: 47cd734276eade428671f720e8d01a45c4fd2bc2
parent: 66377fca32c63ca9e362d2d2ce15f0692260ce53
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Tue Nov 17 11:27:44 EST 2020

Use assert to ensure correct base data size

--- a/data/pokemon/base_stats.asm
+++ b/data/pokemon/base_stats.asm
@@ -151,3 +151,5 @@
 INCLUDE "data/pokemon/base_stats/dragonair.asm"
 INCLUDE "data/pokemon/base_stats/dragonite.asm"
 INCLUDE "data/pokemon/base_stats/mewtwo.asm"
+BaseStatsEnd::
+	assert BaseStatsEnd - BaseStats == (wMonHeaderEnd - wMonHeader) * (NUM_POKEMON - 1) ; discount Mew
--- a/wram.asm
+++ b/wram.asm
@@ -1996,8 +1996,9 @@
 
 wMonHLearnset::
 ; bit field
-	flag_array 50 + 5
+	flag_array NUM_TMS + NUM_HMS
 	ds 1
+wMonHeaderEnd::
 
 wSavedTilesetType::
 ; saved at the start of a battle and then written back at the end of the battle