shithub: pokecrystal

Download patch

ref: e2ec8a1d1331517bd2b09940ab1d688bd4d698c9
parent: 43fb5732a27c49396965024291ae2c44d27e9dd5
author: yenatch <yenatch@gmail.com>
date: Wed Jul 9 08:50:33 EDT 2014

Recomment type names.

This is mostly just whitespace reduction.

--- a/constants/type_constants.asm
+++ b/constants/type_constants.asm
@@ -1,4 +1,3 @@
-
 	const_def
 
 PHYSICAL EQU const_value
@@ -12,7 +11,6 @@
 	const BUG
 	const GHOST
 	const STEEL
-
 
 UNUSED_TYPES EQU const_value
 	const TYPE_10
--- a/text/types.asm
+++ b/text/types.asm
@@ -1,5 +1,6 @@
 PrintMonTypes: ; 5090d
-; Print both types of CurSpecies on the stats screen at hl.
+; Print one or both types of [CurSpecies]
+; on the stats screen at hl.
 
 	push hl
 	call GetBaseData
@@ -7,27 +8,29 @@
 
 	push hl
 	ld a, [BaseType1]
-	call .PrintType
+	call .Print
 
+	; Single-typed monsters really
+	; have two of the same type.
 	ld a, [BaseType1]
 	ld b, a
 	ld a, [BaseType2]
 	cp b
 	pop hl
-	jr z, .HideSecondType
+	jr z, .hide_type_2
 
-; Next row
-	ld bc, 20
+	ld bc, SCREEN_WIDTH
 	add hl, bc
 
-.PrintType
+.Print
 	ld b, a
 	jr PrintType
 
-.HideSecondType
-; This doesn't actually do anything.
+.hide_type_2
+	; Erase any type name that was here before.
+	; Seems to be pointless in localized versions.
 	ld a, " "
-	ld bc, 20 - 3
+	ld bc, SCREEN_WIDTH - 3
 	add hl, bc
 	ld [hl], a
 	inc bc
@@ -36,6 +39,7 @@
 	jp ByteFill
 ; 5093a
 
+
 PrintMoveType: ; 5093a
 ; Print the type of move b at hl.
 
@@ -52,10 +56,11 @@
 	pop hl
 
 	ld b, a
-; 50953
 
+
 PrintType: ; 50953
 ; Print type b at hl.
+
 	ld a, b
 
 	push hl
@@ -74,7 +79,8 @@
 
 
 GetTypeName: ; 50964
-; Copy the name of type $d265 to StringBuffer1.
+; Copy the name of type [$d265] to StringBuffer1.
+
 	ld a, [$d265]
 	ld hl, TypeNames
 	ld e, a
@@ -85,7 +91,7 @@
 	ld h, [hl]
 	ld l, a
 	ld de, StringBuffer1
-	ld bc, $000d
+	ld bc, 13
 	jp CopyBytes
 ; 5097b
 
@@ -110,7 +116,7 @@
 	dw Normal
 	dw Normal
 	dw Normal
-	dw UnknownType
+	dw CurseType
 	dw Fire
 	dw Water
 	dw Grass
@@ -120,43 +126,24 @@
 	dw Dragon
 	dw Dark
 
-Normal:
-	db "NORMAL@"
-Fighting:
-	db "FIGHTING@"
-Flying:
-	db "FLYING@"
-Poison:
-	db "POISON@"
-UnknownType:
-	db "???@"
-Fire:
-	db "FIRE@"
-Water:
-	db "WATER@"
-Grass:
-	db "GRASS@"
-Electric:
-	db "ELECTRIC@"
-Psychic:
-	db "PSYCHIC@"
-Ice:
-	db "ICE@"
-Ground:
-	db "GROUND@"
-Rock:
-	db "ROCK@"
-Bird:
-	db "BIRD@"
-Bug:
-	db "BUG@"
-Ghost:
-	db "GHOST@"
-Steel:
-	db "STEEL@"
-Dragon:
-	db "DRAGON@"
-Dark:
-	db "DARK@"
-; 50a28
+Normal:    db "NORMAL@"
+Fighting:  db "FIGHTING@"
+Flying:    db "FLYING@"
+Poison:    db "POISON@"
+CurseType: db "???@"
+Fire:      db "FIRE@"
+Water:     db "WATER@"
+Grass:     db "GRASS@"
+Electric:  db "ELECTRIC@"
+Psychic:   db "PSYCHIC@"
+Ice:       db "ICE@"
+Ground:    db "GROUND@"
+Rock:      db "ROCK@"
+Bird:      db "BIRD@"
+Bug:       db "BUG@"
+Ghost:     db "GHOST@"
+Steel:     db "STEEL@"
+Dragon:    db "DRAGON@"
+Dark:      db "DARK@"
 
+; 50a28
--