C -> CPP
Some checks failed
Build Dusk / build-linux (push) Failing after 1m47s
Build Dusk / build-psp (push) Failing after 1m40s

This commit is contained in:
2025-12-22 11:41:49 +10:00
parent a495179e5f
commit 76b5c51ab6
162 changed files with 751 additions and 740 deletions

40
src/rpg/rpgcamera.hpp Normal file
View File

@@ -0,0 +1,40 @@
/**
* 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"
#include "error/error.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.
*
* @return An error code.
*/
errorret_t rpgCameraUpdate(void);