├── .github └── roc_icon.png ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── animConverter ├── Animation.cpp ├── Animation.h ├── animConverter.vcxproj ├── animConverter.vcxproj.filters ├── animConverter.vcxproj.user ├── main.cpp ├── stdafx.cpp └── stdafx.h ├── collisionConverter ├── collisionConverter.vcxproj ├── collisionConverter.vcxproj.filters ├── collisionConverter.vcxproj.user └── main.cpp ├── modelConverter ├── Model.cpp ├── Model.h ├── Utils.cpp ├── Utils.h ├── main.cpp ├── modelConverter.vcxproj ├── modelConverter.vcxproj.filters ├── modelConverter.vcxproj.user ├── stdafx.cpp └── stdafx.h ├── resources ├── roc_icon.png └── settings.xml ├── roc_app ├── Core │ ├── Core.cpp │ └── Core.h ├── Elements │ ├── Animation │ │ ├── Animation.cpp │ │ ├── Animation.h │ │ ├── BoneFrameData.cpp │ │ └── BoneFrameData.h │ ├── Camera.cpp │ ├── Camera.h │ ├── Collidable.cpp │ ├── Collidable.h │ ├── Collider.cpp │ ├── Collider.h │ ├── Drawable.cpp │ ├── Drawable.h │ ├── Element.cpp │ ├── Element.h │ ├── Font.cpp │ ├── Font.h │ ├── Light.cpp │ ├── Light.h │ ├── Mesh │ │ ├── BoneCollisionData.hpp │ │ ├── BoneData.hpp │ │ ├── BoneJointData.hpp │ │ ├── Material.cpp │ │ ├── Material.h │ │ ├── Mesh.cpp │ │ └── Mesh.h │ ├── Model │ │ ├── Animator.cpp │ │ ├── Animator.h │ │ ├── Bone.cpp │ │ ├── Bone.h │ │ ├── Model.cpp │ │ ├── Model.h │ │ ├── Skeleton.cpp │ │ └── Skeleton.h │ ├── RenderTarget.cpp │ ├── RenderTarget.h │ ├── Scene │ │ ├── Scene.cpp │ │ └── Scene.h │ ├── Shader │ │ ├── Shader.cpp │ │ ├── Shader.h │ │ ├── ShaderUniform.cpp │ │ └── ShaderUniform.h │ ├── Sound.cpp │ ├── Sound.h │ ├── Texture.cpp │ ├── Texture.h │ ├── Transformable.cpp │ └── Transformable.h ├── GL │ ├── GLArrayBuffer.cpp │ ├── GLArrayBuffer.h │ ├── GLFramebuffer.cpp │ ├── GLFramebuffer.h │ ├── GLRenderbuffer.cpp │ ├── GLRenderbuffer.h │ ├── GLSetting.cpp │ ├── GLSetting.h │ ├── GLShader.cpp │ ├── GLShader.h │ ├── GLState.cpp │ ├── GLState.h │ ├── GLTexture.cpp │ ├── GLTexture.h │ ├── GLTexture2D.cpp │ ├── GLTexture2D.h │ ├── GLTextureCubemap.cpp │ ├── GLTextureCubemap.h │ ├── GLVertexArray.cpp │ ├── GLVertexArray.h │ ├── GLViewport.cpp │ └── GLViewport.h ├── Interfaces │ ├── IAnimation.h │ ├── ICamera.h │ ├── ICollidable.h │ ├── ICollider.h │ ├── ICore.h │ ├── ICustomArgument.h │ ├── ICustomArguments.h │ ├── IDrawable.h │ ├── IElement.h │ ├── IElementManager.h │ ├── IFont.h │ ├── ILight.h │ ├── ILogManager.h │ ├── IMesh.h │ ├── IModel.h │ ├── IModule.h │ ├── IPhysicsManager.h │ ├── IRenderManager.h │ ├── IRenderTarget.h │ ├── IScene.h │ ├── ISfmlManager.h │ ├── IShader.h │ ├── ISound.h │ ├── ISoundManager.h │ ├── ITexture.h │ └── ITransformable.h ├── Managers │ ├── ConfigManager.cpp │ ├── ConfigManager.h │ ├── ElementManager.cpp │ ├── ElementManager.h │ ├── LogManager.cpp │ ├── LogManager.h │ ├── Manager.cpp │ ├── Manager.h │ ├── ModuleManager.cpp │ ├── ModuleManager.h │ ├── PhysicsManager.cpp │ ├── PhysicsManager.h │ ├── PreRenderManager.cpp │ ├── PreRenderManager.h │ ├── RenderManager │ │ ├── PhysicsDrawer.cpp │ │ ├── PhysicsDrawer.h │ │ ├── Quad2D.cpp │ │ ├── Quad2D.h │ │ ├── Quad3D.cpp │ │ ├── Quad3D.h │ │ ├── RenderManager.cpp │ │ └── RenderManager.h │ ├── SfmlManager.cpp │ ├── SfmlManager.h │ ├── SoundManager.cpp │ └── SoundManager.h ├── Utils │ ├── CustomArgument.cpp │ ├── CustomArgument.h │ ├── CustomArguments.cpp │ ├── CustomArguments.h │ ├── GlobalConstants.cpp │ ├── MathUtils.cpp │ ├── MathUtils.h │ ├── Pool.cpp │ ├── Pool.h │ ├── SystemTick.cpp │ ├── SystemTick.h │ ├── Transformation.cpp │ ├── Transformation.h │ ├── zlibUtils.cpp │ └── zlibUtils.h ├── main.cpp ├── main_resource.aps ├── main_resource.rc ├── roc_app.vcxproj ├── roc_app.vcxproj.filters ├── roc_app.vcxproj.user ├── roc_icon.ico ├── stdafx.cpp └── stdafx.h ├── roc_engine.sln ├── roc_module_lua ├── Core.cpp ├── Core.h ├── Logger.cpp ├── Logger.h ├── Lua │ ├── LuaArgReader.cpp │ ├── LuaArgReader.h │ ├── LuaDefs.h │ ├── LuaDefs │ │ ├── AnimationDefs.cpp │ │ ├── AnimationDefs.h │ │ ├── CameraDefs.cpp │ │ ├── CameraDefs.h │ │ ├── CollidableDefs.cpp │ │ ├── CollidableDefs.h │ │ ├── ColliderDefs.cpp │ │ ├── ColliderDefs.h │ │ ├── DrawableDefs.cpp │ │ ├── DrawableDefs.h │ │ ├── ElementDefs.cpp │ │ ├── ElementDefs.h │ │ ├── FontDefs.cpp │ │ ├── FontDefs.h │ │ ├── InputDefs.cpp │ │ ├── InputDefs.h │ │ ├── LightDefs.cpp │ │ ├── LightDefs.h │ │ ├── Matrix2Defs.cpp │ │ ├── Matrix2Defs.h │ │ ├── Matrix3Defs.cpp │ │ ├── Matrix3Defs.h │ │ ├── Matrix4Defs.cpp │ │ ├── Matrix4Defs.h │ │ ├── MeshDefs.cpp │ │ ├── MeshDefs.h │ │ ├── ModelDefs.cpp │ │ ├── ModelDefs.h │ │ ├── PhysicsDefs.cpp │ │ ├── PhysicsDefs.h │ │ ├── QuaternionDefs.cpp │ │ ├── QuaternionDefs.h │ │ ├── RenderDefs.cpp │ │ ├── RenderDefs.h │ │ ├── RenderTargetDefs.cpp │ │ ├── RenderTargetDefs.h │ │ ├── SceneDefs.cpp │ │ ├── SceneDefs.h │ │ ├── ShaderDefs.cpp │ │ ├── ShaderDefs.h │ │ ├── SoundDefs.cpp │ │ ├── SoundDefs.h │ │ ├── TextureDefs.cpp │ │ ├── TextureDefs.h │ │ ├── TimeDefs.cpp │ │ ├── TimeDefs.h │ │ ├── TransformableDefs.cpp │ │ ├── TransformableDefs.h │ │ ├── Vector2Defs.cpp │ │ ├── Vector2Defs.h │ │ ├── Vector3Defs.cpp │ │ ├── Vector3Defs.h │ │ ├── Vector4Defs.cpp │ │ ├── Vector4Defs.h │ │ ├── WindowDefs.cpp │ │ └── WindowDefs.h │ ├── LuaVM.cpp │ └── LuaVM.h ├── LuaHandler.cpp ├── LuaHandler.h ├── TextureDefs.cpp ├── Utils.cpp ├── Utils.h ├── dllmain.cpp ├── roc_module_lua.vcxproj ├── roc_module_lua.vcxproj.filters ├── roc_module_lua.vcxproj.user ├── stdafx.cpp └── stdafx.h ├── shared └── Utils │ ├── EnumUtils.cpp │ └── EnumUtils.h └── vendor ├── SFML ├── bin │ ├── openal32.dll │ ├── sfml-audio-2.dll │ ├── sfml-audio-d-2.dll │ ├── sfml-graphics-2.dll │ ├── sfml-graphics-d-2.dll │ ├── sfml-system-2.dll │ ├── sfml-system-d-2.dll │ ├── sfml-window-2.dll │ └── sfml-window-d-2.dll ├── include │ └── SFML │ │ ├── Audio.hpp │ │ ├── Audio │ │ ├── AlResource.hpp │ │ ├── Export.hpp │ │ ├── InputSoundFile.hpp │ │ ├── Listener.hpp │ │ ├── Music.hpp │ │ ├── OutputSoundFile.hpp │ │ ├── Sound.hpp │ │ ├── SoundBuffer.hpp │ │ ├── SoundBufferRecorder.hpp │ │ ├── SoundFileFactory.hpp │ │ ├── SoundFileFactory.inl │ │ ├── SoundFileReader.hpp │ │ ├── SoundFileWriter.hpp │ │ ├── SoundRecorder.hpp │ │ ├── SoundSource.hpp │ │ └── SoundStream.hpp │ │ ├── Config.hpp │ │ ├── GpuPreference.hpp │ │ ├── Graphics.hpp │ │ ├── Graphics │ │ ├── BlendMode.hpp │ │ ├── CircleShape.hpp │ │ ├── Color.hpp │ │ ├── ConvexShape.hpp │ │ ├── Drawable.hpp │ │ ├── Export.hpp │ │ ├── Font.hpp │ │ ├── Glsl.hpp │ │ ├── Glsl.inl │ │ ├── Glyph.hpp │ │ ├── Image.hpp │ │ ├── PrimitiveType.hpp │ │ ├── Rect.hpp │ │ ├── Rect.inl │ │ ├── RectangleShape.hpp │ │ ├── RenderStates.hpp │ │ ├── RenderTarget.hpp │ │ ├── RenderTexture.hpp │ │ ├── RenderWindow.hpp │ │ ├── Shader.hpp │ │ ├── Shape.hpp │ │ ├── Sprite.hpp │ │ ├── Text.hpp │ │ ├── Texture.hpp │ │ ├── Transform.hpp │ │ ├── Transformable.hpp │ │ ├── Vertex.hpp │ │ ├── VertexArray.hpp │ │ ├── VertexBuffer.hpp │ │ └── View.hpp │ │ ├── Main.hpp │ │ ├── OpenGL.hpp │ │ ├── System.hpp │ │ ├── System │ │ ├── Clock.hpp │ │ ├── Err.hpp │ │ ├── Export.hpp │ │ ├── FileInputStream.hpp │ │ ├── InputStream.hpp │ │ ├── Lock.hpp │ │ ├── MemoryInputStream.hpp │ │ ├── Mutex.hpp │ │ ├── NativeActivity.hpp │ │ ├── NonCopyable.hpp │ │ ├── Sleep.hpp │ │ ├── String.hpp │ │ ├── String.inl │ │ ├── Thread.hpp │ │ ├── Thread.inl │ │ ├── ThreadLocal.hpp │ │ ├── ThreadLocalPtr.hpp │ │ ├── ThreadLocalPtr.inl │ │ ├── Time.hpp │ │ ├── Utf.hpp │ │ ├── Utf.inl │ │ ├── Vector2.hpp │ │ ├── Vector2.inl │ │ ├── Vector3.hpp │ │ └── Vector3.inl │ │ ├── Window.hpp │ │ └── Window │ │ ├── Clipboard.hpp │ │ ├── Context.hpp │ │ ├── ContextSettings.hpp │ │ ├── Cursor.hpp │ │ ├── Event.hpp │ │ ├── Export.hpp │ │ ├── GlResource.hpp │ │ ├── Joystick.hpp │ │ ├── Keyboard.hpp │ │ ├── Mouse.hpp │ │ ├── Sensor.hpp │ │ ├── Touch.hpp │ │ ├── VideoMode.hpp │ │ ├── Vulkan.hpp │ │ ├── Window.hpp │ │ ├── WindowBase.hpp │ │ ├── WindowHandle.hpp │ │ └── WindowStyle.hpp ├── lib │ ├── sfml-audio-d.lib │ ├── sfml-audio.lib │ ├── sfml-graphics-d.lib │ ├── sfml-graphics.lib │ ├── sfml-main-d.lib │ ├── sfml-main.lib │ ├── sfml-system-d.lib │ ├── sfml-system.lib │ ├── sfml-window-d.lib │ └── sfml-window.lib ├── license.md └── readme.md ├── bullet ├── AUTHORS.txt ├── LICENSE.txt ├── README.md ├── VERSION ├── include │ ├── BulletCollision │ │ ├── BroadphaseCollision │ │ │ ├── btAxisSweep3.h │ │ │ ├── btAxisSweep3Internal.h │ │ │ ├── btBroadphaseInterface.h │ │ │ ├── btBroadphaseProxy.h │ │ │ ├── btCollisionAlgorithm.h │ │ │ ├── btDbvt.h │ │ │ ├── btDbvtBroadphase.h │ │ │ ├── btDispatcher.h │ │ │ ├── btOverlappingPairCache.h │ │ │ ├── btOverlappingPairCallback.h │ │ │ ├── btQuantizedBvh.h │ │ │ └── btSimpleBroadphase.h │ │ ├── CollisionDispatch │ │ │ ├── SphereTriangleDetector.h │ │ │ ├── btActivatingCollisionAlgorithm.h │ │ │ ├── btBox2dBox2dCollisionAlgorithm.h │ │ │ ├── btBoxBoxCollisionAlgorithm.h │ │ │ ├── btBoxBoxDetector.h │ │ │ ├── btCollisionConfiguration.h │ │ │ ├── btCollisionCreateFunc.h │ │ │ ├── btCollisionDispatcher.h │ │ │ ├── btCollisionDispatcherMt.h │ │ │ ├── btCollisionObject.h │ │ │ ├── btCollisionObjectWrapper.h │ │ │ ├── btCollisionWorld.h │ │ │ ├── btCollisionWorldImporter.h │ │ │ ├── btCompoundCollisionAlgorithm.h │ │ │ ├── btCompoundCompoundCollisionAlgorithm.h │ │ │ ├── btConvex2dConvex2dAlgorithm.h │ │ │ ├── btConvexConcaveCollisionAlgorithm.h │ │ │ ├── btConvexConvexAlgorithm.h │ │ │ ├── btConvexPlaneCollisionAlgorithm.h │ │ │ ├── btDefaultCollisionConfiguration.h │ │ │ ├── btEmptyCollisionAlgorithm.h │ │ │ ├── btGhostObject.h │ │ │ ├── btHashedSimplePairCache.h │ │ │ ├── btInternalEdgeUtility.h │ │ │ ├── btManifoldResult.h │ │ │ ├── btSimulationIslandManager.h │ │ │ ├── btSphereBoxCollisionAlgorithm.h │ │ │ ├── btSphereSphereCollisionAlgorithm.h │ │ │ ├── btSphereTriangleCollisionAlgorithm.h │ │ │ └── btUnionFind.h │ │ ├── CollisionShapes │ │ │ ├── btBox2dShape.h │ │ │ ├── btBoxShape.h │ │ │ ├── btBvhTriangleMeshShape.h │ │ │ ├── btCapsuleShape.h │ │ │ ├── btCollisionMargin.h │ │ │ ├── btCollisionShape.h │ │ │ ├── btCompoundShape.h │ │ │ ├── btConcaveShape.h │ │ │ ├── btConeShape.h │ │ │ ├── btConvex2dShape.h │ │ │ ├── btConvexHullShape.h │ │ │ ├── btConvexInternalShape.h │ │ │ ├── btConvexPointCloudShape.h │ │ │ ├── btConvexPolyhedron.h │ │ │ ├── btConvexShape.h │ │ │ ├── btConvexTriangleMeshShape.h │ │ │ ├── btCylinderShape.h │ │ │ ├── btEmptyShape.h │ │ │ ├── btHeightfieldTerrainShape.h │ │ │ ├── btMaterial.h │ │ │ ├── btMiniSDF.h │ │ │ ├── btMinkowskiSumShape.h │ │ │ ├── btMultiSphereShape.h │ │ │ ├── btMultimaterialTriangleMeshShape.h │ │ │ ├── btOptimizedBvh.h │ │ │ ├── btPolyhedralConvexShape.h │ │ │ ├── btScaledBvhTriangleMeshShape.h │ │ │ ├── btSdfCollisionShape.h │ │ │ ├── btShapeHull.h │ │ │ ├── btSphereShape.h │ │ │ ├── btStaticPlaneShape.h │ │ │ ├── btStridingMeshInterface.h │ │ │ ├── btTetrahedronShape.h │ │ │ ├── btTriangleBuffer.h │ │ │ ├── btTriangleCallback.h │ │ │ ├── btTriangleIndexVertexArray.h │ │ │ ├── btTriangleIndexVertexMaterialArray.h │ │ │ ├── btTriangleInfoMap.h │ │ │ ├── btTriangleMesh.h │ │ │ ├── btTriangleMeshShape.h │ │ │ ├── btTriangleShape.h │ │ │ └── btUniformScalingShape.h │ │ ├── Gimpact │ │ │ ├── btBoxCollision.h │ │ │ ├── btClipPolygon.h │ │ │ ├── btCompoundFromGimpact.h │ │ │ ├── btContactProcessing.h │ │ │ ├── btContactProcessingStructs.h │ │ │ ├── btGImpactBvh.h │ │ │ ├── btGImpactBvhStructs.h │ │ │ ├── btGImpactCollisionAlgorithm.h │ │ │ ├── btGImpactMassUtil.h │ │ │ ├── btGImpactQuantizedBvh.h │ │ │ ├── btGImpactQuantizedBvhStructs.h │ │ │ ├── btGImpactShape.h │ │ │ ├── btGenericPoolAllocator.h │ │ │ ├── btGeometryOperations.h │ │ │ ├── btQuantization.h │ │ │ ├── btTriangleShapeEx.h │ │ │ ├── gim_array.h │ │ │ ├── gim_basic_geometry_operations.h │ │ │ ├── gim_bitset.h │ │ │ ├── gim_box_collision.h │ │ │ ├── gim_box_set.h │ │ │ ├── gim_clip_polygon.h │ │ │ ├── gim_contact.h │ │ │ ├── gim_geom_types.h │ │ │ ├── gim_geometry.h │ │ │ ├── gim_hash_table.h │ │ │ ├── gim_linear_math.h │ │ │ ├── gim_math.h │ │ │ ├── gim_memory.h │ │ │ ├── gim_pair.h │ │ │ ├── gim_radixsort.h │ │ │ └── gim_tri_collision.h │ │ └── NarrowPhaseCollision │ │ │ ├── btComputeGjkEpaPenetration.h │ │ │ ├── btContinuousConvexCollision.h │ │ │ ├── btConvexCast.h │ │ │ ├── btConvexPenetrationDepthSolver.h │ │ │ ├── btDiscreteCollisionDetectorInterface.h │ │ │ ├── btGjkCollisionDescription.h │ │ │ ├── btGjkConvexCast.h │ │ │ ├── btGjkEpa2.h │ │ │ ├── btGjkEpa3.h │ │ │ ├── btGjkEpaPenetrationDepthSolver.h │ │ │ ├── btGjkPairDetector.h │ │ │ ├── btManifoldPoint.h │ │ │ ├── btMinkowskiPenetrationDepthSolver.h │ │ │ ├── btMprPenetration.h │ │ │ ├── btPersistentManifold.h │ │ │ ├── btPointCollector.h │ │ │ ├── btPolyhedralContactClipping.h │ │ │ ├── btRaycastCallback.h │ │ │ ├── btSimplexSolverInterface.h │ │ │ ├── btSubSimplexConvexCast.h │ │ │ └── btVoronoiSimplexSolver.h │ ├── BulletDynamics │ │ ├── Character │ │ │ ├── btCharacterControllerInterface.h │ │ │ └── btKinematicCharacterController.h │ │ ├── ConstraintSolver │ │ │ ├── btBatchedConstraints.h │ │ │ ├── btConeTwistConstraint.h │ │ │ ├── btConstraintSolver.h │ │ │ ├── btContactConstraint.h │ │ │ ├── btContactSolverInfo.h │ │ │ ├── btFixedConstraint.h │ │ │ ├── btGearConstraint.h │ │ │ ├── btGeneric6DofConstraint.h │ │ │ ├── btGeneric6DofSpring2Constraint.h │ │ │ ├── btGeneric6DofSpringConstraint.h │ │ │ ├── btHinge2Constraint.h │ │ │ ├── btHingeConstraint.h │ │ │ ├── btJacobianEntry.h │ │ │ ├── btNNCGConstraintSolver.h │ │ │ ├── btPoint2PointConstraint.h │ │ │ ├── btSequentialImpulseConstraintSolver.h │ │ │ ├── btSequentialImpulseConstraintSolverMt.h │ │ │ ├── btSliderConstraint.h │ │ │ ├── btSolve2LinearConstraint.h │ │ │ ├── btSolverBody.h │ │ │ ├── btSolverConstraint.h │ │ │ ├── btTypedConstraint.h │ │ │ └── btUniversalConstraint.h │ │ ├── Dynamics │ │ │ ├── btActionInterface.h │ │ │ ├── btDiscreteDynamicsWorld.h │ │ │ ├── btDiscreteDynamicsWorldMt.h │ │ │ ├── btDynamicsWorld.h │ │ │ ├── btRigidBody.h │ │ │ ├── btSimpleDynamicsWorld.h │ │ │ └── btSimulationIslandManagerMt.h │ │ ├── Featherstone │ │ │ ├── btMultiBody.h │ │ │ ├── btMultiBodyConstraint.h │ │ │ ├── btMultiBodyConstraintSolver.h │ │ │ ├── btMultiBodyDynamicsWorld.h │ │ │ ├── btMultiBodyFixedConstraint.h │ │ │ ├── btMultiBodyGearConstraint.h │ │ │ ├── btMultiBodyInplaceSolverIslandCallback.h │ │ │ ├── btMultiBodyJointFeedback.h │ │ │ ├── btMultiBodyJointLimitConstraint.h │ │ │ ├── btMultiBodyJointMotor.h │ │ │ ├── btMultiBodyLink.h │ │ │ ├── btMultiBodyLinkCollider.h │ │ │ ├── btMultiBodyMLCPConstraintSolver.h │ │ │ ├── btMultiBodyPoint2Point.h │ │ │ ├── btMultiBodySliderConstraint.h │ │ │ ├── btMultiBodySolverConstraint.h │ │ │ ├── btMultiBodySphericalJointLimit.h │ │ │ └── btMultiBodySphericalJointMotor.h │ │ ├── MLCPSolvers │ │ │ ├── btDantzigLCP.h │ │ │ ├── btDantzigSolver.h │ │ │ ├── btLemkeAlgorithm.h │ │ │ ├── btLemkeSolver.h │ │ │ ├── btMLCPSolver.h │ │ │ ├── btMLCPSolverInterface.h │ │ │ ├── btPATHSolver.h │ │ │ └── btSolveProjectedGaussSeidel.h │ │ └── Vehicle │ │ │ ├── btRaycastVehicle.h │ │ │ ├── btVehicleRaycaster.h │ │ │ └── btWheelInfo.h │ ├── LinearMath │ │ ├── TaskScheduler │ │ │ └── btThreadSupportInterface.h │ │ ├── btAabbUtil2.h │ │ ├── btAlignedAllocator.h │ │ ├── btAlignedObjectArray.h │ │ ├── btConvexHull.h │ │ ├── btConvexHullComputer.h │ │ ├── btCpuFeatureUtility.h │ │ ├── btDefaultMotionState.h │ │ ├── btGeometryUtil.h │ │ ├── btGrahamScan2dConvexHull.h │ │ ├── btHashMap.h │ │ ├── btIDebugDraw.h │ │ ├── btImplicitQRSVD.h │ │ ├── btList.h │ │ ├── btMatrix3x3.h │ │ ├── btMatrixX.h │ │ ├── btMinMax.h │ │ ├── btModifiedGramSchmidt.h │ │ ├── btMotionState.h │ │ ├── btPolarDecomposition.h │ │ ├── btPoolAllocator.h │ │ ├── btQuadWord.h │ │ ├── btQuaternion.h │ │ ├── btQuickprof.h │ │ ├── btRandom.h │ │ ├── btReducedVector.h │ │ ├── btScalar.h │ │ ├── btSerializer.h │ │ ├── btSpatialAlgebra.h │ │ ├── btStackAlloc.h │ │ ├── btThreads.h │ │ ├── btTransform.h │ │ ├── btTransformUtil.h │ │ └── btVector3.h │ ├── btBulletCollisionCommon.h │ └── btBulletDynamicsCommon.h └── lib │ └── win64 │ ├── BulletCollision.lib │ ├── BulletCollision_Debug.lib │ ├── BulletDynamics.lib │ ├── BulletDynamics_Debug.lib │ ├── LinearMath.lib │ └── LinearMath_Debug.lib ├── freetype2 ├── LICENSE.TXT ├── README ├── bin │ └── win64 │ │ └── freetype.dll ├── include │ ├── dlg │ │ ├── dlg.h │ │ └── output.h │ ├── freetype │ │ ├── config │ │ │ ├── ftconfig.h │ │ │ ├── ftheader.h │ │ │ ├── ftmodule.h │ │ │ ├── ftoption.h │ │ │ ├── ftstdlib.h │ │ │ ├── integer-types.h │ │ │ ├── mac-support.h │ │ │ └── public-macros.h │ │ ├── freetype.h │ │ ├── ftadvanc.h │ │ ├── ftbbox.h │ │ ├── ftbdf.h │ │ ├── ftbitmap.h │ │ ├── ftbzip2.h │ │ ├── ftcache.h │ │ ├── ftchapters.h │ │ ├── ftcid.h │ │ ├── ftcolor.h │ │ ├── ftdriver.h │ │ ├── fterrdef.h │ │ ├── fterrors.h │ │ ├── ftfntfmt.h │ │ ├── ftgasp.h │ │ ├── ftglyph.h │ │ ├── ftgxval.h │ │ ├── ftgzip.h │ │ ├── ftimage.h │ │ ├── ftincrem.h │ │ ├── ftlcdfil.h │ │ ├── ftlist.h │ │ ├── ftlogging.h │ │ ├── ftlzw.h │ │ ├── ftmac.h │ │ ├── ftmm.h │ │ ├── ftmodapi.h │ │ ├── ftmoderr.h │ │ ├── ftotval.h │ │ ├── ftoutln.h │ │ ├── ftparams.h │ │ ├── ftpfr.h │ │ ├── ftrender.h │ │ ├── ftsizes.h │ │ ├── ftsnames.h │ │ ├── ftstroke.h │ │ ├── ftsynth.h │ │ ├── ftsystem.h │ │ ├── fttrigon.h │ │ ├── fttypes.h │ │ ├── ftwinfnt.h │ │ ├── internal │ │ │ ├── autohint.h │ │ │ ├── cffotypes.h │ │ │ ├── cfftypes.h │ │ │ ├── ftcalc.h │ │ │ ├── ftdebug.h │ │ │ ├── ftdrv.h │ │ │ ├── ftgloadr.h │ │ │ ├── fthash.h │ │ │ ├── ftmemory.h │ │ │ ├── ftobjs.h │ │ │ ├── ftpsprop.h │ │ │ ├── ftrfork.h │ │ │ ├── ftserv.h │ │ │ ├── ftstream.h │ │ │ ├── fttrace.h │ │ │ ├── ftvalid.h │ │ │ ├── internal.h │ │ │ ├── psaux.h │ │ │ ├── pshints.h │ │ │ ├── services │ │ │ │ ├── svbdf.h │ │ │ │ ├── svcfftl.h │ │ │ │ ├── svcid.h │ │ │ │ ├── svfntfmt.h │ │ │ │ ├── svgldict.h │ │ │ │ ├── svgxval.h │ │ │ │ ├── svkern.h │ │ │ │ ├── svmetric.h │ │ │ │ ├── svmm.h │ │ │ │ ├── svotval.h │ │ │ │ ├── svpfr.h │ │ │ │ ├── svpostnm.h │ │ │ │ ├── svprop.h │ │ │ │ ├── svpscmap.h │ │ │ │ ├── svpsinfo.h │ │ │ │ ├── svsfnt.h │ │ │ │ ├── svttcmap.h │ │ │ │ ├── svtteng.h │ │ │ │ ├── svttglyf.h │ │ │ │ └── svwinfnt.h │ │ │ ├── sfnt.h │ │ │ ├── t1types.h │ │ │ ├── tttypes.h │ │ │ └── wofftypes.h │ │ ├── otsvg.h │ │ ├── t1tables.h │ │ ├── ttnameid.h │ │ ├── tttables.h │ │ └── tttags.h │ └── ft2build.h └── lib │ └── win64 │ └── freetype.lib ├── glew ├── LICENSE.txt ├── bin │ └── win64 │ │ └── glew32.dll ├── include │ └── GL │ │ ├── eglew.h │ │ ├── glew.h │ │ ├── glxew.h │ │ └── wglew.h └── lib │ └── win64 │ └── glew32.lib ├── lua ├── LICENSE.txt ├── README ├── include │ ├── lauxlib.h │ ├── lua.h │ ├── lua.hpp │ ├── luaconf.h │ └── lualib.h └── lib │ └── x64 │ ├── lua_static.lib │ └── lua_static_d.lib └── zlib ├── README.md ├── include ├── zconf.h └── zlib.h └── lib └── win64 └── zlib.lib /.github/roc_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/.github/roc_icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/base64"] 2 | path = vendor/base64 3 | url = https://github.com/tkislan/base64.git 4 | [submodule "vendor/sajson"] 5 | path = vendor/sajson 6 | url = https://github.com/chadaustin/sajson.git 7 | [submodule "vendor/pugixml"] 8 | path = vendor/pugixml 9 | url = https://github.com/zeux/pugixml.git 10 | [submodule "vendor/glm"] 11 | path = vendor/glm 12 | url = https://github.com/g-truc/glm.git 13 | [submodule "vendor/RectangleBinPack"] 14 | path = vendor/RectangleBinPack 15 | url = https://github.com/juj/RectangleBinPack.git 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2023 SDraw 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ![](/.github/roc_icon.png) ROC Engine ![](https://img.shields.io/badge/-C%2B%2B11-orange) ![](https://img.shields.io/badge/VS-2013-blueviolet) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 2 | 3 | Simple forward rendering 3D game engine. 4 | 5 | ## Features 6 | * OpenGL 3.1+ rendering 7 | * GLSL shaders 8 | * Keyframed skeletal animation with hardware skinning 9 | * Frustum culling 10 | * Keyboard, mouse and joypad input 11 | * Physics using [Bullet Physics](../../../../bulletphysics/bullet3) 12 | * Audio playback with spatialization (Ogg, WAV, FLAC) 13 | * TrueType font rendering with Unicode characters support 14 | * Modules support 15 | -------------------------------------------------------------------------------- /animConverter/Animation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Animation final 4 | { 5 | struct keyframeData 6 | { 7 | glm::vec3 m_position; 8 | glm::quat m_rotation; 9 | glm::vec3 m_scale; 10 | unsigned int m_frameIndex; 11 | }; 12 | struct frameData 13 | { 14 | std::vector m_keyframes; 15 | }; 16 | std::vector m_bones; 17 | 18 | unsigned int m_duration; 19 | unsigned int m_fps; 20 | unsigned int m_bonesCount; 21 | 22 | bool m_loaded; 23 | 24 | void Clean(); 25 | public: 26 | Animation(); 27 | ~Animation(); 28 | 29 | bool Load(const std::string &p_path); 30 | bool Generate(const std::string &p_path); 31 | }; 32 | -------------------------------------------------------------------------------- /animConverter/animConverter.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /animConverter/animConverter.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | 7 | $(SolutionDir)bin\win64 8 | WindowsLocalDebugger 9 | 10 | 11 | $(SolutionDir)bin\win64 12 | WindowsLocalDebugger 13 | 14 | -------------------------------------------------------------------------------- /animConverter/main.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Animation.h" 4 | 5 | int main(int argc, char* argv[]) 6 | { 7 | if(argc > 1) 8 | { 9 | std::string l_inputFile(argv[1]); 10 | std::string l_outputFile(l_inputFile); 11 | l_outputFile.append(".raf"); 12 | 13 | Animation *l_anim = new Animation(); 14 | if(l_anim->Load(l_inputFile)) l_anim->Generate(l_outputFile); 15 | std::getchar(); 16 | delete l_anim; 17 | } 18 | else std::cout << "Usage: [input file]" << std::endl; 19 | std::getchar(); 20 | return EXIT_SUCCESS; 21 | } 22 | -------------------------------------------------------------------------------- /animConverter/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /animConverter/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define _CRT_SECURE_NO_WARNINGS 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "glm/glm.hpp" 9 | #include "glm/gtc/quaternion.hpp" 10 | 11 | #include "sajson.h" 12 | -------------------------------------------------------------------------------- /collisionConverter/collisionConverter.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | vendor\pugixml 7 | 8 | 9 | 10 | 11 | {78b9cbe2-ce0a-4993-9588-ce9df2413d50} 12 | 13 | 14 | {de38c398-28d3-4b64-9526-f486a68b638f} 15 | 16 | 17 | -------------------------------------------------------------------------------- /collisionConverter/collisionConverter.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | WindowsLocalDebugger 6 | $(SolutionDir)bin\win64 7 | 8 | 9 | $(SolutionDir)bin\win64 10 | WindowsLocalDebugger 11 | 12 | -------------------------------------------------------------------------------- /modelConverter/Model.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Model final 4 | { 5 | enum ModelType : unsigned char 6 | { 7 | MT_Static = 0x1U, 8 | MT_Animated = 0x2U 9 | }; 10 | ModelType m_type; 11 | bool m_loaded; 12 | 13 | std::vector m_vertexData; 14 | std::vector m_uvData; 15 | std::vector m_normalData; 16 | std::vector m_weightData; 17 | std::vector m_indexData; 18 | 19 | enum MaterialTypeBit : unsigned char 20 | { 21 | MTB_Shading = 0U, 22 | MTB_Depth, 23 | MTB_Transparency, 24 | MTB_Doubleside, 25 | MTB_Filtering, 26 | MTB_Compression 27 | }; 28 | struct Face 29 | { 30 | std::array m_materialIndex; 31 | }; 32 | struct Material 33 | { 34 | std::bitset<8U> m_type; 35 | glm::vec4 m_params; 36 | std::string m_diffuseTexture; 37 | std::vector m_faces; 38 | }; 39 | std::vector m_materials; 40 | 41 | struct Bone 42 | { 43 | std::string m_name; 44 | int m_parent; 45 | glm::vec3 m_position; 46 | glm::quat m_rotation; 47 | glm::vec3 m_scale; 48 | }; 49 | std::vector m_bones; 50 | 51 | void Clean(); 52 | public: 53 | Model(); 54 | ~Model(); 55 | 56 | bool LoadJSON(const std::string &p_path); 57 | bool LoadOBJ(const std::string &p_path); 58 | 59 | bool Generate(const std::string &p_path); 60 | }; 61 | 62 | -------------------------------------------------------------------------------- /modelConverter/Utils.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Utils.h" 4 | 5 | unsigned int CompressData(const void *p_src, unsigned int p_srcLen, void *p_dest, unsigned int p_destLen) 6 | { 7 | z_stream zInfo = { 0 }; 8 | zInfo.total_in = zInfo.avail_in = p_srcLen; 9 | zInfo.total_out = zInfo.avail_out = p_destLen; 10 | zInfo.next_in = static_cast(const_cast(p_src)); 11 | zInfo.next_out = static_cast(p_dest); 12 | 13 | int l_error; 14 | unsigned int l_ret = 0U; 15 | l_error = deflateInit(&zInfo, Z_DEFAULT_COMPRESSION); 16 | if(l_error == Z_OK) 17 | { 18 | l_error = deflate(&zInfo, Z_FINISH); 19 | if(l_error == Z_STREAM_END) l_ret = zInfo.total_out; 20 | } 21 | deflateEnd(&zInfo); 22 | return l_ret; 23 | } 24 | 25 | unsigned int GetMaxCompressedLen(unsigned int p_len) 26 | { 27 | unsigned int l_blocks = (p_len + 16383) / 16384; 28 | return (p_len + 6 + (l_blocks * 5)); 29 | } 30 | -------------------------------------------------------------------------------- /modelConverter/Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | unsigned int CompressData(const void *p_src, unsigned int p_srcLen, void *p_dest, unsigned int p_destLen); 4 | unsigned int GetMaxCompressedLen(unsigned int p_len); 5 | -------------------------------------------------------------------------------- /modelConverter/main.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Model.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | if(argc > 1) 8 | { 9 | std::string l_inputFile(argv[1]); 10 | 11 | Model *l_model = new Model(); 12 | bool l_loadResult = false; 13 | if(l_inputFile.find(".obj") != std::string::npos) l_loadResult = l_model->LoadOBJ(l_inputFile); 14 | else if(l_inputFile.find(".json") != std::string::npos) l_loadResult = l_model->LoadJSON(l_inputFile); 15 | else std::cout << "Error: Unknown model file for conversion. Only OBJ and THREE.js are supported" << std::endl; 16 | if(l_loadResult) 17 | { 18 | std::string l_outputFile(l_inputFile + ".rmf"); 19 | l_model->Generate(l_outputFile); 20 | } 21 | delete l_model; 22 | } 23 | else std::cout << "Usage: [input_file]" << std::endl; 24 | std::cout << "Press any key to exit" << std::endl; 25 | std::getchar(); 26 | return EXIT_SUCCESS; 27 | } 28 | -------------------------------------------------------------------------------- /modelConverter/modelConverter.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modelConverter/modelConverter.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(SolutionDir)bin\win64 5 | WindowsLocalDebugger 6 | 7 | 8 | 9 | 10 | WindowsLocalDebugger 11 | $(SolutionDir)bin\win64 12 | 13 | -------------------------------------------------------------------------------- /modelConverter/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /modelConverter/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define _CRT_SECURE_NO_WARNINGS 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "glm/glm.hpp" 14 | #include "glm/gtc/quaternion.hpp" 15 | 16 | #include "sajson.h" 17 | #include "zlib.h" 18 | -------------------------------------------------------------------------------- /resources/roc_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/resources/roc_icon.png -------------------------------------------------------------------------------- /resources/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /roc_app/Elements/Animation/Animation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/IAnimation.h" 3 | #include "Elements/Element.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class Bone; 9 | class BoneFrameData; 10 | 11 | class Animation final : public Element, public IAnimation 12 | { 13 | unsigned int m_bonesCount; 14 | unsigned int m_framesCount; 15 | unsigned int m_duration; // Animation duration in milliseconds 16 | unsigned int m_fps; 17 | unsigned int m_frameDelta; 18 | 19 | struct keyframeData 20 | { 21 | BoneFrameData *m_leftData = nullptr; 22 | BoneFrameData *m_rightData = nullptr; 23 | unsigned int m_startTime = 0U; 24 | unsigned int m_duration = 0U; // Duration between left and right keyframes in milliseconds 25 | bool m_static = false; 26 | //unsigned char m_interpolationType; // TODO 27 | }; 28 | std::vector> m_boneIntervals; 29 | BoneFrameData *m_tempFrameData; 30 | 31 | bool m_loaded; 32 | 33 | Animation(const Animation &that) = delete; 34 | Animation& operator=(const Animation &that) = delete; 35 | 36 | void Clean(); 37 | public: 38 | Animation(); 39 | ~Animation(); 40 | 41 | size_t GetBonesCount() const; 42 | unsigned int GetDuration() const; 43 | 44 | bool Load(const std::string &p_path); 45 | 46 | void GetData(unsigned int p_tick, std::vector &p_bones, float p_blend = 1.f); 47 | }; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /roc_app/Elements/Animation/BoneFrameData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | namespace ROC 3 | { 4 | 5 | class BoneFrameData final 6 | { 7 | public: 8 | glm::vec3 m_position; 9 | glm::quat m_rotation; 10 | glm::vec3 m_scale; 11 | bool m_useScale; 12 | 13 | BoneFrameData(); 14 | BoneFrameData(const glm::vec3 &p_pos, const glm::quat &p_rot, const glm::vec3 &p_scl); 15 | ~BoneFrameData(); 16 | 17 | bool IsEqual(const BoneFrameData *p_data) const; 18 | 19 | void SetInterpolated(BoneFrameData *p_data, float p_blend); 20 | void SetInterpolated(BoneFrameData *p_leftData, BoneFrameData *p_rightData, float p_blend); 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /roc_app/Elements/Collidable.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Elements/Collidable.h" 4 | 5 | bool ROC::Collidable::SetCollidableWith(Collidable *p_col, bool p_state) 6 | { 7 | bool l_result = false; 8 | std::vector l_groupA; 9 | std::vector l_groupB; 10 | 11 | this->GetRigidBodies(l_groupA); 12 | p_col->GetRigidBodies(l_groupB); 13 | 14 | if(!l_groupA.empty() && !l_groupB.empty()) 15 | { 16 | for(auto l_bodyA : l_groupA) 17 | { 18 | for(auto l_bodyB : l_groupB) 19 | { 20 | l_bodyA->setIgnoreCollisionCheck(l_bodyB, !p_state); 21 | l_bodyB->setIgnoreCollisionCheck(l_bodyA, !p_state); 22 | } 23 | } 24 | l_result = true; 25 | } 26 | 27 | return l_result; 28 | } 29 | 30 | // ROC::ICollidable 31 | bool ROC::Collidable::SetCollidableWith(ICollidable *p_col, bool p_state) 32 | { 33 | return SetCollidableWith(dynamic_cast(p_col), p_state); 34 | } 35 | -------------------------------------------------------------------------------- /roc_app/Elements/Collidable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ICollidable.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class Collidable : public ICollidable 8 | { 9 | Collidable(const Collidable &that) = delete; 10 | Collidable& operator=(const Collidable &that) = delete; 11 | 12 | // ROC::ICollidable 13 | bool SetCollidableWith(ICollidable *p_col, bool p_state) override; 14 | public: 15 | bool SetCollidableWith(Collidable *p_col, bool p_state); 16 | protected: 17 | Collidable() = default; 18 | virtual ~Collidable() = default; 19 | 20 | virtual void GetRigidBodies(std::vector &p_vec) = 0; 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /roc_app/Elements/Drawable.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Elements/Drawable.h" 4 | 5 | ROC::Drawable::Drawable() 6 | { 7 | m_filtering = DFT_None; 8 | } 9 | 10 | unsigned char ROC::Drawable::GetFiltering() const 11 | { 12 | return m_filtering; 13 | }; 14 | -------------------------------------------------------------------------------- /roc_app/Elements/Drawable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/IDrawable.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class Drawable : public IDrawable 8 | { 9 | Drawable(const Drawable &that) = delete; 10 | Drawable& operator=(const Drawable &that) = delete; 11 | public: 12 | virtual bool IsTransparent() const = 0; 13 | virtual bool IsCubic() const = 0; 14 | 15 | virtual const glm::ivec2& GetSize() const = 0; 16 | unsigned char GetFiltering() const; 17 | 18 | virtual void Bind(size_t p_slot = 0U) = 0; 19 | protected: 20 | unsigned char m_filtering; 21 | 22 | Drawable(); 23 | virtual ~Drawable() = default; 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /roc_app/Elements/Element.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/IElement.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class Element : public IElement 8 | { 9 | std::vector m_children; 10 | std::vector m_parents; 11 | 12 | Element(const Element &that) = delete; 13 | Element& operator=(const Element &that) = delete; 14 | public: 15 | virtual ~Element(); 16 | 17 | bool HasChildren() const; 18 | const std::vector& GetChildren() const { return m_children; } 19 | bool HasChild(Element *p_child); 20 | 21 | bool HasParents() const; 22 | const std::vector& GetParents() const { return m_parents; } 23 | bool HasParent(Element *p_parent); 24 | 25 | unsigned char GetElementType() const; 26 | const char* GetElementTypeName() const; 27 | protected: 28 | unsigned char m_elementType; 29 | 30 | Element(); 31 | 32 | // Derived classes use only 33 | static void Link(Element *p_parent, Element *p_child); 34 | static void Unlink(Element *p_parent, Element *p_child); 35 | 36 | // Must-call methods from derived classes 37 | virtual void OnParentRemoved(Element *p_parent); 38 | virtual void OnChildRemoved(Element *p_child); 39 | }; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /roc_app/Elements/Light.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ILight.h" 3 | #include "Elements/Element.h" 4 | #include "Elements/Transformable.h" 5 | 6 | namespace ROC 7 | { 8 | 9 | class Light final : public Element, public Transformable, public ILight 10 | { 11 | glm::vec3 m_direction; 12 | glm::vec4 m_color; 13 | glm::vec2 m_cutoff; 14 | glm::vec3 m_falloff; 15 | unsigned char m_type; 16 | 17 | Light(const Light &that) = delete; 18 | Light& operator=(const Light &that) = delete; 19 | public: 20 | explicit Light(unsigned char p_type); 21 | ~Light() = default; 22 | 23 | void SetDirection(const glm::vec3 &p_vec); 24 | const glm::vec3& GetDirection() const; 25 | 26 | void SetColor(const glm::vec4 &p_vec); 27 | const glm::vec4& GetColor() const; 28 | 29 | void SetCutoff(const glm::vec2 &p_vec); 30 | const glm::vec2& GetCutoff() const; 31 | 32 | void SetFalloff(const glm::vec3 &p_val); 33 | const glm::vec3& GetFalloff() const; 34 | 35 | unsigned char GetType() const; 36 | void SetType(unsigned char p_type); 37 | 38 | // ROC::Transformable 39 | void SetRotation(const glm::quat &p_rot) override; 40 | }; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /roc_app/Elements/Mesh/BoneCollisionData.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | struct BoneCollisionData 7 | { 8 | unsigned char m_type; 9 | glm::vec3 m_size; 10 | glm::vec3 m_offset; 11 | glm::quat m_offsetRotation; 12 | unsigned int m_boneID; 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /roc_app/Elements/Mesh/BoneData.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | struct BoneData 7 | { 8 | std::string m_name; 9 | glm::vec3 m_position; 10 | glm::quat m_rotation; 11 | glm::vec3 m_scale; 12 | int m_parent = -1; 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /roc_app/Elements/Mesh/BoneJointData.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | struct BoneJointPartData 7 | { 8 | unsigned int m_boneID; 9 | unsigned char m_type; 10 | glm::vec3 m_size; 11 | glm::vec3 m_offset; 12 | glm::quat m_rotation; 13 | float m_mass; 14 | float m_restutition; 15 | float m_friction; 16 | glm::vec2 m_damping; 17 | glm::vec3 m_lowerAngularLimit; 18 | glm::vec3 m_upperAngularLimit; 19 | glm::vec3 m_angularStiffness; 20 | glm::vec3 m_lowerLinearLimit; 21 | glm::vec3 m_upperLinearLimit; 22 | glm::vec3 m_linearStiffness; 23 | }; 24 | 25 | struct BoneJointData 26 | { 27 | unsigned int m_boneID; 28 | std::vector m_jointParts; 29 | }; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /roc_app/Elements/Mesh/Mesh.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/IMesh.h" 3 | #include "Elements/Element.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class Material; 9 | struct BoneCollisionData; 10 | struct BoneData; 11 | struct BoneJointData; 12 | 13 | class Mesh final : public Element, public IMesh 14 | { 15 | std::vector m_materials; 16 | size_t m_materialCount; 17 | float m_boundSphereRaduis; 18 | 19 | std::vector m_bonesData; 20 | std::vector m_collisionData; 21 | std::vector m_jointData; 22 | 23 | bool m_loaded; 24 | 25 | Mesh(const Mesh &that) = delete; 26 | Mesh& operator=(const Mesh &that) = delete; 27 | 28 | void Clear(); 29 | public: 30 | explicit Mesh(); 31 | ~Mesh(); 32 | 33 | float GetBoundSphereRadius() const; 34 | size_t GetMaterialsCount() const; 35 | 36 | bool HasBonesData() const; 37 | bool HasBonesCollisionData() const; 38 | bool HasJointsData() const; 39 | 40 | bool Load(const std::string &p_path); 41 | void GenerateMaterials(); 42 | 43 | const std::vector& GetMaterials() const; 44 | const std::vector& GetBonesData() const; 45 | const std::vector& GetBonesCollisionData() const; 46 | const std::vector& GetJointsData() const; 47 | }; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /roc_app/Elements/Model/Animator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class Animation; 7 | class Bone; 8 | 9 | class Animator final 10 | { 11 | enum AnimationState : unsigned char 12 | { 13 | AS_None = 0U, 14 | AS_Paused, 15 | AS_Playing 16 | }; 17 | 18 | Animation *m_animation; 19 | unsigned int m_tick; 20 | AnimationState m_state; 21 | float m_speed; 22 | bool m_loop; 23 | 24 | bool m_blend; 25 | unsigned int m_blendTime; 26 | unsigned int m_blendTimeTick; 27 | float m_blendValue; 28 | 29 | Animator(const Animator &that) = delete; 30 | Animator& operator=(const Animator &that) = delete; 31 | public: 32 | Animator(); 33 | ~Animator() = default; 34 | 35 | bool Play(bool p_loop); 36 | bool Pause(); 37 | bool Reset(); 38 | 39 | bool IsPlaying() const; 40 | bool IsPaused() const; 41 | 42 | bool SetSpeed(float p_speed); 43 | float GetSpeed() const; 44 | 45 | bool SetProgress(float p_val); 46 | float GetProgress() const; 47 | 48 | bool SetBlendTime(unsigned int p_val); 49 | unsigned int GetBlendTime() const; 50 | 51 | void SetAnimation(Animation *p_anim); 52 | Animation* GetAnimation() const; 53 | 54 | unsigned int GetTick() const; 55 | float GetBlendValue() const; 56 | 57 | void Update(); 58 | }; 59 | 60 | } 61 | -------------------------------------------------------------------------------- /roc_app/Elements/Model/Bone.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | namespace ROC 3 | { 4 | 5 | class BoneFrameData; 6 | class Transformation; 7 | 8 | class Bone final 9 | { 10 | #ifdef _DEBUG 11 | std::string m_name; 12 | #endif 13 | Transformation *m_localTransform; 14 | glm::mat4 m_fullMatrix; 15 | glm::mat4 m_bindMatrix; 16 | glm::mat4 m_poseMatrix; 17 | bool m_updated; 18 | 19 | Bone *m_parent; 20 | std::vector m_children; 21 | 22 | Bone(const Bone &that) = delete; 23 | Bone& operator=(const Bone &that) = delete; 24 | public: 25 | Bone(const std::string &p_name, const glm::quat &p_rot, const glm::vec3 &p_pos, const glm::vec3 &p_scl); 26 | ~Bone(); 27 | 28 | Bone* GetParent() const; 29 | const std::vector& GetChildren() const; 30 | 31 | const Transformation* GetLocalTransformation() const; 32 | const glm::mat4& GetBindMatrix() const; 33 | const glm::mat4& GetFullMatrix() const; 34 | const glm::mat4& GetPoseMatrix() const; 35 | 36 | bool IsUpdated() const; 37 | 38 | void GenerateBindPose(); 39 | void SetFrameData(BoneFrameData *p_data); 40 | void SetFrameData(BoneFrameData *p_data, float p_blend); 41 | 42 | void SetParent(Bone *p_bone); 43 | void AddChild(Bone *p_bone); 44 | 45 | void SetFullMatrix(const btTransform &p_transform); 46 | void SetPoseMatrix(const btTransform &p_transform); 47 | 48 | void Update(); 49 | }; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /roc_app/Elements/RenderTarget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/IRenderTarget.h" 3 | #include "Elements/Drawable.h" 4 | #include "Elements/Element.h" 5 | 6 | class GLTexture2D; 7 | class GLFramebuffer; 8 | class GLRenderbuffer; 9 | 10 | namespace ROC 11 | { 12 | 13 | class RenderTarget final : public Element, public Drawable, public IRenderTarget 14 | { 15 | unsigned char m_type; 16 | 17 | GLFramebuffer *m_framebuffer; 18 | GLRenderbuffer *m_renderbuffer; 19 | GLTexture2D *m_texture; 20 | glm::ivec2 m_size; 21 | 22 | glm::vec4 m_clearColor; 23 | glm::bvec2 m_clearBuffer; // Depth, color 24 | 25 | RenderTarget(const RenderTarget &that) = delete; 26 | RenderTarget& operator=(const RenderTarget &that) = delete; 27 | 28 | void Clear(); 29 | public: 30 | RenderTarget(); 31 | ~RenderTarget(); 32 | 33 | bool Create(unsigned char p_type, const glm::ivec2 &p_size, unsigned char p_filter); 34 | 35 | const glm::ivec2& GetSize() const; 36 | 37 | bool IsTransparent() const; 38 | bool IsCubic() const; 39 | bool IsShadowType() const; 40 | 41 | bool SetProperty(RenderTargetProperty p_prop, const void *p_val); 42 | 43 | GLTexture2D* GetGLTexture() const; 44 | 45 | void Bind(size_t p_slot); 46 | void BindBuffer(bool p_clear = true); 47 | static void ResetBuffer(); 48 | }; 49 | 50 | } 51 | -------------------------------------------------------------------------------- /roc_app/Elements/Shader/ShaderUniform.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Elements/Shader/ShaderUniform.h" 4 | 5 | ROC::ShaderUniform::ShaderUniform(GLint p_uniform, unsigned char p_type, size_t p_dataSize, size_t p_count) 6 | { 7 | m_uniformName = p_uniform; 8 | m_type = p_type; 9 | m_data = ((p_dataSize > 0U) ? new unsigned char[p_dataSize] : nullptr); 10 | m_dataSize = p_dataSize; 11 | m_count = p_count; 12 | m_updated = false; 13 | } 14 | 15 | ROC::ShaderUniform::~ShaderUniform() 16 | { 17 | if(m_dataSize > 0U) delete[]m_data; 18 | } 19 | 20 | void ROC::ShaderUniform::SetData(const void *p_data, size_t p_dataSize) 21 | { 22 | if(p_dataSize <= m_dataSize) 23 | { 24 | if(std::memcmp(m_data, p_data, p_dataSize) != 0) 25 | { 26 | std::memcpy(m_data, p_data, p_dataSize); 27 | m_updated = true; 28 | } 29 | } 30 | } 31 | 32 | const void* ROC::ShaderUniform::GetData() const 33 | { 34 | return m_data; 35 | } 36 | 37 | GLint ROC::ShaderUniform::GetUniformName() const 38 | { 39 | return m_uniformName; 40 | } 41 | 42 | unsigned char ROC::ShaderUniform::GetType() const 43 | { 44 | return m_type; 45 | } 46 | 47 | size_t ROC::ShaderUniform::GetCount() const 48 | { 49 | return m_count; 50 | } 51 | 52 | bool ROC::ShaderUniform::IsUpdated() const 53 | { 54 | return m_updated; 55 | } 56 | 57 | void ROC::ShaderUniform::ResetUpdate() 58 | { 59 | m_updated = false; 60 | } 61 | -------------------------------------------------------------------------------- /roc_app/Elements/Shader/ShaderUniform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ShaderUniform final 7 | { 8 | GLint m_uniformName; 9 | unsigned char m_type; 10 | unsigned char *m_data; 11 | size_t m_dataSize; 12 | size_t m_count; 13 | bool m_updated; 14 | public: 15 | ShaderUniform(GLint p_uniform, unsigned char p_type, size_t p_dataSize, size_t p_count = 1U); 16 | ~ShaderUniform(); 17 | 18 | void SetData(const void *p_data, size_t p_dataSize); 19 | const void* GetData() const; 20 | 21 | GLint GetUniformName() const; 22 | unsigned char GetType() const; 23 | size_t GetCount() const; 24 | 25 | bool IsUpdated() const; 26 | void ResetUpdate(); 27 | }; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /roc_app/Elements/Sound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ISound.h" 3 | #include "Elements/Element.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class Sound final : public Element, public ISound 9 | { 10 | sf::Music *m_handle; 11 | 12 | bool m_relative; 13 | bool m_looped; 14 | bool m_mono; 15 | 16 | glm::vec3 m_v3DPosition; 17 | glm::vec2 m_v3DDistance; 18 | 19 | Sound(const Sound &that) = delete; 20 | Sound& operator=(const Sound &that) = delete; 21 | public: 22 | explicit Sound(); 23 | ~Sound(); 24 | 25 | bool Load(const std::string &p_path); 26 | 27 | void Play(); 28 | void Pause(); 29 | void Stop(); 30 | 31 | bool IsLooped() const; 32 | bool SetLoop(bool p_loop); 33 | 34 | float GetDuration(); 35 | 36 | void SetSpeed(float p_speed); 37 | float GetSpeed(); 38 | 39 | void SetVolume(float p_volume); 40 | float GetVolume(); 41 | 42 | void SetTime(float p_time); 43 | float GetTime(); 44 | 45 | bool Set3DPositionEnabled(bool p_state); 46 | bool Get3DPositionEnabled() const; 47 | 48 | bool Set3DPosition(const glm::vec3 &p_pos); 49 | const glm::vec3& Get3DPosition() const; 50 | 51 | bool Set3DDistance(const glm::vec2 &p_dist); 52 | const glm::vec2& Get3DDistance() const; 53 | 54 | int GetState() const; 55 | }; 56 | 57 | } 58 | -------------------------------------------------------------------------------- /roc_app/Elements/Texture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ITexture.h" 3 | #include "Elements/Drawable.h" 4 | #include "Elements/Element.h" 5 | 6 | class GLTexture; 7 | 8 | namespace ROC 9 | { 10 | 11 | class Texture final : public Element, public Drawable, public ITexture 12 | { 13 | unsigned char m_type; 14 | glm::ivec2 m_size; 15 | bool m_compressed; 16 | 17 | GLTexture *m_texture; 18 | 19 | Texture(const Texture &that) = delete; 20 | Texture& operator=(const Texture &that) = delete; 21 | public: 22 | Texture(); 23 | ~Texture(); 24 | 25 | bool Load(const std::string &p_path, unsigned char p_type, unsigned char p_filter, bool p_compress); 26 | bool LoadCubemap(const std::vector &p_path, unsigned char p_filter, bool p_compress); 27 | bool LoadDummy(); 28 | 29 | bool IsTransparent() const; 30 | bool IsCubic() const; 31 | bool IsCompressed() const; 32 | 33 | const glm::ivec2& GetSize() const; 34 | 35 | void Bind(size_t p_slot = 0U); 36 | }; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /roc_app/Elements/Transformable.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Elements/Transformable.h" 3 | 4 | ROC::Transformable::Transformable() 5 | { 6 | m_transform = new Transformation(); 7 | } 8 | 9 | ROC::Transformable::~Transformable() 10 | { 11 | delete m_transform; 12 | } 13 | 14 | void ROC::Transformable::SetPosition(const glm::vec3 &p_pos) 15 | { 16 | m_transform->SetPosition(p_pos); 17 | } 18 | 19 | const glm::vec3& ROC::Transformable::GetPosition() const 20 | { 21 | return m_transform->GetPosition(); 22 | } 23 | 24 | void ROC::Transformable::SetRotation(const glm::quat &p_rot) 25 | { 26 | m_transform->SetRotation(p_rot); 27 | } 28 | 29 | const glm::quat& ROC::Transformable::GetRotation() const 30 | { 31 | return m_transform->GetRotation(); 32 | } 33 | 34 | void ROC::Transformable::SetScale(const glm::vec3 &p_scl) 35 | { 36 | m_transform->SetScale(p_scl); 37 | } 38 | 39 | const glm::vec3& ROC::Transformable::GetScale() const 40 | { 41 | return m_transform->GetScale(); 42 | } 43 | 44 | const glm::mat4& ROC::Transformable::GetMatrix() const 45 | { 46 | return m_transform->GetMatrix(); 47 | } 48 | 49 | void ROC::Transformable::UpdateMatrix() 50 | { 51 | m_transform->UpdateMatrix(); 52 | } 53 | 54 | bool ROC::Transformable::NeedsUpdate() const 55 | { 56 | return m_transform->NeedsUpdate(); 57 | } 58 | 59 | bool ROC::Transformable::IsUpdated() const 60 | { 61 | return m_transform->IsUpdated(); 62 | } 63 | 64 | bool ROC::Transformable::IsScaled() const 65 | { 66 | return m_transform->IsScaled(); 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /roc_app/Elements/Transformable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ITransformable.h" 3 | #include "Utils/Transformation.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class Transformation; 9 | 10 | class Transformable : public ITransformable 11 | { 12 | Transformation *m_transform; 13 | protected: 14 | Transformable(); 15 | virtual ~Transformable(); 16 | public: 17 | // ROC::ITransformable 18 | void SetPosition(const glm::vec3 &p_pos); 19 | const glm::vec3& GetPosition() const; 20 | void SetRotation(const glm::quat &p_rot); 21 | const glm::quat& GetRotation() const; 22 | void SetScale(const glm::vec3 &p_scl); 23 | const glm::vec3& GetScale() const; 24 | const glm::mat4& GetMatrix() const; 25 | 26 | bool NeedsUpdate() const; 27 | void UpdateMatrix(); 28 | bool IsUpdated() const; 29 | bool IsScaled() const; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /roc_app/GL/GLArrayBuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "GLArrayBuffer.h" 4 | 5 | GLuint GLArrayBuffer::ms_activeName = 0U; 6 | 7 | GLArrayBuffer::GLArrayBuffer() 8 | { 9 | m_name = 0U; 10 | } 11 | 12 | bool GLArrayBuffer::Create(size_t p_size, const void *p_data, GLenum p_usage) 13 | { 14 | if(m_name == 0U) 15 | { 16 | glGenBuffers(1, &m_name); 17 | if(m_name != 0U) 18 | { 19 | glBindBuffer(GL_ARRAY_BUFFER, m_name); 20 | glBufferData(GL_ARRAY_BUFFER, p_size, p_data, p_usage); 21 | 22 | if(ms_activeName != 0U) glBindBuffer(GL_ARRAY_BUFFER, ms_activeName); 23 | } 24 | } 25 | 26 | return (m_name != 0U); 27 | } 28 | 29 | bool GLArrayBuffer::Destroy() 30 | { 31 | if(m_name != 0U) 32 | { 33 | glDeleteBuffers(1, &m_name); 34 | 35 | if(ms_activeName == m_name) ms_activeName = 0U; 36 | m_name = 0U; 37 | } 38 | 39 | return (m_name == 0U); 40 | } 41 | 42 | bool GLArrayBuffer::Bind() 43 | { 44 | if((m_name != 0U) && (ms_activeName != m_name)) 45 | { 46 | glBindBuffer(GL_ARRAY_BUFFER, m_name); 47 | ms_activeName = m_name; 48 | } 49 | 50 | return (m_name != 0U); 51 | } 52 | 53 | bool GLArrayBuffer::Update(GLintptr p_offset, GLsizeiptr p_size, const void *p_data) 54 | { 55 | if(m_name != 0U) 56 | { 57 | if(ms_activeName != m_name) glBindBuffer(GL_ARRAY_BUFFER, m_name); 58 | glBufferSubData(GL_ARRAY_BUFFER, p_offset, p_size, p_data); 59 | if(ms_activeName != m_name) glBindBuffer(GL_ARRAY_BUFFER, ms_activeName); 60 | } 61 | 62 | return (m_name != 0U); 63 | } 64 | -------------------------------------------------------------------------------- /roc_app/GL/GLArrayBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLArrayBuffer final 4 | { 5 | GLuint m_name; 6 | 7 | __declspec(thread) static GLuint ms_activeName; 8 | 9 | GLArrayBuffer(const GLArrayBuffer &that) = delete; 10 | GLArrayBuffer& operator=(const GLArrayBuffer &that) = delete; 11 | public: 12 | GLArrayBuffer(); 13 | ~GLArrayBuffer() = default; 14 | 15 | bool Create(size_t p_size, const void *p_data, GLenum p_usage); 16 | bool Destroy(); 17 | 18 | bool Bind(); 19 | bool Update(GLintptr p_offset, GLsizeiptr p_size, const void *p_data); 20 | }; 21 | -------------------------------------------------------------------------------- /roc_app/GL/GLFramebuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLFramebuffer final 4 | { 5 | GLuint m_name; 6 | 7 | __declspec(thread) static GLuint ms_activeName; 8 | 9 | GLFramebuffer(const GLFramebuffer &that) = delete; 10 | GLFramebuffer& operator=(const GLFramebuffer &that) = delete; 11 | public: 12 | GLFramebuffer(); 13 | ~GLFramebuffer() = default; 14 | 15 | bool Create(); 16 | bool Destroy(); 17 | 18 | bool SetRenderbuffer(GLenum p_attachment, GLuint p_name); 19 | bool SetTexture2D(GLenum p_attachment, GLuint p_name); 20 | bool SetDrawBuffer(GLenum p_buffer); 21 | bool SetReadBuffer(GLenum p_buffer); 22 | 23 | bool Bind(); 24 | static void Reset(); 25 | 26 | static GLenum CheckStatus(); 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /roc_app/GL/GLRenderbuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "GLRenderbuffer.h" 4 | 5 | GLuint GLRenderbuffer::ms_activeName = 0U; 6 | 7 | GLRenderbuffer::GLRenderbuffer() 8 | { 9 | m_name = 0U; 10 | } 11 | 12 | bool GLRenderbuffer::Create(GLenum p_format, GLsizei p_width, GLsizei p_height) 13 | { 14 | if(m_name == 0U) 15 | { 16 | glGenRenderbuffers(1, &m_name); 17 | if(m_name != 0U) 18 | { 19 | glBindRenderbuffer(GL_RENDERBUFFER, m_name); 20 | glRenderbufferStorage(GL_RENDERBUFFER, p_format, p_width, p_height); 21 | 22 | glBindRenderbuffer(GL_RENDERBUFFER, ms_activeName); 23 | } 24 | } 25 | 26 | return (m_name != 0U); 27 | } 28 | 29 | bool GLRenderbuffer::Destroy() 30 | { 31 | if(m_name != 0U) 32 | { 33 | if(ms_activeName == m_name) 34 | { 35 | ms_activeName = 0U; 36 | glBindRenderbuffer(GL_RENDERBUFFER, ms_activeName); 37 | } 38 | 39 | glDeleteRenderbuffers(1, &m_name); 40 | m_name = 0U; 41 | } 42 | 43 | return (m_name == 0U); 44 | } 45 | 46 | GLuint GLRenderbuffer::GetName() const 47 | { 48 | return m_name; 49 | } 50 | 51 | bool GLRenderbuffer::Bind() 52 | { 53 | if((m_name != 0U) && (ms_activeName != m_name)) 54 | { 55 | glBindRenderbuffer(GL_RENDERBUFFER, m_name); 56 | ms_activeName = m_name; 57 | } 58 | 59 | return (m_name != 0U); 60 | } 61 | 62 | void GLRenderbuffer::Reset() 63 | { 64 | if(ms_activeName != 0U) 65 | { 66 | ms_activeName = 0U; 67 | glBindRenderbuffer(GL_RENDERBUFFER, ms_activeName); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /roc_app/GL/GLRenderbuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLRenderbuffer final 4 | { 5 | GLuint m_name; 6 | 7 | __declspec(thread) static GLuint ms_activeName; 8 | 9 | GLRenderbuffer(const GLRenderbuffer &that) = delete; 10 | GLRenderbuffer& operator=(const GLRenderbuffer &that) = delete; 11 | public: 12 | GLRenderbuffer(); 13 | ~GLRenderbuffer() = default; 14 | 15 | bool Create(GLenum p_format, GLsizei p_width, GLsizei p_height); 16 | bool Destroy(); 17 | 18 | GLuint GetName() const; 19 | 20 | bool Bind(); 21 | static void Reset(); 22 | }; 23 | -------------------------------------------------------------------------------- /roc_app/GL/GLSetting.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "GL/GLSetting.h" 4 | 5 | std::map *GLSetting::ms_settings = nullptr; 6 | bool GLSetting::ms_depthMask = false; 7 | GLenum GLSetting::ms_fillMode = GL_FILL; 8 | GLint GLSetting::ms_pixelUnpackAlignment = 4; 9 | 10 | void GLSetting::Set(GLenum p_setting, bool p_state) 11 | { 12 | if(!ms_settings) ms_settings = new std::map(); 13 | auto l_setting = ms_settings->find(p_setting); 14 | if(l_setting != ms_settings->end()) 15 | { 16 | if(l_setting->second != p_state) 17 | { 18 | l_setting->second = p_state; 19 | p_state ? glEnable(p_setting) : glDisable(p_setting); 20 | } 21 | } 22 | else 23 | { 24 | ms_settings->emplace(p_setting, p_state); 25 | p_state ? glEnable(p_setting) : glDisable(p_setting); 26 | } 27 | } 28 | 29 | void GLSetting::SetDepthMask(bool p_state) 30 | { 31 | if(ms_depthMask != p_state) 32 | { 33 | glDepthMask(p_state ? 1U : 0U); 34 | ms_depthMask = p_state; 35 | } 36 | } 37 | 38 | void GLSetting::SetFillMode(GLenum p_mode) 39 | { 40 | if(ms_fillMode != p_mode) 41 | { 42 | glPolygonMode(GL_FRONT_AND_BACK, p_mode); 43 | ms_fillMode = p_mode; 44 | } 45 | } 46 | 47 | void GLSetting::SetPixelUnpackAlignment(GLint p_value) 48 | { 49 | if(ms_pixelUnpackAlignment != p_value) 50 | { 51 | glPixelStorei(GL_UNPACK_ALIGNMENT, p_value); 52 | ms_pixelUnpackAlignment = p_value; 53 | } 54 | } 55 | 56 | const unsigned char* GLSetting::GetString(GLenum p_value) 57 | { 58 | return glGetString(p_value); 59 | } 60 | 61 | void GLSetting::GetInteger(GLenum p_val, GLint *p_int) 62 | { 63 | glGetIntegerv(p_val, p_int); 64 | } 65 | 66 | void GLSetting::MemoryCleanup() 67 | { 68 | delete ms_settings; 69 | ms_settings = nullptr; 70 | } 71 | -------------------------------------------------------------------------------- /roc_app/GL/GLSetting.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLSetting final 4 | { 5 | __declspec(thread) static std::map *ms_settings; 6 | __declspec(thread) static bool ms_depthMask; 7 | __declspec(thread) static GLenum ms_fillMode; 8 | __declspec(thread) static GLint ms_pixelUnpackAlignment; 9 | 10 | GLSetting() = delete; 11 | GLSetting(const GLSetting &that) = delete; 12 | GLSetting& operator=(const GLSetting &that) = delete; 13 | ~GLSetting() = delete; 14 | public: 15 | static void Set(GLenum p_setting, bool p_state); 16 | static void SetDepthMask(bool p_state); 17 | static void SetFillMode(GLenum p_mode); 18 | static void SetPixelUnpackAlignment(GLint p_value); 19 | static const unsigned char* GetString(GLenum p_value); 20 | static void GetInteger(GLenum p_val, GLint *p_int); 21 | 22 | static void MemoryCleanup(); 23 | }; 24 | -------------------------------------------------------------------------------- /roc_app/GL/GLShader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLShader final 4 | { 5 | GLuint m_program; 6 | GLuint m_vertex; 7 | GLuint m_fragment; 8 | GLuint m_geometry; 9 | 10 | std::string m_log; 11 | 12 | __declspec(thread) static GLuint ms_activeProgram; 13 | 14 | GLShader(const GLShader &that) = delete; 15 | GLShader& operator=(const GLShader &that) = delete; 16 | public: 17 | GLShader(); 18 | ~GLShader() = default; 19 | 20 | bool Create(const char *p_vertex, size_t p_vertexSize, const char *p_fragment, size_t p_fragmentSize, const char *p_geometry, size_t p_geometrySize); 21 | bool Destroy(); 22 | 23 | const std::string& GetLog() const; 24 | GLint GetUniformLocation(const char *p_name); 25 | bool GetUniformInfo(GLint p_index, GLenum &p_type, std::string &p_name); 26 | GLint GetUniformsCount(); 27 | 28 | bool SetAttribute(GLuint p_index, const char *p_name); 29 | bool SetUniform(GLint p_index, const int *p_data, size_t p_count); 30 | bool SetUniform(GLint p_index, const unsigned int *p_data, size_t p_count); 31 | bool SetUniform(GLint p_index, const float *p_data, size_t p_count); 32 | bool SetUniform(GLint p_index, const double *p_data, size_t p_count); 33 | bool SetUniform(GLint p_index, size_t p_dim, const float *p_data, size_t p_count); 34 | bool SetUniform(GLint p_index, size_t p_dim, const double *p_data, size_t p_count); 35 | 36 | bool Bind(); 37 | }; 38 | -------------------------------------------------------------------------------- /roc_app/GL/GLState.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "GL/GLState.h" 4 | 5 | void GLState::Finish() 6 | { 7 | glFinish(); 8 | } 9 | 10 | void GLState::Flush() 11 | { 12 | glFlush(); 13 | } 14 | -------------------------------------------------------------------------------- /roc_app/GL/GLState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLState final 4 | { 5 | GLState() = delete; 6 | GLState(const GLState &that) = delete; 7 | GLState& operator=(const GLState &that) = delete; 8 | ~GLState() = delete; 9 | public: 10 | static void Finish(); 11 | static void Flush(); 12 | }; 13 | -------------------------------------------------------------------------------- /roc_app/GL/GLTexture.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "GL/GLTexture.h" 4 | 5 | GLuint GLTexture::ms_activeSlot = 0U; 6 | std::array GLTexture::ms_activeName = { 0U }; 7 | std::array GLTexture::ms_activeNameType = { GL_NONE }; 8 | 9 | GLTexture::GLTexture() 10 | { 11 | m_name = 0U; 12 | m_internalType = GL_NONE; 13 | } 14 | 15 | GLuint GLTexture::GetName() const 16 | { 17 | return m_name; 18 | } 19 | 20 | bool GLTexture::Destroy() 21 | { 22 | if(m_name != 0U) 23 | { 24 | for(size_t i = 0U; i < 16U; i++) 25 | { 26 | if(ms_activeName[i] == m_name) 27 | { 28 | ms_activeName[i] = 0U; 29 | ms_activeNameType[i] = GL_NONE; 30 | } 31 | } 32 | 33 | glDeleteTextures(1, &m_name); 34 | m_name = 0U; 35 | } 36 | return (m_name == 0U); 37 | } 38 | 39 | bool GLTexture::Bind(GLenum p_slot) 40 | { 41 | if((m_name != 0U) && (ms_activeName[p_slot] != m_name)) 42 | { 43 | if(ms_activeSlot != p_slot) 44 | { 45 | glActiveTexture(GL_TEXTURE0 + p_slot); 46 | ms_activeSlot = p_slot; 47 | } 48 | 49 | ms_activeName[ms_activeSlot] = m_name; 50 | ms_activeNameType[ms_activeSlot] = m_internalType; 51 | glBindTexture(m_internalType, m_name); 52 | } 53 | 54 | return (m_name != 0U); 55 | } 56 | 57 | void GLTexture::Rebind() 58 | { 59 | for(size_t i = 0U; i < 16U; i++) 60 | { 61 | if(ms_activeName[i] != 0U) 62 | { 63 | glActiveTexture(GL_TEXTURE0 + static_cast(i)); 64 | glBindTexture(ms_activeNameType[i], ms_activeName[i]); 65 | } 66 | } 67 | 68 | glActiveTexture(GL_TEXTURE0 + ms_activeSlot); 69 | } 70 | -------------------------------------------------------------------------------- /roc_app/GL/GLTexture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLTexture 4 | { 5 | GLTexture(const GLTexture &that) = delete; 6 | GLTexture& operator=(const GLTexture &that) = delete; 7 | public: 8 | virtual ~GLTexture() = default; 9 | 10 | GLuint GetName() const; 11 | 12 | bool Destroy(); 13 | bool Bind(GLenum p_slot = 0U); 14 | 15 | static void Rebind(); 16 | protected: 17 | GLuint m_name; 18 | GLenum m_internalType; 19 | 20 | __declspec(thread) static GLuint ms_activeSlot; 21 | __declspec(thread) static std::array ms_activeName; 22 | __declspec(thread) static std::array ms_activeNameType; 23 | 24 | GLTexture(); 25 | }; 26 | -------------------------------------------------------------------------------- /roc_app/GL/GLTexture2D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GL/GLTexture.h" 3 | 4 | class GLTexture2D final : public GLTexture 5 | { 6 | GLTexture2D(const GLTexture2D &that) = delete; 7 | GLTexture2D& operator=(const GLTexture2D &that) = delete; 8 | public: 9 | GLTexture2D(); 10 | ~GLTexture2D() = default; 11 | 12 | bool Create(GLsizei p_width, GLsizei p_height, GLint p_format, GLenum p_dataFormat, const void *p_data, GLenum p_filter = GL_NEAREST); 13 | 14 | bool SetSwizzle(GLenum p_swizzle, const GLint *p_order); 15 | bool SetCompareFunc(GLenum p_func); 16 | bool SetCompareMode(GLenum p_mode); 17 | bool SetWrap(GLenum p_wrap); 18 | bool Update(GLint p_posX, GLint p_posY, GLsizei p_width, GLsizei p_height, GLenum p_dataFormat, const void *p_data); 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /roc_app/GL/GLTextureCubemap.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "GL/GLTextureCubemap.h" 4 | 5 | GLTextureCubemap::GLTextureCubemap() 6 | { 7 | m_internalType = GL_TEXTURE_CUBE_MAP; 8 | } 9 | 10 | bool GLTextureCubemap::Create(GLsizei p_width, GLsizei p_height, GLint p_format, GLenum p_dataFormat, const std::vector &p_data, GLenum p_filter) 11 | { 12 | if((m_name == 0U) && (p_data.size() >= 6U)) 13 | { 14 | glGenTextures(1, &m_name); 15 | if(m_name != 0U) 16 | { 17 | glBindTexture(GL_TEXTURE_CUBE_MAP, m_name); 18 | glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_REPEAT); 19 | glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_REPEAT); 20 | glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, p_filter); 21 | glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, p_filter); 22 | 23 | for(size_t i = 0U; i < 6U; i++) glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + static_cast(i), 0, p_format, p_width, p_height, 0, p_dataFormat, GL_UNSIGNED_BYTE, p_data[i]); 24 | 25 | if(ms_activeName[ms_activeSlot] != 0U) glBindTexture(ms_activeNameType[ms_activeSlot], ms_activeName[ms_activeSlot]); 26 | } 27 | } 28 | return (m_name != 0U); 29 | } 30 | -------------------------------------------------------------------------------- /roc_app/GL/GLTextureCubemap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GL/GLTexture.h" 3 | 4 | class GLTextureCubemap final : public GLTexture 5 | { 6 | GLTextureCubemap(const GLTextureCubemap &that) = delete; 7 | GLTextureCubemap& operator=(const GLTextureCubemap &that) = delete; 8 | public: 9 | GLTextureCubemap(); 10 | ~GLTextureCubemap() = default; 11 | 12 | bool Create(GLsizei p_width, GLsizei p_height, GLint p_format, GLenum p_dataFormat, const std::vector &p_data, GLenum p_filter = GL_NEAREST); 13 | }; 14 | -------------------------------------------------------------------------------- /roc_app/GL/GLVertexArray.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLVertexArray final 4 | { 5 | GLuint m_name; 6 | 7 | __declspec(thread) static GLuint ms_activeName; 8 | 9 | GLVertexArray(const GLVertexArray &that) = delete; 10 | GLVertexArray& operator=(const GLVertexArray &that) = delete; 11 | public: 12 | GLVertexArray(); 13 | ~GLVertexArray() = default; 14 | 15 | bool Create(); 16 | bool Destroy(); 17 | 18 | bool EnableAttribute(GLuint p_index, GLsizei p_size, GLenum p_type); 19 | 20 | bool Bind(); 21 | bool Draw(GLenum p_mode, GLsizei p_count); 22 | }; 23 | -------------------------------------------------------------------------------- /roc_app/GL/GLViewport.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLViewport final 4 | { 5 | __declspec(thread) static GLint ms_positionX; 6 | __declspec(thread) static GLint ms_positionY; 7 | __declspec(thread) static GLsizei ms_width; 8 | __declspec(thread) static GLsizei ms_height; 9 | __declspec(thread) static float ms_clearColorR; 10 | __declspec(thread) static float ms_clearColorG; 11 | __declspec(thread) static float ms_clearColorB; 12 | __declspec(thread) static float ms_clearColorA; 13 | __declspec(thread) static GLenum ms_blendSource; 14 | __declspec(thread) static GLenum ms_blendDestination; 15 | __declspec(thread) static float ms_lineWidth; 16 | 17 | GLViewport() = delete; 18 | GLViewport(const GLViewport &that) = delete; 19 | GLViewport& operator=(const GLViewport &that) = delete; 20 | ~GLViewport() = delete; 21 | public: 22 | static void SetViewport(GLint p_x, GLint p_y, GLsizei p_width, GLsizei p_height); 23 | static void Clear(bool p_depth, bool p_color); 24 | static void SetClearColor(float p_red, float p_green, float p_blue, float p_alpha); 25 | static void SetBlendFunctions(GLenum p_src, GLenum p_dst); 26 | static void SetLineWidth(float p_width); 27 | }; 28 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IAnimation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IAnimation 7 | { 8 | protected: 9 | ~IAnimation() = default; 10 | public: 11 | virtual size_t GetBonesCount() const = 0; 12 | virtual unsigned int GetDuration() const = 0; 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ICamera.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ICamera 7 | { 8 | protected: 9 | ~ICamera() = default; 10 | public: 11 | enum CameraProjectionType : unsigned char 12 | { 13 | CPT_Perspective = 0U, 14 | CPT_Orthogonal, 15 | CPT_Screen 16 | }; 17 | 18 | virtual void SetProjectionType(unsigned char p_type) = 0; 19 | virtual unsigned char GetProjectionType() const = 0; 20 | virtual void SetFOV(float p_fov) = 0; 21 | virtual float GetFOV() const = 0; 22 | virtual void SetAspectRatio(float p_ratio) = 0; 23 | virtual float GetAspectRatio() const = 0; 24 | virtual void SetOrthoParams(const glm::vec4 &p_size) = 0; 25 | virtual const glm::vec4& GetOrthoParams() const = 0; 26 | virtual void SetDepth(const glm::vec2 &p_depth) = 0; 27 | virtual const glm::vec2& GetDepth() const = 0; 28 | virtual void SetDirection(const glm::vec3 &p_dir) = 0; 29 | virtual const glm::vec3& GetDirection() const = 0; 30 | virtual void SetUpDirection(const glm::vec3 &p_dir) = 0; 31 | virtual const glm::vec3& GetUpDirection() const = 0; 32 | virtual const glm::mat4& GetViewMatrix() const = 0; 33 | virtual const glm::mat4& GetProjectionMatrix() const = 0; 34 | virtual const glm::mat4& GetViewProjectionMatrix() const = 0; 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ICollidable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ICollidable 7 | { 8 | protected: 9 | ~ICollidable() = default; 10 | public: 11 | virtual bool SetCollidableWith(ICollidable *p_col, bool p_state) = 0; 12 | }; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ICollider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ICollider 7 | { 8 | protected: 9 | ~ICollider() = default; 10 | public: 11 | enum ColliderType : unsigned char 12 | { 13 | CT_Sphere = 0U, 14 | CT_Box, 15 | CT_Cylinder, 16 | CT_Capsule, 17 | CT_Cone 18 | }; 19 | enum ColliderMotionType : unsigned char 20 | { 21 | CMT_Default = 0U, 22 | CMT_Static, 23 | CMT_Kinematic 24 | }; 25 | 26 | virtual void SetVelocity(const glm::vec3 &p_val) = 0; 27 | virtual void GetVelocity(glm::vec3 &p_val) const = 0; 28 | virtual void SetAngularVelocity(const glm::vec3 &p_val) = 0; 29 | virtual void GetAngularVelocity(glm::vec3 &p_val) const = 0; 30 | virtual void SetLinearFactor(const glm::vec3 &p_val) = 0; 31 | virtual void GetLinearFactor(glm::vec3 &p_val) const = 0; 32 | virtual void SetAngularFactor(const glm::vec3 &p_val) = 0; 33 | virtual void GetAngularFactor(glm::vec3 &p_val) const = 0; 34 | virtual float GetMass() const = 0; 35 | virtual void SetFriction(float p_val) = 0; 36 | virtual float GetFriction() const = 0; 37 | virtual void SetRestitution(float p_val) = 0; 38 | virtual float GetRestitution() const = 0; 39 | virtual void ApplyForce(const glm::vec3 &p_force, const glm::vec3 &p_rp) = 0; 40 | virtual void ApplyCentralForce(const glm::vec3 &p_force) = 0; 41 | virtual void ApplyImpulse(const glm::vec3 &p_impulse, const glm::vec3 &p_rp) = 0; 42 | virtual void ApplyCentralImpulse(const glm::vec3 &p_impulse) = 0; 43 | virtual void ApplyTorque(const glm::vec3 &p_torque, bool p_impulse) = 0; 44 | virtual void SetMotionType(unsigned char p_type) = 0; 45 | virtual unsigned char GetMotionType() const = 0; 46 | }; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ICore.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IElementManager; 7 | class ILogManager; 8 | class IPhysicsManager; 9 | class IRenderManager; 10 | class ISfmlManager; 11 | class ISoundManager; 12 | 13 | class ICore 14 | { 15 | protected: 16 | ~ICore() = default; 17 | public: 18 | virtual float GetEngineDelta() const = 0; 19 | virtual IElementManager* GetIElementManager() const = 0; 20 | virtual ILogManager* GetILogManager() const = 0; 21 | virtual IPhysicsManager* GetIPhysicsManager() const = 0; 22 | virtual IRenderManager* GetIRenderManager() const = 0; 23 | virtual ISfmlManager* GetISfmlManager() const = 0; 24 | virtual ISoundManager* GetISoundManager() const = 0; 25 | }; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ICustomArgument.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IElement; 7 | 8 | class ICustomArgument 9 | { 10 | protected: 11 | ~ICustomArgument() = default; 12 | public: 13 | enum CustomArgumentType : unsigned char 14 | { 15 | CAT_None = 0U, 16 | CAT_Boolean, 17 | CAT_Integer, 18 | CAT_UInteger, 19 | CAT_Float, 20 | CAT_Double, 21 | CAT_String, 22 | CAT_Element 23 | }; 24 | 25 | virtual unsigned char GetType() const = 0; 26 | 27 | virtual bool GetBoolean() const = 0; 28 | virtual int GetInteger() const = 0; 29 | virtual int GetUInteger() const = 0; 30 | virtual float GetFloat() const = 0; 31 | virtual double GetDouble() const = 0; 32 | virtual void* GetPointer() const = 0; 33 | virtual IElement* GetElement() const = 0; 34 | virtual const char* GetString() const = 0; 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ICustomArguments.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ICustomArgument; 7 | 8 | class ICustomArguments 9 | { 10 | protected: 11 | ~ICustomArguments() = default; 12 | public: 13 | virtual size_t GetArgumentsCount() const = 0; 14 | virtual const ICustomArgument* GetArgument(size_t p_index) const = 0; 15 | }; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IDrawable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IDrawable 7 | { 8 | protected: 9 | ~IDrawable() = default; 10 | public: 11 | enum DrawableFilteringType : unsigned char 12 | { 13 | DFT_Nearest = 0U, 14 | DFT_Linear, 15 | 16 | DFT_None = 0xFFU 17 | }; 18 | 19 | virtual bool IsTransparent() const = 0; 20 | virtual bool IsCubic() const = 0; 21 | virtual const glm::ivec2& GetSize() const = 0; 22 | virtual unsigned char GetFiltering() const = 0; 23 | }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IElement.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IElement 7 | { 8 | protected: 9 | ~IElement() = default; 10 | public: 11 | enum ElementType : unsigned char 12 | { 13 | ET_Model = 0U, 14 | ET_Mesh, 15 | ET_Animation, 16 | ET_Scene, 17 | ET_Camera, 18 | ET_Light, 19 | ET_RenderTarget, 20 | ET_Shader, 21 | ET_Sound, 22 | ET_Texture, 23 | ET_Font, 24 | ET_Collider, 25 | 26 | ET_Invalid = 0xFFU 27 | }; 28 | 29 | virtual unsigned char GetElementType() const = 0; 30 | virtual const char* GetElementTypeName() const = 0; 31 | }; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IElementManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IElement; 7 | class IAnimation; 8 | class ICamera; 9 | class ICollider; 10 | class IFont; 11 | class ILight; 12 | class IMesh; 13 | class IModel; 14 | class IScene; 15 | class IRenderTarget; 16 | class IShader; 17 | class ISound; 18 | class ITexture; 19 | 20 | class IElementManager 21 | { 22 | protected: 23 | ~IElementManager() = default; 24 | public: 25 | virtual IScene* CreateIScene() = 0; 26 | virtual ICamera* CreateICamera(unsigned char p_type) = 0; 27 | virtual ILight* CreateILight(unsigned char p_type) = 0; 28 | virtual IMesh* CreateIMesh(const char *p_path) = 0; 29 | virtual IModel* CreateIModel(IMesh *p_mesh) = 0; 30 | virtual IShader* CreateIShader(const char *p_vpath, const char *p_fpath, const char *p_gpath) = 0; 31 | virtual IAnimation* CreateIAnimation(const char *p_path) = 0; 32 | virtual ISound* CreateISound(const char *p_path) = 0; 33 | virtual IRenderTarget* CreateIRenderTarget(unsigned char p_type, const glm::ivec2 &p_size, unsigned char p_filter) = 0; 34 | virtual ITexture* CreateITexture(const char *p_path, unsigned char p_type, unsigned char p_filter, bool p_compress) = 0; 35 | virtual IFont* CreateIFont(const char *p_path, int p_size, const glm::ivec2 &p_atlas, unsigned char p_filter) = 0; 36 | virtual ICollider* CreateICollider(unsigned char p_type, const glm::vec3 &p_size, float p_mass) = 0; 37 | virtual bool IsValidIElement(IElement *p_ptr) const = 0; 38 | virtual bool DestroyIElement(IElement *p_element) = 0; 39 | }; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IFont.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IFont 7 | { 8 | protected: 9 | ~IFont() = default; 10 | public: 11 | enum FontFilteringType : unsigned char 12 | { 13 | FFT_Nearest = 0U, 14 | FFT_Linear, 15 | 16 | FFT_None = 0xFFU 17 | }; 18 | 19 | virtual unsigned char GetFiltering() const = 0; 20 | virtual float GetGlyphSize() const = 0; 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ILight.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ILight 7 | { 8 | protected: 9 | ~ILight() = default; 10 | public: 11 | enum LightType : unsigned char 12 | { 13 | LT_Directional = 0U, 14 | LT_Point, 15 | LT_Spotlight 16 | }; 17 | 18 | virtual void SetDirection(const glm::vec3 &p_vec) = 0; 19 | virtual const glm::vec3& GetDirection() const = 0; 20 | virtual void SetColor(const glm::vec4 &p_vec) = 0; 21 | virtual const glm::vec4& GetColor() const = 0; 22 | virtual void SetCutoff(const glm::vec2 &p_vec) = 0; 23 | virtual const glm::vec2& GetCutoff() const = 0; 24 | virtual void SetFalloff(const glm::vec3 &p_val) = 0; 25 | virtual const glm::vec3& GetFalloff() const = 0; 26 | virtual unsigned char GetType() const = 0; 27 | virtual void SetType(unsigned char p_type) = 0; 28 | }; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ILogManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ILogManager 7 | { 8 | protected: 9 | ~ILogManager() = default; 10 | public: 11 | virtual void Log(const char *p_text) = 0; 12 | }; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IMesh.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IMesh 7 | { 8 | protected: 9 | ~IMesh() = default; 10 | public: 11 | virtual float GetBoundSphereRadius() const = 0; 12 | virtual size_t GetMaterialsCount() const = 0; 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IModel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IAnimation; 7 | class ICollider; 8 | class IMesh; 9 | 10 | class IModel 11 | { 12 | protected: 13 | ~IModel() = default; 14 | public: 15 | enum ModelAnimationProperty : unsigned char 16 | { 17 | MAP_Speed = 0U, 18 | MAP_Progress, 19 | Map_BlendTime 20 | }; 21 | 22 | virtual IMesh* GetIMesh() const = 0; 23 | virtual float GetBoundSphereRadius() const = 0; 24 | virtual bool SetIAnimation(IAnimation *p_anim) = 0; 25 | virtual bool RemoveAnimation() = 0; 26 | virtual IAnimation* GetIAnimation() const = 0; 27 | virtual bool PlayAnimation(bool p_loop) = 0; 28 | virtual bool PauseAnimation() = 0; 29 | virtual bool ResetAnimation() = 0; 30 | virtual bool GetAnimationProperty(ModelAnimationProperty p_prop, float &p_value) = 0; 31 | virtual bool SetAnimationProperty(ModelAnimationProperty p_prop, float p_value) = 0; 32 | virtual bool IsVisible() const = 0; 33 | }; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ICustomArguments; 7 | 8 | class IModule 9 | { 10 | protected: 11 | ~IModule() = default; 12 | public: 13 | enum ModuleEvent : unsigned char 14 | { 15 | ME_OnEngineStart = 0U, 16 | ME_OnEngineStop, 17 | ME_OnRender, 18 | ME_OnPreRender, 19 | ME_OnWindowClose, 20 | ME_OnWindowResize, 21 | ME_OnWindowFocus, 22 | ME_OnKeyPress, 23 | ME_OnMouseKeyPress, 24 | ME_OnMouseScroll, 25 | ME_OnCursorMove, 26 | ME_OnCursorEnter, 27 | ME_OnJoypadStateChange, 28 | ME_OnJoypadButton, 29 | ME_OnJoypadAxis, 30 | ME_OnTextInput 31 | }; 32 | 33 | virtual void RecieveEvent(ModuleEvent p_event, const ICustomArguments *p_args) = 0; 34 | virtual void DoPulse() = 0; 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IPhysicsManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IElement; 7 | class ICollider; 8 | class IModel; 9 | 10 | class IPhysicsManager 11 | { 12 | protected: 13 | ~IPhysicsManager() = default; 14 | public: 15 | virtual void SetPhysicsEnabled(bool p_value) = 0; 16 | virtual bool GetPhysicsEnabled() const = 0; 17 | virtual void SetFloorEnabled(bool p_value) = 0; 18 | virtual bool GetFloorEnabled() const = 0; 19 | virtual void SetGravity(const glm::vec3 &p_grav) = 0; 20 | virtual void GetGravity(glm::vec3 &p_grav) const = 0; 21 | virtual void SetIColliderScale(ICollider *p_col, const glm::vec3 &p_scale) = 0; 22 | virtual bool RayCast(const glm::vec3 &p_start, glm::vec3 &p_end, glm::vec3 &p_normal, IElement *&p_element) = 0; 23 | }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IRenderManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IDrawable; 7 | class IFont; 8 | class IScene; 9 | 10 | class IRenderManager 11 | { 12 | protected: 13 | ~IRenderManager() = default; 14 | public: 15 | virtual bool Draw(IScene *p_scene) = 0; 16 | virtual bool Draw(IFont *p_font, const glm::vec2 &p_pos, const char* p_text, const glm::vec4 &p_color) = 0; 17 | virtual bool Draw(IDrawable *p_drawable, const glm::vec2 &p_pos, const glm::vec2 &p_size, float p_rot, const glm::vec4 &p_color) = 0; 18 | virtual bool SetViewport(const glm::ivec4 &p_area) = 0; 19 | virtual bool ClearViewport(bool p_depth = true, bool p_color = true) = 0; 20 | virtual bool SetClearColor(const glm::vec4 &p_color) = 0; 21 | virtual bool SetPolygonMode(int p_mode) = 0; 22 | }; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IRenderTarget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IRenderTarget 7 | { 8 | protected: 9 | ~IRenderTarget() = default; 10 | public: 11 | enum RenderTargetType : unsigned char 12 | { 13 | RTT_Shadow, 14 | RTT_RGB, 15 | RTT_RGBA, 16 | RTT_RGBF, 17 | RTT_RGBAF, 18 | 19 | RTT_None = 0xFFU 20 | }; 21 | enum RenderTargetProperty : unsigned char 22 | { 23 | RTP_ClearColor = 0U, 24 | RTP_Depth, 25 | RTP_Color 26 | }; 27 | 28 | virtual bool IsShadowType() const = 0; 29 | virtual bool SetProperty(RenderTargetProperty p_prop, const void *p_val) = 0; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IScene.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ICamera; 7 | class ILight; 8 | class IModel; 9 | class IRenderTarget; 10 | class IShader; 11 | 12 | class IScene 13 | { 14 | protected: 15 | ~IScene() = default; 16 | public: 17 | virtual bool SetICamera(ICamera *p_cam) = 0; 18 | virtual bool RemoveCamera() = 0; 19 | virtual ICamera* GetICamera() const = 0; 20 | virtual bool SetIRenderTarget(IRenderTarget *p_rt) = 0; 21 | virtual bool RemoveRenderTarget() = 0; 22 | virtual IRenderTarget* GetIRenderTarget() const = 0; 23 | virtual bool SetIShader(IShader *p_shader) = 0; 24 | virtual bool RemoveIShader() = 0; 25 | virtual IShader* GetIShader() const = 0; 26 | virtual bool AddILight(ILight *p_light) = 0; 27 | virtual bool RemoveILight(ILight *p_light) = 0; 28 | virtual bool HasILight(ILight *p_light) const = 0; 29 | virtual bool AddIModel(IModel *p_model) = 0; 30 | virtual bool RemoveIModel(IModel *p_model) = 0; 31 | virtual bool HasIModel(IModel *p_model) const = 0; 32 | virtual bool HasShadows() const = 0; 33 | virtual void SetShadows(bool p_state) = 0; 34 | virtual void GetShadowsArea(glm::vec2 &p_area) const = 0; 35 | virtual void SetShadowsArea(const glm::vec2 &p_area) = 0; 36 | virtual void GetShadowsDepth(glm::vec2 &p_depth) const = 0; 37 | virtual void SetShadowsDepth(const glm::vec2 &p_depth) = 0; 38 | virtual int GetShadowsQuality() const = 0; 39 | virtual void SetShadowsQuality(int p_quality) = 0; 40 | }; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ISfmlManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ISfmlManager 7 | { 8 | protected: 9 | ~ISfmlManager() = default; 10 | public: 11 | virtual void GetWindowPosition(glm::ivec2 &p_pos) const = 0; 12 | virtual void SetWindowPosition(const glm::ivec2 &p_pos) = 0; 13 | virtual void GetWindowSize(glm::ivec2 &p_size) const = 0; 14 | virtual void CloseWindow() = 0; 15 | virtual void SetVSync(bool p_sync) = 0; 16 | virtual void SetFramelimit(unsigned int p_fps) = 0; 17 | virtual unsigned int GetFramelimit() const = 0; 18 | virtual const char* GetTitle() const = 0; 19 | virtual void SetTitle(const char* p_title) = 0; 20 | virtual bool SetIcon(const char* p_path) = 0; 21 | virtual void RequestFocus() = 0; 22 | virtual bool GetFocusState() const = 0; 23 | virtual bool GetInputEnabled() const = 0; 24 | virtual void SetInputEnabled(bool p_state) = 0; 25 | virtual void SetCursorMode(bool p_visible, bool p_lock) = 0; 26 | virtual void GetCursorPosition(glm::ivec2 &p_pos) const = 0; 27 | virtual void SetCursorPosition(const glm::ivec2 &p_pos) = 0; 28 | virtual const char* GetClipboardString() = 0; 29 | virtual void SetClipboardString(const char* p_str) = 0; 30 | virtual bool IsKeyPressed(int p_key) = 0; 31 | virtual bool IsMouseKeyPressed(int p_key) = 0; 32 | virtual bool IsJoypadConnected(unsigned int p_jp) = 0; 33 | virtual bool GetJoypadButtonState(unsigned int p_jp, unsigned int p_button) = 0; 34 | virtual unsigned int GetJoypadButtonCount(unsigned int p_jp) = 0; 35 | virtual bool CheckJoypadAxis(unsigned int p_jp, unsigned int p_axis) = 0; 36 | virtual float GetJoypadAxisValue(unsigned int p_jp, unsigned int p_axis) = 0; 37 | virtual float GetTime() const = 0; 38 | }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /roc_app/Interfaces/IShader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class IDrawable; 7 | 8 | class IShader 9 | { 10 | protected: 11 | ~IShader() = default; 12 | public: 13 | enum ShaderUniformType : unsigned char 14 | { 15 | SUT_Float = 0U, 16 | SUT_Float2, 17 | SUT_Float3, 18 | SUT_Float4, 19 | 20 | SUT_Int, 21 | SUT_Int2, 22 | SUT_Int3, 23 | SUT_Int4, 24 | 25 | SUT_UInt, 26 | SUT_UInt2, 27 | SUT_UInt3, 28 | SUT_UInt4, 29 | 30 | SUT_Double, 31 | SUT_Double2, 32 | SUT_Double3, 33 | SUT_Double4, 34 | 35 | SUT_FloatMat2, 36 | SUT_FloatMat3, 37 | SUT_FloatMat4, 38 | 39 | SUT_DoubleMat2, 40 | SUT_DoubleMat3, 41 | SUT_DoubleMat4, 42 | }; 43 | 44 | virtual bool Attach(IDrawable *p_drawable, const char *p_uniform) = 0; 45 | virtual bool Detach(IDrawable *p_drawable) = 0; 46 | virtual bool HasAttached(IDrawable *p_drawable) const = 0; 47 | virtual bool SetUniformValue(const char *p_name, ShaderUniformType p_type, const void *p_data, size_t p_size) = 0; 48 | }; 49 | 50 | } 51 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ISound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ISound 7 | { 8 | protected: 9 | ~ISound() = default; 10 | public: 11 | virtual void Play() = 0; 12 | virtual void Pause() = 0; 13 | virtual void Stop() = 0; 14 | virtual bool IsLooped() const = 0; 15 | virtual bool SetLoop(bool p_loop) = 0; 16 | virtual float GetDuration() = 0; 17 | virtual void SetSpeed(float p_speed) = 0; 18 | virtual float GetSpeed() = 0; 19 | virtual void SetVolume(float p_volume) = 0; 20 | virtual float GetVolume() = 0; 21 | virtual void SetTime(float p_time) = 0; 22 | virtual float GetTime() = 0; 23 | virtual bool Set3DPositionEnabled(bool p_state) = 0; 24 | virtual bool Get3DPositionEnabled() const = 0; 25 | virtual bool Set3DPosition(const glm::vec3 &p_pos) = 0; 26 | virtual const glm::vec3& Get3DPosition() const = 0; 27 | virtual bool Set3DDistance(const glm::vec2 &p_dist) = 0; 28 | virtual const glm::vec2& Get3DDistance() const = 0; 29 | virtual int GetState() const = 0; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ISoundManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ISoundManager 7 | { 8 | protected: 9 | ~ISoundManager() = default; 10 | public: 11 | virtual void SetListenerPosition(const glm::vec3 &p_pos) = 0; 12 | virtual const glm::vec3& GetListenerPosition() const = 0; 13 | virtual void SetListenerDirection(const glm::vec3 &p_dir) = 0; 14 | virtual const glm::vec3& GetListenerDirection() const = 0; 15 | virtual void SetListenerUp(const glm::vec3 &p_up) = 0; 16 | virtual const glm::vec3& GetListenerUp() const = 0; 17 | virtual void SetGlobalVolume(float p_val) = 0; 18 | virtual float GetGlobalVolume() const = 0; 19 | }; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ITexture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ITexture 7 | { 8 | protected: 9 | ~ITexture() = default; 10 | public: 11 | enum TextureType : unsigned char 12 | { 13 | TT_RGB, 14 | TT_RGBA, 15 | TT_Cubemap, 16 | 17 | TT_None = 0xFFU 18 | }; 19 | 20 | virtual bool IsCompressed() const = 0; 21 | }; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /roc_app/Interfaces/ITransformable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class ITransformable 7 | { 8 | protected: 9 | ~ITransformable() = default; 10 | public: 11 | virtual void SetPosition(const glm::vec3 &p_pos) = 0; 12 | virtual const glm::vec3& GetPosition() const = 0; 13 | virtual void SetRotation(const glm::quat &p_rot) = 0; 14 | virtual const glm::quat& GetRotation() const = 0; 15 | virtual void SetScale(const glm::vec3 &p_scl) = 0; 16 | virtual const glm::vec3& GetScale() const = 0; 17 | virtual const glm::mat4& GetMatrix() const = 0; 18 | }; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /roc_app/Managers/ConfigManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Managers/Manager.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class ConfigManager final : public Manager 8 | { 9 | bool m_logging; 10 | bool m_fullscreen; 11 | int m_antialiasing; 12 | glm::ivec2 m_windowSize; 13 | unsigned int m_fpsLimit; 14 | bool m_vsync; 15 | std::vector m_modules; 16 | 17 | ConfigManager(const ConfigManager &that) = delete; 18 | ConfigManager& operator=(const ConfigManager &that) = delete; 19 | public: 20 | ConfigManager(Core *p_core); 21 | ~ConfigManager() = default; 22 | 23 | // ROC::Manager 24 | void Start() override; 25 | 26 | bool IsLogEnabled() const; 27 | bool IsFullscreenEnabled() const; 28 | int GetAntialiasing() const; 29 | const glm::ivec2& GetWindowSize() const; 30 | unsigned int GetFPSLimit() const; 31 | bool GetVSync() const; 32 | const std::vector& GetModules() const; 33 | }; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /roc_app/Managers/LogManager.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Managers/LogManager.h" 4 | #include "Core/Core.h" 5 | 6 | #include "Managers/ConfigManager.h" 7 | 8 | ROC::LogManager::LogManager(Core *p_core) : Manager(p_core) 9 | { 10 | m_enabled = false; 11 | } 12 | 13 | void ROC::LogManager::Start() 14 | { 15 | if(!IsActive()) 16 | { 17 | m_enabled = GetCore()->GetConfigManager()->IsLogEnabled(); 18 | if(m_enabled) 19 | { 20 | m_log.open("log.txt", std::ofstream::out); 21 | if(m_log.fail()) 22 | { 23 | m_log.clear(); 24 | m_enabled = false; 25 | } 26 | } 27 | } 28 | 29 | Manager::Start(); 30 | } 31 | 32 | void ROC::LogManager::Stop() 33 | { 34 | if(IsActive() && m_enabled) 35 | { 36 | std::string l_log("Application closed"); 37 | Log(l_log.c_str()); 38 | m_log.flush(); 39 | m_log.close(); 40 | 41 | m_enabled = false; 42 | } 43 | 44 | Manager::Stop(); 45 | } 46 | 47 | void ROC::LogManager::Log(const char* p_text) 48 | { 49 | if(!IsActive()) return; 50 | 51 | std::time_t l_timeRaw = std::time(nullptr); 52 | tm l_time = { 0 }; 53 | localtime_s(&l_time, &l_timeRaw); 54 | #ifdef _DEBUG 55 | std::cout << "[" << l_time.tm_hour << ":" << l_time.tm_min << ":" << l_time.tm_sec << "] " << p_text << std::endl; 56 | #endif 57 | if(m_enabled) 58 | m_log << "[" << l_time.tm_hour << ":" << l_time.tm_min << ":" << l_time.tm_sec << "] " << p_text << std::endl; 59 | } 60 | -------------------------------------------------------------------------------- /roc_app/Managers/LogManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ILogManager.h" 3 | #include "Managers/Manager.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class LogManager final : public ILogManager, public Manager 9 | { 10 | std::ofstream m_log; 11 | bool m_enabled; 12 | 13 | LogManager(const LogManager &that) = delete; 14 | LogManager& operator=(const LogManager &that) = delete; 15 | public: 16 | explicit LogManager(Core *p_core); 17 | ~LogManager() = default; 18 | 19 | // ROC::Manager 20 | void Start() override; 21 | void Stop() override; 22 | 23 | void Log(const char *p_text); 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /roc_app/Managers/Manager.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Managers/Manager.h" 3 | 4 | ROC::Manager::Manager(Core *p_core) 5 | { 6 | m_core = p_core; 7 | m_started = false; 8 | } 9 | 10 | void ROC::Manager::Start() 11 | { 12 | if(!m_started) 13 | m_started = true; 14 | } 15 | 16 | void ROC::Manager::Stop() 17 | { 18 | if(m_started) 19 | m_started = false; 20 | } 21 | 22 | bool ROC::Manager::IsActive() const 23 | { 24 | return m_started; 25 | } 26 | 27 | ROC::Core* ROC::Manager::GetCore() 28 | { 29 | return m_core; 30 | } 31 | -------------------------------------------------------------------------------- /roc_app/Managers/Manager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class Core; 7 | 8 | class Manager 9 | { 10 | Core *m_core; 11 | bool m_started; 12 | 13 | Manager(const Manager &that) = delete; 14 | Manager& operator=(const Manager &that) = delete; 15 | protected: 16 | explicit Manager(Core *p_core); 17 | virtual ~Manager() = default; 18 | public: 19 | virtual void Start(); 20 | virtual void Stop(); 21 | 22 | bool IsActive() const; 23 | Core* GetCore(); 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /roc_app/Managers/ModuleManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Managers/Manager.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class ICore; 8 | class IModule; 9 | class CustomArguments; 10 | 11 | using ModuleInitFunc = IModule* (*)(ICore*); 12 | 13 | class ModuleManager final : public Manager 14 | { 15 | std::vector m_modules; 16 | std::vector m_libraries; 17 | public: 18 | explicit ModuleManager(Core *p_core); 19 | ~ModuleManager() = default; 20 | 21 | // ROC::Manager 22 | void Start() override; 23 | void Stop() override; 24 | 25 | void SignalGlobalEvent(unsigned char p_event, const CustomArguments *p_args) const; 26 | 27 | void DoPulse() const; 28 | }; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /roc_app/Managers/PreRenderManager.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Managers/PreRenderManager.h" 4 | #include "Core/Core.h" 5 | #include "Elements/Model/Model.h" 6 | #include "Utils/CustomArguments.h" 7 | 8 | #include "Managers/ModuleManager.h" 9 | #include "Interfaces/IModule.h" 10 | 11 | ROC::PreRenderManager::PreRenderManager(Core *p_core) : Manager(p_core) 12 | { 13 | m_arguments = new CustomArguments(); 14 | } 15 | 16 | ROC::PreRenderManager::~PreRenderManager() 17 | { 18 | delete m_arguments; 19 | } 20 | 21 | void ROC::PreRenderManager::Stop() 22 | { 23 | if(IsActive()) 24 | { 25 | m_models.clear(); 26 | } 27 | 28 | Manager::Stop(); 29 | } 30 | 31 | void ROC::PreRenderManager::AddModel(Model *p_model) 32 | { 33 | if(!IsActive()) return; 34 | 35 | m_models.push_back(p_model); 36 | } 37 | 38 | void ROC::PreRenderManager::RemoveModel(Model *p_model) 39 | { 40 | if(!IsActive()) return; 41 | 42 | auto l_searchIter = std::find(m_models.begin(), m_models.end(), p_model); 43 | if(l_searchIter != m_models.end()) m_models.erase(l_searchIter); 44 | } 45 | 46 | void ROC::PreRenderManager::DoPulse_S1() 47 | { 48 | if(!IsActive()) return; 49 | 50 | GetCore()->GetModuleManager()->SignalGlobalEvent(IModule::ME_OnPreRender, m_arguments); 51 | 52 | for(auto l_model : m_models) 53 | { 54 | l_model->Update(Model::MUS_Matrix); 55 | l_model->Update(Model::MUS_SkeletonStatic); 56 | } 57 | } 58 | 59 | void ROC::PreRenderManager::DoPulse_S2() 60 | { 61 | if(!IsActive()) return; 62 | 63 | for(auto l_model : m_models) 64 | { 65 | l_model->Update(Model::MUS_Matrix); 66 | l_model->Update(Model::MUS_SkeletonDynamic); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /roc_app/Managers/PreRenderManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Managers/Manager.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class Model; 8 | class CustomArguments; 9 | 10 | class PreRenderManager final : public Manager 11 | { 12 | std::vector m_models; 13 | 14 | CustomArguments *m_arguments; 15 | 16 | PreRenderManager(const PreRenderManager &that) = delete; 17 | PreRenderManager& operator=(const PreRenderManager &that) = delete; 18 | public: 19 | explicit PreRenderManager(Core *p_core); 20 | ~PreRenderManager(); 21 | 22 | // ROC::Manager 23 | void Stop() override; 24 | 25 | void AddModel(Model *p_model); 26 | void RemoveModel(Model *p_model); 27 | 28 | void DoPulse_S1(); 29 | void DoPulse_S2(); 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /roc_app/Managers/RenderManager/PhysicsDrawer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLArrayBuffer; 4 | class GLVertexArray; 5 | 6 | namespace ROC 7 | { 8 | 9 | class PhysicsDrawer final : public btIDebugDraw 10 | { 11 | enum PhysicsDrawerBufferIndex : size_t 12 | { 13 | PDBI_Vertex = 0U, 14 | PDBI_Color, 15 | 16 | PDBI_BufferCount 17 | }; 18 | std::array m_arrayBuffers; 19 | GLVertexArray *m_vertexArray; 20 | 21 | std::vector m_lines; 22 | std::vector m_colors; 23 | 24 | PhysicsDrawer(const PhysicsDrawer &that) = delete; 25 | PhysicsDrawer& operator=(const PhysicsDrawer &that) = delete; 26 | 27 | void drawLine(const btVector3& from, const btVector3& to, const btVector3& color); 28 | void drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB, btScalar distance, int lifeTime, const btVector3& color); 29 | void reportErrorWarning(const char* warningString); 30 | void draw3dText(const btVector3& location, const char* textString); 31 | void setDebugMode(int debugMode); 32 | int getDebugMode() const; 33 | public: 34 | PhysicsDrawer(); 35 | ~PhysicsDrawer(); 36 | 37 | void Draw(float p_width); 38 | }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /roc_app/Managers/RenderManager/Quad2D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLArrayBuffer; 4 | class GLVertexArray; 5 | 6 | namespace ROC 7 | { 8 | 9 | class Quad2D final 10 | { 11 | std::array m_vertex; 12 | glm::vec2 m_size; 13 | 14 | enum QuadBufferIndex : size_t 15 | { 16 | QBI_Vertex = 0U, 17 | QBI_UV, 18 | 19 | QBI_BufferCount 20 | }; 21 | enum QuadBufferAttribute : size_t 22 | { 23 | QBA_Vertex = 0U, 24 | QBA_UV = 2U 25 | }; 26 | std::array m_arrayBuffers; 27 | GLVertexArray *m_vertexArray; 28 | 29 | Quad2D(const Quad2D &that) = delete; 30 | Quad2D& operator=(const Quad2D &that) = delete; 31 | public: 32 | Quad2D(); 33 | ~Quad2D(); 34 | 35 | void SetTransformation(const glm::vec2 &p_size); 36 | void Draw(); 37 | }; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /roc_app/Managers/RenderManager/Quad3D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GLArrayBuffer; 4 | class GLVertexArray; 5 | 6 | namespace ROC 7 | { 8 | 9 | class Quad3D final 10 | { 11 | glm::vec3 m_position; 12 | glm::quat m_rotation; 13 | glm::vec2 m_size; 14 | glm::mat4 m_matrix; 15 | 16 | enum QuadBufferIndex : size_t 17 | { 18 | QBI_Vertex = 0U, 19 | QBI_Normal, 20 | QBI_UV, 21 | 22 | QBI_BufferCount 23 | }; 24 | std::array m_vertex; 25 | std::array m_arrayBuffers; 26 | GLVertexArray *m_vertexArray; 27 | 28 | Quad3D(const Quad3D &that) = delete; 29 | Quad3D& operator=(const Quad3D &that) = delete; 30 | public: 31 | Quad3D(); 32 | ~Quad3D(); 33 | 34 | const glm::mat4& GetMatrix() const; 35 | 36 | void SetTransformation(const glm::vec3 &p_pos, const glm::quat &p_rot, const glm::vec2 &p_size); 37 | void Draw(); 38 | }; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /roc_app/Managers/SoundManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ISoundManager.h" 3 | #include "Managers/Manager.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class SoundManager final : public ISoundManager, public Manager 9 | { 10 | glm::vec3 m_listenerPosition; 11 | glm::vec3 m_listenerDirection; 12 | glm::vec3 m_listenerUp; 13 | float m_globalVolume; 14 | 15 | SoundManager(const SoundManager &that) = delete; 16 | SoundManager& operator=(const SoundManager &that) = delete; 17 | public: 18 | SoundManager(Core *p_core); 19 | ~SoundManager() = default; 20 | 21 | void SetListenerPosition(const glm::vec3 &p_pos); 22 | const glm::vec3& GetListenerPosition() const; 23 | 24 | void SetListenerDirection(const glm::vec3 &p_dir); 25 | const glm::vec3& GetListenerDirection() const; 26 | 27 | void SetListenerUp(const glm::vec3 &p_up); 28 | const glm::vec3& GetListenerUp() const; 29 | 30 | void SetGlobalVolume(float p_val); 31 | float GetGlobalVolume() const; 32 | }; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /roc_app/Utils/CustomArgument.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ICustomArgument.h" 3 | 4 | namespace ROC 5 | { 6 | 7 | class CustomArgument final : public ICustomArgument 8 | { 9 | unsigned char m_type; 10 | 11 | union 12 | { 13 | bool m_bool; 14 | int m_int; 15 | unsigned int m_uint; 16 | float m_float; 17 | double m_double; 18 | void *m_ptr; 19 | }; 20 | std::string m_string; 21 | public: 22 | CustomArgument(); 23 | explicit CustomArgument(bool p_val); 24 | explicit CustomArgument(int p_val); 25 | explicit CustomArgument(unsigned int p_val); 26 | explicit CustomArgument(float p_val); 27 | explicit CustomArgument(double p_val); 28 | explicit CustomArgument(void *p_val); 29 | explicit CustomArgument(const std::string &p_val); 30 | explicit CustomArgument(ROC::IElement *p_element); 31 | CustomArgument(const CustomArgument &p_data); 32 | ~CustomArgument() = default; 33 | 34 | unsigned char GetType() const; 35 | 36 | bool GetBoolean() const; 37 | int GetInteger() const; 38 | int GetUInteger() const; 39 | float GetFloat() const; 40 | double GetDouble() const; 41 | void* GetPointer() const; 42 | ROC::IElement* GetElement() const; 43 | const char* GetString() const; 44 | 45 | CustomArgument& operator=(const CustomArgument &p_data); 46 | }; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /roc_app/Utils/CustomArguments.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Utils/CustomArguments.h" 4 | 5 | ROC::CustomArguments::CustomArguments() 6 | { 7 | m_argumentsCount = 0U; 8 | } 9 | 10 | ROC::CustomArguments::~CustomArguments() 11 | { 12 | m_arguments.clear(); 13 | } 14 | 15 | void ROC::CustomArguments::Clear() 16 | { 17 | m_arguments.clear(); 18 | m_argumentsCount = 0U; 19 | } 20 | 21 | size_t ROC::CustomArguments::GetArgumentsCount() const 22 | { 23 | return m_arguments.size(); 24 | } 25 | 26 | const ROC::ICustomArgument* ROC::CustomArguments::GetArgument(size_t p_index) const 27 | { 28 | return ((p_index < m_argumentsCount) ? &m_arguments[p_index] : nullptr); 29 | } 30 | 31 | const std::vector& ROC::CustomArguments::GetArguments() const 32 | { 33 | return m_arguments; 34 | } 35 | -------------------------------------------------------------------------------- /roc_app/Utils/CustomArguments.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interfaces/ICustomArguments.h" 3 | #include "Utils/CustomArgument.h" 4 | 5 | namespace ROC 6 | { 7 | 8 | class CustomArguments final : public ICustomArguments 9 | { 10 | std::vector m_arguments; 11 | size_t m_argumentsCount; 12 | 13 | CustomArguments(const CustomArguments &that) = delete; 14 | CustomArguments& operator=(const CustomArguments &that) = delete; 15 | 16 | const ICustomArgument* GetArgument(size_t p_index) const; 17 | public: 18 | CustomArguments(); 19 | ~CustomArguments(); 20 | 21 | template void Push(T p_val); 22 | void Clear(); 23 | 24 | size_t GetArgumentsCount() const; 25 | const std::vector& GetArguments() const; 26 | }; 27 | 28 | } 29 | 30 | template void ROC::CustomArguments::Push(T p_val) 31 | { 32 | m_arguments.emplace_back(p_val); 33 | m_argumentsCount++; 34 | } 35 | -------------------------------------------------------------------------------- /roc_app/Utils/MathUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Utils/MathUtils.h" 4 | 5 | namespace MathUtils 6 | { 7 | 8 | bool IsPowerOfTwo(int p_value) 9 | { 10 | return (p_value > 0 && ((p_value & (p_value - 1)) == 0)); 11 | } 12 | 13 | float EaseInOut(float p_value) 14 | { 15 | return -0.5f*(cos(glm::pi()*p_value) - 1.f); 16 | } 17 | 18 | int Power(int p_value, int p_exp) 19 | { 20 | int l_result = 1; 21 | for(int i = 1; i <= p_exp; i++) 22 | l_result *= p_value; 23 | return l_result; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /roc_app/Utils/MathUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace MathUtils 4 | { 5 | 6 | bool IsPowerOfTwo(int p_value); 7 | float EaseInOut(float p_value); 8 | int Power(int p_value, int p_exp); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /roc_app/Utils/Pool.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Utils/Pool.h" 4 | 5 | const size_t ROC::Pool::ms_invalid = std::numeric_limits::max(); 6 | 7 | ROC::Pool::Pool(size_t p_size) 8 | { 9 | m_size = p_size; 10 | m_poolData.assign(m_size, 0U); 11 | m_minimal = 0U; 12 | } 13 | 14 | ROC::Pool::~Pool() 15 | { 16 | m_poolData.clear(); 17 | } 18 | 19 | size_t ROC::Pool::Allocate() 20 | { 21 | size_t l_allocated = ms_invalid; 22 | for(size_t i = m_minimal; i < m_size; i++) 23 | { 24 | if(m_poolData[i] == 0U) 25 | { 26 | m_poolData[i] = 1U; 27 | l_allocated = i; 28 | break; 29 | } 30 | } 31 | if(l_allocated == ms_invalid) 32 | { 33 | for(size_t i = 0; i < m_minimal; i++) 34 | { 35 | if(m_poolData[i] == 0U) 36 | { 37 | m_poolData[i] = 1U; 38 | l_allocated = i; 39 | break; 40 | } 41 | } 42 | } 43 | if(l_allocated != ms_invalid) 44 | { 45 | for(size_t i = l_allocated + 1U; i < m_size; i++) 46 | { 47 | if(m_poolData[i] == 0U) 48 | { 49 | m_minimal = i; 50 | break; 51 | } 52 | } 53 | } 54 | return l_allocated; 55 | } 56 | 57 | void ROC::Pool::Reset(size_t p_id) 58 | { 59 | if(p_id < m_size) 60 | { 61 | m_poolData[p_id] = 0U; 62 | if(p_id < m_minimal) m_minimal = p_id; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /roc_app/Utils/Pool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class Pool final 7 | { 8 | size_t m_size; 9 | std::vector m_poolData; 10 | size_t m_minimal; 11 | public: 12 | static const size_t ms_invalid; 13 | 14 | explicit Pool(size_t p_size); 15 | ~Pool(); 16 | 17 | size_t Allocate(); 18 | void Reset(size_t p_id); 19 | }; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /roc_app/Utils/SystemTick.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Utils/SystemTick.h" 4 | 5 | unsigned long long ROC::SystemTick::ms_tick = 0U; 6 | unsigned long long ROC::SystemTick::ms_delta = 0U; 7 | 8 | void ROC::SystemTick::Init() 9 | { 10 | ms_tick = GetTickCount64(); 11 | ms_delta = 0U; 12 | } 13 | 14 | unsigned long long ROC::SystemTick::GetTick() 15 | { 16 | return ms_tick; 17 | } 18 | 19 | unsigned long long ROC::SystemTick::GetDelta() 20 | { 21 | return ms_delta; 22 | } 23 | 24 | void ROC::SystemTick::UpdateTick() 25 | { 26 | unsigned long long l_tick = GetTickCount64(); 27 | ms_delta = l_tick - ms_tick; 28 | ms_tick = l_tick; 29 | } 30 | -------------------------------------------------------------------------------- /roc_app/Utils/SystemTick.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class SystemTick final 7 | { 8 | static unsigned long long ms_tick; 9 | static unsigned long long ms_delta; 10 | 11 | SystemTick() = delete; 12 | ~SystemTick() = delete; 13 | public: 14 | static unsigned long long GetTick(); 15 | static unsigned long long GetDelta(); 16 | 17 | static void Init(); 18 | static void UpdateTick(); 19 | }; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /roc_app/Utils/Transformation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ROC 4 | { 5 | 6 | class Transformation 7 | { 8 | glm::vec3 m_position; 9 | glm::quat m_rotation; 10 | glm::vec3 m_scale; 11 | glm::mat4 m_matrix; 12 | bool m_useScale; 13 | bool m_update; 14 | bool m_updated; 15 | public: 16 | Transformation(); 17 | ~Transformation() = default; 18 | 19 | void SetPosition(const glm::vec3 &p_pos); 20 | const glm::vec3& GetPosition() const; 21 | 22 | void SetRotation(const glm::quat &p_rot); 23 | const glm::quat& GetRotation() const; 24 | 25 | void SetScale(const glm::vec3 &p_scl); 26 | const glm::vec3& GetScale() const; 27 | bool IsScaled() const; 28 | 29 | bool NeedsUpdate() const; 30 | bool IsUpdated() const; 31 | void UpdateMatrix(); 32 | void GetMatrix(glm::mat4 &p_mat) const; 33 | const glm::mat4& GetMatrix() const; 34 | }; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /roc_app/Utils/zlibUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Utils/zlibUtils.h" 3 | 4 | namespace zlibUtils 5 | { 6 | 7 | unsigned int CompressData(const void *p_src, unsigned int p_srcLen, void *p_dest, unsigned int p_destLen) 8 | { 9 | z_stream zInfo = { 0 }; 10 | zInfo.total_in = zInfo.avail_in = p_srcLen; 11 | zInfo.total_out = zInfo.avail_out = p_destLen; 12 | zInfo.next_in = reinterpret_cast(const_cast(p_src)); 13 | zInfo.next_out = reinterpret_cast(p_dest); 14 | 15 | unsigned int l_ret = 0U; 16 | if((deflateInit(&zInfo, Z_DEFAULT_COMPRESSION) == Z_OK) && (deflate(&zInfo, Z_FINISH) == Z_STREAM_END)) 17 | l_ret = zInfo.total_out; 18 | 19 | deflateEnd(&zInfo); 20 | return l_ret; 21 | } 22 | 23 | unsigned int UncompressData(const void *p_src, unsigned int p_srcLen, void *p_dest, unsigned int p_destLen) 24 | { 25 | z_stream zInfo = { 0 }; 26 | zInfo.total_in = zInfo.avail_in = p_srcLen; 27 | zInfo.total_out = zInfo.avail_out = p_destLen; 28 | zInfo.next_in = reinterpret_cast(const_cast(p_src)); 29 | zInfo.next_out = reinterpret_cast(p_dest); 30 | 31 | int l_error; 32 | unsigned int l_ret = 0U; 33 | l_error = inflateInit(&zInfo); 34 | if(l_error == Z_OK) 35 | { 36 | l_error = inflate(&zInfo, Z_FINISH); 37 | if(l_error == Z_STREAM_END) l_ret = zInfo.total_out; 38 | } 39 | inflateEnd(&zInfo); 40 | return l_ret; 41 | } 42 | 43 | unsigned int GetMaxCompressedLen(unsigned int nLenSrc) 44 | { 45 | return (nLenSrc + 6U + ((nLenSrc + 16383U) / 16384U * 5U)); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /roc_app/Utils/zlibUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace zlibUtils 4 | { 5 | 6 | unsigned int CompressData(const void *p_src, unsigned int p_srcLen, void *p_dest, unsigned int p_destLen); 7 | unsigned int UncompressData(const void *p_src, unsigned int p_srcLen, void *p_dest, unsigned int p_destLen); 8 | unsigned int GetMaxCompressedLen(unsigned int nLenSrc); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /roc_app/main.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Core/Core.h" 4 | 5 | #ifdef _DEBUG 6 | int main(int argc, char *argv[]) 7 | { 8 | SetConsoleTitleA("Debug Console"); 9 | #else 10 | int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR pCmdLine, _In_ int nCmdShow) 11 | { 12 | #endif 13 | if(ROC::Core::Init()) 14 | { 15 | ROC::Core *l_core = ROC::Core::GetInstance(); 16 | while(l_core->DoPulse()); 17 | ROC::Core::Terminate(); 18 | l_core = nullptr; 19 | } 20 | 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /roc_app/main_resource.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/roc_app/main_resource.aps -------------------------------------------------------------------------------- /roc_app/main_resource.rc: -------------------------------------------------------------------------------- 1 | SFML_ICON ICON "roc_icon.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 1, 0, 0, 0 5 | PRODUCTVERSION 1, 0, 0, 0 6 | #ifdef _DEBUG 7 | FILEFLAGS 0x1L 8 | #else 9 | FILEFLAGS 0x0L 10 | #endif 11 | FILEOS 0x40004L 12 | FILETYPE 0x1L 13 | FILESUBTYPE 0x0L 14 | BEGIN 15 | BLOCK "StringFileInfo" 16 | BEGIN 17 | BLOCK "040904B0" 18 | BEGIN 19 | VALUE "FileDescription", "ROC Engine Application" 20 | VALUE "FileVersion", "1.0" 21 | VALUE "ProductName", "ROC" 22 | VALUE "ProductVersion", "1.0" 23 | END 24 | END 25 | BLOCK "VarFileInfo" 26 | BEGIN 27 | VALUE "Translation", 0x0409, 0x04B0 28 | END 29 | END -------------------------------------------------------------------------------- /roc_app/roc_app.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | false 5 | 6 | 7 | $(SolutionDir)bin\win64 8 | WindowsLocalDebugger 9 | {ADEFF70D-84BF-47A1-91C3-FF6B0FC71218} 10 | Auto 11 | 12 | 13 | $(SolutionDir)bin\win64 14 | WindowsLocalDebugger 15 | 16 | -------------------------------------------------------------------------------- /roc_app/roc_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/roc_app/roc_icon.ico -------------------------------------------------------------------------------- /roc_app/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /roc_app/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "GL/glew.h" 20 | 21 | #include "SFML/Audio.hpp" 22 | #include "SFML/Graphics.hpp" 23 | #include "SFML/System.hpp" 24 | #include "SFML/Window.hpp" 25 | #include "SFML/GpuPreference.hpp" 26 | 27 | #include "glm/glm.hpp" 28 | #include "glm/gtc/epsilon.hpp" 29 | #include "glm/gtc/matrix_access.hpp" 30 | #include "glm/gtc/matrix_transform.hpp" 31 | #include "glm/gtc/quaternion.hpp" 32 | #include "glm/gtc/type_ptr.hpp" 33 | 34 | #include "btBulletDynamicsCommon.h" 35 | 36 | #include "ft2build.h" 37 | #include FT_FREETYPE_H 38 | #include "MaxRectsBinPack.h" 39 | #include "pugixml.hpp" 40 | #include "zlib.h" 41 | -------------------------------------------------------------------------------- /roc_module_lua/Core.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class LuaHandler; 4 | class Core final : public ROC::IModule 5 | { 6 | static Core* ms_instance; 7 | 8 | ROC::ICore *m_engineCore; 9 | LuaHandler *m_luaHandler; 10 | 11 | Core(); 12 | ~Core(); 13 | Core(const Core &that) = delete; 14 | Core& operator=(const Core &that) = delete; 15 | 16 | void RecieveEvent(ModuleEvent p_event, const ROC::ICustomArguments *p_args) override; 17 | void DoPulse() override; 18 | public: 19 | static void Init(ROC::ICore *p_core); 20 | static Core* GetInstance(); 21 | 22 | ROC::ICore* GetEngineCore(); 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /roc_module_lua/Logger.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "Logger.h" 4 | #include "Core.h" 5 | 6 | void Logger::Log(const std::string &p_str) 7 | { 8 | Core::GetInstance()->GetEngineCore()->GetILogManager()->Log(p_str.c_str()); 9 | } 10 | -------------------------------------------------------------------------------- /roc_module_lua/Logger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Logger final 4 | { 5 | Logger() = delete; 6 | ~Logger() = delete; 7 | public: 8 | static void Log(const std::string &p_str); 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef final 4 | { 5 | public: 6 | std::string m_name; 7 | lua_CFunction m_get; 8 | lua_CFunction m_set; 9 | 10 | LuaPropDef(const std::string &p_name, lua_CFunction p_get, lua_CFunction p_set) 11 | { 12 | m_name.assign(p_name); 13 | m_get = p_get; 14 | m_set = p_set; 15 | } 16 | }; 17 | 18 | struct LuaMethodDef final 19 | { 20 | public: 21 | std::string m_name; 22 | lua_CFunction m_func; 23 | 24 | LuaMethodDef(const std::string &p_name, lua_CFunction p_func) 25 | { 26 | m_name.assign(p_name); 27 | m_func = p_func; 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/AnimationDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class AnimationDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | 12 | AnimationDefs() = delete; 13 | ~AnimationDefs() = delete; 14 | 15 | static int Create(lua_State *p_state); 16 | static int GetBonesCount(lua_State *p_state); 17 | static int GetDuration(lua_State *p_state); 18 | static int IsAnimation(lua_State *p_state); 19 | public: 20 | static void Init(); 21 | static void RegisterInVM(LuaVM *p_vm); 22 | }; 23 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/CameraDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class CameraDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | 12 | CameraDefs() = delete; 13 | ~CameraDefs() = delete; 14 | 15 | static int Create(lua_State *p_state); 16 | static int GetProjectionType(lua_State *p_state); 17 | static int SetProjectionType(lua_State *p_state); 18 | static int GetFov(lua_State *p_state); 19 | static int SetFov(lua_State *p_state); 20 | static int GetAspectRatio(lua_State *p_state); 21 | static int SetAspectRatio(lua_State *p_state); 22 | static int GetOrthoParams(lua_State *p_state); 23 | static int SetOrthoParams(lua_State *p_state); 24 | static int GetDepth(lua_State *p_state); 25 | static int SetDepth(lua_State *p_state); 26 | static int GetDirection(lua_State *p_state); 27 | static int SetDirection(lua_State *p_state); 28 | static int GetUp(lua_State *p_state); 29 | static int SetUp(lua_State *p_state); 30 | static int GetViewMatrix(lua_State *p_state); 31 | static int GetProjectionMatrix(lua_State *p_state); 32 | static int GetViewProjectionMatrix(lua_State *p_state); 33 | static int IsCamera(lua_State *p_state); 34 | public: 35 | static void Init(); 36 | static void RegisterInVM(LuaVM *p_vm); 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/CollidableDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class CollidableDefs final 8 | { 9 | static std::vector ms_instanceMethods; 10 | 11 | CollidableDefs() = delete; 12 | ~CollidableDefs() = delete; 13 | 14 | static int SetCollidableWith(lua_State *p_state); 15 | static int IsCollidable(lua_State *p_state); 16 | public: 17 | static void Init(); 18 | static void RegisterInVM(LuaVM *p_vm); 19 | static void InheritTo(std::vector *p_instanceMethods); 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/ColliderDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class ColliderDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | ColliderDefs() = delete; 14 | ~ColliderDefs() = delete; 15 | 16 | static int Create(lua_State *p_state); 17 | static int GetVelocity(lua_State *p_state); 18 | static int SetVelocity(lua_State *p_state); 19 | static int GetAngularVelocity(lua_State *p_state); 20 | static int SetAngularVelocity(lua_State *p_state); 21 | static int GetLinearFactor(lua_State *p_state); 22 | static int SetLinearFactor(lua_State *p_state); 23 | static int GetMass(lua_State *p_state); 24 | static int GetFriction(lua_State *p_state); 25 | static int SetFriction(lua_State *p_state); 26 | static int GetRestitution(lua_State *p_state); 27 | static int SetRestitution(lua_State *p_state); 28 | static int GetMotionType(lua_State *p_state); 29 | static int SetMotionType(lua_State *p_state); 30 | static int ApplyForce(lua_State *p_state); 31 | static int ApplyCentralForce(lua_State *p_state); 32 | static int ApplyImpulse(lua_State *p_state); 33 | static int ApplyCentralImpulse(lua_State *p_state); 34 | static int ApplyTorque(lua_State *p_state); 35 | static int IsCollider(lua_State *p_state); 36 | public: 37 | static void Init(); 38 | static void RegisterInVM(LuaVM *p_vm); 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/DrawableDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class DrawableDefs final 8 | { 9 | static std::vector ms_instanceProps; 10 | static std::vector ms_instanceMethods; 11 | 12 | DrawableDefs() = delete; 13 | ~DrawableDefs() = delete; 14 | 15 | static int GetIsTransparent(lua_State *p_state); 16 | static int GetIsCubic(lua_State *p_state); 17 | static int GetSize(lua_State *p_state); 18 | static int GetFiltering(lua_State *p_state); 19 | static int Draw(lua_State *p_state); 20 | static int IsDrawable(lua_State *p_state); 21 | public: 22 | static void Init(); 23 | static void RegisterInVM(LuaVM *p_vm); 24 | static void InheritTo(std::vector< LuaPropDef> *p_instanceProps, std::vector *p_instanceMethods); 25 | }; 26 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/ElementDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class ElementDefs final 8 | { 9 | static std::vector ms_staticMethods; 10 | static std::vector ms_metaMethods; 11 | static std::vector ms_instanceProps; 12 | 13 | ElementDefs() = delete; 14 | ~ElementDefs() = delete; 15 | 16 | static int Destroy(lua_State *p_state); 17 | static int Equals(lua_State *p_state); 18 | static int GetType(lua_State *p_state); 19 | static int IsElement(lua_State *p_state); 20 | public: 21 | static void Init(); 22 | static void RegisterInVM(LuaVM *p_vm); 23 | static void InheritTo(std::vector *p_meta, std::vector *p_instanceProps); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/FontDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class FontDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | FontDefs() = delete; 14 | ~FontDefs() = delete; 15 | 16 | static int Create(lua_State *p_state); 17 | static int GetFiltering(lua_State *p_state); 18 | static int GetGlyphSize(lua_State *p_state); 19 | static int Draw(lua_State *p_state); 20 | static int IsFont(lua_State *p_state); 21 | public: 22 | static void Init(); 23 | static void RegisterInVM(LuaVM *p_vm); 24 | }; 25 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/InputDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class InputDefs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | 12 | InputDefs() = delete; 13 | ~InputDefs() = delete; 14 | 15 | static int GetEnabled(lua_State *p_state); 16 | static int SetEnabled(lua_State *p_state); 17 | static int GetClipboard(lua_State *p_state); 18 | static int SetClipboard(lua_State *p_state); 19 | static int GetKey(lua_State *p_state); 20 | static int GetMouseKey(lua_State *p_state); 21 | static int IsJoypadConnected(lua_State *p_state); 22 | static int GetJoypadKey(lua_State *p_state); 23 | static int GetJoypadButtonCount(lua_State *p_state); 24 | static int IsJoypadAxisPresent(lua_State *p_state); 25 | static int GetJoypadAxis(lua_State *p_state); 26 | public: 27 | static void Init(); 28 | static void RegisterInVM(LuaVM *p_vm); 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/LightDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class LightDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | 12 | LightDefs() = delete; 13 | ~LightDefs() = delete; 14 | 15 | static int Create(lua_State *p_state); 16 | static int GetType(lua_State *p_state); 17 | static int SetType(lua_State *p_state); 18 | static int GetDirection(lua_State *p_state); 19 | static int SetDirection(lua_State *p_state); 20 | static int GetColor(lua_State *p_state); 21 | static int SetColor(lua_State *p_state); 22 | static int GetCutoff(lua_State *p_state); 23 | static int SetCutoff(lua_State *p_state); 24 | static int GetFalloff(lua_State *p_state); 25 | static int SetFalloff(lua_State *p_state); 26 | static int IsLight(lua_State *p_state); 27 | public: 28 | static void Init(); 29 | static void RegisterInVM(LuaVM *p_vm); 30 | }; 31 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/Matrix2Defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class Matrix2Defs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | static std::vector ms_metaMethods; 12 | static std::vector ms_instanceProps; 13 | static std::vector ms_instanceMethods; 14 | 15 | Matrix2Defs() = delete; 16 | ~Matrix2Defs() = delete; 17 | 18 | static int Create(lua_State *p_state); 19 | static int GetZero(lua_State *p_state); 20 | static int GetIdentity(lua_State *p_state); 21 | static int Add(lua_State *p_state); 22 | static int Subtract(lua_State *p_state); 23 | static int Divide(lua_State *p_state); 24 | static int Multiply(lua_State *p_state); 25 | static int GetDeterminant(lua_State *p_state); 26 | static int GetInverse(lua_State *p_state); 27 | static int IsMatrix2(lua_State *p_state); 28 | public: 29 | static void Init(); 30 | static void RegisterInVM(LuaVM *p_vm); 31 | }; 32 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/Matrix3Defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class Matrix3Defs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | static std::vector ms_metaMethods; 12 | static std::vector ms_instanceProps; 13 | static std::vector ms_instanceMethods; 14 | 15 | Matrix3Defs() = delete; 16 | ~Matrix3Defs() = delete; 17 | 18 | static int Create(lua_State *p_state); 19 | static int GetZero(lua_State *p_state); 20 | static int GetIdentity(lua_State *p_state); 21 | static int Add(lua_State *p_state); 22 | static int Subtract(lua_State *p_state); 23 | static int Divide(lua_State *p_state); 24 | static int Multiply(lua_State *p_state); 25 | static int GetDeterminant(lua_State *p_state); 26 | static int GetInverse(lua_State *p_state); 27 | static int IsMatrix3(lua_State *p_state); 28 | public: 29 | static void Init(); 30 | static void RegisterInVM(LuaVM *p_vm); 31 | }; 32 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/Matrix4Defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class Matrix4Defs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | static std::vector ms_metaMethods; 12 | static std::vector ms_instanceProps; 13 | static std::vector ms_instanceMethods; 14 | 15 | Matrix4Defs() = delete; 16 | ~Matrix4Defs() = delete; 17 | 18 | static int Create(lua_State *p_state); 19 | static int GetZero(lua_State *p_state); 20 | static int GetIdentity(lua_State *p_state); 21 | static int Add(lua_State *p_state); 22 | static int Subtract(lua_State *p_state); 23 | static int Divide(lua_State *p_state); 24 | static int Multiply(lua_State *p_state); 25 | static int GetDeterminant(lua_State *p_state); 26 | static int GetInverse(lua_State *p_state); 27 | static int IsMatrix4(lua_State *p_state); 28 | public: 29 | static void Init(); 30 | static void RegisterInVM(LuaVM *p_vm); 31 | }; 32 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/MeshDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class MeshDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | 12 | MeshDefs() = delete; 13 | ~MeshDefs() = delete; 14 | 15 | static int Create(lua_State *p_state); 16 | static int GetBoundSphereRadius(lua_State *p_state); 17 | static int GetMaterialsCount(lua_State *p_state); 18 | static int IsMesh(lua_State *p_state); 19 | public: 20 | static void Init(); 21 | static void RegisterInVM(LuaVM *p_vm); 22 | }; 23 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/ModelDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class ModelDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | ModelDefs() = default; 14 | ~ModelDefs() = default; 15 | 16 | static int Create(lua_State *p_state); 17 | static int GetMesh(lua_State *p_state); 18 | static int GetBoundSphereRadius(lua_State *p_state); 19 | static int GetAnimation(lua_State *p_state); 20 | static int SetAnimation(lua_State *p_state); 21 | static int GetIsVisible(lua_State *p_state); 22 | static int PlayAnimation(lua_State *p_state); 23 | static int PauseAnimation(lua_State *p_state); 24 | static int ResetAnimation(lua_State *p_state); 25 | static int GetAnimationProperty(lua_State *p_state); 26 | static int SetAnimationProperty(lua_State *p_state); 27 | static int IsModel(lua_State *p_state); 28 | public: 29 | static void Init(); 30 | static void RegisterInVM(LuaVM *p_vm); 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/PhysicsDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class PhysicsDefs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | 12 | PhysicsDefs() = delete; 13 | ~PhysicsDefs() = delete; 14 | 15 | static int GetEnabled(lua_State *p_state); 16 | static int SetEnabled(lua_State *p_state); 17 | static int GetFloorEnabled(lua_State *p_state); 18 | static int SetFloorEnabled(lua_State *p_state); 19 | static int GetGravity(lua_State *p_state); 20 | static int SetGravity(lua_State *p_state); 21 | static int Raycast(lua_State *p_state); 22 | public: 23 | static void Init(); 24 | static void RegisterInVM(LuaVM *p_vm); 25 | }; 26 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/QuaternionDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class QuaternionDefs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | static std::vector ms_metaMethods; 12 | static std::vector ms_instanceProps; 13 | static std::vector ms_instanceMethods; 14 | 15 | QuaternionDefs() = delete; 16 | ~QuaternionDefs() = delete; 17 | 18 | static int Create(lua_State *p_state); 19 | static int GetIdentity(lua_State *p_state); 20 | static int Euler(lua_State *p_state); 21 | static int Multiply(lua_State *p_state); 22 | static int GetX(lua_State *p_state); 23 | static int SetX(lua_State *p_state); 24 | static int GetY(lua_State *p_state); 25 | static int SetY(lua_State *p_state); 26 | static int GetZ(lua_State *p_state); 27 | static int SetZ(lua_State *p_state); 28 | static int GetW(lua_State *p_state); 29 | static int SetW(lua_State *p_state); 30 | static int Rotate(lua_State *p_state); 31 | static int IsQuaternion(lua_State *p_state); 32 | public: 33 | static void Init(); 34 | static void RegisterInVM(LuaVM *p_vm); 35 | }; 36 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/RenderDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class RenderDefs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | 12 | RenderDefs() = delete; 13 | ~RenderDefs() = delete; 14 | 15 | static int SetPolygonMode(lua_State *p_state); 16 | static int SetClearColor(lua_State *p_state); 17 | static int SetViewport(lua_State *p_state); 18 | static int ClearViewport(lua_State *p_state); 19 | public: 20 | static void Init(); 21 | static void RegisterInVM(LuaVM *p_vm); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/RenderTargetDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class RenderTargetDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | RenderTargetDefs() = delete; 14 | ~RenderTargetDefs() = delete; 15 | 16 | static int Create(lua_State *p_state); 17 | static int SetProperty(lua_State *p_state); 18 | static int IsRenderTarget(lua_State *p_state); 19 | public: 20 | static void Init(); 21 | static void RegisterInVM(LuaVM *p_vm); 22 | }; 23 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/SceneDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class SceneDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | SceneDefs() = delete; 14 | ~SceneDefs() = delete; 15 | 16 | static int Create(lua_State *p_state); 17 | static int GetCamera(lua_State *p_state); 18 | static int SetCamera(lua_State *p_state); 19 | static int GetRenderTarget(lua_State *p_state); 20 | static int SetRenderTarget(lua_State *p_state); 21 | static int GetShader(lua_State *p_state); 22 | static int SetShader(lua_State *p_state); 23 | static int AddLight(lua_State *p_state); 24 | static int RemoveLight(lua_State *p_state); 25 | static int HasLight(lua_State *p_state); 26 | static int AddModel(lua_State *p_state); 27 | static int RemoveModel(lua_State *p_state); 28 | static int HasModel(lua_State *p_state); 29 | static int GetShadows(lua_State *p_state); 30 | static int SetShadows(lua_State *p_state); 31 | static int GetShadowsArea(lua_State *p_state); 32 | static int SetShadowsArea(lua_State *p_state); 33 | static int GetShadowsDepth(lua_State *p_state); 34 | static int SetShadowsDepth(lua_State *p_state); 35 | static int GetShadowsQuality(lua_State *p_state); 36 | static int SetShadowsQuality(lua_State *p_state); 37 | static int Draw(lua_State *p_state); 38 | static int IsScene(lua_State *p_state); 39 | public: 40 | static void Init(); 41 | static void RegisterInVM(LuaVM *p_vm); 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/ShaderDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class ShaderDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | ShaderDefs() = delete; 14 | ~ShaderDefs() = delete; 15 | 16 | static int Create(lua_State *p_state); 17 | static int Attach(lua_State *p_state); 18 | static int Detach(lua_State *p_state); 19 | static int HasAttached(lua_State *p_state); 20 | static int SetUniform(lua_State *p_state); 21 | static int IsShader(lua_State *p_state); 22 | public: 23 | static void Init(); 24 | static void RegisterInVM(LuaVM *p_vm); 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/TextureDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class TextureDefs final 8 | { 9 | static std::vector ms_metaMethods; 10 | static std::vector ms_instanceProps; 11 | static std::vector ms_instanceMethods; 12 | 13 | TextureDefs() = delete; 14 | ~TextureDefs() = delete; 15 | 16 | static int Create(lua_State *p_state); 17 | static int GetIsCompressed(lua_State *p_state); 18 | static int IsTexture(lua_State *p_state); 19 | public: 20 | static void Init(); 21 | static void RegisterInVM(LuaVM *p_vm); 22 | }; 23 | 24 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/TimeDefs.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Lua/LuaDefs/TimeDefs.h" 3 | #include "Lua/LuaDefs.h" 4 | #include "Lua/LuaVM.h" 5 | #include "Lua/LuaArgReader.h" 6 | #include "Core.h" 7 | #include "Utils.h" 8 | 9 | const std::string g_timeName("Time"); 10 | 11 | std::vector TimeDefs::ms_staticProps; 12 | std::vector TimeDefs::ms_staticMethods; 13 | 14 | void TimeDefs::Init() 15 | { 16 | ms_staticProps.emplace_back("deltaTime", GetDeltaTime, nullptr); 17 | ms_staticProps.emplace_back("totalTime", GetTotalTime, nullptr); 18 | 19 | ms_staticMethods.emplace_back("getSystemTime", GetSystemTime); 20 | } 21 | void TimeDefs::RegisterInVM(LuaVM *p_vm) 22 | { 23 | p_vm->RegisterLuaClass(g_timeName, nullptr, &ms_staticProps, &ms_staticMethods, nullptr, nullptr, nullptr); 24 | } 25 | 26 | int TimeDefs::GetDeltaTime(lua_State *p_state) 27 | { 28 | LuaArgReader l_argReader(p_state); 29 | l_argReader.PushNumber(Core::GetInstance()->GetEngineCore()->GetEngineDelta()); 30 | return 1; 31 | } 32 | 33 | int TimeDefs::GetTotalTime(lua_State *p_state) 34 | { 35 | LuaArgReader l_argReader(p_state); 36 | l_argReader.PushNumber(Core::GetInstance()->GetEngineCore()->GetISfmlManager()->GetTime()); 37 | return 1; 38 | } 39 | 40 | int TimeDefs::GetSystemTime(lua_State *p_state) 41 | { 42 | LuaArgReader l_argReader(p_state); 43 | std::time_t l_timeRaw = std::time(nullptr); 44 | tm l_time = { 0 }; 45 | localtime_s(&l_time, &l_timeRaw); 46 | l_argReader.PushInteger(l_time.tm_hour); 47 | l_argReader.PushInteger(l_time.tm_min); 48 | l_argReader.PushInteger(l_time.tm_sec); 49 | return l_argReader.GetReturnValue(); 50 | } 51 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/TimeDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class TimeDefs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | 12 | TimeDefs() = delete; 13 | ~TimeDefs() = delete; 14 | 15 | static int GetDeltaTime(lua_State *p_state); 16 | static int GetTotalTime(lua_State *p_state); 17 | static int GetSystemTime(lua_State *p_state); 18 | public: 19 | static void Init(); 20 | static void RegisterInVM(LuaVM *p_vm); 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/TransformableDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class TransformableDefs final 8 | { 9 | static std::vector ms_instanceProps; 10 | 11 | TransformableDefs() = delete; 12 | ~TransformableDefs() = delete; 13 | 14 | static int GetPosition(lua_State *p_state); 15 | static int SetPosition(lua_State *p_state); 16 | static int GetRotation(lua_State *p_state); 17 | static int SetRotation(lua_State *p_state); 18 | static int GetScale(lua_State *p_state); 19 | static int SetScale(lua_State *p_state); 20 | static int GetMatrix(lua_State *p_state); 21 | static int IsTransformable(lua_State *p_state); 22 | public: 23 | static void Init(); 24 | static void RegisterInVM(LuaVM *p_vm); 25 | static void InheritTo(std::vector *p_instanceProps); 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/Vector2Defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class Vector2Defs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | static std::vector ms_metaMethods; 12 | static std::vector ms_instanceProps; 13 | static std::vector ms_instanceMethods; 14 | 15 | Vector2Defs() = delete; 16 | ~Vector2Defs() = delete; 17 | 18 | static int Create(lua_State *p_state); 19 | static int GetZero(lua_State *p_state); 20 | static int GetOne(lua_State *p_state); 21 | static int GetLeft(lua_State *p_state); 22 | static int GetRight(lua_State *p_state); 23 | static int GetUp(lua_State *p_state); 24 | static int GetDown(lua_State *p_state); 25 | static int Angle(lua_State *p_state); 26 | static int Distance(lua_State *p_state); 27 | static int Dot(lua_State *p_state); 28 | static int Lerp(lua_State *p_state); 29 | static int Reflect(lua_State *p_state); 30 | static int Add(lua_State *p_state); 31 | static int Subtract(lua_State *p_state); 32 | static int Divide(lua_State *p_state); 33 | static int Multiply(lua_State *p_state); 34 | static int GetLength(lua_State *p_state); 35 | static int GetX(lua_State *p_state); 36 | static int SetX(lua_State *p_state); 37 | static int GetY(lua_State *p_state); 38 | static int SetY(lua_State *p_state); 39 | static int IsVector2(lua_State *p_state); 40 | public: 41 | static void Init(); 42 | static void RegisterInVM(LuaVM *p_vm); 43 | }; 44 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/Vector4Defs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class Vector4Defs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | static std::vector ms_metaMethods; 12 | static std::vector ms_instanceProps; 13 | static std::vector ms_instanceMethods; 14 | 15 | Vector4Defs() = delete; 16 | ~Vector4Defs() = delete; 17 | 18 | static int Create(lua_State *p_state); 19 | static int GetZero(lua_State *p_state); 20 | static int GetOne(lua_State *p_state); 21 | static int Distance(lua_State *p_state); 22 | static int Dot(lua_State *p_state); 23 | static int Lerp(lua_State *p_state); 24 | static int Add(lua_State *p_state); 25 | static int Subtract(lua_State *p_state); 26 | static int Divide(lua_State *p_state); 27 | static int Multiply(lua_State *p_state); 28 | static int GetLength(lua_State *p_state); 29 | static int GetX(lua_State *p_state); 30 | static int SetX(lua_State *p_state); 31 | static int GetY(lua_State *p_state); 32 | static int SetY(lua_State *p_state); 33 | static int GetZ(lua_State *p_state); 34 | static int SetZ(lua_State *p_state); 35 | static int GetW(lua_State *p_state); 36 | static int SetW(lua_State *p_state); 37 | static int IsVector4(lua_State *p_state); 38 | public: 39 | static void Init(); 40 | static void RegisterInVM(LuaVM *p_vm); 41 | }; 42 | -------------------------------------------------------------------------------- /roc_module_lua/Lua/LuaDefs/WindowDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct LuaPropDef; 4 | struct LuaMethodDef; 5 | class LuaVM; 6 | 7 | class WindowDefs final 8 | { 9 | static std::vector ms_staticProps; 10 | static std::vector ms_staticMethods; 11 | 12 | WindowDefs() = delete; 13 | ~WindowDefs() = delete; 14 | 15 | static int GetPosition(lua_State *p_state); 16 | static int SetPosition(lua_State *p_state); 17 | static int GetSize(lua_State *p_state); 18 | static int SetVSync(lua_State *p_state); 19 | static int GetFrameLimit(lua_State *p_state); 20 | static int SetFrameLimit(lua_State *p_state); 21 | static int SetTitle(lua_State *p_state); 22 | static int SetIcon(lua_State *p_state); 23 | static int GetFocus(lua_State *p_state); 24 | static int GetCursorPosition(lua_State *p_state); 25 | static int SetCursorPosition(lua_State *p_state); 26 | 27 | static int Close(lua_State *p_state); 28 | static int RequestFocus(lua_State *p_state); 29 | static int SetCursorMode(lua_State *p_state); 30 | public: 31 | static void Init(); 32 | static void RegisterInVM(LuaVM *p_vm); 33 | }; 34 | 35 | -------------------------------------------------------------------------------- /roc_module_lua/LuaHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class LuaVM; 4 | class LuaHandler final 5 | { 6 | LuaVM *m_vm; 7 | std::unordered_map m_eventFunctions; 8 | 9 | LuaHandler(const LuaHandler &that) = delete; 10 | LuaHandler& operator=(const LuaHandler &that) = delete; 11 | public: 12 | LuaHandler(); 13 | ~LuaHandler(); 14 | 15 | static void InitDefs(); 16 | 17 | void LoadScript(const std::string &p_path); 18 | 19 | void ParseEvents(); 20 | 21 | void CallEvent(ROC::IModule::ModuleEvent p_event, const ROC::ICustomArguments *p_args); 22 | 23 | void PerformGC(); 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /roc_module_lua/TextureDefs.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "TextureDefs.h" 3 | -------------------------------------------------------------------------------- /roc_module_lua/Utils.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Utils.h" 3 | #include "Core.h" 4 | 5 | extern const std::string g_vec2Name; 6 | extern const std::string g_vec3Name; 7 | extern const std::string g_vec4Name; 8 | extern const std::string g_quatName; 9 | extern const std::string g_matrix2Name; 10 | extern const std::string g_matrix3Name; 11 | extern const std::string g_matrix4Name; 12 | 13 | bool Utils::IsValid(ROC::IElement *p_obj) 14 | { 15 | return Core::GetInstance()->GetEngineCore()->GetIElementManager()->IsValidIElement(p_obj); 16 | } 17 | 18 | void Utils::DeleteByType(void *p_obj, const std::string &p_type) 19 | { 20 | if(p_type == g_vec2Name) 21 | { 22 | delete reinterpret_cast(p_obj); 23 | return; 24 | } 25 | if(p_type == g_vec3Name) 26 | { 27 | delete reinterpret_cast(p_obj); 28 | return; 29 | } 30 | if(p_type == g_vec4Name) 31 | { 32 | delete reinterpret_cast(p_obj); 33 | return; 34 | } 35 | if(p_type == g_quatName) 36 | { 37 | delete reinterpret_cast(p_obj); 38 | return; 39 | } 40 | if(p_type == g_matrix2Name) 41 | { 42 | delete reinterpret_cast(p_obj); 43 | return; 44 | } 45 | if(p_type == g_matrix3Name) 46 | { 47 | delete reinterpret_cast(p_obj); 48 | return; 49 | } 50 | if(p_type == g_matrix4Name) 51 | { 52 | delete reinterpret_cast(p_obj); 53 | return; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /roc_module_lua/Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace Utils 4 | { 5 | 6 | bool IsValid(ROC::IElement *p_obj); 7 | 8 | void DeleteByType(void *p_obj, const std::string &p_type); 9 | 10 | template inline T Cast(U p_obj) 11 | { 12 | return dynamic_cast(p_obj); 13 | } 14 | 15 | } 16 | 17 | -------------------------------------------------------------------------------- /roc_module_lua/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Core.h" 3 | 4 | BOOL APIENTRY DllMain(HMODULE, DWORD ul_reason_for_call, LPVOID) 5 | { 6 | switch(ul_reason_for_call) 7 | { 8 | case DLL_PROCESS_ATTACH: 9 | case DLL_THREAD_ATTACH: 10 | case DLL_THREAD_DETACH: 11 | case DLL_PROCESS_DETACH: 12 | break; 13 | } 14 | return TRUE; 15 | } 16 | 17 | extern "C" __declspec(dllexport) ROC::IModule* ModuleInit(ROC::ICore *p_core) 18 | { 19 | Core::Init(p_core); 20 | return Core::GetInstance(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /roc_module_lua/roc_module_lua.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /roc_module_lua/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /roc_module_lua/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define WIN32_LEAN_AND_MEAN 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "lua.hpp" 14 | 15 | #include "glm/glm.hpp" 16 | #include "glm/gtc/epsilon.hpp" 17 | #include "glm/gtc/matrix_access.hpp" 18 | #include "glm/gtc/matrix_transform.hpp" 19 | #include "glm/gtc/quaternion.hpp" 20 | #include "glm/gtc/type_ptr.hpp" 21 | #include "glm/gtx/common.hpp" 22 | #include "glm/gtx/compatibility.hpp" 23 | #include "glm/gtx/vector_angle.hpp" 24 | 25 | #include "pugixml.hpp" 26 | 27 | #include "IAnimation.h" 28 | #include "ICamera.h" 29 | #include "ICollidable.h" 30 | #include "ICollider.h" 31 | #include "ICore.h" 32 | #include "ICustomArgument.h" 33 | #include "ICustomArguments.h" 34 | #include "IDrawable.h" 35 | #include "IElement.h" 36 | #include "IElementManager.h" 37 | #include "IFont.h" 38 | #include "ILight.h" 39 | #include "ILogManager.h" 40 | #include "IMesh.h" 41 | #include "IModel.h" 42 | #include "IModule.h" 43 | #include "IPhysicsManager.h" 44 | #include "IRenderManager.h" 45 | #include "IRenderTarget.h" 46 | #include "IScene.h" 47 | #include "ISfmlManager.h" 48 | #include "IShader.h" 49 | #include "ISound.h" 50 | #include "ISoundManager.h" 51 | #include "ITexture.h" 52 | #include "ITransformable.h" 53 | -------------------------------------------------------------------------------- /shared/Utils/EnumUtils.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "EnumUtils.h" 5 | 6 | namespace EnumUtils 7 | { 8 | 9 | size_t ReadEnumVector(const std::string &p_val, const std::vector &p_vec) 10 | { 11 | size_t l_result = std::numeric_limits::max(); 12 | for(auto l_searchIter = p_vec.begin(), l_searchEnd = p_vec.end(); l_searchIter != l_searchEnd; ++l_searchIter) 13 | { 14 | if(!l_searchIter->compare(p_val)) 15 | { 16 | l_result = std::distance(p_vec.begin(), l_searchIter); 17 | break; 18 | } 19 | } 20 | return l_result; 21 | } 22 | 23 | size_t ReadEnumVector(const char *p_val, const std::vector &p_vec) 24 | { 25 | size_t l_result = std::numeric_limits::max(); 26 | for(auto l_searchIter = p_vec.begin(), l_searchEnd = p_vec.end(); l_searchIter != l_searchEnd; ++l_searchIter) 27 | { 28 | if(!l_searchIter->compare(p_val)) 29 | { 30 | l_result = std::distance(p_vec.begin(), l_searchIter); 31 | break; 32 | } 33 | } 34 | return l_result; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /shared/Utils/EnumUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace EnumUtils 4 | { 5 | 6 | size_t ReadEnumVector(const std::string &f_val, const std::vector &f_vec); 7 | size_t ReadEnumVector(const char *f_val, const std::vector &f_vec); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /vendor/SFML/bin/openal32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/openal32.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-audio-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-audio-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-audio-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-audio-d-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-graphics-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-graphics-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-graphics-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-graphics-d-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-system-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-system-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-system-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-system-d-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-window-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-window-2.dll -------------------------------------------------------------------------------- /vendor/SFML/bin/sfml-window-d-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/bin/sfml-window-d-2.dll -------------------------------------------------------------------------------- /vendor/SFML/include/SFML/Audio/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_EXPORT_HPP 26 | #define SFML_AUDIO_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_AUDIO_EXPORTS) 38 | 39 | #define SFML_AUDIO_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_AUDIO_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_AUDIO_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /vendor/SFML/include/SFML/Graphics/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GRAPHICS_EXPORT_HPP 26 | #define SFML_GRAPHICS_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_GRAPHICS_EXPORTS) 38 | 39 | #define SFML_GRAPHICS_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_GRAPHICS_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_GRAPHICS_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /vendor/SFML/include/SFML/Main.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_MAIN_HPP 26 | #define SFML_MAIN_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | #if defined(SFML_SYSTEM_IOS) 35 | 36 | // On iOS, we have no choice but to have our own main, 37 | // so we need to rename the user one and call it later 38 | #define main sfmlMain 39 | 40 | #endif 41 | 42 | 43 | #endif // SFML_MAIN_HPP 44 | -------------------------------------------------------------------------------- /vendor/SFML/include/SFML/System/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SYSTEM_EXPORT_HPP 26 | #define SFML_SYSTEM_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_SYSTEM_EXPORTS) 38 | 39 | #define SFML_SYSTEM_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_SYSTEM_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_SYSTEM_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /vendor/SFML/include/SFML/Window/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOW_EXPORT_HPP 26 | #define SFML_WINDOW_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_WINDOW_EXPORTS) 38 | 39 | #define SFML_WINDOW_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_WINDOW_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_WINDOW_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-audio-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-audio-d.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-audio.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-audio.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-graphics-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-graphics-d.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-graphics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-graphics.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-main-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-main-d.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-main.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-system-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-system-d.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-system.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-system.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-window-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-window-d.lib -------------------------------------------------------------------------------- /vendor/SFML/lib/sfml-window.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/SFML/lib/sfml-window.lib -------------------------------------------------------------------------------- /vendor/SFML/license.md: -------------------------------------------------------------------------------- 1 | # SFML 2 | 3 | SFML - Copyright (C) 2007-2023 Laurent Gomila - laurent@sfml-dev.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 10 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 11 | 3. This notice may not be removed or altered from any source distribution. 12 | 13 | ## External libraries used by SFML 14 | 15 | * _OpenAL-Soft_ is under the LGPL license 16 | * _stb_image_ and _stb_image_write_ are public domain 17 | * _freetype_ is under the FreeType license or the GPL license 18 | * _libogg_ is under the BSD license 19 | * _libvorbis_ is under the BSD license 20 | * _libflac_ is under the BSD license 21 | * _minimp3_ is under the CC0 license 22 | -------------------------------------------------------------------------------- /vendor/bullet/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Bullet Physics is created by Erwin Coumans with contributions from the following authors / copyright holders: 2 | 3 | AMD 4 | Apple 5 | Yunfei Bai 6 | Steve Baker 7 | Gino van den Bergen 8 | Jeff Bingham 9 | Nicola Candussi 10 | Erin Catto 11 | Lawrence Chai 12 | Erwin Coumans 13 | Disney Animation 14 | Benjamin Ellenberger 15 | Christer Ericson 16 | Google 17 | Dirk Gregorius 18 | Marcus Hennix 19 | Jasmine Hsu 20 | MBSim Development Team 21 | Takahiro Harada 22 | Simon Hobbs 23 | John Hsu 24 | Ole Kniemeyer 25 | Jay Lee 26 | Francisco Leon 27 | lunkhound 28 | Vsevolod Klementjev 29 | Phil Knight 30 | John McCutchan 31 | Steven Peters 32 | Roman Ponomarev 33 | Nathanael Presson 34 | Gabor PUHR 35 | Arthur Shek 36 | Russel Smith 37 | Sony 38 | Jakub Stephien 39 | Marten Svanfeldt 40 | Jie Tan 41 | Pierre Terdiman 42 | Steven Thompson 43 | Tamas Umenhoffer 44 | 45 | If your name is missing, please send an email to erwin.coumans@gmail.com or file an issue at http://github.com/bulletphysics/bullet3 46 | -------------------------------------------------------------------------------- /vendor/bullet/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | The files in this repository are licensed under the zlib license, except for the files under 'Extras' and examples/ThirdPartyLibs. 3 | 4 | Bullet Continuous Collision Detection and Physics Library 5 | http://bulletphysics.org 6 | 7 | This software is provided 'as-is', without any express or implied warranty. 8 | In no event will the authors be held liable for any damages arising from the use of this software. 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it freely, 11 | subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 14 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | -------------------------------------------------------------------------------- /vendor/bullet/VERSION: -------------------------------------------------------------------------------- 1 | 3.25 2 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef __BT_ACTIVATING_COLLISION_ALGORITHM_H 17 | #define __BT_ACTIVATING_COLLISION_ALGORITHM_H 18 | 19 | #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" 20 | 21 | ///This class is not enabled yet (work-in-progress) to more aggressively activate objects. 22 | class btActivatingCollisionAlgorithm : public btCollisionAlgorithm 23 | { 24 | // btCollisionObject* m_colObj0; 25 | // btCollisionObject* m_colObj1; 26 | 27 | protected: 28 | btActivatingCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci); 29 | 30 | btActivatingCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci, const btCollisionObjectWrapper* body0Wrap, const btCollisionObjectWrapper* body1Wrap); 31 | 32 | public: 33 | virtual ~btActivatingCollisionAlgorithm(); 34 | }; 35 | #endif //__BT_ACTIVATING_COLLISION_ALGORITHM_H 36 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/CollisionShapes/btCollisionMargin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_MARGIN_H 17 | #define BT_COLLISION_MARGIN_H 18 | 19 | ///The CONVEX_DISTANCE_MARGIN is a default collision margin for convex collision shapes derived from btConvexInternalShape. 20 | ///This collision margin is used by Gjk and some other algorithms 21 | ///Note that when creating small objects, you need to make sure to set a smaller collision margin, using the 'setMargin' API 22 | #define CONVEX_DISTANCE_MARGIN btScalar(0.04) // btScalar(0.1)//;//btScalar(0.01) 23 | 24 | #endif //BT_COLLISION_MARGIN_H 25 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/CollisionShapes/btMaterial.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | /// This file was created by Alex Silverman 17 | 18 | #ifndef BT_MATERIAL_H 19 | #define BT_MATERIAL_H 20 | 21 | // Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties 22 | class btMaterial 23 | { 24 | // public members so that materials can change due to world events 25 | public: 26 | btScalar m_friction; 27 | btScalar m_restitution; 28 | int pad[2]; 29 | 30 | btMaterial() {} 31 | btMaterial(btScalar fric, btScalar rest) 32 | { 33 | m_friction = fric; 34 | m_restitution = rest; 35 | } 36 | }; 37 | 38 | #endif // BT_MATERIAL_H 39 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/CollisionShapes/btSdfCollisionShape.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_SDF_COLLISION_SHAPE_H 2 | #define BT_SDF_COLLISION_SHAPE_H 3 | 4 | #include "btConcaveShape.h" 5 | 6 | class btSdfCollisionShape : public btConcaveShape 7 | { 8 | struct btSdfCollisionShapeInternalData* m_data; 9 | 10 | public: 11 | btSdfCollisionShape(); 12 | virtual ~btSdfCollisionShape(); 13 | 14 | bool initializeSDF(const char* sdfData, int sizeInBytes); 15 | 16 | virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const; 17 | virtual void setLocalScaling(const btVector3& scaling); 18 | virtual const btVector3& getLocalScaling() const; 19 | virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const; 20 | virtual const char* getName() const; 21 | virtual void setMargin(btScalar margin); 22 | virtual btScalar getMargin() const; 23 | 24 | virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const; 25 | 26 | bool queryPoint(const btVector3& ptInSDF, btScalar& distOut, btVector3& normal); 27 | }; 28 | 29 | #endif //BT_SDF_COLLISION_SHAPE_H 30 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/CollisionShapes/btTriangleCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_TRIANGLE_CALLBACK_H 17 | #define BT_TRIANGLE_CALLBACK_H 18 | 19 | #include "LinearMath/btVector3.h" 20 | 21 | ///The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTriangles. 22 | ///This callback is called by processAllTriangles for all btConcaveShape derived class, such as btBvhTriangleMeshShape, btStaticPlaneShape and btHeightfieldTerrainShape. 23 | class btTriangleCallback 24 | { 25 | public: 26 | virtual ~btTriangleCallback(); 27 | virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) = 0; 28 | }; 29 | 30 | class btInternalTriangleIndexCallback 31 | { 32 | public: 33 | virtual ~btInternalTriangleIndexCallback(); 34 | virtual void internalProcessTriangleIndex(btVector3* triangle, int partId, int triangleIndex) = 0; 35 | }; 36 | 37 | #endif //BT_TRIANGLE_CALLBACK_H 38 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/Gimpact/btGImpactShape.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/include/BulletCollision/Gimpact/btGImpactShape.h -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/Gimpact/gim_geometry.h: -------------------------------------------------------------------------------- 1 | #ifndef GIM_GEOMETRY_H_INCLUDED 2 | #define GIM_GEOMETRY_H_INCLUDED 3 | 4 | /*! \file gim_geometry.h 5 | \author Francisco Leon Najera 6 | */ 7 | /* 8 | ----------------------------------------------------------------------------- 9 | This source file is part of GIMPACT Library. 10 | 11 | For the latest info, see http://gimpact.sourceforge.net/ 12 | 13 | Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371. 14 | email: projectileman@yahoo.com 15 | 16 | This library is free software; you can redistribute it and/or 17 | modify it under the terms of EITHER: 18 | (1) The GNU Lesser General Public License as published by the Free 19 | Software Foundation; either version 2.1 of the License, or (at 20 | your option) any later version. The text of the GNU Lesser 21 | General Public License is included with this library in the 22 | file GIMPACT-LICENSE-LGPL.TXT. 23 | (2) The BSD-style license that is included with this library in 24 | the file GIMPACT-LICENSE-BSD.TXT. 25 | (3) The zlib/libpng license that is included with this library in 26 | the file GIMPACT-LICENSE-ZLIB.TXT. 27 | 28 | This library is distributed in the hope that it will be useful, 29 | but WITHOUT ANY WARRANTY; without even the implied warranty of 30 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files 31 | GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details. 32 | 33 | ----------------------------------------------------------------------------- 34 | */ 35 | 36 | ///Additional Headers for Collision 37 | #include "gim_basic_geometry_operations.h" 38 | #include "gim_clip_polygon.h" 39 | #include "gim_box_collision.h" 40 | #include "gim_tri_collision.h" 41 | 42 | #endif // GIM_VECTOR_H_INCLUDED 43 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/Gimpact/gim_pair.h: -------------------------------------------------------------------------------- 1 | #ifndef GIM_PAIR_H 2 | #define GIM_PAIR_H 3 | 4 | 5 | //! Overlapping pair 6 | struct GIM_PAIR 7 | { 8 | int m_index1; 9 | int m_index2; 10 | GIM_PAIR() 11 | { 12 | } 13 | 14 | GIM_PAIR(const GIM_PAIR& p) 15 | { 16 | m_index1 = p.m_index1; 17 | m_index2 = p.m_index2; 18 | } 19 | 20 | GIM_PAIR(int index1, int index2) 21 | { 22 | m_index1 = index1; 23 | m_index2 = index2; 24 | } 25 | }; 26 | 27 | #endif //GIM_PAIR_H 28 | 29 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_CONVEX_PENETRATION_DEPTH_H 17 | #define BT_CONVEX_PENETRATION_DEPTH_H 18 | 19 | class btVector3; 20 | #include "btSimplexSolverInterface.h" 21 | class btConvexShape; 22 | class btTransform; 23 | 24 | ///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. 25 | class btConvexPenetrationDepthSolver 26 | { 27 | public: 28 | virtual ~btConvexPenetrationDepthSolver(){}; 29 | virtual bool calcPenDepth(btSimplexSolverInterface& simplexSolver, 30 | const btConvexShape* convexA, const btConvexShape* convexB, 31 | const btTransform& transA, const btTransform& transB, 32 | btVector3& v, btVector3& pa, btVector3& pb, 33 | class btIDebugDraw* debugDraw) = 0; 34 | }; 35 | #endif //BT_CONVEX_PENETRATION_DEPTH_H 36 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletCollision/NarrowPhaseCollision/btGjkCollisionDescription.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2014 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef GJK_COLLISION_DESCRIPTION_H 17 | #define GJK_COLLISION_DESCRIPTION_H 18 | 19 | #include "LinearMath/btVector3.h" 20 | 21 | struct btGjkCollisionDescription 22 | { 23 | btVector3 m_firstDir; 24 | int m_maxGjkIterations; 25 | btScalar m_maximumDistanceSquared; 26 | btScalar m_gjkRelError2; 27 | btGjkCollisionDescription() 28 | : m_firstDir(0, 1, 0), 29 | m_maxGjkIterations(1000), 30 | m_maximumDistanceSquared(1e30f), 31 | m_gjkRelError2(1.0e-6) 32 | { 33 | } 34 | virtual ~btGjkCollisionDescription() 35 | { 36 | } 37 | }; 38 | 39 | #endif //GJK_COLLISION_DESCRIPTION_H 40 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletDynamics/ConstraintSolver/btFixedConstraint.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_FIXED_CONSTRAINT_H 17 | #define BT_FIXED_CONSTRAINT_H 18 | 19 | #include "btGeneric6DofSpring2Constraint.h" 20 | 21 | ATTRIBUTE_ALIGNED16(class) 22 | btFixedConstraint : public btGeneric6DofSpring2Constraint 23 | { 24 | public: 25 | btFixedConstraint(btRigidBody & rbA, btRigidBody & rbB, const btTransform& frameInA, const btTransform& frameInB); 26 | 27 | virtual ~btFixedConstraint(); 28 | }; 29 | 30 | #endif //BT_FIXED_CONSTRAINT_H 31 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletDynamics/Dynamics/btActionInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef _BT_ACTION_INTERFACE_H 17 | #define _BT_ACTION_INTERFACE_H 18 | 19 | class btIDebugDraw; 20 | class btCollisionWorld; 21 | 22 | #include "LinearMath/btScalar.h" 23 | #include "btRigidBody.h" 24 | 25 | ///Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWorld 26 | class btActionInterface 27 | { 28 | protected: 29 | static btRigidBody& getFixedBody(); 30 | 31 | public: 32 | virtual ~btActionInterface() 33 | { 34 | } 35 | 36 | virtual void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep) = 0; 37 | 38 | virtual void debugDraw(btIDebugDraw* debugDrawer) = 0; 39 | }; 40 | 41 | #endif //_BT_ACTION_INTERFACE_H 42 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletDynamics/Featherstone/btMultiBodyJointFeedback.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Google Inc. 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | 15 | #ifndef BT_MULTIBODY_JOINT_FEEDBACK_H 16 | #define BT_MULTIBODY_JOINT_FEEDBACK_H 17 | 18 | #include "LinearMath/btSpatialAlgebra.h" 19 | 20 | struct btMultiBodyJointFeedback 21 | { 22 | btSpatialForceVector m_reactionForces; 23 | }; 24 | 25 | #endif //BT_MULTIBODY_JOINT_FEEDBACK_H 26 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | ///original version written by Erwin Coumans, October 2013 16 | 17 | #ifndef BT_MLCP_SOLVER_INTERFACE_H 18 | #define BT_MLCP_SOLVER_INTERFACE_H 19 | 20 | #include "LinearMath/btMatrixX.h" 21 | 22 | class btMLCPSolverInterface 23 | { 24 | public: 25 | virtual ~btMLCPSolverInterface() 26 | { 27 | } 28 | 29 | //return true is it solves the problem successfully 30 | virtual bool solveMLCP(const btMatrixXu& A, const btVectorXu& b, btVectorXu& x, const btVectorXu& lo, const btVectorXu& hi, const btAlignedObjectArray& limitDependency, int numIterations, bool useSparsity = true) = 0; 31 | }; 32 | 33 | #endif //BT_MLCP_SOLVER_INTERFACE_H 34 | -------------------------------------------------------------------------------- /vendor/bullet/include/BulletDynamics/Vehicle/btVehicleRaycaster.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org 3 | * 4 | * Permission to use, copy, modify, distribute and sell this software 5 | * and its documentation for any purpose is hereby granted without fee, 6 | * provided that the above copyright notice appear in all copies. 7 | * Erwin Coumans makes no representations about the suitability 8 | * of this software for any purpose. 9 | * It is provided "as is" without express or implied warranty. 10 | */ 11 | #ifndef BT_VEHICLE_RAYCASTER_H 12 | #define BT_VEHICLE_RAYCASTER_H 13 | 14 | #include "LinearMath/btVector3.h" 15 | 16 | /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting 17 | struct btVehicleRaycaster 18 | { 19 | virtual ~btVehicleRaycaster() 20 | { 21 | } 22 | struct btVehicleRaycasterResult 23 | { 24 | btVehicleRaycasterResult() : m_distFraction(btScalar(-1.)){}; 25 | btVector3 m_hitPointInWorld; 26 | btVector3 m_hitNormalInWorld; 27 | btScalar m_distFraction; 28 | }; 29 | 30 | virtual void* castRay(const btVector3& from, const btVector3& to, btVehicleRaycasterResult& result) = 0; 31 | }; 32 | 33 | #endif //BT_VEHICLE_RAYCASTER_H 34 | -------------------------------------------------------------------------------- /vendor/bullet/include/LinearMath/btDefaultMotionState.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_DEFAULT_MOTION_STATE_H 2 | #define BT_DEFAULT_MOTION_STATE_H 3 | 4 | #include "btMotionState.h" 5 | 6 | ///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets. 7 | ATTRIBUTE_ALIGNED16(struct) 8 | btDefaultMotionState : public btMotionState 9 | { 10 | btTransform m_graphicsWorldTrans; 11 | btTransform m_centerOfMassOffset; 12 | btTransform m_startWorldTrans; 13 | void* m_userPointer; 14 | 15 | BT_DECLARE_ALIGNED_ALLOCATOR(); 16 | 17 | btDefaultMotionState(const btTransform& startTrans = btTransform::getIdentity(), const btTransform& centerOfMassOffset = btTransform::getIdentity()) 18 | : m_graphicsWorldTrans(startTrans), 19 | m_centerOfMassOffset(centerOfMassOffset), 20 | m_startWorldTrans(startTrans), 21 | m_userPointer(0) 22 | 23 | { 24 | } 25 | 26 | ///synchronizes world transform from user to physics 27 | virtual void getWorldTransform(btTransform & centerOfMassWorldTrans) const 28 | { 29 | centerOfMassWorldTrans = m_graphicsWorldTrans * m_centerOfMassOffset.inverse(); 30 | } 31 | 32 | ///synchronizes world transform from physics to user 33 | ///Bullet only calls the update of worldtransform for active objects 34 | virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans) 35 | { 36 | m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset; 37 | } 38 | }; 39 | 40 | #endif //BT_DEFAULT_MOTION_STATE_H 41 | -------------------------------------------------------------------------------- /vendor/bullet/include/LinearMath/btMotionState.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MOTIONSTATE_H 17 | #define BT_MOTIONSTATE_H 18 | 19 | #include "btTransform.h" 20 | 21 | ///The btMotionState interface class allows the dynamics world to synchronize and interpolate the updated world transforms with graphics 22 | ///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation) 23 | class btMotionState 24 | { 25 | public: 26 | virtual ~btMotionState() 27 | { 28 | } 29 | 30 | virtual void getWorldTransform(btTransform& worldTrans) const = 0; 31 | 32 | //Bullet only calls the update of worldtransform for active objects 33 | virtual void setWorldTransform(const btTransform& worldTrans) = 0; 34 | }; 35 | 36 | #endif //BT_MOTIONSTATE_H 37 | -------------------------------------------------------------------------------- /vendor/bullet/include/LinearMath/btRandom.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans https://bulletphysics.org 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | 15 | #ifndef BT_GEN_RANDOM_H 16 | #define BT_GEN_RANDOM_H 17 | 18 | #ifdef MT19937 19 | 20 | #include 21 | #include 22 | 23 | #define GEN_RAND_MAX UINT_MAX 24 | 25 | SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand(seed); } 26 | SIMD_FORCE_INLINE unsigned int GEN_rand() { return genrand_int32(); } 27 | 28 | #else 29 | 30 | #include 31 | 32 | #define GEN_RAND_MAX RAND_MAX 33 | 34 | SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); } 35 | SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand(); } 36 | 37 | #endif 38 | 39 | #endif //BT_GEN_RANDOM_H 40 | -------------------------------------------------------------------------------- /vendor/bullet/lib/win64/BulletCollision.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/lib/win64/BulletCollision.lib -------------------------------------------------------------------------------- /vendor/bullet/lib/win64/BulletCollision_Debug.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/lib/win64/BulletCollision_Debug.lib -------------------------------------------------------------------------------- /vendor/bullet/lib/win64/BulletDynamics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/lib/win64/BulletDynamics.lib -------------------------------------------------------------------------------- /vendor/bullet/lib/win64/BulletDynamics_Debug.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/lib/win64/BulletDynamics_Debug.lib -------------------------------------------------------------------------------- /vendor/bullet/lib/win64/LinearMath.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/lib/win64/LinearMath.lib -------------------------------------------------------------------------------- /vendor/bullet/lib/win64/LinearMath_Debug.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/bullet/lib/win64/LinearMath_Debug.lib -------------------------------------------------------------------------------- /vendor/freetype2/bin/win64/freetype.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/freetype2/bin/win64/freetype.dll -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/config/ftconfig.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftconfig.h 4 | * 5 | * ANSI-specific configuration file (specification only). 6 | * 7 | * Copyright (C) 1996-2023 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This header file contains a number of macro definitions that are used by 22 | * the rest of the engine. Most of the macros here are automatically 23 | * determined at compile time, and you should not need to change it to port 24 | * FreeType, except to compile the library with a non-ANSI compiler. 25 | * 26 | * Note however that if some specific modifications are needed, we advise 27 | * you to place a modified copy in your build directory. 28 | * 29 | * The build directory is usually `builds/`, and contains 30 | * system-specific files that are always included first when building the 31 | * library. 32 | * 33 | * This ANSI version should stay in `include/config/`. 34 | * 35 | */ 36 | 37 | #ifndef FTCONFIG_H_ 38 | #define FTCONFIG_H_ 39 | 40 | #include 41 | #include FT_CONFIG_OPTIONS_H 42 | #include FT_CONFIG_STANDARD_LIBRARY_H 43 | 44 | #include 45 | #include 46 | #include 47 | 48 | #endif /* FTCONFIG_H_ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/`) based on information 6 | * from `/modules.cfg`. 7 | * 8 | * Please read `docs/INSTALL.ANY` and `docs/CUSTOMIZE` how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 23 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 25 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class ) 30 | FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class ) 31 | FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class ) 32 | 33 | /* EOF */ 34 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/config/mac-support.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * config/mac-support.h 4 | * 5 | * Mac/OS X support configuration header. 6 | * 7 | * Copyright (C) 1996-2023 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | #ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_ 18 | #define FREETYPE_CONFIG_MAC_SUPPORT_H_ 19 | 20 | /************************************************************************** 21 | * 22 | * Mac support 23 | * 24 | * This is the only necessary change, so it is defined here instead 25 | * providing a new configuration file. 26 | */ 27 | #if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) 28 | /* No Carbon frameworks for 64bit 10.4.x. */ 29 | /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ 30 | /* so guess the system version by maximum errno before inclusion. */ 31 | #include 32 | #ifdef ECANCELED /* defined since 10.2 */ 33 | #include "AvailabilityMacros.h" 34 | #endif 35 | #if defined( __LP64__ ) && \ 36 | ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) 37 | #undef FT_MACINTOSH 38 | #endif 39 | 40 | #elif defined( __SC__ ) || defined( __MRC__ ) 41 | /* Classic MacOS compilers */ 42 | #include "ConditionalMacros.h" 43 | #if TARGET_OS_MAC 44 | #define FT_MACINTOSH 1 45 | #endif 46 | 47 | #endif /* Mac support */ 48 | 49 | #endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */ 50 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/ftpsprop.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ftpsprop.h 4 | * 5 | * Get and set properties of PostScript drivers (specification). 6 | * 7 | * Copyright (C) 2017-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef FTPSPROP_H_ 20 | #define FTPSPROP_H_ 21 | 22 | 23 | #include 24 | #include FT_FREETYPE_H 25 | 26 | 27 | FT_BEGIN_HEADER 28 | 29 | 30 | FT_BASE_CALLBACK( FT_Error ) 31 | ps_property_set( FT_Module module, /* PS_Driver */ 32 | const char* property_name, 33 | const void* value, 34 | FT_Bool value_is_string ); 35 | 36 | FT_BASE_CALLBACK( FT_Error ) 37 | ps_property_get( FT_Module module, /* PS_Driver */ 38 | const char* property_name, 39 | void* value ); 40 | 41 | 42 | FT_END_HEADER 43 | 44 | 45 | #endif /* FTPSPROP_H_ */ 46 | 47 | 48 | /* END */ 49 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svfntfmt.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svfntfmt.h 4 | * 5 | * The FreeType font format service (specification only). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVFNTFMT_H_ 20 | #define SVFNTFMT_H_ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data is a 31 | * simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_FONT_FORMAT "font-format" 35 | 36 | #define FT_FONT_FORMAT_TRUETYPE "TrueType" 37 | #define FT_FONT_FORMAT_TYPE_1 "Type 1" 38 | #define FT_FONT_FORMAT_BDF "BDF" 39 | #define FT_FONT_FORMAT_PCF "PCF" 40 | #define FT_FONT_FORMAT_TYPE_42 "Type 42" 41 | #define FT_FONT_FORMAT_CID "CID Type 1" 42 | #define FT_FONT_FORMAT_CFF "CFF" 43 | #define FT_FONT_FORMAT_PFR "PFR" 44 | #define FT_FONT_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* SVFNTFMT_H_ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svkern.h 4 | * 5 | * The FreeType Kerning service (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVKERN_H_ 20 | #define SVKERN_H_ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* SVKERN_H_ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svotval.h 4 | * 5 | * The FreeType OpenType validation service (specification). 6 | * 7 | * Copyright (C) 2004-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVOTVAL_H_ 20 | #define SVOTVAL_H_ 21 | 22 | #include FT_OPENTYPE_VALIDATE_H 23 | #include FT_INTERNAL_VALIDATE_H 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* SVOTVAL_H_ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svpfr.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svpfr.h 4 | * 5 | * Internal PFR service functions (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVPFR_H_ 20 | #define SVPFR_H_ 21 | 22 | #include FT_PFR_H 23 | #include FT_INTERNAL_SERVICE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_PFR_METRICS "pfr-metrics" 30 | 31 | 32 | typedef FT_Error 33 | (*FT_PFR_GetMetricsFunc)( FT_Face face, 34 | FT_UInt *aoutline, 35 | FT_UInt *ametrics, 36 | FT_Fixed *ax_scale, 37 | FT_Fixed *ay_scale ); 38 | 39 | typedef FT_Error 40 | (*FT_PFR_GetKerningFunc)( FT_Face face, 41 | FT_UInt left, 42 | FT_UInt right, 43 | FT_Vector *avector ); 44 | 45 | typedef FT_Error 46 | (*FT_PFR_GetAdvanceFunc)( FT_Face face, 47 | FT_UInt gindex, 48 | FT_Pos *aadvance ); 49 | 50 | 51 | FT_DEFINE_SERVICE( PfrMetrics ) 52 | { 53 | FT_PFR_GetMetricsFunc get_metrics; 54 | FT_PFR_GetKerningFunc get_kerning; 55 | FT_PFR_GetAdvanceFunc get_advance; 56 | 57 | }; 58 | 59 | /* */ 60 | 61 | FT_END_HEADER 62 | 63 | #endif /* SVPFR_H_ */ 64 | 65 | 66 | /* END */ 67 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svpostnm.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svpostnm.h 4 | * 5 | * The FreeType PostScript name services (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVPOSTNM_H_ 20 | #define SVPOSTNM_H_ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | /* 28 | * A trivial service used to retrieve the PostScript name of a given font 29 | * when available. The `get_name' field should never be `NULL`. 30 | * 31 | * The corresponding function can return `NULL` to indicate that the 32 | * PostScript name is not available. 33 | * 34 | * The name is owned by the face and will be destroyed with it. 35 | */ 36 | 37 | #define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name" 38 | 39 | 40 | typedef const char* 41 | (*FT_PsName_GetFunc)( FT_Face face ); 42 | 43 | 44 | FT_DEFINE_SERVICE( PsFontName ) 45 | { 46 | FT_PsName_GetFunc get_ps_font_name; 47 | }; 48 | 49 | 50 | #define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ 51 | static const FT_Service_PsFontNameRec class_ = \ 52 | { \ 53 | get_ps_font_name_ \ 54 | }; 55 | 56 | /* */ 57 | 58 | 59 | FT_END_HEADER 60 | 61 | 62 | #endif /* SVPOSTNM_H_ */ 63 | 64 | 65 | /* END */ 66 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svtteng.h 4 | * 5 | * The FreeType TrueType engine query service (specification). 6 | * 7 | * Copyright (C) 2006-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVTTENG_H_ 20 | #define SVTTENG_H_ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_MODULE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* SVTTENG_H_ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svttglyf.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svttglyf.h 4 | * 5 | * The FreeType TrueType glyph service. 6 | * 7 | * Copyright (C) 2007-2020 by 8 | * David Turner. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | #ifndef SVTTGLYF_H_ 19 | #define SVTTGLYF_H_ 20 | 21 | #include FT_INTERNAL_SERVICE_H 22 | #include FT_TRUETYPE_TABLES_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_TT_GLYF "tt-glyf" 29 | 30 | 31 | typedef FT_ULong 32 | (*TT_Glyf_GetLocationFunc)( FT_Face face, 33 | FT_UInt gindex, 34 | FT_ULong *psize ); 35 | 36 | FT_DEFINE_SERVICE( TTGlyf ) 37 | { 38 | TT_Glyf_GetLocationFunc get_location; 39 | }; 40 | 41 | 42 | #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ 43 | static const FT_Service_TTGlyfRec class_ = \ 44 | { \ 45 | get_location_ \ 46 | }; 47 | 48 | /* */ 49 | 50 | 51 | FT_END_HEADER 52 | 53 | #endif /* SVTTGLYF_H_ */ 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /vendor/freetype2/include/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * svwinfnt.h 4 | * 5 | * The FreeType Windows FNT/FONT service (specification). 6 | * 7 | * Copyright (C) 2003-2020 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | #ifndef SVWINFNT_H_ 20 | #define SVWINFNT_H_ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* SVWINFNT_H_ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /vendor/freetype2/include/ft2build.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * 3 | * ft2build.h 4 | * 5 | * FreeType 2 build and setup macros. 6 | * 7 | * Copyright (C) 1996-2023 by 8 | * David Turner, Robert Wilhelm, and Werner Lemberg. 9 | * 10 | * This file is part of the FreeType project, and may only be used, 11 | * modified, and distributed under the terms of the FreeType project 12 | * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 | * this file you indicate that you have read the license and 14 | * understand and accept it fully. 15 | * 16 | */ 17 | 18 | 19 | /************************************************************************** 20 | * 21 | * This is the 'entry point' for FreeType header file inclusions, to be 22 | * loaded before all other header files. 23 | * 24 | * A typical example is 25 | * 26 | * ``` 27 | * #include 28 | * #include 29 | * ``` 30 | * 31 | */ 32 | 33 | 34 | #ifndef FT2BUILD_H_ 35 | #define FT2BUILD_H_ 36 | 37 | #include 38 | 39 | #endif /* FT2BUILD_H_ */ 40 | 41 | 42 | /* END */ 43 | -------------------------------------------------------------------------------- /vendor/freetype2/lib/win64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/freetype2/lib/win64/freetype.lib -------------------------------------------------------------------------------- /vendor/glew/bin/win64/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/glew/bin/win64/glew32.dll -------------------------------------------------------------------------------- /vendor/glew/lib/win64/glew32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/glew/lib/win64/glew32.lib -------------------------------------------------------------------------------- /vendor/lua/LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/lua/LICENSE.txt -------------------------------------------------------------------------------- /vendor/lua/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.4.6, released on 02 May 2023. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /vendor/lua/include/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /vendor/lua/include/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* version suffix for environment variable names */ 15 | #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR 16 | 17 | 18 | LUAMOD_API int (luaopen_base) (lua_State *L); 19 | 20 | #define LUA_COLIBNAME "coroutine" 21 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 22 | 23 | #define LUA_TABLIBNAME "table" 24 | LUAMOD_API int (luaopen_table) (lua_State *L); 25 | 26 | #define LUA_IOLIBNAME "io" 27 | LUAMOD_API int (luaopen_io) (lua_State *L); 28 | 29 | #define LUA_OSLIBNAME "os" 30 | LUAMOD_API int (luaopen_os) (lua_State *L); 31 | 32 | #define LUA_STRLIBNAME "string" 33 | LUAMOD_API int (luaopen_string) (lua_State *L); 34 | 35 | #define LUA_UTF8LIBNAME "utf8" 36 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 37 | 38 | #define LUA_MATHLIBNAME "math" 39 | LUAMOD_API int (luaopen_math) (lua_State *L); 40 | 41 | #define LUA_DBLIBNAME "debug" 42 | LUAMOD_API int (luaopen_debug) (lua_State *L); 43 | 44 | #define LUA_LOADLIBNAME "package" 45 | LUAMOD_API int (luaopen_package) (lua_State *L); 46 | 47 | 48 | /* open all previous libraries */ 49 | LUALIB_API void (luaL_openlibs) (lua_State *L); 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /vendor/lua/lib/x64/lua_static.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/lua/lib/x64/lua_static.lib -------------------------------------------------------------------------------- /vendor/lua/lib/x64/lua_static_d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/lua/lib/x64/lua_static_d.lib -------------------------------------------------------------------------------- /vendor/zlib/lib/win64/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SDraw/roc_engine/f46e2c775335623d2c6500a014b5389e8539962a/vendor/zlib/lib/win64/zlib.lib --------------------------------------------------------------------------------