comparison src/events/SDL_mouse.c @ 1720:a1ebb17f9c52 SDL-1.3

Cleaned up a bunch of warnings, started adding Win32 event support
author Sam Lantinga <slouken@libsdl.org>
date Fri, 30 Jun 2006 05:42:49 +0000
parents 7688a73b25b1
children 5daa04d862f1
comparison
equal deleted inserted replaced
1719:5b9f50c957ed 1720:a1ebb17f9c52
51 51
52 int 52 int
53 SDL_AddMouse(const SDL_Mouse * mouse, int index) 53 SDL_AddMouse(const SDL_Mouse * mouse, int index)
54 { 54 {
55 SDL_Mouse **mice; 55 SDL_Mouse **mice;
56 SDL_Cursor *cursor;
57 int selected_mouse; 56 int selected_mouse;
58 57
59 /* Add the mouse to the list of mice */ 58 /* Add the mouse to the list of mice */
60 if (index < 0 || index >= SDL_num_mice || SDL_mice[index]) { 59 if (index < 0 || index >= SDL_num_mice || SDL_mice[index]) {
61 mice = 60 mice =
396 0xFF000000); 395 0xFF000000);
397 if (!surface) { 396 if (!surface) {
398 return NULL; 397 return NULL;
399 } 398 }
400 for (y = 0; y < h; ++y) { 399 for (y = 0; y < h; ++y) {
401 pixel = 400 pixel = (Uint32 *) ((Uint8 *) surface->pixels + y * surface->pitch);
402 (Uint32 *) ((Uint8 *) surface->pixels + y * surface->pitch +
403 x * 4);
404 for (x = 0; x < w; ++x) { 401 for (x = 0; x < w; ++x) {
405 if ((x % 8) == 0) { 402 if ((x % 8) == 0) {
406 datab = *data++; 403 datab = *data++;
407 maskb = *mask++; 404 maskb = *mask++;
408 } 405 }