Brought over microjrpg cutscene system (partially implemented)

This commit is contained in:
2025-11-08 15:23:22 -06:00
parent bc4776f096
commit 0a83175b66
18 changed files with 391 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
#include "util/memory.h"
#include "time/time.h"
#include "util/math.h"
#include "rpg/cutscene/cutscenemode.h"
entity_t ENTITIES[ENTITY_COUNT];
@@ -43,7 +44,10 @@ void entityUpdate(entity_t *entity) {
}
// Movement code.
if(ENTITY_CALLBACKS[entity->type].movement != NULL) {
if(
cutsceneModeIsInputAllowed() &&
ENTITY_CALLBACKS[entity->type].movement != NULL
) {
ENTITY_CALLBACKS[entity->type].movement(entity);
}
}

View File

@@ -8,6 +8,8 @@
#include "entity.h"
#include "assert/assert.h"
#include "rpg/cutscene/scene/testcutscene.h"
void npcInit(entity_t *entity) {
assertNotNull(entity, "Entity pointer cannot be NULL");
}
@@ -20,7 +22,7 @@ bool_t npcInteract(entity_t *player, entity_t *npc) {
assertNotNull(player, "Player entity pointer cannot be NULL");
assertNotNull(npc, "NPC entity pointer cannot be NULL");
printf("npc interact\n");
cutsceneSystemStartCutscene(&TEST_CUTSCENE);
return false;
};