/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */

/**
 * @file events.def
 *
 * @section DESCRIPTION
 * This file contains a `list` of all known
 * events & their attributes. You can use
 * the two preprocessor definitions
 * SETUP_EVENT & SETUP_UNMANAGED_EVENT to
 * generate your code from this data.
 */


#ifndef SETUP_EVENT
	#pragma push_macro("SETUP_EVENT")
	#define SETUP_EVENT(name,props)
#endif

#ifndef SETUP_UNMANAGED_EVENT
	#pragma push_macro("SETUP_UNMANAGED_EVENT")
	#define SETUP_UNMANAGED_EVENT(name,props)
#endif

	// synced call-ins
	SETUP_EVENT(Load, MANAGED_BIT)

	SETUP_EVENT(GamePreload,   MANAGED_BIT)
	SETUP_EVENT(GameStart,     MANAGED_BIT)
	SETUP_EVENT(GameOver,      MANAGED_BIT)
	SETUP_EVENT(GamePaused,    MANAGED_BIT)
	SETUP_EVENT(GameFrame,     MANAGED_BIT)
	SETUP_EVENT(TeamDied,      MANAGED_BIT)
	SETUP_EVENT(TeamChanged,   MANAGED_BIT)
	SETUP_EVENT(PlayerChanged, MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(PlayerAdded,   MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(PlayerRemoved, MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(UnitCreated,      MANAGED_BIT)
	SETUP_EVENT(UnitFinished,     MANAGED_BIT)
	SETUP_EVENT(UnitFromFactory,  MANAGED_BIT)
	SETUP_EVENT(UnitReverseBuilt, MANAGED_BIT)
	SETUP_EVENT(UnitDestroyed,    MANAGED_BIT)
	SETUP_EVENT(UnitTaken,        MANAGED_BIT)
	SETUP_EVENT(UnitGiven,        MANAGED_BIT)

	SETUP_EVENT(UnitIdle,       MANAGED_BIT)
	SETUP_EVENT(UnitCommand,    MANAGED_BIT)
	SETUP_EVENT(UnitCmdDone,    MANAGED_BIT)
	SETUP_EVENT(UnitDamaged,    MANAGED_BIT)
	SETUP_EVENT(UnitStunned,    MANAGED_BIT)
	SETUP_EVENT(UnitExperience, MANAGED_BIT)
	SETUP_EVENT(UnitHarvestStorageFull, MANAGED_BIT)

	SETUP_EVENT(UnitSeismicPing,  MANAGED_BIT)
	SETUP_EVENT(UnitEnteredRadar, MANAGED_BIT)
	SETUP_EVENT(UnitEnteredLos,   MANAGED_BIT)
	SETUP_EVENT(UnitLeftRadar,    MANAGED_BIT)
	SETUP_EVENT(UnitLeftLos,      MANAGED_BIT)

	SETUP_EVENT(UnitEnteredWater, MANAGED_BIT)
	SETUP_EVENT(UnitEnteredAir,   MANAGED_BIT)
	SETUP_EVENT(UnitLeftWater,    MANAGED_BIT)
	SETUP_EVENT(UnitLeftAir,      MANAGED_BIT)

	SETUP_EVENT(UnitLoaded,     MANAGED_BIT)
	SETUP_EVENT(UnitUnloaded,   MANAGED_BIT)
	SETUP_EVENT(UnitCloaked,    MANAGED_BIT)
	SETUP_EVENT(UnitDecloaked,  MANAGED_BIT)

	SETUP_EVENT(UnitUnitCollision,    MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(UnitFeatureCollision, MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(UnitMoved,            MANAGED_BIT)
	SETUP_EVENT(UnitMoveFailed,       MANAGED_BIT)

	SETUP_EVENT(FeatureCreated,   MANAGED_BIT)
	SETUP_EVENT(FeatureDestroyed, MANAGED_BIT)
	SETUP_EVENT(FeatureDamaged,   MANAGED_BIT)
	SETUP_EVENT(FeatureMoved,     MANAGED_BIT)

	SETUP_EVENT(ProjectileCreated,   MANAGED_BIT)
	SETUP_EVENT(ProjectileDestroyed, MANAGED_BIT)

	SETUP_EVENT(Explosion, MANAGED_BIT | CONTROL_BIT)

	SETUP_EVENT(StockpileChanged, MANAGED_BIT)

	// unsynced call-ins
	SETUP_EVENT(Save,           MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(UnsyncedHeightMapUpdate, MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(Update,         MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(KeyPress,       MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(KeyRelease,     MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(TextInput,      MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(TextEditing,    MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(MouseMove,      MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(MousePress,     MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(MouseRelease,   MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(MouseWheel,     MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(IsAbove,        MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(GetTooltip,     MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)

	SETUP_EVENT(DownloadQueued,        MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DownloadStarted,       MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DownloadFinished,      MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DownloadFailed,        MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DownloadProgress,      MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(LastMessagePosition, MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DefaultCommand,      MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(CommandNotify,       MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(AddConsoleLine,      MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(GroupChanged,        MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(GameSetup,           MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(WorldTooltip,        MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(MapDrawCmd,          MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)

	SETUP_EVENT(SunChanged,     MANAGED_BIT | UNSYNCED_BIT) //FIXME make synced? (whole dynSun code needs to then)

	SETUP_EVENT(ViewResize,     MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(DrawGenesis,              MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWater,                MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawSky,                  MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawSun,                  MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawGrass,                MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawTrees,                MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWorld,                MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWorldPreUnit,         MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWorldPreParticles,    MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWorldShadow,          MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWorldReflection,      MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawWorldRefraction,      MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawGroundPreForward,     MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawGroundPostForward,    MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawGroundPreDeferred,    MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawGroundPostDeferred,   MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawUnitsPostDeferred,    MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawFeaturesPostDeferred, MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawScreenEffects,        MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawScreenPost,           MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawScreen,               MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawInMiniMap,            MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(DrawInMiniMapBackground,  MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(RenderUnitCreated,      MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(RenderUnitDestroyed,    MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(RenderFeatureCreated,   MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(RenderFeatureDestroyed, MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(RenderProjectileCreated,   MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(RenderProjectileDestroyed, MANAGED_BIT | UNSYNCED_BIT)

	SETUP_EVENT(GameProgress,  MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(GameID,        MANAGED_BIT)

	SETUP_EVENT(SyncedActionFallback, MANAGED_BIT | CONTROL_BIT)

	SETUP_EVENT(CommandFallback,          MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowCommand,             MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitCreation,        MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitTransfer,        MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitBuildStep,       MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitTransport,       MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitTransportLoad,   MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitTransportUnload, MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitCloak,           MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitDecloak,         MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowUnitKamikaze,        MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowFeatureCreation,     MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowFeatureBuildStep,    MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowResourceLevel,       MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowResourceTransfer,    MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowDirectUnitControl,   MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowBuilderHoldFire,     MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowStartPosition,       MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(TerraformComplete,        MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(MoveCtrlNotify,           MANAGED_BIT | CONTROL_BIT)

	SETUP_EVENT(AllowWeaponTargetCheck,     MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowWeaponTarget,          MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(AllowWeaponInterceptTarget, MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(UnitPreDamaged,             MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(FeaturePreDamaged,          MANAGED_BIT | CONTROL_BIT)
	SETUP_EVENT(ShieldPreDamaged,           MANAGED_BIT | CONTROL_BIT)

	SETUP_EVENT(DrawUnit,              MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(DrawFeature,           MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(DrawShield,            MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(DrawProjectile,        MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)
	SETUP_EVENT(DrawMaterial,          MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT)

	// unmanaged call-ins
	SETUP_UNMANAGED_EVENT(Shutdown, 0)
	SETUP_UNMANAGED_EVENT(RecvLuaMsg, 0)
	SETUP_UNMANAGED_EVENT(GotChatMsg, CONTROL_BIT)

	SETUP_UNMANAGED_EVENT(RecvSkirmishAIMessage, UNSYNCED_BIT)

	// LuaUI
	SETUP_UNMANAGED_EVENT(ConfigureLayout, UNSYNCED_BIT | CONTROL_BIT)

	// LuaIntro
	SETUP_UNMANAGED_EVENT(DrawLoadScreen, UNSYNCED_BIT)
	SETUP_UNMANAGED_EVENT(LoadProgress,   UNSYNCED_BIT)

	// LuaMenu
	SETUP_UNMANAGED_EVENT(ActivateMenu, UNSYNCED_BIT)
	SETUP_UNMANAGED_EVENT(ActivateGame, UNSYNCED_BIT)
	SETUP_UNMANAGED_EVENT(AllowDraw,    UNSYNCED_BIT)

	// System
	SETUP_EVENT(CollectGarbage,  MANAGED_BIT)
	SETUP_EVENT(DbgTimingInfo,   MANAGED_BIT | UNSYNCED_BIT) // informs about video-/sim-frame start & end times
	SETUP_EVENT(Pong,            MANAGED_BIT | UNSYNCED_BIT)
	SETUP_EVENT(MetalMapChanged, MANAGED_BIT)


#ifndef SETUP_EVENT
	#pragma pop_macro("SETUP_EVENT")
#endif

#ifndef SETUP_UNMANAGED_EVENT
	#pragma pop_macro("SETUP_UNMANAGED_EVENT")
#endif
