This commit is contained in:
2025-10-09 15:07:07 -05:00
parent 7622f81309
commit c4c43b23ad
11 changed files with 162 additions and 32 deletions

37
src/rpg/rpgcamera.h Normal file
View File

@@ -0,0 +1,37 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "world/worldunit.h"
typedef enum {
RPG_CAMERA_MODE_FREE,
RPG_CAMERA_MODE_FOLLOW_ENTITY,
} rpgcameramode_t;
typedef struct {
worldpos_t position[WORLD_DIMENSIONS];
rpgcameramode_t mode;
union {
struct {
uint8_t followEntityId;
} followEntity;
};
} rpgcamera_t;
extern rpgcamera_t RPG_CAMERA;
/**
* Initializes the RPG camera.
*/
void rpgCameraInit(void);
/**
* Updates the RPG camera.
*/
void rpgCameraUpdate(void);