From 5e4fa42fa7e2405760efc77f8c2e7167e67990ac Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 21 Jan 2018 17:45:56 -0500 Subject: [PATCH] Unrelated routine gets its own file --- .../unreferenced_getgen1trainerclassname.asm | 21 +++++++++++++++++ engine/types.asm | 23 ------------------- main.asm | 1 + 3 files changed, 22 insertions(+), 23 deletions(-) create mode 100644 engine/routines/unreferenced_getgen1trainerclassname.asm diff --git a/engine/routines/unreferenced_getgen1trainerclassname.asm b/engine/routines/unreferenced_getgen1trainerclassname.asm new file mode 100644 index 000000000..64c55ed84 --- /dev/null +++ b/engine/routines/unreferenced_getgen1trainerclassname.asm @@ -0,0 +1,21 @@ +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" 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" diff --git a/main.asm b/main.asm index fc03bd045..390e85cb9 100644 --- a/main.asm +++ b/main.asm @@ -253,6 +253,7 @@ INCLUDE "engine/events/basement_key.asm" INCLUDE "engine/events/sacred_ash.asm" INCLUDE "engine/tempmon.asm" INCLUDE "engine/types.asm" +INCLUDE "engine/routines/unreferenced_getgen1trainerclassname.asm" INCLUDE "engine/mon_stats.asm" INCLUDE "engine/routines/initlist.asm" INCLUDE "engine/experience.asm"