aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-08-20 14:22:47 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitc469c7282468ed59744c2de2855a12086a0ad451 (patch)
tree543577dd2afb272e968b37a1d8b8d504c8e3e597 /engines
parentd97a8905cc18ccf9d036f7708d8e2cf8dfba6067 (diff)
downloadscummvm-rg350-c469c7282468ed59744c2de2855a12086a0ad451.tar.gz
scummvm-rg350-c469c7282468ed59744c2de2855a12086a0ad451.tar.bz2
scummvm-rg350-c469c7282468ed59744c2de2855a12086a0ad451.zip
DM: Move some more globals
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/champion.cpp17
-rw-r--r--engines/dm/champion.h3
-rw-r--r--engines/dm/dm.cpp10
-rw-r--r--engines/dm/eventman.cpp89
-rw-r--r--engines/dm/eventman.h16
-rw-r--r--engines/dm/inventory.cpp4
-rw-r--r--engines/dm/menus.cpp6
-rw-r--r--engines/dm/timeline.cpp2
8 files changed, 80 insertions, 67 deletions
diff --git a/engines/dm/champion.cpp b/engines/dm/champion.cpp
index 6359f42ce5..1a7d22967b 100644
--- a/engines/dm/champion.cpp
+++ b/engines/dm/champion.cpp
@@ -41,8 +41,6 @@
namespace DM {
-int16 g39_LightPowerToLightAmount[16] = {0, 5, 12, 24, 33, 40, 46, 51, 59, 68, 76, 82, 89, 94, 97, 100};
-
uint16 gSlotMasks[38] = { // @ G0038_ai_Graphic562_SlotMasks
/* 30 for champion inventory, 8 for chest */
0xFFFF, /* Ready Hand Mouth/Head/Neck/Torso/Legs/Feet/Quiver 1/Quiver 2/Pouch/Hands/Chest */
@@ -100,6 +98,7 @@ void ChampionMan::initConstants() {
};
static Color championColor[4] = {(Color)7, (Color)11, (Color)8, (Color)14};
+ int16 lightPowerToLightAmount[16] = {0, 5, 12, 24, 33, 40, 46, 51, 59, 68, 76, 82, 89, 94, 97, 100};
const char **g417_byLanguage;
switch (_vm->getGameLanguage()) { // localized
@@ -121,6 +120,10 @@ void ChampionMan::initConstants() {
_championColor[i] = championColor[i];
_boxChampionIcons[i] = boxChampionIcons[i];
}
+
+ for (int i = 0; i < 16; i++)
+ _lightPowerToLightAmount[i] = lightPowerToLightAmount[i];
+
}
ChampionMan::ChampionMan(DMEngine *vm) : _vm(vm) {
@@ -530,7 +533,7 @@ void ChampionMan::f301_addObjectInSlot(ChampionIndex champIndex, Thing thing, Ch
} else if (slotIndex == k10_ChampionSlotNeck) {
if ((iconIndex >= k12_IconIndiceJunkIllumuletUnequipped) && (iconIndex <= k13_IconIndiceJunkIllumuletEquipped)) {
((Junk *)rawObjPtr)->setChargeCount(1);
- _g407_party._magicalLightAmount += g39_LightPowerToLightAmount[2];
+ _g407_party._magicalLightAmount += _lightPowerToLightAmount[2];
_vm->_inventoryMan->f337_setDungeonViewPalette();
iconIndex = (IconIndice)(iconIndex + 1);
} else if ((iconIndex >= k10_IconIndiceJunkJewelSymalUnequipped) && (iconIndex <= k11_IconIndiceJunkJewelSymalEquipped)) {
@@ -647,7 +650,7 @@ Thing ChampionMan::f300_getObjectRemovedFromSlot(uint16 champIndex, uint16 slotI
if (slotIndex == k10_ChampionSlotNeck) {
if ((curIconIndex >= k12_IconIndiceJunkIllumuletUnequipped) && (curIconIndex <= k13_IconIndiceJunkIllumuletEquipped)) {
((Junk *)curWeapon)->setChargeCount(0);
- _g407_party._magicalLightAmount -= g39_LightPowerToLightAmount[2];
+ _g407_party._magicalLightAmount -= _lightPowerToLightAmount[2];
_vm->_inventoryMan->f337_setDungeonViewPalette();
} else if ((curIconIndex >= k10_IconIndiceJunkJewelSymalUnequipped) && (curIconIndex <= k11_IconIndiceJunkJewelSymalEquipped)) {
((Junk *)curWeapon)->setChargeCount(0);
@@ -865,10 +868,10 @@ void ChampionMan::f314_wakeUp() {
_vm->_g318_waitForInputMaxVerticalBlankCount = 10;
_vm->f22_delay(10);
_vm->_displayMan->f98_drawFloorAndCeiling();
- _vm->_eventMan->_g441_primaryMouseInput = g447_PrimaryMouseInput_Interface;
+ _vm->_eventMan->_g441_primaryMouseInput = _vm->_eventMan->_primaryMouseInputInterface;
_vm->_eventMan->_g442_secondaryMouseInput = g448_SecondaryMouseInput_Movement;
- _vm->_eventMan->_g443_primaryKeyboardInput = _vm->_eventMan->g458_primaryKeyboardInput_interface;
- _vm->_eventMan->_g444_secondaryKeyboardInput = _vm->_eventMan->g459_secondaryKeyboardInput_movement;
+ _vm->_eventMan->_g443_primaryKeyboardInput = _vm->_eventMan->_primaryKeyboardInputInterface;
+ _vm->_eventMan->_g444_secondaryKeyboardInput = _vm->_eventMan->_secondaryKeyboardInputMovement;
_vm->_eventMan->f357_discardAllInput();
_vm->_menuMan->f457_drawEnabledMenus();
}
diff --git a/engines/dm/champion.h b/engines/dm/champion.h
index 33e2c62e17..af039b754f 100644
--- a/engines/dm/champion.h
+++ b/engines/dm/champion.h
@@ -38,8 +38,6 @@ namespace DM {
#define k0x4000_IgnoreObjectModifiers 0x4000 // @ MASK0x4000_IGNORE_OBJECT_MODIFIERS
#define k0x8000_IgnoreTemporaryExperience 0x8000 // @ MASK0x8000_IGNORE_TEMPORARY_EXPERIENCE
-extern int16 g39_LightPowerToLightAmount[16]; // @ G0039_ai_Graphic562_LightPowerToLightAmount
-
class Scent {
uint16 _scent;
public:
@@ -591,6 +589,7 @@ public:
Box _boxChampionIcons[4];
Color _championColor[4];
+ int16 _lightPowerToLightAmount[16]; // g039_LightPowerToLightAmount
};
}
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index bdbbb1b89d..7f3d60804d 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -339,10 +339,10 @@ void DMEngine::f462_startGame() {
_menuMan->_g509_actionAreaContainsIcons = true;
_eventMan->_g599_useChampionIconOrdinalAsMousePointerBitmap = M0_indexToOrdinal(kM1_ChampionNone);
- _eventMan->_g441_primaryMouseInput = g447_PrimaryMouseInput_Interface;
+ _eventMan->_g441_primaryMouseInput = _eventMan->_primaryMouseInputInterface;
_eventMan->_g442_secondaryMouseInput = g448_SecondaryMouseInput_Movement;
- _eventMan->_g443_primaryKeyboardInput = _eventMan->g458_primaryKeyboardInput_interface;
- _eventMan->_g444_secondaryKeyboardInput = _eventMan->g459_secondaryKeyboardInput_movement;
+ _eventMan->_g443_primaryKeyboardInput = _eventMan->_primaryKeyboardInputInterface;
+ _eventMan->_g444_secondaryKeyboardInput = _eventMan->_secondaryKeyboardInputMovement;
f3_processNewPartyMap(_dungeonMan->_g309_partyMapIndex);
@@ -538,7 +538,7 @@ int16 DMEngine::M0_indexToOrdinal(int16 val) {
}
void DMEngine::f441_processEntrance() {
- _eventMan->_g441_primaryMouseInput = g445_PrimaryMouseInput_Entrance;
+ _eventMan->_g441_primaryMouseInput = _eventMan->_primaryMouseInputEntrance;
_eventMan->_g442_secondaryMouseInput = nullptr;
_eventMan->_g443_primaryKeyboardInput = nullptr;
_eventMan->_g444_secondaryKeyboardInput = nullptr;
@@ -723,7 +723,7 @@ T0444017:
curPalette[1] = D03_RGB_PINK;
curPalette[4] = D09_RGB_WHITE;
- _eventMan->_g441_primaryMouseInput = g446_PrimaryMouseInput_RestartGame;
+ _eventMan->_g441_primaryMouseInput = _eventMan->_primaryMouseInputRestartGame;
_eventMan->f357_discardAllInput();
_eventMan->f77_hideMouse();
_displayMan->f436_STARTEND_FadeToPalette(curPalette);
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 805e5c9fdc..79475ad6df 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -44,39 +44,6 @@
namespace DM {
-MouseInput g445_PrimaryMouseInput_Entrance[4] = { // @ G0445_as_Graphic561_PrimaryMouseInput_Entrance[4]
- /* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
- MouseInput(k200_CommandEntranceEnterDungeon, 244, 298, 45, 58, k1_LeftMouseButton),
- // Strangerke - C201_COMMAND_ENTRANCE_RESUME isn't present in the demo
- MouseInput(k201_CommandEntranceResume, 244, 298, 76, 93, k1_LeftMouseButton),
- MouseInput(k202_CommandEntranceDrawCredits, 248, 293, 187, 199, k1_LeftMouseButton),
- MouseInput(k0_CommandNone, 0, 0, 0, 0, k0_NoneMouseButton)};
-MouseInput g446_PrimaryMouseInput_RestartGame[2] = { // @ G0446_as_Graphic561_PrimaryMouseInput_RestartGame[2]
- /* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
- MouseInput(k215_CommandRestartGame, 103, 217, 145, 159, k1_LeftMouseButton),
- MouseInput(k0_CommandNone, 0, 0, 0, 0, k0_NoneMouseButton)};
-MouseInput g447_PrimaryMouseInput_Interface[20] = { // @ G0447_as_Graphic561_PrimaryMouseInput_Interface[20]
- /* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
- MouseInput(k12_CommandClickInChampion_0_StatusBox, 0, 42, 0, 28, k1_LeftMouseButton),
- MouseInput(k13_CommandClickInChampion_1_StatusBox, 69, 111, 0, 28, k1_LeftMouseButton),
- MouseInput(k14_CommandClickInChampion_2_StatusBox, 138, 180, 0, 28, k1_LeftMouseButton),
- MouseInput(k15_CommandClickInChampion_3_StatusBox, 207, 249, 0, 28, k1_LeftMouseButton),
- MouseInput(k125_CommandClickOnChamptionIcon_Top_Left, 274, 299, 0, 13, k1_LeftMouseButton),
- MouseInput(k126_CommandClickOnChamptionIcon_Top_Right, 301, 319, 0, 13, k1_LeftMouseButton),
- MouseInput(k127_CommandClickOnChamptionIcon_Lower_Right, 301, 319, 15, 28, k1_LeftMouseButton),
- MouseInput(k128_CommandClickOnChamptionIcon_Lower_Left, 274, 299, 15, 28, k1_LeftMouseButton),
- MouseInput(k7_CommandToggleInventoryChampion_0, 43, 66, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 44. swapped with 4 next entries */
- MouseInput(k8_CommandToggleInventoryChampion_1, 112, 135, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 113. swapped with 4 next entries */
- MouseInput(k9_CommandToggleInventoryChampion_2, 181, 204, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 182. swapped with 4 next entries */
- MouseInput(k10_CommandToggleInventoryChampion_3, 250, 273, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 251. swapped with 4 next entries */
- MouseInput(k7_CommandToggleInventoryChampion_0, 0, 66, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
- MouseInput(k8_CommandToggleInventoryChampion_1, 69, 135, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
- MouseInput(k9_CommandToggleInventoryChampion_2, 138, 204, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
- MouseInput(k10_CommandToggleInventoryChampion_3, 207, 273, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
- MouseInput(k100_CommandClickInSpellArea, 233, 319, 42, 73, k1_LeftMouseButton),
- MouseInput(k111_CommandClickInActionArea, 233, 319, 77, 121, k1_LeftMouseButton),
- MouseInput(k147_CommandFreezeGame, 0, 1, 198, 199, k1_LeftMouseButton),
- MouseInput(k0_CommandNone, 0, 0, 0, 0, k0_NoneMouseButton)};
MouseInput g448_SecondaryMouseInput_Movement[9] = { // @ G0448_as_Graphic561_SecondaryMouseInput_Movement[9]
/* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
MouseInput(k1_CommandTurnLeft, 234, 261, 125, 145, k1_LeftMouseButton),
@@ -289,19 +256,61 @@ void EventManager::initArrays() {
KeyboardInput(k148_CommandUnfreezeGame, Common::KEYCODE_ESCAPE, 0), /* Esc */
KeyboardInput(k0_CommandNone, Common::KEYCODE_INVALID, 0)
};
+ MouseInput _primaryMouseInputEntrance[4] = { // @ G0445_as_Graphic561_PrimaryMouseInput_Entrance[4]
+ /* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
+ MouseInput(k200_CommandEntranceEnterDungeon, 244, 298, 45, 58, k1_LeftMouseButton),
+ // Strangerke - C201_COMMAND_ENTRANCE_RESUME isn't present in the demo
+ MouseInput(k201_CommandEntranceResume, 244, 298, 76, 93, k1_LeftMouseButton),
+ MouseInput(k202_CommandEntranceDrawCredits, 248, 293, 187, 199, k1_LeftMouseButton),
+ MouseInput(k0_CommandNone, 0, 0, 0, 0, k0_NoneMouseButton)
+ };
+ MouseInput _primaryMouseInputRestartGame[2] = { // @ G0446_as_Graphic561_PrimaryMouseInput_RestartGame[2]
+ /* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
+ MouseInput(k215_CommandRestartGame, 103, 217, 145, 159, k1_LeftMouseButton),
+ MouseInput(k0_CommandNone, 0, 0, 0, 0, k0_NoneMouseButton)
+ };
+ MouseInput _primaryMouseInputInterface[20] = { // @ G0447_as_Graphic561_PrimaryMouseInput_Interface[20]
+ /* { Command, Box.X1, Box.X2, Box.Y1, Box.Y2, Button } */
+ MouseInput(k12_CommandClickInChampion_0_StatusBox, 0, 42, 0, 28, k1_LeftMouseButton),
+ MouseInput(k13_CommandClickInChampion_1_StatusBox, 69, 111, 0, 28, k1_LeftMouseButton),
+ MouseInput(k14_CommandClickInChampion_2_StatusBox, 138, 180, 0, 28, k1_LeftMouseButton),
+ MouseInput(k15_CommandClickInChampion_3_StatusBox, 207, 249, 0, 28, k1_LeftMouseButton),
+ MouseInput(k125_CommandClickOnChamptionIcon_Top_Left, 274, 299, 0, 13, k1_LeftMouseButton),
+ MouseInput(k126_CommandClickOnChamptionIcon_Top_Right, 301, 319, 0, 13, k1_LeftMouseButton),
+ MouseInput(k127_CommandClickOnChamptionIcon_Lower_Right, 301, 319, 15, 28, k1_LeftMouseButton),
+ MouseInput(k128_CommandClickOnChamptionIcon_Lower_Left, 274, 299, 15, 28, k1_LeftMouseButton),
+ MouseInput(k7_CommandToggleInventoryChampion_0, 43, 66, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 44. swapped with 4 next entries */
+ MouseInput(k8_CommandToggleInventoryChampion_1, 112, 135, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 113. swapped with 4 next entries */
+ MouseInput(k9_CommandToggleInventoryChampion_2, 181, 204, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 182. swapped with 4 next entries */
+ MouseInput(k10_CommandToggleInventoryChampion_3, 250, 273, 0, 28, k1_LeftMouseButton), /* Atari ST: Only present in CSB 2.x and with Box.X1 = 251. swapped with 4 next entries */
+ MouseInput(k7_CommandToggleInventoryChampion_0, 0, 66, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
+ MouseInput(k8_CommandToggleInventoryChampion_1, 69, 135, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
+ MouseInput(k9_CommandToggleInventoryChampion_2, 138, 204, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
+ MouseInput(k10_CommandToggleInventoryChampion_3, 207, 273, 0, 28, k2_RightMouseButton), /* Atari ST: swapped with 4 previous entries */
+ MouseInput(k100_CommandClickInSpellArea, 233, 319, 42, 73, k1_LeftMouseButton),
+ MouseInput(k111_CommandClickInActionArea, 233, 319, 77, 121, k1_LeftMouseButton),
+ MouseInput(k147_CommandFreezeGame, 0, 1, 198, 199, k1_LeftMouseButton),
+ MouseInput(k0_CommandNone, 0, 0, 0, 0, k0_NoneMouseButton)
+ };
for (int i = 0; i < 7; i++)
- g458_primaryKeyboardInput_interface[i] = primaryKeyboardInputInterface[i];
+ _primaryKeyboardInputInterface[i] = primaryKeyboardInputInterface[i];
for (int i = 0; i < 19; i++)
- g459_secondaryKeyboardInput_movement[i] = secondaryKeyboardInputMovement[i];
+ _secondaryKeyboardInputMovement[i] = secondaryKeyboardInputMovement[i];
for (int i = 0; i < 3 ; i++)
- g460_primaryKeyboardInput_partySleeping[i] = primaryKeyboardInputPartySleeping[i];
+ _primaryKeyboardInputPartySleeping[i] = primaryKeyboardInputPartySleeping[i];
- for (int i = 0; i < 2; i++)
- g461_primaryKeyboardInput_frozenGame[i] = primaryKeyboardInputFrozenGame[i];
+ for (int i = 0; i < 2; i++) {
+ _primaryKeyboardInputFrozenGame[i] = primaryKeyboardInputFrozenGame[i];
+ _primaryMouseInputRestartGame[i] = _primaryMouseInputRestartGame[i];
+ }
+ for (int i = 0; i < 4; i++)
+ _primaryMouseInputEntrance[i] = _primaryMouseInputEntrance[i];
+ for (int i = 0; i < 20; i++)
+ _primaryMouseInputInterface[i] = _primaryMouseInputInterface[i];
}
EventManager::EventManager(DMEngine *vm) : _vm(vm) {
_mousePos = Common::Point(0, 0);
@@ -769,7 +778,7 @@ void EventManager::f380_processCommandQueue() {
_vm->_g318_waitForInputMaxVerticalBlankCount = 0;
_g441_primaryMouseInput = g450_PrimaryMouseInput_PartySleeping;
_g442_secondaryMouseInput = 0;
- _g443_primaryKeyboardInput = g460_primaryKeyboardInput_partySleeping;
+ _g443_primaryKeyboardInput = _primaryKeyboardInputPartySleeping;
_g444_secondaryKeyboardInput = nullptr;
f357_discardAllInput();
}
@@ -815,7 +824,7 @@ void EventManager::f380_processCommandQueue() {
secondaryKeyboardInputBackup = _g444_secondaryKeyboardInput;
_g441_primaryMouseInput = g451_PrimaryMouseInput_FrozenGame;
_g442_secondaryMouseInput = 0;
- _g443_primaryKeyboardInput = g461_primaryKeyboardInput_frozenGame;
+ _g443_primaryKeyboardInput = _primaryKeyboardInputFrozenGame;
_g444_secondaryKeyboardInput = nullptr;
f357_discardAllInput();
return;
diff --git a/engines/dm/eventman.h b/engines/dm/eventman.h
index 9741fd343b..824e535ea6 100644
--- a/engines/dm/eventman.h
+++ b/engines/dm/eventman.h
@@ -176,11 +176,10 @@ public:
MouseInput(CommandType type, uint16 x1, uint16 x2, uint16 y1, uint16 y2, MouseButton mouseButton)
: _commandTypeToIssue(type), _hitbox(x1, x2 + 1, y1, y2 + 1), _button(mouseButton) {}
+ MouseInput()
+ : _commandTypeToIssue(k0_CommandNone), _hitbox(0, 1, 0, 1), _button(k0_NoneMouseButton) {}
}; // @ MOUSE_INPUT
-extern MouseInput g445_PrimaryMouseInput_Entrance[4]; // @ G0445_as_Graphic561_PrimaryMouseInput_Entrance[4]
-extern MouseInput g446_PrimaryMouseInput_RestartGame[2]; // @ G0446_as_Graphic561_PrimaryMouseInput_RestartGame[2]
-extern MouseInput g447_PrimaryMouseInput_Interface[20]; // @ G0447_as_Graphic561_PrimaryMouseInput_Interface[20]
extern MouseInput g448_SecondaryMouseInput_Movement[9]; // @ G0448_as_Graphic561_SecondaryMouseInput_Movement[9]
extern MouseInput g449_SecondaryMouseInput_ChampionInventory[38]; // @ G0449_as_Graphic561_SecondaryMouseInput_ChampionInventory[38]
extern MouseInput g450_PrimaryMouseInput_PartySleeping[3]; // @ G0450_as_Graphic561_PrimaryMouseInput_PartySleeping[3]
@@ -318,10 +317,13 @@ public:
void f6_highlightScreenBox(int16 x1, int16 x2, int16 y1, int16 y2) { warning(false, "STUB METHOD: f6_highlightScreenBox"); } // @ F0006_MAIN_HighlightScreenBox
- KeyboardInput g458_primaryKeyboardInput_interface[7]; // @ G0458_as_Graphic561_PrimaryKeyboardInput_Interface
- KeyboardInput g459_secondaryKeyboardInput_movement[19]; // @ G0459_as_Graphic561_SecondaryKeyboardInput_Movement
- KeyboardInput g460_primaryKeyboardInput_partySleeping[3]; // @ G0460_as_Graphic561_PrimaryKeyboardInput_PartySleeping
- KeyboardInput g461_primaryKeyboardInput_frozenGame[2]; // @ G0461_as_Graphic561_PrimaryKeyboardInput_FrozenGame
+ KeyboardInput _primaryKeyboardInputInterface[7]; // @ G0458_as_Graphic561_PrimaryKeyboardInput_Interface
+ KeyboardInput _secondaryKeyboardInputMovement[19]; // @ G0459_as_Graphic561_SecondaryKeyboardInput_Movement
+ KeyboardInput _primaryKeyboardInputPartySleeping[3]; // @ G0460_as_Graphic561_PrimaryKeyboardInput_PartySleeping
+ KeyboardInput _primaryKeyboardInputFrozenGame[2]; // @ G0461_as_Graphic561_PrimaryKeyboardInput_FrozenGame
+ MouseInput _primaryMouseInputEntrance[4]; // @ G0445_as_Graphic561_PrimaryMouseInput_Entrance[4]
+ MouseInput _primaryMouseInputRestartGame[2]; // @ G0446_as_Graphic561_PrimaryMouseInput_RestartGame[2]
+ MouseInput _primaryMouseInputInterface[20]; // @ G0447_as_Graphic561_PrimaryMouseInput_Interface[20]
void initArrays();
};
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index 3d0415efc2..282501f38d 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -126,7 +126,7 @@ void InventoryMan::f355_toggleInventory(ChampionIndex championIndex) {
_vm->_menuMan->f395_drawMovementArrows();
_vm->_eventMan->f77_hideMouse();
_vm->_eventMan->_g442_secondaryMouseInput = g448_SecondaryMouseInput_Movement;
- _vm->_eventMan->_g444_secondaryKeyboardInput = _vm->_eventMan->g459_secondaryKeyboardInput_movement;
+ _vm->_eventMan->_g444_secondaryKeyboardInput = _vm->_eventMan->_secondaryKeyboardInputMovement;
_vm->_eventMan->f357_discardAllInput();
_vm->_displayMan->f98_drawFloorAndCeiling();
return;
@@ -732,7 +732,7 @@ void InventoryMan::f337_setDungeonViewPalette() {
AL1040_pi_TorchLightPower = L1045_ai_TorchesLightPower;
while (AL1039_ui_Counter--) {
if (*AL1040_pi_TorchLightPower) {
- L1036_i_TotalLightAmount += (g39_LightPowerToLightAmount[*AL1040_pi_TorchLightPower] << L1037_ui_TorchLightAmountMultiplier) >> 6;
+ L1036_i_TotalLightAmount += (_vm->_championMan->_lightPowerToLightAmount[*AL1040_pi_TorchLightPower] << L1037_ui_TorchLightAmountMultiplier) >> 6;
L1037_ui_TorchLightAmountMultiplier = MAX(0, L1037_ui_TorchLightAmountMultiplier - 1);
}
AL1040_pi_TorchLightPower++;
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index c60fb79696..abeadd721e 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -550,12 +550,12 @@ int16 MenuMan::f412_getChampionSpellCastResult(uint16 champIndex) {
AL1267_ui_LightPower = (AL1267_ui_SpellPower >> 2);
AL1267_ui_LightPower++;
T0412019:
- _vm->_championMan->_g407_party._magicalLightAmount += g39_LightPowerToLightAmount[AL1267_ui_LightPower];
+ _vm->_championMan->_g407_party._magicalLightAmount += _vm->_championMan->_lightPowerToLightAmount[AL1267_ui_LightPower];
f404_createEvent70_light(-AL1267_ui_LightPower, AL1269_ui_Ticks);
break;
case k1_spellType_otherDarkness:
AL1267_ui_LightPower = (AL1267_ui_SpellPower >> 2);
- _vm->_championMan->_g407_party._magicalLightAmount -= g39_LightPowerToLightAmount[AL1267_ui_LightPower];
+ _vm->_championMan->_g407_party._magicalLightAmount -= _vm->_championMan->_lightPowerToLightAmount[AL1267_ui_LightPower];
f404_createEvent70_light(AL1267_ui_LightPower, 98);
break;
case k2_spellType_otherThievesEye:
@@ -1295,7 +1295,7 @@ T0407071:
_vm->_championMan->_g407_party._freezeLifeTicks = MIN(200, _vm->_championMan->_g407_party._freezeLifeTicks + AL1246_i_Ticks);
break;
case k38_ChampionActionLight:
- _vm->_championMan->_g407_party._magicalLightAmount += g39_LightPowerToLightAmount[2];
+ _vm->_championMan->_g407_party._magicalLightAmount += _vm->_championMan->_lightPowerToLightAmount[2];
f404_createEvent70_light(-2, 2500);
T0407076:
f405_decrementCharges(L1247_ps_Champion);
diff --git a/engines/dm/timeline.cpp b/engines/dm/timeline.cpp
index 3d88e43383..e23e878a7c 100644
--- a/engines/dm/timeline.cpp
+++ b/engines/dm/timeline.cpp
@@ -1017,7 +1017,7 @@ void Timeline::f257_timelineProcessEvent70_light(TimelineEvent* event) {
AL0674_i_LightPower = -AL0674_i_LightPower;
}
L0673_i_WeakerLightPower = AL0674_i_LightPower - 1;
- AL0674_i_LightAmount = g39_LightPowerToLightAmount[AL0674_i_LightPower] - g39_LightPowerToLightAmount[L0673_i_WeakerLightPower];
+ AL0674_i_LightAmount = _vm->_championMan->_lightPowerToLightAmount[AL0674_i_LightPower] - _vm->_championMan->_lightPowerToLightAmount[L0673_i_WeakerLightPower];
if (L0675_B_NegativeLightPower) {
AL0674_i_LightAmount = -AL0674_i_LightAmount;
L0673_i_WeakerLightPower = -L0673_i_WeakerLightPower;