test/testgesture.c
changeset 7678 286c42d7c5ed
parent 7677 871d43c6968a
child 7900 cc2289c332eb
     1.1 --- a/test/testgesture.c	Wed Aug 21 09:43:09 2013 -0300
     1.2 +++ b/test/testgesture.c	Wed Aug 21 09:47:10 2013 -0300
     1.3 @@ -49,7 +49,7 @@
     1.4  #define BPP 4
     1.5  #define DEPTH 32
     1.6  
     1.7 -/*MUST BE A POWER OF 2! */
     1.8 +/* MUST BE A POWER OF 2! */
     1.9  #define EVENT_BUF_SIZE 256
    1.10  
    1.11  
    1.12 @@ -102,9 +102,9 @@
    1.13    SDL_memcpy(&colour,pixmem32,screen->format->BytesPerPixel);
    1.14  
    1.15    SDL_GetRGB(colour,screen->format,&r,&g,&b);
    1.16 -  /*r = 0;g = 0; b = 0; */
    1.17 +  /* r = 0;g = 0; b = 0; */
    1.18    a = (float)((col>>24)&0xFF);
    1.19 -  if(a == 0) a = 0xFF; /*Hack, to make things easier. */
    1.20 +  if(a == 0) a = 0xFF; /* Hack, to make things easier. */
    1.21    a /= 0xFF;
    1.22    r = (Uint8)(r*(1-a) + ((col>>16)&0xFF)*(a));
    1.23    g = (Uint8)(g*(1-a) + ((col>> 8)&0xFF)*(a));
    1.24 @@ -127,7 +127,7 @@
    1.25    float xr;
    1.26    for(ty = (float)-SDL_fabs(r);ty <= (float)SDL_fabs((int)r);ty++) {
    1.27      xr = (float)sqrt(r*r - ty*ty);
    1.28 -    if(r > 0) { /*r > 0 ==> filled circle */
    1.29 +    if(r > 0) { /* r > 0 ==> filled circle */
    1.30        for(tx=-xr+.5f;tx<=xr-.5;tx++) {
    1.31      setpix(screen,x+tx,y+ty,c);
    1.32        }
    1.33 @@ -157,7 +157,7 @@
    1.34      setpix(screen,(float)x,(float)y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255);
    1.35  #endif
    1.36  
    1.37 -  /*draw Touch History */
    1.38 +  /* draw Touch History */
    1.39    for(i = eventWrite; i < eventWrite+EVENT_BUF_SIZE; ++i) {
    1.40      const SDL_Event *event = &events[i&(EVENT_BUF_SIZE-1)];
    1.41      float age = (float)(i - eventWrite) / EVENT_BUF_SIZE;
    1.42 @@ -170,7 +170,7 @@
    1.43        x = event->tfinger.x;
    1.44        y = event->tfinger.y;
    1.45  
    1.46 -      /*draw the touch: */
    1.47 +      /* draw the touch: */
    1.48        c = colors[event->tfinger.fingerId%7];
    1.49        col = ((unsigned int)(c*(.1+.85))) | (unsigned int)(0xFF*age)<<24;
    1.50  
    1.51 @@ -210,7 +210,7 @@
    1.52    /* Enable standard application logging */
    1.53    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
    1.54  
    1.55 -  /*gesture variables */
    1.56 +  /* gesture variables */
    1.57    knob.r = .1f;
    1.58    knob.ang = 0;
    1.59  
    1.60 @@ -225,7 +225,7 @@
    1.61    while(!quitting) {
    1.62      while(SDL_PollEvent(&event))
    1.63        {
    1.64 -    /*Record _all_ events */
    1.65 +    /* Record _all_ events */
    1.66      events[eventWrite & (EVENT_BUF_SIZE-1)] = event;
    1.67      eventWrite++;
    1.68