├── .clang-format ├── .gitignore ├── AUTHORS ├── CHANGELOG ├── CMakeLists.txt ├── CONTRIBUTING ├── COPYING ├── INSTALL ├── InstallLinux.cmake ├── InstallWindows.cmake ├── Jenkinsfile ├── README.md ├── data ├── editorModels.conf ├── fonts │ ├── DejaVuSans-Bold.ttf │ └── LICENCE.txt ├── icons │ ├── DustRacing.ico │ ├── DustRacingEditor.ico │ ├── WindowsEditor.rc │ ├── WindowsGame.rc │ ├── dustrac-256x256.png │ ├── dustrac-editor.png │ ├── dustrac-game.png │ └── icons.qrc ├── images │ ├── about.png │ ├── asphalt.png │ ├── brake.png │ ├── bridgeEditor.png │ ├── bridgePreview.png │ ├── bushArea.png │ ├── carBlack.png │ ├── carBlue.png │ ├── carBrown.png │ ├── carCyan.png │ ├── carDarkGreen.png │ ├── carDarkRed.png │ ├── carGreen.png │ ├── carGrey.png │ ├── carNormalMap.png │ ├── carOrange.png │ ├── carPink.png │ ├── carRed.png │ ├── carViolet.png │ ├── carYellow.png │ ├── checkeredFlag.png │ ├── clear.png │ ├── corner.png │ ├── corner45Left.png │ ├── corner45LeftPreview.png │ ├── corner45Right.png │ ├── corner45RightPreview.png │ ├── cornerPreview.png │ ├── crashOverlay.png │ ├── creditsHelpBack.png │ ├── cross.png │ ├── cursor.png │ ├── cursor2.png │ ├── dustRacing2DBanner.png │ ├── editor.qrc │ ├── finish.png │ ├── finishEditor.png │ ├── finishPreview.png │ ├── frontTire.png │ ├── grandstand.png │ ├── grandstandEditor.png │ ├── grass.png │ ├── grassEditor.png │ ├── grid.png │ ├── intro.png │ ├── leaf.png │ ├── left.png │ ├── lock.png │ ├── logo.png │ ├── mainMenuBack.png │ ├── mud.png │ ├── pit.png │ ├── plant.png │ ├── right.png │ ├── rock.png │ ├── sand.png │ ├── sandAreaBig.png │ ├── sandAreaCurve.png │ ├── sandEditor.png │ ├── sandGrassCorner.png │ ├── sandGrassCorner2.png │ ├── sandGrassCorner2Editor.png │ ├── sandGrassCornerEditor.png │ ├── sandGrassStraight.png │ ├── sandGrassStraightEditor.png │ ├── settingsBack.png │ ├── skid.png │ ├── sky.png │ ├── smoke.png │ ├── sparkle.png │ ├── star.png │ ├── starGlow.png │ ├── starHalf.png │ ├── starHalfGlow.png │ ├── starHalfR.png │ ├── startLightGlow.png │ ├── startLightOff.png │ ├── startLightOffCorner.png │ ├── startLightOn.png │ ├── startLightOnCorner.png │ ├── steel.jpg │ ├── straight.png │ ├── straight45Female.png │ ├── straight45FemalePreview.png │ ├── straight45Male.png │ ├── straight45MalePreview.png │ ├── straightPreview.png │ ├── tire.png │ ├── tireStatusIndicatorBody.png │ ├── tireStatusIndicatorTires.png │ ├── trackSelectionBack.png │ ├── tree.png │ └── wood.png ├── levels │ ├── Crossroads.trk │ ├── Desert Storm.trk │ ├── Diamond.trk │ ├── Far Lands.trk │ ├── Figure 8.trk │ ├── Radiator.trk │ ├── Twineburg.trk │ ├── Western Valley.trk │ ├── curvastone.trk │ ├── infinity.trk │ ├── monza.trk │ ├── ring.trk │ ├── straight.trk │ ├── suzuka.trk │ ├── triangle.trk │ └── twister.trk ├── meshes.conf ├── models │ ├── bridge.obj │ └── cube.obj ├── sounds │ ├── bell.ogg │ ├── carEngine.ogg │ ├── carHit.ogg │ ├── carHit2.ogg │ ├── carHit3.ogg │ ├── cheering.ogg │ ├── menuBoom.ogg │ ├── menuClick.ogg │ ├── pit.ogg │ └── skid.ogg └── surfaces.conf ├── packaging ├── README └── windows │ └── dustrac.nsi ├── scripts ├── apply-clang-format ├── build-windows-nsis ├── build-windows-nsis-packaging-helper ├── mxe-env ├── qt5-static-configure ├── update-license ├── update-ppa ├── update-translation-files └── update-version └── src ├── common ├── README ├── config.hpp ├── datakeywords.hpp ├── mapbase.cpp ├── mapbase.hpp ├── objectbase.cpp ├── objectbase.hpp ├── objects.cpp ├── objects.hpp ├── route.cpp ├── route.hpp ├── targetnodebase.cpp ├── targetnodebase.hpp ├── trackdatabase.cpp ├── trackdatabase.hpp ├── tracktilebase.cpp ├── tracktilebase.hpp └── userexception.hpp ├── contrib ├── Argengine │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── Jenkinsfile │ ├── LICENSE │ ├── README.md │ └── src │ │ ├── CMakeLists.txt │ │ ├── argengine.cpp │ │ ├── argengine.hpp │ │ ├── examples │ │ ├── CMakeLists.txt │ │ └── ex1 │ │ │ ├── CMakeLists.txt │ │ │ └── ex1.cpp │ │ └── tests │ │ ├── CMakeLists.txt │ │ ├── help_test │ │ ├── CMakeLists.txt │ │ └── help_test.cpp │ │ ├── positional_argument_test │ │ ├── CMakeLists.txt │ │ └── positional_argument_test.cpp │ │ ├── single_value_test │ │ ├── CMakeLists.txt │ │ └── single_value_test.cpp │ │ ├── unknown_argument_test │ │ ├── CMakeLists.txt │ │ └── unknown_argument_test.cpp │ │ └── valueless_test │ │ ├── CMakeLists.txt │ │ └── valueless_test.cpp └── SimpleLogger │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── Jenkinsfile │ ├── LICENSE │ ├── README.md │ └── src │ ├── CMakeLists.txt │ ├── simple_logger.cpp │ ├── simple_logger.hpp │ └── tests │ ├── CMakeLists.txt │ ├── file_test │ ├── CMakeLists.txt │ └── file_test.cpp │ └── stream_test │ ├── CMakeLists.txt │ └── stream_test.cpp ├── dustrac-editor.desktop.in ├── dustrac-editor.desktop.opt.in ├── dustrac-game.desktop.in ├── dustrac-game.desktop.opt.in ├── dustrac.appdata.xml ├── editor ├── CMakeLists.txt ├── aboutdlg.cpp ├── aboutdlg.hpp ├── application.cpp ├── application.hpp ├── draganddropstore.cpp ├── draganddropstore.hpp ├── editordata.cpp ├── editordata.hpp ├── editormode.hpp ├── editorview.cpp ├── editorview.hpp ├── floodfill.cpp ├── floodfill.hpp ├── main.cpp ├── mainwindow.cpp ├── mainwindow.hpp ├── map.cpp ├── map.hpp ├── mediator.cpp ├── mediator.hpp ├── newtrackdialog.cpp ├── newtrackdialog.hpp ├── object.cpp ├── object.hpp ├── objectfactory.cpp ├── objectfactory.hpp ├── objectmodel.hpp ├── objectmodelloader.cpp ├── objectmodelloader.hpp ├── rotatedialog.cpp ├── rotatedialog.hpp ├── targetnode.cpp ├── targetnode.hpp ├── targetnodesizedlg.cpp ├── targetnodesizedlg.hpp ├── tileanimator.cpp ├── tileanimator.hpp ├── trackdata.cpp ├── trackdata.hpp ├── trackio.cpp ├── trackio.hpp ├── trackpropertiesdialog.cpp ├── trackpropertiesdialog.hpp ├── tracktile.cpp ├── tracktile.hpp ├── translations │ ├── dustrac-editor_cs.ts │ ├── dustrac-editor_de.ts │ ├── dustrac-editor_fi.ts │ ├── dustrac-editor_fr.ts │ ├── dustrac-editor_it.ts │ ├── dustrac-editor_nl.ts │ └── dustrac-editor_tr.ts ├── undostack.cpp └── undostack.hpp ├── game ├── CMakeLists.txt ├── MTFH │ ├── CMakeLists.txt │ ├── Menu │ ├── MenuItem │ ├── MenuItemAction │ ├── MenuItemView │ ├── MenuManager │ ├── README.md │ ├── animationcurve.cpp │ ├── animationcurve.hpp │ ├── menu.cpp │ ├── menu.hpp │ ├── menuitem.cpp │ ├── menuitem.hpp │ ├── menuitemaction.cpp │ ├── menuitemaction.hpp │ ├── menuitemview.cpp │ ├── menuitemview.hpp │ ├── menumanager.cpp │ └── menumanager.hpp ├── MiniCore │ ├── .gitignore │ ├── CMakeLists.txt │ ├── configure │ └── src │ │ ├── Asset │ │ ├── MCAssetManager │ │ ├── MCMeshManager │ │ ├── MCMeshObjectData │ │ ├── MCSurfaceManager │ │ ├── MCSurfaceMetaData │ │ ├── mcassetmanager.cc │ │ ├── mcassetmanager.hh │ │ ├── mcmeshconfigloader.cc │ │ ├── mcmeshconfigloader.hh │ │ ├── mcmeshloader.cc │ │ ├── mcmeshloader.hh │ │ ├── mcmeshmanager.cc │ │ ├── mcmeshmanager.hh │ │ ├── mcmeshmetadata.hh │ │ ├── mcmeshobjectdata.cc │ │ ├── mcmeshobjectdata.hh │ │ ├── mcsurfaceconfigloader.cc │ │ ├── mcsurfaceconfigloader.hh │ │ ├── mcsurfacemanager.cc │ │ ├── mcsurfacemanager.hh │ │ ├── mcsurfacemetadata.hh │ │ ├── mcsurfaceobjectdata.cc │ │ └── mcsurfaceobjectdata.hh │ │ ├── CMakeLists.txt │ │ ├── Core │ │ ├── MCBBox │ │ ├── MCBBox3d │ │ ├── MCEvent │ │ ├── MCLogger │ │ ├── MCMacros │ │ ├── MCMathUtil │ │ ├── MCOBBox │ │ ├── MCObject │ │ ├── MCObjectFactory │ │ ├── MCRandom │ │ ├── MCRecycler │ │ ├── MCShapeView │ │ ├── MCTimerEvent │ │ ├── MCTrigonom │ │ ├── MCVector2d │ │ ├── MCVector3d │ │ ├── MCVectorAnimation │ │ ├── MCWorld │ │ ├── mcbbox.hh │ │ ├── mcbbox3d.hh │ │ ├── mccast.hh │ │ ├── mcevent.cc │ │ ├── mcevent.hh │ │ ├── mclogger.cc │ │ ├── mclogger.hh │ │ ├── mcmacros.hh │ │ ├── mcmathutil.cc │ │ ├── mcmathutil.hh │ │ ├── mcobbox.hh │ │ ├── mcobject.cc │ │ ├── mcobject.hh │ │ ├── mcobjectcomponent.cc │ │ ├── mcobjectcomponent.hh │ │ ├── mcobjectdata.cc │ │ ├── mcobjectdata.hh │ │ ├── mcobjectfactory.cc │ │ ├── mcobjectfactory.hh │ │ ├── mcrandom.cc │ │ ├── mcrandom.hh │ │ ├── mcrecycler.hh │ │ ├── mctimerevent.cc │ │ ├── mctimerevent.hh │ │ ├── mctrigonom.cc │ │ ├── mctrigonom.hh │ │ ├── mctyperegistry.cc │ │ ├── mctyperegistry.hh │ │ ├── mcvector2d.hh │ │ ├── mcvector3d.hh │ │ ├── mcvectoranimation.cc │ │ ├── mcvectoranimation.hh │ │ ├── mcworld.cc │ │ └── mcworld.hh │ │ ├── Graphics │ │ ├── MCCamera │ │ ├── MCGLAmbientLight │ │ ├── MCGLColor │ │ ├── MCGLDiffuseLight │ │ ├── MCGLEW │ │ ├── MCGLM │ │ ├── MCGLMaterial │ │ ├── MCGLScene │ │ ├── MCGLShaderProgram │ │ ├── MCGLVertex │ │ ├── MCMesh │ │ ├── MCMeshView │ │ ├── MCParticle │ │ ├── MCParticleRendererBase │ │ ├── MCRenderGroup │ │ ├── MCSurface │ │ ├── MCSurfaceParticle │ │ ├── MCSurfaceParticleRenderer │ │ ├── MCSurfaceParticleRendererLegacy │ │ ├── MCSurfaceView │ │ ├── MCWorldRenderer │ │ ├── contrib │ │ │ ├── glew │ │ │ │ ├── glew.c │ │ │ │ ├── glew.h │ │ │ │ ├── glxew.h │ │ │ │ └── wglew.h │ │ │ └── glm │ │ │ │ └── ogl-math │ │ │ │ └── glm │ │ │ │ ├── core │ │ │ │ ├── _detail.hpp │ │ │ │ ├── _fixes.hpp │ │ │ │ ├── _swizzle.hpp │ │ │ │ ├── _swizzle_func.hpp │ │ │ │ ├── _vectorize.hpp │ │ │ │ ├── dummy.cpp │ │ │ │ ├── func_common.hpp │ │ │ │ ├── func_common.inl │ │ │ │ ├── func_exponential.hpp │ │ │ │ ├── func_exponential.inl │ │ │ │ ├── func_geometric.hpp │ │ │ │ ├── func_geometric.inl │ │ │ │ ├── func_integer.hpp │ │ │ │ ├── func_integer.inl │ │ │ │ ├── func_matrix.hpp │ │ │ │ ├── func_matrix.inl │ │ │ │ ├── func_noise.hpp │ │ │ │ ├── func_noise.inl │ │ │ │ ├── func_packing.hpp │ │ │ │ ├── func_packing.inl │ │ │ │ ├── func_trigonometric.hpp │ │ │ │ ├── func_trigonometric.inl │ │ │ │ ├── func_vector_relational.hpp │ │ │ │ ├── func_vector_relational.inl │ │ │ │ ├── hint.hpp │ │ │ │ ├── intrinsic_common.hpp │ │ │ │ ├── intrinsic_common.inl │ │ │ │ ├── intrinsic_exponential.hpp │ │ │ │ ├── intrinsic_exponential.inl │ │ │ │ ├── intrinsic_geometric.hpp │ │ │ │ ├── intrinsic_geometric.inl │ │ │ │ ├── intrinsic_matrix.hpp │ │ │ │ ├── intrinsic_matrix.inl │ │ │ │ ├── intrinsic_trigonometric.hpp │ │ │ │ ├── intrinsic_trigonometric.inl │ │ │ │ ├── intrinsic_vector_relational.hpp │ │ │ │ ├── intrinsic_vector_relational.inl │ │ │ │ ├── setup.hpp │ │ │ │ ├── type.hpp │ │ │ │ ├── type_float.hpp │ │ │ │ ├── type_gentype.hpp │ │ │ │ ├── type_gentype.inl │ │ │ │ ├── type_half.hpp │ │ │ │ ├── type_half.inl │ │ │ │ ├── type_int.hpp │ │ │ │ ├── type_mat.hpp │ │ │ │ ├── type_mat.inl │ │ │ │ ├── type_mat2x2.hpp │ │ │ │ ├── type_mat2x2.inl │ │ │ │ ├── type_mat2x3.hpp │ │ │ │ ├── type_mat2x3.inl │ │ │ │ ├── type_mat2x4.hpp │ │ │ │ ├── type_mat2x4.inl │ │ │ │ ├── type_mat3x2.hpp │ │ │ │ ├── type_mat3x2.inl │ │ │ │ ├── type_mat3x3.hpp │ │ │ │ ├── type_mat3x3.inl │ │ │ │ ├── type_mat3x4.hpp │ │ │ │ ├── type_mat3x4.inl │ │ │ │ ├── type_mat4x2.hpp │ │ │ │ ├── type_mat4x2.inl │ │ │ │ ├── type_mat4x3.hpp │ │ │ │ ├── type_mat4x3.inl │ │ │ │ ├── type_mat4x4.hpp │ │ │ │ ├── type_mat4x4.inl │ │ │ │ ├── type_size.hpp │ │ │ │ ├── type_vec.hpp │ │ │ │ ├── type_vec.inl │ │ │ │ ├── type_vec1.hpp │ │ │ │ ├── type_vec1.inl │ │ │ │ ├── type_vec2.hpp │ │ │ │ ├── type_vec2.inl │ │ │ │ ├── type_vec3.hpp │ │ │ │ ├── type_vec3.inl │ │ │ │ ├── type_vec4.hpp │ │ │ │ └── type_vec4.inl │ │ │ │ ├── ext.hpp │ │ │ │ ├── glm.hpp │ │ │ │ ├── gtc │ │ │ │ ├── half_float.hpp │ │ │ │ ├── half_float.inl │ │ │ │ ├── matrix_access.hpp │ │ │ │ ├── matrix_access.inl │ │ │ │ ├── matrix_integer.hpp │ │ │ │ ├── matrix_inverse.hpp │ │ │ │ ├── matrix_inverse.inl │ │ │ │ ├── matrix_transform.hpp │ │ │ │ ├── matrix_transform.inl │ │ │ │ ├── noise.hpp │ │ │ │ ├── noise.inl │ │ │ │ ├── quaternion.hpp │ │ │ │ ├── quaternion.inl │ │ │ │ ├── random.hpp │ │ │ │ ├── random.inl │ │ │ │ ├── swizzle.hpp │ │ │ │ ├── swizzle.inl │ │ │ │ ├── type_precision.hpp │ │ │ │ ├── type_precision.inl │ │ │ │ ├── type_ptr.hpp │ │ │ │ └── type_ptr.inl │ │ │ │ ├── gtx │ │ │ │ ├── associated_min_max.hpp │ │ │ │ ├── associated_min_max.inl │ │ │ │ ├── bit.hpp │ │ │ │ ├── bit.inl │ │ │ │ ├── closest_point.hpp │ │ │ │ ├── closest_point.inl │ │ │ │ ├── color_cast.hpp │ │ │ │ ├── color_cast.inl │ │ │ │ ├── color_space.hpp │ │ │ │ ├── color_space.inl │ │ │ │ ├── color_space_YCoCg.hpp │ │ │ │ ├── color_space_YCoCg.inl │ │ │ │ ├── compatibility.hpp │ │ │ │ ├── compatibility.inl │ │ │ │ ├── component_wise.hpp │ │ │ │ ├── component_wise.inl │ │ │ │ ├── constants.hpp │ │ │ │ ├── constants.inl │ │ │ │ ├── epsilon.hpp │ │ │ │ ├── epsilon.inl │ │ │ │ ├── euler_angles.hpp │ │ │ │ ├── euler_angles.inl │ │ │ │ ├── extend.hpp │ │ │ │ ├── extend.inl │ │ │ │ ├── extented_min_max.hpp │ │ │ │ ├── extented_min_max.inl │ │ │ │ ├── fast_exponential.hpp │ │ │ │ ├── fast_exponential.inl │ │ │ │ ├── fast_square_root.hpp │ │ │ │ ├── fast_square_root.inl │ │ │ │ ├── fast_trigonometry.hpp │ │ │ │ ├── fast_trigonometry.inl │ │ │ │ ├── gradient_paint.hpp │ │ │ │ ├── gradient_paint.inl │ │ │ │ ├── handed_coordinate_space.hpp │ │ │ │ ├── handed_coordinate_space.inl │ │ │ │ ├── inertia.hpp │ │ │ │ ├── inertia.inl │ │ │ │ ├── int_10_10_10_2.hpp │ │ │ │ ├── int_10_10_10_2.inl │ │ │ │ ├── integer.hpp │ │ │ │ ├── integer.inl │ │ │ │ ├── intersect.hpp │ │ │ │ ├── intersect.inl │ │ │ │ ├── log_base.hpp │ │ │ │ ├── log_base.inl │ │ │ │ ├── matrix_cross_product.hpp │ │ │ │ ├── matrix_cross_product.inl │ │ │ │ ├── matrix_interpolation.hpp │ │ │ │ ├── matrix_interpolation.inl │ │ │ │ ├── matrix_major_storage.hpp │ │ │ │ ├── matrix_major_storage.inl │ │ │ │ ├── matrix_operation.hpp │ │ │ │ ├── matrix_operation.inl │ │ │ │ ├── matrix_query.hpp │ │ │ │ ├── matrix_query.inl │ │ │ │ ├── mixed_product.hpp │ │ │ │ ├── mixed_product.inl │ │ │ │ ├── multiple.hpp │ │ │ │ ├── multiple.inl │ │ │ │ ├── noise.hpp │ │ │ │ ├── noise.inl │ │ │ │ ├── norm.hpp │ │ │ │ ├── norm.inl │ │ │ │ ├── normal.hpp │ │ │ │ ├── normal.inl │ │ │ │ ├── normalize_dot.hpp │ │ │ │ ├── normalize_dot.inl │ │ │ │ ├── number_precision.hpp │ │ │ │ ├── number_precision.inl │ │ │ │ ├── ocl_type.hpp │ │ │ │ ├── ocl_type.inl │ │ │ │ ├── optimum_pow.hpp │ │ │ │ ├── optimum_pow.inl │ │ │ │ ├── orthonormalize.hpp │ │ │ │ ├── orthonormalize.inl │ │ │ │ ├── perpendicular.hpp │ │ │ │ ├── perpendicular.inl │ │ │ │ ├── polar_coordinates.hpp │ │ │ │ ├── polar_coordinates.inl │ │ │ │ ├── projection.hpp │ │ │ │ ├── projection.inl │ │ │ │ ├── quaternion.hpp │ │ │ │ ├── quaternion.inl │ │ │ │ ├── random.hpp │ │ │ │ ├── random.inl │ │ │ │ ├── raw_data.hpp │ │ │ │ ├── raw_data.inl │ │ │ │ ├── reciprocal.hpp │ │ │ │ ├── reciprocal.inl │ │ │ │ ├── rotate_vector.hpp │ │ │ │ ├── rotate_vector.inl │ │ │ │ ├── simd_mat4.hpp │ │ │ │ ├── simd_mat4.inl │ │ │ │ ├── simd_vec4.hpp │ │ │ │ ├── simd_vec4.inl │ │ │ │ ├── spline.hpp │ │ │ │ ├── spline.inl │ │ │ │ ├── std_based_type.hpp │ │ │ │ ├── std_based_type.inl │ │ │ │ ├── string_cast.hpp │ │ │ │ ├── string_cast.inl │ │ │ │ ├── transform.hpp │ │ │ │ ├── transform.inl │ │ │ │ ├── transform2.hpp │ │ │ │ ├── transform2.inl │ │ │ │ ├── ulp.hpp │ │ │ │ ├── ulp.inl │ │ │ │ ├── unsigned_int.hpp │ │ │ │ ├── unsigned_int.inl │ │ │ │ ├── vec1.hpp │ │ │ │ ├── vec1.inl │ │ │ │ ├── vector_access.hpp │ │ │ │ ├── vector_access.inl │ │ │ │ ├── vector_angle.hpp │ │ │ │ ├── vector_angle.inl │ │ │ │ ├── vector_query.hpp │ │ │ │ ├── vector_query.inl │ │ │ │ ├── verbose_operator.hpp │ │ │ │ ├── verbose_operator.inl │ │ │ │ ├── wrap.hpp │ │ │ │ └── wrap.inl │ │ │ │ └── virtrev │ │ │ │ └── xstream.hpp │ │ ├── mccamera.cc │ │ ├── mccamera.hh │ │ ├── mcglambientlight.cc │ │ ├── mcglambientlight.hh │ │ ├── mcglcolor.hh │ │ ├── mcgldiffuselight.cc │ │ ├── mcgldiffuselight.hh │ │ ├── mcglmaterial.cc │ │ ├── mcglmaterial.hh │ │ ├── mcglobjectbase.cc │ │ ├── mcglobjectbase.hh │ │ ├── mcglscene.cc │ │ ├── mcglscene.hh │ │ ├── mcglshaderprogram.cc │ │ ├── mcglshaderprogram.hh │ │ ├── mcgltexcoord.hh │ │ ├── mcglvertex.hh │ │ ├── mcmesh.cc │ │ ├── mcmesh.hh │ │ ├── mcmeshview.cc │ │ ├── mcmeshview.hh │ │ ├── mcobjectrendererbase.cc │ │ ├── mcobjectrendererbase.hh │ │ ├── mcparticle.cc │ │ ├── mcparticle.hh │ │ ├── mcparticlerendererbase.cc │ │ ├── mcparticlerendererbase.hh │ │ ├── mcrendergroup.hh │ │ ├── mcrenderlayer.cc │ │ ├── mcrenderlayer.hh │ │ ├── mcshaders.hh │ │ ├── mcshaders30.hh │ │ ├── mcshadersGLES.hh │ │ ├── mcshapeview.cc │ │ ├── mcshapeview.hh │ │ ├── mcsurface.cc │ │ ├── mcsurface.hh │ │ ├── mcsurfaceobjectrenderer.cc │ │ ├── mcsurfaceobjectrenderer.hh │ │ ├── mcsurfaceobjectrendererlegacy.cc │ │ ├── mcsurfaceobjectrendererlegacy.hh │ │ ├── mcsurfaceparticle.cc │ │ ├── mcsurfaceparticle.hh │ │ ├── mcsurfaceparticlerenderer.cc │ │ ├── mcsurfaceparticlerenderer.hh │ │ ├── mcsurfaceparticlerendererlegacy.cc │ │ ├── mcsurfaceparticlerendererlegacy.hh │ │ ├── mcsurfaceview.cc │ │ ├── mcsurfaceview.hh │ │ ├── mcworldrenderer.cc │ │ └── mcworldrenderer.hh │ │ ├── Physics │ │ ├── MCCircleShape │ │ ├── MCCollisionEvent │ │ ├── MCContact │ │ ├── MCDragForceGenerator │ │ ├── MCEdge │ │ ├── MCForceGenerator │ │ ├── MCForceRegistry │ │ ├── MCFrictionGenerator │ │ ├── MCGravityGenerator │ │ ├── MCObjectGrid │ │ ├── MCOutOfBoundariesEvent │ │ ├── MCPhysicsComponent │ │ ├── MCRectShape │ │ ├── MCSegment │ │ ├── MCSeparationEvent │ │ ├── MCShape │ │ ├── MCSpringForceGenerator │ │ ├── MCSpringForceGenerator2dFast │ │ ├── mccircleshape.cc │ │ ├── mccircleshape.hh │ │ ├── mccollisiondetector.cc │ │ ├── mccollisiondetector.hh │ │ ├── mccollisionevent.cc │ │ ├── mccollisionevent.hh │ │ ├── mccontact.cc │ │ ├── mccontact.hh │ │ ├── mcdragforcegenerator.cc │ │ ├── mcdragforcegenerator.hh │ │ ├── mcedge.hh │ │ ├── mcforcegenerator.cc │ │ ├── mcforcegenerator.hh │ │ ├── mcforceregistry.cc │ │ ├── mcforceregistry.hh │ │ ├── mcfrictiongenerator.cc │ │ ├── mcfrictiongenerator.hh │ │ ├── mcgravitygenerator.cc │ │ ├── mcgravitygenerator.hh │ │ ├── mcimpulsegenerator.cc │ │ ├── mcimpulsegenerator.hh │ │ ├── mcobjectgrid.cc │ │ ├── mcobjectgrid.hh │ │ ├── mcoutofboundariesevent.cc │ │ ├── mcoutofboundariesevent.hh │ │ ├── mcphysicscomponent.cc │ │ ├── mcphysicscomponent.hh │ │ ├── mcrectshape.cc │ │ ├── mcrectshape.hh │ │ ├── mcsegment.hh │ │ ├── mcseparationevent.cc │ │ ├── mcseparationevent.hh │ │ ├── mcshape.cc │ │ ├── mcshape.hh │ │ ├── mcspringforcegenerator.cc │ │ ├── mcspringforcegenerator.hh │ │ ├── mcspringforcegenerator2dfast.cc │ │ └── mcspringforcegenerator2dfast.hh │ │ ├── Text │ │ ├── MCTextureFont │ │ ├── MCTextureFontConfigLoader │ │ ├── MCTextureFontData │ │ ├── MCTextureFontManager │ │ ├── MCTextureGlyph │ │ ├── MCTextureText │ │ ├── mctexturefont.cc │ │ ├── mctexturefont.hh │ │ ├── mctexturefontconfigloader.cc │ │ ├── mctexturefontconfigloader.hh │ │ ├── mctexturefontdata.cc │ │ ├── mctexturefontdata.hh │ │ ├── mctexturefontmanager.cc │ │ ├── mctexturefontmanager.hh │ │ ├── mctextureglyph.cc │ │ ├── mctextureglyph.hh │ │ ├── mctexturetext.cc │ │ └── mctexturetext.hh │ │ └── UnitTests │ │ ├── CMakeLists.txt │ │ ├── MCForceRegistryTest │ │ ├── CMakeLists.txt │ │ ├── MCForceRegistryTest.cpp │ │ └── MCForceRegistryTest.hpp │ │ ├── MCMeshLoaderTest │ │ ├── CMakeLists.txt │ │ ├── MCMeshLoaderTest.cpp │ │ └── MCMeshLoaderTest.hpp │ │ ├── MCObjectTest │ │ ├── CMakeLists.txt │ │ ├── MCObjectTest.cpp │ │ └── MCObjectTest.hpp │ │ ├── MCWorldTest │ │ ├── CMakeLists.txt │ │ ├── MCWorldTest.cpp │ │ └── MCWorldTest.hpp │ │ └── README-UnitTests ├── STFH │ ├── CMakeLists.txt │ ├── Data │ ├── Device │ ├── Listener │ ├── Location │ ├── Source │ ├── data.cpp │ ├── data.hpp │ ├── device.cpp │ ├── device.hpp │ ├── listener.cpp │ ├── listener.hpp │ ├── location.cpp │ ├── location.hpp │ ├── source.cpp │ └── source.hpp ├── ai.cpp ├── ai.hpp ├── application.cpp ├── application.hpp ├── audio │ ├── audiosource.cpp │ ├── audiosource.hpp │ ├── audioworker.cpp │ ├── audioworker.hpp │ ├── openaldata.cpp │ ├── openaldata.hpp │ ├── openaldevice.cpp │ ├── openaldevice.hpp │ ├── openaloggdata.cpp │ ├── openaloggdata.hpp │ ├── openalsource.cpp │ ├── openalsource.hpp │ ├── openalwavdata.cpp │ └── openalwavdata.hpp ├── bridge.cpp ├── bridge.hpp ├── car.cpp ├── car.hpp ├── carfactory.cpp ├── carfactory.hpp ├── carparticleeffectmanager.cpp ├── carparticleeffectmanager.hpp ├── carphysicscomponent.cpp ├── carphysicscomponent.hpp ├── carsoundeffectmanager.cpp ├── carsoundeffectmanager.hpp ├── carstatusview.cpp ├── carstatusview.hpp ├── checkeredflag.cpp ├── checkeredflag.hpp ├── crashoverlay.cpp ├── crashoverlay.hpp ├── database.cpp ├── database.hpp ├── difficultyprofile.cpp ├── difficultyprofile.hpp ├── eventhandler.cpp ├── eventhandler.hpp ├── fadeanimation.cpp ├── fadeanimation.hpp ├── fontfactory.cpp ├── fontfactory.hpp ├── game.cpp ├── game.hpp ├── gearbox.cpp ├── gearbox.hpp ├── graphicsfactory.cpp ├── graphicsfactory.hpp ├── inputhandler.cpp ├── inputhandler.hpp ├── intro.cpp ├── intro.hpp ├── keycodes.hpp ├── layers.hpp ├── main.cpp ├── map.cpp ├── map.hpp ├── menu │ ├── confirmationmenu.cpp │ ├── confirmationmenu.hpp │ ├── credits.cpp │ ├── credits.hpp │ ├── difficultymenu.cpp │ ├── difficultymenu.hpp │ ├── help.cpp │ ├── help.hpp │ ├── keyconfigmenu.cpp │ ├── keyconfigmenu.hpp │ ├── lapcountmenu.cpp │ ├── lapcountmenu.hpp │ ├── mainmenu.cpp │ ├── mainmenu.hpp │ ├── resolutionmenu.cpp │ ├── resolutionmenu.hpp │ ├── settingsmenu.cpp │ ├── settingsmenu.hpp │ ├── surfacemenu.cpp │ ├── surfacemenu.hpp │ ├── textmenuitemview.cpp │ ├── textmenuitemview.hpp │ ├── trackselectionmenu.cpp │ ├── trackselectionmenu.hpp │ ├── vsyncmenu.cpp │ └── vsyncmenu.hpp ├── messageoverlay.cpp ├── messageoverlay.hpp ├── minimap.cpp ├── minimap.hpp ├── models │ ├── bridge.blend │ └── bridge.mtl ├── offtrackdetector.cpp ├── offtrackdetector.hpp ├── overlaybase.cpp ├── overlaybase.hpp ├── particlefactory.cpp ├── particlefactory.hpp ├── pit.cpp ├── pit.hpp ├── race.cpp ├── race.hpp ├── renderable.hpp ├── renderer.cpp ├── renderer.hpp ├── scene.cpp ├── scene.hpp ├── settings.cpp ├── settings.hpp ├── shaders.h ├── shaders30.h ├── sounds │ ├── 131385__musicmasta1__carstartskidcrash.wav │ ├── 144113__avakas__man-hit-by-car.wav │ ├── 146721__fins__menu-click.wav │ ├── 147242__qubodup__car-engine-loop.wav │ ├── 162850__beman87__cinema-boom-impact-1.wav │ ├── 175887__toiletrolltube__110906-03-metal.wav │ ├── 179725__wjoojoo__impact-drill.flac │ ├── 201203__jjhouse4__syracuse-dome-cheering.wav │ └── 66952__benboncan__boxing-bell-1.wav ├── startlights.cpp ├── startlights.hpp ├── startlightsoverlay.cpp ├── startlightsoverlay.hpp ├── statemachine.cpp ├── statemachine.hpp ├── timing.cpp ├── timing.hpp ├── timingoverlay.cpp ├── timingoverlay.hpp ├── tire.cpp ├── tire.hpp ├── track.cpp ├── track.hpp ├── trackdata.cpp ├── trackdata.hpp ├── trackloader.cpp ├── trackloader.hpp ├── trackobject.cpp ├── trackobject.hpp ├── trackobjectfactory.cpp ├── trackobjectfactory.hpp ├── tracktile.cpp ├── tracktile.hpp ├── translations │ ├── dustrac-game_cs.ts │ ├── dustrac-game_de.ts │ ├── dustrac-game_fi.ts │ ├── dustrac-game_fr.ts │ ├── dustrac-game_it.ts │ ├── dustrac-game_nl.ts │ └── dustrac-game_tr.ts ├── tree.cpp ├── tree.hpp ├── unittests │ ├── CMakeLists.txt │ └── gearboxtest │ │ ├── CMakeLists.txt │ │ ├── gearboxtest.cpp │ │ └── gearboxtest.hpp └── updateableif.hpp └── images ├── README ├── editor ├── about.svg ├── cursor.svg └── wrench.ico └── game ├── hud ├── startLightGlow.svg ├── startLightOff.svg ├── startLightOffCorner.svg ├── startLightOn.svg ├── startLightOnCorner.svg └── tireStatusIndicator.svg ├── menus ├── intro.svg ├── not.svg ├── settingsBack.svg ├── star.svg └── starGlow.svg ├── objects ├── brake.png ├── brake.svg ├── carBlack.svg ├── carBlue.svg ├── carBrown.svg ├── carCyan.svg ├── carDarkGreen.svg ├── carDarkRed.svg ├── carGreen.svg ├── carGrey.svg ├── carOrange.svg ├── carPink.svg ├── carRed.svg ├── carViolet.svg ├── carYellow.svg ├── dustRacing2DBanner.svg ├── frontTire.svg ├── grandstand.svg ├── grid.svg ├── leaf.svg ├── mud.svg ├── pit.svg ├── sandAreaBig.xcf ├── sandAreaCurve45.xcf ├── sky.svg ├── smoke.svg ├── sparkle.svg ├── tire.svg └── turn.svg └── tiles ├── bridge.svg ├── corner.svg ├── corner45Left.svg ├── finish.svg ├── sandGrassCorner.svg ├── sandGrassCorner2.svg ├── sandGrassStraight.svg ├── straight.svg ├── straight45Female.svg └── straight45Male.svg /.clang-format: -------------------------------------------------------------------------------- 1 | AccessModifierOffset: -4 2 | AlignAfterOpenBracket: true 3 | AllowShortFunctionsOnASingleLine: false 4 | AlwaysBreakTemplateDeclarations: true 5 | BasedOnStyle: WebKit 6 | BreakBeforeBinaryOperators: NonAssignment 7 | BreakBeforeBraces: Custom 8 | BreakConstructorInitializersBeforeComma: false 9 | BreakConstructorInitializers: BeforeComma 10 | BraceWrapping: 11 | AfterClass: true 12 | AfterControlStatement: true 13 | AfterEnum: true 14 | AfterFunction: true 15 | AfterNamespace: false 16 | AfterObjCDeclaration: false 17 | AfterStruct: true 18 | AfterUnion: false 19 | BeforeCatch: false 20 | BeforeElse: true 21 | IndentBraces: false 22 | ColumnLimit: 0 23 | CommentPragmas: "^!|^:" 24 | CompactNamespaces: false 25 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 26 | ConstructorInitializerIndentWidth: 2 27 | ContinuationIndentWidth: 2 28 | FixNamespaceComments: true 29 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ] 30 | IndentWidth: 4 31 | NamespaceIndentation: None 32 | PointerAlignment: Middle 33 | PointerBindsToType: false 34 | SortIncludes: true 35 | SpaceAfterTemplateKeyword: false 36 | Standard: Cpp11 37 | 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.cxx 3 | *.o 4 | *.a 5 | *moc_* 6 | *_automoc* 7 | *qrc_* 8 | *qm 9 | *.tar.gz 10 | *.zip 11 | *.exe 12 | *.json 13 | log.txt 14 | manifest* 15 | .excludes 16 | *__* 17 | Makefile 18 | bin/ 19 | build* 20 | dustrac.pro.user 21 | dustrac.pro.user.2.1pre1 22 | engine.txt 23 | header.txt 24 | src/contrib/ 25 | src/editor/Makefile 26 | src/editor/editor 27 | src/game/Makefile 28 | src/game/Makefile.Debug 29 | src/game/Makefile.Release 30 | src/game/MiniCore/Core/genincludeheaders.sh 31 | *.cbp 32 | dustrac-editor 33 | dustrac-game 34 | test/ 35 | unittests/ 36 | CMakeLists.txt.user 37 | CTestTestfile.cmake 38 | cmake_install.cmake 39 | src/editor/CTestTestfile.cmake 40 | src/editor/cmake_install.cmake 41 | src/game/CTestTestfile.cmake 42 | src/game/MiniCore/CTestTestfile.cmake 43 | src/game/MiniCore/UnitTests/CTestTestfile.cmake 44 | src/game/MiniCore/UnitTests/MCForceRegistryTest/CTestTestfile.cmake 45 | src/game/MiniCore/UnitTests/MCForceRegistryTest/cmake_install.cmake 46 | src/game/MiniCore/UnitTests/MCObjectTest/CTestTestfile.cmake 47 | src/game/MiniCore/UnitTests/MCObjectTest/cmake_install.cmake 48 | src/game/MiniCore/UnitTests/cmake_install.cmake 49 | src/game/MiniCore/cmake_install.cmake 50 | src/game/cmake_install.cmake 51 | src/game/renderer.cpp.autosave 52 | CPackConfig.cmake 53 | CPackSourceConfig.cmake 54 | data/translations/ 55 | dustrac-1.4.6.zip 56 | release/ 57 | src/game/dustrac-game_fi.qm 58 | src/game/dustrac-game_it.qm 59 | src/game/trackobjectfactory.cpp.orig 60 | *_plugin_import* 61 | *.Debug 62 | *.Release 63 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | People who have contributed to Dust Racing 2D 2 | ============================================= 3 | 4 | Programming: 5 | * Jussi Lind 6 | 7 | Graphics: 8 | * Jussi Lind 9 | * Ville Mäkiranta (original graphics) 10 | 11 | Level design: 12 | * Jussi Lind 13 | * Wuzzy 14 | 15 | Translations: 16 | * Pavel Fric (cs) 17 | * Wuzzy (de) 18 | * Paolo Straffi (it) 19 | * Jussi Lind (fi) 20 | * Rémi Verschelde (fr) 21 | 22 | Patches: 23 | * Paolo Straffi 24 | * Markus Rinne 25 | * Antti Kervinen 26 | * Rémi Verschelde 27 | * Pino Toscano 28 | * David Carlier 29 | * Dimitriy Marakasov 30 | * jarssoft 31 | 32 | Special Thanks: 33 | * Tommi Martela 34 | * Alex Rietveld 35 | * Matthias Mailänder 36 | 37 | -------------------------------------------------------------------------------- /data/fonts/DejaVuSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/fonts/DejaVuSans-Bold.ttf -------------------------------------------------------------------------------- /data/fonts/LICENCE.txt: -------------------------------------------------------------------------------- 1 | https://dejavu-fonts.github.io/License.html 2 | 3 | -------------------------------------------------------------------------------- /data/icons/DustRacing.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/icons/DustRacing.ico -------------------------------------------------------------------------------- /data/icons/DustRacingEditor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/icons/DustRacingEditor.ico -------------------------------------------------------------------------------- /data/icons/WindowsEditor.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "DustRacingEditor.ico" 2 | -------------------------------------------------------------------------------- /data/icons/WindowsGame.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "DustRacing.ico" 2 | -------------------------------------------------------------------------------- /data/icons/dustrac-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/icons/dustrac-256x256.png -------------------------------------------------------------------------------- /data/icons/dustrac-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/icons/dustrac-editor.png -------------------------------------------------------------------------------- /data/icons/dustrac-game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/icons/dustrac-game.png -------------------------------------------------------------------------------- /data/icons/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | dustrac-editor.png 4 | dustrac-game.png 5 | 6 | 7 | -------------------------------------------------------------------------------- /data/images/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/about.png -------------------------------------------------------------------------------- /data/images/asphalt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/asphalt.png -------------------------------------------------------------------------------- /data/images/brake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/brake.png -------------------------------------------------------------------------------- /data/images/bridgeEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/bridgeEditor.png -------------------------------------------------------------------------------- /data/images/bridgePreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/bridgePreview.png -------------------------------------------------------------------------------- /data/images/bushArea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/bushArea.png -------------------------------------------------------------------------------- /data/images/carBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carBlack.png -------------------------------------------------------------------------------- /data/images/carBlue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carBlue.png -------------------------------------------------------------------------------- /data/images/carBrown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carBrown.png -------------------------------------------------------------------------------- /data/images/carCyan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carCyan.png -------------------------------------------------------------------------------- /data/images/carDarkGreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carDarkGreen.png -------------------------------------------------------------------------------- /data/images/carDarkRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carDarkRed.png -------------------------------------------------------------------------------- /data/images/carGreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carGreen.png -------------------------------------------------------------------------------- /data/images/carGrey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carGrey.png -------------------------------------------------------------------------------- /data/images/carNormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carNormalMap.png -------------------------------------------------------------------------------- /data/images/carOrange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carOrange.png -------------------------------------------------------------------------------- /data/images/carPink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carPink.png -------------------------------------------------------------------------------- /data/images/carRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carRed.png -------------------------------------------------------------------------------- /data/images/carViolet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carViolet.png -------------------------------------------------------------------------------- /data/images/carYellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/carYellow.png -------------------------------------------------------------------------------- /data/images/checkeredFlag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/checkeredFlag.png -------------------------------------------------------------------------------- /data/images/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/clear.png -------------------------------------------------------------------------------- /data/images/corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/corner.png -------------------------------------------------------------------------------- /data/images/corner45Left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/corner45Left.png -------------------------------------------------------------------------------- /data/images/corner45LeftPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/corner45LeftPreview.png -------------------------------------------------------------------------------- /data/images/corner45Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/corner45Right.png -------------------------------------------------------------------------------- /data/images/corner45RightPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/corner45RightPreview.png -------------------------------------------------------------------------------- /data/images/cornerPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/cornerPreview.png -------------------------------------------------------------------------------- /data/images/crashOverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/crashOverlay.png -------------------------------------------------------------------------------- /data/images/creditsHelpBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/creditsHelpBack.png -------------------------------------------------------------------------------- /data/images/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/cross.png -------------------------------------------------------------------------------- /data/images/cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/cursor.png -------------------------------------------------------------------------------- /data/images/cursor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/cursor2.png -------------------------------------------------------------------------------- /data/images/dustRacing2DBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/dustRacing2DBanner.png -------------------------------------------------------------------------------- /data/images/editor.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | cursor.png 4 | cursor2.png 5 | clear.png 6 | about.png 7 | cross.png 8 | 9 | 10 | -------------------------------------------------------------------------------- /data/images/finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/finish.png -------------------------------------------------------------------------------- /data/images/finishEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/finishEditor.png -------------------------------------------------------------------------------- /data/images/finishPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/finishPreview.png -------------------------------------------------------------------------------- /data/images/frontTire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/frontTire.png -------------------------------------------------------------------------------- /data/images/grandstand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/grandstand.png -------------------------------------------------------------------------------- /data/images/grandstandEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/grandstandEditor.png -------------------------------------------------------------------------------- /data/images/grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/grass.png -------------------------------------------------------------------------------- /data/images/grassEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/grassEditor.png -------------------------------------------------------------------------------- /data/images/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/grid.png -------------------------------------------------------------------------------- /data/images/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/intro.png -------------------------------------------------------------------------------- /data/images/leaf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/leaf.png -------------------------------------------------------------------------------- /data/images/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/left.png -------------------------------------------------------------------------------- /data/images/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/lock.png -------------------------------------------------------------------------------- /data/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/logo.png -------------------------------------------------------------------------------- /data/images/mainMenuBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/mainMenuBack.png -------------------------------------------------------------------------------- /data/images/mud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/mud.png -------------------------------------------------------------------------------- /data/images/pit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/pit.png -------------------------------------------------------------------------------- /data/images/plant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/plant.png -------------------------------------------------------------------------------- /data/images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/right.png -------------------------------------------------------------------------------- /data/images/rock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/rock.png -------------------------------------------------------------------------------- /data/images/sand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sand.png -------------------------------------------------------------------------------- /data/images/sandAreaBig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandAreaBig.png -------------------------------------------------------------------------------- /data/images/sandAreaCurve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandAreaCurve.png -------------------------------------------------------------------------------- /data/images/sandEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandEditor.png -------------------------------------------------------------------------------- /data/images/sandGrassCorner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandGrassCorner.png -------------------------------------------------------------------------------- /data/images/sandGrassCorner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandGrassCorner2.png -------------------------------------------------------------------------------- /data/images/sandGrassCorner2Editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandGrassCorner2Editor.png -------------------------------------------------------------------------------- /data/images/sandGrassCornerEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandGrassCornerEditor.png -------------------------------------------------------------------------------- /data/images/sandGrassStraight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandGrassStraight.png -------------------------------------------------------------------------------- /data/images/sandGrassStraightEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sandGrassStraightEditor.png -------------------------------------------------------------------------------- /data/images/settingsBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/settingsBack.png -------------------------------------------------------------------------------- /data/images/skid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/skid.png -------------------------------------------------------------------------------- /data/images/sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sky.png -------------------------------------------------------------------------------- /data/images/smoke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/smoke.png -------------------------------------------------------------------------------- /data/images/sparkle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/sparkle.png -------------------------------------------------------------------------------- /data/images/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/star.png -------------------------------------------------------------------------------- /data/images/starGlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/starGlow.png -------------------------------------------------------------------------------- /data/images/starHalf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/starHalf.png -------------------------------------------------------------------------------- /data/images/starHalfGlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/starHalfGlow.png -------------------------------------------------------------------------------- /data/images/starHalfR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/starHalfR.png -------------------------------------------------------------------------------- /data/images/startLightGlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/startLightGlow.png -------------------------------------------------------------------------------- /data/images/startLightOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/startLightOff.png -------------------------------------------------------------------------------- /data/images/startLightOffCorner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/startLightOffCorner.png -------------------------------------------------------------------------------- /data/images/startLightOn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/startLightOn.png -------------------------------------------------------------------------------- /data/images/startLightOnCorner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/startLightOnCorner.png -------------------------------------------------------------------------------- /data/images/steel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/steel.jpg -------------------------------------------------------------------------------- /data/images/straight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/straight.png -------------------------------------------------------------------------------- /data/images/straight45Female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/straight45Female.png -------------------------------------------------------------------------------- /data/images/straight45FemalePreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/straight45FemalePreview.png -------------------------------------------------------------------------------- /data/images/straight45Male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/straight45Male.png -------------------------------------------------------------------------------- /data/images/straight45MalePreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/straight45MalePreview.png -------------------------------------------------------------------------------- /data/images/straightPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/straightPreview.png -------------------------------------------------------------------------------- /data/images/tire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/tire.png -------------------------------------------------------------------------------- /data/images/tireStatusIndicatorBody.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/tireStatusIndicatorBody.png -------------------------------------------------------------------------------- /data/images/tireStatusIndicatorTires.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/tireStatusIndicatorTires.png -------------------------------------------------------------------------------- /data/images/trackSelectionBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/trackSelectionBack.png -------------------------------------------------------------------------------- /data/images/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/tree.png -------------------------------------------------------------------------------- /data/images/wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/images/wood.png -------------------------------------------------------------------------------- /data/meshes.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /data/models/bridge.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.76 (sub 0) OBJ File: 'bridge.blend' 2 | # www.blender.org 3 | mtllib bridge.mtl 4 | o Plane.001 5 | v 21.220465 -22.400000 1.988096 6 | v 27.234499 -22.400000 -0.200832 7 | v 21.220465 22.400000 1.988096 8 | v 27.234499 22.400000 -0.200832 9 | vt 1.000000 0.000000 10 | vt 1.000000 1.000000 11 | vt 0.000000 1.000000 12 | vt 0.000000 0.000000 13 | vn 0.342000 0.000000 0.939700 14 | usemtl None 15 | s off 16 | f 2/1/1 4/2/1 3/3/1 17 | f 1/4/1 2/1/1 3/3/1 18 | o Plane 19 | v -21.400000 -22.400000 2.000000 20 | v 21.400000 -22.400000 2.000000 21 | v -21.400000 22.400000 2.000000 22 | v 21.400000 22.400000 2.000000 23 | vt 1.000000 0.000000 24 | vt 1.000000 1.000000 25 | vt 0.000000 1.000000 26 | vt 0.000000 0.000000 27 | vn 0.000000 0.000000 1.000000 28 | usemtl None 29 | s off 30 | f 6/5/2 8/6/2 7/7/2 31 | f 5/8/2 6/5/2 7/7/2 32 | o Plane.002 33 | v -27.389914 -22.400000 -0.235114 34 | v -21.375879 -22.400000 1.953815 35 | v -27.389914 22.400000 -0.235114 36 | v -21.375879 22.400000 1.953815 37 | vt 1.000000 0.000000 38 | vt 1.000000 1.000000 39 | vt 0.000000 1.000000 40 | vt 0.000000 0.000000 41 | vn -0.342000 0.000000 0.939700 42 | usemtl None 43 | s off 44 | f 10/9/3 12/10/3 11/11/3 45 | f 9/12/3 10/9/3 11/11/3 46 | -------------------------------------------------------------------------------- /data/sounds/bell.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/bell.ogg -------------------------------------------------------------------------------- /data/sounds/carEngine.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/carEngine.ogg -------------------------------------------------------------------------------- /data/sounds/carHit.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/carHit.ogg -------------------------------------------------------------------------------- /data/sounds/carHit2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/carHit2.ogg -------------------------------------------------------------------------------- /data/sounds/carHit3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/carHit3.ogg -------------------------------------------------------------------------------- /data/sounds/cheering.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/cheering.ogg -------------------------------------------------------------------------------- /data/sounds/menuBoom.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/menuBoom.ogg -------------------------------------------------------------------------------- /data/sounds/menuClick.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/menuClick.ogg -------------------------------------------------------------------------------- /data/sounds/pit.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/pit.ogg -------------------------------------------------------------------------------- /data/sounds/skid.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/data/sounds/skid.ogg -------------------------------------------------------------------------------- /packaging/README: -------------------------------------------------------------------------------- 1 | README 2 | ====== 3 | 4 | windows : Packaging script for NSIS. 5 | 6 | -- Jussi Lind 7 | 8 | -------------------------------------------------------------------------------- /scripts/apply-clang-format: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CLANG_FORMAT=clang-format 4 | 5 | FILES=$(find src/editor src/game src/common -name *hpp -or -name *cpp -or -name *hh -or -name *cc -or -name *h | grep -v moc_ | grep -v qrc_) 6 | ${CLANG_FORMAT} -i -style=file ${FILES} 7 | 8 | echo "Done." 9 | 10 | -------------------------------------------------------------------------------- /scripts/build-windows-nsis: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Builds NSIS installer for Windows in Docker. 4 | 5 | # 6 | # Note!!: It would be possible to generate the NSIS installer with CPack, 7 | # but let's use the old packaging scripts for now and only build with CMake. 8 | # 9 | 10 | DUSTRAC_RELEASE_VERSION=2.1.1 11 | 12 | CMAKE=/mxe/usr/bin/i686-w64-mingw32.static-cmake 13 | CPACK=/mxe/usr/bin/i686-w64-mingw32.static-cpack 14 | 15 | CMD="export LANG=en_US.UTF-8 && \ 16 | export LC_ALL=en_US.UTF-8 && \ 17 | export PATH='$PATH':/mxe/usr/bin && \ 18 | cd /dr2d && rm -rf build-windows-nsis && mkdir -p build-windows-nsis && \ 19 | cd build-windows-nsis && ${CMAKE} -DPACKAGE_TYPE=NSIS .. && \ 20 | make -j4 && \ 21 | DUSTRAC_RELEASE_VERSION=${DUSTRAC_RELEASE_VERSION} ../scripts/build-windows-nsis-packaging-helper" 22 | 23 | if [ -f /.dockerenv ]; then 24 | echo "Script inside Docker" 25 | bash -c "${CMD}" 26 | else 27 | echo "Script outside Docker" 28 | docker run --user $(id -u):$(id -g) --privileged -t -v $(pwd):/dr2d juzzlin/mxe-qt5-20.04:latest bash -c "${CMD}" 29 | fi 30 | 31 | -------------------------------------------------------------------------------- /scripts/mxe-env: -------------------------------------------------------------------------------- 1 | # source this script 2 | export MXE_PATH=/opt/mxe/ 3 | export PATH=${MXE_PATH}/usr/bin:$PATH 4 | export PKG_CONFIG_PATH=${MXE_PATH}/usr/i686-pc-mingw32/lib/pkgconfig 5 | 6 | -------------------------------------------------------------------------------- /scripts/qt5-static-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # This for configuring static build of Qt5 itself, not the game. 5 | # 6 | 7 | PREFIX='/home/juzzlin/qt5' 8 | ./configure \ 9 | -opensource \ 10 | -confirm-license \ 11 | -force-pkg-config \ 12 | -fontconfig \ 13 | -release \ 14 | -static \ 15 | -prefix $PREFIX \ 16 | -no-icu \ 17 | -opengl desktop \ 18 | -no-glib \ 19 | -accessibility \ 20 | -nomake examples \ 21 | -nomake tests \ 22 | -qt-zlib \ 23 | -qt-libpng \ 24 | -qt-libjpeg \ 25 | -qt-sql-sqlite \ 26 | -qt-xcb \ 27 | -qt-pcre \ 28 | -pulseaudio \ 29 | -v 30 | 31 | -------------------------------------------------------------------------------- /scripts/update-ppa: -------------------------------------------------------------------------------- 1 | VERSION=${DUSTRAC_RELEASE_VERSION?"is not set."} 2 | 3 | # $VERSION-1 for xenial 4 | # $VERSION-2 for artful 5 | 6 | DEBIAN_VERSION=$VERSION-1 7 | rm -rf *${VERSION}* 8 | cp ../DustRacing2D/dustrac-$VERSION.tar.gz . 9 | tar xzvf dustrac-$VERSION.tar.gz 10 | mv dustrac-$VERSION dustrac-$DEBIAN_VERSION 11 | cd dustrac-$DEBIAN_VERSION 12 | cp -rv packaging/debian . 13 | debuild -S -sa && cd .. && dput ppa:jussi-lind/dustrac "dustrac_${DEBIAN_VERSION}_source.changes" 14 | 15 | -------------------------------------------------------------------------------- /scripts/update-translation-files: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LUPDATE=lupdate 4 | if ! which ${LUPDATE}; then 5 | echo "${LUPDATE} not found." 6 | exit 1 7 | fi 8 | 9 | for LANG in cs de fi fr it; do 10 | ${LUPDATE} src/game/*.cpp src/game/menu/*.cpp -ts src/game/translations/dustrac-game_${LANG}.ts 11 | ${LUPDATE} src/editor/*.cpp -ts src/editor/translations/dustrac-editor_${LANG}.ts 12 | done 13 | 14 | echo "Done." 15 | 16 | -------------------------------------------------------------------------------- /scripts/update-version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Updates Heimer version in all build and packaging scripts. 4 | # Must be run in the project root. 5 | 6 | VERSION_MAJOR=$1 7 | VERSION_MINOR=$2 8 | VERSION_PATCH=$3 9 | 10 | if [[ ! $1 || ! $2 || ! $3 ]]; then 11 | echo "Usage: $0 VERSION_MAJOR VERSION_MINOR VERSION_PATCH" 12 | exit 1 13 | fi 14 | 15 | FILE=CMakeLists.txt 16 | echo "Updating ${FILE} .." 17 | sed -i "s/^set(VERSION_MAJOR.*/set(VERSION_MAJOR ${VERSION_MAJOR})/" ${FILE} || exit 1 18 | sed -i "s/^set(VERSION_MINOR.*/set(VERSION_MINOR ${VERSION_MINOR})/" ${FILE} || exit 1 19 | sed -i "s/^set(VERSION_PATCH.*/set(VERSION_PATCH ${VERSION_PATCH})/" ${FILE} || exit 1 20 | 21 | FILE=packaging/windows/dustrac.nsi 22 | echo "Updating ${FILE} .." 23 | sed -i "s/^!define VERSIONMAJOR.*/!define VERSIONMAJOR ${VERSION_MAJOR}/" ${FILE} || exit 1 24 | sed -i "s/^!define VERSIONMINOR.*/!define VERSIONMINOR ${VERSION_MINOR}/" ${FILE} || exit 1 25 | sed -i "s/^!define VERSIONBUILD.*/!define VERSIONBUILD ${VERSION_PATCH}/" ${FILE} || exit 1 26 | 27 | for FILE in src/editor/editor.pro src/game/game.pro scripts/build-windows-nsis; do 28 | echo "Updating ${FILE} .." 29 | sed -i -E "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH/" ${FILE} || exit 1 30 | done 31 | 32 | git diff 33 | 34 | echo "Done." 35 | 36 | -------------------------------------------------------------------------------- /src/common/README: -------------------------------------------------------------------------------- 1 | These are common files shared between the editor and the game. 2 | -------------------------------------------------------------------------------- /src/common/userexception.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef USEREXCEPTION_HPP 17 | #define USEREXCEPTION_HPP 18 | 19 | #include 20 | #include 21 | 22 | class UserException : public std::runtime_error 23 | { 24 | public: 25 | explicit UserException(std::string msg) 26 | : runtime_error(msg) 27 | { 28 | } 29 | }; 30 | 31 | #endif // USEREXCEPTION_HPP 32 | -------------------------------------------------------------------------------- /src/contrib/Argengine/CHANGELOG: -------------------------------------------------------------------------------- 1 | 0.0.1 2 | ===== 3 | 4 | Initial release. 5 | 6 | New features: 7 | 8 | * Valueless options 9 | * Single-value options 10 | * Help generation 11 | 12 | -------------------------------------------------------------------------------- /src/contrib/Argengine/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Argengine) 2 | 3 | cmake_minimum_required(VERSION 2.8.12) 4 | cmake_policy(VERSION 2.8.12) 5 | 6 | option(BUILD_TESTS "Build unit tests" OFF) 7 | 8 | option(BUILD_EXAMPLES "Build example apps" OFF) 9 | 10 | # Default to release C++ flags if CMAKE_BUILD_TYPE not set 11 | if(NOT CMAKE_BUILD_TYPE) 12 | set(CMAKE_BUILD_TYPE Release CACHE STRING 13 | "Choose the type of build, options are: None Debug Release RelWithDebInfo 14 | MinSizeRel." FORCE) 15 | endif() 16 | 17 | set(CMAKE_CXX_STANDARD 11) 18 | 19 | if(CMAKE_COMPILER_IS_GNUCXX OR MINGW OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") 20 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") 21 | 22 | # CMAKE_CXX_STANDARD supported only by versions >= 3.1 23 | if (CMAKE_VERSION VERSION_LESS "3.1") 24 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") 25 | endif () 26 | endif() 27 | 28 | set(LIBRARY_NAME "Argengine") 29 | 30 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 31 | 32 | if(BUILD_TESTS) 33 | enable_testing() 34 | add_subdirectory(src/tests) 35 | endif() 36 | 37 | add_subdirectory(src) 38 | 39 | -------------------------------------------------------------------------------- /src/contrib/Argengine/Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | stages { 4 | stage('CMake Debug build') { 5 | agent { 6 | docker { 7 | image 'juzzlin/qt5-18.04:latest' 8 | args '--privileged -t -v $WORKSPACE:/Argengine' 9 | } 10 | } 11 | steps { 12 | sh "mkdir -p build-debug" 13 | sh "cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug .." 14 | sh "cd build-debug && cmake --build . --target all -- -j3 && ctest" 15 | } 16 | } 17 | stage('CMake Release build') { 18 | agent { 19 | docker { 20 | image 'juzzlin/qt5-18.04:latest' 21 | args '--privileged -t -v $WORKSPACE:/Argengine' 22 | } 23 | } 24 | steps { 25 | sh "mkdir -p build-release" 26 | sh "cd build-release && cmake -DCMAKE_BUILD_TYPE=Release .." 27 | sh "cd build-release && cmake --build . --target all -- -j3 && ctest" 28 | } 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/contrib/Argengine/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Jussi Lind 4 | 5 | https://github.com/juzzlin/Argengine 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SRC argengine.cpp) 2 | set(HDR argengine.hpp) 3 | 4 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 5 | 6 | add_library(ArgengineLib OBJECT ${SRC}) 7 | set_property(TARGET ArgengineLib PROPERTY POSITION_INDEPENDENT_CODE 1) 8 | 9 | set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}) 10 | 11 | add_library(${LIBRARY_NAME} SHARED $) 12 | set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER ${HDR}) 13 | install(TARGETS ${LIBRARY_NAME} 14 | ARCHIVE DESTINATION lib 15 | LIBRARY DESTINATION lib 16 | PUBLIC_HEADER DESTINATION include 17 | ) 18 | 19 | set(STATIC_LIBRARY_NAME ${LIBRARY_NAME}_static) 20 | add_library(${STATIC_LIBRARY_NAME} STATIC $) 21 | set_target_properties(${STATIC_LIBRARY_NAME} PROPERTIES PUBLIC_HEADER ${HDR}) 22 | install(TARGETS ${STATIC_LIBRARY_NAME} 23 | ARCHIVE DESTINATION lib 24 | LIBRARY DESTINATION lib 25 | PUBLIC_HEADER DESTINATION include 26 | ) 27 | 28 | if(BUILD_EXAMPLES) 29 | add_subdirectory(examples) 30 | endif() 31 | 32 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(ex1) 2 | 3 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/examples/ex1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(ARGENGINE_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${ARGENGINE} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME ex1) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}) 8 | add_executable(${NAME} ${SRC}) 9 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 10 | 11 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(help_test) 2 | add_subdirectory(positional_argument_test) 3 | add_subdirectory(single_value_test) 4 | add_subdirectory(unknown_argument_test) 5 | add_subdirectory(valueless_test) 6 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/tests/help_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(ARGENGINE_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${ARGENGINE} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME help_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/tests/positional_argument_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(ARGENGINE_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${ARGENGINE} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME positional_argument_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/tests/single_value_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(ARGENGINE_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${ARGENGINE} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME single_value_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/tests/unknown_argument_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(ARGENGINE_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${ARGENGINE} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME unknown_argument_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/contrib/Argengine/src/tests/valueless_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(ARGENGINE_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${ARGENGINE} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME valueless_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/CHANGELOG: -------------------------------------------------------------------------------- 1 | 1.4.0 2 | ===== 3 | 4 | New features: 5 | 6 | * Fix GitHub Issue #1: Make the streams configurable 7 | * Add getter for version 8 | 9 | Other: 10 | 11 | * Use std::recursive_mutex 12 | 13 | 1.3.1 14 | ===== 15 | 16 | Bug fixes: 17 | 18 | * Explicitly include chrono 19 | 20 | 1.3.0 21 | ===== 22 | 23 | New features: 24 | 25 | * Fix GitHub Issue #6: Add option to use a microsecond timestamp 26 | - More generic setTimestampMode() replaces enableDateTime() 27 | 28 | 1.2.0 - "Thread-safe Taco" 29 | ========================== 30 | 31 | New features: 32 | 33 | * Make logging thread-safe 34 | 35 | Other changes: 36 | 37 | * Add simple hello world test 38 | 39 | 1.1.0 - "Rename Renegade" 40 | ========================= 41 | 42 | Other changes: 43 | 44 | * Rename src/logger.* to src/simple_logger.* 45 | 46 | 1.0.0 - "Basic Beast" 47 | ===================== 48 | 49 | New features: 50 | 51 | * Based on RAII 52 | * Configurable level symbols 53 | * Date / time 54 | * Logging levels: Trace, Debug, Info, Warning, Error, Fatal 55 | * Log to file and/or console 56 | 57 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(SimpleLogger) 2 | 3 | cmake_minimum_required(VERSION 2.8.12) 4 | cmake_policy(VERSION 2.8.12) 5 | 6 | option(BUILD_TESTS "Build unit tests" OFF) 7 | 8 | # Default to release C++ flags if CMAKE_BUILD_TYPE not set 9 | if(NOT CMAKE_BUILD_TYPE) 10 | set(CMAKE_BUILD_TYPE Release CACHE STRING 11 | "Choose the type of build, options are: None Debug Release RelWithDebInfo 12 | MinSizeRel." FORCE) 13 | endif() 14 | 15 | set(CMAKE_CXX_STANDARD 11) 16 | 17 | if(CMAKE_COMPILER_IS_GNUCXX OR MINGW OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") 18 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") 19 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") 20 | 21 | # CMAKE_CXX_STANDARD supported only by versions >= 3.1 22 | if (CMAKE_VERSION VERSION_LESS "3.1") 23 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") 24 | endif () 25 | endif() 26 | 27 | set(LIBRARY_NAME "SimpleLogger") 28 | 29 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 30 | 31 | if(BUILD_TESTS) 32 | enable_testing() 33 | add_subdirectory(src/tests) 34 | endif() 35 | 36 | add_subdirectory(src) 37 | 38 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | stages { 4 | stage('CMake Debug build') { 5 | agent { 6 | docker { 7 | image 'juzzlin/qt5-18.04:latest' 8 | args '--privileged -t -v $WORKSPACE:/SimpleLogger' 9 | } 10 | } 11 | steps { 12 | sh "mkdir -p build-debug" 13 | sh "cd build-debug && cmake -DCMAKE_BUILD_TYPE=Debug .." 14 | sh "cd build-debug && cmake --build . --target all -- -j3 && ctest" 15 | } 16 | } 17 | stage('CMake Release build') { 18 | agent { 19 | docker { 20 | image 'juzzlin/qt5-18.04:latest' 21 | args '--privileged -t -v $WORKSPACE:/SimpleLogger' 22 | } 23 | } 24 | steps { 25 | sh "mkdir -p build-release" 26 | sh "cd build-release && cmake -DCMAKE_BUILD_TYPE=Release .." 27 | sh "cd build-release && cmake --build . --target all -- -j3 && ctest" 28 | } 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jussi Lind 4 | 5 | https://github.com/juzzlin/SimpleLogger 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SRC simple_logger.cpp) 2 | set(HDR simple_logger.hpp) 3 | 4 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 5 | 6 | add_library(SimpleLoggerLib OBJECT ${SRC}) 7 | set_property(TARGET SimpleLoggerLib PROPERTY POSITION_INDEPENDENT_CODE 1) 8 | 9 | set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}) 10 | 11 | add_library(${LIBRARY_NAME} SHARED $) 12 | set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER ${HDR}) 13 | install(TARGETS ${LIBRARY_NAME} 14 | ARCHIVE DESTINATION lib 15 | LIBRARY DESTINATION lib 16 | PUBLIC_HEADER DESTINATION include 17 | ) 18 | 19 | set(STATIC_LIBRARY_NAME ${LIBRARY_NAME}_static) 20 | add_library(${STATIC_LIBRARY_NAME} STATIC $) 21 | set_target_properties(${STATIC_LIBRARY_NAME} PROPERTIES PUBLIC_HEADER ${HDR}) 22 | install(TARGETS ${STATIC_LIBRARY_NAME} 23 | ARCHIVE DESTINATION lib 24 | LIBRARY DESTINATION lib 25 | PUBLIC_HEADER DESTINATION include 26 | ) 27 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/src/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(file_test) 2 | add_subdirectory(stream_test) 3 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/src/tests/file_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SIMPLE_LOGGER_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${SIMPLE_LOGGER_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME file_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/contrib/SimpleLogger/src/tests/stream_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SIMPLE_LOGGER_DIR ${CMAKE_SOURCE_DIR}/src) 2 | include_directories(${SIMPLE_LOGGER_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) 3 | 4 | set(NAME stream_test) 5 | set(SRC ${NAME}.cpp) 6 | 7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/tests) 8 | add_executable(${NAME} ${SRC}) 9 | add_test(${NAME} ${CMAKE_BINARY_DIR}/tests/${NAME}) 10 | target_link_libraries(${NAME} ${LIBRARY_NAME}) 11 | -------------------------------------------------------------------------------- /src/dustrac-editor.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Dust Racing 2D Level Editor 3 | GenericName=2D racing game level editor 4 | GenericName[de]=2D-Rennspiel-Level-Editor 5 | Comment=2D racing game level editor 6 | Comment[de]=2D-Rennspiel-Level-Editor 7 | Exec=dustrac-editor 8 | Icon=dustrac-editor 9 | Type=Application 10 | Categories=Game;SportsGame; 11 | StartupNotify=true 12 | X-AppStream-Ignore=true 13 | -------------------------------------------------------------------------------- /src/dustrac-editor.desktop.opt.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Dust Racing 2D Level Editor 3 | GenericName=2D racing game level editor 4 | GenericName[de]=2D-Rennspiel-Level-Editor 5 | Comment=2D racing game level editor 6 | Comment[de]=2D-Rennspiel-Level-Editor 7 | Exec=/opt/dustrac/dustrac-editor 8 | Icon=dustrac-editor 9 | Type=Application 10 | Categories=Game;SportsGame; 11 | StartupNotify=true 12 | X-AppStream-Ignore=true 13 | -------------------------------------------------------------------------------- /src/dustrac-game.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Dust Racing 2D 3 | GenericName=Top-down 2D racing game 4 | GenericName[de]=2D-Rennspiel in Vogelperspektive 5 | Comment=2D racing game 6 | Comment[de]=2D-Rennspiel 7 | Exec=dustrac-game 8 | Icon=dustrac-game 9 | Type=Application 10 | Categories=Game;SportsGame; 11 | StartupNotify=true 12 | -------------------------------------------------------------------------------- /src/dustrac-game.desktop.opt.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Dust Racing 2D 3 | GenericName=Top-down 2D racing game 4 | GenericName[de]=2D-Rennspiel in Vogelperspektive 5 | Comment=2D racing game 6 | Comment[de]=2D-Rennspiel 7 | Exec=/opt/dustrac/dustrac-game 8 | Icon=dustrac-game 9 | Type=Application 10 | Categories=Game;SportsGame; 11 | StartupNotify=true 12 | -------------------------------------------------------------------------------- /src/editor/aboutdlg.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef ABOUTDLG_HPP 17 | #define ABOUTDLG_HPP 18 | 19 | #include 20 | 21 | //! The about dialog. 22 | class AboutDlg : public QDialog 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | //! Constructor. 28 | explicit AboutDlg(QWidget * parent = 0); 29 | 30 | private: 31 | void initWidgets(); 32 | }; 33 | 34 | #endif // ABOUTDLG_HPP 35 | -------------------------------------------------------------------------------- /src/editor/application.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef APPLICATION_HPP 17 | #define APPLICATION_HPP 18 | 19 | #include 20 | #include 21 | 22 | class MainWindow; 23 | 24 | class Application 25 | { 26 | public: 27 | Application(int & argc, char ** argv); 28 | 29 | ~Application(); 30 | 31 | int run(); 32 | 33 | private: 34 | void parseArgs(int argc, char ** argv); 35 | 36 | QApplication m_app; 37 | 38 | QTranslator m_appTranslator; 39 | 40 | QString m_trackFile; 41 | 42 | MainWindow * m_mainWindow; 43 | }; 44 | 45 | #endif // APPLICATION_HPP 46 | -------------------------------------------------------------------------------- /src/editor/editormode.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2018 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef EDITORMODE_HPP 17 | #define EDITORMODE_HPP 18 | 19 | //! Editing modes. 20 | enum class EditorMode 21 | { 22 | None, 23 | SetRoute, 24 | SetTileType, 25 | AddObject, 26 | EraseObject 27 | }; 28 | 29 | #endif // EDITORMODE_HPP 30 | -------------------------------------------------------------------------------- /src/editor/floodfill.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2018 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef FLOODFILL_HPP 17 | #define FLOODFILL_HPP 18 | 19 | class MapBase; 20 | class QAction; 21 | class QString; 22 | class TrackTile; 23 | 24 | namespace FloodFill { 25 | void floodFill(TrackTile & tile, QAction * action, const QString & typeToFill, MapBase & map); 26 | } 27 | 28 | #endif // FLOODFILL_HPP 29 | -------------------------------------------------------------------------------- /src/editor/objectfactory.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "objectfactory.hpp" 17 | 18 | #include "mainwindow.hpp" 19 | #include "object.hpp" 20 | #include "objectmodel.hpp" 21 | #include "objectmodelloader.hpp" 22 | 23 | std::unique_ptr ObjectFactory::createObject(QString role) 24 | { 25 | const auto model = MainWindow::instance()->objectModelLoader().getObjectModelByRole(role); 26 | 27 | size_t w = model.width; 28 | w = w > 0 ? w : static_cast(model.pixmap.width()); 29 | 30 | size_t h = model.height; 31 | h = h > 0 ? h : static_cast(model.pixmap.height()); 32 | 33 | return std::make_unique( 34 | model.category, 35 | role, 36 | QSizeF(w, h), 37 | model.pixmap); 38 | } 39 | -------------------------------------------------------------------------------- /src/editor/objectfactory.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OBJECTFACTORY_HPP 17 | #define OBJECTFACTORY_HPP 18 | 19 | #include 20 | #include 21 | 22 | class Object; 23 | 24 | //! Creates Objects from given role. 25 | namespace ObjectFactory { 26 | /*! Create an Objects from given role. */ 27 | std::unique_ptr createObject(QString role); 28 | } // namespace ObjectFactory 29 | 30 | #endif // OBJECTFACTORY_HPP 31 | -------------------------------------------------------------------------------- /src/editor/objectmodel.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OBJECTMODEL_HPP 17 | #define OBJECTMODEL_HPP 18 | 19 | #include 20 | #include 21 | 22 | //! Structure used by ObjectLoader. 23 | struct ObjectModel 24 | { 25 | //! Path to the image representing this object. 26 | QPixmap pixmap; 27 | 28 | //! Category of this object. 29 | QString category; 30 | 31 | //! Role of this object. 32 | QString role; 33 | 34 | //! Width when added to the scene. 35 | //! Applies only to certain kind (category) of objects. 36 | unsigned int width; 37 | 38 | //! Height when added to the scene. 39 | //! Applies only to certain kind (category) of objects. 40 | unsigned int height; 41 | }; 42 | 43 | #endif // OBJECTMODEL_HPP 44 | -------------------------------------------------------------------------------- /src/editor/rotatedialog.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef ROTATEDIALOG_HPP 17 | #define ROTATEDIALOG_HPP 18 | 19 | #include 20 | 21 | class QGridLayout; 22 | class QLabel; 23 | class QLineEdit; 24 | class QPushButton; 25 | 26 | class RotateDialog : public QDialog 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | explicit RotateDialog(QWidget * parent = 0); 32 | 33 | int angle() const; 34 | 35 | private: 36 | QGridLayout * m_layout; 37 | QPushButton * m_okButton; 38 | QPushButton * m_cancelButton; 39 | QLineEdit * m_angleEdit; 40 | QLabel * m_angleLabel; 41 | }; 42 | 43 | #endif // ROTATEDIALOG_HPP 44 | -------------------------------------------------------------------------------- /src/editor/targetnodesizedlg.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TARGETNODESIZEDLG_HPP 17 | #define TARGETNODESIZEDLG_HPP 18 | 19 | #include 20 | 21 | class QGridLayout; 22 | class QLabel; 23 | class QLineEdit; 24 | class QPushButton; 25 | 26 | class TargetNodeSizeDlg : public QDialog 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | explicit TargetNodeSizeDlg(QSizeF defaultSize, QWidget * parent = 0); 32 | 33 | QSizeF targetNodeSize() const; 34 | 35 | private: 36 | QGridLayout * m_layout; 37 | QPushButton * m_okButton; 38 | QPushButton * m_cancelButton; 39 | QLineEdit * m_widthEdit; 40 | QLabel * m_widthLabel; 41 | QLineEdit * m_heightEdit; 42 | QLabel * m_heightLabel; 43 | }; 44 | 45 | #endif // TARGETNODESIZEDLG_HPP 46 | -------------------------------------------------------------------------------- /src/editor/tileanimator.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TILEANIMATOR_HPP 17 | #define TILEANIMATOR_HPP 18 | 19 | #include 20 | #include 21 | 22 | class TrackTile; 23 | 24 | class TileAnimator : public QTimeLine 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | explicit TileAnimator(TrackTile * tile); 30 | 31 | bool rotate90CW(); 32 | 33 | bool rotate90CCW(); 34 | 35 | private slots: 36 | 37 | void setTileRotation(int frame); 38 | 39 | private: 40 | TrackTile * m_tile; 41 | 42 | int m_a0, m_a1; 43 | }; 44 | 45 | #endif // TILEANIMATOR_HPP 46 | -------------------------------------------------------------------------------- /src/editor/trackio.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TRACKIO_HPP 17 | #define TRACKIO_HPP 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "trackdata.hpp" 24 | 25 | class TrackIO 26 | { 27 | public: 28 | //! Save given track data. Returns false if failed. 29 | bool save(TrackDataPtr trackData, QString path); 30 | 31 | /*! Load given track data. Returns the new TrackData object, 32 | * or nullptr if failed. */ 33 | TrackDataPtr open(QString path); 34 | }; 35 | 36 | #endif // TRACKIO_HPP 37 | -------------------------------------------------------------------------------- /src/editor/undostack.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef UNDOSTACK_HPP 17 | #define UNDOSTACK_HPP 18 | 19 | #include "trackdata.hpp" 20 | 21 | #include 22 | 23 | class UndoStack 24 | { 25 | public: 26 | UndoStack(unsigned int maxHistorySize = 100); 27 | 28 | void pushUndoPoint(TrackDataPtr trackData); 29 | 30 | void pushRedoPoint(TrackDataPtr trackData); 31 | 32 | void clear(); 33 | 34 | bool isUndoable() const; 35 | 36 | TrackDataPtr undo(); 37 | 38 | bool isRedoable() const; 39 | 40 | TrackDataPtr redo(); 41 | 42 | private: 43 | using TrackDataVector = std::list; 44 | 45 | TrackDataVector m_undoStack; 46 | 47 | TrackDataVector m_redoStack; 48 | 49 | unsigned int m_maxHistorySize; 50 | }; 51 | 52 | #endif // UNDOSTACK_HPP 53 | -------------------------------------------------------------------------------- /src/game/MTFH/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(MTFH) 2 | 3 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}") 4 | 5 | set(MTFHSRC 6 | animationcurve.cpp 7 | menu.cpp 8 | menuitem.cpp 9 | menuitemaction.cpp 10 | menumanager.cpp 11 | menuitemview.cpp) 12 | 13 | add_library(MTFH ${MTFHSRC}) 14 | set_property(TARGET MTFH PROPERTY CXX_STANDARD 17) 15 | -------------------------------------------------------------------------------- /src/game/MTFH/Menu: -------------------------------------------------------------------------------- 1 | #include "menu.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MTFH/MenuItem: -------------------------------------------------------------------------------- 1 | #include "menuitem.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MTFH/MenuItemAction: -------------------------------------------------------------------------------- 1 | #include "menuitemaction.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MTFH/MenuItemView: -------------------------------------------------------------------------------- 1 | #include "menuitemview.hpp" 2 | -------------------------------------------------------------------------------- /src/game/MTFH/MenuManager: -------------------------------------------------------------------------------- 1 | #include "menumanager.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MTFH/README.md: -------------------------------------------------------------------------------- 1 | MTFH (Menu Toolkit From Hell) is a graphics agnostic model toolkit 2 | designed for simple game menus. The user implements needed views for 3 | the menu items. The toolkit is written in C++ and doesn't depend 4 | on anything else but STL. It's quite painful to use :) 5 | 6 | -- Jussi Lind 7 | -------------------------------------------------------------------------------- /src/game/MTFH/animationcurve.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef ANIMATIONCURVE_HPP 17 | #define ANIMATIONCURVE_HPP 18 | 19 | #include 20 | #include 21 | 22 | namespace MTFH { 23 | 24 | class AnimationCurve 25 | { 26 | public: 27 | AnimationCurve(size_t steps, int exp = 2); 28 | 29 | virtual ~AnimationCurve(); 30 | 31 | virtual void step(); 32 | 33 | virtual void reset(); 34 | 35 | virtual float value() const; 36 | 37 | private: 38 | std::vector m_values; 39 | 40 | size_t m_index = 0; 41 | }; 42 | 43 | } // namespace MTFH 44 | 45 | #endif // ANIMATIONCURVE_HPP 46 | -------------------------------------------------------------------------------- /src/game/MTFH/menuitemaction.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "menuitemaction.hpp" 17 | 18 | namespace MTFH { 19 | 20 | MenuItemAction::MenuItemAction() = default; 21 | 22 | MenuItemAction::~MenuItemAction() = default; 23 | 24 | } // namespace MTFH 25 | -------------------------------------------------------------------------------- /src/game/MTFH/menuitemaction.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef MENUITEMACTION_HPP 17 | #define MENUITEMACTION_HPP 18 | 19 | #include 20 | 21 | namespace MTFH { 22 | 23 | //! Base class for menu item actions triggered when 24 | //! the item gets selected. 25 | class MenuItemAction 26 | { 27 | public: 28 | //! Constructor. 29 | MenuItemAction(); 30 | 31 | //! Called on select. 32 | virtual void fire() 33 | { 34 | // Do nothing by default. 35 | } 36 | 37 | //! Destructor. 38 | virtual ~MenuItemAction(); 39 | }; 40 | 41 | typedef std::shared_ptr MenuItemActionPtr; 42 | 43 | } // namespace MTFH 44 | 45 | #endif // MENUITEMACTION_HPP 46 | -------------------------------------------------------------------------------- /src/game/MTFH/menuitemview.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "menuitemview.hpp" 17 | #include "menuitem.hpp" 18 | 19 | namespace MTFH { 20 | 21 | MenuItemView::MenuItemView(MenuItem & owner) 22 | : m_owner(owner) 23 | { 24 | } 25 | 26 | MenuItem & MenuItemView::owner() const 27 | { 28 | return m_owner; 29 | } 30 | 31 | void MenuItemView::stepTime(int) 32 | { 33 | } 34 | 35 | MenuItemView::~MenuItemView() = default; 36 | 37 | } // namespace MTFH 38 | -------------------------------------------------------------------------------- /src/game/MiniCore/.gitignore: -------------------------------------------------------------------------------- 1 | cmake_*cmake 2 | moc_* 3 | *_automoc* 4 | *.a 5 | *CTest* 6 | CMakeFiles 7 | Makefile 8 | 9 | -------------------------------------------------------------------------------- /src/game/MiniCore/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f CMakeCache.txt 3 | cmake . $@ && echo "Configuring compeleted. Now run \"make\"." 4 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Asset/MCAssetManager: -------------------------------------------------------------------------------- 1 | #include "mcassetmanager.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Asset/MCMeshManager: -------------------------------------------------------------------------------- 1 | #include "mcmeshmanager.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Asset/MCMeshObjectData: -------------------------------------------------------------------------------- 1 | #include "mcmeshobjectdata.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Asset/MCSurfaceManager: -------------------------------------------------------------------------------- 1 | #include "mcsurfacemanager.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Asset/MCSurfaceMetaData: -------------------------------------------------------------------------------- 1 | #include "mcsurfacemetadata.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Asset/mcmeshobjectdata.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include "mcmeshobjectdata.hh" 21 | 22 | MCMeshObjectData::MCMeshObjectData(const std::string & typeId) 23 | : MCSurfaceObjectData(typeId) 24 | { 25 | } 26 | 27 | void MCMeshObjectData::setMeshId(const std::string & id) 28 | { 29 | m_meshId = id; 30 | } 31 | 32 | const std::string & MCMeshObjectData::meshId() const 33 | { 34 | return m_meshId; 35 | } 36 | 37 | MCMeshObjectData::~MCMeshObjectData() 38 | { 39 | } 40 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCBBox: -------------------------------------------------------------------------------- 1 | #include "mcbbox.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCBBox3d: -------------------------------------------------------------------------------- 1 | #include "mcbbox3d.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCEvent: -------------------------------------------------------------------------------- 1 | #include "mcevent.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCLogger: -------------------------------------------------------------------------------- 1 | #include "mclogger.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCMacros: -------------------------------------------------------------------------------- 1 | #include "mcmacros.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCMathUtil: -------------------------------------------------------------------------------- 1 | #include "mcmathutil.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCOBBox: -------------------------------------------------------------------------------- 1 | #include "mcobbox.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCObject: -------------------------------------------------------------------------------- 1 | #include "mcobject.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCObjectFactory: -------------------------------------------------------------------------------- 1 | #include "mcobjectfactory.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCRandom: -------------------------------------------------------------------------------- 1 | #include "mcrandom.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCRecycler: -------------------------------------------------------------------------------- 1 | #include "mcrecycler.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCShapeView: -------------------------------------------------------------------------------- 1 | #include "mcshapeview.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCTimerEvent: -------------------------------------------------------------------------------- 1 | #include "mctimerevent.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCTrigonom: -------------------------------------------------------------------------------- 1 | #include "mctrigonom.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCVector2d: -------------------------------------------------------------------------------- 1 | #include "mcvector2d.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCVector3d: -------------------------------------------------------------------------------- 1 | #include "mcvector3d.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCVectorAnimation: -------------------------------------------------------------------------------- 1 | #include "mcvectoranimation.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/MCWorld: -------------------------------------------------------------------------------- 1 | #include "mcworld.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/mccast.hh: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2009 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #ifndef MCCAST_HH 21 | #define MCCAST_HH 22 | 23 | #define TO_CHAR(x) (static_cast(x)) 24 | #define TO_UCHAR(x) (static_cast(x)) 25 | #define TO_INT(x) (static_cast(x)) 26 | #define TO_UINT(x) (static_cast(x)) 27 | #define TO_FLOAT(x) (static_cast(x)) 28 | #define TO_DOUBLE(x) (static_cast(x)) 29 | 30 | #endif // MCCAST_HH 31 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/mcevent.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2010 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include "mcevent.hh" 21 | #include "mcobject.hh" 22 | 23 | unsigned int MCEvent::m_typeCount = 0; 24 | 25 | MCEvent::MCEvent() 26 | : m_accepted(false) 27 | { 28 | } 29 | 30 | unsigned int MCEvent::registerType() 31 | { 32 | return ++MCEvent::m_typeCount; 33 | } 34 | 35 | void MCEvent::accept() 36 | { 37 | m_accepted = true; 38 | } 39 | 40 | void MCEvent::ignore() 41 | { 42 | m_accepted = false; 43 | } 44 | 45 | bool MCEvent::accepted() const 46 | { 47 | return m_accepted; 48 | } 49 | 50 | MCEvent::~MCEvent() = default; 51 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/mcmacros.hh: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #ifndef MCMACROS_HH 21 | #define MCMACROS_HH 22 | 23 | //! Disable copy constructor 24 | #define DISABLE_COPY(className) className(const className & r) = delete 25 | 26 | //! Disable assignment 27 | #define DISABLE_ASSI(className) className & operator=(const className & r) = delete 28 | 29 | //! Disable move 30 | #define DISABLE_MOVE(className) className & operator=(const className && r) = delete 31 | 32 | #endif // MCMACROS_HH 33 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Core/mcobjectcomponent.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include "mcobjectcomponent.hh" 21 | 22 | MCObjectComponent::MCObjectComponent() 23 | : m_object(nullptr) 24 | { 25 | } 26 | 27 | void MCObjectComponent::setObject(MCObject & object) 28 | { 29 | m_object = &object; 30 | } 31 | 32 | MCObject & MCObjectComponent::object() const 33 | { 34 | return *m_object; 35 | } 36 | 37 | void MCObjectComponent::stepTime(int) 38 | { 39 | } 40 | 41 | void MCObjectComponent::reset() 42 | { 43 | } 44 | 45 | MCObjectComponent::~MCObjectComponent() = default; 46 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCCamera: -------------------------------------------------------------------------------- 1 | #include "mccamera.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLAmbientLight: -------------------------------------------------------------------------------- 1 | #include "mcglambientlight.hh" 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLColor: -------------------------------------------------------------------------------- 1 | #include "mcglcolor.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLDiffuseLight: -------------------------------------------------------------------------------- 1 | #include "mcgldiffuselight.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLEW: -------------------------------------------------------------------------------- 1 | // This is just wrapper header for glew. 2 | #ifndef __MC_NO_GLEW__ 3 | #include "contrib/glew/glew.h" 4 | #else 5 | #ifndef __MC_GLES__ 6 | #ifdef _MSC_VER 7 | #include 8 | #include 9 | #include 10 | #else 11 | #ifdef __APPLE__ 12 | #define GL_SILENCE_DEPRECATION 13 | #define GL_GLEXT_PROTOTYPES 14 | #include 15 | #include 16 | #else 17 | #define GL_GLEXT_PROTOTYPES 18 | #include 19 | #include 20 | #endif 21 | #endif 22 | #else 23 | #include 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLM: -------------------------------------------------------------------------------- 1 | // This is just wrapper header for glm 2 | #include "contrib/glm/ogl-math/glm/glm.hpp" 3 | #include "contrib/glm/ogl-math/glm/gtc/matrix_transform.hpp" 4 | 5 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLMaterial: -------------------------------------------------------------------------------- 1 | #include "mcglmaterial.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLScene: -------------------------------------------------------------------------------- 1 | #include "mcglscene.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLShaderProgram: -------------------------------------------------------------------------------- 1 | #include "mcglshaderprogram.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCGLVertex: -------------------------------------------------------------------------------- 1 | #include "mcglvertex.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCMesh: -------------------------------------------------------------------------------- 1 | #include "mcmesh.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCMeshView: -------------------------------------------------------------------------------- 1 | #include "mcmeshview.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCParticle: -------------------------------------------------------------------------------- 1 | #include "mcparticle.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCParticleRendererBase: -------------------------------------------------------------------------------- 1 | #include "mcparticlerendererbase.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCRenderGroup: -------------------------------------------------------------------------------- 1 | #include "mcrendergroup.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCSurface: -------------------------------------------------------------------------------- 1 | #include "mcsurface.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCSurfaceParticle: -------------------------------------------------------------------------------- 1 | #include "mcsurfaceparticle.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCSurfaceParticleRenderer: -------------------------------------------------------------------------------- 1 | #include "mcsurfaceparticlerenderer.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCSurfaceParticleRendererLegacy: -------------------------------------------------------------------------------- 1 | #include "mcsurfaceparticlerendererlegacy.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCSurfaceView: -------------------------------------------------------------------------------- 1 | #include "mcsurfaceview.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/MCWorldRenderer: -------------------------------------------------------------------------------- 1 | #include "mcworldrenderer.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/func_common.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/func_common.hpp -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/func_common.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/func_common.inl -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/func_integer.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/func_integer.hpp -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/type_half.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/core/type_half.inl -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-30 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/closest_point.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef glm_gtx_closest_point 11 | #define glm_gtx_closest_point 12 | 13 | namespace glm 14 | { 15 | template 16 | GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine 17 | ( 18 | detail::tvec3 const & point, 19 | detail::tvec3 const & a, 20 | detail::tvec3 const & b 21 | ) 22 | { 23 | valType LineLength = distance(a, b); 24 | detail::tvec3 Vector = point - a; 25 | detail::tvec3 LineDirection = (b - a) / LineLength; 26 | 27 | // Project Vector to LineDirection to get the distance of point from a 28 | valType Distance = dot(Vector, LineDirection); 29 | 30 | if(Distance <= valType(0)) return a; 31 | if(Distance >= LineLength) return b; 32 | return a + LineDirection * Distance; 33 | } 34 | }//namespace glm 35 | 36 | #endif//glm_gtx_closest_point 37 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-02-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/handed_coordinate_space.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER bool rightHanded 14 | ( 15 | detail::tvec3 const & tangent, 16 | detail::tvec3 const & binormal, 17 | detail::tvec3 const & normal 18 | ) 19 | { 20 | return dot(cross(normal, tangent), binormal) > T(0); 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER bool leftHanded 25 | ( 26 | detail::tvec3 const & tangent, 27 | detail::tvec3 const & binormal, 28 | detail::tvec3 const & normal 29 | ) 30 | { 31 | return dot(cross(normal, tangent), binormal) < T(0); 32 | } 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/int_10_10_10_2.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-07-07 5 | // Updated : 2010-07-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/int_10_10_10_2.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast 13 | ( 14 | glm::vec4 const & v 15 | ) 16 | { 17 | return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30); 18 | } 19 | }//namespace glm 20 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-10-24 5 | // Updated : 2008-10-24 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/log_base.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include "../core/_vectorize.hpp" 11 | 12 | namespace glm 13 | { 14 | template 15 | GLM_FUNC_QUALIFIER genType log( 16 | genType const & x, 17 | genType const & base) 18 | { 19 | assert(x != genType(0)); 20 | 21 | return glm::log(x) / glm::log(base); 22 | } 23 | 24 | VECTORIZE_VEC_SCA(log) 25 | VECTORIZE_VEC_VEC(log) 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/matrix_cross_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 14 | ( 15 | detail::tvec3 const & x 16 | ) 17 | { 18 | detail::tmat3x3 Result(T(0)); 19 | Result[0][1] = x.z; 20 | Result[1][0] = -x.z; 21 | Result[0][2] = -x.y; 22 | Result[2][0] = x.y; 23 | Result[1][2] = x.x; 24 | Result[2][1] = -x.x; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 30 | ( 31 | detail::tvec3 const & x 32 | ) 33 | { 34 | detail::tmat4x4 Result(T(0)); 35 | Result[0][1] = x.z; 36 | Result[1][0] = -x.z; 37 | Result[0][2] = -x.y; 38 | Result[2][0] = x.y; 39 | Result[1][2] = x.x; 40 | Result[2][1] = -x.x; 41 | return Result; 42 | } 43 | 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-04-03 5 | // Updated : 2008-09-17 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/mixed_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER valType mixedProduct 14 | ( 15 | detail::tvec3 const & v1, 16 | detail::tvec3 const & v2, 17 | detail::tvec3 const & v3 18 | ) 19 | { 20 | return dot(cross(v1, v2), v3); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/noise.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 5 | // https://github.com/ashima/webgl-noise 6 | // Following Stefan Gustavson's paper "Simplex noise demystified": 7 | // http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // Created : 2011-04-21 10 | // Updated : 2011-04-21 11 | // Licence : This source is under MIT License 12 | // File : glm/gtx/noise.inl 13 | /////////////////////////////////////////////////////////////////////////////////////////////////// 14 | // Dependency: 15 | // - GLM core 16 | /////////////////////////////////////////////////////////////////////////////////////////////////// 17 | 18 | namespace glm{ 19 | 20 | }//namespace glm 21 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2011-06-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/normal.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal 14 | ( 15 | detail::tvec3 const & p1, 16 | detail::tvec3 const & p2, 17 | detail::tvec3 const & p3 18 | ) 19 | { 20 | return normalize(cross(p1 - p2, p1 - p3)); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-10 5 | // Updated : 2007-05-10 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/number_precision.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/ocl_type.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/ocl_type.inl -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/orthonormalize.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize 14 | ( 15 | const detail::tmat3x3& m 16 | ) 17 | { 18 | detail::tmat3x3 r = m; 19 | 20 | r[0] = normalize(r[0]); 21 | 22 | float d0 = dot(r[0], r[1]); 23 | r[1] -= r[0] * d0; 24 | r[1] = normalize(r[1]); 25 | 26 | float d1 = dot(r[1], r[2]); 27 | d0 = dot(r[0], r[2]); 28 | r[2] -= r[0] * d0 + r[1] * d1; 29 | r[2] = normalize(r[2]); 30 | 31 | return r; 32 | } 33 | 34 | template 35 | GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize 36 | ( 37 | const detail::tvec3& x, 38 | const detail::tvec3& y 39 | ) 40 | { 41 | return normalize(x - y * dot(y, x)); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/perpendicular.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType perp 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return x - proj(x, Normal); 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-03-06 5 | // Updated : 2009-05-01 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/polar_coordinates.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 polar 14 | ( 15 | detail::tvec3 const & euclidean 16 | ) 17 | { 18 | T length = length(euclidean); 19 | detail::tvec3 tmp = euclidean / length; 20 | T xz_dist = sqrt(tmp.x * tmp.x + tmp.z * tmp.z); 21 | 22 | return detail::tvec3( 23 | degrees(atan(xz_dist, tmp.y)), // latitude 24 | degrees(atan(tmp.x, tmp.z)), // longitude 25 | xz_dist); // xz distance 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tvec3 euclidean 30 | ( 31 | detail::tvec3 const & polar 32 | ) 33 | { 34 | T latitude = radians(polar.x); 35 | T longitude = radians(polar.y); 36 | return detail::tvec3( 37 | cos(latitude) * sin(longitude), 38 | sin(latitude), 39 | cos(latitude) * cos(longitude)); 40 | } 41 | 42 | }//namespace glm 43 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/projection.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType proj 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-11-19 5 | // Updated : 2008-11-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/raw_data.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // Dependency: 10 | // - GLM core 11 | /////////////////////////////////////////////////////////////////////////////////////////////////// 12 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/simd_vec4.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/simd_vec4.hpp -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-06-08 5 | // Updated : 2008-06-08 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/std_based_type.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/unsigned_int.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-24 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/unsigned_int.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/vec1.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/vec1.inl -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/contrib/glm/ogl-math/glm/gtx/vector_access.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2006-01-16 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/vector_access.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER void set 14 | ( 15 | detail::tvec2& v, 16 | valType const & x, 17 | valType const & y 18 | ) 19 | { 20 | v.x = x; 21 | v.y = y; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER void set 26 | ( 27 | detail::tvec3& v, 28 | valType const & x, 29 | valType const & y, 30 | valType const & z 31 | ) 32 | { 33 | v.x = x; 34 | v.y = y; 35 | v.z = z; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER void set 40 | ( 41 | detail::tvec4& v, 42 | valType const & x, 43 | valType const & y, 44 | valType const & z, 45 | valType const & w 46 | ) 47 | { 48 | v.x = x; 49 | v.y = y; 50 | v.z = z; 51 | v.w = w; 52 | } 53 | }//namespace glm 54 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/mcgltexcoord.hh: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #ifndef MCGLTEXCOORD_HH 21 | #define MCGLTEXCOORD_HH 22 | 23 | #include 24 | 25 | struct MCGLTexCoord 26 | { 27 | // Texture coordinates 28 | GLfloat u, v; 29 | }; 30 | 31 | #endif // MCGLTEXCOORD_HH 32 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Graphics/mcrendergroup.hh: -------------------------------------------------------------------------------- 1 | #ifndef MCRENDERGROUP_HH 2 | #define MCRENDERGROUP_HH 3 | 4 | //! Defines what to render. 5 | enum class MCRenderGroup 6 | { 7 | Objects, 8 | Particles, 9 | ObjectShadows, 10 | ParticleShadows 11 | }; 12 | 13 | #endif // MCRENDERGROUP_HH 14 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCCircleShape: -------------------------------------------------------------------------------- 1 | #include "mccircleshape.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCCollisionEvent: -------------------------------------------------------------------------------- 1 | #include "mccollisionevent.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCContact: -------------------------------------------------------------------------------- 1 | #include "mccontact.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCDragForceGenerator: -------------------------------------------------------------------------------- 1 | #include "mcdragforcegenerator.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCEdge: -------------------------------------------------------------------------------- 1 | #include "mcedge.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCForceGenerator: -------------------------------------------------------------------------------- 1 | #include "mcforcegenerator.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCForceRegistry: -------------------------------------------------------------------------------- 1 | #include "mcforceregistry.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCFrictionGenerator: -------------------------------------------------------------------------------- 1 | #include "mcfrictiongenerator.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCGravityGenerator: -------------------------------------------------------------------------------- 1 | #include "mcgravitygenerator.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCObjectGrid: -------------------------------------------------------------------------------- 1 | #include "mcobjectgrid.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCOutOfBoundariesEvent: -------------------------------------------------------------------------------- 1 | #include "mcoutofboundariesevent.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCPhysicsComponent: -------------------------------------------------------------------------------- 1 | #include "mcphysicscomponent.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCRectShape: -------------------------------------------------------------------------------- 1 | #include "mcrectshape.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCSegment: -------------------------------------------------------------------------------- 1 | #include "mcsegment.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCSeparationEvent: -------------------------------------------------------------------------------- 1 | #include "mcseparationevent.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCShape: -------------------------------------------------------------------------------- 1 | #include "mcshape.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCSpringForceGenerator: -------------------------------------------------------------------------------- 1 | #include "mcspringforcegenerator.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/MCSpringForceGenerator2dFast: -------------------------------------------------------------------------------- 1 | #include "mcspringforcegenerator2dfast.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/mcedge.hh: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2010 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #ifndef MCEDGE_HH 21 | #define MCEDGE_HH 22 | 23 | #include "mcvector2d.hh" 24 | 25 | //! MCEdge is a structure for an edge vector and its origin. 26 | template 27 | struct MCEdge 28 | { 29 | //! Constructor. 30 | MCEdge(const MCVector2d & newEdge, const MCVector2d & newOrigin) 31 | : edge(newEdge) 32 | , origin(newOrigin) 33 | { 34 | } 35 | 36 | //! Constructor. 37 | MCEdge() 38 | { 39 | } 40 | 41 | MCVector2d edge; 42 | MCVector2d origin; 43 | }; 44 | 45 | typedef MCEdge MCEdgeF; 46 | 47 | #endif // MCEDGE_HH 48 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/mcforcegenerator.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2010 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include "mcforcegenerator.hh" 21 | 22 | struct MCForceGenerator::Impl 23 | { 24 | Impl() 25 | : enabled(true) 26 | { 27 | } 28 | 29 | bool enabled; 30 | 31 | friend class MCForceGenerator; 32 | }; 33 | 34 | MCForceGenerator::MCForceGenerator() 35 | : m_impl(std::make_unique()) 36 | { 37 | } 38 | 39 | void MCForceGenerator::enable(bool status) 40 | { 41 | m_impl->enabled = status; 42 | } 43 | 44 | bool MCForceGenerator::enabled() const 45 | { 46 | return m_impl->enabled; 47 | } 48 | 49 | MCForceGenerator::~MCForceGenerator() = default; 50 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/mcgravitygenerator.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2010 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include "mcgravitygenerator.hh" 21 | #include "mcobject.hh" 22 | #include "mcphysicscomponent.hh" 23 | 24 | MCGravityGenerator::MCGravityGenerator(const MCVector3d & g) 25 | : m_g(g) 26 | { 27 | } 28 | 29 | void MCGravityGenerator::updateForce(MCObject & object) 30 | { 31 | // G = m * g 32 | MCPhysicsComponent & physicsComponent = object.physicsComponent(); 33 | if (!physicsComponent.isStationary()) 34 | { 35 | physicsComponent.addForce(m_g * physicsComponent.mass()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Physics/mcsegment.hh: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #ifndef MCSEGMENT_HH 21 | #define MCSEGMENT_HH 22 | 23 | #include "mcvector2d.hh" 24 | 25 | //! MCSegment is a structure for a geometrical segment. 26 | template 27 | struct MCSegment 28 | { 29 | //! Constructor. 30 | MCSegment(const MCVector2d & v0, const MCVector2d & v1) 31 | : vertex0(v0) 32 | , vertex1(v1) 33 | { 34 | } 35 | 36 | //! Constructor. 37 | MCSegment() 38 | { 39 | } 40 | 41 | MCVector2d vertex0; 42 | MCVector2d vertex1; 43 | }; 44 | 45 | typedef MCSegment MCSegmentF; 46 | 47 | #endif // MCSEGMENT_HH 48 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/MCTextureFont: -------------------------------------------------------------------------------- 1 | #include "mctexturefont.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/MCTextureFontConfigLoader: -------------------------------------------------------------------------------- 1 | #include "mctexturefontconfigloader.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/MCTextureFontData: -------------------------------------------------------------------------------- 1 | #include "mctexturefontdata.hh" 2 | 3 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/MCTextureFontManager: -------------------------------------------------------------------------------- 1 | #include "mctexturefontmanager.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/MCTextureGlyph: -------------------------------------------------------------------------------- 1 | #include "mctextureglyph.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/MCTextureText: -------------------------------------------------------------------------------- 1 | #include "mctexturetext.hh" 2 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/mctexturefontdata.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/Text/mctextureglyph.cc: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include "mctextureglyph.hh" 21 | 22 | #include 23 | 24 | MCTextureGlyph::MCTextureGlyph(UV uv0, UV uv1) 25 | { 26 | m_uv[0] = uv0; 27 | m_uv[1] = UV(uv1.m_u, uv0.m_v); 28 | m_uv[2] = uv1; 29 | m_uv[3] = UV(uv0.m_u, uv1.m_v); 30 | } 31 | 32 | const MCTextureGlyph::UV & MCTextureGlyph::uv(unsigned int vertex) const 33 | { 34 | assert(vertex < 4); 35 | return m_uv[vertex]; 36 | } 37 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(UNIT_TEST_BASE_DIR ${CMAKE_BINARY_DIR}/unittests) 2 | add_subdirectory(MCForceRegistryTest) 3 | add_subdirectory(MCObjectTest) 4 | add_subdirectory(MCMeshLoaderTest) 5 | add_subdirectory(MCWorldTest) 6 | 7 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCForceRegistryTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../Core) 2 | 3 | set(SRC MCForceRegistryTest.cpp) 4 | set(EXECUTABLE_OUTPUT_PATH ${UNIT_TEST_BASE_DIR}) 5 | add_executable(MCForceRegistryTest ${SRC} ${MOC_SRC}) 6 | set_property(TARGET MCForceRegistryTest PROPERTY CXX_STANDARD 17) 7 | target_link_libraries(MCForceRegistryTest MiniCore Qt5::OpenGL Qt5::Xml Qt5::Test ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) 8 | add_test(MCForceRegistryTest ${UNIT_TEST_BASE_DIR}/MCForceRegistryTest) 9 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCForceRegistryTest/MCForceRegistryTest.hpp: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include 21 | 22 | class MCForceRegistryTest : public QObject 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | MCForceRegistryTest(); 28 | 29 | private slots: 30 | 31 | void testAddUpdateRemove(); 32 | 33 | void testAddUpdateRemoveMulti(); 34 | 35 | void testUpdateWithEnable(); 36 | 37 | void testClear(); 38 | }; 39 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCMeshLoaderTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../Core) 2 | 3 | set(SRC MCMeshLoaderTest.cpp) 4 | set(EXECUTABLE_OUTPUT_PATH ${UNIT_TEST_BASE_DIR}) 5 | add_executable(MCMeshLoaderTest ${SRC} ${MOC_SRC}) 6 | set_property(TARGET MCMeshLoaderTest PROPERTY CXX_STANDARD 17) 7 | target_link_libraries(MCMeshLoaderTest MiniCore Qt5::Test) 8 | add_test(MCMeshLoaderTest ${UNIT_TEST_BASE_DIR}/MCMeshLoaderTest) 9 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCMeshLoaderTest/MCMeshLoaderTest.hpp: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #define MC_UNIT_TEST 21 | 22 | #include "../Asset/mcmeshloader.hh" 23 | #include 24 | 25 | class MCMeshLoaderTest : public QObject 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | MCMeshLoaderTest(); 31 | 32 | private slots: 33 | 34 | void testSimple(); 35 | 36 | void testFace(); 37 | 38 | private: 39 | MCMeshLoader m_dut; 40 | }; 41 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCObjectTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../Core) 2 | 3 | set(SRC MCObjectTest.cpp) 4 | set(EXECUTABLE_OUTPUT_PATH ${UNIT_TEST_BASE_DIR}) 5 | add_executable(MCObjectTest ${SRC} ${MOC_SRC}) 6 | set_property(TARGET MCObjectTest PROPERTY CXX_STANDARD 17) 7 | target_link_libraries(MCObjectTest MiniCore ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} Qt5::OpenGL Qt5::Xml Qt5::Test) 8 | add_test(MCObjectTest ${UNIT_TEST_BASE_DIR}/MCObjectTest) 9 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCWorldTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../Core) 2 | 3 | set(SRC MCWorldTest.cpp) 4 | set(EXECUTABLE_OUTPUT_PATH ${UNIT_TEST_BASE_DIR}) 5 | add_executable(MCWorldTest ${SRC} ${MOC_SRC}) 6 | set_property(TARGET MCWorldTest PROPERTY CXX_STANDARD 17) 7 | target_link_libraries(MCWorldTest MiniCore ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} Qt5::OpenGL Qt5::Xml Qt5::Test) 8 | add_test(MCWorldTest ${UNIT_TEST_BASE_DIR}/MCWorldTest) 9 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/MCWorldTest/MCWorldTest.hpp: -------------------------------------------------------------------------------- 1 | // This file belongs to the "MiniCore" game engine. 2 | // Copyright (C) 2014 Jussi Lind 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | // MA 02110-1301, USA. 18 | // 19 | 20 | #include 21 | 22 | class MCWorldTest : public QObject 23 | { 24 | Q_OBJECT 25 | 26 | public: 27 | MCWorldTest(); 28 | 29 | private slots: 30 | 31 | void testAddToWorld(); 32 | 33 | void testCollisionEvent_RectRect(); 34 | 35 | void testCollisionEvent_RectCircle(); 36 | 37 | void testCollisionEvent_CircleCircle(); 38 | 39 | void testInstance(); 40 | 41 | void testSetDimensions(); 42 | 43 | void testSleepingObjectRemovalFromIntegration(); 44 | }; 45 | -------------------------------------------------------------------------------- /src/game/MiniCore/src/UnitTests/README-UnitTests: -------------------------------------------------------------------------------- 1 | README 2 | ====== 3 | 4 | These unit tests are using Qt's unit test framework. 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/game/STFH/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(STFH) 2 | 3 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}") 4 | 5 | set(STFHSRC 6 | data.cpp 7 | device.cpp 8 | listener.cpp 9 | location.cpp 10 | source.cpp 11 | ) 12 | 13 | add_library(STFH ${STFHSRC}) 14 | set_property(TARGET STFH PROPERTY CXX_STANDARD 17) 15 | -------------------------------------------------------------------------------- /src/game/STFH/Data: -------------------------------------------------------------------------------- 1 | #include "data.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/STFH/Device: -------------------------------------------------------------------------------- 1 | #include "device.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/STFH/Listener: -------------------------------------------------------------------------------- 1 | #include "listener.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/STFH/Location: -------------------------------------------------------------------------------- 1 | #include "location.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/STFH/Source: -------------------------------------------------------------------------------- 1 | #include "source.hpp" 2 | 3 | -------------------------------------------------------------------------------- /src/game/STFH/data.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "data.hpp" 17 | 18 | namespace STFH { 19 | 20 | Data::Data() 21 | { 22 | } 23 | 24 | void Data::load(const std::string & path) 25 | { 26 | m_path = path; 27 | } 28 | 29 | const std::string & Data::path() const 30 | { 31 | return m_path; 32 | } 33 | 34 | Data::~Data() 35 | { 36 | } 37 | 38 | } // namespace STFH 39 | -------------------------------------------------------------------------------- /src/game/STFH/data.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef DATA_HPP 17 | #define DATA_HPP 18 | 19 | #include 20 | #include 21 | 22 | namespace STFH { 23 | 24 | class Data 25 | { 26 | public: 27 | //! Constructor. 28 | Data(); 29 | 30 | //! Load the data. Re-implement and call parent. Throw on failure. 31 | virtual void load(const std::string & path); 32 | 33 | //! Destructor. 34 | virtual ~Data(); 35 | 36 | //! \return path given to load. 37 | const std::string & path() const; 38 | 39 | private: 40 | std::string m_path; 41 | }; 42 | 43 | typedef std::shared_ptr DataPtr; 44 | 45 | } // namespace STFH 46 | 47 | #endif // DATA_HPP 48 | -------------------------------------------------------------------------------- /src/game/STFH/device.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "device.hpp" 17 | 18 | namespace STFH { 19 | 20 | Device::Device() = default; 21 | 22 | Device::~Device() = default; 23 | 24 | } // namespace STFH 25 | -------------------------------------------------------------------------------- /src/game/STFH/device.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include 17 | 18 | namespace STFH { 19 | 20 | class Device 21 | { 22 | public: 23 | //! Constructor. 24 | Device(); 25 | 26 | //! Destructor. 27 | virtual ~Device(); 28 | 29 | //! Initialize the device. Throw on failure. 30 | virtual void initialize() = 0; 31 | 32 | //! Shut the device down. 33 | virtual void shutDown() = 0; 34 | }; 35 | 36 | typedef std::shared_ptr DevicePtr; 37 | 38 | } // namespace STFH 39 | -------------------------------------------------------------------------------- /src/game/STFH/listener.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "listener.hpp" 17 | 18 | namespace STFH { 19 | 20 | Listener::Listener() 21 | { 22 | } 23 | 24 | Listener::~Listener() 25 | { 26 | } 27 | 28 | void Listener::setLocation(const Location & location) 29 | { 30 | m_location = location; 31 | } 32 | 33 | const Location & Listener::location() const 34 | { 35 | return m_location; 36 | } 37 | 38 | } // namespace STFH 39 | -------------------------------------------------------------------------------- /src/game/STFH/listener.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include 17 | 18 | #include "location.hpp" 19 | 20 | namespace STFH { 21 | 22 | class Listener 23 | { 24 | public: 25 | Listener(); 26 | 27 | virtual ~Listener(); 28 | 29 | //! Set location. 30 | virtual void setLocation(const Location & location); 31 | 32 | //! \return location. 33 | virtual const Location & location() const; 34 | 35 | private: 36 | Location m_location; 37 | }; 38 | 39 | typedef std::shared_ptr ListenerPtr; 40 | 41 | } // namespace STFH 42 | -------------------------------------------------------------------------------- /src/game/STFH/location.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "location.hpp" 17 | 18 | namespace STFH { 19 | 20 | Location::Location() 21 | : m_x(0) 22 | , m_y(0) 23 | { 24 | } 25 | 26 | Location::Location(float x, float y) 27 | : m_x(x) 28 | , m_y(y) 29 | { 30 | } 31 | 32 | void Location::setPos(float x, float y) 33 | { 34 | m_x = x; 35 | m_y = y; 36 | } 37 | 38 | float Location::x() const 39 | { 40 | return m_x; 41 | } 42 | 43 | float Location::y() const 44 | { 45 | return m_y; 46 | } 47 | 48 | } // namespace STFH 49 | -------------------------------------------------------------------------------- /src/game/STFH/location.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef LOCATION_HPP 17 | #define LOCATION_HPP 18 | 19 | namespace STFH { 20 | 21 | class Location 22 | { 23 | public: 24 | Location(); 25 | 26 | Location(float x, float y); 27 | 28 | void setPos(float x, float y); 29 | 30 | float x() const; 31 | 32 | float y() const; 33 | 34 | private: 35 | float m_x, m_y; 36 | }; 37 | 38 | } // namespace STFH 39 | 40 | #endif // LOCATION_HPP 41 | -------------------------------------------------------------------------------- /src/game/application.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "application.hpp" 17 | #include "simple_logger.hpp" 18 | 19 | #include 20 | 21 | namespace { 22 | static const char * INIT_ERROR = "Initializing the game failed!"; 23 | } 24 | 25 | Application::Application(int & argc, char ** argv) 26 | : QApplication(argc, argv) 27 | { 28 | } 29 | 30 | bool Application::notify(QObject * receiver, QEvent * event) 31 | { 32 | try 33 | { 34 | return QApplication::notify(receiver, event); 35 | } catch (std::exception & e) 36 | { 37 | juzzlin::L().fatal() << e.what(); 38 | juzzlin::L().fatal() << INIT_ERROR; 39 | 40 | QApplication::exit(EXIT_FAILURE); 41 | 42 | return false; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/game/application.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef APPLICATION_HPP 17 | #define APPLICATION_HPP 18 | 19 | #include 20 | 21 | class Application : public QApplication 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | explicit Application(int & argc, char ** argv); 27 | 28 | /** Re-implementing this is required to make exceptions work with slots. */ 29 | bool notify(QObject * receiver, QEvent * e) override; 30 | }; 31 | 32 | #endif // APPLICATION_HPP 33 | -------------------------------------------------------------------------------- /src/game/audio/audiosource.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "audiosource.hpp" 17 | 18 | AudioSource::AudioSource() = default; 19 | 20 | AudioSource::~AudioSource() = default; 21 | -------------------------------------------------------------------------------- /src/game/audio/openaldata.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "openaldata.hpp" 17 | 18 | OpenALData::OpenALData() = default; 19 | 20 | OpenALData::~OpenALData() = default; 21 | -------------------------------------------------------------------------------- /src/game/audio/openaldata.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OPENALDATA_HPP 17 | #define OPENALDATA_HPP 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | 24 | //! Abstract base class for ogg, wav etc. data loader classes. 25 | class OpenALData : public STFH::Data 26 | { 27 | public: 28 | //! Constructor. 29 | OpenALData(); 30 | 31 | //! Destructor. 32 | virtual ~OpenALData() override; 33 | 34 | //! \return OpenAL buffer handle. 35 | virtual ALuint buffer() const = 0; 36 | }; 37 | 38 | using OpenALDataPtr = std::shared_ptr; 39 | 40 | #endif // OPENALDATA_HPP 41 | -------------------------------------------------------------------------------- /src/game/audio/openaldevice.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OPENALDEVICE_HPP 17 | #define OPENALDEVICE_HPP 18 | 19 | #include 20 | 21 | #include 22 | #include 23 | 24 | //! OpenAL sound device wrapper class. 25 | class OpenALDevice : public STFH::Device 26 | { 27 | public: 28 | //! Constructor. 29 | OpenALDevice(); 30 | 31 | virtual ~OpenALDevice() override; 32 | 33 | //! \reimp 34 | virtual void initialize() override; 35 | 36 | //! \reimp 37 | virtual void shutDown() override; 38 | 39 | private: 40 | ALCdevice * m_device; 41 | ALCcontext * m_context; 42 | }; 43 | 44 | #endif // OPENALDEVICE_HPP 45 | -------------------------------------------------------------------------------- /src/game/audio/openaloggdata.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OPENALOGGDATA_HPP 17 | #define OPENALOGGDATA_HPP 18 | 19 | #include "openaldata.hpp" 20 | 21 | //! OpenAL Ogg data loader. 22 | class OpenALOggData : public OpenALData 23 | { 24 | public: 25 | //! Constructor. 26 | OpenALOggData(const std::string & path); 27 | 28 | //! Destructor. 29 | virtual ~OpenALOggData() override; 30 | 31 | //! \reimp 32 | virtual void load(const std::string & path) override; 33 | 34 | //! \reimp 35 | virtual ALuint buffer() const override; 36 | 37 | private: 38 | ALsizei m_freq; 39 | ALenum m_format; 40 | ALuint m_buffer; 41 | }; 42 | 43 | #endif // OPENALOGGDATA_HPP 44 | -------------------------------------------------------------------------------- /src/game/audio/openalwavdata.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OPENALWAVDATA_HPP 17 | #define OPENALWAVDATA_HPP 18 | 19 | #include "openaldata.hpp" 20 | 21 | //! OpenAL WAV data loader. 22 | class OpenALWavData : public OpenALData 23 | { 24 | public: 25 | //! Constructor. 26 | OpenALWavData(const std::string & path); 27 | 28 | //! Destructor. 29 | virtual ~OpenALWavData() override; 30 | 31 | //! \reimp 32 | virtual void load(const std::string & path) override; 33 | 34 | //! \reimp 35 | virtual ALuint buffer() const override; 36 | 37 | private: 38 | ALsizei m_size, m_freq; 39 | ALenum m_format; 40 | ALuint m_buffer; 41 | }; 42 | 43 | #endif // OPENALWAVDATA_HPP 44 | -------------------------------------------------------------------------------- /src/game/carfactory.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef CARFACTORY_HPP 17 | #define CARFACTORY_HPP 18 | 19 | #include "car.hpp" 20 | #include "game.hpp" 21 | 22 | #include 23 | 24 | namespace CarFactory { 25 | std::unique_ptr buildCar(size_t index, size_t carCount, Game & game); 26 | } 27 | 28 | #endif // CARFACTORY_HPP 29 | -------------------------------------------------------------------------------- /src/game/carphysicscomponent.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "carphysicscomponent.hpp" 17 | 18 | #include "car.hpp" 19 | #include "difficultyprofile.hpp" 20 | #include "game.hpp" 21 | 22 | CarPhysicsComponent::CarPhysicsComponent(Car & car) 23 | : m_car(car) 24 | { 25 | } 26 | 27 | void CarPhysicsComponent::addImpulse(const MCVector3dF & impulse, bool isCollision) 28 | { 29 | MCPhysicsComponent::addImpulse(impulse, isCollision); 30 | 31 | if (Game::instance().difficultyProfile().hasBodyDamage() && isCollision) 32 | { 33 | const float damage = (m_car.isHuman() ? 0.5f : 0.25f) * impulse.lengthFast(); 34 | m_car.addDamage(damage); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/game/carphysicscomponent.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef CARPHYSICSCOMPONENT_HPP 17 | #define CARPHYSICSCOMPONENT_HPP 18 | 19 | #include 20 | 21 | class Car; 22 | 23 | class CarPhysicsComponent : public MCPhysicsComponent 24 | { 25 | public: 26 | CarPhysicsComponent(Car & car); 27 | 28 | //! \reimp 29 | void addImpulse(const MCVector3dF & impulse, bool isCollision) override; 30 | 31 | private: 32 | Car & m_car; 33 | }; 34 | 35 | #endif // CARPHYSICSCOMPONENT_HPP 36 | -------------------------------------------------------------------------------- /src/game/carstatusview.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef CARSTATUSVIEW_HPP 17 | #define CARSTATUSVIEW_HPP 18 | 19 | #include "renderable.hpp" 20 | 21 | #include 22 | 23 | class MCSurface; 24 | class Car; 25 | 26 | //! Shows the tire and fuel status of a car. 27 | class CarStatusView : public Renderable 28 | { 29 | public: 30 | //! Constructor. 31 | CarStatusView(); 32 | 33 | //! \reimp 34 | virtual void render() override; 35 | 36 | void setCarToFollow(const Car & car); 37 | 38 | private: 39 | std::shared_ptr m_body; 40 | 41 | std::shared_ptr m_tires; 42 | 43 | const Car * m_car; 44 | }; 45 | 46 | #endif // CARSTATUSVIEW_HPP 47 | -------------------------------------------------------------------------------- /src/game/checkeredflag.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "checkeredflag.hpp" 17 | #include "renderer.hpp" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | static const int FLAG_W = 32; 24 | static const int FLAG_H = 24; 25 | static const int V_SPACING = 20; 26 | 27 | CheckeredFlag::CheckeredFlag() 28 | : m_surface(MCAssetManager::surfaceManager().surface("checkeredFlag")) 29 | { 30 | } 31 | 32 | void CheckeredFlag::render() 33 | { 34 | MCVector3dF pos(width() / 2, height() - FLAG_H / 2 - V_SPACING); 35 | m_surface->setSize(FLAG_W, FLAG_H); 36 | m_surface->render(nullptr, pos, 0); 37 | } 38 | -------------------------------------------------------------------------------- /src/game/checkeredflag.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef CHECKEREDFLAG_HPP 17 | #define CHECKEREDFLAG_HPP 18 | 19 | #include "overlaybase.hpp" 20 | 21 | #include 22 | 23 | class MCSurface; 24 | 25 | //! Renders checkerflag on top of the game scene. 26 | class CheckeredFlag : public OverlayBase 27 | { 28 | public: 29 | //! Constructor. 30 | CheckeredFlag(); 31 | 32 | //! \reimp 33 | virtual void render() override; 34 | 35 | private: 36 | std::shared_ptr m_surface; 37 | }; 38 | 39 | #endif // CHECKEREDFLAG_HPP 40 | -------------------------------------------------------------------------------- /src/game/crashoverlay.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef CRASHOVERLAY_HPP 17 | #define CRASHOVERLAY_HPP 18 | 19 | #include "overlaybase.hpp" 20 | 21 | #include 22 | 23 | class MCSurface; 24 | class Car; 25 | 26 | class CrashOverlay : public OverlayBase 27 | { 28 | public: 29 | CrashOverlay(); 30 | 31 | //! \reimp 32 | virtual void render() override; 33 | 34 | //! \reimp 35 | virtual void setDimensions(int width, int height) override; 36 | 37 | //! \reimp 38 | virtual bool update() override; 39 | 40 | void setCarToFollow(Car & car); 41 | 42 | private: 43 | std::shared_ptr m_surface; 44 | 45 | float m_alpha; 46 | 47 | Car * m_car; 48 | 49 | bool m_isTriggered; 50 | }; 51 | 52 | #endif // CRASHOVERLAY_HPP 53 | -------------------------------------------------------------------------------- /src/game/fontfactory.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2014 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef FONTFACTORY_HPP 17 | #define FONTFACTORY_HPP 18 | 19 | #include 20 | #include 21 | 22 | class MCSurface; 23 | 24 | namespace FontFactory { 25 | 26 | MCTextureFontData generateFontData(QString family); 27 | 28 | } // namespace FontFactory 29 | 30 | #endif // FONTFACTORY_HPP 31 | -------------------------------------------------------------------------------- /src/game/gearbox.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2019 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef GEARBOX_HPP 17 | #define GEARBOX_HPP 18 | 19 | class Gearbox 20 | { 21 | public: 22 | enum class Gear 23 | { 24 | Neutral, 25 | Forward, 26 | Reverse, 27 | Stop 28 | }; 29 | 30 | Gearbox(); 31 | 32 | Gear gear() const; 33 | 34 | void setAcceleratorEnabled(bool enable); 35 | 36 | void setBrakeEnabled(bool enable); 37 | 38 | void update(int speedInKmh); 39 | 40 | private: 41 | Gear m_gear = Gear::Neutral; 42 | 43 | bool m_acceleratorEnabled = false; 44 | 45 | bool m_brakeEnabled = false; 46 | 47 | int m_stopCounter = 0; 48 | }; 49 | 50 | #endif // GEARBOX_HPP 51 | -------------------------------------------------------------------------------- /src/game/graphicsfactory.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef GRAPHICSFACTORY_HPP 17 | #define GRAPHICSFACTORY_HPP 18 | 19 | #include "minimap.hpp" 20 | 21 | #include 22 | 23 | class MCSurface; 24 | 25 | //! Helper functions to create miscellaneous graphic items. 26 | namespace GraphicsFactory { 27 | 28 | std::shared_ptr generateNumberSurface(size_t index); 29 | 30 | std::shared_ptr generateMinimapMarker(); 31 | 32 | } // namespace GraphicsFactory 33 | 34 | #endif // GRAPHICSFACTORY_HPP 35 | -------------------------------------------------------------------------------- /src/game/intro.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef INTRO_HPP 17 | #define INTRO_HPP 18 | 19 | #include "overlaybase.hpp" 20 | 21 | #include 22 | 23 | #include 24 | 25 | class MCSurface; 26 | class MCTextureFont; 27 | 28 | //! The intro animation. 29 | class Intro : public OverlayBase 30 | { 31 | public: 32 | //! Constructor. 33 | Intro(); 34 | 35 | //! \reimp 36 | void render() override; 37 | 38 | //! \reimp 39 | void setDimensions(int width, int height) override; 40 | 41 | private: 42 | std::shared_ptr m_back; 43 | 44 | MCTextureFont & m_font; 45 | }; 46 | 47 | #endif // INTRO_HPP 48 | -------------------------------------------------------------------------------- /src/game/keycodes.hpp: -------------------------------------------------------------------------------- 1 | #ifndef KEYCODES_HPP 2 | #define KEYCODES_HPP 3 | 4 | //! Some standard USB keyboard scan codes. 5 | namespace KeyCodes { 6 | 7 | const unsigned int LSHIFT = 50; 8 | 9 | const unsigned int RSHIFT = 62; 10 | 11 | const unsigned int LCTRL = 37; 12 | 13 | const unsigned int RCTRL = 105; 14 | 15 | const unsigned int LALT = 64; 16 | 17 | const unsigned int RALT = 92; 18 | 19 | } // namespace KeyCodes 20 | 21 | #endif // KEYCODES_HPP 22 | -------------------------------------------------------------------------------- /src/game/layers.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef LAYERS_HPP 17 | #define LAYERS_HPP 18 | 19 | namespace Layers { 20 | 21 | /*! Define the collision layers for different kinds of objects. */ 22 | enum class Collision : int 23 | { 24 | Ground = 0, 25 | Objects = 1, 26 | Bridge = 2, 27 | BridgeRails = 3 28 | }; 29 | 30 | } // namespace Layers 31 | 32 | #endif // LAYERS_HPP 33 | -------------------------------------------------------------------------------- /src/game/map.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "map.hpp" 17 | #include "tracktile.hpp" 18 | 19 | #include 20 | #include 21 | 22 | Map::Map(size_t cols, size_t rows) 23 | : MapBase(cols, rows) 24 | { 25 | // Create tiles and set coordinates. 26 | for (size_t i = 0; i < cols; i++) 27 | { 28 | for (size_t j = 0; j < rows; j++) 29 | { 30 | const auto newTile = std::make_shared( 31 | QPointF(TrackTile::width() / 2 + i * TrackTile::width(), 32 | TrackTile::height() / 2 + j * TrackTile::height()), 33 | QPoint(static_cast(i), static_cast(j))); 34 | setTile(i, j, newTile); 35 | } 36 | } 37 | } 38 | 39 | Map::~Map() = default; 40 | -------------------------------------------------------------------------------- /src/game/map.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef MAP_HPP 17 | #define MAP_HPP 18 | 19 | #include "../common/mapbase.hpp" 20 | 21 | class TrackData; 22 | 23 | //! Base class for the tile matrix used by TrackData. 24 | class Map : public MapBase 25 | { 26 | public: 27 | //! Constuctor. 28 | Map(size_t cols, size_t rows); 29 | 30 | //! Destructor. 31 | virtual ~Map(); 32 | }; 33 | 34 | #endif // MAP_HPP 35 | -------------------------------------------------------------------------------- /src/game/menu/credits.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef CREDITS_HPP 17 | #define CREDITS_HPP 18 | 19 | #include "surfacemenu.hpp" 20 | #include 21 | 22 | class MCTextureFont; 23 | 24 | //! The credits "menu". 25 | class Credits : public SurfaceMenu 26 | { 27 | public: 28 | //! Constructor. 29 | Credits(std::string id, int width, int height); 30 | 31 | //! \reimp 32 | virtual void render() override; 33 | 34 | private: 35 | std::vector m_texts; 36 | 37 | int m_time = 0; 38 | 39 | size_t m_textIndex = 0; 40 | }; 41 | 42 | #endif // CREDITS_HPP 43 | -------------------------------------------------------------------------------- /src/game/menu/difficultymenu.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef DIFFICULTYMENU_HPP 17 | #define DIFFICULTYMENU_HPP 18 | 19 | #include "surfacemenu.hpp" 20 | 21 | class DifficultyMenu : public SurfaceMenu 22 | { 23 | public: 24 | static std::string MenuId; 25 | 26 | DifficultyMenu(int width, int height); 27 | }; 28 | 29 | #endif // DIFFICULTYMENU_HPP 30 | -------------------------------------------------------------------------------- /src/game/menu/help.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef HELP_HPP 17 | #define HELP_HPP 18 | 19 | #include "surfacemenu.hpp" 20 | 21 | class MCTextureFont; 22 | 23 | //! The help "menu". 24 | class Help : public SurfaceMenu 25 | { 26 | public: 27 | //! Constructor. 28 | Help(std::string id, int width, int height); 29 | 30 | //! \reimp 31 | virtual void render() override; 32 | }; 33 | 34 | #endif // HELP_HPP 35 | -------------------------------------------------------------------------------- /src/game/menu/keyconfigmenu.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2013 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef KEYCONFIGMENU_HPP 17 | #define KEYCONFIGMENU_HPP 18 | 19 | #include "surfacemenu.hpp" 20 | 21 | //! Menu where user can configure the keys used to control the car. 22 | class KeyConfigMenu : public SurfaceMenu 23 | { 24 | public: 25 | //! Constructor. 26 | KeyConfigMenu(std::string id, int width, int height); 27 | 28 | //! Destructor. 29 | virtual ~KeyConfigMenu(); 30 | 31 | private: 32 | void addPlayerOneConfig(int width, int height); 33 | void addPlayerTwoConfig(int width, int height); 34 | }; 35 | 36 | #endif // KEYCONFIGMENU_HPP 37 | -------------------------------------------------------------------------------- /src/game/menu/lapcountmenu.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef LAPCOUNTMENU_HPP 17 | #define LAPCOUNTMENU_HPP 18 | 19 | #include "surfacemenu.hpp" 20 | 21 | #include 22 | 23 | class LapCountMenu : public SurfaceMenu 24 | { 25 | public: 26 | static std::string MenuId; 27 | 28 | LapCountMenu(int width, int height); 29 | 30 | virtual void render() override; 31 | 32 | private: 33 | MCTextureFont m_font; 34 | }; 35 | 36 | #endif // LAPCOUNTMENU_HPP 37 | -------------------------------------------------------------------------------- /src/game/menu/mainmenu.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef MAINMENU_HPP 17 | #define MAINMENU_HPP 18 | 19 | #include 20 | 21 | #include "surfacemenu.hpp" 22 | 23 | namespace MTFH { 24 | class MenuManager; 25 | } 26 | class Scene; 27 | 28 | //! The main menu of the game. 29 | class MainMenu : public QObject, public SurfaceMenu 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | static std::string MenuId; 35 | 36 | //! Constructor. 37 | MainMenu(MTFH::MenuManager & menuManager, Scene & scene, int width, int height); 38 | 39 | signals: 40 | 41 | void exitGameRequested(); 42 | 43 | private: 44 | void createMenuItems(); 45 | 46 | void createSubMenus(); 47 | 48 | MTFH::MenuManager & m_menuManager; 49 | 50 | Scene & m_scene; 51 | }; 52 | 53 | #endif // MAINMENU_HPP 54 | -------------------------------------------------------------------------------- /src/game/menu/resolutionmenu.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef RESOLUTIONMENU_HPP 17 | #define RESOLUTIONMENU_HPP 18 | 19 | #include "confirmationmenu.hpp" 20 | #include "surfacemenu.hpp" 21 | 22 | class ConfirmationMenu; 23 | 24 | class ResolutionMenu : public SurfaceMenu 25 | { 26 | public: 27 | //! Constructor. 28 | ResolutionMenu(ConfirmationMenuPtr confirmationMenu, std::string id, int width, int height, bool fullScreen); 29 | 30 | protected: 31 | //! \reimp 32 | virtual void enter() override; 33 | 34 | private: 35 | ConfirmationMenuPtr m_confirmationMenu; 36 | }; 37 | 38 | #endif // RESOLUTIONMENU_HPP 39 | -------------------------------------------------------------------------------- /src/game/menu/vsyncmenu.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef VSYNCMENU_HPP 17 | #define VSYNCMENU_HPP 18 | 19 | #include "confirmationmenu.hpp" 20 | #include "surfacemenu.hpp" 21 | 22 | class ConfirmationMenu; 23 | 24 | class VSyncMenu : public SurfaceMenu 25 | { 26 | public: 27 | //! Constructor. 28 | VSyncMenu(ConfirmationMenuPtr confirmationMenu, std::string id, int width, int height); 29 | 30 | protected: 31 | //! \reimp 32 | virtual void enter() override; 33 | 34 | private: 35 | ConfirmationMenuPtr m_confirmationMenu; 36 | }; 37 | 38 | #endif // VSYNCMENU_HPP 39 | -------------------------------------------------------------------------------- /src/game/models/bridge.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/models/bridge.blend -------------------------------------------------------------------------------- /src/game/models/bridge.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'bridge.blend' 2 | # Material Count: 1 3 | 4 | newmtl None 5 | Ns 0 6 | Ka 0.000000 0.000000 0.000000 7 | Kd 0.8 0.8 0.8 8 | Ks 0.8 0.8 0.8 9 | d 1 10 | illum 2 11 | -------------------------------------------------------------------------------- /src/game/overlaybase.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "overlaybase.hpp" 17 | 18 | OverlayBase::OverlayBase() 19 | { 20 | } 21 | 22 | bool OverlayBase::update() 23 | { 24 | return false; 25 | } 26 | 27 | void OverlayBase::reset() 28 | { 29 | } 30 | 31 | OverlayBase::~OverlayBase() = default; 32 | -------------------------------------------------------------------------------- /src/game/overlaybase.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2015 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef OVERLAYBASE_HPP 17 | #define OVERLAYBASE_HPP 18 | 19 | #include 20 | 21 | #include "renderable.hpp" 22 | #include "updateableif.hpp" 23 | 24 | //! Base class for overlays that are rendered on top of the game scene. 25 | class OverlayBase : public UpdateableIf, public Renderable 26 | { 27 | public: 28 | //! Constructor. 29 | OverlayBase(); 30 | 31 | //! Destructor. 32 | virtual ~OverlayBase(); 33 | 34 | //! \reimp 35 | virtual bool update() override; 36 | 37 | //! \reimp 38 | virtual void reset() override; 39 | }; 40 | 41 | #endif // OVERLAYBASE_HPP 42 | -------------------------------------------------------------------------------- /src/game/sounds/131385__musicmasta1__carstartskidcrash.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/131385__musicmasta1__carstartskidcrash.wav -------------------------------------------------------------------------------- /src/game/sounds/144113__avakas__man-hit-by-car.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/144113__avakas__man-hit-by-car.wav -------------------------------------------------------------------------------- /src/game/sounds/146721__fins__menu-click.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/146721__fins__menu-click.wav -------------------------------------------------------------------------------- /src/game/sounds/147242__qubodup__car-engine-loop.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/147242__qubodup__car-engine-loop.wav -------------------------------------------------------------------------------- /src/game/sounds/162850__beman87__cinema-boom-impact-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/162850__beman87__cinema-boom-impact-1.wav -------------------------------------------------------------------------------- /src/game/sounds/175887__toiletrolltube__110906-03-metal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/175887__toiletrolltube__110906-03-metal.wav -------------------------------------------------------------------------------- /src/game/sounds/179725__wjoojoo__impact-drill.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/179725__wjoojoo__impact-drill.flac -------------------------------------------------------------------------------- /src/game/sounds/201203__jjhouse4__syracuse-dome-cheering.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/201203__jjhouse4__syracuse-dome-cheering.wav -------------------------------------------------------------------------------- /src/game/sounds/66952__benboncan__boxing-bell-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/game/sounds/66952__benboncan__boxing-bell-1.wav -------------------------------------------------------------------------------- /src/game/tire.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2014 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TIRE_HPP 17 | #define TIRE_HPP 18 | 19 | #include 20 | 21 | class Car; 22 | 23 | class Tire : public MCObject 24 | { 25 | public: 26 | Tire(Car & car, float friction, float offTrackFriction); 27 | 28 | virtual void onStepTime(int step) override; 29 | 30 | void setIsOffTrack(bool flag); 31 | 32 | void setSpinCoeff(float spinCoeff); 33 | 34 | private: 35 | bool m_isOffTrack; 36 | 37 | float m_friction; 38 | 39 | float m_offTrackFriction; 40 | 41 | float m_spinCoeff; 42 | 43 | Car & m_car; 44 | }; 45 | 46 | #endif // TIRE_HPP 47 | -------------------------------------------------------------------------------- /src/game/trackobject.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #include "trackobject.hpp" 17 | 18 | TrackObject::TrackObject(QString category, QString role, MCObjectPtr object) 19 | : ObjectBase(category, role) 20 | , m_object(object) 21 | { 22 | } 23 | 24 | MCObject & TrackObject::object() const 25 | { 26 | return *(m_object.get()); 27 | } 28 | -------------------------------------------------------------------------------- /src/game/trackobject.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TRACKOBJECT_HPP 17 | #define TRACKOBJECT_HPP 18 | 19 | #include "../common/objectbase.hpp" 20 | #include 21 | 22 | #include 23 | 24 | //! TrackObject is a container class used in TrackData. 25 | class TrackObject : public ObjectBase 26 | { 27 | public: 28 | //! Constructor. 29 | TrackObject(QString category, QString role, MCObjectPtr object); 30 | 31 | //! \return reference to the associated MCObject. 32 | MCObject & object() const; 33 | 34 | private: 35 | //! The associated MCObject. 36 | MCObjectPtr m_object; 37 | }; 38 | 39 | #endif // TRACKOBJECT_HPP 40 | -------------------------------------------------------------------------------- /src/game/trackobjectfactory.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2011 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TRACKOBJECTFACTORY_HPP 17 | #define TRACKOBJECTFACTORY_HPP 18 | 19 | #include 20 | #include 21 | 22 | class TrackObject; 23 | 24 | //! Convenience class used to create various objects when loading a race track. 25 | class TrackObjectFactory 26 | { 27 | public: 28 | //! Constructor. 29 | TrackObjectFactory(MCObjectFactory & objectFactory); 30 | 31 | /*! Build and return an MCObject wrapped in TrackObject. 32 | * \return nullptr on an unknown or deprecated object. */ 33 | TrackObject * build(QString category, QString role, MCVector2dF location, int angle, bool forceStationary); 34 | 35 | private: 36 | MCObjectFactory & m_objectFactory; 37 | }; 38 | 39 | #endif // TRACKOBJECTFACTORY_HPP 40 | -------------------------------------------------------------------------------- /src/game/tree.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2017 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef TREE_HPP 17 | #define TREE_HPP 18 | 19 | #include 20 | #include 21 | 22 | class MCSurface; 23 | 24 | class Tree : public MCObject 25 | { 26 | public: 27 | Tree(std::shared_ptr surface, float r0, float r1, float treeHeight, size_t branches); 28 | }; 29 | 30 | #endif // TREE_HPP 31 | -------------------------------------------------------------------------------- /src/game/unittests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(UNIT_TEST_BASE_DIR ${CMAKE_BINARY_DIR}/unittests) 2 | add_subdirectory(gearboxtest) 3 | 4 | -------------------------------------------------------------------------------- /src/game/unittests/gearboxtest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | set(NAME gearboxtest) 4 | set(SRC ${NAME}.cpp ../../gearbox.cpp) 5 | set(EXECUTABLE_OUTPUT_PATH ${UNIT_TEST_BASE_DIR}) 6 | add_executable(${NAME} ${SRC} ${MOC_SRC}) 7 | set_property(TARGET ${NAME} PROPERTY CXX_STANDARD 17) 8 | target_link_libraries(${NAME} Qt5::Test) 9 | add_test(${NAME} ${UNIT_TEST_BASE_DIR}/${NAME}) 10 | -------------------------------------------------------------------------------- /src/game/unittests/gearboxtest/gearboxtest.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2019 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef GEARBOXTEST_HPP 17 | #define GEARBOXTEST_HPP 18 | 19 | #include 20 | 21 | class GearboxTest : public QObject 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | GearboxTest(); 27 | 28 | private slots: 29 | 30 | void testInit(); 31 | 32 | void testGearForward(); 33 | 34 | void testGearReverse(); 35 | 36 | void testBothPressed(); 37 | }; 38 | 39 | #endif // GEARBOXTEST_HPP 40 | -------------------------------------------------------------------------------- /src/game/updateableif.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of Dust Racing 2D. 2 | // Copyright (C) 2012 Jussi Lind 3 | // 4 | // Dust Racing 2D is free software: you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation, either version 3 of the License, or 7 | // (at your option) any later version. 8 | // Dust Racing 2D is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | // GNU General Public License for more details. 12 | // 13 | // You should have received a copy of the GNU General Public License 14 | // along with Dust Racing 2D. If not, see . 15 | 16 | #ifndef UPDATEABLEIF_H 17 | #define UPDATEABLEIF_H 18 | 19 | //! Interface for objects than can be updated. 20 | class UpdateableIf 21 | { 22 | //! Update the state. 23 | //! \return false if the end state reached. 24 | virtual bool update() = 0; 25 | 26 | //! Reset the state. 27 | virtual void reset() = 0; 28 | }; 29 | 30 | #endif // UPDATEABLEIF_H 31 | -------------------------------------------------------------------------------- /src/images/README: -------------------------------------------------------------------------------- 1 | README 2 | ====== 3 | 4 | Most of the .svg files are created with InkScape and there might 5 | be some InkScape-specific effects, like blur. 6 | 7 | -- Jussi Lind 8 | 9 | -------------------------------------------------------------------------------- /src/images/editor/wrench.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/images/editor/wrench.ico -------------------------------------------------------------------------------- /src/images/game/objects/brake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/images/game/objects/brake.png -------------------------------------------------------------------------------- /src/images/game/objects/sandAreaBig.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/images/game/objects/sandAreaBig.xcf -------------------------------------------------------------------------------- /src/images/game/objects/sandAreaCurve45.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juzzlin/DustRacing2D/ce6c75194bbc61999e341bf436eacc57556eaa00/src/images/game/objects/sandAreaCurve45.xcf --------------------------------------------------------------------------------