From 6628e7de58425b3e93da9ae6fcb7347137d96096 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Sun, 12 Mar 2017 21:09:29 +0100 Subject: * Player can now select nearest unit or building. Multiple buildings and units can be selected at the same time. * Unit module moved from C++ to C (only extension change - and compiler - was needed). * GfxGetHeightFromSpriteData and GfxGetWidthFromSpriteData were getting incorrect data! Incorrect memory address was being read when calling pgm_read_byte, and caused unexpected behaviour under real hw. --- GameStructures.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'GameStructures.h') diff --git a/GameStructures.h b/GameStructures.h index 758affb..058d1d6 100644 --- a/GameStructures.h +++ b/GameStructures.h @@ -36,10 +36,12 @@ typedef struct t_Unit { uint16_t x; uint16_t y; + uint16_t target_x; + uint16_t target_y; uint8_t hp; uint8_t id; bool dir; // False = up-down; true = left-right - bool walk; + bool walking; bool alive; bool selected; }TYPE_UNIT; -- cgit v1.2.3