From d7970f749ac23786728926109be430ab732f19e6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 18:49:25 +0100 Subject: Consistent predef function names --- engine/types.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/types.asm') diff --git a/engine/types.asm b/engine/types.asm index 375bfe434..7808abcb1 100644 --- a/engine/types.asm +++ b/engine/types.asm @@ -1,4 +1,4 @@ -PrintMonTypes: ; 5090d +Predef_PrintMonTypes: ; 5090d ; Print one or both types of [CurSpecies] ; on the stats screen at hl. @@ -24,7 +24,7 @@ PrintMonTypes: ; 5090d .Print: ld b, a - jr PrintType + jr Predef_PrintType .hide_type_2 ; Erase any type name that was here before. @@ -40,7 +40,7 @@ PrintMonTypes: ; 5090d ; 5093a -PrintMoveType: ; 5093a +Predef_PrintMoveType: ; 5093a ; Print the type of move b at hl. push hl @@ -58,7 +58,7 @@ PrintMoveType: ; 5093a ld b, a -PrintType: ; 50953 +Predef_PrintType: ; 50953 ; Print type b at hl. ld a, b @@ -78,7 +78,7 @@ PrintType: ; 50953 ; 50964 -GetTypeName: ; 50964 +Predef_GetTypeName: ; 50964 ; Copy the name of type [wd265] to StringBuffer1. ld a, [wd265] -- cgit v1.2.3 From b45f89f80c62d22cbc2a4b38ae63a2da67878ee4 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 01:45:27 -0500 Subject: More constants and data tables --- engine/types.asm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engine/types.asm') diff --git a/engine/types.asm b/engine/types.asm index 375bfe434..ade1aaa4a 100644 --- a/engine/types.asm +++ b/engine/types.asm @@ -96,6 +96,4 @@ GetTypeName: ; 50964 ; 5097b -INCLUDE "data/type_names.asm" - -; 50a28 +INCLUDE "data/types/names.asm" -- cgit v1.2.3 From 80480821142d7a7b16dd2b1a98a213e7b389af0f Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 14:30:10 -0500 Subject: Remove Predef_ prefix from routines listed in PredefPointers --- engine/types.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/types.asm') diff --git a/engine/types.asm b/engine/types.asm index 0cd52eda7..ade1aaa4a 100644 --- a/engine/types.asm +++ b/engine/types.asm @@ -1,4 +1,4 @@ -Predef_PrintMonTypes: ; 5090d +PrintMonTypes: ; 5090d ; Print one or both types of [CurSpecies] ; on the stats screen at hl. @@ -24,7 +24,7 @@ Predef_PrintMonTypes: ; 5090d .Print: ld b, a - jr Predef_PrintType + jr PrintType .hide_type_2 ; Erase any type name that was here before. @@ -40,7 +40,7 @@ Predef_PrintMonTypes: ; 5090d ; 5093a -Predef_PrintMoveType: ; 5093a +PrintMoveType: ; 5093a ; Print the type of move b at hl. push hl @@ -58,7 +58,7 @@ Predef_PrintMoveType: ; 5093a ld b, a -Predef_PrintType: ; 50953 +PrintType: ; 50953 ; Print type b at hl. ld a, b @@ -78,7 +78,7 @@ Predef_PrintType: ; 50953 ; 50964 -Predef_GetTypeName: ; 50964 +GetTypeName: ; 50964 ; Copy the name of type [wd265] to StringBuffer1. ld a, [wd265] -- cgit v1.2.3 From 01ba6bed889be703dbeaf8fa9be56f1b782606a1 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 18:07:06 -0500 Subject: Move code out of data/ --- engine/types.asm | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'engine/types.asm') diff --git a/engine/types.asm b/engine/types.asm index ade1aaa4a..e0235aff1 100644 --- a/engine/types.asm +++ b/engine/types.asm @@ -35,7 +35,7 @@ PrintMonTypes: ; 5090d ld [hl], a inc bc add hl, bc - ld bc, 5 + ld bc, NAME_LENGTH_JAPANESE - 1 jp ByteFill ; 5093a @@ -91,9 +91,32 @@ GetTypeName: ; 50964 ld h, [hl] ld l, a ld de, StringBuffer1 - ld bc, 13 + ld bc, MOVE_NAME_LENGTH jp CopyBytes ; 5097b INCLUDE "data/types/names.asm" + + +Unreferenced_GetGen1TrainerClassName: ; 50a28 + ld hl, Gen1TrainerClassNames + ld a, [TrainerClass] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, StringBuffer1 +.copy + ld a, [hli] + ld [de], a + inc de + cp "@" + jr nz, .copy + ret + +INCLUDE "data/unused/gen_1_trainer_names.asm" -- cgit v1.2.3 From 5e4fa42fa7e2405760efc77f8c2e7167e67990ac Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 21 Jan 2018 17:45:56 -0500 Subject: Unrelated routine gets its own file --- engine/types.asm | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'engine/types.asm') diff --git a/engine/types.asm b/engine/types.asm index e0235aff1..931e98b92 100644 --- a/engine/types.asm +++ b/engine/types.asm @@ -97,26 +97,3 @@ GetTypeName: ; 50964 INCLUDE "data/types/names.asm" - - -Unreferenced_GetGen1TrainerClassName: ; 50a28 - ld hl, Gen1TrainerClassNames - ld a, [TrainerClass] - dec a - ld c, a - ld b, 0 - add hl, bc - add hl, bc - ld a, [hli] - ld h, [hl] - ld l, a - ld de, StringBuffer1 -.copy - ld a, [hli] - ld [de], a - inc de - cp "@" - jr nz, .copy - ret - -INCLUDE "data/unused/gen_1_trainer_names.asm" -- cgit v1.2.3