Show map name in the debug player position overlay
Useful now that multiple maps can be loaded, to tell which map the printed coordinates belong to.
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
#include "rpg/entity/entity.h"
|
#include "rpg/entity/entity.h"
|
||||||
#include "rpg/entity/entitytype.h"
|
#include "rpg/entity/entitytype.h"
|
||||||
#include "rpg/overworld/worldpos.h"
|
#include "rpg/overworld/worldpos.h"
|
||||||
|
#include "rpg/overworld/map.h"
|
||||||
|
|
||||||
uiplayerpos_t UIPLAYERPOS;
|
uiplayerpos_t UIPLAYERPOS;
|
||||||
|
|
||||||
@@ -46,7 +47,8 @@ errorret_t uiPlayerPosDraw() {
|
|||||||
stringFormat(
|
stringFormat(
|
||||||
UIPLAYERPOS.text,
|
UIPLAYERPOS.text,
|
||||||
UI_PLAYERPOS_TEXT_MAX - 1,
|
UI_PLAYERPOS_TEXT_MAX - 1,
|
||||||
"%d,%d,%d[%d,%d,%d]#%d",
|
"%s %d,%d,%d[%d,%d,%d]#%d",
|
||||||
|
MAP.name,
|
||||||
(int_t)player->position.x,
|
(int_t)player->position.x,
|
||||||
(int_t)player->position.y,
|
(int_t)player->position.y,
|
||||||
(int_t)player->position.z,
|
(int_t)player->position.z,
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ extern uiplayerpos_t UIPLAYERPOS;
|
|||||||
errorret_t uiPlayerPosInit();
|
errorret_t uiPlayerPosInit();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws the player world position, chunk position, and chunk index on
|
* Draws the current map name, player world position, chunk position, and
|
||||||
* screen. Searches for the first ENTITY_TYPE_PLAYER and renders:
|
* chunk index on screen. Searches for the first ENTITY_TYPE_PLAYER and
|
||||||
* WORLDX,WORLDY,WORLDZ[chunkx,chunky,chunkz]#chunkIndex
|
* renders: MAPNAME WORLDX,WORLDY,WORLDZ[chunkx,chunky,chunkz]#chunkIndex
|
||||||
*
|
*
|
||||||
* @return Any error that occurs.
|
* @return Any error that occurs.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user