Skip to content

Commit

Permalink
fix the win32 compile, need to add the other targets
Browse files Browse the repository at this point in the history
  • Loading branch information
TTimo committed Jul 5, 2013
1 parent 43dee82 commit d4485cd
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 39 deletions.
Binary file modified binaries/core.exe
Binary file not shown.
18 changes: 11 additions & 7 deletions core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\czmq\include;..\libzmq\include;..\ogre\OgreMain\include;..\ogre\include;..\SDL\src\video\windows;..\SDL\src\video;..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>scene_load_src;..\czmq\include;..\libzmq\include;..\ogre\OgreMain\include;..\ogre\include;..\SDL\src\video\windows;..\SDL\src\video;..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -58,7 +58,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\czmq\include;..\libzmq\include;..\ogre\OgreMain\include;..\ogre\include;..\SDL\src\video\windows;..\SDL\src\video;..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>scene_load_src;..\czmq\include;..\libzmq\include;..\ogre\OgreMain\include;..\ogre\include;..\SDL\src\video\windows;..\SDL\src\video;..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -70,14 +70,18 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="game.cpp" />
<ClCompile Include="game_main.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="render.cpp" />
<ClCompile Include="render_main.cpp" />
<ClCompile Include="scene_load_src\game.cpp" />
<ClCompile Include="scene_load_src\render.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="game.h" />
<ClInclude Include="game_render.h" />
<ClInclude Include="render.h" />
<ClInclude Include="game_main.h" />
<ClInclude Include="render_main.h" />
<ClInclude Include="scene_load_src\game.h" />
<ClInclude Include="scene_load_src\render.h" />
<ClInclude Include="scene_load_src\shared_render_state.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
39 changes: 23 additions & 16 deletions core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,42 @@
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
<Filter Include="Source Files\scene_load_src">
<UniqueIdentifier>{f6b52f76-317c-425c-8320-838096d389c7}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="game.cpp">
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<ClCompile Include="game_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="render.cpp">
<ClCompile Include="render_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scene_load_src\game.cpp">
<Filter>Source Files\scene_load_src</Filter>
</ClCompile>
<ClCompile Include="scene_load_src\render.cpp">
<Filter>Source Files\scene_load_src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="game.h">
<Filter>Header Files</Filter>
<ClInclude Include="game_main.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="render_main.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="scene_load_src\game.h">
<Filter>Source Files\scene_load_src</Filter>
</ClInclude>
<ClInclude Include="game_render.h">
<Filter>Header Files</Filter>
<ClInclude Include="scene_load_src\render.h">
<Filter>Source Files\scene_load_src</Filter>
</ClInclude>
<ClInclude Include="render.h">
<Filter>Header Files</Filter>
<ClInclude Include="scene_load_src\shared_render_state.h">
<Filter>Source Files\scene_load_src</Filter>
</ClInclude>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion game_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int game_thread( void * _parms ) {
game_init( gsockets, gs, srs );

unsigned int baseline = SDL_GetTicks();
int framenum = 0;
unsigned int framenum = 0;
while ( true ) {
unsigned int now = SDL_GetTicks();
unsigned int target_frame = ( now - baseline ) / GAME_DELAY;
Expand Down
8 changes: 4 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ typedef struct InputState_s {
void parse_orientation( char * start, Ogre::Quaternion & orientation ) {
char * end = strchr( start, ' ' );
end[0] = '\0';
orientation.w = atof( start );
orientation.w = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.x = atof( start );
orientation.x = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.y = atof( start );
orientation.y = (float)atof( start );
start = end + 1;
orientation.z = atof( start );
orientation.z = (float)atof( start );
}

void send_shutdown( void * zmq_render_socket, void * zmq_game_socket ) {
Expand Down
8 changes: 4 additions & 4 deletions scene_load_src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ void parse_mouse_state( char * mouse_state, Ogre::Quaternion & orientation, uint
char * start = mouse_state;
char * end = strchr( start, ' ' );
end[0] = '\0';
orientation.w = atof( start );
orientation.w = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.x = atof( start );
orientation.x = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.y = atof( start );
orientation.y = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.z = atof( start );
orientation.z = (float)atof( start );
start = end + 1;
buttons = atoi( start );
}
Expand Down
14 changes: 7 additions & 7 deletions scene_load_src/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ void parse_mouse_state( char * mouse_state, Ogre::Quaternion & orientation ) {
char * start = mouse_state;
char * end = strchr( start, ' ' );
end[0] = '\0';
orientation.w = atof( start );
orientation.w = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.x = atof( start );
orientation.x = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.y = atof( start );
orientation.y = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
orientation.z = atof( start );
orientation.z = (float)atof( start );
// NOTE: skipping the button state
}

Expand Down Expand Up @@ -111,13 +111,13 @@ void parse_render_state( RenderState & rs, SharedRenderState & srs, char * msg )
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
srs.position[0] = atof( start );
srs.position[0] = (float)atof( start );
start = end + 1;
end = strchr( start, ' ' );
end[0] = '\0';
srs.position[1] = atof( start );
srs.position[1] = (float)atof( start );
start = end + 1;
srs.position[2] = atof( start );
srs.position[2] = (float)atof( start );
}

void interpolate_and_render( RenderThreadSockets & rsockets, RenderState & rs, float ratio, SharedRenderState & previous_render, SharedRenderState & next_render ) {
Expand Down

0 comments on commit d4485cd

Please sign in to comment.