Made a big mess of the codebase
This commit is contained in:
43
src/rpg/entity/player.h
Normal file
43
src/rpg/entity/player.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "dusk.h"
|
||||
#include "item/inventory.h"
|
||||
|
||||
#define PLAYER_SPEED_WALK 1
|
||||
#define PLAYER_SPEED_RUN 2
|
||||
|
||||
typedef struct _entity_t entity_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t nothing;
|
||||
} playerentity_t;
|
||||
|
||||
#define PLAYER_ENTITY_ID (UINT32_MAX-1)
|
||||
|
||||
extern inventory_t PLAYER_INVENTORY;
|
||||
|
||||
/**
|
||||
* Initializes the player and all player-related entities.
|
||||
*/
|
||||
void playerInit(void);
|
||||
|
||||
/**
|
||||
* Loads the player entity.
|
||||
*
|
||||
* @param entity The entity to initialize.
|
||||
* @param source The source entity to copy data from.
|
||||
*/
|
||||
void playerEntityLoad(entity_t *entity, const entity_t *source);
|
||||
|
||||
/**
|
||||
* Updates the player entity.
|
||||
*
|
||||
* @param entity The entity to update.
|
||||
*/
|
||||
void playerEntityUpdate(entity_t *entity);
|
Reference in New Issue
Block a user