From 583a89be627f300488ea12d8c96c699ff2c684f4 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 15 Jun 2009 20:52:09 +0000 Subject: LOL: - started on the ingame menu code (death menu, load menu and main menu) - fixed regression in kyra gui code (broken menu highlighting) - fixed minor bug in animation code svn-id: r41557 --- engines/kyra/staticres.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 3f41768c3c..4a9e3bdeac 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2011,6 +2011,42 @@ void LoLEngine::initStaticResource() { #undef cb } +void GUI_LoL::initStaticData() { + GUI_V2_BUTTON(_scrollUpButton, 20, 96, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0); + GUI_V2_BUTTON(_scrollDownButton, 21, 98, 0, 1, 1, 1, 0x4487, 0, 0, 0, 25, 16, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0); + + for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) + GUI_V2_BUTTON(_menuButtons[i], i, 0, 0, 0, 0, 0, 0x4487, 0, 0, 0, 0, 0, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0); + + GUI_LOL_MENU(_mainMenu, 9, 0x4000, 0, 7, -1, -1, -1, -1); + GUI_LOL_MENU_ITEM(_mainMenu.item[0], 0x4001, 16, 23, 176, 15, 0, 0); + GUI_LOL_MENU_ITEM(_mainMenu.item[1], 0x4002, 16, 40, 176, 15, 0, 0); + GUI_LOL_MENU_ITEM(_mainMenu.item[2], 0x4003, 16, 57, 176, 15, 0, 0); + GUI_LOL_MENU_ITEM(_mainMenu.item[3], 0x4004, 16, 74, 176, 15, 0, 0); + GUI_LOL_MENU_ITEM(_mainMenu.item[4], 0x42D9, 16, 91, 176, 15, 0, 0); + GUI_LOL_MENU_ITEM(_mainMenu.item[5], 0x4006, 16, 108, 176, 15, 0, 0); + GUI_LOL_MENU_ITEM(_mainMenu.item[6], 0x4005, 88, 127, 104, 15, 0, 110); + Button::Callback mainMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedMainMenu); + for (int i = 0; i < 7; ++i) + _mainMenu.item[i].callback = mainMenuFunctor; + + GUI_LOL_MENU(_loadMenu, 10, 0x400e, 1, 5, 128, 20, 128, 118); + GUI_LOL_MENU_ITEM(_loadMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); + Button::Callback loadMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedLoadMenu); + for (int i = 0; i < 5; ++i) + _loadMenu.item[i].callback = loadMenuFunctor; + + GUI_LOL_MENU(_deathMenu, 11, 0x4013, 0, 2, -1, -1, -1, -1); + GUI_LOL_MENU_ITEM(_deathMenu.item[0], 0x4006, 8, 30, 104, 15, 0, 0); + GUI_LOL_MENU_ITEM(_deathMenu.item[1], 0x4001, 176, 30, 104, 15, 0, 0); + Button::Callback deathMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeathMenu); + for (int i = 0; i < 2; ++i) + _deathMenu.item[i].callback = deathMenuFunctor; +} #endif // ENABLE_LOL -- cgit v1.2.3 From 650f3a50d2acd1962501e9082e946e7ffa13ae13 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 15 Jun 2009 21:39:43 +0000 Subject: LOL: implemented quit menu svn-id: r41560 --- engines/kyra/staticres.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 4a9e3bdeac..341425172c 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2046,6 +2046,13 @@ void GUI_LoL::initStaticData() { Button::Callback deathMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeathMenu); for (int i = 0; i < 2; ++i) _deathMenu.item[i].callback = deathMenuFunctor; + + GUI_LOL_MENU(_choiceMenu, 11, 0, 0, 2, -1, -1, -1, -1); + GUI_LOL_MENU_ITEM(_choiceMenu.item[0], 0x4007, 8, 30, 72, 15, 0, 0); + GUI_LOL_MENU_ITEM(_choiceMenu.item[1], 0x4008, 208, 30, 72, 15, 0, 0); + Button::Callback choiceMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedChoiceMenu); + for (int i = 0; i < 2; ++i) + _choiceMenu.item[i].callback = choiceMenuFunctor; } #endif // ENABLE_LOL -- cgit v1.2.3 From 0b4725d142f56665f9b032e393db1d010b2bde05 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Tue, 16 Jun 2009 21:23:26 +0000 Subject: LOL: implemented options menu (settings aren't saved yet) svn-id: r41596 --- engines/kyra/staticres.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 341425172c..382d167d83 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2040,6 +2040,17 @@ void GUI_LoL::initStaticData() { for (int i = 0; i < 5; ++i) _loadMenu.item[i].callback = loadMenuFunctor; + GUI_LOL_MENU(_gameOptions, 17, 0x400c, 0, 6, -1, -1, -1, -1); + GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xfff7, 120, 22, 80, 15, 0x406e, 0); + GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff6, 120, 39, 80, 15, 0x406c, 0); + GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xfff5, 120, 56, 80, 15, 0x406d, 0); + GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xfff4, 120, 73, 80, 15, 0x42d5, 0); + GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff3, 120, 90, 80, 15, 0x42d2, 0); + GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, 110); + Button::Callback optionsMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedOptionsMenu); + for (int i = 0; i < 6; ++i) + _gameOptions.item[i].callback = optionsMenuFunctor; + GUI_LOL_MENU(_deathMenu, 11, 0x4013, 0, 2, -1, -1, -1, -1); GUI_LOL_MENU_ITEM(_deathMenu.item[0], 0x4006, 8, 30, 104, 15, 0, 0); GUI_LOL_MENU_ITEM(_deathMenu.item[1], 0x4001, 176, 30, 104, 15, 0, 0); @@ -3061,6 +3072,8 @@ const ScreenDim Screen_LoL::_screenDimTable256C[] = { { 0x0D, 0xA2, 0x18, 0x0C, 0xFE, 0x01, 0x00, 0x00 }, { 0x0F, 0x06, 0x14, 0x6E, 0x01, 0x00, 0x00, 0x00 }, { 0x1A, 0xBE, 0x0A, 0x07, 0xFE, 0x01, 0x00, 0x00 }, + { 0x07, 0x21, 0x1A, 0x85, 0x00, 0x00, 0x00, 0x00 }, + { 0x03, 0x32, 0x22, 0x62, 0x00, 0x00, 0x00, 0x00 }, { 0x0B, 0x8C, 0x10, 0x33, 0x3D, 0x01, 0x00, 0x00 }, // Main menu box (5 entries, CD version only) { 0x0B, 0x8C, 0x10, 0x23, 0x3D, 0x01, 0x00, 0x00 }, // Main menu box (3 entries, floppy version only) @@ -3088,6 +3101,8 @@ const ScreenDim Screen_LoL::_screenDimTable16C[] = { { 0x0D, 0xA2, 0x18, 0x0C, 0x33, 0x44, 0x00, 0x00 }, { 0x0F, 0x06, 0x14, 0x6E, 0x44, 0x00, 0x00, 0x00 }, { 0x1A, 0xBE, 0x0A, 0x07, 0x33, 0x44, 0x00, 0x00 }, + { 0x07, 0x21, 0x1A, 0x85, 0x00, 0x00, 0x00, 0x00 }, + { 0x03, 0x32, 0x22, 0x62, 0x00, 0x00, 0x00, 0x00 }, { 0x0B, 0x8C, 0x10, 0x33, 0x33, 0x44, 0x00, 0x00 }, // Main menu box (5 entries, not used here) { 0x0B, 0x8C, 0x10, 0x23, 0x33, 0x44, 0x00, 0x00 }, // Main menu box (3 entries) -- cgit v1.2.3 From ec7d86404c672f62368bdddaba1f4258960141de Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Fri, 19 Jun 2009 17:03:28 +0000 Subject: LOL: - implemented bezel cup opcode - implemented font conversion for certain language specific characters in load game dialogue (only german atm) svn-id: r41677 --- engines/kyra/staticres.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 382d167d83..7b518f727f 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -3296,6 +3296,13 @@ const int LoLEngine::_outroMonsterScaleTableY[] = { 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100 }; +const char LoLEngine::_fontConversionTableGerman[] = { + 'Ä', 0x8e, 'ä', 0x84, 'Ö', 0x99, 'ö', + 0x94, 'Ü', 0x9a, 'ü', 0x81, 'ß', 0xe1 +}; + +const int LoLEngine::_fontConversionTableGermanSize = ARRAYSIZE(LoLEngine::_fontConversionTableGerman); + #endif // ENABLE_LOL } // End of namespace Kyra -- cgit v1.2.3 From d4e01e3a1b56cfc640b1c97753f47106f4f39123 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 19 Jun 2009 17:53:25 +0000 Subject: Fix some warnings. svn-id: r41679 --- engines/kyra/staticres.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 7b518f727f..b7d3a3a821 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -3296,7 +3296,7 @@ const int LoLEngine::_outroMonsterScaleTableY[] = { 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100 }; -const char LoLEngine::_fontConversionTableGerman[] = { +const uint8 LoLEngine::_fontConversionTableGerman[] = { 'Ä', 0x8e, 'ä', 0x84, 'Ö', 0x99, 'ö', 0x94, 'Ü', 0x9a, 'ü', 0x81, 'ß', 0xe1 }; -- cgit v1.2.3 From 66445ae515b7840062e45eb550983d859da17a14 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Fri, 19 Jun 2009 18:46:19 +0000 Subject: LOL: - implemented delete menu - fixed some bugs in the menu code svn-id: r41683 --- engines/kyra/staticres.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index b7d3a3a821..14f34d5ad5 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2040,6 +2040,26 @@ void GUI_LoL::initStaticData() { for (int i = 0; i < 5; ++i) _loadMenu.item[i].callback = loadMenuFunctor; + GUI_LOL_MENU(_saveMenu, 10, 0x400d, 1, 5, 128, 20, 128, 118); + GUI_LOL_MENU_ITEM(_saveMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); + Button::Callback saveMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSaveMenu); + for (int i = 0; i < 5; ++i) + _saveMenu.item[i].callback = saveMenuFunctor; + + GUI_LOL_MENU(_deleteMenu, 10, 0x400f, 1, 5, 128, 20, 128, 118); + GUI_LOL_MENU_ITEM(_deleteMenu.item[0], 0xfffe, 8, 39, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0); + GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); + Button::Callback deleteMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeleteMenu); + for (int i = 0; i < 5; ++i) + _deleteMenu.item[i].callback = deleteMenuFunctor; + GUI_LOL_MENU(_gameOptions, 17, 0x400c, 0, 6, -1, -1, -1, -1); GUI_LOL_MENU_ITEM(_gameOptions.item[0], 0xfff7, 120, 22, 80, 15, 0x406e, 0); GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff6, 120, 39, 80, 15, 0x406c, 0); -- cgit v1.2.3 From d7e0c52a860f964e8ad192583cba11b297067331 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 20 Jun 2009 06:20:12 +0000 Subject: Added explicit casts to _fontConversionTableGerman for systems where char is signed svn-id: r41699 --- engines/kyra/staticres.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 14f34d5ad5..81c045ba2f 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -3317,8 +3317,9 @@ const int LoLEngine::_outroMonsterScaleTableY[] = { }; const uint8 LoLEngine::_fontConversionTableGerman[] = { - 'Ä', 0x8e, 'ä', 0x84, 'Ö', 0x99, 'ö', - 0x94, 'Ü', 0x9a, 'ü', 0x81, 'ß', 0xe1 + (const uint8)'Ä', 0x8e, (const uint8)'ä', 0x84, (const uint8)'Ö', 0x99, + (const uint8)'ö', 0x94, (const uint8)'Ü', 0x9a, (const uint8)'ü', 0x81, + (const uint8)'ß', 0xe1 }; const int LoLEngine::_fontConversionTableGermanSize = ARRAYSIZE(LoLEngine::_fontConversionTableGerman); -- cgit v1.2.3 From 8d26c58372c9878a26e220c69c76e5500f1f942f Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 20 Jun 2009 14:26:01 +0000 Subject: LOL: implemented save menu svn-id: r41713 --- engines/kyra/staticres.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 81c045ba2f..d5c75bf89e 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2078,6 +2078,13 @@ void GUI_LoL::initStaticData() { for (int i = 0; i < 2; ++i) _deathMenu.item[i].callback = deathMenuFunctor; + GUI_LOL_MENU(_savenameMenu, 7, 0x4053, 0, 2, -1, -1, -1, -1); + GUI_LOL_MENU_ITEM(_savenameMenu.item[0], 0x4012, 8, 38, 72, 15, 0, 43); + GUI_LOL_MENU_ITEM(_savenameMenu.item[1], 0x4011, 176, 38, 72, 15, 0, 110); + Button::Callback savenameMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSavenameMenu); + for (int i = 0; i < 2; ++i) + _savenameMenu.item[i].callback = savenameMenuFunctor; + GUI_LOL_MENU(_choiceMenu, 11, 0, 0, 2, -1, -1, -1, -1); GUI_LOL_MENU_ITEM(_choiceMenu.item[0], 0x4007, 8, 30, 72, 15, 0, 0); GUI_LOL_MENU_ITEM(_choiceMenu.item[1], 0x4008, 208, 30, 72, 15, 0, 0); @@ -3316,15 +3323,21 @@ const int LoLEngine::_outroMonsterScaleTableY[] = { 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100 }; -const uint8 LoLEngine::_fontConversionTableGerman[] = { +const uint8 LoLEngine::_fontConversionTable[] = { (const uint8)'Ä', 0x8e, (const uint8)'ä', 0x84, (const uint8)'Ö', 0x99, (const uint8)'ö', 0x94, (const uint8)'Ü', 0x9a, (const uint8)'ü', 0x81, - (const uint8)'ß', 0xe1 + (const uint8)'ß', 0xe1, (const uint8)'É', 0x90, (const uint8)'é', 0x82, + (const uint8)'è', 0x8a, (const uint8)'ê', 0x88, (const uint8)'à', 0x85, + (const uint8)'â', 0x83, (const uint8)'ô', 0x93, (const uint8)'Ç', 0x80, + (const uint8)'ç', 0x87, (const uint8)'ë', 0x89, (const uint8)'å', 0x86, + (const uint8)'ï', 0x8b, (const uint8)'î', 0x8c, (const uint8)'ì', 0x8d, + (const uint8)'Å', 0x8f, (const uint8)'æ', 0x91, (const uint8)'Æ', 0x92, + (const uint8)'ò', 0x95, (const uint8)'û', 0x96, (const uint8)'ù', 0x97, + (const uint8)'á', 0xa0 }; -const int LoLEngine::_fontConversionTableGermanSize = ARRAYSIZE(LoLEngine::_fontConversionTableGerman); +const int LoLEngine::_fontConversionTableSize = ARRAYSIZE(LoLEngine::_fontConversionTable); #endif // ENABLE_LOL } // End of namespace Kyra - -- cgit v1.2.3 From db7484b7ba00ef9c06240799dcc8dc7e4ff3364c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 21 Jun 2009 01:15:24 +0000 Subject: Moved CP850<->ISO-8859-1 conversion to Util. svn-id: r41720 --- engines/kyra/staticres.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index d5c75bf89e..34d63e29e8 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -3323,21 +3323,6 @@ const int LoLEngine::_outroMonsterScaleTableY[] = { 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100, 0x100 }; -const uint8 LoLEngine::_fontConversionTable[] = { - (const uint8)'Ä', 0x8e, (const uint8)'ä', 0x84, (const uint8)'Ö', 0x99, - (const uint8)'ö', 0x94, (const uint8)'Ü', 0x9a, (const uint8)'ü', 0x81, - (const uint8)'ß', 0xe1, (const uint8)'É', 0x90, (const uint8)'é', 0x82, - (const uint8)'è', 0x8a, (const uint8)'ê', 0x88, (const uint8)'à', 0x85, - (const uint8)'â', 0x83, (const uint8)'ô', 0x93, (const uint8)'Ç', 0x80, - (const uint8)'ç', 0x87, (const uint8)'ë', 0x89, (const uint8)'å', 0x86, - (const uint8)'ï', 0x8b, (const uint8)'î', 0x8c, (const uint8)'ì', 0x8d, - (const uint8)'Å', 0x8f, (const uint8)'æ', 0x91, (const uint8)'Æ', 0x92, - (const uint8)'ò', 0x95, (const uint8)'û', 0x96, (const uint8)'ù', 0x97, - (const uint8)'á', 0xa0 -}; - -const int LoLEngine::_fontConversionTableSize = ARRAYSIZE(LoLEngine::_fontConversionTable); - #endif // ENABLE_LOL } // End of namespace Kyra -- cgit v1.2.3 From 5b0b0051c15ff23ed8daf801d4b56cbaadf2f101 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 21 Jun 2009 16:59:51 +0000 Subject: LOL: - implemented audio menu - menu settings now get saved - remove white spaces svn-id: r41729 --- engines/kyra/staticres.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 34d63e29e8..5a4f008a1a 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2017,7 +2017,7 @@ void GUI_LoL::initStaticData() { for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) GUI_V2_BUTTON(_menuButtons[i], i, 0, 0, 0, 0, 0, 0x4487, 0, 0, 0, 0, 0, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0); - + GUI_LOL_MENU(_mainMenu, 9, 0x4000, 0, 7, -1, -1, -1, -1); GUI_LOL_MENU_ITEM(_mainMenu.item[0], 0x4001, 16, 23, 176, 15, 0, 0); GUI_LOL_MENU_ITEM(_mainMenu.item[1], 0x4002, 16, 40, 176, 15, 0, 0); @@ -2035,7 +2035,7 @@ void GUI_LoL::initStaticData() { GUI_LOL_MENU_ITEM(_loadMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0); GUI_LOL_MENU_ITEM(_loadMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0); GUI_LOL_MENU_ITEM(_loadMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0); - GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); + GUI_LOL_MENU_ITEM(_loadMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); Button::Callback loadMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedLoadMenu); for (int i = 0; i < 5; ++i) _loadMenu.item[i].callback = loadMenuFunctor; @@ -2045,7 +2045,7 @@ void GUI_LoL::initStaticData() { GUI_LOL_MENU_ITEM(_saveMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0); GUI_LOL_MENU_ITEM(_saveMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0); GUI_LOL_MENU_ITEM(_saveMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0); - GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); + GUI_LOL_MENU_ITEM(_saveMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); Button::Callback saveMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedSaveMenu); for (int i = 0; i < 5; ++i) _saveMenu.item[i].callback = saveMenuFunctor; @@ -2055,7 +2055,7 @@ void GUI_LoL::initStaticData() { GUI_LOL_MENU_ITEM(_deleteMenu.item[1], 0xfffd, 8, 56, 256, 15, 0, 0); GUI_LOL_MENU_ITEM(_deleteMenu.item[2], 0xfffc, 8, 73, 256, 15, 0, 0); GUI_LOL_MENU_ITEM(_deleteMenu.item[3], 0xfffb, 8, 90, 256, 15, 0, 0); - GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); + GUI_LOL_MENU_ITEM(_deleteMenu.item[4], 0x4011, 168, 118, 96, 15, 0, 110); Button::Callback deleteMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedDeleteMenu); for (int i = 0; i < 5; ++i) _deleteMenu.item[i].callback = deleteMenuFunctor; @@ -2065,12 +2065,21 @@ void GUI_LoL::initStaticData() { GUI_LOL_MENU_ITEM(_gameOptions.item[1], 0xfff6, 120, 39, 80, 15, 0x406c, 0); GUI_LOL_MENU_ITEM(_gameOptions.item[2], 0xfff5, 120, 56, 80, 15, 0x406d, 0); GUI_LOL_MENU_ITEM(_gameOptions.item[3], 0xfff4, 120, 73, 80, 15, 0x42d5, 0); - GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff3, 120, 90, 80, 15, 0x42d2, 0); - GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, 110); + GUI_LOL_MENU_ITEM(_gameOptions.item[4], 0xfff3, 120, 90, 80, 15, 0x42d2, 0); + GUI_LOL_MENU_ITEM(_gameOptions.item[5], 0x4072, 104, 110, 96, 15, 0, 110); Button::Callback optionsMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedOptionsMenu); for (int i = 0; i < 6; ++i) _gameOptions.item[i].callback = optionsMenuFunctor; + GUI_LOL_MENU(_audioOptions, 18, 0x42d9, 2, 1, -1, -1, -1, -1); + GUI_LOL_MENU_ITEM(_audioOptions.item[0], 0x4072, 152, 76, 96, 15, 0, 110); + GUI_LOL_MENU_ITEM(_audioOptions.item[1], 3, 128, 22, 114, 14, 0x42db, 0); + GUI_LOL_MENU_ITEM(_audioOptions.item[2], 4, 128, 39, 114, 14, 0x42da, 0); + GUI_LOL_MENU_ITEM(_audioOptions.item[3], 5, 128, 56, 114, 14, 0x42dc, 0); + Button::Callback audioMenuFunctor = BUTTON_FUNCTOR(GUI_LoL, this, &GUI_LoL::clickedAudioMenu); + for (int i = 0; i < 4; ++i) + _audioOptions.item[i].callback = audioMenuFunctor; + GUI_LOL_MENU(_deathMenu, 11, 0x4013, 0, 2, -1, -1, -1, -1); GUI_LOL_MENU_ITEM(_deathMenu.item[0], 0x4006, 8, 30, 104, 15, 0, 0); GUI_LOL_MENU_ITEM(_deathMenu.item[1], 0x4001, 176, 30, 104, 15, 0, 0); -- cgit v1.2.3 From 882662977f2cdf574e5aab041ceaaf626386d0f2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 22 Jun 2009 02:35:45 +0000 Subject: Changed Screen::getPalette to return a reference to a Palette object. svn-id: r41741 --- engines/kyra/staticres.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 5a4f008a1a..38ade654e5 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1584,7 +1584,7 @@ void KyraEngine_LoK::loadMainScreen(int page) { _screen->clearPage(page); if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) - _screen->loadBitmap("MAIN15.CPS", page, page, _screen->getPalette(0)); + _screen->loadBitmap("MAIN15.CPS", page, page, _screen->getPalette(0).getData()); else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN || (_flags.isTalkie && _flags.lang == Common::IT_ITA)) _screen->loadBitmap("MAIN_ENG.CPS", page, page, 0); else if (_flags.lang == Common::FR_FRA) @@ -1599,7 +1599,7 @@ void KyraEngine_LoK::loadMainScreen(int page) { warning("no main graphics file found"); if (_flags.platform == Common::kPlatformAmiga) - memcpy(_screen->getPalette(1), _screen->getPalette(0), 32*3); + _screen->getPalette(1).copy(_screen->getPalette(0)); _screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0); } -- cgit v1.2.3 From 4bb392b593c492299dd916784548dc56bc0b25cb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 22 Jun 2009 02:36:16 +0000 Subject: Add wrapper functionality for copying full palettes. svn-id: r41742 --- engines/kyra/staticres.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 38ade654e5..3974bb7252 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1599,7 +1599,7 @@ void KyraEngine_LoK::loadMainScreen(int page) { warning("no main graphics file found"); if (_flags.platform == Common::kPlatformAmiga) - _screen->getPalette(1).copy(_screen->getPalette(0)); + _screen->copyPalette(1, 0); _screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0); } -- cgit v1.2.3 From d2e5166dae41d8972151ba3d1471ceace4323478 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 22 Jun 2009 02:37:20 +0000 Subject: Changed Screen::loadBitmap and Movie::open to take an optional Palette pointer instead of an optional array pointer. svn-id: r41744 --- engines/kyra/staticres.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 3974bb7252..2192af29a9 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1584,7 +1584,7 @@ void KyraEngine_LoK::loadMainScreen(int page) { _screen->clearPage(page); if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) - _screen->loadBitmap("MAIN15.CPS", page, page, _screen->getPalette(0).getData()); + _screen->loadBitmap("MAIN15.CPS", page, page, &_screen->getPalette(0)); else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN || (_flags.isTalkie && _flags.lang == Common::IT_ITA)) _screen->loadBitmap("MAIN_ENG.CPS", page, page, 0); else if (_flags.lang == Common::FR_FRA) -- cgit v1.2.3 From 004f6900b11e0ce841816f06e851ec37b8907466 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Jun 2009 01:29:14 +0000 Subject: Initial support for Kyrandia 1 PC-9801 Japanese 16 color. svn-id: r41844 --- engines/kyra/staticres.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 2192af29a9..86680a7b76 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2104,6 +2104,15 @@ void GUI_LoL::initStaticData() { #endif // ENABLE_LOL +const uint8 Screen_LoK_16::_palette16[48] = { + 0x00, 0x00, 0x00, 0x02, 0x07, 0x0B, 0x0C, 0x06, 0x04, + 0x0E, 0x09, 0x07, 0x00, 0x06, 0x03, 0x00, 0x0C, 0x07, + 0x0A, 0x0A, 0x0A, 0x08, 0x03, 0x03, 0x02, 0x02, 0x02, + 0x08, 0x0B, 0x0E, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x0A, + 0x05, 0x05, 0x05, 0x00, 0x0F, 0x0F, 0x0F, 0x0D, 0x00, + 0x0F, 0x0F, 0x0F +}; + const ScreenDim Screen_LoK::_screenDimTable[] = { { 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 }, { 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 }, -- cgit v1.2.3 From 0ef8d1ffed66d6677b0dff850e4d35d745e93aee Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Jun 2009 15:22:08 +0000 Subject: Implement proper color index conversion for Lands of Lore PC98. (The intro and menu screen work fine now) svn-id: r41867 --- engines/kyra/staticres.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'engines/kyra/staticres.cpp') diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 86680a7b76..e8597c8326 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -3159,6 +3159,42 @@ const ScreenDim Screen_LoL::_screenDimTable16C[] = { const int Screen_LoL::_screenDimTableCount = ARRAYSIZE(Screen_LoL::_screenDimTable256C); +// 256 -> 16 color conversion table +const uint8 Screen_LoL::_paletteConvTable[256] = { + 0x0, 0x1, 0x0, 0x3, 0x0, 0x5, 0x0, 0x7, + 0x0, 0x9, 0x0, 0xB, 0x0, 0xD, 0x0, 0xF, + 0x1, 0x1, 0x1, 0x3, 0x1, 0x5, 0x1, 0x7, + 0x1, 0x9, 0x1, 0xB, 0x1, 0xD, 0x1, 0xF, + 0x2, 0x1, 0x2, 0x3, 0x2, 0x5, 0x2, 0x7, + 0x2, 0x9, 0x2, 0xB, 0x2, 0xD, 0x2, 0xF, + 0x3, 0x1, 0x3, 0x3, 0x3, 0x5, 0x3, 0x7, + 0x3, 0x9, 0x3, 0xB, 0x3, 0xD, 0x3, 0xF, + 0x4, 0x1, 0x4, 0x3, 0x4, 0x5, 0x4, 0x7, + 0x4, 0x9, 0x4, 0xB, 0x4, 0xD, 0x4, 0xF, + 0x5, 0x1, 0x5, 0x3, 0x5, 0x5, 0x5, 0x7, + 0x5, 0x9, 0x5, 0xB, 0x5, 0xD, 0x5, 0xF, + 0x6, 0x1, 0x6, 0x3, 0x6, 0x5, 0x6, 0x7, + 0x6, 0x9, 0x6, 0xB, 0x6, 0xD, 0x6, 0xF, + 0x7, 0x1, 0x7, 0x3, 0x7, 0x5, 0x7, 0x7, + 0x7, 0x9, 0x7, 0xB, 0x7, 0xD, 0x7, 0xF, + 0x8, 0x1, 0x8, 0x3, 0x8, 0x5, 0x8, 0x7, + 0x8, 0x9, 0x8, 0xB, 0x8, 0xD, 0x8, 0xF, + 0x9, 0x1, 0x9, 0x3, 0x9, 0x5, 0x9, 0x7, + 0x9, 0x9, 0x9, 0xB, 0x9, 0xD, 0x9, 0xF, + 0xA, 0x1, 0xA, 0x3, 0xA, 0x5, 0xA, 0x7, + 0xA, 0x9, 0xA, 0xB, 0xA, 0xD, 0xA, 0xF, + 0xB, 0x1, 0xB, 0x3, 0xB, 0x5, 0xB, 0x7, + 0xB, 0x9, 0xB, 0xB, 0xB, 0xD, 0xB, 0xF, + 0xC, 0x1, 0xC, 0x3, 0xC, 0x5, 0xC, 0x7, + 0xC, 0x9, 0xC, 0xB, 0xC, 0xD, 0xC, 0xF, + 0xD, 0x1, 0xD, 0x3, 0xD, 0x5, 0xD, 0x7, + 0xD, 0x9, 0xD, 0xB, 0xD, 0xD, 0xD, 0xF, + 0xE, 0x1, 0xE, 0x3, 0xE, 0x5, 0xE, 0x7, + 0xE, 0x9, 0xE, 0xB, 0xE, 0xD, 0xE, 0xF, + 0xF, 0x1, 0xF, 0x3, 0xF, 0x5, 0xF, 0x7, + 0xF, 0x9, 0xF, 0xB, 0xF, 0xD, 0xF, 0xF +}; + const char * const LoLEngine::_languageExt[] = { "ENG", "FRE", -- cgit v1.2.3