diff options
author | Bendegúz Nagy | 2016-06-25 17:03:02 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 5893dc7c981a3131882f705a5058a5e4e6af660f (patch) | |
tree | 00f2243f6db146a889146638780c070409792add /engines | |
parent | 12d359166ca87d74cfe6598162d78da97939c0d3 (diff) | |
download | scummvm-rg350-5893dc7c981a3131882f705a5058a5e4e6af660f.tar.gz scummvm-rg350-5893dc7c981a3131882f705a5058a5e4e6af660f.tar.bz2 scummvm-rg350-5893dc7c981a3131882f705a5058a5e4e6af660f.zip |
DM: Add F0393_MENUS_DrawSpellAreaControls
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dm/champion.cpp | 1 | ||||
-rw-r--r-- | engines/dm/champion.h | 1 | ||||
-rw-r--r-- | engines/dm/eventman.cpp | 3 | ||||
-rw-r--r-- | engines/dm/menus.cpp | 71 | ||||
-rw-r--r-- | engines/dm/menus.h | 1 |
5 files changed, 76 insertions, 1 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp index 8b4149b464..b8676c803e 100644 --- a/engines/dm/champion.cpp +++ b/engines/dm/champion.cpp @@ -95,6 +95,7 @@ ChampionMan::ChampionMan(DMEngine *vm) : _vm(vm) { _partyIsSleeping = false;
_leaderHandObjectIconIndex = kIconIndiceNone;
_leaderEmptyHanded = true;
+ _magicCasterChampionIndex = kChampionNone;
}
uint16 ChampionMan::getChampionPortraitX(uint16 index) {
diff --git a/engines/dm/champion.h b/engines/dm/champion.h index d5e74a6885..3e72be3850 100644 --- a/engines/dm/champion.h +++ b/engines/dm/champion.h @@ -440,6 +440,7 @@ public: IconIndice _leaderHandObjectIconIndex; // @ G0413_i_LeaderHandObjectIconIndex bool _leaderEmptyHanded; // @ G0415_B_LeaderEmptyHanded Party _party; // @ G0407_s_Party + ChampionIndex _magicCasterChampionIndex; // @ G0514_i_MagicCasterChampionIndex explicit ChampionMan(DMEngine *vm); void resetDataToStartGame(); // @ F0278_CHAMPION_ResetDataToStartGame diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp index 0a79b191c5..9ebda0fbb0 100644 --- a/engines/dm/eventman.cpp +++ b/engines/dm/eventman.cpp @@ -33,6 +33,7 @@ #include "movesens.h" #include "objectman.h" #include "inventory.h" +#include "menus.h" @@ -674,7 +675,7 @@ void EventManager::commandProcessCommands160To162ClickInResurrectReincarnatePane commandSetLeader(kChampionFirst); warning("MISSING CODE: F0394_MENUS_SetMagicCasterAndDrawSpellArea"); } else { - warning("MISSING CODE: F0393_MENUS_DrawSpellAreaControls"); + _vm->_menuMan->drawSpellAreaControls(champMan._magicCasterChampionIndex); } warning("MISSING CODE: F0051_TEXT_MESSAGEAREA_PrintLineFeed"); diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp index ec87a3b77c..8014a82cca 100644 --- a/engines/dm/menus.cpp +++ b/engines/dm/menus.cpp @@ -223,4 +223,75 @@ const char* MenuMan::getActionName(ChampionAction actionIndex) { return (actionIndex == kChampionActionNone) ? "" : gChampionActionNames[actionIndex];
}
+
+Box gBoxSpellAreaControls = Box(233, 319, 42, 49); // @ G0504_s_Graphic560_Box_SpellAreaControls
+
+void MenuMan::drawSpellAreaControls(ChampionIndex champIndex) {
+ ChampionMan &champMan = *_vm->_championMan;
+ DisplayMan &dispMan = *_vm->_displayMan;
+ TextMan &textMan = *_vm->_textMan;
+
+ Champion &champ = champMan._champions[champIndex];
+ int16 champCurrHealth[4];
+ for (uint16 i = 0; i < 4; ++i)
+ champCurrHealth[i] = champMan._champions[i]._currHealth;
+ warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
+ dispMan.clearScreenBox(kColorBlack, gBoxSpellAreaControls);
+ int16 champCount = champMan._partyChampionCount;
+ switch (champIndex) {
+ case kChampionFirst:
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ textMan.printTextToScreen(235, 48, kColorBlack, kColorCyan, champ._name);
+ if (champCount) {
+ if (champCurrHealth[1]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+labelChamp2:
+ if (champCount > 2) {
+ if (champCurrHealth[2]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+labelChamp3:
+ if (champCount > 3) {
+ if (champCurrHealth[3]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ }
+ }
+ }
+ break;
+ case kChampionSecond:
+ if (champCurrHealth[0]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ textMan.printTextToScreen(249, 48, kColorBlack, kColorCyan, champ._name);
+ goto labelChamp2;
+ case kChampionThird:
+ if (champCurrHealth[0]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ if (champCurrHealth[1]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ textMan.printTextToScreen(263, 48, kColorBlack, kColorCyan, champ._name);
+ goto labelChamp3;
+ case kChampionFourth:
+ if (champCurrHealth[0]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ if (champCurrHealth[1]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ if (champCurrHealth[2]) {
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ }
+ warning("MISSING CODE: F0006_MAIN_HighlightScreenBox");
+ textMan.printTextToScreen(277, 48, kColorBlack, kColorCyan, champ._name);
+ break;
+ }
+ warning("MISSING CODE: F0078_MOUSE_ShowPointer");
+}
+
}
diff --git a/engines/dm/menus.h b/engines/dm/menus.h index 4ae7784c4d..ac2f462bdf 100644 --- a/engines/dm/menus.h +++ b/engines/dm/menus.h @@ -65,6 +65,7 @@ public: void refreshActionAreaAndSetChampDirMaxDamageReceived(); // @ F0390_MENUS_RefreshActionAreaAndSetChampionDirectionMaximumDamageReceived void drawActionArea(); // @ F0387_MENUS_DrawActionArea const char* getActionName(ChampionAction actionIndex); // @ F0384_MENUS_GetActionName + void drawSpellAreaControls(ChampionIndex champIndex); // @ F0393_MENUS_DrawSpellAreaControls }; } |