Changeset 685 for soft/giet_vm/applications/raycast/disp.c
- Timestamp:
- Aug 3, 2015, 7:07:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/raycast/disp.c
r684 r685 36 36 static void dispDrawColumnTex(int x, int y0, int y1, unsigned char *line) 37 37 { 38 int y; 39 40 if (x < 0 || x >= FBUF_X_SIZE) 41 return; 42 43 for (y = y0; y < y1 && y < FBUF_Y_SIZE; y++) { 44 if (y < 0) 45 y = 0; 46 38 int y = (y0 >= 0 ? y0 : 0); 39 40 for (; y < y1 && y < FBUF_Y_SIZE; y++) { 41 // Find texture coordinate 47 42 int ty = (y - y0) * TEX_SIZE / (y1 - y0); 48 43 … … 53 48 static void dispDrawColumnSolid(int x, int y0, int y1, unsigned char color) 54 49 { 55 int y; 56 57 if (x < 0 || x >= FBUF_X_SIZE) 58 return; 59 60 for (y = y0; y < y1 && y < FBUF_Y_SIZE; y++) { 61 if (y < 0) 62 y = 0; 63 50 int y = (y0 >= 0 ? y0 : 0); 51 52 for (; y < y1 && y < FBUF_Y_SIZE; y++) { 64 53 buf[cur_buf][y * FBUF_X_SIZE + x] = color; 65 54 }
Note: See TracChangeset
for help on using the changeset viewer.