//=============================================================================
// Unreal Tournament SDK //
//-------------------------
// sdkCore //
//-----------
// Unreal Tournament SDK (c) 2007-2011 Stephan "Shadow" Nagel
// Under Artistic License 2.0
//
// UnSDKScript.h
//
// Header by: Shadow
//
// Description:
// Some additional Native Function Script Macros, makes life a bit easiear..
//=============================================================================

/*=============================================================================
 Variable Type Related Macros
==============================================================================*/

// Build 100 -----------------------------------------------------------------

//Plane
#define P_GET_PLANE(var)			P_GET_STRUCT(FPlane,var)
#define P_GET_PLANE_OPTX(var,def)		P_GET_STRUCT_OPTX(FPlane,var,def)
#define P_GET_PLANE_REF(var)			P_GET_STRUCT_REF(FPlane,var)

//Coords
#define P_GET_COORDS(var)			P_GET_STRUCT(FCoords,var)
#define P_GET_COORDS_OPTX(var,def)		P_GET_STRUCT_OPTX(FCoords,var,def)
#define P_GET_COORDS_REF(var)			P_GET_STRUCT_REF(FCoords,var)

//Box
#define P_GET_BOX(var)				P_GET_STRUCT(FBox,var)
#define P_GET_BOX_OPTX(var,def)			P_GET_STRUCT_OPTX(FBox,var,def)
#define P_GET_BOX_REF(var)			P_GET_STRUCT_REF(FBox,var)


/*=============================================================================
 Data/Class Type Related Macros
==============================================================================*/

// Build 100 -----------------------------------------------------------------

//Color
#define P_GET_COLOR(var)			P_GET_STRUCT(FColor,var)
#define P_GET_COLOR_OPTX(var,def)		P_GET_STRUCT_OPTX(FColor,var,def)
#define P_GET_COLOR_REF(var)			P_GET_STRUCT_REF(FColor,var)


//Texture
#define P_GET_TEX(var)					P_GET_OBJECT(UTexture,var)
#define P_GET_TEX_OPTX(var,def)			P_GET_OBJECT_OPTX(UTexture,var,def)
#define P_GET_TEX_REF(var)				P_GET_OBJECT_REF(UTexture,var)

//ScriptedTexture
#define P_GET_SCRIPTEDTEX(var)			P_GET_OBJECT(UScriptedTexture,var)
#define P_GET_SCRIPTEDTEX_OPTX(var,def)		P_GET_OBJECT_OPTX(UScriptedTexture,var,def)
#define P_GET_SCRIPTEDTEX_REF(var)		P_GET_OBJECT_REF(UTScriptedexture,var)

//Sound
#define P_GET_SOUND(var)			P_GET_OBJECT(USound,var)
#define P_GET_SOUND_OPTX(var,def)		P_GET_OBJECT_OPTX(USound,var,def)
#define P_GET_SOUND_REF(var)			P_GET_OBJECT_REF(USound,var)

//Music
#define P_GET_MUSICK(var)			P_GET_OBJECT(UMusic,var)
#define P_GET_MUSICK_OPTX(var,def)		P_GET_OBJECT_OPTX(UMusic,var,def)
#define P_GET_MUSICK_REF(var)			P_GET_OBJECT_REF(UMusic,var)

//Font
#define P_GET_FONT(var)					P_GET_OBJECT(UFont,var)
#define P_GET_FONT_OPTX(var,def)		P_GET_OBJECT_OPTX(UFont,var,def)
#define P_GET_FONT_REF(var)				P_GET_OBJECT_REF(UFont,var)

//Mesh
#define P_GET_MESH(var)					P_GET_OBJECT(UMesh,var)
#define P_GET_MESH_OPTX(var,def)		P_GET_OBJECT_OPTX(UMesh,var,def)
#define P_GET_MESH_REF(var)				P_GET_OBJECT_REF(UMesh,var)


// Build 148 -----------------------------------------------------------------

//UClass
#define P_GET_CLASS(var)				P_GET_OBJECT(UClass,var)
#define P_GET_CLASS_OPTX(var,def)		P_GET_OBJECT_OPTX(UClass,var,def)
#define P_GET_CLASS_REF(var)			P_GET_OBJECT_REF(UClass,var)

//LOD Mesh
#define P_GET_LMESH(var)				P_GET_OBJECT(ULodMesh,var)
#define P_GET_LMESH_OPTX(var,def)		P_GET_OBJECT_OPTX(ULodMesh,var,def)
#define P_GET_LMESH_REF(var)			P_GET_OBJECT_REF(ULodMesh,var)

//Skeletal Mesh
#define P_GET_SKELMESH(var)				P_GET_OBJECT(USkeletalMesh,var)
#define P_GET_SKELMESH_OPTX(var,def)	P_GET_OBJECT_OPTX(USkeletalMesh,var,def)
#define P_GET_SKELMESH_REF(var)			P_GET_OBJECT_REF(USkeletalMesh,var)


/*=============================================================================
 Dynamic Array Macros
==============================================================================*/

// Build 148 ------------------------------------------------------------------

