shithub: pokered

Download patch

ref: 3520a4c99a530c7464a7e9e5b956cfcdbe4b28d6
parent: d809d3d59c0c1016b89332be7f6f3003efa7a9f9
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Thu Sep 15 14:10:45 EDT 2022

Distinguish Elite 4 "meta" constants from event constants

Fixes #390

--- a/constants/event_constants.asm
+++ b/constants/event_constants.asm
@@ -715,7 +715,8 @@
 
 ; Indigo Plateau events
 	const_next $8E0
-	const ELITE4_EVENTS_START
+DEF INDIGO_PLATEAU_EVENTS_START EQU const_value
+	const_skip
 	const EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
 	const_skip 4
 	const EVENT_AUTOWALKED_INTO_LORELEIS_ROOM
@@ -735,7 +736,8 @@
 	const_skip
 	const EVENT_BEAT_CHAMPION_RIVAL
 	const_skip 5
-	const ELITE4_CHAMPION_EVENTS_END
+	const_skip
+DEF INDIGO_PLATEAU_EVENTS_END EQU const_value - 1
 
 ; Victory Road 1F events
 	const_next $910
--- a/scripts/HallOfFame.asm
+++ b/scripts/HallOfFame.asm
@@ -40,7 +40,7 @@
 	ld [wLancesRoomCurScript], a
 	ld [wHallOfFameCurScript], a
 	; Elite 4 events
-	ResetEventRange ELITE4_EVENTS_START, ELITE4_CHAMPION_EVENTS_END, 1
+	ResetEventRange INDIGO_PLATEAU_EVENTS_START, INDIGO_PLATEAU_EVENTS_END, 1
 	xor a
 	ld [wHallOfFameCurScript], a
 	ld a, PALLET_TOWN
--- a/scripts/IndigoPlateauLobby.asm
+++ b/scripts/IndigoPlateauLobby.asm
@@ -11,7 +11,7 @@
 	res 1, [hl]
 	ret z
 	; Elite 4 events
-	ResetEventRange ELITE4_EVENTS_START, EVENT_LANCES_ROOM_LOCK_DOOR
+	ResetEventRange INDIGO_PLATEAU_EVENTS_START, EVENT_LANCES_ROOM_LOCK_DOOR
 	ret
 
 IndigoPlateauLobby_TextPointers: