diff options
author | WinterGrascph | 2016-05-22 16:35:29 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 082e3fb37ccd97f9d8a782f4fb47adf9a0661ecb (patch) | |
tree | 9ea9be395b366d6d89ca2cef32d2d68ffe8aa3e9 /engines | |
parent | 3ada56f6b1e8f2b65b6a77dbd3ff4d91bba705a0 (diff) | |
download | scummvm-rg350-082e3fb37ccd97f9d8a782f4fb47adf9a0661ecb.tar.gz scummvm-rg350-082e3fb37ccd97f9d8a782f4fb47adf9a0661ecb.tar.bz2 scummvm-rg350-082e3fb37ccd97f9d8a782f4fb47adf9a0661ecb.zip |
DM: Add global variable dependencies for isDrawnWallOrnAnAlcove
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dm/dungeonman.h | 4 | ||||
-rw-r--r-- | engines/dm/gfx.cpp | 54 | ||||
-rw-r--r-- | engines/dm/gfx.h | 21 |
3 files changed, 76 insertions, 3 deletions
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h index 60a0bb6881..dbcb6fbcd8 100644 --- a/engines/dm/dungeonman.h +++ b/engines/dm/dungeonman.h @@ -447,6 +447,10 @@ public: Messages _messages; // @ NONE; int16 _currMapInscriptionWallOrnIndex; // @ G0265_i_CurrentMapInscriptionWallOrnamentIndex + byte _dungeonViewClickableBoxes[6][4]; // G0291_aauc_DungeonViewClickableBoxes + bool _isFacingAlcove; // @ G0286_B_FacingAlcove + bool _isFacingViAltar; // @ G0287_B_FacingViAltar + bool _isFacingFountain; // @ G0288_B_FacingFountain }; } diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index c88ca0068a..0840da6b02 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -121,6 +121,7 @@ enum ViewSquare { kViewSquare_D0C_Explosion = 12 // @ C12_VIEW_SQUARE_D0C_EXPLOSION }; + Frame gCeilingFrame(0, 223, 0, 28, 112, 29, 0, 0); // @ K0012_s_Frame_Ceiling Frame gFloorFrame(0, 223, 66, 135, 112, 70, 0, 0); // @ K0013_s_Frame_Floor @@ -607,8 +608,9 @@ enum GraphicIndice { -extern Viewport gDefultViewPort = {0, 0}; -extern Viewport gDungeonViewport = {0, 64}; // TODO: I guessed the numbers +Viewport gDefultViewPort = {0, 0}; +// TODO: I guessed the numbers +Viewport gDungeonViewport = {0, 64}; // @ G0296_puc_Bitmap_Viewport byte gPalChangesNoChanges[16] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150}; // @ G0017_auc_Graphic562_PaletteChanges_NoChanges @@ -1004,6 +1006,9 @@ void DisplayMan::drawSquareD1C(direction dir, int16 posX, int16 posY) { drawFloorPitOrStairsBitmap(kStairsNativeIndex_Down_Front_D1C, gStairFrames[kFrameStairsDownFront_D1C]); break; case kWallElemType: + _vm->_dungeonMan->_isFacingAlcove = false; + _vm->_dungeonMan->_isFacingViAltar = false; + _vm->_dungeonMan->_isFacingFountain = false; drawWallSetBitmapWithoutTransparency(_wallSetBitMaps[kWall_D1LCR], gFrameWalls[kViewSquare_D1C]); break; } @@ -1061,6 +1066,11 @@ void DisplayMan::drawDungeon(direction dir, int16 posX, int16 posY) { byte *tmpBitmap = new byte[305 * 111]; clearBitmap(tmpBitmap, 305, 111, kColorBlack); + memset(_vm->_dungeonMan->_dungeonViewClickableBoxes, 0, sizeof(_vm->_dungeonMan->_dungeonViewClickableBoxes)); + for (uint16 i = 0; i < 6; ++i) { + _vm->_dungeonMan->_dungeonViewClickableBoxes[i][0] = 255; + } + if (flippedFloorCeiling) { uint16 w = gFloorFrame.srcWidth, h = gFloorFrame.srcHeight; blitToBitmap(_floorBitmap, w, h, tmpBitmap, w); @@ -1215,6 +1225,8 @@ void DisplayMan::loadCurrentMapGraphics() { uint16 fountainCount = 0; Map &currMap = *_vm->_dungeonMan->_currMap.map; + _currMapViAltarIndex = -1; + for (uint16 i = 0; i < currMap.wallOrnCount; ++i) { uint16 ornIndice = _currMapWallOrnIndices[i]; uint16 nativeIndice = kFirstWallOrn + ornIndice * 2; @@ -1284,3 +1296,41 @@ void DisplayMan::drawFloorPitOrStairsBitmapFlippedHorizontally(StairIndex relInd blitToScreen(_tmpBitmap, f.srcWidth, f.srcX, f.srcY, f.destFromX, f.destToX, f.destFromY, f.destToY, kColorFlesh, gDungeonViewport); } } + + +Box gBoxWallPatchBehindInscription = {110, 113, 37, 63}; // @ G0202_ac_Graphic558_Box_WallPatchBehindInscription +byte gInscriptionLineY[4] = { // @ G0203_auc_Graphic558_InscriptionLineY + 48, /* 1 Line */ + 59, /* 2 lines */ + 75, /* 3 lines */ + 86}; /* 4 lines */ +byte gWallOrnDerivedBitmapIndexIncrement[12] = { // @ G0190_auc_Graphic558_WallOrnamentDerivedBitmapIndexIncrement + 0, /* D3L Right */ + 0, /* D3R Left */ + 1, /* D3L Front */ + 1, /* D3C Front */ + 1, /* D3R Front */ + 2, /* D2L Right */ + 2, /* D2R Left */ + 3, /* D2L Front */ + 3, /* D2C Front */ + 3, /* D2R Front */ + 4, /* D1L Right */ + 4}; /* D1R Left */ + +byte gPalChangesDoorButtonAndWallOrn_D3[16] = {0, 0, 120, 30, 40, 30, 0, 60, 30, 90, 100, 110, 0, 10, 0, 20}; // @ G0198_auc_Graphic558_PaletteChanges_DoorButtonAndWallOrnament_D3 +byte gPalChangesDoorButtonAndWallOrn_D2[16] = {0, 120, 10, 30, 40, 30, 60, 70, 50, 90, 100, 110, 0, 20, 140, 130}; // @ G0199_auc_Graphic558_PaletteChanges_DoorButtonAndWallOrnament_D2 + +byte gUnreadableInscriptionBoxY2[15] = { // @ G0204_auc_Graphic558_UnreadableInscriptionBoxY2 + /* { Y for 1 line, Y for 2 lines, Y for 3 lines } */ + 45, 48, 53, /* D3L Right, D3R Left */ + 43, 49, 56, /* D3L Front, D3C Front, D3R Front */ + 42, 49, 56, /* D2L Right, D2R Left */ + 46, 53, 63, /* D2L Front, D2C Front, D2R Front */ + 46, 57, 68}; /* D1L Right, D1R Left */ + +Box gBoxChampionPortraitOnWall = {96, 127, 35, 63}; // G0109_s_Graphic558_Box_ChampionPortraitOnWall + +bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex) { + return false; // dummy +} diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index bc7296e9c2..bbd9eb48f9 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -49,6 +49,23 @@ enum StairIndex { kStairsNativeIndex_Side_D0L = 17 // @ G0692_i_StairsNativeBitmapIndex_Side_D0L }; +enum ViewWall { + kViewWall_D3L_RIGHT = 0, // @ C00_VIEW_WALL_D3L_RIGHT + kViewWall_D3R_LEFT = 1, // @ C01_VIEW_WALL_D3R_LEFT + kViewWall_D3L_FRONT = 2, // @ C02_VIEW_WALL_D3L_FRONT + kViewWall_D3C_FRONT = 3, // @ C03_VIEW_WALL_D3C_FRONT + kViewWall_D3R_FRONT = 4, // @ C04_VIEW_WALL_D3R_FRONT + kViewWall_D2L_RIGHT = 5, // @ C05_VIEW_WALL_D2L_RIGHT + kViewWall_D2R_LEFT = 6, // @ C06_VIEW_WALL_D2R_LEFT + kViewWall_D2L_FRONT = 7, // @ C07_VIEW_WALL_D2L_FRONT + kViewWall_D2C_FRONT = 8, // @ C08_VIEW_WALL_D2C_FRONT + kViewWall_D2R_FRONT = 9, // @ C09_VIEW_WALL_D2R_FRONT + kViewWall_D1L_RIGHT = 10, // @ C10_VIEW_WALL_D1L_RIGHT + kViewWall_D1R_LEFT = 11, // @ C11_VIEW_WALL_D1R_LEFT + kViewWall_D1C_FRONT = 12 // @ C12_VIEW_WALL_D1C_FRONT +}; + + enum Color { kColorNoTransparency = 255, @@ -163,6 +180,8 @@ class DisplayMan { void applyCreatureReplColors(int replacedColor, int replacementColor); // @ F0093_DUNGEONVIEW_ApplyCreatureReplacementColors + bool isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex); // @ F0107_DUNGEONVIEW_IsDrawnWallOrnamentAnAlcove_CPSF + // some methods use this for a stratchpad, don't make assumptions about content between function calls byte *_tmpBitmap = NULL; public: @@ -201,7 +220,7 @@ public: int16 _championPortraitOrdinal = 0; // @ G0289_i_DungeonView_ChampionPortraitOrdinal int16 _currMapAlcoveOrnIndices[kAlcoveOrnCount] = {0}; // @ G0267_ai_CurrentMapAlcoveOrnamentIndices int16 _currMapFountainOrnIndices[kFountainOrnCount] = {0}; // @ G0268_ai_CurrentMapFountainOrnamentIndices - int16 _currMapWallOrnInfo[16][2] = {0}; // @ G0101_aai_CurrentMapWallOrnamentsInf + int16 _currMapWallOrnInfo[16][2] = {0}; // @ G0101_aai_CurrentMapWallOrnamentsInfo int16 _currMapFloorOrnInfo[16][2] = {0}; // @ G0102_aai_CurrentMapFloorOrnamentsInfo int16 _currMapDoorOrnInfo[17][2] = {0}; // @ G0103_aai_CurrentMapDoorOrnamentsInfo byte *_currMapAllowedCreatureTypes = NULL; // @ G0264_puc_CurrentMapAllowedCreatureTypes |