FF7Character.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #include "common/TypeDefine.h"
  16. namespace FFVII{
  17. /**
  18. * A playable character.
  19. */
  20. class Character{
  21. public:
  22. /**
  23. * Constructor.
  24. */
  25. Character();
  26. /**
  27. * Destructor.
  28. */
  29. virtual ~Character();
  30. /**
  31. * List of character IDs.
  32. */
  33. enum CharacterId{
  34. /**
  35. * Cloud's ID.
  36. */
  37. CLOUD = 0,
  38. /**
  39. * Tifa's ID.
  40. */
  41. TIFA = 1,
  42. /**
  43. * Aerith's ID.
  44. */
  45. AERIS = 2,
  46. /**
  47. * Barret's ID.
  48. */
  49. BARRET = 3,
  50. /**
  51. * Red XIII's ID.
  52. */
  53. RED = 4,
  54. /**
  55. * Cid's ID.
  56. */
  57. CID = 5,
  58. /**
  59. * Vincent's ID.
  60. */
  61. VINCENT = 6,
  62. /**
  63. * Yuffie's ID.
  64. */
  65. YUVI = 7,
  66. /**
  67. * Cait Sith's ID.
  68. */
  69. KETCY = 8,
  70. /**
  71. * Unknown character ID.
  72. */
  73. UNKNOWN = 9
  74. };
  75. /**
  76. * Retrieves a character ID from it's name.
  77. *
  78. * @param name[in] Chaarcter name.
  79. * @return ID of the character with the specified name, or {@see
  80. * UNKNOWN} if the character doesn't exist.
  81. */
  82. static CharacterId GetIdByName( const QGears::String& name );
  83. private:
  84. typedef std::map<QGears::String, CharacterId> CharacterIdLookupMap;
  85. /**
  86. * Creates a lookup map for character names.
  87. *
  88. * Names frequently used in the field scripts for the playable
  89. * characters are included in the lookup map.
  90. *
  91. * @return The character name lookup map.
  92. */
  93. static CharacterIdLookupMap CreateLookupMap();
  94. static const CharacterIdLookupMap character_id_lookup_;
  95. };
  96. }
  97. #endif // __FFVIICharacter_H__