Browse Source

Move CrawlNum to CrawlTable and make it extern visible

pull/2843/head
obligaron 5 years ago committed by qndel
parent
commit
1b3381ce8e
  1. 2
      Source/lighting.cpp
  2. 1
      Source/lighting.h
  3. 2
      Source/missiles.cpp
  4. 2
      test/lighting_test.cpp

2
Source/lighting.cpp

@ -414,6 +414,8 @@ const int8_t CrawlTable[2749] = {
// clang-format on
};
const int CrawlNum[19] = { 0, 3, 12, 45, 94, 159, 240, 337, 450, 579, 724, 885, 1062, 1255, 1464, 1689, 1930, 2187, 2460 };
/*
* X- Y-coordinate offsets of lighting visions.
* The last entry-pair is only for alignment.

1
Source/lighting.h

@ -74,6 +74,7 @@ void lighting_color_cycling();
/* rdata */
extern const int8_t CrawlTable[2749];
extern const int CrawlNum[19];
extern const uint8_t VisionCrawlTable[23][30];
} // namespace devilution

2
Source/missiles.cpp

@ -36,8 +36,6 @@ namespace {
ChainStruct chain[MAXMISSILES];
int numchains;
const int CrawlNum[19] = { 0, 3, 12, 45, 94, 159, 240, 337, 450, 579, 724, 885, 1062, 1255, 1464, 1689, 1930, 2187, 2460 };
int AddClassHealingBonus(int hp, HeroClass heroClass)
{
switch (heroClass) {

2
test/lighting_test.cpp

@ -7,8 +7,6 @@ using namespace devilution;
TEST(Lighting, CrawlTables)
{
int CrawlNum[19] = { 0, 3, 12, 45, 94, 159, 240, 337, 450, 579, 724, 885, 1062, 1255, 1464, 1689, 1930, 2187, 2460 };
bool added[40][40];
memset(added, 0, sizeof(added));

Loading…
Cancel
Save