vrchess

changeset 3:a797e426e309

minor changes
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 19 Aug 2014 11:01:04 +0300
parents 879194e4b1f0
children e6948e131526
files src/game.cc src/game.h src/main.cc vrchess.vcxproj
diffstat 4 files changed, 28 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/src/game.cc	Fri Apr 25 05:44:09 2014 +0300
     1.2 +++ b/src/game.cc	Tue Aug 19 11:01:04 2014 +0300
     1.3 @@ -134,6 +134,11 @@
     1.4  	}
     1.5  }
     1.6  
     1.7 +void game_mwheel(int dir)
     1.8 +{
     1.9 +	cam.input_move(0, dir * 0.1, 0);
    1.10 +}
    1.11 +
    1.12  void game_6dof_move(float x, float y, float z)
    1.13  {
    1.14  	cam.input_move(x, y, z);
     2.1 --- a/src/game.h	Fri Apr 25 05:44:09 2014 +0300
     2.2 +++ b/src/game.h	Tue Aug 19 11:01:04 2014 +0300
     2.3 @@ -11,6 +11,7 @@
     2.4  void game_keyboard(int key, bool pressed, int x, int y);
     2.5  void game_mouse(int bn, bool pressed, int x, int y);
     2.6  void game_motion(int x, int y);
     2.7 +void game_mwheel(int dir);
     2.8  
     2.9  void game_6dof_move(float x, float y, float z);
    2.10  void game_6dof_rotate(float x, float y, float z);
     3.1 --- a/src/main.cc	Fri Apr 25 05:44:09 2014 +0300
     3.2 +++ b/src/main.cc	Tue Aug 19 11:01:04 2014 +0300
     3.3 @@ -89,7 +89,22 @@
     3.4  
     3.5  static void mouse(int bn, int st, int x, int y)
     3.6  {
     3.7 -	game_mouse(bn - GLUT_LEFT_BUTTON, st == GLUT_DOWN, x, y);
     3.8 +	switch(bn) {
     3.9 +	case GLUT_RIGHT_BUTTON + 1:
    3.10 +		if(st == GLUT_DOWN) {
    3.11 +			game_mwheel(1);
    3.12 +		}
    3.13 +		break;
    3.14 +
    3.15 +	case GLUT_RIGHT_BUTTON + 2:
    3.16 +		if(st == GLUT_DOWN) {
    3.17 +			game_mwheel(-1);
    3.18 +		}
    3.19 +		break;
    3.20 +
    3.21 +	default:
    3.22 +		game_mouse(bn - GLUT_LEFT_BUTTON, st == GLUT_DOWN, x, y);
    3.23 +	}
    3.24  }
    3.25  
    3.26  static void motion(int x, int y)
     4.1 --- a/vrchess.vcxproj	Fri Apr 25 05:44:09 2014 +0300
     4.2 +++ b/vrchess.vcxproj	Tue Aug 19 11:01:04 2014 +0300
     4.3 @@ -1,5 +1,5 @@
     4.4  <?xml version="1.0" encoding="utf-8"?>
     4.5 -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     4.6 +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     4.7    <ItemGroup Label="ProjectConfigurations">
     4.8      <ProjectConfiguration Include="Debug|Win32">
     4.9        <Configuration>Debug</Configuration>
    4.10 @@ -19,15 +19,15 @@
    4.11    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    4.12      <ConfigurationType>Application</ConfigurationType>
    4.13      <UseDebugLibraries>true</UseDebugLibraries>
    4.14 -    <PlatformToolset>v90</PlatformToolset>
    4.15 -    <CharacterSet>Unicode</CharacterSet>
    4.16 +    <PlatformToolset>v120</PlatformToolset>
    4.17 +    <CharacterSet>MultiByte</CharacterSet>
    4.18    </PropertyGroup>
    4.19    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    4.20      <ConfigurationType>Application</ConfigurationType>
    4.21      <UseDebugLibraries>false</UseDebugLibraries>
    4.22 -    <PlatformToolset>v90</PlatformToolset>
    4.23 -    <WholeProgramOptimization>true</WholeProgramOptimization>
    4.24 -    <CharacterSet>Unicode</CharacterSet>
    4.25 +    <PlatformToolset>v120</PlatformToolset>
    4.26 +    <WholeProgramOptimization>false</WholeProgramOptimization>
    4.27 +    <CharacterSet>MultiByte</CharacterSet>
    4.28    </PropertyGroup>
    4.29    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    4.30    <ImportGroup Label="ExtensionSettings">