Add inventory.
This commit is contained in:
39
archive/rpg/rpgtextbox.c
Normal file
39
archive/rpg/rpgtextbox.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "rpgtextbox.h"
|
||||
#include "util/memory.h"
|
||||
#include "util/string.h"
|
||||
#include "assert/assert.h"
|
||||
|
||||
rpgtextbox_t RPG_TEXTBOX;
|
||||
|
||||
void rpgTextboxInit() {
|
||||
memoryZero(&RPG_TEXTBOX, sizeof(rpgtextbox_t));
|
||||
}
|
||||
|
||||
void rpgTextboxShow(
|
||||
const rpgtextboxpos_t position,
|
||||
const char_t *text
|
||||
) {
|
||||
RPG_TEXTBOX.position = position;
|
||||
RPG_TEXTBOX.visible = true;
|
||||
|
||||
stringCopy(
|
||||
RPG_TEXTBOX.text,
|
||||
text,
|
||||
RPG_TEXTBOX_MAX_CHARS
|
||||
);
|
||||
}
|
||||
|
||||
void rpgTextboxHide() {
|
||||
RPG_TEXTBOX.visible = false;
|
||||
}
|
||||
|
||||
bool_t rpgTextboxIsVisible() {
|
||||
return RPG_TEXTBOX.visible;
|
||||
}
|
||||
Reference in New Issue
Block a user