Changeset 200
- Timestamp:
- Nov 19, 2003, 6:49:43 PM (19 years ago)
- Location:
- libcaca/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/src/blit.c
r199 r200 102 102 } 103 103 104 pitch = (3 * w + 3) / 4 * 4;105 //pitch = 4 * w;104 //pitch = (3 * w + 3) / 4 * 4; 105 pitch = 4 * w; 106 106 107 107 for(y = y1 > 0 ? y1 : 0; y <= y2 && y <= (int)caca_get_height(); y++) … … 115 115 int fromx = w * (x - x1) / (x2 - x1 + 1); 116 116 int fromy = h * (y - y1) / (y2 - y1 + 1); 117 int r = ((unsigned char *)pixels)[3 * fromx + pitch * fromy];118 int g = ((unsigned char *)pixels)[3 * fromx + 1 + pitch * fromy];119 int b = ((unsigned char *)pixels)[3 * fromx + 2 + pitch * fromy];120 //int b = ((unsigned char *)pixels)[4 * fromx + pitch * fromy];121 //int g = ((unsigned char *)pixels)[4 * fromx + 1 + pitch * fromy];122 //int r = ((unsigned char *)pixels)[4 * fromx + 2 + pitch * fromy];117 //int r = ((unsigned char *)pixels)[3 * fromx + pitch * fromy]; 118 //int g = ((unsigned char *)pixels)[3 * fromx + 1 + pitch * fromy]; 119 //int b = ((unsigned char *)pixels)[3 * fromx + 2 + pitch * fromy]; 120 int b = ((unsigned char *)pixels)[4 * fromx + pitch * fromy]; 121 int g = ((unsigned char *)pixels)[4 * fromx + 1 + pitch * fromy]; 122 int r = ((unsigned char *)pixels)[4 * fromx + 2 + pitch * fromy]; 123 123 int hue, sat, val; 124 124 -
libcaca/trunk/src/caca.c
r199 r200 98 98 SLang_init_tty(-1, 0, 1); 99 99 100 SLkp_define_keysym("\e[M", 1001);101 102 100 if(SLsmg_init_smg() == -1) 103 101 { … … 110 108 SLsmg_cls(); 111 109 SLtt_set_cursor_visibility(0); 112 SLtt_set_mouse_mode (1, 0); 110 SLkp_define_keysym("\e[M", 1001); 111 SLtt_set_mouse_mode(1, 0); 113 112 SLsmg_refresh(); 114 113 -
libcaca/trunk/src/io.c
r199 r200 103 103 key[5] = _read_key(); 104 104 105 event |= (int)(key[3] - ' ') << 8;106 event |= (int)(key[4] - ' ') << 4;105 event |= (int)(key[3] - ' ') << 16; 106 event |= (int)(key[4] - ' ') << 8; 107 107 event |= (int)(key[5] - ' ') << 0; 108 108
Note: See TracChangeset
for help on using the changeset viewer.