808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
|
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
|
-
+
|
break;
case SDL_MOUSEBUTTONDOWN:
if(ev.button.x>=screen->w-161 && ev.button.x<screen->w-1 && ev.button.y>=40 && ev.button.y<200) {
x=(ev.button.x+161-screen->w)/10;
y=(ev.button.y-40)/10;
i=y*16+x;
pick:
y=SDL_GetModState();
y=SDL_GetModState()&0xFFF;
switch(ev.button.button) {
case 1: cc=i; break;
case 2:
for(x=(m.y+1)*pict[sel]->size+m.x;x<pict[sel]->size*(pict[sel]->size+1);x++) {
if(!y || ((y&(KMOD_CTRL|KMOD_SHIFT)) && (((x-x/pict[sel]->size)^(y&KMOD_CTRL?1:0))&1))) {
if(pict[sel]->data[x]==cc) pict[sel]->data[x]=i;
}
|