GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free: gitlabcommitvirtual2021.com

Commit 4f9bd43b authored by Jan Scheffczyk's avatar Jan Scheffczyk
Browse files

Relative path are now garanteed! Also 30+ lights working correctly now

parent 8c0e9574
......@@ -8,7 +8,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/)
if (UNIX)
include_directories("../depend/include")
find_package(SDL)
# linux libs are install with apt-get -> no extra lib dir
else()
include_directories("../depend/include/")
link_directories("../depend/lib/")
......@@ -21,12 +21,12 @@ file(GLOB HELPER
helper/*.h
helper/*.cpp
)
# Very messy list with all files
set(SOURCE_FILES main.cpp game/generation/TunnelGeneration.h game/generation/TunnelSegment.h game/gameLoop/Player.h game/StateManager.h game/gameLoop/PlayerCollisionManager.h game/gameLoop/InputHandler.h helper/MovmentTypes.h game/generation/TunnelSegment.cpp game/generation/InstanceMesh.h game/generation/TunnelSegmentParser.h helper/GLOBAL_VARS.cpp helper/DrawAxis.h helper/MeshStructs.h game/generation/TunnelSegmentParser.cpp game/gameLoop/InputHandler.cpp game/generation/InstanceMesh.cpp game/generation/PendulumManager.cpp game/generation/PendulumManager.h game/generation/Obstacle.h game/generation/ObstacleLookUp.cpp game/generation/ObstacleLookUp.h game/generation/Obstacle.cpp game/generation/DynMesh.h game/generation/Converter.h helper/Lights.h helper/Cube.h game/states/GameState.cpp game/states/GameState.h game/states/State.h game/StateManager.cpp game/states/LevelCompleteState.cpp game/states/LevelCompleteState.h game/menu/Panel.cpp game/menu/Panel.h game/states/MenuState.cpp game/states/MenuState.h game/states/MenuInputHandler.h game/states/MenuInputHandler.cpp game/gameLoop/PlayerCollisionManager.cpp game/states/HighscoreInputHandler.h game/states/HighscoreInputHandler.cpp game/menu/StringRenderer.cpp game/menu/StringRenderer.h game/gameLoop/Timer.cpp game/gameLoop/Timer.h game/generation/Score.cpp game/generation/Score.h)
add_executable(CP16 ${SOURCE_FILES} ${HELPER} )
#This is only for me to copy certain dirs into my build folder
add_custom_target(SHADER
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/shader/ ${CMAKE_SOURCE_DIR}/build/shader)
......@@ -35,16 +35,11 @@ add_custom_target(MODEL
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/model/ ${CMAKE_SOURCE_DIR}/build/model)
#add_custom_target(TEXTURE
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# ${CMAKE_SOURCE_DIR}/textures ${CMAKE_SOURCE_DIR}/build/textures)
#
add_dependencies(CP16 SHADER MODEL)
if (UNIX)
# target_include_directories(C1 ${SDL2_INCLUDE_DIR})
target_link_libraries(CP16 glfw ${GLFW_LIBRARIES} ${SDL2_LIBRARY} GL GLU c m GLEW )
target_link_libraries(CP16 glfw ${GLFW_LIBRARIES} freetypeGL GLU c m GLEW )
else()
target_link_libraries(CP16 glfw3 ${GLFW_LIBRARIES} glew32 gdi32 assimp freetype opengl32)
endif(UNIX)
......
<?xml version = "1.0" encoding = "UTF-8"?>
<TunnelSegment>
<meta>
<difficulty>0</difficulty>
<type>0</type>
<rot>0.0</rot>
<mat4 type="start">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>-0.046211f, -8.002257f, 0.000130f, 1.000000f </vec4>
</mat4>
<mat4 type="next">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>-0.017975f, 8.006705f, 0.019360f, 1.000000f </vec4>
</mat4>
</meta>
<mesh name="PlayerMesh">
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>8.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 8.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 8.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 0.000000f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<plane>
<mat4>
<vec4>8.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 8.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 8.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 0.000000f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
</TunnelSegment>
\ No newline at end of file
<?xml version = "1.0" encoding = "UTF-8"?>
<TunnelSegment>
<meta>
<difficulty>0</difficulty>
<type>0</type>
<rot>0.0</rot>
<mat4 type="start">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>-0.272744f, -11.101673f, 2.654887f, 1.000000f </vec4>
</mat4>
<mat4 type="next">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>-0.279739f, 11.924360f, 3.771552f, 1.000000f </vec4>
</mat4>
</meta>
<mesh name="Plane">
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>11.173523f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 11.173523f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 11.173523f, 0.000000f </vec4>
<vec4>-0.182929f, -0.086437f, -0.428426f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<plane>
<mat4>
<vec4>11.173523f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 11.173523f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 11.173523f, 0.000000f </vec4>
<vec4>-0.182929f, -0.086437f, -0.428426f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<plane>
<mat4>
<vec4>0.000001f, 0.000000f, -8.380142f, 0.000000f </vec4>
<vec4>2.793381f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, -2.793380f, 0.000000f, 0.000000f </vec4>
<vec4>-0.192984f, -2.367506f, 0.547021f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<mesh name="Plane.009">
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>-0.000000f, -0.000000f, -8.380142f, 0.000000f </vec4>
<vec4>-2.793381f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 2.793380f, -0.000000f, 0.000000f </vec4>
<vec4>-0.192984f, -2.367506f, 0.547021f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
</TunnelSegment>
\ No newline at end of file
<?xml version = "1.0" encoding = "UTF-8"?>
<TunnelSegment>
<meta>
<difficulty>0</difficulty>
<type>0</type>
<rot>0.0</rot>
<mat4 type="start">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>4.374564f, 5.893655f, -0.027318f, 1.000000f </vec4>
</mat4>
<mat4 type="next">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>-10.508648f, 33.336334f, -7.662470f, 1.000000f </vec4>
</mat4>
</meta>
<mesh>
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse>//bloodborne.png</diffuse>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 6.326744f, -3.652748f, 0.000000f </vec4>
<vec4>0.000000f, 1.826374f, 3.163372f, 0.000000f </vec4>
<vec4>4.374565f, 12.298126f, -3.668494f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000100f, 0.000100f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.999900f, 0.000100f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.999900f, 0.999900f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000100f, 0.999900f</vertex>
</mesh>
<mesh>
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>0.000000f, 3.652747f, 0.000000f, 0.000000f </vec4>
<vec4>-7.305495f, 0.000001f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>0.717412f, 22.270691f, -7.253577f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<mesh>
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 7.305495f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>-10.459739f, 25.964676f, -7.662489f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<plane>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 6.326744f, -3.652748f, 0.000000f </vec4>
<vec4>0.000000f, 1.826374f, 3.163372f, 0.000000f </vec4>
<vec4>4.374565f, 12.298126f, -3.668494f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<plane>
<mat4>
<vec4>0.000000f, 3.652747f, 0.000000f, 0.000000f </vec4>
<vec4>-7.305495f, 0.000001f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>0.717412f, 22.270691f, -7.253577f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<plane>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 7.305495f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>-10.459739f, 25.964676f, -7.662489f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<plane>
<mat4>
<vec4>0.000000f, 1.544694f, 2.074487f, 0.000000f </vec4>
<vec4>-7.305495f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, -3.607781f, 2.686408f, 0.000000f </vec4>
<vec4>0.686317f, 26.937595f, -6.220436f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<mesh>
<indices amount="10">0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 9, 11, 10, 12, 13, 14, 14, 13, 15, 16, 17, 18, 16, 18, 19, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>0.000000f, 1.544694f, 2.074487f, 0.000000f </vec4>
<vec4>-7.305495f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, -3.607781f, 2.686408f, 0.000000f </vec4>
<vec4>0.686317f, 26.937595f, -6.220436f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.611194f, 0.000000f, 0.791481f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.611194f, 0.000000f, 0.791481f, 0.000000f, 0.000000f</vertex>
<vertex>2.190609f, -1.000000f, -0.919407f, 0.611194f, 0.000000f, 0.791481f, 0.000000f, 0.000000f</vertex>
<vertex>2.190609f, 1.000000f, -0.919407f, 0.611194f, 0.000000f, 0.791481f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, -0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>2.190609f, 1.000000f, -0.919407f, -0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, -0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>0.613181f, 1.000000f, -1.594793f, -0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>2.190609f, 1.000000f, -0.919407f, 0.393597f, 0.000000f, -0.919283f, 0.000000f, 0.000000f</vertex>
<vertex>2.190609f, -1.000000f, -0.919407f, 0.393597f, 0.000000f, -0.919283f, 0.000000f, 0.000000f</vertex>
<vertex>0.613181f, 1.000000f, -1.594793f, 0.393597f, 0.000000f, -0.919283f, 0.000000f, 0.000000f</vertex>
<vertex>0.573124f, -1.000000f, -1.611944f, 0.393597f, 0.000000f, -0.919283f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, 0.000000f, -0.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>0.573124f, -1.000000f, -1.611944f, -0.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>2.190609f, -1.000000f, -0.919407f, -0.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, -0.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
</TunnelSegment>
\ No newline at end of file
#ifndef _BLENDER_EXPORT_H_
#define _BLENDER_EXPORT_H_
#define OBJECTS_COUNT 6
#define PLANE 0
#define PLANE_001 1
#define PLANE_002 2
#define _CPLANE_001 3
#define _CPLANE_002 4
#define _CPLANE 5
/***************************************
* local transformations
***************************************/
float transformations[][16]={
{3.652747f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 6.326744f, -3.652748f, 0.000000f, 0.000000f, 1.826374f, 3.163372f, 0.000000f, -0.044382f, 0.087137f, -0.026956f, 1.000000f},
{3.652747f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 7.305495f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 3.652747f, 0.000000f, -0.044382f, 0.087137f, -0.026957f, 1.000000f},
{3.652747f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 7.305495f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 3.652747f, 0.000000f, -0.044382f, 0.087139f, -0.026957f, 1.000000f},
{3.652747f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 6.326744f, -3.652748f, 0.000000f, 0.000000f, 1.826374f, 3.163372f, 0.000000f, -0.044382f, 0.087137f, -0.026956f, 1.000000f},
{3.652747f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 7.305495f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 3.652747f, 0.000000f, -0.044382f, 0.087137f, -0.026957f, 1.000000f},
{3.652747f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 7.305495f, 0.000000f, 0.000000f, 0.000000f, 0.000000f, 3.652747f, 0.000000f, -0.044382f, 0.087139f, -0.026957f, 1.000000f},
};
/***************************************
* faces count for each mesh
***************************************/
unsigned int faces_count[]={2, 2, 2, 2, 2, 2};
/***************************************
* vertices count for each mesh
***************************************/
unsigned int vertex_count[]={4, 4, 4, 4, 4, 4};
/***************************************
* offset tables for each mesh
***************************************/
unsigned int vertex_offset_table []={
0, 4, 8, 12, 16, 20,
};
unsigned int indices_offset_table []={
0, 6, 12, 18, 24, 30,
};
/***************************************
* vertices definition
***************************************/
struct vertex_struct {
float x,y,z;
float nx,ny,nz;
float u,v;
};
struct vertex_struct vertices[]={
/* PLANE: 4 vertices */
{-1.004840f, 0.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.000100f, 0.000100f},
{0.995160f, 0.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.999900f, 0.000100f},
{0.995160f, 2.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.999900f, 0.999900f},
{-1.004840f, 2.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.000100f, 0.999900f},
/* PLANE_001: 4 vertices */
{-1.004840f, 1.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 1.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 3.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{-1.004840f, 3.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
/* PLANE_002: 4 vertices */
{-1.004840f, 4.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 4.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 6.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{-1.004840f, 6.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
/* _CPLANE_001: 4 vertices */
{-1.004840f, 0.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 0.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 2.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{-1.004840f, 2.008266f, 0.013089f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
/* _CPLANE_002: 4 vertices */
{-1.004840f, 1.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 1.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 3.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{-1.004840f, 3.739243f, -1.978407f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
/* _CPLANE: 4 vertices */
{-1.004840f, 4.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 4.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{0.995160f, 6.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
{-1.004840f, 6.658655f, -3.739014f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f},
};
#define INX_TYPE GL_UNSIGNED_SHORT
unsigned short indexes[]={
/* PLANE 2 faces */
0, 1, 2, 0, 2, 3,
/* PLANE_001 2 faces */
0, 1, 2, 0, 2, 3,
/* PLANE_002 2 faces */
0, 1, 2, 0, 2, 3,
/* _CPLANE_001 2 faces */
0, 1, 2, 0, 2, 3,
/* _CPLANE_002 2 faces */
0, 1, 2, 0, 2, 3,
/* _CPLANE 2 faces */
0, 1, 2, 0, 2, 3,
};
#endif
\ No newline at end of file
# Blender MTL File: 'upDown.blend'
# Material Count: 2
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
newmtl Somepicture
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.547670 0.557818 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodborne.png
<?xml version = "1.0" encoding = "UTF-8"?>
<TunnelSegment>
<meta>
<difficulty>0</difficulty>
<type>0</type>
<rot>0.0</rot>
<mat4 type="start">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>4.374564f, 5.893655f, -0.027318f, 1.000000f </vec4>
</mat4>
<mat4 type="next">
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>4.325656f, 54.606113f, -13.684610f, 1.000000f </vec4>
</mat4>
</meta>
<mesh name="light.001">
<indices amount="12">0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23, </indices>
<diffuse>//bloodborne.png</diffuse>
<specular>//bloodborne.png</specular>
<mat4>
<vec4>1.000000f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 1.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 1.000000f, 0.000000f </vec4>
<vec4>4.200315f, 11.479488f, 3.512784f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, 1.000000f, -1.000000f, -1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, -1.000000f, -1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, 1.000000f, -1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 1.000000f, -1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 1.000000f, 0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 1.000000f, 0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, -1.000000f, 0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, -1.000000f, 0.000000f, 1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 1.000000f, 1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 1.000000f, 1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, -1.000000f, 1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, -1.000000f, 1.000000f, 0.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, -1.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, -1.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 1.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, 1.000000f, 0.000000f, -1.000000f, -0.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, -1.000000f, -0.000000f, 0.000000f, -1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 1.000000f, -0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 1.000000f, -0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 1.000000f, -0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, -1.000000f, 1.000000f, -0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<mesh name="plane">
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse>//bloodborne.png</diffuse>
<specular>//bloodborne.png</specular>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 6.326744f, -3.652748f, 0.000000f </vec4>
<vec4>0.000000f, 1.826374f, 3.163372f, 0.000000f </vec4>
<vec4>4.374565f, 12.298126f, -3.668494f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000100f, 0.000100f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.999900f, 0.000100f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.999900f, 0.999900f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000100f, 0.999900f</vertex>
</mesh>
<mesh name="Plane.001">
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse>//bloodborne.png</diffuse>
<specular>//bloodborne.png</specular>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 7.305495f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>4.374565f, 25.906706f, -7.253577f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<mesh name="Plane.002">
<indices amount="2">0, 1, 2, 0, 2, 3, </indices>
<diffuse> </diffuse>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 7.305495f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>4.374565f, 47.234455f, -13.684629f, 1.000000f </vec4>
</mat4>
<vertex>-1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, -1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
<vertex>-1.000000f, 1.000000f, 0.000000f, 0.000000f, 0.000000f, 1.000000f, 0.000000f, 0.000000f</vertex>
</mesh>
<plane>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 6.326744f, -3.652748f, 0.000000f </vec4>
<vec4>0.000000f, 1.826374f, 3.163372f, 0.000000f </vec4>
<vec4>4.374565f, 12.298126f, -3.668494f, 1.000000f </vec4>
</mat4>
<vec3>-1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, -1.000000f, 0.000000f </vec3>
<vec3>1.000000f, 1.000000f, 0.000000f </vec3>
<vec3>-1.000000f, 1.000000f, 0.000000f </vec3>
</plane>
<plane>
<mat4>
<vec4>3.652747f, 0.000000f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 7.305495f, 0.000000f, 0.000000f </vec4>
<vec4>0.000000f, 0.000000f, 3.652747f, 0.000000f </vec4>
<vec4>4.374565f, 25.906706f, -7.253577f, 1.000000f </vec4>