diff options
author | Bendegúz Nagy | 2016-08-19 18:16:23 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 6aabe84bf6d117a9e9523eaf664cfb2fd2e04fc1 (patch) | |
tree | daabce5607e8a7cea126bb2a62180169c4033949 /engines | |
parent | f9d76556c24a3ed68b379277cf60928ef32df7aa (diff) | |
download | scummvm-rg350-6aabe84bf6d117a9e9523eaf664cfb2fd2e04fc1.tar.gz scummvm-rg350-6aabe84bf6d117a9e9523eaf664cfb2fd2e04fc1.tar.bz2 scummvm-rg350-6aabe84bf6d117a9e9523eaf664cfb2fd2e04fc1.zip |
DM: Complete f437_STARTEND_drawTittle
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dm/dm.cpp | 82 | ||||
-rw-r--r-- | engines/dm/dm.h | 2 | ||||
-rw-r--r-- | engines/dm/gfx.h | 2 |
3 files changed, 82 insertions, 4 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 2003ace00f..f71627bfa7 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -286,7 +286,9 @@ void DMEngine::f463_initializeGame() { _sound->f503_loadSounds(); // @ F0506_AMIGA_AllocateData - f437_STARTEND_drawTittle(); + if (!ConfMan.hasKey("save_slot")) // skip drawing title if loading from launcher + f437_STARTEND_drawTittle(); + _textMan->f54_textInitialize(); _objectMan->loadObjectNames(); _eventMan->initMouse(); @@ -324,7 +326,6 @@ void DMEngine::f463_initializeGame() { void DMEngine::f448_initMemoryManager() { static uint16 palSwoosh[16] = {0x000, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0xFFF, 0x000, 0xFFF, 0xAAA, 0xFFF, 0xAAA, 0x444, 0xFF0, 0xFF0}; // @ K0057_aui_Palette_Swoosh - warning(false, "STUB METHOD: f448_initMemoryManager"); _displayMan->f508_buildPaletteChangeCopperList(palSwoosh, palSwoosh); for (uint16 i = 0; i < 16; ++i) { _displayMan->_g347_paletteTopAndBottomScreen[i] = _displayMan->_palDungeonView[0][i]; @@ -864,6 +865,83 @@ void DMEngine::f438_STARTEND_OpenEntranceDoors() { _savedScreenForOpenEntranceDoors = nullptr; } +void DMEngine::f437_STARTEND_drawTittle() { + static Box G0003_s_Graphic562_Box_Title_StrikesBack_Destination(0, 319, 118, 174); + static Box G0004_s_Graphic562_Box_Title_StrikesBack_Source(0, 319, 0, 56); + static Box G0005_s_Graphic562_Box_Title_Presents(0, 319, 90, 105); + static Box K0078_s_Box_Title_Dungeon_Chaos(0, 319, 0, 79); + + int16 L1380_i_Counter; + uint16 L1381_ui_DestinationHeight; + int16 L1382_i_DestinationPixelWidth; + byte *L1383_l_Bitmap_TitleSteps; + byte* L1384_puc_Bitmap_Title; + byte* L1387_apuc_Bitmap_ShrinkedTitle[20]; /* Only the first 18 entries are actually used */ + byte* L1389_puc_Bitmap_Master_StrikesBack; + byte* L1761_puc_Bitmap_Dungeon_Chaos; /* Unreferenced on Atari ST */ + int16 L1391_aai_Coordinates[20][5]; /* Only the first 18 entries are actually used */ + uint16 L1392_aui_Palette[16]; + + + _displayMan->_g578_useByteBoxCoordinates = false; + + byte *alloactedMem = L1383_l_Bitmap_TitleSteps = new byte[145600 * 2]; + + L1384_puc_Bitmap_Title = L1383_l_Bitmap_TitleSteps; + _displayMan->f466_loadIntoBitmap(k1_titleGraphicsIndice, L1383_l_Bitmap_TitleSteps); + + L1383_l_Bitmap_TitleSteps += 320 * 200; + for (uint16 i = 0; i < 16; ++i) + L1392_aui_Palette[i] = D01_RGB_DARK_BLUE; + + _displayMan->f436_STARTEND_FadeToPalette(L1392_aui_Palette); + _displayMan->fillScreen(k0_ColorBlack); + _displayMan->f132_blitToBitmap(L1384_puc_Bitmap_Title, _displayMan->_g348_bitmapScreen, G0005_s_Graphic562_Box_Title_Presents, 0, 137, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, k200_heightScreen, k200_heightScreen); + L1392_aui_Palette[15] = D09_RGB_WHITE; + _displayMan->f436_STARTEND_FadeToPalette(L1392_aui_Palette); + _displayMan->f132_blitToBitmap(L1384_puc_Bitmap_Title, L1389_puc_Bitmap_Master_StrikesBack = L1383_l_Bitmap_TitleSteps, G0004_s_Graphic562_Box_Title_StrikesBack_Source, 0, 80, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, 200, 57); + L1383_l_Bitmap_TitleSteps += 320 * 57; + _displayMan->f132_blitToBitmap(L1384_puc_Bitmap_Title, L1761_puc_Bitmap_Dungeon_Chaos = L1383_l_Bitmap_TitleSteps, K0078_s_Box_Title_Dungeon_Chaos, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, kM1_ColorNoTransparency, 200, 80); + L1383_l_Bitmap_TitleSteps += 320 * 80; + L1384_puc_Bitmap_Title = L1761_puc_Bitmap_Dungeon_Chaos; + L1381_ui_DestinationHeight = 12; + L1382_i_DestinationPixelWidth = 48; + for (L1380_i_Counter = 0; L1380_i_Counter < 18; L1380_i_Counter++) { + L1387_apuc_Bitmap_ShrinkedTitle[L1380_i_Counter] = L1383_l_Bitmap_TitleSteps; + _displayMan->f129_blitToBitmapShrinkWithPalChange(L1384_puc_Bitmap_Title, L1383_l_Bitmap_TitleSteps, 320, 80, L1382_i_DestinationPixelWidth, L1381_ui_DestinationHeight, _displayMan->_palChangesNoChanges); + L1391_aai_Coordinates[L1380_i_Counter][1] = (L1391_aai_Coordinates[L1380_i_Counter][0] = (320 - L1382_i_DestinationPixelWidth) / 2) + L1382_i_DestinationPixelWidth - 1; + L1391_aai_Coordinates[L1380_i_Counter][3] = (L1391_aai_Coordinates[L1380_i_Counter][2] = ((int)(160 - L1381_ui_DestinationHeight)) / 2) + L1381_ui_DestinationHeight - 1; + L1383_l_Bitmap_TitleSteps += (L1391_aai_Coordinates[L1380_i_Counter][4] = ((L1382_i_DestinationPixelWidth + 15) / 16) * 8) * L1381_ui_DestinationHeight; + L1381_ui_DestinationHeight += 4; + L1382_i_DestinationPixelWidth += 16; + } + L1392_aui_Palette[15] = D01_RGB_DARK_BLUE; + _displayMan->f436_STARTEND_FadeToPalette(L1392_aui_Palette); + _displayMan->fillScreen(k0_ColorBlack); + L1392_aui_Palette[3] = D05_RGB_DARK_GOLD; + L1392_aui_Palette[4] = D02_RGB_LIGHT_BROWN; + L1392_aui_Palette[5] = D06_RGB_GOLD; + L1392_aui_Palette[6] = D04_RGB_LIGHTER_BROWN; + L1392_aui_Palette[8] = D08_RGB_YELLOW; + L1392_aui_Palette[15] = D07_RGB_RED; + L1392_aui_Palette[10] = D01_RGB_DARK_BLUE; + L1392_aui_Palette[12] = D01_RGB_DARK_BLUE; + _displayMan->f436_STARTEND_FadeToPalette(L1392_aui_Palette); + f22_delay(1); + for (L1380_i_Counter = 0; L1380_i_Counter < 18; L1380_i_Counter++) { + f22_delay(2); + Box box(L1391_aai_Coordinates[L1380_i_Counter]); + _displayMan->f132_blitToBitmap(L1387_apuc_Bitmap_ShrinkedTitle[L1380_i_Counter], _displayMan->_g348_bitmapScreen, box, 0, 0, L1391_aai_Coordinates[L1380_i_Counter][4], k160_byteWidthScreen, kM1_ColorNoTransparency, L1391_aai_Coordinates[L1380_i_Counter][3] - L1391_aai_Coordinates[L1380_i_Counter][2] + 1, k200_heightScreen); + } + f22_delay(25L); + _displayMan->f132_blitToBitmap(L1389_puc_Bitmap_Master_StrikesBack, _displayMan->_g348_bitmapScreen, G0003_s_Graphic562_Box_Title_StrikesBack_Destination, 0, 0, k160_byteWidthScreen, k160_byteWidthScreen, k0_ColorBlack, 57, k200_heightScreen); + L1392_aui_Palette[10] = D00_RGB_BLACK; + L1392_aui_Palette[12] = D07_RGB_RED; + _displayMan->f436_STARTEND_FadeToPalette(L1392_aui_Palette); + delete[] alloactedMem; + f22_delay(75L); +} + void DMEngine::f442_SARTEND_processCommand202_entranceDrawCredits() { _eventMan->f78_showMouse(); _displayMan->f436_STARTEND_FadeToPalette(_displayMan->_g345_aui_BlankBuffer); diff --git a/engines/dm/dm.h b/engines/dm/dm.h index d30727b071..d90943b764 100644 --- a/engines/dm/dm.h +++ b/engines/dm/dm.h @@ -234,7 +234,7 @@ public: void f444_endGame(bool doNotDrawCreditsOnly); // @ F0444_STARTEND_Endgame void f438_STARTEND_OpenEntranceDoors(); // @ F0438_STARTEND_OpenEntranceDoors - void f437_STARTEND_drawTittle() { warning(false, "STUB METHOD: f437_STARTEND_drawTittle"); }// @ F0437_STARTEND_DrawTitle + void f437_STARTEND_drawTittle(); // @ F0437_STARTEND_DrawTitle void f442_SARTEND_processCommand202_entranceDrawCredits(); void f446_STARTEND_fuseSequnce(); // @ F0446_STARTEND_FuseSequence void f445_STARTEND_fuseSequenceUpdate(); // @ F0445_STARTEND_FuseSequenceUpdate diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index d089d743fc..496abd4bbd 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -241,6 +241,7 @@ enum ViewCell { enum GraphicIndice { k0_dialogBoxGraphicIndice = 0, // @ C000_GRAPHIC_DIALOG_BOX + k1_titleGraphicsIndice = 1, // @ C001_GRAPHIC_TITLE k2_entranceLeftDoorGraphicIndice = 2, // @ C002_GRAPHIC_ENTRANCE_LEFT_DOOR k3_entranceRightDoorGraphicIndice = 3, // @ C003_GRAPHIC_ENTRANCE_RIGHT_DOOR k4_entranceGraphicIndice = 4, // @ C004_GRAPHIC_ENTRANCE @@ -317,7 +318,6 @@ enum GraphicIndice { k557_FontGraphicIndice = 557 // @ C557_GRAPHIC_FONT }; -extern byte g17_PalChangesNoChanges[16]; // in all cases, where a function takes a Box, it expects it to contain inclusive boundaries class Box { |