From cb4e0e2f70c589554fdbfae0e2fd006d34784d18 Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 27 May 2022 16:34:58 -0400 Subject: [PATCH] Fix linting errors --- base/src/get_npc_model_offset.c | 22 ++++++++++++---------- base/src/spawn_custom_freestanding_item.c | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/base/src/get_npc_model_offset.c b/base/src/get_npc_model_offset.c index 65e30d7a..78e28ae4 100644 --- a/base/src/get_npc_model_offset.c +++ b/base/src/get_npc_model_offset.c @@ -1,14 +1,16 @@ #include uint32_t get_npc_model_offset(uint32_t item_id) { - // These values are offsets that are used to calculate the char* that contains the name of the .bin - // file (see: Npc/ directory in the rom) of the NPC being spawned. The exact way it is used is: - // char *npc = 20ddf40 + ( * 0xC) - switch (item_id) { - case 0x1: // key - return 0xC; - case 0x3: // oshus sword - return 0xE3; - } - // TODO: calculate values for rest of items + // These values are offsets that are used to calculate the char* that contains + // the name of the .bin + // file (see: Npc/ directory in the rom) of the NPC being spawned. The exact + // way it is used is: + // char *npc = 20ddf40 + ( * 0xC) + switch (item_id) { + case 0x1: // key + return 0xC; + case 0x3: // oshus sword + return 0xE3; + } + // TODO: calculate values for rest of items } diff --git a/base/src/spawn_custom_freestanding_item.c b/base/src/spawn_custom_freestanding_item.c index 36f70b16..221a77c3 100644 --- a/base/src/spawn_custom_freestanding_item.c +++ b/base/src/spawn_custom_freestanding_item.c @@ -5,7 +5,7 @@ static uint16_t get_item_id() { uint16_t *item_id_address; // Pull the base address of the NPCA entry's item_id off of the stack. - // This value is set in the NPCA section of the + // This value is set in the NPCA section of the // ZMB file in byte 0xC of an ITGE actor. asm volatile("ldr %0, [sp, #0x4]" : "=r"(item_id_address) :); // return the item id @@ -25,7 +25,7 @@ uint16_t spawn_custom_freestanding_item(void *param_1, uint32_t npc_type, (void *)0x20C3FE8; uint16_t item_id = get_item_id(); - + *param_4 = item_id; return (*spawn_npc)(param_1, npc_type, param_3, param_4); }