From d3cc861d334c8b773c1b6c662ed9924c43cef009 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Wed, 4 Apr 2018 22:26:07 +0200 Subject: Fix snake_case filenames Renamed a bunch of files, most of them one-off functions, to better fit the general snake_case naming scheme. Also renamed some awfully long filenames. --- engine/items/pack_kris.asm | 20 ++++++++++++++++++++ engine/items/print_item_description.asm | 31 +++++++++++++++++++++++++++++++ engine/items/printitemdescription.asm | 31 ------------------------------- engine/items/update_item_description.asm | 13 +++++++++++++ engine/items/updateitemdescription.asm | 13 ------------- 5 files changed, 64 insertions(+), 44 deletions(-) create mode 100644 engine/items/pack_kris.asm create mode 100644 engine/items/print_item_description.asm delete mode 100644 engine/items/printitemdescription.asm create mode 100644 engine/items/update_item_description.asm delete mode 100644 engine/items/updateitemdescription.asm (limited to 'engine/items') diff --git a/engine/items/pack_kris.asm b/engine/items/pack_kris.asm new file mode 100644 index 000000000..54a21e447 --- /dev/null +++ b/engine/items/pack_kris.asm @@ -0,0 +1,20 @@ +DrawKrisPackGFX: ; 48e81 + ld hl, PackFGFXPointers + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, vTiles2 tile $50 + lb bc, BANK(PackFGFX), 15 + call Request2bpp + ret + +PackFGFXPointers: ; 48e93 + dw PackFGFX + (15 tiles) * 1 ; ITEM_POCKET + dw PackFGFX + (15 tiles) * 3 ; BALL_POCKET + dw PackFGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET + dw PackFGFX + (15 tiles) * 2 ; TM_HM_POCKET + +PackFGFX: ; 48e9b +INCBIN "gfx/pack/pack_f.2bpp" diff --git a/engine/items/print_item_description.asm b/engine/items/print_item_description.asm new file mode 100644 index 000000000..2a9007b97 --- /dev/null +++ b/engine/items/print_item_description.asm @@ -0,0 +1,31 @@ +PrintItemDescription: ; 0x1c8955 +; Print the description for item [wCurSpecies] at de. + + ld a, [wCurSpecies] + cp TM01 + jr c, .not_a_tm + + ld [wCurItem], a + push de + farcall GetTMHMItemMove + pop hl + ld a, [wd265] + ld [wCurSpecies], a + predef PrintMoveDesc + ret + +.not_a_tm + push de + ld hl, ItemDescriptions + ld a, [wCurSpecies] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + pop hl + jp PlaceString +; 0x1c8987 diff --git a/engine/items/printitemdescription.asm b/engine/items/printitemdescription.asm deleted file mode 100644 index 2a9007b97..000000000 --- a/engine/items/printitemdescription.asm +++ /dev/null @@ -1,31 +0,0 @@ -PrintItemDescription: ; 0x1c8955 -; Print the description for item [wCurSpecies] at de. - - ld a, [wCurSpecies] - cp TM01 - jr c, .not_a_tm - - ld [wCurItem], a - push de - farcall GetTMHMItemMove - pop hl - ld a, [wd265] - ld [wCurSpecies], a - predef PrintMoveDesc - ret - -.not_a_tm - push de - ld hl, ItemDescriptions - ld a, [wCurSpecies] - dec a - ld c, a - ld b, 0 - add hl, bc - add hl, bc - ld e, [hl] - inc hl - ld d, [hl] - pop hl - jp PlaceString -; 0x1c8987 diff --git a/engine/items/update_item_description.asm b/engine/items/update_item_description.asm new file mode 100644 index 000000000..fdb1e864d --- /dev/null +++ b/engine/items/update_item_description.asm @@ -0,0 +1,13 @@ +UpdateItemDescription: ; 0x244c3 + ld a, [wMenuSelection] + ld [wCurSpecies], a + hlcoord 0, 12 + ld b, 4 + ld c, SCREEN_WIDTH - 2 + call TextBox + ld a, [wMenuSelection] + cp -1 + ret z + decoord 1, 14 + farcall PrintItemDescription + ret diff --git a/engine/items/updateitemdescription.asm b/engine/items/updateitemdescription.asm deleted file mode 100644 index fdb1e864d..000000000 --- a/engine/items/updateitemdescription.asm +++ /dev/null @@ -1,13 +0,0 @@ -UpdateItemDescription: ; 0x244c3 - ld a, [wMenuSelection] - ld [wCurSpecies], a - hlcoord 0, 12 - ld b, 4 - ld c, SCREEN_WIDTH - 2 - call TextBox - ld a, [wMenuSelection] - cp -1 - ret z - decoord 1, 14 - farcall PrintItemDescription - ret -- cgit v1.2.3