34 lines
875 B
C
34 lines
875 B
C
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#include "rpg/cutscene/item/cutsceneitem.h"
|
|
#include "rpg/cutscene/cutscenesystem.h"
|
|
#include "rpg/entity/entity.h"
|
|
#include "assert/assert.h"
|
|
|
|
void cutsceneEntityAddStart(
|
|
const cutsceneitem_t *item,
|
|
cutsceneitemdata_t *data
|
|
) {
|
|
uint8_t entIndex = entityGetAvailable();
|
|
assertTrue(entIndex != 0xFF, "No available entity slots for CUTSCENE_ENTITY_ADD");
|
|
|
|
entity_t *entity = &ENTITIES[entIndex];
|
|
entityInit(entity, item->entityAdd.entityType);
|
|
entityPositionSet(entity, item->entityAdd.position);// Also assigns chunk.
|
|
|
|
CUTSCENE_SYSTEM.entityLastCreated = entity;
|
|
CUTSCENE_SYSTEM.entityLastRef = entity;
|
|
}
|
|
|
|
bool_t cutsceneEntityAddUpdate(
|
|
const cutsceneitem_t *item,
|
|
cutsceneitemdata_t *data
|
|
) {
|
|
return true;
|
|
}
|