/**
 * Copyright (c) 2024 Dominic Masters
 * 
 * This software is released under the MIT License.
 * https://opensource.org/licenses/MIT
 */

#include "npc.h"
#include "assert/assert.h"

void npcInit(npc_t *npc) {
  assertNotNull(npc, "npcInit: NPC is NULL!");
  npc->name[0] = '\0';
  npc->text[0] = '\0';
}

void npcNameSet(npc_t *npc, const char_t *name) {
  assertNotNull(npc, "npcNameSet: NPC is NULL!");
  assertNotNull(name, "npcNameSet: Name is NULL!");
  strncpy(npc->name, name, TEXTBOX_TITLE_MAX);
}

void npcTextSet(npc_t *npc, const char_t *text) {
  assertNotNull(npc, "npcTextSet: NPC is NULL!");
  assertNotNull(text, "npcTextSet: Text is NULL!");
  strncpy(npc->text, text, TEXTBOX_TEXT_MAX);
}