aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-27 23:38:37 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit652b2c6f98f291a76397c9035e4f8338b9c792f9 (patch)
treef0e9c59a89ded7742f98d5f4aa3464eb11b2bc02 /engines/dm
parent703fd8aca2e15edc03aa854365e20bfdcf524add (diff)
downloadscummvm-rg350-652b2c6f98f291a76397c9035e4f8338b9c792f9.tar.gz
scummvm-rg350-652b2c6f98f291a76397c9035e4f8338b9c792f9.tar.bz2
scummvm-rg350-652b2c6f98f291a76397c9035e4f8338b9c792f9.zip
DM: Add F0340_INVENTORY_DrawPanel_ScrollTextLine
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/TODOs/methodtree.txt28
-rw-r--r--engines/dm/inventory.cpp12
-rw-r--r--engines/dm/inventory.h1
-rw-r--r--engines/dm/text.cpp4
-rw-r--r--engines/dm/text.h2
5 files changed, 34 insertions, 13 deletions
diff --git a/engines/dm/TODOs/methodtree.txt b/engines/dm/TODOs/methodtree.txt
index 36237c2205..a672a8a9f3 100644
--- a/engines/dm/TODOs/methodtree.txt
+++ b/engines/dm/TODOs/methodtree.txt
@@ -45,16 +45,27 @@ F0280_CHAMPION_AddCandidateChampionToParty // done, so-so
G0035_s_Graphic562_Box_Food // done
G0036_s_Graphic562_Box_Water // done
G0037_s_Graphic562_Box_Poisoned // done
-
F0351_INVENTORY_DrawChampionSkillsAndStatistics // skip -----------------
F0347_INVENTORY_DrawPanel // done
- F0342_INVENTORY_DrawPanel_Object // skip ---------------------
- F0346_INVENTORY_DrawPanel_ResurrectReincarnate // done
+ F0342_INVENTORY_DrawPanel_Object
+ F0341_INVENTORY_DrawPanel_Scroll
+ F0340_INVENTORY_DrawPanel_ScrollTextLine // done
+ F0333_INVENTORY_OpenAndDrawChest
+ F0303_CHAMPION_GetSkillLevel
+ F0332_INVENTORY_DrawIconToViewport
+ F0336_INVENTORY_DrawPanel_BuildObjectAttributesString
+ F0335_INVENTORY_DrawPanel_ObjectDescriptionString
+ F0339_INVENTORY_DrawPanel_ArrowOrEye
+ G0430_apc_DirectionNames
+ G0034_s_Graphic562_Box_ObjectDescriptionCircle
+ G0032_s_Graphic562_Box_Panel
+ G0352_apc_ObjectNames
+ G0237_as_Graphic559_ObjectInfo
+ G0422_i_ObjectDescriptionTextY
+ F0346_INVENTORY_DrawPanel_ResurrectReincarnate // done
F0291_CHAMPION_DrawSlot // done
F0038_OBJECT_DrawIconInSlotBox // done
-
-
F0140_DUNGEON_GetObjectWeight // done
G0238_as_Graphic559_WeaponInfo // done
WEAPON_INFO // done
@@ -108,8 +119,6 @@ F0280_CHAMPION_AddCandidateChampionToParty // done, so-so
F0163_DUNGEON_LinkThingToList // done
G0426_T_OpenChest // done
G0425_aT_ChestSlots // done
-
-
F0395_MENUS_DrawMovementArrows // done
F0357_COMMAND_DiscardAllInput // skip
F0098_DUNGEONVIEW_DrawFloorAndCeiling // wat
@@ -135,11 +144,11 @@ F0280_CHAMPION_AddCandidateChampionToParty // done, so-so
G0234_ai_Graphic559_DirectionToStepNorthCount // done
G0237_as_Graphic559_ObjectInfo // done
G0038_ai_Graphic562_SlotMasks // done
-
+
+
F0462_START_StartGame_CPSF
F0003_MAIN_ProcessNewPartyMap_CPSE // partially done
F0278_CHAMPION_ResetDataToStartGame // paritally done
-
G0331_B_PressingEye // dm // done
G0332_B_StopPressingEye // dm // done
G0333_B_PressingMouth // dm // done
@@ -151,6 +160,7 @@ F0462_START_StartGame_CPSF
G0509_B_ActionAreaContainsIcons // menus // done
G0599_ui_UseChampionIconOrdinalAsMousePointerBitmap // eventman // done
+
F0463_START_InitializeGame_CPSADEF // partially done
F0267_MOVE_GetMoveResult_CPSCE // skip, really though
F0357_COMMAND_DiscardAllInput // done
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index c02aed4494..1a08022e62 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -33,7 +33,6 @@
#include "text.h"
-
namespace DM {
Box gBoxFloppyZzzCross = Box(174, 218, 2, 12); // @ G0041_s_Graphic562_Box_ViewportFloppyZzzCross
@@ -236,4 +235,15 @@ void InventoryMan::closeChest() {
}
}
+void InventoryMan::drawPanelScrollTextLine(int16 yPos, char* text) {
+ warning("CHANGE5_03_IMPROVEMENT");
+ for (char* iter = text; *iter != '\0'; ++iter) {
+ if ((*iter >= 'A') && (*iter <= 'Z')) {
+ *iter -= 64;
+ } else if (*iter >= '{') { // this branch is CHANGE5_03_IMPROVEMENT
+ *iter -= 96;
+ }
+ }
+ _vm->_textMan->printToViewport(162 - (6 * strlen(text) / 2), yPos, kColorBlack, text, kColorWhite);
+}
}
diff --git a/engines/dm/inventory.h b/engines/dm/inventory.h
index 8457e98faa..fe974b6c1b 100644
--- a/engines/dm/inventory.h
+++ b/engines/dm/inventory.h
@@ -65,6 +65,7 @@ public:
void drawPanelResurrectReincarnate(); // @ F0346_INVENTORY_DrawPanel_ResurrectReincarnate
void drawPanel(); // @ F0347_INVENTORY_DrawPanel
void closeChest(); // @ F0334_INVENTORY_CloseChest
+ void drawPanelScrollTextLine(int16 yPos, char *text); // @ F0340_INVENTORY_DrawPanel_ScrollTextLine
};
diff --git a/engines/dm/text.cpp b/engines/dm/text.cpp
index ab22ac473e..f8aabb31df 100644
--- a/engines/dm/text.cpp
+++ b/engines/dm/text.cpp
@@ -69,8 +69,8 @@ void TextMan::printTextToScreen(uint16 destX, uint16 destY, Color textColor, Col
printTextToBitmap(_vm->_displayMan->_vgaBuffer, _vm->_displayMan->_screenWidth, destX, destY, textColor, bgColor, text, _vm->_displayMan->_screenHeight, viewport);
}
-void TextMan::printToViewport(int16 posX, int16 posY, Color textColor, const char* text) {
- printTextToScreen(posX, posY, textColor, kColorDarkestGray, text, gDungeonViewport);
+void TextMan::printToViewport(int16 posX, int16 posY, Color textColor, const char* text, Color bgColor) {
+ printTextToScreen(posX, posY, textColor, bgColor, text, gDungeonViewport);
}
void TextMan::printWithTrailingSpaces(byte* destBitmap, int16 destPixelWidth, int16 destX, int16 destY, Color textColor,
diff --git a/engines/dm/text.h b/engines/dm/text.h
index b03d00a00d..590fade60d 100644
--- a/engines/dm/text.h
+++ b/engines/dm/text.h
@@ -40,7 +40,7 @@ public:
void printTextToBitmap(byte *destBitmap, uint16 destPixelWidth, uint16 destX, uint16 destY,
Color textColor, Color bgColor, const char *text, uint16 destHeight, Viewport &viewport = gDefultViewPort); // @ F0040_TEXT_Print
void printTextToScreen(uint16 destX, uint16 destY, Color textColor, Color bgColor, const char *text, Viewport &viewport = gDefultViewPort); // @ F0053_TEXT_PrintToLogicalScreen
- void printToViewport(int16 posX, int16 posY, Color textColor, const char *text); // @ F0052_TEXT_PrintToViewport
+ void printToViewport(int16 posX, int16 posY, Color textColor, const char *text, Color bgColor = kColorDarkestGray); // @ F0052_TEXT_PrintToViewport
void printWithTrailingSpaces(byte *destBitmap, int16 destPixelWidth, int16 destX, int16 destY, Color textColor, Color bgColor,
const char *text, int16 strLenght, int16 destHeight, Viewport &viewport = gDefultViewPort); // @ F0041_TEXT_PrintWithTrailingSpaces
void printWithTrailingSpacesToScreen(int16 destX, int16 destY, Color textColor, Color bgColor,