Addition of VC project for touchTest.c
authorjimtla
Sat, 05 Jun 2010 01:58:56 -0400
changeset 464935a80b0791aa
parent 4648 0350b634c044
child 4650 7ad7a473b086
Addition of VC project for touchTest.c
include/SDL_touch.h
touchTest/touchTest.c
touchTest/touchTest2/touchTest2.ncb
touchTest/touchTest2/touchTest2.sln
touchTest/touchTest2/touchTest2.suo
touchTest/touchTest2/touchTest2/SDL.dll
touchTest/touchTest2/touchTest2/touchTest2.vcproj
touchTest/touchTest2/touchTest2/touchTest2.vcproj.jgran-virtualPC.jgran.user
     1.1 --- a/include/SDL_touch.h	Thu Jun 03 13:21:35 2010 -0400
     1.2 +++ b/include/SDL_touch.h	Sat Jun 05 01:58:56 2010 -0400
     1.3 @@ -41,8 +41,6 @@
     1.4  /* *INDENT-ON* */
     1.5  #endif
     1.6  
     1.7 -typedef struct SDL_Touch SDL_Touch;
     1.8 -typedef struct SDL_Finger SDL_Finger;
     1.9  
    1.10  struct SDL_Finger {
    1.11    int id;
    1.12 @@ -55,9 +53,11 @@
    1.13    int pressure;
    1.14  };
    1.15  
    1.16 +typedef struct SDL_Touch SDL_Touch;
    1.17 +typedef struct SDL_Finger SDL_Finger;
    1.18  
    1.19 -struct SDL_Touch
    1.20 -{
    1.21 +
    1.22 +struct SDL_Touch {
    1.23    
    1.24    /* Free the touch when it's time */
    1.25    void (*FreeTouch) (SDL_Touch * touch);
    1.26 @@ -87,6 +87,7 @@
    1.27  };
    1.28  
    1.29  
    1.30 +
    1.31  /* Function prototypes */
    1.32  
    1.33  /**
     2.1 --- a/touchTest/touchTest.c	Thu Jun 03 13:21:35 2010 -0400
     2.2 +++ b/touchTest/touchTest.c	Sat Jun 05 01:58:56 2010 -0400
     2.3 @@ -3,6 +3,8 @@
     2.4  #include <math.h>
     2.5  #include <SDL_touch.h>
     2.6  
     2.7 +
     2.8 +
     2.9  #define PI 3.1415926535897
    2.10  #define WIDTH 640
    2.11  #define HEIGHT 480
    2.12 @@ -32,7 +34,7 @@
    2.13  
    2.14  void handler (int sig)
    2.15  {
    2.16 -  printf ("\exiting...(%d)\n", sig);
    2.17 +  printf ("exiting...(%d)\n", sig);
    2.18    exit (0);
    2.19  }
    2.20  
    2.21 @@ -81,7 +83,7 @@
    2.22  
    2.23  void DrawScreen(SDL_Surface* screen, int h)
    2.24  {
    2.25 -  int x, y, xm,ym,c;
    2.26 +  int x, y, xm,ym,c,i;
    2.27    if(SDL_MUSTLOCK(screen))
    2.28      {                                              
    2.29        if(SDL_LockSurface(screen) < 0) return;
    2.30 @@ -98,9 +100,10 @@
    2.31  	  setpix(screen,x,y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255);
    2.32          }
    2.33      }
    2.34 +
    2.35    drawCircle(screen,mousx,mousy,-30,0xFFFFFF);
    2.36    
    2.37 -  int i;
    2.38 +  
    2.39    for(i=0;i<MAXFINGERS;i++)
    2.40      if(finger[i].p.x >= 0 && finger[i].p.y >= 0)
    2.41        if(finger[i].pressure > 0)
    2.42 @@ -131,8 +134,8 @@
    2.43  
    2.44    memset(keystat,0,512*sizeof(keystat[0]));
    2.45    if (SDL_Init(SDL_INIT_VIDEO) < 0 ) return 1;
    2.46 -  
    2.47 -  if (!(screen = initScreen(WIDTH,HEIGHT)))
    2.48 +  screen = initScreen(WIDTH,HEIGHT);
    2.49 +  if (!screen)
    2.50      {
    2.51        SDL_Quit();
    2.52        return 1;
    2.53 @@ -179,21 +182,22 @@
    2.54  	    ;
    2.55  	    //printf("Finger: %i,x: %i, y: %i\n",event.tfinger.fingerId,
    2.56  	    //	   event.tfinger.x,event.tfinger.y);
    2.57 -	    SDL_Touch* inTouch = SDL_GetTouch(event.tfinger.touchId);
    2.58 -	    SDL_Finger* inFinger = SDL_GetFinger(inTouch,event.tfinger.fingerId);
    2.59 -	    
    2.60 +	    //SDL_Touch *inTouch = SDL_GetTouch(event.tfinger.touchId);
    2.61 +	    //SDL_Finger *inFinger = SDL_GetFinger(inTouch,event.tfinger.fingerId);
    2.62 +	    /*
    2.63  	    finger[event.tfinger.fingerId].p.x = ((float)event.tfinger.x)/
    2.64  	      inTouch->xres;
    2.65  	    finger[event.tfinger.fingerId].p.y = ((float)event.tfinger.y)/
    2.66  	      inTouch->yres;
    2.67  
    2.68  	    finger[event.tfinger.fingerId].pressure = 
    2.69 -	      ((float)event.tfinger.pressure)/inTouch->pressureres;
    2.70 -
    2.71 +	      ((float)event.tfinger.pressure)/inTouch->pressureres;*/
    2.72 +		/*
    2.73  	    printf("Finger: %i, Pressure: %f Pressureres: %i\n",
    2.74  		   event.tfinger.fingerId,
    2.75  		   finger[event.tfinger.fingerId].pressure,
    2.76  		   inTouch->pressureres);
    2.77 +		   */
    2.78  	    //printf("Finger: %i, pressure: %f\n",event.tfinger.fingerId,
    2.79  	    //   finger[event.tfinger.fingerId].pressure);
    2.80  
     3.1 Binary file touchTest/touchTest2/touchTest2.ncb has changed
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/touchTest/touchTest2/touchTest2.sln	Sat Jun 05 01:58:56 2010 -0400
     4.3 @@ -0,0 +1,20 @@
     4.4 +
     4.5 +Microsoft Visual Studio Solution File, Format Version 10.00
     4.6 +# Visual Studio 2008
     4.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "touchTest2", "touchTest2\touchTest2.vcproj", "{42BC83F1-CF20-4CEC-AC81-12EA804639E2}"
     4.8 +EndProject
     4.9 +Global
    4.10 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    4.11 +		Debug|Win32 = Debug|Win32
    4.12 +		Release|Win32 = Release|Win32
    4.13 +	EndGlobalSection
    4.14 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    4.15 +		{42BC83F1-CF20-4CEC-AC81-12EA804639E2}.Debug|Win32.ActiveCfg = Debug|Win32
    4.16 +		{42BC83F1-CF20-4CEC-AC81-12EA804639E2}.Debug|Win32.Build.0 = Debug|Win32
    4.17 +		{42BC83F1-CF20-4CEC-AC81-12EA804639E2}.Release|Win32.ActiveCfg = Release|Win32
    4.18 +		{42BC83F1-CF20-4CEC-AC81-12EA804639E2}.Release|Win32.Build.0 = Release|Win32
    4.19 +	EndGlobalSection
    4.20 +	GlobalSection(SolutionProperties) = preSolution
    4.21 +		HideSolutionNode = FALSE
    4.22 +	EndGlobalSection
    4.23 +EndGlobal
     5.1 Binary file touchTest/touchTest2/touchTest2.suo has changed
     6.1 Binary file touchTest/touchTest2/touchTest2/SDL.dll has changed
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/touchTest/touchTest2/touchTest2/touchTest2.vcproj	Sat Jun 05 01:58:56 2010 -0400
     7.3 @@ -0,0 +1,186 @@
     7.4 +<?xml version="1.0" encoding="Windows-1252"?>
     7.5 +<VisualStudioProject
     7.6 +	ProjectType="Visual C++"
     7.7 +	Version="9.00"
     7.8 +	Name="touchTest2"
     7.9 +	ProjectGUID="{42BC83F1-CF20-4CEC-AC81-12EA804639E2}"
    7.10 +	RootNamespace="touchTest2"
    7.11 +	TargetFrameworkVersion="196613"
    7.12 +	>
    7.13 +	<Platforms>
    7.14 +		<Platform
    7.15 +			Name="Win32"
    7.16 +		/>
    7.17 +	</Platforms>
    7.18 +	<ToolFiles>
    7.19 +	</ToolFiles>
    7.20 +	<Configurations>
    7.21 +		<Configuration
    7.22 +			Name="Debug|Win32"
    7.23 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
    7.24 +			IntermediateDirectory="$(ConfigurationName)"
    7.25 +			ConfigurationType="1"
    7.26 +			CharacterSet="0"
    7.27 +			>
    7.28 +			<Tool
    7.29 +				Name="VCPreBuildEventTool"
    7.30 +			/>
    7.31 +			<Tool
    7.32 +				Name="VCCustomBuildTool"
    7.33 +			/>
    7.34 +			<Tool
    7.35 +				Name="VCXMLDataGeneratorTool"
    7.36 +			/>
    7.37 +			<Tool
    7.38 +				Name="VCWebServiceProxyGeneratorTool"
    7.39 +			/>
    7.40 +			<Tool
    7.41 +				Name="VCMIDLTool"
    7.42 +			/>
    7.43 +			<Tool
    7.44 +				Name="VCCLCompilerTool"
    7.45 +				Optimization="0"
    7.46 +				MinimalRebuild="true"
    7.47 +				BasicRuntimeChecks="3"
    7.48 +				RuntimeLibrary="3"
    7.49 +				WarningLevel="3"
    7.50 +				DebugInformationFormat="4"
    7.51 +			/>
    7.52 +			<Tool
    7.53 +				Name="VCManagedResourceCompilerTool"
    7.54 +			/>
    7.55 +			<Tool
    7.56 +				Name="VCResourceCompilerTool"
    7.57 +			/>
    7.58 +			<Tool
    7.59 +				Name="VCPreLinkEventTool"
    7.60 +			/>
    7.61 +			<Tool
    7.62 +				Name="VCLinkerTool"
    7.63 +				AdditionalOptions="C:\programs\gsoc10\VisualC\SDL\Debug\SDL.lib&#x0D;&#x0A;C:\programs\gsoc10\VisualC\SDLmain\Debug\SDLmain.lib"
    7.64 +				GenerateDebugInformation="true"
    7.65 +				SubSystem="2"
    7.66 +				TargetMachine="1"
    7.67 +			/>
    7.68 +			<Tool
    7.69 +				Name="VCALinkTool"
    7.70 +			/>
    7.71 +			<Tool
    7.72 +				Name="VCManifestTool"
    7.73 +			/>
    7.74 +			<Tool
    7.75 +				Name="VCXDCMakeTool"
    7.76 +			/>
    7.77 +			<Tool
    7.78 +				Name="VCBscMakeTool"
    7.79 +			/>
    7.80 +			<Tool
    7.81 +				Name="VCFxCopTool"
    7.82 +			/>
    7.83 +			<Tool
    7.84 +				Name="VCAppVerifierTool"
    7.85 +			/>
    7.86 +			<Tool
    7.87 +				Name="VCPostBuildEventTool"
    7.88 +			/>
    7.89 +		</Configuration>
    7.90 +		<Configuration
    7.91 +			Name="Release|Win32"
    7.92 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
    7.93 +			IntermediateDirectory="$(ConfigurationName)"
    7.94 +			ConfigurationType="1"
    7.95 +			CharacterSet="2"
    7.96 +			WholeProgramOptimization="1"
    7.97 +			>
    7.98 +			<Tool
    7.99 +				Name="VCPreBuildEventTool"
   7.100 +			/>
   7.101 +			<Tool
   7.102 +				Name="VCCustomBuildTool"
   7.103 +			/>
   7.104 +			<Tool
   7.105 +				Name="VCXMLDataGeneratorTool"
   7.106 +			/>
   7.107 +			<Tool
   7.108 +				Name="VCWebServiceProxyGeneratorTool"
   7.109 +			/>
   7.110 +			<Tool
   7.111 +				Name="VCMIDLTool"
   7.112 +			/>
   7.113 +			<Tool
   7.114 +				Name="VCCLCompilerTool"
   7.115 +				Optimization="2"
   7.116 +				EnableIntrinsicFunctions="true"
   7.117 +				RuntimeLibrary="2"
   7.118 +				EnableFunctionLevelLinking="true"
   7.119 +				WarningLevel="3"
   7.120 +				DebugInformationFormat="3"
   7.121 +			/>
   7.122 +			<Tool
   7.123 +				Name="VCManagedResourceCompilerTool"
   7.124 +			/>
   7.125 +			<Tool
   7.126 +				Name="VCResourceCompilerTool"
   7.127 +			/>
   7.128 +			<Tool
   7.129 +				Name="VCPreLinkEventTool"
   7.130 +			/>
   7.131 +			<Tool
   7.132 +				Name="VCLinkerTool"
   7.133 +				GenerateDebugInformation="true"
   7.134 +				OptimizeReferences="2"
   7.135 +				EnableCOMDATFolding="2"
   7.136 +				TargetMachine="1"
   7.137 +			/>
   7.138 +			<Tool
   7.139 +				Name="VCALinkTool"
   7.140 +			/>
   7.141 +			<Tool
   7.142 +				Name="VCManifestTool"
   7.143 +			/>
   7.144 +			<Tool
   7.145 +				Name="VCXDCMakeTool"
   7.146 +			/>
   7.147 +			<Tool
   7.148 +				Name="VCBscMakeTool"
   7.149 +			/>
   7.150 +			<Tool
   7.151 +				Name="VCFxCopTool"
   7.152 +			/>
   7.153 +			<Tool
   7.154 +				Name="VCAppVerifierTool"
   7.155 +			/>
   7.156 +			<Tool
   7.157 +				Name="VCPostBuildEventTool"
   7.158 +			/>
   7.159 +		</Configuration>
   7.160 +	</Configurations>
   7.161 +	<References>
   7.162 +	</References>
   7.163 +	<Files>
   7.164 +		<Filter
   7.165 +			Name="Source Files"
   7.166 +			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
   7.167 +			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
   7.168 +			>
   7.169 +			<File
   7.170 +				RelativePath="..\..\touchTest.c"
   7.171 +				>
   7.172 +			</File>
   7.173 +		</Filter>
   7.174 +		<Filter
   7.175 +			Name="Header Files"
   7.176 +			Filter="h;hpp;hxx;hm;inl;inc;xsd"
   7.177 +			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
   7.178 +			>
   7.179 +		</Filter>
   7.180 +		<Filter
   7.181 +			Name="Resource Files"
   7.182 +			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
   7.183 +			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
   7.184 +			>
   7.185 +		</Filter>
   7.186 +	</Files>
   7.187 +	<Globals>
   7.188 +	</Globals>
   7.189 +</VisualStudioProject>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/touchTest/touchTest2/touchTest2/touchTest2.vcproj.jgran-virtualPC.jgran.user	Sat Jun 05 01:58:56 2010 -0400
     8.3 @@ -0,0 +1,65 @@
     8.4 +<?xml version="1.0" encoding="Windows-1252"?>
     8.5 +<VisualStudioUserFile
     8.6 +	ProjectType="Visual C++"
     8.7 +	Version="9.00"
     8.8 +	ShowAllFiles="false"
     8.9 +	>
    8.10 +	<Configurations>
    8.11 +		<Configuration
    8.12 +			Name="Debug|Win32"
    8.13 +			>
    8.14 +			<DebugSettings
    8.15 +				Command="$(TargetPath)"
    8.16 +				WorkingDirectory=""
    8.17 +				CommandArguments=""
    8.18 +				Attach="false"
    8.19 +				DebuggerType="3"
    8.20 +				Remote="1"
    8.21 +				RemoteMachine="JGRAN-VIRTUALPC"
    8.22 +				RemoteCommand=""
    8.23 +				HttpUrl=""
    8.24 +				PDBPath=""
    8.25 +				SQLDebugging=""
    8.26 +				Environment=""
    8.27 +				EnvironmentMerge="true"
    8.28 +				DebuggerFlavor=""
    8.29 +				MPIRunCommand=""
    8.30 +				MPIRunArguments=""
    8.31 +				MPIRunWorkingDirectory=""
    8.32 +				ApplicationCommand=""
    8.33 +				ApplicationArguments=""
    8.34 +				ShimCommand=""
    8.35 +				MPIAcceptMode=""
    8.36 +				MPIAcceptFilter=""
    8.37 +			/>
    8.38 +		</Configuration>
    8.39 +		<Configuration
    8.40 +			Name="Release|Win32"
    8.41 +			>
    8.42 +			<DebugSettings
    8.43 +				Command="$(TargetPath)"
    8.44 +				WorkingDirectory=""
    8.45 +				CommandArguments=""
    8.46 +				Attach="false"
    8.47 +				DebuggerType="3"
    8.48 +				Remote="1"
    8.49 +				RemoteMachine="JGRAN-VIRTUALPC"
    8.50 +				RemoteCommand=""
    8.51 +				HttpUrl=""
    8.52 +				PDBPath=""
    8.53 +				SQLDebugging=""
    8.54 +				Environment=""
    8.55 +				EnvironmentMerge="true"
    8.56 +				DebuggerFlavor=""
    8.57 +				MPIRunCommand=""
    8.58 +				MPIRunArguments=""
    8.59 +				MPIRunWorkingDirectory=""
    8.60 +				ApplicationCommand=""
    8.61 +				ApplicationArguments=""
    8.62 +				ShimCommand=""
    8.63 +				MPIAcceptMode=""
    8.64 +				MPIAcceptFilter=""
    8.65 +			/>
    8.66 +		</Configuration>
    8.67 +	</Configurations>
    8.68 +</VisualStudioUserFile>