Advertisement
Guest User

Untitled

a guest
May 21st, 2019
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.36 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "math/consts.h"
  4. #include "data/nav.h"
  5. #include "data/formation.h"
  6. #include "data/carraige/carraige.h"
  7. #include "./context.h"
  8.  
  9. namespace Equipment {
  10.  
  11.   #define STATES \
  12.       etype(EquippedPrimary) \
  13.       etype(EquippedSecondary) \
  14.       etype(Unequipped)
  15.  
  16.   #include "state_type_macro_snippet.h"
  17.   #undef STATES
  18.  
  19. }  // namespace Combat
  20.  
  21.  
  22. namespace MeleeCombat {
  23.  
  24.   #define STATES \
  25.     etype(Waiting) \
  26.     etype(Attack) \
  27.     etype(Guarding) \
  28.     etype(Riposte) \
  29.     etype(Staggering) \
  30.     etype(Parrying)
  31.     #include "state_type_macro_snippet.h"
  32.   #undef STATES
  33.  
  34. }
  35.  
  36. namespace RangedCombat {
  37.  
  38.   #define STATES \
  39.     etype(Ready) \
  40.     etype(Aiming) \
  41.     etype(Reloading) \
  42.     etype(OutOfAmmo) \
  43.     etype(Firing)
  44.     #include "state_type_macro_snippet.h"
  45.   #undef STATES
  46.  
  47. }
  48.  
  49.  
  50. namespace Movement {
  51.  
  52.   struct Mounted {
  53.     EntityType id;
  54.     Menge::Math::Vector2 relativePos;
  55.     prop_t relativeHeight;
  56.   };
  57.   struct Moving {};
  58.   struct Stationary {};
  59.  
  60.   #define STATES_ALREADY_DEFINED
  61.   #define STATES \
  62.     etype(Mounted) \
  63.     etype(Moving) \
  64.     etype(Stationary)
  65.   #include "state_type_macro_snippet.h"
  66.   #undef STATES
  67. }
  68.  
  69. namespace Status {
  70.  
  71.     #define STATES \
  72.     etype(FreeMove) \
  73.     etype(MeleeCombat) \
  74.     etype(RangedCombat) \
  75.     etype(Injured) \
  76.     etype(Dead)
  77.   #include "state_type_macro_snippet.h"
  78.   #undef STATES
  79. }
  80.  
  81. const auto excludeDead = entt::exclude<Status::Dead>;
  82.  
  83. namespace UprightMovement {
  84.  
  85.   #define STATES \
  86.       etype(Marching) \
  87.       etype(Charging) \
  88.       etype(Fleeing) \
  89.       etype(Running)
  90.  
  91.   #include "state_type_macro_snippet.h"
  92.   #undef STATES
  93.  
  94. }  // namespace Movement
  95.  
  96.  
  97. namespace Stance {
  98.  
  99.   #define STATES \
  100.       etype(Upright) \
  101.       etype(Prone) \
  102.       etype(Crouching) \
  103.       etype(Kneeling)
  104.  
  105.   #include "state_type_macro_snippet.h"
  106.   #undef STATES
  107.  
  108. }  // namespace Stance
  109.  
  110.  
  111. namespace Destination {
  112.   using Data::FormationAgentPoint;
  113.   using Data::CircleGoalPtr;
  114.   using Data::AgentFollow;
  115.   using Data::AgentToMount;
  116.  
  117.   struct None {};
  118.  
  119.   #define STATES_ALREADY_DEFINED
  120.   #define STATES \
  121.       etype(None) \
  122.       etype(FormationAgentPoint) \
  123.       etype(CircleGoalPtr) \
  124.       etype(AgentFollow) \
  125.       etype(AgentToMount)
  126.  
  127.   #include "state_type_macro_snippet.h"
  128.   #undef STATES
  129. }
  130.  
  131.  
  132. /*namespace Goal {
  133.  
  134.   #define STATES \
  135.       etype(ToFormation) \
  136.       etype(ToArea) \
  137.       etype(ToCover) \
  138.       etype(ToWaypoints) \
  139.       etype(ToNearestEnemy) \
  140.       etype(AwayNearestEnemy)
  141.  
  142.   #include "state_type_macro_snippet.h"
  143.   #undef STATES
  144.  
  145. }  // namespace Goal
  146. */
  147.  
  148. /*----------  Formation states  ----------*/
  149.  
  150. // namespace Formation {
  151. //     struct CanFireTag {};
  152. //     struct CanKneelTag {};
  153. // }
  154.  
  155. /*----------  Group States  ----------*/
  156.  
  157. namespace GroupMovement {
  158.     // different types of move to position modifiers,
  159.     // move while prone, move while running, move default == marching,
  160.     // retreat == fleeing .
  161.     #define STATES \
  162.       etype(ProneModifier) \
  163.       etype(RunModifier) \
  164.       etype(DefaultModifier) \
  165.       etype(RetreatModifier)
  166.     #include "state_type_macro_snippet.h"
  167.     #undef STATES
  168. }  // namespace GroupCommand
  169.  
  170.  
  171. namespace GroupCombat {
  172.  
  173.   struct CanFireTag {};
  174.   struct CanPursueTag {};
  175.   struct CanAimTag {};
  176.  
  177. }  // namespace GroupCommand
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement