shithub: pokered

Download patch

ref: b2369b0961add3a7b7475870df4e46566903dd8b
parent: f60ee848e8d5adff0ec77023e8aeb848f6678c45
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Jul 5 11:35:38 EDT 2020

Port credits command constants from pokeyellow

--- a/constants/credits_constants.asm
+++ b/constants/credits_constants.asm
@@ -63,3 +63,11 @@
 	const CRED_FUKUI          ; $3D
 	const CRED_CLUB           ; $3E
 	const CRED_PAAD           ; $3F
+
+const_value = $FA
+	const CRED_THE_END       ; $FA
+	const CRED_COPYRIGHT     ; $FB
+	const CRED_TEXT          ; $FC
+	const CRED_TEXT_FADE     ; $FD
+	const CRED_TEXT_MON      ; $FE
+	const CRED_TEXT_FADE_MON ; $FF
--- a/data/credits/credits_order.asm
+++ b/data/credits/credits_order.asm
@@ -1,39 +1,40 @@
 CreditsOrder:
 ; subsequent credits elements will be displayed on separate lines.
-; $FF, $FE, $FD, $FC, $FB, and $FA are commands that are used
-; to go to the next set of credits texts.
-	db CRED_MON, CRED_VERSION, $FF
-	db CRED_DIRECTOR, CRED_TAJIRI, $FF
-	db CRED_PROGRAMMERS, CRED_TA_OOTA, CRED_MORIMOTO, $FD
-	db CRED_PROGRAMMERS, CRED_WATANABE, CRED_MASUDE, CRED_TAMADA, $FE
-	db CRED_CHAR_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, $FF
-	db CRED_MUSIC, CRED_MASUDE, $FD
-	db CRED_SOUND_EFFECTS, CRED_MASUDE, $FE
-	db CRED_GAME_DESIGN, CRED_TAJIRI, $FF
-	db CRED_MONSTER_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_FUZIWARA, $FD
-	db CRED_MONSTER_DESIGN, CRED_MORIMOTO, CRED_SA_OOTA, CRED_YOSHIKAWA, $FE
-	db CRED_GAME_SCENE, CRED_TAJIRI, $FD
-	db CRED_GAME_SCENE, CRED_TANIGUCHI, CRED_NONOMURA, CRED_ZINNAI, $FE
-	db CRED_PARAM, CRED_NISINO, CRED_TA_NAKAMURA, $FF
-	db CRED_MAP, CRED_TAJIRI, CRED_NISINO, $FD
-	db CRED_MAP, CRED_MATSUSIMA, CRED_NONOMURA, CRED_TANIGUCHI, $FE
-	db CRED_TEST, CRED_KAKEI, CRED_TSUCHIYA, $FD
-	db CRED_TEST, CRED_TA_NAKAMURA, CRED_YUDA, $FE
-	db CRED_SPECIAL, CRED_HISHIDA, CRED_SAKAI, $FD
-	db CRED_SPECIAL, CRED_YAMAGUCHI, CRED_YAMAMOTO, $FC
-	db CRED_SPECIAL, CRED_TOMISAWA, CRED_KAWAMOTO, CRED_TO_OOTA, $FE
-	db CRED_PRODUCERS, CRED_MIYAMOTO, $FD
-	db CRED_PRODUCERS, CRED_KAWAGUCHI, $FC
-	db CRED_PRODUCERS, CRED_ISHIHARA, $FE
-	db CRED_US_STAFF, $FD
-	db CRED_US_COORD, CRED_TILDEN, $FD
-	db CRED_US_COORD, CRED_KAWAKAMI, CRED_HI_NAKAMURA, $FC
-	db CRED_US_COORD, CRED_GIESE, CRED_OSBORNE, $FC
-	db CRED_TRANS, CRED_OGASAWARA, $FD
-	db CRED_PROGRAMMERS, CRED_MURAKAWA, CRED_FUKUI, $FD
-	db CRED_SPECIAL, CRED_IWATA, $FD
-	db CRED_SPECIAL, CRED_HARADA, $FC
-	db CRED_TEST, CRED_PAAD, CRED_CLUB, $FD
-	db CRED_PRODUCER, CRED_IZUSHI, $FD
-	db CRED_EXECUTIVE, CRED_YAMAUCHI, $FF
-	db $FB, $FF, $FA
+; CRED_TEXT, CRED_TEXT_FADE, CRED_TEXT_MON, and CRED_TEXT_FADE_MON are
+; commands that are used to go to the next set of credits texts.
+	db CRED_MON, CRED_VERSION, CRED_TEXT_FADE_MON
+	db CRED_DIRECTOR, CRED_TAJIRI, CRED_TEXT_FADE_MON
+	db CRED_PROGRAMMERS, CRED_TA_OOTA, CRED_MORIMOTO, CRED_TEXT_FADE
+	db CRED_PROGRAMMERS, CRED_WATANABE, CRED_MASUDE, CRED_TAMADA, CRED_TEXT_MON
+	db CRED_CHAR_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_TEXT_FADE_MON
+	db CRED_MUSIC, CRED_MASUDE, CRED_TEXT_FADE
+	db CRED_SOUND_EFFECTS, CRED_MASUDE, CRED_TEXT_MON
+	db CRED_GAME_DESIGN, CRED_TAJIRI, CRED_TEXT_FADE_MON
+	db CRED_MONSTER_DESIGN, CRED_SUGIMORI, CRED_NISHIDA, CRED_FUZIWARA, CRED_TEXT_FADE
+	db CRED_MONSTER_DESIGN, CRED_MORIMOTO, CRED_SA_OOTA, CRED_YOSHIKAWA, CRED_TEXT_MON
+	db CRED_GAME_SCENE, CRED_TAJIRI, CRED_TEXT_FADE
+	db CRED_GAME_SCENE, CRED_TANIGUCHI, CRED_NONOMURA, CRED_ZINNAI, CRED_TEXT_MON
+	db CRED_PARAM, CRED_NISINO, CRED_TA_NAKAMURA, CRED_TEXT_FADE_MON
+	db CRED_MAP, CRED_TAJIRI, CRED_NISINO, CRED_TEXT_FADE
+	db CRED_MAP, CRED_MATSUSIMA, CRED_NONOMURA, CRED_TANIGUCHI, CRED_TEXT_MON
+	db CRED_TEST, CRED_KAKEI, CRED_TSUCHIYA, CRED_TEXT_FADE
+	db CRED_TEST, CRED_TA_NAKAMURA, CRED_YUDA, CRED_TEXT_MON
+	db CRED_SPECIAL, CRED_HISHIDA, CRED_SAKAI, CRED_TEXT_FADE
+	db CRED_SPECIAL, CRED_YAMAGUCHI, CRED_YAMAMOTO, CRED_TEXT
+	db CRED_SPECIAL, CRED_TOMISAWA, CRED_KAWAMOTO, CRED_TO_OOTA, CRED_TEXT_MON
+	db CRED_PRODUCERS, CRED_MIYAMOTO, CRED_TEXT_FADE
+	db CRED_PRODUCERS, CRED_KAWAGUCHI, CRED_TEXT
+	db CRED_PRODUCERS, CRED_ISHIHARA, CRED_TEXT_MON
+	db CRED_US_STAFF, CRED_TEXT_FADE
+	db CRED_US_COORD, CRED_TILDEN, CRED_TEXT_FADE
+	db CRED_US_COORD, CRED_KAWAKAMI, CRED_HI_NAKAMURA, CRED_TEXT
+	db CRED_US_COORD, CRED_GIESE, CRED_OSBORNE, CRED_TEXT
+	db CRED_TRANS, CRED_OGASAWARA, CRED_TEXT_FADE
+	db CRED_PROGRAMMERS, CRED_MURAKAWA, CRED_FUKUI, CRED_TEXT_FADE
+	db CRED_SPECIAL, CRED_IWATA, CRED_TEXT_FADE
+	db CRED_SPECIAL, CRED_HARADA, CRED_TEXT
+	db CRED_TEST, CRED_PAAD, CRED_CLUB, CRED_TEXT_FADE
+	db CRED_PRODUCER, CRED_IZUSHI, CRED_TEXT_FADE
+	db CRED_EXECUTIVE, CRED_YAMAUCHI, CRED_TEXT_FADE_MON
+	db CRED_COPYRIGHT, CRED_TEXT_FADE_MON
+	db CRED_THE_END
--- a/engine/movie/credits.asm
+++ b/engine/movie/credits.asm
@@ -180,17 +180,17 @@
 	ld a, [de]
 	inc de
 	push de
-	cp $ff
+	cp CRED_TEXT_FADE_MON
 	jr z, .fadeInTextAndShowMon
-	cp $fe
+	cp CRED_TEXT_MON
 	jr z, .showTextAndShowMon
-	cp $fd
+	cp CRED_TEXT_FADE
 	jr z, .fadeInText
-	cp $fc
+	cp CRED_TEXT
 	jr z, .showText
-	cp $fb
+	cp CRED_COPYRIGHT
 	jr z, .showCopyrightText
-	cp $fa
+	cp CRED_THE_END
 	jr z, .showTheEnd
 	push hl
 	push hl
@@ -205,7 +205,7 @@
 	ld a, [de]
 	inc de
 	ld c, a
-	ld b, $ff
+	ld b, -1
 	pop hl
 	add hl, bc
 	call PlaceString