diff options
author | Bad Diode <bd@badd10de.dev> | 2021-04-15 13:47:08 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-04-15 13:47:08 +0200 |
commit | 15bbf02a92688dfe38b892d327fb54cf051a0808 (patch) | |
tree | 6d50202df44f57ec091898ccab06701999e119ef | |
parent | dd5bf6cfc680451f7fc69f3251d103739ae6446b (diff) | |
download | gba-experiments-15bbf02a92688dfe38b892d327fb54cf051a0808.tar.gz gba-experiments-15bbf02a92688dfe38b892d327fb54cf051a0808.zip |
Update some comments
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -100,7 +100,7 @@ draw_line(int x0, int y0, int x1, int y1, Color clr) { | |||
100 | int x = x0; | 100 | int x = x0; |
101 | int y = y0; | 101 | int y = y0; |
102 | 102 | ||
103 | // Normalize the drawing direction to always draw from (x0, y0)->(x1, y1) | 103 | // Adjust the step direction and calculate deltas. |
104 | int x_step = 1; | 104 | int x_step = 1; |
105 | int y_step = 1; | 105 | int y_step = 1; |
106 | int dx = x1 - x0; | 106 | int dx = x1 - x0; |
@@ -114,7 +114,7 @@ draw_line(int x0, int y0, int x1, int y1, Color clr) { | |||
114 | dy = y0 - y1; | 114 | dy = y0 - y1; |
115 | } | 115 | } |
116 | 116 | ||
117 | // Precalculate line deltas. | 117 | // Precalculate 2 * deltas for x and y. |
118 | int ddx = dx + dx; | 118 | int ddx = dx + dx; |
119 | int ddy = dy + dy; | 119 | int ddy = dy + dy; |
120 | 120 | ||