diff --git a/LICENSES b/LICENSES index a3984b1..fd72552 100644 --- a/LICENSES +++ b/LICENSES @@ -64,6 +64,22 @@ License: CC BY-SA 3.0 ------------------------------------------------------------------------ +gfx/friendArrowEast.png +gfx/friendArrowNorth.png +gfx/friendArrowNorthEast.png +gfx/friendArrowNorthWest.png +gfx/friendArrowSouth.png +gfx/friendArrowSouthEast.png +gfx/friendArrowSouthWest.png +gfx/friendArrowWest.png + +Authors: + Astrid S. de Wijn + onpon4 +License: CC BY-SA 3.0 + +------------------------------------------------------------------------ + gfx/face_chris.png gfx/face_phoebe.png gfx/face_sid.png diff --git a/gfx/friendArrowEast.png b/gfx/friendArrowEast.png new file mode 100644 index 0000000..e364c48 Binary files /dev/null and b/gfx/friendArrowEast.png differ diff --git a/gfx/friendArrowNorth.png b/gfx/friendArrowNorth.png new file mode 100644 index 0000000..b443000 Binary files /dev/null and b/gfx/friendArrowNorth.png differ diff --git a/gfx/friendArrowNorthEast.png b/gfx/friendArrowNorthEast.png new file mode 100644 index 0000000..fb5de59 Binary files /dev/null and b/gfx/friendArrowNorthEast.png differ diff --git a/gfx/friendArrowNorthWest.png b/gfx/friendArrowNorthWest.png new file mode 100644 index 0000000..4be252b Binary files /dev/null and b/gfx/friendArrowNorthWest.png differ diff --git a/gfx/friendArrowSouth.png b/gfx/friendArrowSouth.png new file mode 100644 index 0000000..4ba13bf Binary files /dev/null and b/gfx/friendArrowSouth.png differ diff --git a/gfx/friendArrowSouthEast.png b/gfx/friendArrowSouthEast.png new file mode 100644 index 0000000..517c2d9 Binary files /dev/null and b/gfx/friendArrowSouthEast.png differ diff --git a/gfx/friendArrowSouthWest.png b/gfx/friendArrowSouthWest.png new file mode 100644 index 0000000..1ded3b8 Binary files /dev/null and b/gfx/friendArrowSouthWest.png differ diff --git a/gfx/friendArrowWest.png b/gfx/friendArrowWest.png new file mode 100644 index 0000000..9f07485 Binary files /dev/null and b/gfx/friendArrowWest.png differ diff --git a/src/defs.h b/src/defs.h index ecf21b3..59b179d 100644 --- a/src/defs.h +++ b/src/defs.h @@ -367,6 +367,14 @@ enum { SP_ARROW_SOUTHWEST, SP_ARROW_WEST, SP_ARROW_NORTHWEST, + SP_ARROW_FRIEND_NORTH, + SP_ARROW_FRIEND_NORTHEAST, + SP_ARROW_FRIEND_EAST, + SP_ARROW_FRIEND_SOUTHEAST, + SP_ARROW_FRIEND_SOUTH, + SP_ARROW_FRIEND_SOUTHWEST, + SP_ARROW_FRIEND_WEST, + SP_ARROW_FRIEND_NORTHWEST, SP_TARGET, SP_MAX diff --git a/src/game.cpp b/src/game.cpp index ea0ddd5..af52f59 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1613,25 +1613,25 @@ static void game_doArrow(int i) if (aliens[i].x + aliens[i].image[0]->w < 0) { if (aliens[i].y + aliens[i].image[0]->h < 0) - arrow = SP_ARROW_NORTHWEST; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_NORTHWEST : SP_ARROW_NORTHWEST; else if (aliens[i].y > screen->h) - arrow = SP_ARROW_SOUTHWEST; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_SOUTHWEST : SP_ARROW_SOUTHWEST; else - arrow = SP_ARROW_WEST; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_WEST : SP_ARROW_WEST; } else if (aliens[i].x > screen->w) { if (aliens[i].y + aliens[i].image[0]->h < 0) - arrow = SP_ARROW_NORTHEAST; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_NORTHEAST : SP_ARROW_NORTHEAST; else if (aliens[i].y > screen->h) - arrow = SP_ARROW_SOUTHEAST; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_SOUTHEAST : SP_ARROW_SOUTHEAST; else - arrow = SP_ARROW_EAST; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_EAST : SP_ARROW_EAST; } else if (aliens[i].y + aliens[i].image[0]->h < 0) - arrow = SP_ARROW_NORTH; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_NORTH : SP_ARROW_NORTH; else if (aliens[i].y > screen->h) - arrow = SP_ARROW_SOUTH; + arrow = (aliens[i].flags & FL_FRIEND) ? SP_ARROW_FRIEND_SOUTH : SP_ARROW_SOUTH; if (arrow != -1) { diff --git a/src/resources.cpp b/src/resources.cpp index 51deec8..21fcd7b 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -219,6 +219,14 @@ void loadGameGraphics() gfx_sprites[SP_ARROW_SOUTHWEST] = gfx_loadImage("gfx/arrowSouthWest.png"); gfx_sprites[SP_ARROW_WEST] = gfx_loadImage("gfx/arrowWest.png"); gfx_sprites[SP_ARROW_NORTHWEST] = gfx_loadImage("gfx/arrowNorthWest.png"); + gfx_sprites[SP_ARROW_FRIEND_NORTH] = gfx_loadImage("gfx/friendArrowNorth.png"); + gfx_sprites[SP_ARROW_FRIEND_NORTHEAST] = gfx_loadImage("gfx/friendArrowNorthEast.png"); + gfx_sprites[SP_ARROW_FRIEND_EAST] = gfx_loadImage("gfx/friendArrowEast.png"); + gfx_sprites[SP_ARROW_FRIEND_SOUTHEAST] = gfx_loadImage("gfx/friendArrowSouthEast.png"); + gfx_sprites[SP_ARROW_FRIEND_SOUTH] = gfx_loadImage("gfx/friendArrowSouth.png"); + gfx_sprites[SP_ARROW_FRIEND_SOUTHWEST] = gfx_loadImage("gfx/friendArrowSouthWest.png"); + gfx_sprites[SP_ARROW_FRIEND_WEST] = gfx_loadImage("gfx/friendArrowWest.png"); + gfx_sprites[SP_ARROW_FRIEND_NORTHWEST] = gfx_loadImage("gfx/friendArrowNorthWest.png"); gfx_sprites[SP_TARGET] = gfx_loadImage("gfx/targetText.png"); gfx_sprites[SP_ESCAPE_POD] = gfx_loadImage("gfx/pod.png"); gfx_sprites[SP_ORE] = gfx_loadImage("gfx/ore1.png");