Skip to content

Commit

Permalink
DM: Add some missing calls to already implemented methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 6bbd681 commit ac9f4d7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
9 changes: 9 additions & 0 deletions engines/dm/TODOs/todo.txt
Expand Up @@ -34,6 +34,15 @@ Finish stuff:
f380_processCommandQueue
Missing main loop methods
Save file f433_processCommand140_saveGame fails silently
Sounds
F0438_STARTEND_OpenEntranceDoors
F0442_STARTEND_ProcessCommand202_EntranceDrawCredits
G0335_ui_SelectedDialogChoice
Add dialogs
Add failcheck to saveing and loading
F0444_STARTEND_Endgame
F0385_MENUS_DrawActionDamage

Refactoring
Places implementing mini mainloop and where input doesn't really matter should call discardInput instead of processInput
While reanming a champion, the mouse lags
2 changes: 1 addition & 1 deletion engines/dm/eventman.cpp
Expand Up @@ -1209,7 +1209,7 @@ void EventManager::f378_commandProcess81ClickInPanel(int16 x, int16 y) {
return;
commandType = f358_getCommandTypeFromMouseInput(g456_MouseInput_PanelChest, Common::Point(x, y), k1_LeftMouseButton);
if (commandType != k0_CommandNone)
warning(false, "MISSING CODE: F0302_CHAMPION_ProcessCommands28To65_ClickOnSlotBox");
_vm->_championMan->f302_processCommands28to65_clickOnSlotBox(commandType - k20_CommandClickOnSlotBoxChampion_0_StatusBoxReadyHand);
break;
case k5_PanelContentResurrectReincarnate:
if (!champMan._g415_leaderEmptyHanded)
Expand Down
4 changes: 0 additions & 4 deletions engines/dm/gfx.cpp
Expand Up @@ -1252,7 +1252,6 @@ uint16 DisplayMan::getPixelHeight(uint16 index) {
return READ_BE_UINT16(data + 2);
}

// Note: has been screened for missing code
void DisplayMan::f99_copyBitmapAndFlipHorizontal(byte* srcBitmap, byte* destBitmap, uint16 byteWidth, uint16 height) {
memmove(destBitmap, srcBitmap, byteWidth * 2 * height * sizeof(byte));
f130_flipBitmapHorizontal(destBitmap, byteWidth, height);
Expand Down Expand Up @@ -1462,7 +1461,6 @@ void DisplayMan::f100_drawWallSetBitmap(byte *bitmap, Frame &f) {
}


// NOTE: has been screened for missing code
void DisplayMan::f116_drawSquareD3L(Direction dir, int16 posX, int16 posY) {
static DoorFrames g179_doorFrame_D3L = DoorFrames( // @ G0179_s_Graphic558_Frames_Door_D3L
/* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */
Expand Down Expand Up @@ -2272,7 +2270,6 @@ void DisplayMan::f134_fillBitmap(byte *bitmap, Color color, uint16 byteWidth, ui
memset(bitmap, color, sizeof(byte) * width * height);
}

// NOTE: has been screened for missing code
void DisplayMan::f94_loadFloorSet(FloorSet set) {
if (_g230_currentFloorSet != set) {
_g230_currentFloorSet = set;
Expand All @@ -2282,7 +2279,6 @@ void DisplayMan::f94_loadFloorSet(FloorSet set) {
}
}

// Note: has been screened for missing code
void DisplayMan::f95_loadWallSet(WallSet set) {
if ((_g231_currentWallSet != set) || _vm->_g523_restartGameRequest) {
_g231_currentWallSet = set;
Expand Down
6 changes: 3 additions & 3 deletions engines/dm/menus.cpp
Expand Up @@ -187,7 +187,7 @@ void MenuMan::f456_drawDisabledMenu() {
}
warning(false, "MISSING CODE: F0136_VIDEO_ShadeScreenBox");
warning(false, "MISSING CODE: F0136_VIDEO_ShadeScreenBox");
warning(false, "MISSING CODE: F0067_MOUSE_SetPointerToNormal");
_vm->_eventMan->f67_setMousePointerToNormal(k0_pointerArrow);
}
}

Expand Down Expand Up @@ -304,7 +304,7 @@ void MenuMan::f393_drawSpellAreaControls(ChampionIndex champIndex) {
int16 champCurrHealth[4];
for (uint16 i = 0; i < 4; ++i)
champCurrHealth[i] = champMan._gK71_champions[i]._currHealth;
warning(false, "MISSING CODE: F0077_MOUSE_HidePointer_CPSE");
_vm->_eventMan->f77_hideMouse();
dispMan.D24_fillScreenBox(g504_BoxSpellAreaControls, k0_ColorBlack);
int16 champCount = champMan._g305_partyChampionCount;
switch (champIndex) {
Expand Down Expand Up @@ -360,7 +360,7 @@ void MenuMan::f393_drawSpellAreaControls(ChampionIndex champIndex) {
textMan.f53_printToLogicalScreen(277, 48, k0_ColorBlack, k4_ColorCyan, champ._name);
break;
}
warning(false, "MISSING CODE: F0078_MOUSE_ShowPointer");
_vm->_eventMan->f78_showMouse();
}

#define k2_SpellAreaAvailableSymbols 2 // @ C2_SPELL_AREA_AVAILABLE_SYMBOLS
Expand Down

0 comments on commit ac9f4d7

Please sign in to comment.