From 0bc56c6ce51717f7b2ef0469dc67985748765d95 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 8 Mar 2014 23:12:33 +0900 Subject: [PATCH] Implement Level displaying to GameSurfaceSDL class. --- Deeangband/GameSurfaceSDL.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Deeangband/GameSurfaceSDL.cpp b/Deeangband/GameSurfaceSDL.cpp index a4b381f..267de9e 100644 --- a/Deeangband/GameSurfaceSDL.cpp +++ b/Deeangband/GameSurfaceSDL.cpp @@ -137,6 +137,7 @@ void GameSurfaceSDL::drawCreatureStatus(Creature *creaturePtr) enum CREATURE_STATUS_VIEW_POSITION { POS_NAME, + POS_LEVEL, POS_HP, POS_MP, POS_AC, @@ -168,6 +169,7 @@ void GameSurfaceSDL::drawCreatureStatus(Creature *creaturePtr) {10, 70, 0, 0}, {10, 90, 0, 0}, {10, 110, 0, 0}, + {10, 130, 0, 0}, {200, 30, 0, 0}, {200, 50, 0, 0}, {200, 70, 0, 0}, @@ -180,9 +182,9 @@ void GameSurfaceSDL::drawCreatureStatus(Creature *creaturePtr) {200, 210, 0, 0}, {200, 230, 0, 0}, {200, 250, 0, 0}, - {10, 130, 0, 0}, {10, 150, 0, 0}, {10, 170, 0, 0}, + {10, 190, 0, 0}, }; SDL_Rect CreatureStatusViewRect[POS_MAX]; @@ -194,6 +196,7 @@ void GameSurfaceSDL::drawCreatureStatus(Creature *creaturePtr) SDL_Rect masterRect = {10, 10, 490, 450}; sprintf_s(statusBuf[POS_NAME], STATUS_BUFSIZE, "–¼‘O:%s", creaturePtr->GetName().c_str()); + sprintf_s(statusBuf[POS_LEVEL], STATUS_BUFSIZE, "LV:%3d", creaturePtr->GetLevel()); sprintf_s(statusBuf[POS_HP], STATUS_BUFSIZE, "HP:%5d/%5d", creaturePtr->GetCurHP(), creaturePtr->GetMaxHP()); sprintf_s(statusBuf[POS_MP], STATUS_BUFSIZE, "MP:%5d/%5d", creaturePtr->GetCurMP(), creaturePtr->GetMaxMP()); sprintf_s(statusBuf[POS_AC], STATUS_BUFSIZE, "AC:%4d", creaturePtr->GetArmorSaving()); -- 2.11.0