//Dynamic Array
#define P_GET_TARRAY_REF(var,type) TArray<type> var##T; GPropAddr=0; Stack.Step( Stack.Object, &var##T ); TArray<type>* var = GPropAddr ? (TArray<type>*)GPropAddr:&var##T;

// Build 172 ------------------------------------------------------------------

#define P_GET_ARRPROP(var)				P_GET_OBJECT(UArrayProperty,var)
#define P_GET_ARRPROP_OPTX(var,def)		P_GET_OBJECT_OPTX(UArrayProperty,var,def)
#define P_GET_ARRPROP_REF(var)			P_GET_OBJECT_REF(UArrayProperty,var)


/*=============================================================================
 Actor/Object Related Macros
==============================================================================*/

// Build 120 -----------------------------------------------------------------

//Canvas
#define P_GET_CANVAS(var)			P_GET_OBJECT(UCanvas,var)
#define P_GET_CANVAS_OPTX(var,def)		P_GET_OBJECT_OPTX(UCanvas,var,def)
#define P_GET_CANVAS_REF(var)			P_GET_OBJECT_REF(UCanvas,var)

//Carcass
#define P_GET_CARCASS(var)			P_GET_OBJECT(ACarcass,var)
#define P_GET_CARCASS_OPTX(var,def)		P_GET_OBJECT_OPTX(ACarcass,var,def)
#define P_GET_CARCASS_REF(var)			P_GET_OBJECT_REF(ACarcass,var)

//Decal
#define P_GET_DECAL(var)			P_GET_OBJECT(ADecal,var)
#define P_GET_DECAL_OPTX(var,def)		P_GET_OBJECT_OPTX(ADecal,var,def)
#define P_GET_DECAL_REF(var)			P_GET_OBJECT_REF(ADecal,var)

//Decoration
#define P_GET_DECORATION(var)			P_GET_OBJECT(ADecoration,var)
#define P_GET_DECORATION_OPTX(var,def)		P_GET_OBJECT_OPTX(ADecoration,var,def)
#define P_GET_DECORATION_REF(var)		P_GET_OBJECT_REF(ADecoration,var)

//GameInfo
#define P_GET_GAMEINFO(var)			P_GET_OBJECT(AGameInfo,var)
#define P_GET_GAMEINFO_OPTX(var,def)		P_GET_OBJECT_OPTX(AGameInfo,var,def)
#define P_GET_GAMEINFO_REF(var)			P_GET_OBJECT_REF(AGameInfo,var)

//GameReplicationInfo
#define P_GET_GRI(var)				P_GET_OBJECT(AGameReplicationInfo,var)
#define P_GET_GRI_OPTX(var,def)			P_GET_OBJECT_OPTX(AGameReplicationInfo,var,def)
#define P_GET_GRI_REF(var)			P_GET_OBJECT_REF(AGameReplicationInfo,var)

//HUD
#define P_GET_HUD(var)				P_GET_OBJECT(AHUD,var)
#define P_GET_HUD_OPTX(var,def)			P_GET_OBJECT_OPTX(AHUD,var,def)
#define P_GET_HUD_REF(var)			P_GET_OBJECT_REF(AHUD,var)

//Info
#define P_GET_INFO(var)				P_GET_OBJECT(AInfo,var)
#define P_GET_INFO_OPTX(var,def)		P_GET_OBJECT_OPTX(AInfo,var,def)
#define P_GET_INFO_REF(var)			P_GET_OBJECT_REF(AInfo,var)

//InterpolationPoint
#define P_GET_INTERP(var)			P_GET_OBJECT(AInterpolationPoint,var)
#define P_GET_INTERP_OPTX(var,def)		P_GET_OBJECT_OPTX(AInterpolationPoint,var,def)
#define P_GET_INTERP_REF(var)			P_GET_OBJECT_REF(AInterpolationPoint,var)

//Inventory
#define P_GET_INV(var)				P_GET_OBJECT(AInventory,var)
#define P_GET_INV_OPTX(var,def)			P_GET_OBJECT_OPTX(AInventory,var,def)
#define P_GET_INV_REF(var)			P_GET_OBJECT_REF(AInventory,var)

//Keyoint
#define P_GET_KEYPOINT(var)			P_GET_OBJECT(AKeypoint,var)
#define P_GET_KEYPOINT_OPTX(var,def)		P_GET_OBJECT_OPTX(AKeypoint,var,def)
#define P_GET_KEYPOINT_REF(var)			P_GET_OBJECT_REF(AKeypoint,var)

//Level
#define P_GET_LEVEL(var)			P_GET_OBJECT(ULevel,var)
#define P_GET_LEVEL_OPTX(var,def)		P_GET_OBJECT_OPTX(ULevel,var,def)
#define P_GET_LEVEL_REF(var)			P_GET_OBJECT_REF(ULevel,var)

//Light
#define P_GET_LIGHT(var)			P_GET_OBJECT(ALight,var)
#define P_GET_LIGHT_OPTX(var,def)		P_GET_OBJECT_OPTX(ALight,var,def)
#define P_GET_LIGHT_REF(var)			P_GET_OBJECT_REF(ALight,var)

