Browse Source

code cleanup

pull/6101/head
qndel 3 years ago committed by Anders Jenbo
parent
commit
3500dc1861
  1. 2
      Source/engine/render/scrollrt.cpp
  2. 10
      Source/items.h
  3. 2
      Source/lighting.h
  4. 2
      Source/towners.cpp
  5. 2
      test/drlg_l4_test.cpp

2
Source/engine/render/scrollrt.cpp

@ -770,7 +770,6 @@ void DrawDungeon(const Surface &out, Point tilePosition, Point targetBufferPosit
}
if (LightTableIndex < LightsMax && bDead != 0) {
do {
Corpse &corpse = Corpses[(bDead & 0x1F) - 1];
const Point position { targetBufferPosition.x - CalculateWidth2(corpse.width), targetBufferPosition.y };
const ClxSprite sprite = corpse.spritesForDirection(static_cast<Direction>((bDead >> 5) & 7))[corpse.frame];
@ -780,7 +779,6 @@ void DrawDungeon(const Surface &out, Point tilePosition, Point targetBufferPosit
} else {
ClxDrawLight(out, position, sprite);
}
} while (false);
}
DrawObject(out, tilePosition, targetBufferPosition, true);
DrawItem(out, tilePosition, targetBufferPosition, true);

10
Source/items.h

@ -134,11 +134,11 @@ enum _unique_items : int8_t {
7th bit stores uper15 flag - uper means unique percent, this flag is true for unique monsters and loot from them has 15% to become unique
8th bit stores uper1 flag - this is loot from normal monsters, which has 1% to become unique
9th bit stores info if item is unique
10th bit stores info if item is a basic one from griswold
11th bit stores info if item is a premium one from griswold
12th bit stores info if item is from wirt
13th bit stores info if item is from adria
14th bit stores info if item is from pepin
10th bit stores info if item is a basic one from Griswold
11th bit stores info if item is a premium one from Griswold
12th bit stores info if item is from Wirt
13th bit stores info if item is from Adria
14th bit stores info if item is from Pepin
15th bit stores pregen flag
combining CF_UPER15 and CF_UPER1 flags (CF_USEFUL) is used to mark potions and town portal scrolls created on the ground

2
Source/lighting.h

@ -30,7 +30,7 @@ struct LightPosition {
WorldTilePosition tile;
/** Pixel offset from tile. */
DisplacementOf<int8_t> offset;
/** Prevous position. */
/** Previous position. */
WorldTilePosition old;
};

2
Source/towners.cpp

@ -499,7 +499,7 @@ void TalkToHealer(Player &player, Towner &healer)
if (poisonWater._qactive != QUEST_NOTAVAIL) {
if ((poisonWater._qactive == QUEST_INIT && (player._pLvlVisited[1] || player._pLvlVisited[5])) || (poisonWater._qactive == QUEST_ACTIVE && !poisonWater._qlog)) {
// Play the dialog and make the quest visible in the log if the player has not started the quest but has
// visited the dungeon at least once, or if they've found the poison water cave before speaking to pepin
// visited the dungeon at least once, or if they've found the poison water cave before speaking to Pepin
poisonWater._qactive = QUEST_ACTIVE;
poisonWater._qlog = true;
poisonWater._qmsg = TEXT_POISON3;

2
test/drlg_l4_test.cpp

@ -50,7 +50,7 @@ TEST(Drlg_l4, CreateL4Dungeon_diablo_14_717625719)
EXPECT_EQ(ViewPosition, Point(51, 29));
}
// Level which rooms extends to the edge of the quardrant
// Level which rooms extend to the edge of the quadrant
TEST(Drlg_l4, CreateL4Dungeon_diablo_14_815743776)
{
LoadExpectedLevelData("diablo/14-815743776.dun");

Loading…
Cancel
Save