summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-01-04 21:07:33 -0600
committerepoch <epoch@hacking.allowed.org>2017-01-04 21:07:33 -0600
commitaa423fa53e2a5a1c376203faff0f5b8c75d4b9d8 (patch)
tree5f7a081784a6362a670d2911b785379f3a5604c0 /src
parentddb236223753a2506b93d43b255175a2a916dd3c (diff)
downloadhackvr-aa423fa53e2a5a1c376203faff0f5b8c75d4b9d8.tar.gz
hackvr-aa423fa53e2a5a1c376203faff0f5b8c75d4b9d8.zip
made selected object have its shapes outlined with the default color
fixed the selected object to be closest instead of farthest. oops.
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/graphics.c b/src/graphics.c
index e658376..7508fc9 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -172,7 +172,12 @@ void draw_c3_shape(c3_s_t s) {//outlined. needs to be filled? //draw minimap shi
//between 0 to 100
// color_based_on_distance();//I don't have the distance in here. :/
//foreground_set();
+//how... I want to draw the outline as one color and the fill as another.
draw_cs_filled_shape(ss);
+ set_color();//resets it to the default color.
+ if(!strcmp(global.selected_object,ss.id)) {
+ draw_cs_shape(ss);
+ }
}
}
@@ -460,10 +465,10 @@ void draw_screen() {
}
qsort(&zs,i,sizeof(zs[0]),(__compar_fn_t)compar);//sort these zs structs based on d.
}
- //draw all triangles
- if(zs[0].s) {
- strcpy(global.selected_object,zs[0].s->id);
+ if(zs[i-1].s) {
+ strcpy(global.selected_object,zs[i-1].s->id);//0th is farthest. fixme.
}
+ //draw all triangles
for(i=0;global.shape[i];i++) {
//now we pick the color of this triangle!
if(gra_global.red_and_blue) {