changeset 2046:186cf6a7d634

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 03 Dec 2018 10:53:32 +0200
parents 1662730053d0
children 0a1fe72be4a9
files tests/blittest.c tests/fptest.c tests/plrtest.c tests/vecmattest.c
diffstat 4 files changed, 33 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/tests/blittest.c	Fri Nov 30 08:01:46 2018 +0200
+++ b/tests/blittest.c	Mon Dec 03 10:53:32 2018 +0200
@@ -44,7 +44,7 @@
     case 2:
         dmVerbosity++;
         break;
-    
+
     case 3:
         optVFlags |= SDL_FULLSCREEN;
         break;
@@ -67,7 +67,7 @@
                 optScrWidth = w;
                 optScrHeight = h;
             }
-            else 
+            else
             {
                 dmErrorMsg("Invalid size argument '%s'.\n", optArg);
                 return FALSE;
@@ -83,7 +83,7 @@
         dmErrorMsg("Unknown option '%s'.\n", currArg);
         return FALSE;
     }
-    
+
     return TRUE;
 }
 
@@ -138,7 +138,7 @@
 {
     Uint8 *pix = screen->pixels;
     int xc, yc;
-    
+
     for (yc = 0; yc < screen->h; yc++)
     {
         Uint8 *dp = pix;
@@ -191,11 +191,11 @@
             vr.y = j;
             vr.z = light->z; // - 10.0;
 //            vr.z = pheightMap[j][i];
-            
+
             // Calculate light vector vector
             dm_vector_sub_r(&vl, &vr, light);
             vrayLen = dm_vector_length(&vl);
-            
+
 #if 1
             dm_vector_copy(&va, &vl);
             dm_vector_normalize(&va);
@@ -207,13 +207,13 @@
             do
             {
                 float h;
-                
+
                 // If ray is inside the heightmap, get value
                 if (vr.x >= 0 && vr.y >= 0 && vr.x < QWIDTH && vr.y < QHEIGHT)
                     h = pheightMap[(int) vr.y][(int) vr.x];
                 else
                     break;
-                
+
                 // Check for hits
                 if (h > vr.z)
                     wasHit = TRUE;
@@ -325,7 +325,7 @@
             dmErrorMsg("Could not create screen surface.\n");
             goto error_exit;
         }
-        
+
         dmMsg(0, "Benchmark mode, not opening window.\n");
     }
     else
@@ -341,7 +341,7 @@
     bmap = SDL_CreateRGBSurface(SDL_SWSURFACE, QWIDTH, QHEIGHT, 8, 0, 0, 0, 0);
     DM_MakePalette(bmap);
     DM_Random(bmap, 15);
-    
+
     DMVector light;
     DMBlockMap heightMap;
     light.x = light.y = 128;
@@ -368,17 +368,17 @@
                     switch (event.key.keysym.sym)
                     {
                         case SDLK_ESCAPE: exitFlag = TRUE; break;
-                        
+
                         case SDLK_F5:
                             showMap = !showMap;
                             break;
-                            
+
                         default:
                             break;
                     }
 
                     break;
-                
+
                 case SDL_VIDEORESIZE:
                     optScrWidth = event.resize.w;
                     optScrHeight = event.resize.h;
@@ -387,7 +387,7 @@
                         goto error_exit;
 
                     break;
-                
+
                 case SDL_VIDEOEXPOSE:
                     break;
 
@@ -411,12 +411,12 @@
             memcpy(bmap->pixels, heightMap, QWIDTH * QHEIGHT);
         else
             dmShadowTraceHeightMap(bmap->pixels, heightMap, &light);
-        
+
         dmScaledBlitSurfaceAny(bmap, 0, 0, screen->w, screen->h, screen, DMD_NONE);
 
         if (!optBenchmark)
         {
-            dmDrawTTFText(screen, font, fontcol, 0, 0, "%3.1f FPS", 
+            dmDrawTTFText(screen, font, fontcol, 0, 0, "%3.1f FPS",
                 (float) (numFrames * 1000.0f) / (float) (endTime - startTime));
 
             if (SDL_MUSTLOCK(screen) != 0)
--- a/tests/fptest.c	Fri Nov 30 08:01:46 2018 +0200
+++ b/tests/fptest.c	Mon Dec 03 10:53:32 2018 +0200
@@ -43,23 +43,23 @@
         case SDL_LIL_ENDIAN: s = "little endian"; break;
         default: s = "unknown?"; break;
     }
-    
+
     printf(
     "SDL byte order            = %s (%d)\n\n", s, SDL_BYTEORDER);
-    
+
     printf(
     "sizeof(DMFixedPoint)      = %" DM_PRId64 " bytes\n"
     "sizeof(DMFixedPoint.dw)   = %" DM_PRId64 " bytes (should be %d)\n"
     "sizeof(DMFixedPoint.w[0]) = %" DM_PRId64 " bytes (should be %d)\n",
     sizeof(a), sizeof(a.dw), FP_DW_SIZE,
     sizeof(a.w[0]), FP_W0_SIZE);
-    
+
     if (sizeof(a.dw) != FP_DW_SIZE || sizeof(a.w[0]) != FP_W0_SIZE)
     {
         printf("ERROR! Some type sizes DO NOT MATCH!\n");
         return -1;
     }
-    
+
     //-----------------------------------------------
     header("set initial values");
     FP_SETHL(a, 55, 0);
--- a/tests/plrtest.c	Fri Nov 30 08:01:46 2018 +0200
+++ b/tests/plrtest.c	Mon Dec 03 10:53:32 2018 +0200
@@ -119,19 +119,19 @@
         result = dmf_open_stdio_stream(stdin, &file);
     else
         result = dmf_open_stdio(inFilename, "rb", &file);
-    
+
     if (result != DMERR_OK)
     {
         fprintf(stderr, "Error opening input file '%s', #%d: %s\n",
             inFilename, result, dmErrorStr(result));
         return 1;
     }
-        
+
     // Initialize miniJSS
     fprintf(stderr, "Initializing miniJSS\n");
     jssInit();
 
-    
+
     // Read module file
     dmMsg(1, "Reading file: %s\n", inFilename);
 #ifdef JSS_SUP_XM
@@ -190,7 +190,7 @@
         fprintf(stderr, "jvmInit() returned NULL\n");
         return 3;
     }
-    
+
     afmt.samples  = afmt.freq / 4;
     afmt.callback = audioCallback;
     afmt.userdata = (void *) dev;
@@ -198,20 +198,20 @@
     // Open the audio device
     fprintf(stderr, "Trying to init SDL with: %d, %d, %d\n",
         afmt.format, afmt.channels, afmt.freq);
-    
+
     if (SDL_OpenAudio(&afmt, NULL) < 0)
     {
         fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
         return 4;
     }
-    
+
     // Initialize player
     if ((plr = jmpInit(dev)) == NULL)
     {
         fprintf(stderr, "jmpInit() returned NULL\n");
         return 4;
     }
-    
+
     // Initialize playing
     jvmSetCallback(dev, jmpExec, plr);
     jmpSetModule(plr, mod);
@@ -249,7 +249,7 @@
             printf("\n");
         }
     }
-    
+
     printf("----------------------------------------------------\n");
 
     SDL_LockAudio();
--- a/tests/vecmattest.c	Fri Nov 30 08:01:46 2018 +0200
+++ b/tests/vecmattest.c	Mon Dec 03 10:53:32 2018 +0200
@@ -52,7 +52,7 @@
         fprintf(f, "[");
         for (j = 0; j < DM_MATRIX_SIZE; j++)
             fprintf(f, "% 8.3f%s", mat->m[i][j], j < DM_MATRIX_SIZE - 1 ? " " : "");
-        
+
         fprintf(f, "]\n");
     }
 }
@@ -70,17 +70,17 @@
     DMMatrix m;
 
     (void) argc;
-    (void) argv;    
+    (void) argv;
 
     dm_vector_printf("a", &a);
     dm_vector_printf("b", &a);
-    
+
     dm_matrix_rot_a(&m, 0.5, 0.9, 0.1);
     dm_matrix_printf("m", &m);
 
     dm_vector_mul_by_mat(&b, &a, &m);
-    
+
     dm_vector_printf("nb", &b);
-    
+
     return 0;
 }