Browse Source

Monster cleanup (#4832)

pull/4836/head
Mikołaj Piróg 4 years ago committed by GitHub
parent
commit
405d9d18b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      Source/monster.cpp
  2. 4
      Source/monster.h

12
Source/monster.cpp

@ -55,11 +55,11 @@ bool sgbSaveSoundOn;
namespace { namespace {
constexpr const int NightmareToHitBonus = 85; constexpr int NightmareToHitBonus = 85;
constexpr const int HellToHitBonus = 120; constexpr int HellToHitBonus = 120;
constexpr const int NightmareAcBonus = 50; constexpr int NightmareAcBonus = 50;
constexpr const int HellAcBonus = 80; constexpr int HellAcBonus = 80;
/** Tracks which missile files are already loaded */ /** Tracks which missile files are already loaded */
int totalmonsters; int totalmonsters;
@ -119,7 +119,7 @@ constexpr const std::array<_monster_id, 12> SkeletonTypes {
// }; // };
/** Maps from monster walk animation frame num to monster velocity. */ /** Maps from monster walk animation frame num to monster velocity. */
constexpr const int MWVel[24][3] = { constexpr int MWVel[24][3] = {
{ 256, 512, 1024 }, { 256, 512, 1024 },
{ 128, 256, 512 }, { 128, 256, 512 },
{ 85, 170, 341 }, { 85, 170, 341 },
@ -146,7 +146,7 @@ constexpr const int MWVel[24][3] = {
{ 10, 21, 42 } { 10, 21, 42 }
}; };
/** Maps from monster action to monster animation letter. */ /** Maps from monster action to monster animation letter. */
constexpr const char Animletter[7] = "nwahds"; constexpr char Animletter[7] = "nwahds";
size_t GetNumAnims(const MonsterData &monsterData) size_t GetNumAnims(const MonsterData &monsterData)
{ {

4
Source/monster.h

@ -25,8 +25,8 @@ namespace devilution {
struct Missile; struct Missile;
constexpr const int MaxMonsters = 200; constexpr int MaxMonsters = 200;
constexpr const int MaxLvlMTypes = 24; constexpr int MaxLvlMTypes = 24;
enum monster_flag : uint16_t { enum monster_flag : uint16_t {
// clang-format off // clang-format off

Loading…
Cancel
Save