ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.195 by root, Sat Jul 14 12:05:52 2007 UTC vs.
Revision 1.196 by root, Sun Jul 15 21:02:20 2007 UTC

691 hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0); 691 hv_store (hv, "gain", 4, newSViv (ev.active.gain), 0);
692 hv_store (hv, "state", 5, newSViv (ev.active.state), 0); 692 hv_store (hv, "state", 5, newSViv (ev.active.state), 0);
693 break; 693 break;
694 694
695 case SDL_MOUSEMOTION: 695 case SDL_MOUSEMOTION:
696 {
697 int state = ev.motion.state;
698 int x = ev.motion.x;
699 int y = ev.motion.y;
700 int xrel = ev.motion.xrel;
701 int yrel = ev.motion.yrel;
702
703 /* do simplistic event compression */
704 while (SDL_PeepEvents (&ev, 1, SDL_PEEKEVENT, SDL_EVENTMASK (SDL_MOUSEMOTION)) > 0
705 && state == ev.motion.state)
706 {
707 xrel += ev.motion.xrel;
708 yrel += ev.motion.yrel;
709 x = ev.motion.x;
710 y = ev.motion.y;
711 SDL_PeepEvents (&ev, 1, SDL_GETEVENT, SDL_EVENTMASK (SDL_MOUSEMOTION));
712 }
713
696 hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); 714 hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0);
697
698 hv_store (hv, "state", 5, newSViv (ev.motion.state), 0); 715 hv_store (hv, "state", 5, newSViv (state), 0);
699 hv_store (hv, "x", 1, newSViv (ev.motion.x), 0); 716 hv_store (hv, "x", 1, newSViv (x), 0);
700 hv_store (hv, "y", 1, newSViv (ev.motion.y), 0); 717 hv_store (hv, "y", 1, newSViv (y), 0);
701 hv_store (hv, "xrel", 4, newSViv (ev.motion.xrel), 0); 718 hv_store (hv, "xrel", 4, newSViv (xrel), 0);
702 hv_store (hv, "yrel", 4, newSViv (ev.motion.yrel), 0); 719 hv_store (hv, "yrel", 4, newSViv (yrel), 0);
720 }
703 break; 721 break;
704 722
705 case SDL_MOUSEBUTTONDOWN: 723 case SDL_MOUSEBUTTONDOWN:
706 case SDL_MOUSEBUTTONUP: 724 case SDL_MOUSEBUTTONUP:
707 hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0); 725 hv_store (hv, "mod", 3, newSViv (SDL_GetModState ()), 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines