diff options
| -rw-r--r-- | src/ray.c | 12 | 
1 files changed, 9 insertions, 3 deletions
@@ -161,7 +161,13 @@ draw_res(void)  	for (int i = 1; i < STATE_COUNT; i++)  	{ -		int j = (current_state - i)%STATE_COUNT; +		int j = current_state - i; + +		if (j < 0) +			j += STATE_COUNT; + +		TraceLog(LOG_DEBUG, "i = %d", i); +		TraceLog(LOG_DEBUG, "j = %d", j);  		if (states[j].ms == 0)  			break; @@ -177,8 +183,8 @@ draw_res(void)  		font_size = min(win_height/STATE_COUNT, MAX_FONTSIZE/2);  		txt_width = MeasureText(txt, font_size); -		/* TODO: draw every results */ -		DrawText(txt, win_width-txt_width, (int) font_size*1.2*i, font_size, col); +		DrawText(txt, win_width-txt_width, +			 (int) font_size*1.2*(i-1), font_size, col);  	}  }  | 
