From 401a30679327075cf46527d9c9e440bc0e265498 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Fri, 8 Jan 2016 09:39:12 -0500 Subject: [PATCH] Added green versions of arrows for friendly ships. --- LICENSES | 16 ++++++++++++++++ gfx/friendArrowEast.png | Bin 0 -> 123 bytes gfx/friendArrowNorth.png | Bin 0 -> 115 bytes gfx/friendArrowNorthEast.png | Bin 0 -> 129 bytes gfx/friendArrowNorthWest.png | Bin 0 -> 130 bytes gfx/friendArrowSouth.png | Bin 0 -> 123 bytes gfx/friendArrowSouthEast.png | Bin 0 -> 129 bytes gfx/friendArrowSouthWest.png | Bin 0 -> 126 bytes gfx/friendArrowWest.png | Bin 0 -> 124 bytes src/defs.h | 8 ++++++++ src/game.cpp | 16 ++++++++-------- src/resources.cpp | 8 ++++++++ 12 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 gfx/friendArrowEast.png create mode 100644 gfx/friendArrowNorth.png create mode 100644 gfx/friendArrowNorthEast.png create mode 100644 gfx/friendArrowNorthWest.png create mode 100644 gfx/friendArrowSouth.png create mode 100644 gfx/friendArrowSouthEast.png create mode 100644 gfx/friendArrowSouthWest.png create mode 100644 gfx/friendArrowWest.png 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 0000000000000000000000000000000000000000..e364c488bafed2a34b29738e799579faea9caf53 GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2?>o-U3d6}Prd3glu?;BdD7l^1uj zpXIXDqGXO!&H=~!Jb6zyE^=$DdzwH literal 0 HcmV?d00001 diff --git a/gfx/friendArrowNorth.png b/gfx/friendArrowNorth.png new file mode 100644 index 0000000000000000000000000000000000000000..b44300023ea5893ab71ff106e87ea83d42cb2ec2 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2?}o-U3d6}Rr5H{@eb;BXG?e|NUq zhi~bWBfgX5mzkH$b-sB{e-Z=l6b9ZkjjcR3DGwg92LIUeGTp_H>*1p>(x+1X)B#Ol N@O1TaS?83{1OQtwChq_M literal 0 HcmV?d00001 diff --git a/gfx/friendArrowNorthEast.png b/gfx/friendArrowNorthEast.png new file mode 100644 index 0000000000000000000000000000000000000000..fb5de59a0d86ad4ff7bb8645c5fb5f695c043bc2 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2?Ro-U3d6}RS2h~{EY;9#-+b#D*5 z3-_d5(|E2N-!W^gvEBs>p_AH^-h?}aJDGFdovU$WlG&u)+15E%R9Ng!yK4&EZ*@9k bZI{jzXw9JTbZO`hpqUJwu6{1-oD!MR?rwF>mEAj)T%a*B0HM#5up&=tt&M3Az6MPt8nv chkpCXHXmeAc(8kaD9}&_Pgg&ebxsLQ0BT1oUH||9 literal 0 HcmV?d00001 diff --git a/gfx/friendArrowSouth.png b/gfx/friendArrowSouth.png new file mode 100644 index 0000000000000000000000000000000000000000..4ba13bff37ae16bb35fdb707c669cb0df46e3ef5 GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2?>o-U3d6}O(AKgh+Pz`=aM?ymj% ziwj+Y-AZ&eHvcq`_KTM+eOKFLQs<~~=g6D$>N7h3%wj%o{m^P5Q#%KzjnbNXY}2~F UNKaZX3^Ja<)78&qol`;+0NDg7_y7O^ literal 0 HcmV?d00001 diff --git a/gfx/friendArrowSouthEast.png b/gfx/friendArrowSouthEast.png new file mode 100644 index 0000000000000000000000000000000000000000..517c2d9dac83d678ff5a2347a163283a8e298346 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2?Ro-U3d6}RSIxXs0&z`=aMZm+$0 zbw^_L4U-6S3%7MLft%iIIVtdXDDXryHofO_aGp~<>BH^M^FtV4-D6?QI0_!%NP{iAK9`4XeNWFtDnm{r-UW|YBDS1 literal 0 HcmV?d00001 diff --git a/gfx/friendArrowSouthWest.png b/gfx/friendArrowSouthWest.png new file mode 100644 index 0000000000000000000000000000000000000000..1ded3b82cebd169054bb8b287e60ff5d4bc00bd9 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2^1o-U3d6}RS|Kgh+Pz`=aM?yh}& ztWwT1lSJ{43;RMnk{$h-SOS<_E~q5zV3$z&z!Q3~)g(jV*X{}-W!|XSb%Jsp#}{*^ X=`bkRi2OgTe~DWM4fMad-a literal 0 HcmV?d00001 diff --git a/gfx/friendArrowWest.png b/gfx/friendArrowWest.png new file mode 100644 index 0000000000000000000000000000000000000000..9f07485d756979f736af17c841fe7a86795be53f GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2^Xo-U3d6}Prt3glu?;9$Pc_wMXk zg^0vt&lx=RH7<$L$JcMX>8VlBt8{_mfrj$U#&xFb6C4w < 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");