44 lines
931 B
C
44 lines
931 B
C
/**
|
|
* Copyright (c) 2024 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#include "conversationinteractentity.h"
|
|
#include "assert/assert.h"
|
|
#include "rpg/entity/entity.h"
|
|
#include "locale/language.h"
|
|
#include "ui/textbox.h"
|
|
|
|
uint16_t conversationInteractTileInit(
|
|
conversation_t *convo,
|
|
const uint16_t i
|
|
) {
|
|
assertNotNull(convo, "Conversation is NULL!");
|
|
|
|
switch(convo->data.tileInteract.tile) {
|
|
case TILE_WATER:
|
|
textboxSetText(NULL, "tiles.water.interact");
|
|
break;
|
|
|
|
default:
|
|
assertUnreachable("Invalid tile interaction!");
|
|
return CONVERSATION_INVALID;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
uint16_t conversationInteractTileUpdate(
|
|
conversation_t *convo,
|
|
const uint16_t i
|
|
) {
|
|
switch(i) {
|
|
case 0:
|
|
return textboxIsOpen() ? CONVERSATION_CONTINUE : CONVERSATION_DONE;
|
|
|
|
default:
|
|
return CONVERSATION_INVALID;
|
|
}
|
|
} |