From d85464781580796bbcc744ae732e56d1920e3b0f Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Fri, 10 Nov 2017 00:04:35 +0100 Subject: Kinda improved pathfinding algorithm. Still some work TODO. Fixed some errors in DEBUG_VAR macro. Shadows are now drawn before any other object. Different strings are now shown depending on the number of selected units. Some work on calculating actions mask when different types of units are selected. Still some work TODO. --- Unit.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Unit.h') diff --git a/Unit.h b/Unit.h index dd9936f..b5a4409 100644 --- a/Unit.h +++ b/Unit.h @@ -100,17 +100,18 @@ void UnitHandler(TYPE_UNIT* unitArray, size_t sz); uint8_t UnitGetHpFromID(TYPE_UNIT_ID id); uint8_t UnitGetWidthFromID(TYPE_UNIT_ID id); uint8_t UnitGetHeightFromID(TYPE_UNIT_ID id); -uint8_t UnitGetAvailableActions(TYPE_UNIT* ptrUnit); +uint8_t UnitGetAvailableActions(TYPE_UNIT *ptrUnit); TYPE_RESOURCES UnitNeededResourcesFromID(TYPE_UNIT_ID id); // Rendering -void UnitDraw(TYPE_UNIT* ptrUnit, TYPE_CAMERA* ptrCamera, bool bHighlighted); +void UnitDraw(TYPE_UNIT *ptrUnit, TYPE_CAMERA* ptrCamera, bool bHighlighted); +void UnitDrawShadow(TYPE_UNIT *ptrUnit, TYPE_CAMERA *ptrCamera); // Movement -void UnitMoveTo(TYPE_UNIT* ptrUnit, uint16_t x, uint16_t y); +void UnitMoveTo(TYPE_UNIT *ptrUnit, uint16_t x, uint16_t y); // Collision cheking -bool UnitCheckCollisionAgainstOtherUnits(TYPE_COLLISION_BLOCK* cb, TYPE_UNIT* ptrUnitArray, TYPE_UNIT* ptrCurrentUnit); +bool UnitCheckCollisionAgainstOtherUnits(TYPE_COLLISION_BLOCK* cb, TYPE_UNIT *ptrUnitArray, TYPE_UNIT* ptrCurrentUnit); // Selection index const char* UnitGetActionString(UNIT_ACTION action); -- cgit v1.2.3