diff options
author | Strangerke | 2016-08-12 07:44:06 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 6ea782eeb57a5164e3bfdf4d9ff72e4bfa385f82 (patch) | |
tree | 7e0f054b8e075cf7e02ef4aebc5e32dfc40ae1e0 /engines | |
parent | 94e0dbc3fe806ee1391fa1d5d4f544e76a271fd2 (diff) | |
download | scummvm-rg350-6ea782eeb57a5164e3bfdf4d9ff72e4bfa385f82.tar.gz scummvm-rg350-6ea782eeb57a5164e3bfdf4d9ff72e4bfa385f82.tar.bz2 scummvm-rg350-6ea782eeb57a5164e3bfdf4d9ff72e4bfa385f82.zip |
DM: Start moving globals to DisplayMan
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dm/gfx.cpp | 49 | ||||
-rw-r--r-- | engines/dm/gfx.h | 7 |
2 files changed, 36 insertions, 20 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 564e41369e..dd4d349948 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -41,10 +41,6 @@ namespace DM { -Box g106_BoxThievesEye_ViewPortVisibleArea(64, 159, 19, 113); // @ G0106_s_Graphic558_Box_ThievesEye_ViewportVisibleArea -byte g198_PalChangesDoorButtonAndWallOrn_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 g199_PalChangesDoorButtonAndWallOrn_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 g197_doorButtonCoordSet[1] = {0}; // @ G0197_auc_Graphic558_DoorButtonCoordinateSet uint16 g208_doorButtonCoordSets[1][4][6] = { // @ G0208_aaauc_Graphic558_DoorButtonCoordinateSets @@ -655,9 +651,9 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) { _g101_currMapWallOrnInfo[j][i] = 0; _g102_currMapFloorOrnInfo[j][i] = 0; } - for (int j = 0; j < 17; j++) { + + for (int j = 0; j < 17; j++) _g103_currMapDoorOrnInfo[j][i] = 0; - } } for (int i = 0; i < 16; i++) { @@ -707,20 +703,6 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) { _g322_paletteSwitchingEnabled = false; _g304_dungeonViewPaletteIndex = 0; - g186_doorFrame_D1C = new DoorFrames( // @ G0186_s_Graphic558_Frames_Door_D1C - /* { X1, X2, Y1, Y2, ByteWidth, Height, X, Y } */ - Frame(64, 159, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */ - Frame(64, 159, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */ - Frame(64, 159, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */ - Frame(64, 159, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */ - Frame(64, 75, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */ - Frame(64, 87, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */ - Frame(64, 99, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */ - Frame(148, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */ - Frame(136, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */ - Frame(124, 159, 17, 102, 48, 88, 48, 0) /* Right Horizontal Closed three fourth */ - ); - for (uint16 i = 0; i < 16; ++i) { _g347_paletteTopAndBottomScreen[i] = 0; _g346_paletteMiddleScreen[i] = 0; @@ -730,6 +712,33 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) { _g345_aui_BlankBuffer[i] = 0; _gK17_paletteFadeFrom = nullptr; + + initConstants(); +} + +void DisplayMan::initConstants() { + const byte palChangesDoorButtonAndWallOrn_D3[16] = {0, 0, 120, 30, 40, 30, 0, 60, 30, 90, 100, 110, 0, 10, 0, 20}; // @ G0198_auc_Graphic558_PaletteChanges_DoorButtonAndWallOrnament_D3 + const byte palChangesDoorButtonAndWallOrn_D2[16] = {0, 120, 10, 30, 40, 30, 60, 70, 50, 90, 100, 110, 0, 20, 140, 130}; // @ G0199_auc_Graphic558_PaletteChanges_DoorButtonAndWallOrnament_D2 + + for (int i = 0; i < 16; i++) { + g198_PalChangesDoorButtonAndWallOrn_D3[i] = palChangesDoorButtonAndWallOrn_D3[i]; + g199_PalChangesDoorButtonAndWallOrn_D2[i] = palChangesDoorButtonAndWallOrn_D2[i]; + } + + g186_doorFrame_D1C = new DoorFrames( // @ G0186_s_Graphic558_Frames_Door_D1C + Frame(64, 159, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */ + Frame(64, 159, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */ + Frame(64, 159, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */ + Frame(64, 159, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */ + Frame(64, 75, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */ + Frame(64, 87, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */ + Frame(64, 99, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */ + Frame(148, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */ + Frame(136, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */ + Frame(124, 159, 17, 102, 48, 88, 48, 0) /* Right Horizontal Closed three fourth */ + ); + + g106_BoxThievesEye_ViewPortVisibleArea = Box(64, 159, 19, 113); // @ G0106_s_Graphic558_Box_ThievesEye_ViewportVisibleArea } DisplayMan::~DisplayMan() { diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index e44709e628..c068b39d77 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -599,6 +599,10 @@ class DisplayMan { public: byte *_g700_bitmapWallSet_Wall_D1LCR; // @ G0700_puc_Bitmap_WallSet_Wall_D1LCR private: + Box g106_BoxThievesEye_ViewPortVisibleArea; // @ G0106_s_Graphic558_Box_ThievesEye_ViewportVisibleArea + byte g198_PalChangesDoorButtonAndWallOrn_D3[16]; // @ G0198_auc_Graphic558_PaletteChanges_DoorButtonAndWallOrnament_D3 + byte g199_PalChangesDoorButtonAndWallOrn_D2[16]; // @ G0199_auc_Graphic558_PaletteChanges_DoorButtonAndWallOrnament_D2 + byte *_g701_bitmapWallSet_Wall_D0L; // @ G0701_puc_Bitmap_WallSet_Wall_D0L byte *_g702_bitmapWallSet_Wall_D0R; // @ G0702_puc_Bitmap_WallSet_Wall_D0R byte *_g703_bitmapWallSet_DoorFrameTop_D2LCR; // @ G0703_puc_Bitmap_WallSet_DoorFrameTop_D2LCR @@ -753,6 +757,9 @@ public: void f436_STARTEND_FadeToPalette(uint16 *P0849_pui_Palette); // @ F0436_STARTEND_FadeToPalette void f508_buildPaletteChangeCopperList(uint16* middleScreen, uint16* topAndBottom); // @ F0508_AMIGA_BuildPaletteChangeCopperList void f136_shadeScreenBox(Box* box, Color color) { warning(false, "STUB METHOD: f136_shadeScreenBox"); } // @ F0136_VIDEO_ShadeScreenBox + +private: + void initConstants(); }; } |