Files
dusk/src/rpg/rpgcamera.hpp
Dominic Masters 2e0f5f302b
Some checks failed
Build Dusk / build-linux (push) Failing after 2m7s
Build Dusk / build-psp (push) Failing after 2m19s
Nuke error.hpp
2025-12-22 14:19:07 +10:00

39 lines
664 B
C++

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "rpg/world/worldpos.hpp"
typedef enum {
RPG_CAMERA_MODE_FREE,
RPG_CAMERA_MODE_FOLLOW_ENTITY,
} rpgcameramode_t;
typedef struct {
rpgcameramode_t mode;
union {
worldpos_t free;
struct {
uint8_t followEntityId;
} followEntity;
};
} rpgcamera_t;
extern rpgcamera_t RPG_CAMERA;
/**
* Initializes the RPG camera.
*/
void rpgCameraInit(void);
/**
* Updates the RPG camera.
*
* @throws std::runtime_error if map position setting fails.
*/
void rpgCameraUpdate(void);