diff options
author | Bendegúz Nagy | 2016-06-28 20:17:38 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | ae6f2d711ccf3a2351be2d98da07ed2daf95c017 (patch) | |
tree | a8a01981d6b3a29708cb79fd6cd7cf10e9c8b4b9 /engines/dm | |
parent | 3442019d941adb0f8f6f4bf7957e881daed32a41 (diff) | |
download | scummvm-rg350-ae6f2d711ccf3a2351be2d98da07ed2daf95c017.tar.gz scummvm-rg350-ae6f2d711ccf3a2351be2d98da07ed2daf95c017.tar.bz2 scummvm-rg350-ae6f2d711ccf3a2351be2d98da07ed2daf95c017.zip |
DM: Add F0034_OBJECT_DrawLeaderHandObjectName
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/TODOs/methodtree.txt | 22 | ||||
-rw-r--r-- | engines/dm/TODOs/todo.txt | 1 | ||||
-rw-r--r-- | engines/dm/objectman.cpp | 19 | ||||
-rw-r--r-- | engines/dm/objectman.h | 1 |
4 files changed, 31 insertions, 12 deletions
diff --git a/engines/dm/TODOs/methodtree.txt b/engines/dm/TODOs/methodtree.txt index fb7021e64f..92bbd38658 100644 --- a/engines/dm/TODOs/methodtree.txt +++ b/engines/dm/TODOs/methodtree.txt @@ -97,24 +97,24 @@ F0280_CHAMPION_AddCandidateChampionToParty // done, so-so G0498_auc_Graphic560_PaletteChanges_ActionAreaObjectIcon // done G0237_as_Graphic559_ObjectInfo // done G0509_B_ActionAreaContainsIcons // done - F0301_CHAMPION_AddObjectInSlot // skip + F0301_CHAMPION_AddObjectInSlot + F0299_CHAMPION_ApplyObjectModifiersToStatistics // done F0296_CHAMPION_DrawChangedObjectIcons - F0292_CHAMPION_DrawState // skip - F0034_OBJECT_DrawLeaderHandObjectName // skip + F0068_MOUSE_SetPointerToObject // skip + F0077_MOUSE_HidePointer_CPSE // skip + F0078_MOUSE_ShowPointer // skip + F0034_OBJECT_DrawLeaderHandObjectName // done + F0386_MENUS_DrawActionIcon F0295_CHAMPION_HasObjectIconInSlotBoxChanged M70_HAND_SLOT_INDEX - G0423_i_InventoryChampionOrdinal G0420_B_MousePointerHiddenToDrawChangedObjectIconOnScreen G0412_puc_Bitmap_ObjectIconForMousePointer - G0424_i_PanelContent - G0425_aT_ChestSlots + G0413_i_LeaderHandObjectIconIndex + G0414_T_LeaderHandObject F0337_INVENTORY_SetDungeonViewPalette - F0299_CHAMPION_ApplyObjectModifiersToStatistics - F0291_CHAMPION_DrawSlot - G0425_aT_ChestSlots - G0423_i_InventoryChampionOrdinal - G0039_ai_Graphic562_LightPowerToLightAmount G0407_s_Party + G0039_ai_Graphic562_LightPowerToLightAmount + F0355_INVENTORY_Toggle_CPSE // done F0292_CHAMPION_DrawState // done F0334_INVENTORY_CloseChest // done diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt index 0357673999..ca4bc3fbb1 100644 --- a/engines/dm/TODOs/todo.txt +++ b/engines/dm/TODOs/todo.txt @@ -18,6 +18,7 @@ Todo: Attend to sev's notes on github Double check enums with hex literals, I think I screwed the regex when processing them Double check strcat, strstr usages, I might have messed them up in many places + I forgot to add a bunch of warning for show/hide mouse pointer Missing functions: Add missing F0163_DUNGEON_LinkThingToList in MovesensMan::sensorIsTriggeredByClickOnWall (I don't think it's safe yet) diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp index c83c16c9f6..0f04fb4c96 100644 --- a/engines/dm/objectman.cpp +++ b/engines/dm/objectman.cpp @@ -27,6 +27,7 @@ #include "objectman.h" #include "dungeonman.h" +#include "text.h" namespace DM { @@ -229,5 +230,21 @@ void ObjectMan::drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex) { box, kColorNoTransparency, gDefultViewPort); } } - + +#define kObjectNameMaximumLength 14 // @ C014_OBJECT_NAME_MAXIMUM_LENGTH + +void ObjectMan::drawLeaderObjectName(Thing thing) { + IconIndice iconIndex = getIconIndex(thing); + char *objName; + char objectNameBuffer[16]; + if (iconIndex == kIconIndiceJunkChampionBones) { + Junk *junk = (Junk*)_vm->_dungeonMan->getThingData(thing); + strcpy(objectNameBuffer, _vm->_championMan->_champions[junk->getChargeCount()]._name); + strcat(objectNameBuffer, _objectNames[iconIndex]); + objName = objectNameBuffer; + } else { + objName = _objectNames[iconIndex]; + } + _vm->_textMan->printWithTrailingSpacesToScreen(233, 37, kColorCyan, kColorBlack, objName, kObjectNameMaximumLength); +} } diff --git a/engines/dm/objectman.h b/engines/dm/objectman.h index e01d06404e..e5e4cf3a21 100644 --- a/engines/dm/objectman.h +++ b/engines/dm/objectman.h @@ -62,6 +62,7 @@ public: IconIndice getIconIndex(Thing thing); // @ F0033_OBJECT_GetIconIndex void extractIconFromBitmap(uint16 iconIndex, byte *destBitmap); // F0036_OBJECT_ExtractIconFromBitmap void drawIconInSlotBox(uint16 slotBoxIndex, int16 iconIndex); // @ F0038_OBJECT_DrawIconInSlotBox + void drawLeaderObjectName(Thing thing); // @ F0034_OBJECT_DrawLeaderHandObjectName }; } |