Cleaned up the file a bit for tutorial viewing
authorSam Lantinga <slouken@libsdl.org>
Fri, 11 Feb 2011 13:06:35 -0800
changeset 5255b0f5108fda60
parent 5254 f650566b2f51
child 5256 bbdf9250ee8b
Cleaned up the file a bit for tutorial viewing
test/teststreaming.c
     1.1 --- a/test/teststreaming.c	Fri Feb 11 12:24:59 2011 -0800
     1.2 +++ b/test/teststreaming.c	Fri Feb 11 13:06:35 2011 -0800
     1.3 @@ -6,7 +6,6 @@
     1.4  
     1.5  #include <stdlib.h>
     1.6  #include <stdio.h>
     1.7 -#include <string.h>
     1.8  
     1.9  #include "SDL.h"
    1.10  
    1.11 @@ -17,123 +16,38 @@
    1.12  #define MOOSEFRAMES_COUNT 10
    1.13  
    1.14  SDL_Color MooseColors[84] = {
    1.15 -    {49, 49, 49}
    1.16 -    , {66, 24, 0}
    1.17 -    , {66, 33, 0}
    1.18 -    , {66, 66, 66}
    1.19 -    ,
    1.20 -    {66, 115, 49}
    1.21 -    , {74, 33, 0}
    1.22 -    , {74, 41, 16}
    1.23 -    , {82, 33, 8}
    1.24 -    ,
    1.25 -    {82, 41, 8}
    1.26 -    , {82, 49, 16}
    1.27 -    , {82, 82, 82}
    1.28 -    , {90, 41, 8}
    1.29 -    ,
    1.30 -    {90, 41, 16}
    1.31 -    , {90, 57, 24}
    1.32 -    , {99, 49, 16}
    1.33 -    , {99, 66, 24}
    1.34 -    ,
    1.35 -    {99, 66, 33}
    1.36 -    , {99, 74, 33}
    1.37 -    , {107, 57, 24}
    1.38 -    , {107, 82, 41}
    1.39 -    ,
    1.40 -    {115, 57, 33}
    1.41 -    , {115, 66, 33}
    1.42 -    , {115, 66, 41}
    1.43 -    , {115, 74, 0}
    1.44 -    ,
    1.45 -    {115, 90, 49}
    1.46 -    , {115, 115, 115}
    1.47 -    , {123, 82, 0}
    1.48 -    , {123, 99, 57}
    1.49 -    ,
    1.50 -    {132, 66, 41}
    1.51 -    , {132, 74, 41}
    1.52 -    , {132, 90, 8}
    1.53 -    , {132, 99, 33}
    1.54 -    ,
    1.55 -    {132, 99, 66}
    1.56 -    , {132, 107, 66}
    1.57 -    , {140, 74, 49}
    1.58 -    , {140, 99, 16}
    1.59 -    ,
    1.60 -    {140, 107, 74}
    1.61 -    , {140, 115, 74}
    1.62 -    , {148, 107, 24}
    1.63 -    , {148, 115, 82}
    1.64 -    ,
    1.65 -    {148, 123, 74}
    1.66 -    , {148, 123, 90}
    1.67 -    , {156, 115, 33}
    1.68 -    , {156, 115, 90}
    1.69 -    ,
    1.70 -    {156, 123, 82}
    1.71 -    , {156, 132, 82}
    1.72 -    , {156, 132, 99}
    1.73 -    , {156, 156, 156}
    1.74 -    ,
    1.75 -    {165, 123, 49}
    1.76 -    , {165, 123, 90}
    1.77 -    , {165, 132, 82}
    1.78 -    , {165, 132, 90}
    1.79 -    ,
    1.80 -    {165, 132, 99}
    1.81 -    , {165, 140, 90}
    1.82 -    , {173, 132, 57}
    1.83 -    , {173, 132, 99}
    1.84 -    ,
    1.85 -    {173, 140, 107}
    1.86 -    , {173, 140, 115}
    1.87 -    , {173, 148, 99}
    1.88 -    , {173, 173, 173}
    1.89 -    ,
    1.90 -    {181, 140, 74}
    1.91 -    , {181, 148, 115}
    1.92 -    , {181, 148, 123}
    1.93 -    , {181, 156, 107}
    1.94 -    ,
    1.95 -    {189, 148, 123}
    1.96 -    , {189, 156, 82}
    1.97 -    , {189, 156, 123}
    1.98 -    , {189, 156, 132}
    1.99 -    ,
   1.100 -    {189, 189, 189}
   1.101 -    , {198, 156, 123}
   1.102 -    , {198, 165, 132}
   1.103 -    , {206, 165, 99}
   1.104 -    ,
   1.105 -    {206, 165, 132}
   1.106 -    , {206, 173, 140}
   1.107 -    , {206, 206, 206}
   1.108 -    , {214, 173, 115}
   1.109 -    ,
   1.110 -    {214, 173, 140}
   1.111 -    , {222, 181, 148}
   1.112 -    , {222, 189, 132}
   1.113 -    , {222, 189, 156}
   1.114 -    ,
   1.115 -    {222, 222, 222}
   1.116 -    , {231, 198, 165}
   1.117 -    , {231, 231, 231}
   1.118 -    , {239, 206, 173}
   1.119 +    {49, 49, 49}, {66, 24, 0}, {66, 33, 0}, {66, 66, 66},
   1.120 +    {66, 115, 49}, {74, 33, 0}, {74, 41, 16}, {82, 33, 8},
   1.121 +    {82, 41, 8}, {82, 49, 16}, {82, 82, 82}, {90, 41, 8},
   1.122 +    {90, 41, 16}, {90, 57, 24}, {99, 49, 16}, {99, 66, 24},
   1.123 +    {99, 66, 33}, {99, 74, 33}, {107, 57, 24}, {107, 82, 41},
   1.124 +    {115, 57, 33}, {115, 66, 33}, {115, 66, 41}, {115, 74, 0},
   1.125 +    {115, 90, 49}, {115, 115, 115}, {123, 82, 0}, {123, 99, 57},
   1.126 +    {132, 66, 41}, {132, 74, 41}, {132, 90, 8}, {132, 99, 33},
   1.127 +    {132, 99, 66}, {132, 107, 66}, {140, 74, 49}, {140, 99, 16},
   1.128 +    {140, 107, 74}, {140, 115, 74}, {148, 107, 24}, {148, 115, 82},
   1.129 +    {148, 123, 74}, {148, 123, 90}, {156, 115, 33}, {156, 115, 90},
   1.130 +    {156, 123, 82}, {156, 132, 82}, {156, 132, 99}, {156, 156, 156},
   1.131 +    {165, 123, 49}, {165, 123, 90}, {165, 132, 82}, {165, 132, 90},
   1.132 +    {165, 132, 99}, {165, 140, 90}, {173, 132, 57}, {173, 132, 99},
   1.133 +    {173, 140, 107}, {173, 140, 115}, {173, 148, 99}, {173, 173, 173},
   1.134 +    {181, 140, 74}, {181, 148, 115}, {181, 148, 123}, {181, 156, 107},
   1.135 +    {189, 148, 123}, {189, 156, 82}, {189, 156, 123}, {189, 156, 132},
   1.136 +    {189, 189, 189}, {198, 156, 123}, {198, 165, 132}, {206, 165, 99},
   1.137 +    {206, 165, 132}, {206, 173, 140}, {206, 206, 206}, {214, 173, 115},
   1.138 +    {214, 173, 140}, {222, 181, 148}, {222, 189, 132}, {222, 189, 156},
   1.139 +    {222, 222, 222}, {231, 198, 165}, {231, 231, 231}, {239, 206, 173}
   1.140  };
   1.141  
   1.142  Uint8 MooseFrames[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE];
   1.143  
   1.144 -/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
   1.145 -static void
   1.146 -quit(int rc)
   1.147 +void quit(int rc)
   1.148  {
   1.149      SDL_Quit();
   1.150      exit(rc);
   1.151  }
   1.152  
   1.153 -static void UpdateTexture(SDL_Texture *texture, int frame)
   1.154 +void UpdateTexture(SDL_Texture *texture, int frame)
   1.155  {
   1.156      SDL_Color *color;
   1.157      Uint8 *src;