mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
DM: Add MenuMan::setMagicCasterAndDrawSpellArea
This commit is contained in:
@@ -673,7 +673,7 @@ void EventManager::commandProcessCommands160To162ClickInResurrectReincarnatePane
|
||||
if (champMan._partyChampionCount == 1) {
|
||||
warning("MISSING CODE: setting time, G0362_l_LastPartyMovementTime , G0313_ul_GameTime");
|
||||
commandSetLeader(kChampionFirst);
|
||||
warning("MISSING CODE: F0394_MENUS_SetMagicCasterAndDrawSpellArea");
|
||||
_vm->_menuMan->setMagicCasterAndDrawSpellArea(kChampionFirst);
|
||||
} else {
|
||||
_vm->_menuMan->drawSpellAreaControls(champMan._magicCasterChampionIndex);
|
||||
}
|
||||
|
||||
+2
-1
@@ -73,7 +73,8 @@ enum GraphicIndice {
|
||||
kSlotBoxActingHandIndice = 35, // @ C035_GRAPHIC_SLOT_BOX_ACTING_HAND
|
||||
kPanelRenameChampionIndice = 27, // @ C027_GRAPHIC_PANEL_RENAME_CHAMPION
|
||||
kMenuActionAreaIndice = 10, // @ C010_GRAPHIC_MENU_ACTION_AREA
|
||||
kMenuSpellAreLinesIndice = 11 // @ C011_GRAPHIC_MENU_SPELL_AREA_LINES
|
||||
kMenuSpellAreLinesIndice = 11, // @ C011_GRAPHIC_MENU_SPELL_AREA_LINES
|
||||
kMenuSpellAreaBackground = 9 // @ C009_GRAPHIC_MENU_SPELL_AREA_BACKGROUND
|
||||
};
|
||||
|
||||
extern uint16 gPalSwoosh[16];
|
||||
|
||||
@@ -45,6 +45,7 @@ byte gPalChangesActionAreaObjectIcon[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
Box gBoxSpellAreaLine = Box(0, 95, 0, 11); // @ K0074_s_Box_SpellAreaLine
|
||||
Box gBoxSpellAreaLine2 = Box(224, 319, 50, 61); // @ K0075_s_Box_SpellAreaLine2
|
||||
Box gBoxSpellAreaLine3 = Box(224, 319, 62, 73); // @ K0076_s_Box_SpellAreaLine3
|
||||
Box gBoxSpellArea = Box(224, 319, 77, 121);
|
||||
|
||||
MenuMan::MenuMan(DMEngine *vm) : _vm(vm) {
|
||||
_refreshActionArea = false;
|
||||
@@ -333,4 +334,35 @@ void MenuMan::buildSpellAreaLine(int16 spellAreaBitmapLine) {
|
||||
}
|
||||
}
|
||||
|
||||
void MenuMan::setMagicCasterAndDrawSpellArea(int16 champIndex)
|
||||
{
|
||||
ChampionMan &champMan = *_vm->_championMan;
|
||||
DisplayMan &dispMan = *_vm->_displayMan;
|
||||
|
||||
if((champIndex == champMan._magicCasterChampionIndex)
|
||||
|| ((champIndex != kChampionNone) && !champMan._champions[champIndex]._currHealth))
|
||||
return;
|
||||
if (champMan._magicCasterChampionIndex == kChampionNone) {
|
||||
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
|
||||
dispMan.blitToScreen(dispMan.getBitmap(kMenuSpellAreaBackground), 96, 0, 0, gBoxSpellArea);
|
||||
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
|
||||
}
|
||||
if (champIndex == kChampionNone) {
|
||||
champMan._magicCasterChampionIndex = kChampionNone;
|
||||
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
|
||||
dispMan._useByteBoxCoordinates = false;
|
||||
dispMan.clearScreenBox(kColorBlack, gBoxSpellArea);
|
||||
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
|
||||
return;
|
||||
}
|
||||
|
||||
champMan._magicCasterChampionIndex = champIndex;
|
||||
buildSpellAreaLine(kSpellAreaAvailableSymbols);
|
||||
warning("MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
|
||||
drawSpellAreaControls((ChampionIndex)champIndex);
|
||||
dispMan.blitToScreen(_bitmapSpellAreaLine, 96, 0, 0, gBoxSpellAreaLine2);
|
||||
buildSpellAreaLine(kSpellAreaChampionSymbols);
|
||||
dispMan.blitToScreen(_bitmapSpellAreaLine, 96, 0, 0, gBoxSpellAreaLine3);
|
||||
warning("MISSING CODE: F0078_MOUSE_ShowPointer");
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -33,7 +33,8 @@
|
||||
|
||||
namespace DM {
|
||||
|
||||
extern Box gBoxActionArea;
|
||||
extern Box gBoxActionArea; // @ G0001_s_Graphic562_Box_ActionArea
|
||||
extern Box gBoxSpellArea; // @ G0000_s_Graphic562_Box_SpellArea
|
||||
|
||||
class ActionList {
|
||||
public:
|
||||
@@ -69,6 +70,7 @@ public:
|
||||
const char* getActionName(ChampionAction actionIndex); // @ F0384_MENUS_GetActionName
|
||||
void drawSpellAreaControls(ChampionIndex champIndex); // @ F0393_MENUS_DrawSpellAreaControls
|
||||
void buildSpellAreaLine(int16 spellAreaBitmapLine);// @ F0392_MENUS_BuildSpellAreaLine
|
||||
void setMagicCasterAndDrawSpellArea(int16 champIndex); // @ F0394_MENUS_SetMagicCasterAndDrawSpellArea
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user