//Menu
#define P_GET_MENU(var)				P_GET_OBJECT(AMenu,var)
#define P_GET_MENU_OPTX(var,def)		P_GET_OBJECT_OPTX(AMenu,var,def)
#define P_GET_MENU_REF(var)			P_GET_OBJECT_REF(AMenu,var)

//Mutator
#define P_GET_MUTATOR(var)			P_GET_OBJECT(AMutator,var)
#define P_GET_MUTATOR_OPTX(var,def)		P_GET_OBJECT_OPTX(AMutator,var,def)
#define P_GET_MUTATOR_REF(var)			P_GET_OBJECT_REF(AMutator,var)

//Navigationpoint
#define P_GET_NAVPOINT(var)			P_GET_OBJECT(ANavigationPoint,var)
#define P_GET_NAVPOINT_OPTX(var,def)		P_GET_OBJECT_OPTX(ANavigationPoint,var,def)
#define P_GET_NAVPOINT_REF(var)			P_GET_OBJECT_REF(ANavigationPoint,var)

//Pawn
#define P_GET_PAWN(var)				P_GET_OBJECT(APawn,var)
#define P_GET_PAWN_OPTX(var,def)		P_GET_OBJECT_OPTX(APawn,var,def)
#define P_GET_PAWN_REF(var)			P_GET_OBJECT_REF(APawn,var)

//Pickup
#define P_GET_PICKUP(var)			P_GET_OBJECT(APickup,var)
#define P_GET_PICKUP_OPTX(var,def)		P_GET_OBJECT_OPTX(APickup,var,def)
#define P_GET_PICKUP_REF(var)			P_GET_OBJECT_REF(APickup,var)

//Playerpawn
#define P_GET_PLAYERPAWN(var)			P_GET_OBJECT(APlayerPawn,var)
#define P_GET_PLAYERPAWN_OPTX(var,def)		P_GET_OBJECT_OPTX(APlayerPawn,var,def)
#define P_GET_PLAYERPAWN_REF(var)		P_GET_OBJECT_REF(APlayerPawn,var)

//PlayerReplicationInfo
#define P_GET_PRI(var)				P_GET_OBJECT(APlayerReplicationInfo,var)
#define P_GET_PRI_OPTX(var,def)			P_GET_OBJECT_OPTX(APlayerReplicationInfo,var,def)
#define P_GET_PRI_REF(var)			P_GET_OBJECT_REF(APlayerReplicationInfo,var)

//Projectile
#define P_GET_PROJECTILE(var)			P_GET_OBJECT(AProjetile,var)
#define P_GET_PROJECTILE_OPTX(var,def)		P_GET_OBJECT_OPTX(AProjetile,var,def)
#define P_GET_PROJECTILE_REF(var)		P_GET_OBJECT_REF(AProjetile,var)

//ReplicationInfo
#define P_GET_RI(var)				P_GET_OBJECT(AReplicationInfo,var)
#define P_GET_RI_OPTX(var,def)			P_GET_OBJECT_OPTX(AReplicationInfo,var,def)
#define P_GET_RI_REF(var)			P_GET_OBJECT_REF(AReplicationInfo,var)

//SpawnNotify
#define P_GET_SPAWNNOTIFY(var)			P_GET_OBJECT(ASpawnNotify,var)
#define P_GET_SPAWNNOTIFY_OPTX(var,def)		P_GET_OBJECT_OPTX(ASpawnNotify,var,def)
#define P_GET_SPAWNNOTIFY_REF(var)		P_GET_OBJECT_REF(ASpawnNotify,var)

//Triggers
#define P_GET_TRIGGERS(var)			P_GET_OBJECT(ATriggers,var)
#define P_GET_TRIGGERS_OPTX(var,def)		P_GET_OBJECT_OPTX(ATriggers,var,def)
#define P_GET_TRIGGERS_REF(var)			P_GET_OBJECT_REF(ATriggers,var)

//Trigger
#define P_GET_TRIGGER(var)			P_GET_OBJECT(ATrigger,var)
#define P_GET_TRIGGER_OPTX(var,def)		P_GET_OBJECT_OPTX(ATrigger,var,def)
#define P_GET_TRIGGER_REF(var)			P_GET_OBJECT_REF(ATrigger,var)

//Weapon
#define P_GET_WEAPON(var)			P_GET_OBJECT(AWeapon,var)
#define P_GET_WEAPON_OPTX(var,def)		P_GET_OBJECT_OPTX(AWeapon,var,def)
#define P_GET_WEAPON_REF(var)			P_GET_OBJECT_REF(AWeapon,var)

//ZoneInfo
#define P_GET_ZONEINFO(var)			P_GET_OBJECT(AZoneInfo,var)
#define P_GET_ZONEINFO_OPTX(var,def)		P_GET_OBJECT_OPTX(AZoneInfo,var,def)
#define P_GET_ZONEINFO_REF(var)			P_GET_OBJECT_REF(AZoneInfo,var)



