├── .gitignore
├── CALLTABLE.md
├── LICENSE
├── PSAGameDesigns
├── EngineLayersArch.png
├── PSAGame2D.png
├── PSAGame2DHeader.png
├── PSAGame2Dv20241002.png
├── PSAGame2Dv20250130.png
├── PSAGame2Dv20250224.png
├── PSAGameGraphicsSTD.md
├── RendererArch.png
├── VertexGroupArch.png
└── VirtualTextureArch.png
├── PSAGameDoc
└── DOC_EXP_MODULES
│ ├── EXP_MOD_cpu_particle_system.md
│ ├── INDEX.md
│ ├── PSAG_CPU_PARTICLE.png
│ └── PSAG_CPU_PARTICLE
│ ├── 1.png
│ ├── 2.png
│ └── 3.png
├── PSAGameFramework.cdproj
├── PSAGameFramework.sln
├── PSAGameFramework
├── ExternalLibrary
│ ├── FiletoolsLibrary
│ │ ├── Base64
│ │ │ └── base64
│ │ │ │ ├── base64.cpp
│ │ │ │ └── base64.h
│ │ ├── OpenAL
│ │ │ ├── include
│ │ │ │ ├── EFX-Util.h
│ │ │ │ ├── al.h
│ │ │ │ ├── alc.h
│ │ │ │ ├── efx-creative.h
│ │ │ │ ├── efx.h
│ │ │ │ ├── stb_vorbis.c
│ │ │ │ └── xram.h
│ │ │ └── libs
│ │ │ │ └── Win64
│ │ │ │ ├── EFX-Util_MT
│ │ │ │ └── EFX-Util.lib
│ │ │ │ ├── EFX-Util_MTDLL
│ │ │ │ └── EFX-Util.lib
│ │ │ │ └── OpenAL32.lib
│ │ ├── RapidJSON
│ │ │ └── include
│ │ │ │ ├── allocators.h
│ │ │ │ ├── cursorstreamwrapper.h
│ │ │ │ ├── document.h
│ │ │ │ ├── encodedstream.h
│ │ │ │ ├── encodings.h
│ │ │ │ ├── error
│ │ │ │ ├── en.h
│ │ │ │ └── error.h
│ │ │ │ ├── filereadstream.h
│ │ │ │ ├── filewritestream.h
│ │ │ │ ├── fwd.h
│ │ │ │ ├── internal
│ │ │ │ ├── biginteger.h
│ │ │ │ ├── clzll.h
│ │ │ │ ├── diyfp.h
│ │ │ │ ├── dtoa.h
│ │ │ │ ├── ieee754.h
│ │ │ │ ├── itoa.h
│ │ │ │ ├── meta.h
│ │ │ │ ├── pow10.h
│ │ │ │ ├── regex.h
│ │ │ │ ├── stack.h
│ │ │ │ ├── strfunc.h
│ │ │ │ ├── strtod.h
│ │ │ │ └── swap.h
│ │ │ │ ├── istreamwrapper.h
│ │ │ │ ├── memorybuffer.h
│ │ │ │ ├── memorystream.h
│ │ │ │ ├── msinttypes
│ │ │ │ ├── inttypes.h
│ │ │ │ └── stdint.h
│ │ │ │ ├── ostreamwrapper.h
│ │ │ │ ├── pointer.h
│ │ │ │ ├── prettywriter.h
│ │ │ │ ├── rapidjson.h
│ │ │ │ ├── reader.h
│ │ │ │ ├── schema.h
│ │ │ │ ├── stream.h
│ │ │ │ ├── stringbuffer.h
│ │ │ │ ├── uri.h
│ │ │ │ └── writer.h
│ │ └── Zlib
│ │ │ ├── include
│ │ │ ├── zconf.h
│ │ │ └── zlib.h
│ │ │ ├── lib
│ │ │ └── zlibwapi.lib
│ │ │ └── zlibwapi.dll
│ ├── GraphicsLibrary
│ │ ├── glew_library
│ │ │ ├── bin
│ │ │ │ └── Release
│ │ │ │ │ ├── Win32
│ │ │ │ │ └── glew32.dll
│ │ │ │ │ └── x64
│ │ │ │ │ └── glew32.dll
│ │ │ ├── include
│ │ │ │ └── GL
│ │ │ │ │ ├── eglew.h
│ │ │ │ │ ├── glew.h
│ │ │ │ │ ├── glxew.h
│ │ │ │ │ └── wglew.h
│ │ │ └── lib
│ │ │ │ └── Release
│ │ │ │ ├── Win32
│ │ │ │ ├── glew32.lib
│ │ │ │ └── glew32s.lib
│ │ │ │ └── x64
│ │ │ │ ├── glew32.lib
│ │ │ │ └── glew32s.lib
│ │ ├── glfw_library
│ │ │ ├── include
│ │ │ │ └── GLFW
│ │ │ │ │ ├── glext.h
│ │ │ │ │ ├── glfw3.h
│ │ │ │ │ └── glfw3native.h
│ │ │ └── lib-vc2019
│ │ │ │ ├── glfw3.dll
│ │ │ │ ├── glfw3.lib
│ │ │ │ ├── glfw3_mt.lib
│ │ │ │ └── glfw3dll.lib
│ │ ├── glm_library
│ │ │ └── include
│ │ │ │ └── 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
│ │ └── image_loader
│ │ │ ├── stb_image.h
│ │ │ └── stb_image_write.h
│ ├── GuiimguiLibrary
│ │ └── imgui_glfw3
│ │ │ ├── imconfig.h
│ │ │ ├── imgui.cpp
│ │ │ ├── imgui.h
│ │ │ ├── imgui_demo.cpp
│ │ │ ├── imgui_draw.cpp
│ │ │ ├── imgui_impl_glfw.cpp
│ │ │ ├── imgui_impl_glfw.h
│ │ │ ├── imgui_impl_opengl2.cpp
│ │ │ ├── imgui_impl_opengl2.h
│ │ │ ├── imgui_impl_opengl3.cpp
│ │ │ ├── imgui_impl_opengl3.h
│ │ │ ├── imgui_impl_opengl3_loader.h
│ │ │ ├── imgui_internal.h
│ │ │ ├── imgui_tables.cpp
│ │ │ ├── imgui_widgets.cpp
│ │ │ ├── imstb_rectpack.h
│ │ │ ├── imstb_textedit.h
│ │ │ ├── imstb_truetype.h
│ │ │ └── misc
│ │ │ ├── README.txt
│ │ │ ├── cpp
│ │ │ ├── README.txt
│ │ │ ├── imgui_stdlib.cpp
│ │ │ └── imgui_stdlib.h
│ │ │ ├── debuggers
│ │ │ ├── README.txt
│ │ │ ├── imgui.gdb
│ │ │ ├── imgui.natstepfilter
│ │ │ └── imgui.natvis
│ │ │ ├── fonts
│ │ │ ├── Cousine-Regular.ttf
│ │ │ ├── DroidSans.ttf
│ │ │ ├── Karla-Regular.ttf
│ │ │ ├── ProggyClean.ttf
│ │ │ ├── ProggyTiny.ttf
│ │ │ ├── Roboto-Medium.ttf
│ │ │ └── binary_to_compressed_c.cpp
│ │ │ ├── freetype
│ │ │ ├── README.md
│ │ │ ├── imgui_freetype.cpp
│ │ │ └── imgui_freetype.h
│ │ │ └── single_file
│ │ │ └── imgui_single_file.h
│ └── PhysicalLibray
│ │ ├── include
│ │ └── box2d
│ │ │ ├── b2_api.h
│ │ │ ├── b2_block_allocator.h
│ │ │ ├── b2_body.h
│ │ │ ├── b2_broad_phase.h
│ │ │ ├── b2_chain_shape.h
│ │ │ ├── b2_circle_shape.h
│ │ │ ├── b2_collision.h
│ │ │ ├── b2_common.h
│ │ │ ├── b2_contact.h
│ │ │ ├── b2_contact_manager.h
│ │ │ ├── b2_distance.h
│ │ │ ├── b2_distance_joint.h
│ │ │ ├── b2_draw.h
│ │ │ ├── b2_dynamic_tree.h
│ │ │ ├── b2_edge_shape.h
│ │ │ ├── b2_fixture.h
│ │ │ ├── b2_friction_joint.h
│ │ │ ├── b2_gear_joint.h
│ │ │ ├── b2_growable_stack.h
│ │ │ ├── b2_joint.h
│ │ │ ├── b2_math.h
│ │ │ ├── b2_motor_joint.h
│ │ │ ├── b2_mouse_joint.h
│ │ │ ├── b2_polygon_shape.h
│ │ │ ├── b2_prismatic_joint.h
│ │ │ ├── b2_pulley_joint.h
│ │ │ ├── b2_revolute_joint.h
│ │ │ ├── b2_rope.h
│ │ │ ├── b2_settings.h
│ │ │ ├── b2_shape.h
│ │ │ ├── b2_stack_allocator.h
│ │ │ ├── b2_time_of_impact.h
│ │ │ ├── b2_time_step.h
│ │ │ ├── b2_timer.h
│ │ │ ├── b2_types.h
│ │ │ ├── b2_weld_joint.h
│ │ │ ├── b2_wheel_joint.h
│ │ │ ├── b2_world.h
│ │ │ ├── b2_world_callbacks.h
│ │ │ └── box2d.h
│ │ └── lib
│ │ ├── box2d.lib
│ │ └── debug
│ │ └── box2d.lib
├── PSAGameFramework.cpp
├── PSAGameFramework.sln
├── PSAGameFramework.vcxproj
├── PSAGameFramework.vcxproj.filters
├── PSAGameFramework.vcxproj.user
├── PSAGameFrameworkCore
│ ├── CoreFramework
│ │ ├── GraphicsEngine
│ │ │ ├── ParticleGenerator
│ │ │ │ ├── particle_generator_drift.cpp
│ │ │ │ ├── particle_generator_points.cpp
│ │ │ │ └── particle_generator_shape.cpp
│ │ │ ├── psag_graphics_engine.h
│ │ │ ├── psag_graphics_engine_data.cpp
│ │ │ ├── psag_graphics_engine_fx.cpp
│ │ │ ├── psag_graphics_engine_particle.cpp
│ │ │ ├── psag_graphics_engine_script.cpp
│ │ │ └── psag_graphics_engine_system.cpp
│ │ ├── PhysicsEngine
│ │ │ ├── psag_physics_engine.cpp
│ │ │ └── psag_physics_engine.h
│ │ ├── ToolkitsEngine
│ │ │ ├── psag_toolkits_engine.h
│ │ │ ├── psag_toolkits_engine_camera.cpp
│ │ │ ├── psag_toolkits_engine_noise.hpp
│ │ │ ├── psag_toolkits_engine_notify.hpp
│ │ │ ├── psag_toolkits_engine_pawn.cpp
│ │ │ ├── psag_toolkits_engine_random.cpp
│ │ │ ├── psag_toolkits_engine_sound.cpp
│ │ │ ├── psag_toolkits_engine_timer.cpp
│ │ │ └── psag_toolkits_engine_uiext.cpp
│ │ ├── psag_core_drivers.cpp
│ │ ├── psag_core_drivers.h
│ │ ├── psag_core_drivers_anim.cpp
│ │ ├── psag_core_drivers_class.cpp
│ │ ├── psag_core_drivers_config.cpp
│ │ ├── psag_core_drivers_registry.cpp
│ │ ├── psag_core_drivers_spport.cpp
│ │ └── psag_lowlevel_support.h
│ ├── CoreGameActor
│ │ ├── psag_actor_global_atomic.cpp
│ │ ├── psag_actor_global_atomic.h
│ │ ├── psag_actor_module.hpp
│ │ ├── psag_actor_module_actor.cpp
│ │ ├── psag_actor_module_components.cpp
│ │ ├── psag_actor_module_debug.cpp
│ │ ├── psag_actor_module_envmt.cpp
│ │ ├── psag_actor_module_manager.cpp
│ │ ├── psag_actor_module_script.cpp
│ │ └── psag_actor_module_shader.cpp
│ ├── CoreGameManager
│ │ ├── psag_manager_module.hpp
│ │ ├── psag_manager_module_files.cpp
│ │ ├── psag_manager_module_final.cpp
│ │ ├── psag_manager_module_fx.cpp
│ │ └── psag_manager_module_maths.cpp
│ ├── CoreShaderScript
│ │ ├── private
│ │ │ ├── psag_graph_background.frag
│ │ │ ├── psag_graph_final.frag
│ │ │ ├── psag_graph_final_blurh.frag
│ │ │ ├── psag_graph_final_blurv.frag
│ │ │ ├── psag_graph_final_multfilter.frag
│ │ │ ├── psag_graph_final_vollight.frag
│ │ │ ├── psag_graph_fx_sequence.frag
│ │ │ └── psag_graph_particle.frag
│ │ └── public
│ │ │ ├── psag_graph_header.frag
│ │ │ ├── psag_graph_template.vert
│ │ │ ├── psag_graph_template_actor.vert
│ │ │ └── psag_graph_tools.frag
│ ├── FrameDebug
│ │ ├── psag_frame_debug.hpp
│ │ ├── psag_frame_debug_capture.cpp
│ │ └── psag_frame_debug_thread.cpp
│ ├── LLDefine
│ │ ├── framework_def_header.h
│ │ └── framework_def_math.hpp
│ ├── LLFilesys
│ │ ├── decode_channels
│ │ │ ├── framework_channels_json.cpp
│ │ │ └── framework_channels_string.cpp
│ │ ├── framework_filesys_compress.cpp
│ │ ├── framework_filesys_compress.h
│ │ ├── framework_filesys_dec_channels.h
│ │ ├── framework_filesys_loader.cpp
│ │ └── framework_filesys_loader.hpp
│ ├── LLGraphics
│ │ ├── LLGraphicsOpenGL
│ │ │ ├── psaglow_opengl.hpp
│ │ │ ├── psaglow_opengl_imageload.cpp
│ │ │ ├── psaglow_opengl_manager.cpp
│ │ │ ├── psaglow_opengl_manager_tex.cpp
│ │ │ └── psaglow_opengl_resource.cpp
│ │ ├── LLGraphicsResource
│ │ │ ├── framework_psaglow_resource.cpp
│ │ │ └── framework_psaglow_resource.hpp
│ │ ├── framework_renderer.h
│ │ ├── framework_renderer_ext.h
│ │ └── framework_renderer_std.h
│ ├── LLLogger
│ │ ├── framework_logger.cpp
│ │ └── framework_logger.hpp
│ ├── LLSound
│ │ ├── framework_sound.h
│ │ ├── framework_sound_cache.cpp
│ │ └── framework_sound_player.cpp
│ ├── LLThread
│ │ ├── framework_thread.hpp
│ │ ├── framework_thread_pool.cpp
│ │ ├── framework_thread_simd.cpp
│ │ └── framework_thread_simd.hpp
│ ├── LLWindowGui
│ │ ├── framework_window.h
│ │ ├── framework_window_imgui.cpp
│ │ ├── framework_window_imgui_ms.h
│ │ ├── framework_window_imgui_tools.cpp
│ │ ├── framework_window_system.cpp
│ │ └── framework_window_win32.cpp
│ ├── framework_config.json
│ ├── framework_config_shaders.json
│ ├── framework_header_actor.h
│ ├── framework_header_manager.h
│ ├── framework_init_config.cpp
│ └── framework_init_register.cpp
├── PSAGameFrameworkDev
│ ├── GameLab
│ │ ├── psag_game_lab.cpp
│ │ └── psag_game_lab.h
│ ├── GameZeroProject
│ │ ├── GameMaterial
│ │ │ ├── psagame2d
│ │ │ │ ├── PSAGame2D0.png
│ │ │ │ ├── PSAGame2D1.png
│ │ │ │ └── PSAGame2D2.png
│ │ │ ├── zpgame_bullet.png
│ │ │ ├── zpgame_gui
│ │ │ │ ├── zpgame_gui_b0.png
│ │ │ │ ├── zpgame_gui_b1.png
│ │ │ │ ├── zpgame_gui_b2.png
│ │ │ │ ├── zpgame_gui_b3.png
│ │ │ │ ├── zpgame_gui_b4.png
│ │ │ │ └── zpgame_gui_b5.png
│ │ │ ├── zpgame_npc_a.png
│ │ │ ├── zpgame_particle_a.png
│ │ │ ├── zpgame_ppactor_nor.png
│ │ │ ├── zpgame_wall_h.png
│ │ │ └── zpgame_wall_v.png
│ │ ├── NewYearFireworks.zip
│ │ ├── base_define_header.cpp
│ │ ├── base_define_header.hpp
│ │ ├── zero_project_bullet.cpp
│ │ ├── zero_project_bullet.h
│ │ ├── zero_project_bullet_fx.cpp
│ │ ├── zero_project_gui.cpp
│ │ ├── zero_project_gui.h
│ │ ├── zero_project_pawn.cpp
│ │ ├── zero_project_pawn.h
│ │ ├── zero_project_pawn_glsl.cpp
│ │ ├── zero_project_pawn_npc.cpp
│ │ ├── zero_project_scene.cpp
│ │ ├── zero_project_scene.h
│ │ └── zero_project_scene_glsl.cpp
│ └── PSAGameUserActorV2
│ │ ├── ActorShipV2.psd
│ │ ├── ActorV2.png
│ │ └── ActorV2_HDR.png
├── PSAGameHDR12-TEST
│ ├── PSAG_HDR_TEST.png
│ └── PSAG_HDR_TEST_BLEND.png
├── PSAGameSystemFiles
│ ├── ExternalModulePathlist.json
│ ├── JetBrainsMonoBold.ttf
│ ├── PomeloStarLogo.png
│ └── YouSheBiaoTiHei.ttf
├── imgui.ini
└── x64
│ ├── Debug
│ ├── PSAGameFramework.exe.recipe
│ └── PSAGameFramework.vcxproj.FileListAbsolute.txt
│ └── Release
│ ├── PSAGameFramework.exe.recipe
│ └── PSAGameFramework.vcxproj.FileListAbsolute.txt
├── PSAGameThirdPartyLicenses
├── AUDIERE_LICENSE.md
├── BASE64_LICENSE.md
├── BOX2D_LICENSE.md
├── GLEW_LICENSE.md
├── GLFW_LICENSE.md
├── GLM_LICENSE.md
├── IMGUI_LICENSE.md
├── RAPIDJSON_LICENSE.md
├── STB_LIBRARIES_LICENSE.md
└── ZLIB_LICENSE.md
├── README.md
└── x64
├── Debug
├── OpenAL32.dll
├── glew32.dll
├── glfw3.dll
├── imgui.ini
└── zlibwapi.dll
└── Release
├── OpenAL32.dll
├── glew32.dll
├── glfw3.dll
├── imgui.ini
└── zlibwapi.dll
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | # *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | # *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
34 | # PSAGame2D
35 |
36 | /.vs
37 |
38 | *.tlog
39 | *.obj
40 | *.iobj
41 | *.exp
42 | *.log
43 | *.bat
44 | *.vsidx
45 | *.gitattributes
46 | *.ilk
47 | *.pdb
48 | *.idb
49 | *.lastbuildstate
50 |
51 | *.ftbp
52 | *.ftbt
53 | *.ftbf
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 ཫཌཟRCSZཇདཀ
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/PSAGameDesigns/EngineLayersArch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/EngineLayersArch.png
--------------------------------------------------------------------------------
/PSAGameDesigns/PSAGame2D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/PSAGame2D.png
--------------------------------------------------------------------------------
/PSAGameDesigns/PSAGame2DHeader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/PSAGame2DHeader.png
--------------------------------------------------------------------------------
/PSAGameDesigns/PSAGame2Dv20241002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/PSAGame2Dv20241002.png
--------------------------------------------------------------------------------
/PSAGameDesigns/PSAGame2Dv20250130.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/PSAGame2Dv20250130.png
--------------------------------------------------------------------------------
/PSAGameDesigns/PSAGame2Dv20250224.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/PSAGame2Dv20250224.png
--------------------------------------------------------------------------------
/PSAGameDesigns/PSAGameGraphicsSTD.md:
--------------------------------------------------------------------------------
1 | # PSA Game2D Graphics STD
2 | > ©PomeloStar Studio 2024-2025 (2024.05.12)
3 |
4 | - __Developers:__ ```RCSZ```
5 | - __Update:__ ```2024.08.06``` __Version:__ ```0.1.2```
6 |
7 | ---
8 |
9 | ### PSAG GL-VERT
10 | > 规定图形底层 顶点组的 属性 / 数据结构.
11 |
12 | ```
13 | GL_VERT_01: VEC3 (位置), VEC4 (颜色), VEC2 (纹理), VEC3 (法线)
14 |
15 | 顶点组数据大小: 48 Bytes
16 | 顶点组内存布局: [连续].12.16.8.12
17 |
18 | GL_VERT_02: VEC3 (位置), VEC2 (纹理)
19 |
20 | 顶点组数据大小: 20 Bytes
21 | 顶点组内存布局: [连续].12.8
22 | ```
23 |
24 | ### PSAG GL-TEX
25 | > 规定图形底层 纹理的 结构参数 / 过滤.
26 |
27 | ```
28 | GL_TEX_01: DataFormat.UNISGNED_BYTES
29 |
30 | 纹理像素数据格式: 8位无符号整型"uint8_t"
31 | 纹理像素颜色排列: [连续].0(1,2,3...).1(1,2,3...)
32 |
33 | GL_TEX_02: RGBA8888
34 |
35 | 纹理像素(颜色)格式: 内部统一采用单色8位二进制分量, RGBA格式, 32 Bytes
36 | 纹理像素(颜色)限值: 0,255 (0x00,0xff)
37 |
38 | GL_TEX_03: RGB_AHPLA_FILL
39 |
40 | RGB纹理处理方式: 重组像素数据, 填充Ahpla通道为255(0xff)
41 |
42 | GL_TEX_04: FILTER_MODE
43 |
44 | 纹理过滤方式: 邻近过滤, 线性过滤, 各向异性过滤, Mipmap过滤
45 |
46 | (2024.08.06) [修订] GL_TEX_02: HDR12
47 |
48 | 纹理像素(颜色)格式: 内部统一采用HDR12颜色模式, RGBA颜色通道
49 | 纹理像素(颜色)限值: 0,4095 (0x000,0xfff)
50 | ```
51 |
52 | ### PSAG GL-TEX-ATTR
53 | > 规定图形底层 纹理的 类型.
54 |
55 | ```
56 | GL_TEX_ATTR_01: SamplerTexture(Array)
57 |
58 | 底层纹理类型: 纹理数组, 中层管理分配纹理采样器
59 | 资源管理方式: LLRES底层管理, 图形引擎中层管理 (virtual texture)
60 | 框架纹理用途: 着色器纹理数据操作
61 |
62 | GL_TEX_ATTR_02: ViewTexture2D
63 |
64 | 底层纹理类型: 单个纹理, 不分配纹理采样器
65 | 资源管理方式: 图形引擎中层管理句柄
66 | 框架纹理用途: 加载/捕获 图像提交UI(ImGui)显示
67 | ```
68 |
69 | ### PSAG GL-RENDER
70 | > 规定渲染模式.
71 |
72 | ```
73 | GL_RENDER_01: Projection.Matrix ORTHO
74 |
75 | 2D渲染采用正交视图
76 |
77 | GL_RENDER_02: ORTHO.Layers
78 |
79 | 渲染层级(Z)顺序: 远离屏幕 -z <=> +z 靠近屏幕
80 |
81 | 内部后期处理采用Z坐标裁剪 +-10.0f (系统背景-10.0f, 后期图像处理+10.0f)
82 | Actor渲染采用Z坐标裁剪 +- 100.0f
83 | 建议(Actor): 50.0f ~ 100.0f
84 | 建议(Actor.Brick): 1.0f ~ 45.0f
85 | ```
--------------------------------------------------------------------------------
/PSAGameDesigns/RendererArch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/RendererArch.png
--------------------------------------------------------------------------------
/PSAGameDesigns/VertexGroupArch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/VertexGroupArch.png
--------------------------------------------------------------------------------
/PSAGameDesigns/VirtualTextureArch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDesigns/VirtualTextureArch.png
--------------------------------------------------------------------------------
/PSAGameDoc/DOC_EXP_MODULES/EXP_MOD_cpu_particle_system.md:
--------------------------------------------------------------------------------
1 | # EXP MOD cpu particle system
2 |
3 | > psagame2d framework graph-cpu-particles @rcsz
4 |
5 | - __Time:__ 2025.02.26
6 | - __Overview:__ 因为这是一个2D游戏框架, CPU粒子系统作为核心之一也尤为重要, 目前在开发CPU粒子系统遇到了一些, 后台线程与前台粒子系统的性能瓶颈和问题.
7 |
8 | ---
9 |
10 | 首先先贴一张 粒子系统 前台/后台 简易架构图 (注意一些细节以及状态采样部分没有绘制进去)
11 |
12 |
13 |
14 |
15 |
16 | > 以下提到框架源码位置仅为 V1.2.7.20250227 版本
17 |
18 | 前台帧 (游戏帧): FFrame, 后台帧率 (CycleTick): BFrame
19 |
20 | 1. 因为主线程的负载已经较高, 所以CPU粒子系统方案为 前台绘制-后台计算 的模型, 每个粒子系统实例的实体计算和顶点转换运行在一个独立线程中.
21 | 2. 粒子发射部分, 每个发射器一次性创建的粒子数据为Group, 每个Group由前台线程Push给后台队列进行排队, 后台队列中通常会有多个Group排队, 但是每BFrame只会取出一个Group插入到粒子数据集, 实际上也是为了负载均衡考虑, 在每个后台Tick中会根据粒子实体属性进行计算. [SourceFile](../../PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_particle.cpp): `247~253` `292~302`
22 | 3. 计算完成后检查前台读取状态, 读取完成后会进行 粒子实体 到 VAO顶点数据格式的数据转换 (EntityToVertex 暂时简称为 ETV), 并且交换数据缓冲区, 如果前台没有读取完成那么依然会进行下一次计算, 但是不会进行 ETV 数据转换. [SourceFile](../../PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_particle.cpp): `215~235` `304~320`
23 | 4. 前台读取完成后会修改状态标志通知后台线程进行 ETV 和交换缓冲, 前台数据直接通过框架的底层模块提交渲染, 这里不过多讨论. [SourceFile](../../PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_particle.cpp): `404~410`
24 |
25 | - 目前所出现的问题是在粒子发射器发射速度过快 (测试平台中 < 12ms 每轮), 会出现粒子加载堆积形成的延迟问题, 即前台Game事件与粒子实际提交渲染出效果的时间间隔过大.
26 | - 前台与后台帧率波动差值过大, 后台在无粒子状态下甚至能做到 10us/cycles 但是当粒子负载达到4000以上后有接近300倍差值, 之前考虑过做速率限制, 但是一直呈现不规则速率曲线没有较好的方案, 并且 TimeSetp 也需要严格控制.
27 | - 附上一些之前进行 CPU-ParticleSystem 测试的 Intel VTune 测试结果信息.
28 |
29 | 
30 | 
31 | 
32 |
33 | 其实挺抽象的, 计算线程的 CPU TIME 占了总测试的 70% 时长, 其中粒子计算超过 50%, 也可以看出编译器做出了 SSE 指令集的 SIMD 优化. 当然测试项目 Demo 为压力测试, 不具备太大的实际开发意义.
34 |
35 | ---
36 |
37 | `20250227` `RCSZ`
--------------------------------------------------------------------------------
/PSAGameDoc/DOC_EXP_MODULES/INDEX.md:
--------------------------------------------------------------------------------
1 | # 实验性 核心模块 & 扩展模块 研究
2 |
3 | > PSAGame2D 框架公共实验研究模块 数据/方案 讨论文档.
4 |
5 | __START__ `20250225` __UPDATE__ `20250227` `RCSZ`
6 |
7 | __NOTES:__
8 | ```
9 | [20250226]: 框架图形引擎-粒子系统-CPU粒子 后台线程数据交换优化.
10 | ```
11 |
12 | ---
13 |
14 | ### MODULES DOC
15 |
16 | | Module Name | DOC | Update |
17 | |-------------|-----|--------|
18 | | CPU-ParticleSystem | [GOTO](EXP_MOD_cpu_particle_system.md) | 2025.02.27 |
--------------------------------------------------------------------------------
/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE.png
--------------------------------------------------------------------------------
/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE/1.png
--------------------------------------------------------------------------------
/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE/2.png
--------------------------------------------------------------------------------
/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameDoc/DOC_EXP_MODULES/PSAG_CPU_PARTICLE/3.png
--------------------------------------------------------------------------------
/PSAGameFramework.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.6.33829.357
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PSAGameFramework", "PSAGameFramework\PSAGameFramework.vcxproj", "{F047AD81-29D9-4812-872B-4A6C97C48D5E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x64.ActiveCfg = Debug|x64
17 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x64.Build.0 = Debug|x64
18 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x86.ActiveCfg = Debug|Win32
19 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x86.Build.0 = Debug|Win32
20 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x64.ActiveCfg = Release|x64
21 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x64.Build.0 = Release|x64
22 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x86.ActiveCfg = Release|Win32
23 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {0678823C-9A04-47DA-A6B7-EDAA6F53B568}
30 | EndGlobalSection
31 | GlobalSection(CppDepend) = preSolution
32 | Project = ".\PSAGameFramework.cdproj"
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/Base64/base64/base64.h:
--------------------------------------------------------------------------------
1 | //
2 | // base64 encoding and decoding with C++.
3 | // Version: 2.rc.09 (release candidate)
4 | //
5 |
6 | #ifndef BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
7 | #define BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
8 |
9 | #include
10 |
11 | #if __cplusplus >= 201703L
12 | #include
13 | #endif // __cplusplus >= 201703L
14 |
15 | std::string base64_encode (std::string const& s, bool url = false);
16 | std::string base64_encode_pem (std::string const& s);
17 | std::string base64_encode_mime(std::string const& s);
18 |
19 | std::string base64_decode(std::string const& s, bool remove_linebreaks = false);
20 | std::string base64_encode(unsigned char const*, size_t len, bool url = false);
21 |
22 | #if __cplusplus >= 201703L
23 | //
24 | // Interface with std::string_view rather than const std::string&
25 | // Requires C++17
26 | // Provided by Yannic Bonenberger (https://github.com/Yannic)
27 | //
28 | std::string base64_encode (std::string_view s, bool url = false);
29 | std::string base64_encode_pem (std::string_view s);
30 | std::string base64_encode_mime(std::string_view s);
31 |
32 | std::string base64_decode(std::string_view s, bool remove_linebreaks = false);
33 | #endif // __cplusplus >= 201703L
34 |
35 | #endif /* BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A */
36 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/OpenAL/libs/Win64/EFX-Util_MT/EFX-Util.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/OpenAL/libs/Win64/EFX-Util_MT/EFX-Util.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/OpenAL/libs/Win64/EFX-Util_MTDLL/EFX-Util.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/OpenAL/libs/Win64/EFX-Util_MTDLL/EFX-Util.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/OpenAL/libs/Win64/OpenAL32.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/OpenAL/libs/Win64/OpenAL32.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/RapidJSON/include/internal/clzll.h:
--------------------------------------------------------------------------------
1 | // Tencent is pleased to support the open source community by making RapidJSON available.
2 | //
3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
4 | //
5 | // Licensed under the MIT License (the "License"); you may not use this file except
6 | // in compliance with the License. You may obtain a copy of the License at
7 | //
8 | // http://opensource.org/licenses/MIT
9 | //
10 | // Unless required by applicable law or agreed to in writing, software distributed
11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13 | // specific language governing permissions and limitations under the License.
14 |
15 | #ifndef RAPIDJSON_CLZLL_H_
16 | #define RAPIDJSON_CLZLL_H_
17 |
18 | #include "../rapidjson.h"
19 |
20 | #if defined(_MSC_VER) && !defined(UNDER_CE)
21 | #include
22 | #if defined(_WIN64)
23 | #pragma intrinsic(_BitScanReverse64)
24 | #else
25 | #pragma intrinsic(_BitScanReverse)
26 | #endif
27 | #endif
28 |
29 | RAPIDJSON_NAMESPACE_BEGIN
30 | namespace internal {
31 |
32 | inline uint32_t clzll(uint64_t x) {
33 | // Passing 0 to __builtin_clzll is UB in GCC and results in an
34 | // infinite loop in the software implementation.
35 | RAPIDJSON_ASSERT(x != 0);
36 |
37 | #if defined(_MSC_VER) && !defined(UNDER_CE)
38 | unsigned long r = 0;
39 | #if defined(_WIN64)
40 | _BitScanReverse64(&r, x);
41 | #else
42 | // Scan the high 32 bits.
43 | if (_BitScanReverse(&r, static_cast(x >> 32)))
44 | return 63 - (r + 32);
45 |
46 | // Scan the low 32 bits.
47 | _BitScanReverse(&r, static_cast(x & 0xFFFFFFFF));
48 | #endif // _WIN64
49 |
50 | return 63 - r;
51 | #elif (defined(__GNUC__) && __GNUC__ >= 4) || RAPIDJSON_HAS_BUILTIN(__builtin_clzll)
52 | // __builtin_clzll wrapper
53 | return static_cast(__builtin_clzll(x));
54 | #else
55 | // naive version
56 | uint32_t r = 0;
57 | while (!(x & (static_cast(1) << 63))) {
58 | x <<= 1;
59 | ++r;
60 | }
61 |
62 | return r;
63 | #endif // _MSC_VER
64 | }
65 |
66 | #define RAPIDJSON_CLZLL RAPIDJSON_NAMESPACE::internal::clzll
67 |
68 | } // namespace internal
69 | RAPIDJSON_NAMESPACE_END
70 |
71 | #endif // RAPIDJSON_CLZLL_H_
72 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/RapidJSON/include/internal/swap.h:
--------------------------------------------------------------------------------
1 | // Tencent is pleased to support the open source community by making RapidJSON available.
2 | //
3 | // Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
4 | //
5 | // Licensed under the MIT License (the "License"); you may not use this file except
6 | // in compliance with the License. You may obtain a copy of the License at
7 | //
8 | // http://opensource.org/licenses/MIT
9 | //
10 | // Unless required by applicable law or agreed to in writing, software distributed
11 | // under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12 | // CONDITIONS OF ANY KIND, either express or implied. See the License for the
13 | // specific language governing permissions and limitations under the License.
14 |
15 | #ifndef RAPIDJSON_INTERNAL_SWAP_H_
16 | #define RAPIDJSON_INTERNAL_SWAP_H_
17 |
18 | #include "../rapidjson.h"
19 |
20 | #if defined(__clang__)
21 | RAPIDJSON_DIAG_PUSH
22 | RAPIDJSON_DIAG_OFF(c++98-compat)
23 | #endif
24 |
25 | RAPIDJSON_NAMESPACE_BEGIN
26 | namespace internal {
27 |
28 | //! Custom swap() to avoid dependency on C++ header
29 | /*! \tparam T Type of the arguments to swap, should be instantiated with primitive C++ types only.
30 | \note This has the same semantics as std::swap().
31 | */
32 | template
33 | inline void Swap(T& a, T& b) RAPIDJSON_NOEXCEPT {
34 | T tmp = a;
35 | a = b;
36 | b = tmp;
37 | }
38 |
39 | } // namespace internal
40 | RAPIDJSON_NAMESPACE_END
41 |
42 | #if defined(__clang__)
43 | RAPIDJSON_DIAG_POP
44 | #endif
45 |
46 | #endif // RAPIDJSON_INTERNAL_SWAP_H_
47 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/Zlib/lib/zlibwapi.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/Zlib/lib/zlibwapi.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/Zlib/zlibwapi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/FiletoolsLibrary/Zlib/zlibwapi.dll
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/bin/Release/Win32/glew32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/bin/Release/Win32/glew32.dll
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/bin/Release/x64/glew32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/bin/Release/x64/glew32.dll
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/Win32/glew32.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/Win32/glew32.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/Win32/glew32s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/Win32/glew32s.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/x64/glew32.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/x64/glew32.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/x64/glew32s.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glew_library/lib/Release/x64/glew32s.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3.dll
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3_mt.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3_mt.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3dll.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glfw_library/lib-vc2019/glfw3dll.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/_fixes.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/_fixes.hpp
25 | /// @date 2011-02-21 / 2011-11-22
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #include
30 |
31 | //! Workaround for compatibility with other libraries
32 | #ifdef max
33 | #undef max
34 | #endif
35 |
36 | //! Workaround for compatibility with other libraries
37 | #ifdef min
38 | #undef min
39 | #endif
40 |
41 | //! Workaround for Android
42 | #ifdef isnan
43 | #undef isnan
44 | #endif
45 |
46 | //! Workaround for Android
47 | #ifdef isinf
48 | #undef isinf
49 | #endif
50 |
51 | //! Workaround for Chrone Native Client
52 | #ifdef log2
53 | #undef log2
54 | #endif
55 |
56 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/dummy.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/dummy.cpp
25 | /// @date 2011-01-19 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///
28 | /// GLM is a header only library. There is nothing to compile.
29 | /// dummy.cpp exist only a wordaround for CMake file.
30 | ///////////////////////////////////////////////////////////////////////////////////
31 |
32 | #define GLM_MESSAGES
33 | #include "../glm.hpp"
34 | #include "../ext.hpp"
35 |
36 | //#error "GLM is a header only library"
37 |
38 | int main()
39 | {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/hint.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/hint.hpp
25 | /// @date 2008-08-14 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_core_type
30 | #define glm_core_type
31 |
32 | namespace glm
33 | {
34 | // Use dont_care, nicest and fastest to optimize implementations.
35 | class dont_care {};
36 | class nicest {};
37 | class fastest {};
38 | }//namespace glm
39 |
40 | #endif//glm_core_type
41 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/intrinsic_exponential.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/intrinsic_exponential.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/intrinsic_trigonometric.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/intrinsic_trigonometric.hpp
25 | /// @date 2009-06-09 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_detail_intrinsic_trigonometric
30 | #define glm_detail_intrinsic_trigonometric
31 |
32 | #include "setup.hpp"
33 |
34 | #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
35 | # error "SSE2 instructions not supported or enabled"
36 | #else
37 |
38 | namespace glm{
39 | namespace detail
40 | {
41 |
42 | }//namespace detail
43 | }//namespace glm
44 |
45 | #include "intrinsic_trigonometric.inl"
46 |
47 | #endif//GLM_ARCH
48 | #endif//glm_detail_intrinsic_trigonometric
49 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/intrinsic_trigonometric.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/intrinsic_trigonometric.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/intrinsic_vector_relational.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/intrinsic_vector_relational.hpp
25 | /// @date 2009-06-09 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_detail_intrinsic_vector_relational
30 | #define glm_detail_intrinsic_vector_relational
31 |
32 | #include "setup.hpp"
33 |
34 | #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
35 | # error "SSE2 instructions not supported or enabled"
36 | #else
37 |
38 | namespace glm{
39 | namespace detail
40 | {
41 |
42 | }//namespace detail
43 | }//namespace glm
44 |
45 | #include "intrinsic_vector_relational.inl"
46 |
47 | #endif//GLM_ARCH
48 | #endif//glm_detail_intrinsic_vector_relational
49 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/type_half.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/type_half.inl
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/type_mat.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/type_mat.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/type_size.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/type_size.hpp
25 | /// @date 2008-10-05 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_core_type_size
30 | #define glm_core_type_size
31 |
32 | #include
33 |
34 | namespace glm{
35 | namespace detail
36 | {
37 | //typedef std::size_t size_t;
38 | typedef int sizeType;
39 |
40 | }//namespace detail
41 | }//namespace glm
42 |
43 | #endif//glm_core_type_size
44 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/type_vec.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/type_vec.hpp
25 | /// @date 2010-01-26 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_core_type_vec
30 | #define glm_core_type_vec
31 |
32 | #include "type_gentype.hpp"
33 |
34 | namespace glm{
35 | namespace detail
36 | {
37 |
38 | }//namespace detail
39 | }//namespace glm
40 |
41 | #endif//glm_core_type_vec
42 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/core/type_vec.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/core/type_vec.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtc/type_precision.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref gtc_swizzle
24 | /// @file glm/gtc/swizzle.inl
25 | /// @date 2009-06-14 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | namespace glm
30 | {
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/color_space_YCoCg.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2008-10-28
5 | // Updated : 2008-10-28
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/color_space_YCoCg.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg
14 | (
15 | detail::tvec3 const & rgbColor
16 | )
17 | {
18 | detail::tvec3 result;
19 | result.x/*Y */ = rgbColor.r / valType(4) + rgbColor.g / valType(2) + rgbColor.b / valType(4);
20 | result.y/*Co*/ = rgbColor.r / valType(2) + rgbColor.g * valType(0) - rgbColor.b / valType(2);
21 | result.z/*Cg*/ = - rgbColor.r / valType(4) + rgbColor.g / valType(2) - rgbColor.b / valType(4);
22 | return result;
23 | }
24 |
25 | template
26 | GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR
27 | (
28 | detail::tvec3 const & rgbColor
29 | )
30 | {
31 | detail::tvec3 result;
32 | result.x/*Y */ = rgbColor.g / valType(2) + (rgbColor.r + rgbColor.b) / valType(4);
33 | result.y/*Co*/ = rgbColor.r - rgbColor.b;
34 | result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / valType(2);
35 | return result;
36 | }
37 |
38 | template
39 | GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb
40 | (
41 | detail::tvec3 const & YCoCgColor
42 | )
43 | {
44 | detail::tvec3 result;
45 | result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;
46 | result.g = YCoCgColor.x + YCoCgColor.z;
47 | result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z;
48 | return result;
49 | }
50 |
51 | template
52 | GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb
53 | (
54 | detail::tvec3 const & YCoCgRColor
55 | )
56 | {
57 | detail::tvec3 result;
58 | valType tmp = YCoCgRColor.x - (YCoCgRColor.z / valType(2));
59 | result.g = YCoCgRColor.z + tmp;
60 | result.b = tmp - (YCoCgRColor.y / valType(2));
61 | result.r = result.b + YCoCgRColor.y;
62 | return result;
63 | }
64 | }//namespace glm
65 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/compatibility.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2007-03-16
5 | // Updated : 2008-10-24
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/compatibility.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | // isfinite
13 | template
14 | GLM_FUNC_QUALIFIER bool isfinite(
15 | genType const & x)
16 | {
17 | # if(GLM_COMPILER & GLM_COMPILER_VC)
18 | return _finite(x);
19 | # elif(GLM_COMPILER & GLM_COMPILER_GCC)
20 | # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
21 | return _isfinite(x) != 0;
22 | # else
23 | return std::isfinite(x) != 0;
24 | # endif
25 | # else
26 | return std::isfinite(x) != 0;
27 | # endif
28 |
29 | }
30 |
31 | template
32 | GLM_FUNC_QUALIFIER detail::tvec2 isfinite(
33 | detail::tvec2 const & x)
34 | {
35 | return detail::tvec2(
36 | isfinite(x.x),
37 | isfinite(x.y));
38 | }
39 |
40 | template
41 | GLM_FUNC_QUALIFIER detail::tvec3 isfinite(
42 | detail::tvec3 const & x)
43 | {
44 | return detail::tvec3(
45 | isfinite(x.x),
46 | isfinite(x.y),
47 | isfinite(x.z));
48 | }
49 |
50 | template
51 | GLM_FUNC_QUALIFIER detail::tvec4 isfinite(
52 | detail::tvec4 const & x)
53 | {
54 | return detail::tvec4(
55 | isfinite(x.x),
56 | isfinite(x.y),
57 | isfinite(x.z),
58 | isfinite(x.w));
59 | }
60 |
61 | }//namespace glm
62 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/component_wise.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2007-05-21
5 | // Updated : 2010-02-12
6 | // Licence : This source is under MIT License
7 | // File : gtx_component_wise.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v)
14 | {
15 | typename genType::size_type result = typename genType::value_type(0);
16 | for(typename genType::size_type i = 0; i < v.length(); ++i)
17 | result += v[i];
18 | return result;
19 | }
20 |
21 | template
22 | GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v)
23 | {
24 | typename genType::value_type result = typename genType::value_type(1);
25 | for(typename genType::size_type i = 0; i < v.length(); ++i)
26 | result *= v[i];
27 | return result;
28 | }
29 |
30 | template
31 | GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v)
32 | {
33 | typename genType::value_type result = typename genType::value_type(v[0]);
34 | for(typename genType::size_type i = 1; i < v.length(); ++i)
35 | result = min(result, v[i]);
36 | return result;
37 | }
38 |
39 | template
40 | GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v)
41 | {
42 | typename genType::value_type result = typename genType::value_type(v[0]);
43 | for(typename genType::size_type i = 1; i < v.length(); ++i)
44 | result = max(result, v[i]);
45 | return result;
46 | }
47 | }//namespace glm
48 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/extend.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2006-01-07
5 | // Updated : 2008-10-05
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/extend.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | genType extend
14 | (
15 | genType const & Origin,
16 | genType const & Source,
17 | genType const & Distance
18 | )
19 | {
20 | return Origin + (Source - Origin) * Distance;
21 | }
22 |
23 | template
24 | detail::tvec2 extend
25 | (
26 | detail::tvec2 const & Origin,
27 | detail::tvec2 const & Source,
28 | valType const & Distance
29 | )
30 | {
31 | return Origin + (Source - Origin) * Distance;
32 | }
33 |
34 | template
35 | detail::tvec3 extend
36 | (
37 | detail::tvec3 const & Origin,
38 | detail::tvec3 const & Source,
39 | valType const & Distance
40 | )
41 | {
42 | return Origin + (Source - Origin) * Distance;
43 | }
44 |
45 | template
46 | detail::tvec4 extend
47 | (
48 | detail::tvec4 const & Origin,
49 | detail::tvec4 const & Source,
50 | valType const & Distance
51 | )
52 | {
53 | return Origin + (Source - Origin) * Distance;
54 | }
55 | }//namespace glm
56 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/gradient_paint.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2009-03-06
5 | // Updated : 2009-03-09
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/gradient_paint.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | valType radialGradient
14 | (
15 | detail::tvec2 const & Center,
16 | valType const & Radius,
17 | detail::tvec2 const & Focal,
18 | detail::tvec2 const & Position
19 | )
20 | {
21 | detail::tvec2 F = Focal - Center;
22 | detail::tvec2 D = Position - Focal;
23 | valType Radius2 = pow2(Radius);
24 | valType Fx2 = pow2(F.x);
25 | valType Fy2 = pow2(F.y);
26 |
27 | valType Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x));
28 | valType Denominator = Radius2 - (Fx2 + Fy2);
29 | return Numerator / Denominator;
30 | }
31 |
32 | template
33 | valType linearGradient
34 | (
35 | detail::tvec2 const & Point0,
36 | detail::tvec2 const & Point1,
37 | detail::tvec2 const & Position
38 | )
39 | {
40 | detail::tvec2 Dist = Point1 - Point0;
41 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
42 | }
43 | }//namespace glm
44 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/log_base.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref gtx_log_base
24 | /// @file glm/gtx/log_base.hpp
25 | /// @date 2008-10-24 / 2011-06-07
26 | /// @author Christophe Riccio
27 | ///
28 | /// @see core (dependence)
29 | ///
30 | /// @defgroup gtx_log_base GLM_GTX_log_base: Log with base
31 | /// @ingroup gtx
32 | ///
33 | /// @brief Logarithm for any base. base can be a vector or a scalar.
34 | ///
35 | /// need to be included to use these functionalities.
36 | ///////////////////////////////////////////////////////////////////////////////////
37 |
38 | #ifndef GLM_GTX_log_base
39 | #define GLM_GTX_log_base GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
45 | # pragma message("GLM: GLM_GTX_log_base extension included")
46 | #endif
47 |
48 | namespace glm
49 | {
50 | /// @addtogroup gtx_log_base
51 | /// @{
52 |
53 | //! Logarithm for any base.
54 | //! From GLM_GTX_log_base.
55 | template
56 | genType log(
57 | genType const & x,
58 | genType const & base);
59 |
60 | /// @}
61 | }//namespace glm
62 |
63 | #include "log_base.inl"
64 |
65 | #endif//GLM_GTX_log_base
66 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/ocl_type.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/ocl_type.inl
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/optimum_pow.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-27
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/optimum_pow.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | GLM_FUNC_QUALIFIER genType pow2(const genType& x)
14 | {
15 | return x * x;
16 | }
17 |
18 | template
19 | GLM_FUNC_QUALIFIER genType pow3(const genType& x)
20 | {
21 | return x * x * x;
22 | }
23 |
24 | template
25 | GLM_FUNC_QUALIFIER genType pow4(const genType& x)
26 | {
27 | return x * x * x * x;
28 | }
29 |
30 | GLM_FUNC_QUALIFIER bool powOfTwo(int x)
31 | {
32 | return !(x & (x - 1));
33 | }
34 |
35 | GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(const detail::tvec2& x)
36 | {
37 | return detail::tvec2(
38 | powOfTwo(x.x),
39 | powOfTwo(x.y));
40 | }
41 |
42 | GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(const detail::tvec3& x)
43 | {
44 | return detail::tvec3(
45 | powOfTwo(x.x),
46 | powOfTwo(x.y),
47 | powOfTwo(x.z));
48 | }
49 |
50 | GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(const detail::tvec4& x)
51 | {
52 | return detail::tvec4(
53 | powOfTwo(x.x),
54 | powOfTwo(x.y),
55 | powOfTwo(x.z),
56 | powOfTwo(x.w));
57 | }
58 | }//namespace glm
59 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/simd_vec4.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/simd_vec4.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/unsigned_int.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///////////////////////////////////////////////////////////////////////////////////
23 |
24 | #if(defined(GLM_MESSAGES))
25 | # pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead")
26 | #endif
27 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/vec1.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/vec1.inl
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/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 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GraphicsLibrary/glm_library/include/glm/gtx/vector_angle.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-09-29
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/vector_angle.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | GLM_FUNC_QUALIFIER typename genType::value_type angle
14 | (
15 | genType const & x,
16 | genType const & y
17 | )
18 | {
19 | return degrees(acos(dot(x, y)));
20 | }
21 |
22 | //! \todo epsilon is hard coded to 0.01
23 | template
24 | GLM_FUNC_QUALIFIER valType orientedAngle
25 | (
26 | detail::tvec2 const & x,
27 | detail::tvec2 const & y
28 | )
29 | {
30 | valType Angle = glm::degrees(acos(dot(x, y)));
31 | detail::tvec2 TransformedVector = glm::rotate(x, Angle);
32 | if(all(equalEpsilon(y, TransformedVector, valType(0.01))))
33 | return Angle;
34 | else
35 | return -Angle;
36 | }
37 |
38 | template
39 | GLM_FUNC_QUALIFIER valType orientedAngle
40 | (
41 | detail::tvec3 const & x,
42 | detail::tvec3 const & y,
43 | detail::tvec3 const & ref
44 | )
45 | {
46 | valType Angle = glm::degrees(glm::acos(glm::dot(x, y)));
47 |
48 | if(glm::dot(ref, glm::cross(x, y)) < valType(0))
49 | return -Angle;
50 | else
51 | return Angle;
52 | }
53 | }//namespace glm
54 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/imgui_impl_opengl2.h:
--------------------------------------------------------------------------------
1 | // dear imgui: Renderer Backend for OpenGL2 (legacy OpenGL, fixed pipeline)
2 | // This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
3 |
4 | // Implemented features:
5 | // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID!
6 |
7 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
8 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
9 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
10 | // Read online: https://github.com/ocornut/imgui/tree/master/docs
11 |
12 | // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
13 | // **Prefer using the code in imgui_impl_opengl3.cpp**
14 | // This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
15 | // If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
16 | // complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
17 | // confuse your GPU driver.
18 | // The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
19 |
20 | #pragma once
21 | #include "imgui.h" // IMGUI_IMPL_API
22 |
23 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init();
24 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown();
25 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame();
26 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data);
27 |
28 | // Called by Init/NewFrame/Shutdown
29 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture();
30 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture();
31 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects();
32 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects();
33 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/README.txt:
--------------------------------------------------------------------------------
1 |
2 | misc/cpp/
3 | InputText() wrappers for C++ standard library (STL) type: std::string.
4 | This is also an example of how you may wrap your own similar types.
5 |
6 | misc/debuggers/
7 | Helper files for popular debuggers.
8 | With the .natvis file, types like ImVector<> will be displayed nicely in Visual Studio debugger.
9 |
10 | misc/fonts/
11 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts).
12 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code.
13 | Suggested fonts and links.
14 |
15 | misc/freetype/
16 | Font atlas builder/rasterizer using FreeType instead of stb_truetype.
17 | Benefit from better FreeType rasterization, in particular for small fonts.
18 |
19 | misc/single_file/
20 | Single-file header stub.
21 | We use this to validate compiling all *.cpp files in a same compilation unit.
22 | Users of that technique (also called "Unity builds") can generally provide this themselves,
23 | so we don't really recommend you use this in your projects.
24 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/cpp/README.txt:
--------------------------------------------------------------------------------
1 |
2 | imgui_stdlib.h + imgui_stdlib.cpp
3 | InputText() wrappers for C++ standard library (STL) type: std::string.
4 | This is also an example of how you may wrap your own similar types.
5 |
6 | imgui_scoped.h
7 | [Experimental, not currently in main repository]
8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions.
9 | Try by merging: https://github.com/ocornut/imgui/pull/2197
10 | Discuss at: https://github.com/ocornut/imgui/issues/2096
11 |
12 | See more C++ related extension on Wiki
13 | https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness
14 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/cpp/imgui_stdlib.h:
--------------------------------------------------------------------------------
1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.)
2 | // This is also an example of how you may wrap your own similar types.
3 |
4 | // Changelog:
5 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string
6 |
7 | #pragma once
8 |
9 | #include
10 |
11 | namespace ImGui
12 | {
13 | // ImGui::InputText() with std::string
14 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity
15 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
16 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
17 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL);
18 | }
19 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/debuggers/README.txt:
--------------------------------------------------------------------------------
1 |
2 | HELPER FILES FOR POPULAR DEBUGGERS
3 |
4 | imgui.gdb
5 | GDB: disable stepping into trivial functions.
6 | (read comments inside file for details)
7 |
8 | imgui.natstepfilter
9 | Visual Studio Debugger: disable stepping into trivial functions.
10 | (read comments inside file for details)
11 |
12 | imgui.natvis
13 | Visual Studio Debugger: describe Dear ImGui types for better display.
14 | With this, types like ImVector<> will be displayed nicely in the debugger.
15 | (read comments inside file for details)
16 |
17 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/debuggers/imgui.gdb:
--------------------------------------------------------------------------------
1 | # GDB configuration to aid debugging experience
2 |
3 | # To enable these customizations edit $HOME/.gdbinit (or ./.gdbinit if local gdbinit is enabled) and add:
4 | # add-auto-load-safe-path /path/to/imgui.gdb
5 | # source /path/to/imgui.gdb
6 | #
7 | # More Information at:
8 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html
9 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/Init-File-in-the-Current-Directory.html#Init-File-in-the-Current-Directory
10 |
11 | # Disable stepping into trivial functions
12 | skip -rfunction Im(Vec2|Vec4|Strv|Vector|Span)::.+
13 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/debuggers/imgui.natstepfilter:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 | (ImVec2|ImVec4|ImStrv)::.+
23 | NoStepInto
24 |
25 |
26 | (ImVector|ImSpan).*::operator.+
27 | NoStepInto
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/debuggers/imgui.natvis:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
17 | {{Size={Size} Capacity={Capacity}}}
18 |
19 |
20 | Size
21 | Data
22 |
23 |
24 |
25 |
26 |
27 | {{Size={DataEnd-Data} }}
28 |
29 |
30 | DataEnd-Data
31 | Data
32 |
33 |
34 |
35 |
36 |
37 | {{x={x,g} y={y,g}}}
38 |
39 |
40 |
41 | {{x={x,g} y={y,g} z={z,g} w={w,g}}}
42 |
43 |
44 |
45 | {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}}
46 |
47 | - Min
48 | - Max
49 | - Max.x - Min.x
50 | - Max.y - Min.y
51 |
52 |
53 |
54 |
55 | {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}}
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/Cousine-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/Cousine-Regular.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/DroidSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/DroidSans.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/Karla-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/Karla-Regular.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/ProggyClean.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/ProggyClean.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/ProggyTiny.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/ProggyTiny.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/fonts/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/freetype/README.md:
--------------------------------------------------------------------------------
1 | # imgui_freetype
2 |
3 | Build font atlases using FreeType instead of stb_truetype (which is the default font rasterizer).
4 |
by @vuhdo, @mikesart, @ocornut.
5 |
6 | ### Usage
7 |
8 | 1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype --triplet=x64-windows`, `vcpkg integrate install`).
9 | 2. Add imgui_freetype.h/cpp alongside your project files.
10 | 3. Add `#define IMGUI_ENABLE_FREETYPE` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file
11 |
12 | ### About Gamma Correct Blending
13 |
14 | FreeType assumes blending in linear space rather than gamma space.
15 | See FreeType note for [FT_Render_Glyph](https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Glyph).
16 | For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
17 | The default Dear ImGui styles will be impacted by this change (alpha values will need tweaking).
18 |
19 | ### Testbed for toying with settings (for developers)
20 |
21 | See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad
22 |
23 | ### Known issues
24 |
25 | - Oversampling settins are ignored but also not so much necessary with the higher quality rendering.
26 |
27 | ### Comparaison
28 |
29 | Small, thin anti-aliased fonts typically benefit a lot from FreeType's hinting:
30 | 
31 |
32 | ### Colorful glyphs/emojis
33 |
34 | You can use the `ImGuiFreeTypeBuilderFlags_LoadColor` flag to load certain colorful glyphs. See the
35 | ["Using Colorful Glyphs/Emojis"](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md#using-colorful-glyphsemojis) section of FONTS.md.
36 |
37 | 
38 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/GuiimguiLibrary/imgui_glfw3/misc/single_file/imgui_single_file.h:
--------------------------------------------------------------------------------
1 | // dear imgui: single-file wrapper include
2 | // We use this to validate compiling all *.cpp files in a same compilation unit.
3 | // Users of that technique (also called "Unity builds") can generally provide this themselves,
4 | // so we don't really recommend you use this in your projects.
5 |
6 | // Do this:
7 | // #define IMGUI_IMPLEMENTATION
8 | // Before you include this file in *one* C++ file to create the implementation.
9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit.
10 | #include "../../imgui.h"
11 |
12 | #ifdef IMGUI_IMPLEMENTATION
13 | #include "../../imgui.cpp"
14 | #include "../../imgui_demo.cpp"
15 | #include "../../imgui_draw.cpp"
16 | #include "../../imgui_tables.cpp"
17 | #include "../../imgui_widgets.cpp"
18 | #endif
19 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_api.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_API_H
24 | #define B2_API_H
25 |
26 | #ifdef B2_SHARED
27 | #if defined _WIN32 || defined __CYGWIN__
28 | #ifdef box2d_EXPORTS
29 | #ifdef __GNUC__
30 | #define B2_API __attribute__ ((dllexport))
31 | #else
32 | #define B2_API __declspec(dllexport)
33 | #endif
34 | #else
35 | #ifdef __GNUC__
36 | #define B2_API __attribute__ ((dllimport))
37 | #else
38 | #define B2_API __declspec(dllimport)
39 | #endif
40 | #endif
41 | #else
42 | #if __GNUC__ >= 4
43 | #define B2_API __attribute__ ((visibility ("default")))
44 | #else
45 | #define B2_API
46 | #endif
47 | #endif
48 | #else
49 | #define B2_API
50 | #endif
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_block_allocator.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_BLOCK_ALLOCATOR_H
24 | #define B2_BLOCK_ALLOCATOR_H
25 |
26 | #include "b2_api.h"
27 | #include "b2_settings.h"
28 |
29 | const int32 b2_blockSizeCount = 14;
30 |
31 | struct b2Block;
32 | struct b2Chunk;
33 |
34 | /// This is a small object allocator used for allocating small
35 | /// objects that persist for more than one time step.
36 | /// See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp
37 | class B2_API b2BlockAllocator
38 | {
39 | public:
40 | b2BlockAllocator();
41 | ~b2BlockAllocator();
42 |
43 | /// Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
44 | void* Allocate(int32 size);
45 |
46 | /// Free memory. This will use b2Free if the size is larger than b2_maxBlockSize.
47 | void Free(void* p, int32 size);
48 |
49 | void Clear();
50 |
51 | private:
52 |
53 | b2Chunk* m_chunks;
54 | int32 m_chunkCount;
55 | int32 m_chunkSpace;
56 |
57 | b2Block* m_freeLists[b2_blockSizeCount];
58 | };
59 |
60 | #endif
61 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_circle_shape.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_CIRCLE_SHAPE_H
24 | #define B2_CIRCLE_SHAPE_H
25 |
26 | #include "b2_api.h"
27 | #include "b2_shape.h"
28 |
29 | /// A solid circle shape
30 | class B2_API b2CircleShape : public b2Shape
31 | {
32 | public:
33 | b2CircleShape();
34 |
35 | /// Implement b2Shape.
36 | b2Shape* Clone(b2BlockAllocator* allocator) const override;
37 |
38 | /// @see b2Shape::GetChildCount
39 | int32 GetChildCount() const override;
40 |
41 | /// Implement b2Shape.
42 | bool TestPoint(const b2Transform& transform, const b2Vec2& p) const override;
43 |
44 | /// Implement b2Shape.
45 | /// @note because the circle is solid, rays that start inside do not hit because the normal is
46 | /// not defined.
47 | bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
48 | const b2Transform& transform, int32 childIndex) const override;
49 |
50 | /// @see b2Shape::ComputeAABB
51 | void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const override;
52 |
53 | /// @see b2Shape::ComputeMass
54 | void ComputeMass(b2MassData* massData, float density) const override;
55 |
56 | /// Position
57 | b2Vec2 m_p;
58 | };
59 |
60 | inline b2CircleShape::b2CircleShape()
61 | {
62 | m_type = e_circle;
63 | m_radius = 0.0f;
64 | m_p.SetZero();
65 | }
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_contact_manager.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_CONTACT_MANAGER_H
24 | #define B2_CONTACT_MANAGER_H
25 |
26 | #include "b2_api.h"
27 | #include "b2_broad_phase.h"
28 |
29 | class b2Contact;
30 | class b2ContactFilter;
31 | class b2ContactListener;
32 | class b2BlockAllocator;
33 |
34 | // Delegate of b2World.
35 | class B2_API b2ContactManager
36 | {
37 | public:
38 | b2ContactManager();
39 |
40 | // Broad-phase callback.
41 | void AddPair(void* proxyUserDataA, void* proxyUserDataB);
42 |
43 | void FindNewContacts();
44 |
45 | void Destroy(b2Contact* c);
46 |
47 | void Collide();
48 |
49 | b2BroadPhase m_broadPhase;
50 | b2Contact* m_contactList;
51 | int32 m_contactCount;
52 | b2ContactFilter* m_contactFilter;
53 | b2ContactListener* m_contactListener;
54 | b2BlockAllocator* m_allocator;
55 | };
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_stack_allocator.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_STACK_ALLOCATOR_H
24 | #define B2_STACK_ALLOCATOR_H
25 |
26 | #include "b2_api.h"
27 | #include "b2_settings.h"
28 |
29 | const int32 b2_stackSize = 100 * 1024; // 100k
30 | const int32 b2_maxStackEntries = 32;
31 |
32 | struct B2_API b2StackEntry
33 | {
34 | char* data;
35 | int32 size;
36 | bool usedMalloc;
37 | };
38 |
39 | // This is a stack allocator used for fast per step allocations.
40 | // You must nest allocate/free pairs. The code will assert
41 | // if you try to interleave multiple allocate/free pairs.
42 | class B2_API b2StackAllocator
43 | {
44 | public:
45 | b2StackAllocator();
46 | ~b2StackAllocator();
47 |
48 | void* Allocate(int32 size);
49 | void Free(void* p);
50 |
51 | int32 GetMaxAllocation() const;
52 |
53 | private:
54 |
55 | char m_data[b2_stackSize];
56 | int32 m_index;
57 |
58 | int32 m_allocation;
59 | int32 m_maxAllocation;
60 |
61 | b2StackEntry m_entries[b2_maxStackEntries];
62 | int32 m_entryCount;
63 | };
64 |
65 | #endif
66 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_time_of_impact.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_TIME_OF_IMPACT_H
24 | #define B2_TIME_OF_IMPACT_H
25 |
26 | #include "b2_api.h"
27 | #include "b2_math.h"
28 | #include "b2_distance.h"
29 |
30 | /// Input parameters for b2TimeOfImpact
31 | struct B2_API b2TOIInput
32 | {
33 | b2DistanceProxy proxyA;
34 | b2DistanceProxy proxyB;
35 | b2Sweep sweepA;
36 | b2Sweep sweepB;
37 | float tMax; // defines sweep interval [0, tMax]
38 | };
39 |
40 | /// Output parameters for b2TimeOfImpact.
41 | struct B2_API b2TOIOutput
42 | {
43 | enum State
44 | {
45 | e_unknown,
46 | e_failed,
47 | e_overlapped,
48 | e_touching,
49 | e_separated
50 | };
51 |
52 | State state;
53 | float t;
54 | };
55 |
56 | /// Compute the upper bound on time before two shapes penetrate. Time is represented as
57 | /// a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate,
58 | /// non-tunneling collisions. If you change the time interval, you should call this function
59 | /// again.
60 | /// Note: use b2Distance to compute the contact point and normal at the time of impact.
61 | B2_API void b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input);
62 |
63 | #endif
64 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_time_step.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 | #ifndef B2_TIME_STEP_H
23 | #define B2_TIME_STEP_H
24 |
25 | #include "b2_api.h"
26 | #include "b2_math.h"
27 |
28 | /// Profiling data. Times are in milliseconds.
29 | struct B2_API b2Profile
30 | {
31 | float step;
32 | float collide;
33 | float solve;
34 | float solveInit;
35 | float solveVelocity;
36 | float solvePosition;
37 | float broadphase;
38 | float solveTOI;
39 | };
40 |
41 | /// This is an internal structure.
42 | struct B2_API b2TimeStep
43 | {
44 | float dt; // time step
45 | float inv_dt; // inverse time step (0 if dt == 0).
46 | float dtRatio; // dt * inv_dt0
47 | int32 velocityIterations;
48 | int32 positionIterations;
49 | bool warmStarting;
50 | };
51 |
52 | /// This is an internal structure.
53 | struct B2_API b2Position
54 | {
55 | b2Vec2 c;
56 | float a;
57 | };
58 |
59 | /// This is an internal structure.
60 | struct B2_API b2Velocity
61 | {
62 | b2Vec2 v;
63 | float w;
64 | };
65 |
66 | /// Solver Data
67 | struct B2_API b2SolverData
68 | {
69 | b2TimeStep step;
70 | b2Position* positions;
71 | b2Velocity* velocities;
72 | };
73 |
74 | #endif
75 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_timer.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_TIMER_H
24 | #define B2_TIMER_H
25 |
26 | #include "b2_api.h"
27 | #include "b2_settings.h"
28 |
29 | /// Timer for profiling. This has platform specific code and may
30 | /// not work on every platform.
31 | class B2_API b2Timer
32 | {
33 | public:
34 |
35 | /// Constructor
36 | b2Timer();
37 |
38 | /// Reset the timer.
39 | void Reset();
40 |
41 | /// Get the time since construction or the last reset.
42 | float GetMilliseconds() const;
43 |
44 | private:
45 |
46 | #if defined(_WIN32)
47 | double m_start;
48 | static double s_invFrequency;
49 | #elif defined(__linux__) || defined (__APPLE__)
50 | unsigned long long m_start_sec;
51 | unsigned long long m_start_usec;
52 | #endif
53 | };
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/b2_types.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2020 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef B2_TYPES_H
24 | #define B2_TYPES_H
25 |
26 | typedef signed char int8;
27 | typedef signed short int16;
28 | typedef signed int int32;
29 | typedef unsigned char uint8;
30 | typedef unsigned short uint16;
31 | typedef unsigned int uint32;
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/include/box2d/box2d.h:
--------------------------------------------------------------------------------
1 | // MIT License
2 |
3 | // Copyright (c) 2019 Erin Catto
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | #ifndef BOX2D_H
24 | #define BOX2D_H
25 |
26 | // These include files constitute the main Box2D API
27 |
28 | #include "b2_settings.h"
29 | #include "b2_draw.h"
30 | #include "b2_timer.h"
31 |
32 | #include "b2_chain_shape.h"
33 | #include "b2_circle_shape.h"
34 | #include "b2_edge_shape.h"
35 | #include "b2_polygon_shape.h"
36 |
37 | #include "b2_broad_phase.h"
38 | #include "b2_dynamic_tree.h"
39 |
40 | #include "b2_body.h"
41 | #include "b2_contact.h"
42 | #include "b2_fixture.h"
43 | #include "b2_time_step.h"
44 | #include "b2_world.h"
45 | #include "b2_world_callbacks.h"
46 |
47 | #include "b2_distance_joint.h"
48 | #include "b2_friction_joint.h"
49 | #include "b2_gear_joint.h"
50 | #include "b2_motor_joint.h"
51 | #include "b2_mouse_joint.h"
52 | #include "b2_prismatic_joint.h"
53 | #include "b2_pulley_joint.h"
54 | #include "b2_revolute_joint.h"
55 | #include "b2_weld_joint.h"
56 | #include "b2_wheel_joint.h"
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/lib/box2d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/PhysicalLibray/lib/box2d.lib
--------------------------------------------------------------------------------
/PSAGameFramework/ExternalLibrary/PhysicalLibray/lib/debug/box2d.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/ExternalLibrary/PhysicalLibray/lib/debug/box2d.lib
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFramework.cpp:
--------------------------------------------------------------------------------
1 | // PSAGameFramework. 2024_03_31.
2 | // @PomeloStar Studio 2024-2026 GameFramework(Engine).
3 | // Developers:
4 | /*
5 | * Engine Version: 0.1.2 Alpha (10.20241226)
6 | * MSVC C11, C++17 x64 Release
7 | * OpenGL GLSL: 4.6
8 | * OpenGL GLFW: 3.0
9 | * ImGui: ImGui For OpenGL3
10 | * ImageLoader: STB_IMAGE, STB_IMAGE_WRITE
11 | * JsonLoader: RapidJSON
12 | * SoundLoader: OpenAL, STB_VORBIS
13 | * FileCompress: Zlib
14 | * PhysicsSystem: Box2D
15 | */
16 | // Engine Update: 2025_01_27.
17 | // Copyright(c) RCSZ.
18 | #define PSAG2D_ENGINE_VER 12.20250127
19 | /*
20 | * 附加说明:
21 | * [2024.03.31] 部分底层模块来自: ImProFX: https://github.com/rcszc/ImProFX
22 | */
23 | #include "PSAGameFrameworkCore/CoreFramework/psag_core_drivers.h"
24 | // 无丝竹之乱耳~
25 | #pragma warning(disable: 4819)
26 |
27 | #pragma comment(lib, "opengl32.lib ")
28 | #pragma comment(lib, "glfw3.lib ")
29 | #pragma comment(lib, "glew32.lib ")
30 | #pragma comment(lib, "glu32.lib ")
31 | #pragma comment(lib, "OpenAL32.lib ")
32 | #pragma comment(lib, "zlibwapi.lib ")
33 | #pragma comment(lib, "box2d.lib ")
34 |
35 | // windows x64 crt debug.
36 | #if defined(PSAG_DEBUG_EXT_MODE)
37 | #define _CRTDBG_MAP_ALLOC
38 | #include
39 | #include
40 | #endif
41 | int main() {
42 | #ifdef PSAG_DEBUG_EXT_MODE
43 | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
44 | #endif
45 | int FrameworkResult = -1;
46 | // set log print & start(debug) logger thread.
47 | PSAG_LOGGER::SET_PRINTLOG_COLOR(STAT_ON);
48 | PSAG_LOGGER_PROCESS::StartLogProcessing("PSAGameSystemLogs/");
49 | #ifdef PSAG_DEBUG_EXT_MODE
50 | PsagDebugThread::FTDprocessThread.CreateProcessingThread("PSAGameSystemDebug/", "MemoryMsg");
51 | #endif
52 | {
53 | // create framework object.
54 | PsagFrameworkCore::PSAGame2DFramework* MainPSAGame2D = new PsagFrameworkCore::PSAGame2DFramework();
55 | PsagFrameworkStart::CorePsagMainStart FrameworkStarter = {};
56 | // add start_item: object.
57 | FrameworkStarter.UniqueFrameworkObj(MainPSAGame2D);
58 | // start framework(engine)[exe], 200MS.
59 | FrameworkStarter.StartPsaGame(PSAG2D_ENGINE_VER, 200);
60 | // framework free exit.
61 | FrameworkResult = FrameworkStarter.FreeFramework();
62 | }
63 | #ifdef PSAG_DEBUG_EXT_MODE
64 | PsagDebugThread::FTDprocessThread.DeleteProcessingThread();
65 | #endif
66 | PSAG_LOGGER_PROCESS::FreeLogProcessing();
67 | #ifdef PSAG_DEBUG_EXT_MODE
68 | _CrtDumpMemoryLeaks();
69 | #endif
70 | return FrameworkResult;
71 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFramework.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.6.33829.357
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PSAGameFramework", "PSAGameFramework\PSAGameFramework.vcxproj", "{F047AD81-29D9-4812-872B-4A6C97C48D5E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x64.ActiveCfg = Debug|x64
17 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x64.Build.0 = Debug|x64
18 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x86.ActiveCfg = Debug|Win32
19 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Debug|x86.Build.0 = Debug|Win32
20 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x64.ActiveCfg = Release|x64
21 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x64.Build.0 = Release|x64
22 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x86.ActiveCfg = Release|Win32
23 | {F047AD81-29D9-4812-872B-4A6C97C48D5E}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {0678823C-9A04-47DA-A6B7-EDAA6F53B568}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFramework.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/ParticleGenerator/particle_generator_drift.cpp:
--------------------------------------------------------------------------------
1 | // particle_generator_drift.
2 | #include "../psag_graphics_engine.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace GraphicsEngineParticle {
8 | bool GeneratorDriftDown::ConfigCreateNumber(float number) {
9 | // generator particles >= 8.
10 | if (number < 8.0f) return false;
11 | ParticlesNumber = (size_t)number;
12 | return true;
13 | }
14 |
15 | void GeneratorDriftDown::ConfigLifeDispersion(const Vector2T& rand_life) {
16 | // particle rand life: [0.0,n].
17 | float LifeMin = rand_life.vector_x <= 0.0f ? 0.0f : rand_life.vector_x;
18 | float LifeMax = rand_life.vector_y <= 0.0f ? 0.0f : rand_life.vector_y;
19 |
20 | RandomLimitLife = Vector2T(LifeMin, LifeMax);
21 | }
22 |
23 | void GeneratorDriftDown::ConfigSizeDispersion(const Vector2T& rand_size) {
24 | // particle rand size: [0.0,n].
25 | float SizeMin = rand_size.vector_x <= 0.0f ? 0.0f : rand_size.vector_x;
26 | float SizeMax = rand_size.vector_y <= 0.0f ? 0.0f : rand_size.vector_y;
27 |
28 | RandomScaleSize = Vector2T(SizeMin, SizeMax);
29 | }
30 |
31 | void GeneratorDriftDown::ConfigGenPos(const Vector2T& position) {
32 | // render position layer: const 2.5f, 20250119 RCSZ.
33 | OffsetPosition = Vector3T(position.vector_x, position.vector_y, 2.5f);
34 | }
35 |
36 | void GeneratorDriftDown::ConfigRandomColorSystem(
37 | const Vector2T& r, const Vector2T& g, const Vector2T& b,
38 | ColorChannelMode mode
39 | ) {
40 | RandomColorSystem = __COLOR_SYSTEM_TYPE(r, g, b, mode, &EnableGrayscale);
41 | }
42 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/ParticleGenerator/particle_generator_points.cpp:
--------------------------------------------------------------------------------
1 | // particle_generator_points.
2 | #include "../psag_graphics_engine.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace GraphicsEngineParticle {
8 | bool GeneratorPointsDiffu::ConfigCreateNumber(float number) {
9 | // generator particles >= 1.
10 | if (number < 1.0f) return false;
11 | ParticlesNumber = (size_t)number;
12 | return true;
13 | }
14 |
15 | void GeneratorPointsDiffu::ConfigLifeDispersion(const Vector2T& rand_life) {
16 | // particle rand life: [0.0,n].
17 | float LifeMin = rand_life.vector_x <= 0.0f ? 0.0f : rand_life.vector_x;
18 | float LifeMax = rand_life.vector_y <= 0.0f ? 0.0f : rand_life.vector_y;
19 |
20 | RandomLimitLife = Vector2T(LifeMin, LifeMax);
21 | }
22 |
23 | void GeneratorPointsDiffu::ConfigSizeDispersion(const Vector2T& rand_size) {
24 | // particle rand size: [0.0,n].
25 | float SizeMin = rand_size.vector_x <= 0.0f ? 0.0f : rand_size.vector_x;
26 | float SizeMax = rand_size.vector_y <= 0.0f ? 0.0f : rand_size.vector_y;
27 |
28 | RandomScaleSize = Vector2T(SizeMin, SizeMax);
29 | }
30 |
31 | void GeneratorPointsDiffu::ConfigGenPos(const Vector2T& position) {
32 | // render position layer: const 2.5f, 20250119 RCSZ.
33 | OffsetPosition = Vector3T(position.vector_x, position.vector_y, 2.5f);
34 | }
35 | void GeneratorPointsDiffu::ConfigGenPosRand(const Vector2T& position_rand) {
36 | RandomPosition = position_rand;
37 | }
38 | void GeneratorPointsDiffu::ConfigGenVector(const Vector2T& speed) {
39 | RandomSpeed = speed;
40 | }
41 |
42 | void GeneratorPointsDiffu::ConfigRandomColorSystem(
43 | const Vector2T& r, const Vector2T& g, const Vector2T& b,
44 | ColorChannelMode mode
45 | ) {
46 | RandomColorSystem = __COLOR_SYSTEM_TYPE(r, g, b, mode, &EnableGrayscale);
47 | }
48 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/ParticleGenerator/particle_generator_shape.cpp:
--------------------------------------------------------------------------------
1 | // particle_generator_shape.
2 | #include "../psag_graphics_engine.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace GraphicsEngineParticle {
8 | bool GeneratorShape::ConfigCreateNumber(float number) {
9 | // generator particles >= 8.
10 | if (number < 8.0f) return false;
11 | ParticlesNumber = (size_t)number;
12 | return true;
13 | }
14 |
15 | void GeneratorShape::ConfigLifeDispersion(const Vector2T& rand_life) {
16 | // particle rand life: [0.0,n].
17 | float LifeMin = rand_life.vector_x <= 0.0f ? 0.0f : rand_life.vector_x;
18 | float LifeMax = rand_life.vector_y <= 0.0f ? 0.0f : rand_life.vector_y;
19 |
20 | RandomLimitLife = Vector2T(LifeMin, LifeMax);
21 | }
22 |
23 | void GeneratorShape::ConfigSizeDispersion(const Vector2T& rand_size) {
24 | // particle rand size: [0.0,n].
25 | float SizeMin = rand_size.vector_x <= 0.0f ? 0.0f : rand_size.vector_x;
26 | float SizeMax = rand_size.vector_y <= 0.0f ? 0.0f : rand_size.vector_y;
27 |
28 | RandomScaleSize = Vector2T(SizeMin, SizeMax);
29 | }
30 |
31 | void GeneratorShape::ConfigGenPos(const Vector2T& position) {
32 | // render position layer: const 2.5f, 20250119 RCSZ.
33 | OffsetPosition = Vector3T(position.vector_x, position.vector_y, 2.5f);
34 | }
35 | void GeneratorShape::ConfigGenPosRand(const Vector2T& position_rand) {
36 | RandomPosition = position_rand;
37 | }
38 | void GeneratorShape::ConfigGenVector(const Vector2T& speed) {
39 | RandomSpeed = speed;
40 | }
41 |
42 | void GeneratorShape::ConfigRandomColorSystem(
43 | const Vector2T& r, const Vector2T& g, const Vector2T& b,
44 | ColorChannelMode mode
45 | ) {
46 | RandomColorSystem = __COLOR_SYSTEM_TYPE(r, g, b, mode, &EnableGrayscale);
47 | }
48 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_data.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_data.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_particle.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_particle.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_script.cpp:
--------------------------------------------------------------------------------
1 | // psag_graphics_engine_script. RCSZ.
2 | // framework system preset shader_script.
3 | #include "psag_graphics_engine.h"
4 |
5 | using namespace std;
6 | using namespace PSAG_LOGGER;
7 |
8 | namespace GraphicsShaderCode {
9 |
10 | void GraphicsEngineLayerRes::Set(const GraphicsShadersDESC& desc) {
11 | {
12 | lock_guard ResourceLock(ResourceMutex);
13 | ResourecShaders = desc;
14 | }
15 | PushLogger(LogInfo, PSAGM_GLENGINE_SHADER_LABEL, "graphics_engine config system_glsl.");
16 | }
17 |
18 | GraphicsShadersDESC GraphicsEngineLayerRes::Get() {
19 | lock_guard ResourceLock(ResourceMutex);
20 | return ResourecShaders;
21 | }
22 | // create global_object. [T-SAFE]
23 | GraphicsEngineLayerRes GLOBALRES = {};
24 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_system.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/GraphicsEngine/psag_graphics_engine_system.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/PhysicsEngine/psag_physics_engine.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/PhysicsEngine/psag_physics_engine.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/PhysicsEngine/psag_physics_engine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/PhysicsEngine/psag_physics_engine.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_noise.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_noise.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_notify.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_notify.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_pawn.cpp:
--------------------------------------------------------------------------------
1 | // psag_toolkits_engine_pawn.
2 | #include "psag_toolkits_engine.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | float __TOOLKITS_ENGINE_TIMESETP::ToolkitsEngineTimeStep = 1.0f;
8 |
9 | namespace ToolkitsEnginePawn {
10 | // clac: (target - value) / damping * scale.
11 | inline Vector2T PAWN_CALC_LERP_VEC2FUNC(
12 | const Vector2T& target, const Vector2T& value, const Vector2T& damping,
13 | float NoiseScale
14 | ) {
15 | return Vector2T(
16 | value.vector_x + (target.vector_x - value.vector_x) / damping.vector_x * NoiseScale,
17 | value.vector_y + (target.vector_y - value.vector_y) / damping.vector_y * NoiseScale
18 | );
19 | }
20 | // pawn move_vector_list.
21 | unordered_map> GamePlayerPawn::KeyboardMappings = {
22 | { ImGuiKey_W, { 0.0f, 1.0f }},
23 | { ImGuiKey_S, { 0.0f, -1.0f }},
24 | { ImGuiKey_A, { 1.0f, 0.0f }},
25 | { ImGuiKey_D, {-1.0f, 0.0f }}
26 | };
27 |
28 | GamePlayerPawn::GamePlayerPawn(const Vector2T& damping) {
29 | if (damping.vector_x < 1.0f || damping.vector_y < 1.0f) {
30 | PushLogger(LogError, PSAGM_TOOLKITS_PAWN_LABEL, "player pawn: damping.xy < 1.0f");
31 | return;
32 | }
33 | DampingEffectVector = damping;
34 | }
35 |
36 | bool GamePlayerPawn::MouseButtonPressed_R(bool pulse) { return ImGui::IsMouseClicked((ImGuiMouseButton)1, !pulse); }
37 | bool GamePlayerPawn::MouseButtonPressed_L(bool pulse) { return ImGui::IsMouseClicked((ImGuiMouseButton)0, !pulse); }
38 |
39 | bool GamePlayerPawn::KeyboardPressed_R() { return ImGui::IsKeyPressed(ImGuiKey_R); };
40 | bool GamePlayerPawn::KeyboardPressed_F() { return ImGui::IsKeyPressed(ImGuiKey_F); };
41 |
42 | void GamePlayerPawn::PlayerPawnRun(float speed_value) {
43 | ControlMousePosition = Vector2T(ImGui::GetMousePos().x, ImGui::GetMousePos().y);
44 |
45 | MoveSpeedTarget = Vector2T(0.0f, 0.0f);
46 | // player control_input.
47 | for (const auto& [KeyCode, Action] : KeyboardMappings)
48 | if (ImGui::IsKeyDown(KeyCode))
49 | MoveSpeedTarget = Vector2T(Action.vector_x * speed_value, Action.vector_y * speed_value);
50 |
51 | // calc_lerp: speed_target => move_vector(speed).
52 | ControlMoveVector = PAWN_CALC_LERP_VEC2FUNC(
53 | MoveSpeedTarget, ControlMoveVector, DampingEffectVector, ToolkitsEngineTimeStep
54 | );
55 | }
56 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_random.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_random.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_sound.cpp:
--------------------------------------------------------------------------------
1 | // psag_toolkits_engine_sound.
2 | #include "psag_toolkits_engine.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace ToolkitsEngineSound {
8 |
9 | GameAudioSound::GameAudioSound(const RawAudioStream& data) {
10 | if (data.empty()) {
11 | PushLogger(LogError, PSAGM_TOOLKITS_SOUND, "audio stream_data empty!");
12 | return;
13 | }
14 | PSAG_SYS_GENERATE_KEY GenResourceID;
15 | // create key => storage.
16 | RawStreamResource = GenResourceID.PsagGenUniqueKey();
17 | AudioResource->ResourceStorage(RawStreamResource, data);
18 |
19 | // load resource => create player.
20 | PsagLow::PsagSupAudioData* LoaderResource = new PsagLow::PsagSupAudioData(data);
21 | AudioPlayer = new PsagLow::PsagSupAudioDataPlayer(LoaderResource);
22 |
23 | PushLogger(LogInfo, PSAGM_TOOLKITS_SOUND, "audio player create.");
24 | }
25 |
26 | GameAudioSound::~GameAudioSound() {
27 | delete AudioPlayer;
28 | AudioResource->ResourceDelete(RawStreamResource);
29 | }
30 |
31 | PsagLow::PsagSupAudioDataPlayer* GameAudioSound::AudioPlayerOperate() {
32 | return AudioPlayer;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_timer.cpp:
--------------------------------------------------------------------------------
1 | // psag_toolkits_engine_timer.
2 | #include "psag_toolkits_engine.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace ToolkitsEngineTimerClock {
8 |
9 | bool GameCycleTimer::CycleTimerGetFlag() {
10 | // now_time >= target_time, flag => true.
11 | return chrono::system_clock::now() >= TimeTempTarget;
12 | }
13 |
14 | bool GameCycleTimer::CycleTimerClearReset(float time_delay) {
15 | if (time_delay <= 0.0f) {
16 | PushLogger(LogError, PSAGM_TOOLKITS_TIMER_LABEL, "cycle_time system: time_delay <= 0.0f");
17 | return false;
18 | }
19 | int64_t MicroTimeTemp = int64_t(time_delay * 1000.0f);
20 | TimeTempTarget = chrono::system_clock::now() + std::chrono::microseconds(MicroTimeTemp);
21 | return true;
22 | }
23 |
24 | float GameCycleTimer::GetTimeNowCount() {
25 | int64_t TimerCountI64 =
26 | chrono::duration_cast(TimeTempTarget.time_since_epoch()).count();
27 | return (float)TimerCountI64 * 0.001f;
28 | }
29 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_uiext.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/ToolkitsEngine/psag_toolkits_engine_uiext.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/psag_core_drivers.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/psag_core_drivers.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/psag_core_drivers_class.cpp:
--------------------------------------------------------------------------------
1 | // psag_core_drivers_class.
2 | #include "psag_core_drivers.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace PsagFrameworkCore {
8 | namespace PsagManage {
9 |
10 | bool SysBackground::LayerDataPush(const ImageRawData& layer_image) {
11 | if (layer_image.ImagePixels.empty()) {
12 | PushLogger(LogWarning, PSAGM_FRAME_COREMAG_LABEL, "background load image_layer data_empty.");
13 | return false;
14 | }
15 | LayersRawImages.push_back(layer_image);
16 | return true;
17 | }
18 |
19 | void SysBackground::CreateBackground(const Vector2T& resolution) {
20 | if (RendererBackFX != nullptr)
21 | delete RendererBackFX;
22 | // (re)create background-shader.
23 | RendererBackFX = new GraphicsEngineBackground::PsagGLEngineBackground(
24 | resolution, LayersRawImages
25 | );
26 | // load pointer.
27 | FrameworkParams.ShaderParamsBackground = RendererBackFX->GetRenderParameters();
28 | PushLogger(LogInfo, PSAGM_FRAME_COREMAG_LABEL, "background create, layers: %u", LayersRawImages.size());
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/psag_core_drivers_registry.cpp:
--------------------------------------------------------------------------------
1 | // psag_core_drivers_registry.
2 | #include "psag_core_drivers.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace RegisterDevClass {
8 |
9 | void PsagReflectionSYS::ReflectionObjectCreate(const char* ClassName, const char* UniqueName) {
10 | auto& Registry = ReflectionFactory::GetRegistry();
11 | // find unique_name => register.
12 | auto it = Registry.find(ClassName);
13 | if (it != Registry.end()) {
14 | PsagFrameworkStart::System::GLOBAL_FMC_OBJECT->GameRegistrationObject(ClassName, UniqueName, it->second());
15 | return;
16 | }
17 | PushLogger(LogError, PSAGM_DRIVE_REG_LABEL, "failed: class not found in the registry.");
18 | }
19 |
20 | void PsagReflectionSYS::ReflectionObjectDelete(const char* UniqueName) {
21 | PsagFrameworkStart::System::GLOBAL_FMC_OBJECT->GameDeleteObject(UniqueName);
22 | }
23 | PsagReflectionSYS GAMEREF;
24 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/psag_lowlevel_support.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreFramework/psag_lowlevel_support.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_global_atomic.cpp:
--------------------------------------------------------------------------------
1 | // psag_actor_global_atomic.
2 | #include "psag_actor_global_atomic.h"
3 |
4 | using namespace std;
5 |
6 | namespace ActorSystemAtomic {
7 | atomic GLOBAL_PARAMS_ACTORS = {};
8 | atomic GLOBAL_PARAMS_EVNS = {};
9 | atomic GLOBAL_PARAMS_SHADERS = {};
10 | atomic GLOBAL_PARAMS_M_ACTORS = {};
11 | atomic GLOBAL_PARAMS_M_EVNS = {};
12 | atomic GLOBAL_PARAMS_M_SHADERS = {};
13 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_global_atomic.h:
--------------------------------------------------------------------------------
1 | // psag_actor_global_atomic. RCSZ.
2 |
3 | #ifndef __PSAG_ACTOR_GLOBAL_ATOMIC_H
4 | #define __PSAG_ACTOR_GLOBAL_ATOMIC_H
5 | // graphics & physics engine => actor_module.
6 | #include "../CoreFramework/GraphicsEngine/psag_graphics_engine.h"
7 | #include "../CoreFramework/PhysicsEngine/psag_physics_engine.h"
8 |
9 | namespace ActorSystemAtomic {
10 | extern std::atomic GLOBAL_PARAMS_ACTORS;
11 | extern std::atomic GLOBAL_PARAMS_EVNS;
12 | extern std::atomic GLOBAL_PARAMS_SHADERS;
13 | extern std::atomic GLOBAL_PARAMS_M_ACTORS;
14 | extern std::atomic GLOBAL_PARAMS_M_EVNS;
15 | extern std::atomic GLOBAL_PARAMS_M_SHADERS;
16 | }
17 |
18 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_actor.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_actor.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_envmt.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_envmt.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_script.cpp:
--------------------------------------------------------------------------------
1 | // psag_actor_module_script. RCSZ.
2 | // framework system preset shader_script.
3 | #include "psag_actor_module.hpp"
4 |
5 | using namespace std;
6 | using namespace PSAG_LOGGER;
7 |
8 | namespace GameActorScript {
9 | const char* psag_shader_public_frag_header = R"(
10 | #version 460 core
11 |
12 | in vec4 FxColor;
13 | in vec2 FxCoord;
14 |
15 | uniform vec2 RenderResolution;
16 | uniform float RenderTime;
17 |
18 | out vec4 FragColor;
19 | )";
20 |
21 | const char* psag_shader_public_frag_texture = R"(
22 | uniform sampler2DArray VirTexture%s;
23 |
24 | uniform int VirTexture%sLayer;
25 | uniform vec2 VirTexture%sCropping;
26 | uniform vec2 VirTexture%sSize;
27 |
28 | vec4 SampleTexture%s(vec2 smp_coord) {
29 | vec2 SamplerCoord = VirTexture%sCropping * smp_coord;
30 | return texture(VirTexture%s, vec3(SamplerCoord, float(VirTexture%sLayer)));
31 | }
32 | )";
33 |
34 | const char* psag_shader_private_frag_dfirst = R"(
35 | void main()
36 | {
37 | FragColor = SampleTexture)";
38 | const char* psag_shader_private_frag_dlast = R"((FxCoord) * FxColor;
39 | }
40 | )";
41 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_shader.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreGameActor/psag_actor_module_shader.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameManager/psag_manager_module.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreGameManager/psag_manager_module.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreGameManager/psag_manager_module_files.cpp:
--------------------------------------------------------------------------------
1 | // psag_manager_module_files.
2 | #include "psag_manager_module.hpp"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace GameManagerCore {
8 | namespace GameFileSystemPath {
9 |
10 | bool GamePackgaeResourcePath::ADD_SystemResPath(
11 | const string& name, const string& res_path
12 | ) {
13 | unique_lock Lock(ResourcePathMutex);
14 | auto it = ResourcePath.find(name);
15 | if (it == ResourcePath.end()) {
16 | // add resource path key_value.
17 | ResourcePath.emplace(name, res_path);
18 | PushLogger(LogInfo, PSAGM_MANAGER_FINAL_LABEL,
19 | "add game resource name: %s, path: %s", name.c_str(), res_path.c_str()
20 | );
21 | return true;
22 | }
23 | PushLogger(LogError, PSAGM_MANAGER_FINAL_LABEL,
24 | "failed add game resource name: %s", name.c_str()
25 | );
26 | return false;
27 | }
28 |
29 | bool GamePackgaeResourcePath::DELETE_SystemResPath(const string& name) {
30 | unique_lock Lock(ResourcePathMutex);
31 | auto it = ResourcePath.find(name);
32 | if (it != ResourcePath.end()) {
33 | string PathTemp = it->second;
34 | // delete resource path key_value.
35 | ResourcePath.erase(it);
36 | PushLogger(LogInfo, PSAGM_MANAGER_FINAL_LABEL,
37 | "delete game resource name: %s, path: %s", name.c_str(), PathTemp.c_str()
38 | );
39 | return true;
40 | }
41 | PushLogger(LogError, PSAGM_MANAGER_FINAL_LABEL,
42 | "failed delete game resource name: %s", name.c_str()
43 | );
44 | return false;
45 | }
46 |
47 | string GamePackgaeResourcePath::FIND_SystemResPath(const string& name) {
48 | shared_lock Lock(ResourcePathMutex);
49 | return ResourcePath.find(name) == ResourcePath.end() ?
50 | string() : ResourcePath[name];
51 | }
52 |
53 | uint64_t GamePackgaeResourcePath::FIND_SystemResPHash(const string& name) {
54 | string PathTemp = FIND_SystemResPath(name);
55 | if (PathTemp.empty()) return NULL;
56 | // resource path => hash code type: uint64_t.
57 | hash StrHasher;
58 | return StrHasher(PathTemp);
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_background.frag:
--------------------------------------------------------------------------------
1 | uniform sampler2DArray MultipleBackTex;
2 | uniform vec2 RenderRes;
3 |
4 | uniform float TextureBackIndex;
5 |
6 | uniform float BackVisibility;
7 | uniform vec2 BackStrength;
8 | uniform vec4 BackBlendColor;
9 |
10 | void main()
11 | {
12 | vec4 TexColorFront = texture(MultipleBackTex, vec3(FxCoord, 0.0));
13 |
14 | TexColorFront.a = step(0.16, length(TexColorFront.rgb));
15 | TexColorFront.rgb *= BackStrength.y;
16 |
17 | vec4 PreviousColor = texture(MultipleBackTex, vec3(FxCoord, TextureBackIndex));
18 | PreviousColor.rgb *= 0.58 * BackStrength.x;
19 |
20 | vec4 BlendColor = vec4(0.0);
21 | for (float i = TextureBackIndex - 1.0; i >= 1.0; i -= 1.0)
22 | {
23 | vec4 TexColorMid = texture(MultipleBackTex, vec3(FxCoord, i));
24 |
25 | TexColorMid.rgb *= (TextureBackIndex - i) * 0.25 * BackVisibility + 0.12 * BackVisibility;
26 | TexColorMid.a = step(0.16, length(TexColorMid.rgb));
27 |
28 | BlendColor = TexColorMid * TexColorMid.w + PreviousColor * (1.0 - TexColorMid.w);
29 | PreviousColor = BlendColor;
30 | }
31 |
32 | // multi_layered background blend => out.
33 | FragColor = (TexColorFront * TexColorFront.w + BlendColor * (1.0 - TexColorFront.w)) * BackBlendColor;
34 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final.frag:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final.frag
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_blurh.frag:
--------------------------------------------------------------------------------
1 | uniform sampler2DArray ProcessTextures;
2 | uniform int FragBlurRadius; // gaussian blur radius.
3 |
4 | // horizontal blur process.
5 | vec4 BloomEffectH(sampler2DArray TexSample, vec2 TexCoords, float Layer)
6 | {
7 | vec2 TexOffset = 1.0 / textureSize(TexSample, 0).xy;
8 | vec3 Result = texture(TexSample, vec3(TexCoords, Layer)).rgb * Gaussian(0.0, FragBlurRadius);
9 |
10 | for(int i = 1; i < FragBlurRadius; ++i) {
11 | float BlurColor = Gaussian(float(i), FragBlurRadius);
12 |
13 | Result += texture(TexSample, vec3(TexCoords + vec2(TexOffset.x * i, 0.0), Layer)).rgb * BlurColor;
14 | Result += texture(TexSample, vec3(TexCoords - vec2(TexOffset.x * i, 0.0), Layer)).rgb * BlurColor;
15 | }
16 | return vec4(Result, 1.0);
17 | }
18 |
19 | void main()
20 | {
21 | FragColor = BloomEffectH(ProcessTextures, FxCoord, 2.0);
22 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_blurv.frag:
--------------------------------------------------------------------------------
1 | uniform sampler2DArray ProcessTextures;
2 | uniform int FragBlurRadius; // gaussian blur radius.
3 |
4 | // vertical blur process.
5 | vec4 BloomEffectV(sampler2DArray TexSample, vec2 TexCoords, float Layer)
6 | {
7 | vec2 TexOffset = 1.0 / textureSize(TexSample, 0).xy;
8 | vec3 Result = texture(TexSample, vec3(TexCoords, Layer)).rgb * Gaussian(0.0, FragBlurRadius);
9 |
10 | for(int i = 1; i < FragBlurRadius; ++i) {
11 | float BlurColor = Gaussian(float(i), FragBlurRadius);
12 |
13 | Result += texture(TexSample, vec3(TexCoords + vec2(0.0, TexOffset.y * i), Layer)).rgb * BlurColor;
14 | Result += texture(TexSample, vec3(TexCoords - vec2(0.0, TexOffset.y * i), Layer)).rgb * BlurColor;
15 | }
16 | return vec4(Result, 1.0);
17 | }
18 |
19 | void main()
20 | {
21 | FragColor = BloomEffectV(ProcessTextures, FxCoord, 3.0);
22 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_multfilter.frag:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_multfilter.frag
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_vollight.frag:
--------------------------------------------------------------------------------
1 | uniform sampler2DArray ProcessTextures;
2 |
3 | // err: failed load depth_texture. [20240701]
4 | // uniform sampler2D PostTextureDep;
5 |
6 | uniform vec2 LightPosition;
7 | uniform vec3 LightColor;
8 | uniform float LightIntensity;
9 | uniform float LightIntensityDecay;
10 | uniform float LightAvgCollision;
11 | uniform int LightSampleStep;
12 |
13 | void main()
14 | {
15 | if (LightSampleStep <= 1) {
16 | FragColor = texture(ProcessTextures, vec3(FxCoord, 0.0));
17 | return;
18 | }
19 | vec2 Delta = FxCoord - LightPosition;
20 | vec2 STEP = Delta / float(LightSampleStep);
21 |
22 | float AccLightIntensity = 0.0; // 累积光强度.
23 | float CollisionValue = 1.0;
24 |
25 | for (int i = 0; i < LightSampleStep; i++)
26 | {
27 | vec2 CurrentPosition = LightPosition + STEP * float(i);
28 | vec4 SampleColor = texture(ProcessTextures, vec3(CurrentPosition, 0.0));
29 |
30 | float Distance = length(CurrentPosition - LightPosition); // 光线距离衰减.
31 | float CurrentLightIntensity = LightIntensity * exp(-Distance * LightIntensityDecay);
32 |
33 | if ((SampleColor.r + SampleColor.g + SampleColor.b) / 3.0 > LightAvgCollision) {
34 | CurrentLightIntensity *= LightIntensityDecay * 0.0125; // 片段阻挡过滤.
35 | CollisionValue = 0.92325;
36 | }
37 | AccLightIntensity += CurrentLightIntensity;
38 | }
39 | // calc averge_light.
40 | float AverageLightIntensity = AccLightIntensity / float(LightSampleStep);
41 |
42 | // game scene_fragment blend.
43 | vec4 ProcessFragment = texture(ProcessTextures, vec3(FxCoord, 0.0)) * CollisionValue;
44 | ProcessFragment += vec4(LightColor, 1.0) * AverageLightIntensity;
45 |
46 | FragColor = ProcessFragment;
47 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_fx_sequence.frag:
--------------------------------------------------------------------------------
1 | uniform sampler2DArray SequeVirTex;
2 | uniform int SequeVirTexLayer;
3 | uniform vec2 SequeVirTexCropping;
4 | uniform vec2 SequeVirTexSize;
5 |
6 | uniform float RenderTime;
7 | uniform vec4 RenderColorBlend;
8 | uniform vec2 RenderUvSize;
9 | uniform vec2 RenderUvOffset;
10 |
11 | void main()
12 | {
13 | vec2 SampleCoord = FxCoord * RenderUvSize + RenderUvOffset;
14 | vec3 Color = texture(SequeVirTex, vec3(SampleCoord, float(SequeVirTexLayer))).rgb;
15 |
16 | vec4 FragOut = vec4(vec3(Color), (Color.r + Color.g + Color.b) / 3.0);
17 | FragColor = FragOut * RenderColorBlend;
18 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_particle.frag:
--------------------------------------------------------------------------------
1 | uniform sampler2DArray ParticleVirTex;
2 | uniform int ParticleVirTexLayer;
3 | uniform vec2 ParticleVirTexCropping;
4 | uniform vec2 ParticleVirTexSize;
5 |
6 | uniform float RenderTime;
7 | uniform float RenderAngle;
8 | uniform float RenderTwist;
9 |
10 | const vec2 Pivot = vec2(0.5, 0.5);
11 |
12 | float ComputeColorAhpla(float Life, float DecayPoint)
13 | {
14 | float LogLife = log(Life + 1.0);
15 | return LogLife / (LogLife + pow(DecayPoint, 2.0));
16 | }
17 |
18 | void main()
19 | {
20 | float RandomValue = RandomFloat(FxColor.r + FxColor.g + FxColor.b + FxColor.a);
21 |
22 | // rotate_stop => "RenderAngle" = 0.0f.
23 | // rotate angle * time_step.
24 | float Angle = (RenderTime * 0.2 + RandomValue * 5.0) * RenderAngle;
25 | mat2 Rotation = mat2(cos(Angle), -sin(Angle), sin(Angle), cos(Angle));
26 |
27 | vec2 RotatedTexCoord = Rotation * (FxCoord - Pivot) + Pivot;
28 |
29 | vec2 uv = RotatedTexCoord;
30 |
31 | uv.x += sin(uv.y * 10.0 + RenderTime + RandomValue * 10) / 25.0 * RenderTwist;
32 | uv.y += cos(uv.x * 10.0 + RenderTime + RandomValue * 10) / 25.0 * RenderTwist;
33 |
34 | vec4 Color = texture(ParticleVirTex, vec3(uv, float(ParticleVirTexLayer)));
35 | // particle_system: FxNvec3.x = life.
36 | vec3 OutRGB = Color.rgb * ComputeColorAhpla(FxNvec3.x, 1.2) * 1.6;
37 |
38 | FragColor = vec4(vec3(OutRGB), Color.a) * FxColor;
39 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_header.frag:
--------------------------------------------------------------------------------
1 | // pomelostar_game2d graphics_engine.
2 | // public fragment std-header.
3 |
4 | #version 460 core
5 |
6 | in vec4 FxColor;
7 | in vec2 FxCoord;
8 | in vec3 FxNvec3;
9 |
10 | // output fragment color(rgba).
11 | out vec4 FragColor;
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_template.vert:
--------------------------------------------------------------------------------
1 | // pomelostar_game2d graphics_engine.
2 | // public vertex std-vert-shader.
3 |
4 | #version 460 core
5 | layout (location = 0) in vec3 VertexPosition;
6 | layout (location = 1) in vec4 VertexColor;
7 | layout (location = 2) in vec2 VertexTexture;
8 | layout (location = 3) in vec3 VertexNormal;
9 |
10 | uniform mat4 MvpMatrix;
11 |
12 | uniform vec2 RenderMove;
13 | uniform vec2 RenderScale;
14 |
15 | out vec4 FxColor;
16 | out vec2 FxCoord;
17 | out vec3 FxNvec3;
18 |
19 | void main()
20 | {
21 | // vertex position trans.
22 | vec2 Vertex2D = vec2(VertexPosition.xy * RenderScale + RenderMove);
23 | gl_Position = MvpMatrix * vec4(vec3(Vertex2D.x, Vertex2D.y, VertexPosition.z), 1.0);
24 |
25 | // vertex out fragment shader.
26 | FxColor = VertexColor;
27 | FxCoord = VertexTexture;
28 | FxNvec3 = VertexNormal;
29 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_template_actor.vert:
--------------------------------------------------------------------------------
1 | #version 460 core
2 | layout (location = 0) in vec3 VertexPosition;
3 | layout (location = 1) in vec4 VertexColor;
4 | layout (location = 2) in vec2 VertexTexture;
5 | layout (location = 3) in vec3 VertexNormal;
6 |
7 | uniform vec2 ActorPos;
8 | uniform float ActorRotate;
9 | uniform vec2 ActorSize;
10 | uniform float ActorZ;
11 | uniform vec4 ActorColor;
12 |
13 | out vec4 FxColor;
14 | out vec2 FxCoord;
15 |
16 | layout(std140, binding = 0) uniform PsagUniformActorMatrix {
17 | mat4 Matrix;
18 | };
19 |
20 | void main()
21 | {
22 | // rotate & scale matrix2x2.
23 | mat2 Rotation2DMatrix = mat2(cos(ActorRotate), -sin(ActorRotate), sin(ActorRotate), cos(ActorRotate));
24 | mat2 Scale2DMatrix = mat2(ActorSize.x, 0.0, 0.0, ActorSize.y);
25 |
26 | // scale => rotate => move.
27 | vec2 VerPos = vec2(VertexPosition.xy * Scale2DMatrix * Rotation2DMatrix + ActorPos);
28 | gl_Position = Matrix * vec4(vec3(VerPos.x, VerPos.y, ActorZ), 1.0);
29 |
30 | // non: vertex_color, v_color = uniform. [20240825]
31 | FxColor = ActorColor;
32 | FxCoord = VertexTexture;
33 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_tools.frag:
--------------------------------------------------------------------------------
1 | // pomelostar_game2d graphics_engine.
2 | // public fragment std-tools-func.
3 |
4 | #define SHADER_FRAG_MS_PI 3.1415926536
5 |
6 | // midpoint value: 0.0
7 | float Gaussian(float Gx, float Sigma)
8 | {
9 | return exp(-(Gx * Gx) / (2.0 * Sigma * Sigma)) / (sqrt(2.0 * SHADER_FRAG_MS_PI) * Sigma);
10 | }
11 |
12 | // component filter color, RGB.
13 | vec4 FilterColor(vec4 InColor, vec3 Value)
14 | {
15 | if ((InColor.r >= Value.r) && (InColor.g >= Value.g) && (InColor.b >= Value.b)) {
16 | return InColor;
17 | }
18 | return vec4(0.0, 0.0, 0.0, 0.0);
19 | }
20 |
21 | // average filter color, RGB.
22 | vec4 FilterColorAvg(vec4 InColor, float Value)
23 | {
24 | float ColorAverage = (InColor.r + InColor.g + InColor.b) / 3.0;
25 | if (ColorAverage > Value) {
26 | return InColor;
27 | }
28 | return vec4(0.0, 0.0, 0.0, 0.0);
29 | }
30 |
31 | // float32 random, value limit[0.0,1.0].
32 | float RandomFloat(float seed)
33 | {
34 | return fract(sin(seed) * 1949.100112 + cos(seed) * 194508.1512);
35 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLDefine/framework_def_header.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLDefine/framework_def_header.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLDefine/framework_def_math.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLDefine/framework_def_math.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/decode_channels/framework_channels_json.cpp:
--------------------------------------------------------------------------------
1 | // framework_channels_json.
2 | #include
3 | #include
4 | #include "../framework_filesys_loader.hpp"
5 |
6 | using namespace std;
7 | using namespace PSAG_LOGGER;
8 |
9 | namespace DecoderChannels {
10 |
11 | void JsonDecodeChannel::__SystemRawSource(RawDataStream* data) {
12 | if (data == nullptr) {
13 | PushLogger(LogError, PSAG_DEC_CHANNEL_STRING, "decoder data is nullptr.");
14 | return;
15 | }
16 | RawSourceDataRef = data;
17 | }
18 |
19 | bool JsonDecodeChannel::__SystemRawDecoding() {
20 | if (RawSourceDataRef->empty())
21 | return false;
22 | // raw_data => string => json_data.
23 | string ConvertRawDataToString(RawSourceDataRef->begin(), RawSourceDataRef->end());
24 | DecodeOutput.Parse(ConvertRawDataToString.c_str());
25 | return true;
26 | }
27 |
28 | rapidjson::Document* JsonDecodeChannel::GetDocumentOutput() {
29 | return &DecodeOutput;
30 | }
31 |
32 | rapidjson::Document JsonDecodeChannel::StringDecodeDocument(const string& str_data) {
33 | rapidjson::Document DecoderOutputTemp = {};
34 | string DecoderStrTemp = str_data;
35 | DecoderOutputTemp.Parse(DecoderStrTemp.c_str());
36 | return DecoderOutputTemp;
37 | }
38 | }
39 |
40 | namespace EncoderChannels {
41 |
42 | void JsonEncodeChannel::__SystemRawSource(RawDataStream* data) {
43 | if (data == nullptr) {
44 | PushLogger(LogError, PSAG_ENC_CHANNEL_STRING, "encoder data is nullptr.");
45 | return;
46 | }
47 | RawSourceDataRef = data;
48 | }
49 |
50 | bool JsonEncodeChannel::__SystemRawEncoding() {
51 | rapidjson::StringBuffer StrBuffer = {};
52 | rapidjson::Writer WriterDoc(StrBuffer);
53 |
54 | // write doc => buffer => string.
55 | if (!EncoderInput->Accept(WriterDoc)) {
56 | PushLogger(LogError, PSAG_ENC_CHANNEL_JSON, "failed loader(json) write(doc).");
57 | return false;
58 | }
59 | RawSourceDataRef->assign(StrBuffer.GetString(), StrBuffer.GetString() + StrBuffer.GetSize());
60 | PushLogger(LogInfo, PSAG_ENC_CHANNEL_JSON, "loader(json) write(doc): u%",
61 | RawSourceDataRef->size()
62 | );
63 | return true;
64 | }
65 |
66 | void JsonEncodeChannel::SetDocumentInput(rapidjson::Document* data) {
67 | EncoderInput = data;
68 | }
69 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/decode_channels/framework_channels_string.cpp:
--------------------------------------------------------------------------------
1 | // framework_channels_string.
2 | #include "../framework_filesys_loader.hpp"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | namespace DecoderChannels {
8 |
9 | void StringDecodeChannel::__SystemRawSource(RawDataStream* data) {
10 | if (data == nullptr) {
11 | PushLogger(LogError, PSAG_DEC_CHANNEL_STRING, "decoder data is nullptr.");
12 | return;
13 | }
14 | RawSourceDataRef = data;
15 | }
16 |
17 | bool StringDecodeChannel::__SystemRawDecoding() {
18 | if (RawSourceDataRef->empty())
19 | return false;
20 | DecoderOutput.assign(RawSourceDataRef->begin(), RawSourceDataRef->end());
21 | return true;
22 | }
23 |
24 | string StringDecodeChannel::GetStringOutput() {
25 | return DecoderOutput;
26 | }
27 | }
28 |
29 | namespace EncoderChannels {
30 |
31 | void StringEncodeChannel::__SystemRawSource(RawDataStream* data) {
32 | if (data == nullptr) {
33 | PushLogger(LogError, PSAG_ENC_CHANNEL_STRING, "encoder data is nullptr.");
34 | return;
35 | }
36 | RawSourceDataRef = data;
37 | }
38 |
39 | bool StringEncodeChannel::__SystemRawEncoding() {
40 | if (RawSourceDataRef->empty())
41 | return false;
42 | RawSourceDataRef->assign(EncoderInput.begin(), EncoderInput.end());
43 | return true;
44 | }
45 |
46 | void StringEncodeChannel::StringDataInput(const string& data) {
47 | EncoderInput = data;
48 | }
49 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/framework_filesys_compress.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/framework_filesys_compress.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/framework_filesys_compress.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/framework_filesys_compress.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/framework_filesys_loader.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLFilesys/framework_filesys_loader.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl_manager.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl_manager.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl_manager_tex.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl_manager_tex.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl_resource.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsOpenGL/psaglow_opengl_resource.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsResource/framework_psaglow_resource.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/LLGraphicsResource/framework_psaglow_resource.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/framework_renderer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/framework_renderer.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/framework_renderer_ext.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/framework_renderer_ext.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/framework_renderer_std.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLGraphics/framework_renderer_std.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLLogger/framework_logger.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLLogger/framework_logger.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLLogger/framework_logger.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLLogger/framework_logger.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLSound/framework_sound.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLSound/framework_sound.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLThread/framework_thread_simd.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLThread/framework_thread_simd.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLThread/framework_thread_simd.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLThread/framework_thread_simd.hpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_imgui_ms.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_imgui_ms.h
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_imgui_tools.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_imgui_tools.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_system.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_system.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_win32.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkCore/LLWindowGui/framework_window_win32.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/framework_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "WindowName": "PSAGame2D Framework",
3 | "WindowFull": false,
4 | "WindowSize": [ 1680, 945 ],
5 | "RenderMSAA": 4,
6 | "RenderWindowFixed": true,
7 | "TextureEdge": true,
8 | "TextureHigh": true,
9 | "TextureBasicSize": [ 4096, 4096 ],
10 | "TextureGen": [ 25, 20, 10, 5 ],
11 | "GuiWindowRounding": 3.8,
12 | "GuiFrameRounding": 5.8,
13 | "GuiFontFilepath": "PSAGameSystemFiles/JetBrainsMonoBold.ttf",
14 | "GuiFontSize": 32.0,
15 | "GuiFontColor": [ 0.0, 1.0, 1.0, 0.92 ]
16 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/framework_config_shaders.json:
--------------------------------------------------------------------------------
1 | {
2 | "system_shaders_version": "1.1.2",
3 | "public_vertex_template_actor": "PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_template_actor.vert",
4 | "public_vertex_template": "PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_template.vert",
5 | "public_fragment_tools": "PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_tools.frag",
6 | "public_fragment_header": "PSAGameFrameworkCore/CoreShaderScript/public/psag_graph_header.frag",
7 | "private_fragment_light": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_vollight.frag",
8 | "private_fragment_mulfilter": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_multfilter.frag",
9 | "private_fragment_bloom_h": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_blurh.frag",
10 | "private_fragment_bloom_v": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final_blurv.frag",
11 | "private_fragment_final_phase": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_final.frag",
12 | "private_fragment_background": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_background.frag",
13 | "private_fragment_particle": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_particle.frag",
14 | "private_fragment_fx_sequence": "PSAGameFrameworkCore/CoreShaderScript/private/psag_graph_fx_sequence.frag"
15 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/framework_header_actor.h:
--------------------------------------------------------------------------------
1 | // framework_dev_actor. RCSZ. 20240727.
2 | // dev_support: actor
3 |
4 | #ifndef __FRAMEWORK_DEV_ACTOR_H
5 | #define __FRAMEWORK_DEV_ACTOR_H
6 | #include "../PSAGameFrameworkCore/CoreFramework/psag_core_drivers.h"
7 |
8 | namespace PsagActorType = GameActorCore::Type;
9 | namespace PsagActor {
10 | namespace DebugTools = GameDebugGuiWindow;
11 |
12 | using VertexDESC = GameActorCore::GameActorShaderVerticesDESC;
13 | using ActorHpDESC = GameActorCore::GameActorHealthDESC;
14 | using ActorDESC = GameActorCore::GameActorExecutorDESC;
15 | using EnvmtDESC = GameEnvmtCore::GameEnvmtExecutorDESC;
16 | using ActorSensorDESC = GameActorCore::GameActorCircleSensorDESC;
17 |
18 | using ActorUnique = GameComponents::ActorPrivateINFO;
19 | using EnvmtUnique = size_t;
20 |
21 | using ActorFlagsComp = GameActorCore::ActorComponentFlags;
22 | using ActorFlagsPhy = GameActorCore::ActorCollisionGroup;
23 |
24 | using ActorShader = GameActorCore::GameActorShader;
25 | using Actor = GameActorCore::GameActorExecutor;
26 | using Envmt = GameEnvmtCore::GameEnvmtExecutor;
27 | using ActorSensor = GameActorCore::GameActorCircleSensor;
28 |
29 | using ActorHP = GameComponents::GameActorHP;
30 | using ActorLogicBase = GameComponents::ActorActionLogicBase;
31 | using ActorCollision = GameActorCore::GameCollisionPAIR;
32 |
33 | using ShaderManager = GameCoreManager::GameActorShaderManager;
34 | using ActorsManager = GameCoreManager::GameActorExecutorManager;
35 | using EnvmtsManager = GameCoreManager::GameEnvmtExecutorManager;
36 |
37 | // physical_world operate: create, delete.
38 | using OperPhysicalWorld = GamePhysicsOper::GamePhysicalWorld;
39 | // system preset actor shader_script.
40 | using PresetScript = GameActorCore::GameActorPresetScript;
41 | }
42 | #define ACTOR_COLL_FUNC [&](PsagActor::Actor* ThisActor)
43 |
44 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/framework_header_manager.h:
--------------------------------------------------------------------------------
1 | // framework_dev_manager. RCSZ. 20240727.
2 | // dev_support: manager
3 |
4 | #ifndef __FRAMEWORK_DEV_MANAGER_H
5 | #define __FRAMEWORK_DEV_MANAGER_H
6 | #include "../PSAGameFrameworkCore/CoreFramework/psag_core_drivers.h"
7 |
8 | namespace PsagManager {
9 | namespace Fx {
10 | using ParticleDESC = GameManagerCore::GameFX::GameFxParticleDESC;
11 | using Particle = GameManagerCore::GameFX::GameFxParticle;
12 |
13 | using ParticleColorMode = GameManagerCore::GameFX::ParticleColorMode;
14 |
15 | using ParticleSrcAttrib = GameManagerCore::GameFX::ParticleAttributes;
16 | using ParticleSrcArray = GameManagerCore::GameFX::ParticlesDataset;
17 |
18 | using ParticleGenPoints = GameManagerCore::GameFX::System::GeneratorPointsDiffu;
19 | using ParticleGenShape = GameManagerCore::GameFX::System::GeneratorShape;
20 | using ParticleGenDrift = GameManagerCore::GameFX::System::GeneratorDriftDown;
21 |
22 | using SpriteSheetDESC = GameManagerCore::GameFX::GameFxSpriteSheetDESC;
23 | using SpriteSheet = GameManagerCore::GameFX::GameFxSpriteSheet;
24 | }
25 |
26 | using FINAL_PARAMS = GameManagerCore::GameSceneForFinal::SceneFinalParams;
27 | namespace SceneFinal = GameManagerCore::GameSceneForFinal;
28 | namespace ResPathSystem = GameManagerCore::GameFileSystemPath;
29 |
30 | namespace FxView = GameManagerCore::GameView;
31 | namespace Maths = GameManagerCore::GameMathsTools;
32 | namespace SyncLoader = GameManagerCore::GameSyncLoader;
33 | namespace PtrMAG = GameManagerCore::PointerManager;
34 | namespace Notify = GameManagerCore::GameNotify;
35 | namespace NoiseMap = GameManagerCore::GameNoiseMap;
36 |
37 | namespace Tools {
38 | namespace RAND = ToolkitsEngineRandom::Func;
39 | namespace Random = ToolkitsEngineRandom;
40 | namespace Pawn = ToolkitsEnginePawn;
41 | namespace Camera = ToolkitsEngineCamera;
42 | namespace Timer = ToolkitsEngineTimerClock;
43 | namespace Sound = ToolkitsEngineSound;
44 | }
45 | // imgui gui extension_contral.
46 | namespace GuiTools = ToolkitsEngineGuiExt;
47 | // platform(windows) api tools.
48 | namespace Win32Tools = PsagLow::WindowsTools;
49 |
50 | // framework start anim loader.
51 | using StartAnimLOAD = PsagFrameworkAnim::PsagStartAnimLoad;
52 |
53 | #define AudioConvert PsagSupAudioRawCVT
54 | }
55 |
56 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkCore/framework_init_register.cpp:
--------------------------------------------------------------------------------
1 | // framework_init_register.
2 | #include"CoreFramework/psag_core_drivers.h"
3 |
4 | // include dev game_logic header.
5 | #include "../PSAGameFrameworkDev/GameZeroProject/zero_project_scene.h"
6 | #include "../PSAGameFrameworkDev/GameZeroProject/zero_project_pawn.h"
7 | #include "../PSAGameFrameworkDev/GameZeroProject/zero_project_bullet.h"
8 | #include "../PSAGameFrameworkDev/GameZeroProject/zero_project_gui.h"
9 |
10 | #include "../PSAGameFrameworkDev/GameLab/psag_game_lab.h"
11 |
12 | // register_class: 'PSAGCLASS()'
13 | PSAGCLASS(ZPGameSceneMain);
14 | PSAGCLASS(ZPGamePawnActor);
15 | PSAGCLASS(ZPGameBulletSystem);
16 | PSAGCLASS(ZPGameGuiMain);
17 |
18 | //PSAGCLASS(PSAGameFrameworkLab);
19 |
20 | namespace PsagFrameworkCore {
21 | void PSAGame2DFramework::InitializeRegistrationDev() {
22 | // use: 'RegDev::GAMEREF.ReflectionObjectCreate'
23 | // register,create class,object...
24 |
25 | RegisterDevClass::GAMEREF.ReflectionObjectCreate("ZPGameSceneMain", "ZPGameScene");
26 | RegisterDevClass::GAMEREF.ReflectionObjectCreate("ZPGamePawnActor", "ZPGamePActor");
27 | RegisterDevClass::GAMEREF.ReflectionObjectCreate("ZPGameBulletSystem", "ZPGameBullet");
28 | RegisterDevClass::GAMEREF.ReflectionObjectCreate("ZPGameGuiMain", "ZPGameGui");
29 |
30 | //RegisterDevClass::GAMEREF.ReflectionObjectCreate("PSAGameFrameworkLab", "Lab");
31 | }
32 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameLab/psag_game_lab.cpp:
--------------------------------------------------------------------------------
1 | // psag_game_lab.
2 | #include "psag_game_lab.h"
3 |
4 | using namespace std;
5 |
6 | bool PSAGameFrameworkLab::LogicInitialization(const Vector2T&WinSize) {
7 |
8 | return true;
9 | }
10 |
11 | void PSAGameFrameworkLab::LogicCloseFree() {
12 | Texture[0].DeletePointer();
13 | Texture[1].DeletePointer();
14 | Texture[2].DeletePointer();
15 | Texture[3].DeletePointer();
16 | }
17 | Vector2T Blocks[4] = {
18 | Vector2T(1, 1),
19 | Vector2T(2, 1),
20 | Vector2T(1, 2),
21 | Vector2T(2, 2)
22 | };
23 |
24 | PsagManager::NoiseMap::SharedCache TestCache = {};
25 |
26 | bool PSAGameFrameworkLab::LogicEventLoopGame(GameLogic::FrameworkParams& RunningState) {
27 | ImGui::Begin("TEST: NoiseMap");
28 | {
29 | if (ImGui::Button("Generate Block")) {
30 | for (size_t i = 0; i < 4; ++i) {
31 |
32 | PsagManager::NoiseMap::NoiseBlockDESC Config = {};
33 | Config.BlockNumberGrids = 8 * 8;
34 | Config.CacheIndex = &TestCache;
35 |
36 | PsagManager::NoiseMap::NoiseBlock TestGenMap(
37 | 512, Blocks[i].vector_x, Blocks[i].vector_y, Config
38 | );
39 | Texture[i].CreatePointer(TestGenMap.GenerateNoiseDataImage());
40 | TextureIndex[i] = Texture[i].Get()->GetTextureView();
41 | }
42 | }
43 | ImVec2 Coord = ImGui::GetCursorPos();
44 | ImGui::Image(IMGUI_TEXTURE_ID(TextureIndex[0]), ImVec2(384.0f, 384.0f));
45 | ImGui::SetCursorPos(ImVec2(Coord.x + 384.0f, Coord.y));
46 | ImGui::Image(IMGUI_TEXTURE_ID(TextureIndex[1]), ImVec2(384.0f, 384.0f));
47 |
48 | ImGui::SetCursorPos(ImVec2(Coord.x, Coord.y + 384.0f));
49 | ImGui::Image(IMGUI_TEXTURE_ID(TextureIndex[2]), ImVec2(384.0f, 384.0f));
50 | ImGui::SetCursorPos(ImVec2(Coord.x + 384.0f, Coord.y + 384.0f));
51 | ImGui::Image(IMGUI_TEXTURE_ID(TextureIndex[3]), ImVec2(384.0f, 384.0f));
52 | }
53 | ImGui::End();
54 | return true;
55 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameLab/psag_game_lab.h:
--------------------------------------------------------------------------------
1 | // psag_game_lab. RCSZ.
2 | // framework game test.
3 |
4 | #ifndef __PSAG_GAME_LAB_H
5 | #define __PSAG_GAME_LAB_H
6 | #include "../../PSAGameFrameworkCore/framework_header_actor.h"
7 | #include "../../PSAGameFrameworkCore/framework_header_manager.h"
8 |
9 | namespace Mptr = PsagManager::PtrMAG;
10 |
11 | class PSAGameFrameworkLab :public GameLogic::INTERFACE_DEVCLASS_GAME {
12 | protected:
13 | Mptr::DefinePointer Texture[4] = {};
14 | uint32_t TextureIndex[4] = {};
15 | public:
16 | // init: return flag: false:failed, true:success.
17 | bool LogicInitialization(const Vector2T& WinSize);
18 | void LogicCloseFree();
19 | // loop: return flag: false:continue, true:exit.
20 | bool LogicEventLoopGame(GameLogic::FrameworkParams& RunningState);
21 | };
22 |
23 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/psagame2d/PSAGame2D0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/psagame2d/PSAGame2D0.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/psagame2d/PSAGame2D1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/psagame2d/PSAGame2D1.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/psagame2d/PSAGame2D2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/psagame2d/PSAGame2D2.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_bullet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_bullet.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b0.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b1.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b2.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b3.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b4.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_gui/zpgame_gui_b5.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_npc_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_npc_a.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_particle_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_particle_a.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_ppactor_nor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_ppactor_nor.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_wall_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_wall_h.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_wall_v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/GameMaterial/zpgame_wall_v.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/NewYearFireworks.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/NewYearFireworks.zip
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/base_define_header.cpp:
--------------------------------------------------------------------------------
1 | // base_define_header.
2 | #include "base_define_header.hpp"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | Mptr::DefinePointer ZPGameGlobale::GLO_Notify = {};
8 | Mptr::DefinePointer* ZPGameGlobale::GLO_NpcActorsRef = nullptr;
9 | size_t ZPGameGlobale::GLO_PlayerBullets = 0;
10 | float ZPGameGlobale::GLO_PlayerDamageCount = 0.0f;
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/base_define_header.hpp:
--------------------------------------------------------------------------------
1 | // base_define_header. 2025_01_17 RCSZ.
2 | // game: [ZeroProject] base define header_file.
3 | // @pomelo_star studio "PSAGame2D Framework"
4 | // game version:
5 | #define GAME_VERSION_ZPRO "1.0.0.20250127"
6 | // developer(s): RCSZ.
7 |
8 | #ifndef __BASE_DEFINE_HEADER_HPP
9 | #define __BASE_DEFINE_HEADER_HPP
10 | #include "../../PSAGameFrameworkCore/framework_header_actor.h"
11 | #include "../../PSAGameFrameworkCore/framework_header_manager.h"
12 |
13 | inline std::string SYSPATH_REF(const std::string& name) {
14 | return "PSAGameFrameworkDev/GameZeroProject/GameMaterial/" + name;
15 | }
16 | namespace Mptr = PsagManager::PtrMAG;
17 |
18 | using ShaderCode = const char*;
19 |
20 | class ZPGameGlobale {
21 | protected:
22 | // scene module: create, delete ptr.
23 | static Mptr::DefinePointer GLO_Notify;
24 | static Mptr::DefinePointer* GLO_NpcActorsRef;
25 | static size_t GLO_PlayerBullets;
26 | static float GLO_PlayerDamageCount;
27 | };
28 |
29 | struct PPActorBulletFire {
30 | float Angle = 0.0f;
31 | Vector2T Position = {};
32 | };
33 |
34 | struct QueryHitNpcActor {
35 | ResUnique UniqueCode = NULL;
36 | float BulletDamage = 0.0f;
37 | };
38 |
39 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_bullet.h:
--------------------------------------------------------------------------------
1 | // zero_project_bullet. RCSZ.
2 | // game module(desc): gun bullet.
3 |
4 | #ifndef __ZERO_PROJECT_BULLET
5 | #define __ZERO_PROJECT_BULLET
6 | #include "base_define_header.hpp"
7 |
8 | class BulletParticle {
9 | protected:
10 | Mptr::DefinePointer ParticleSystem = {};
11 | void InitParticleSystem(const Vector2T& window_size);
12 |
13 | void CreateParticleFly (const Vector2T& position, float number);
14 | void CreateParticleFreeB(const Vector2T& position, float number);
15 |
16 | void DebugParticleSystem();
17 | public:
18 | ~BulletParticle();
19 | };
20 |
21 | class ZPGameBulletSystem :public GameLogic::INTERFACE_DEVCLASS_GAME,
22 | public BulletParticle, public ZPGameGlobale {
23 | protected:
24 | Mptr::DefinePointer ActorShaders = {};
25 | Mptr::DefinePointer ActorEntities = {};
26 |
27 | Mptr::DefinePointer BulletStationPPActor = {};
28 |
29 | void BulletLogic_PPAB(PsagActor::Actor* ThisActor);
30 |
31 | void CreateBullet(const Vector2T& position, float angle);
32 | public:
33 | // init: return flag: false:failed, true:success.
34 | bool LogicInitialization(const Vector2T& WinSize);
35 | void LogicCloseFree();
36 | // loop: return flag: false:continue, true:exit.
37 | bool LogicEventLoopGame(GameLogic::FrameworkParams& RunningState);
38 | };
39 |
40 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_gui.cpp:
--------------------------------------------------------------------------------
1 | // zero_project_gui.
2 | #include "zero_project_gui.h"
3 |
4 | using namespace std;
5 | using namespace PSAG_LOGGER;
6 |
7 | bool ZPGameGuiMain::LogicInitialization(const Vector2T& WinSize) {
8 | PsagManager::SyncLoader::SyncEncDecImage DecodeRawImage;
9 |
10 | // load gui textures.
11 | for (size_t i = 0; i < 6; ++i) {
12 | Mptr::DefinePointer TextureView = {};
13 | string ImageName = "zpgame_gui/zpgame_gui_b" + to_string(i) + ".png";
14 | ControlSlotDrawTextures[i] =
15 | new PsagManager::FxView::TextureViewImage(
16 | DecodeRawImage.DecodeImageRawData(
17 | PsagManager::SyncLoader::FSLD::EasyFileReadRawData(SYSPATH_REF(ImageName))
18 | ));
19 | }
20 | return true;
21 | }
22 |
23 | void ZPGameGuiMain::LogicCloseFree() {
24 | // free resource.
25 | for (auto Texture : ControlSlotDrawTextures)
26 | delete Texture.second;
27 | }
28 |
29 | bool ZPGameGuiMain::LogicEventLoopGame(GameLogic::FrameworkParams& RunningState) {
30 | ImGuiWindowFlags Flags = ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoResize |
31 | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar;
32 |
33 | LerpDamageView += (GLO_PlayerDamageCount - LerpDamageView)
34 | * 0.025f * RunningState.GameRunTimeSTEP;
35 |
36 | ImGui::SetNextWindowSize(ImVec2(330.0f, 180.0f));
37 | ImGui::SetNextWindowPos(ImVec2(32.0f, ImGui::GetIO().DisplaySize.y - 160.0f));
38 | ImGui::Begin("##CONTROL", (bool*)NULL, Flags);
39 | ImGui::SetWindowFontScale(1.8f);
40 | {
41 | auto ImGuiImage = IMGUI_TEXTURE_ID(ControlSlotDrawTextures[GLO_PlayerBullets]->GetTextureView());
42 | ImGui::Image(ImGuiImage, ImVec2(320.0f, 320.0f * 0.2715f));
43 | ImGui::Text("Damage: %.1f", LerpDamageView);
44 | }
45 | ImGui::End();
46 | return true;
47 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_gui.h:
--------------------------------------------------------------------------------
1 | // zero_project_gui. RCSZ.
2 | // game module(desc): game main ui.
3 |
4 | #ifndef __ZERO_PROJECT_GUI_H
5 | #define __ZERO_PROJECT_GUI_H
6 | #include "base_define_header.hpp"
7 |
8 | class ZPGameGuiMain :public GameLogic::INTERFACE_DEVCLASS_GAME,
9 | public ZPGameGlobale {
10 | protected:
11 | std::unordered_map
12 | ControlSlotDrawTextures = {};
13 | float LerpDamageView = 0.0f;
14 | public:
15 | // init: return flag: false:failed, true:success.
16 | bool LogicInitialization(const Vector2T& WinSize);
17 | void LogicCloseFree();
18 | // loop: return flag: false:continue, true:exit.
19 | bool LogicEventLoopGame(GameLogic::FrameworkParams& RunningState);
20 | };
21 |
22 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_pawn.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_pawn.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_pawn.h:
--------------------------------------------------------------------------------
1 | // zero_project_pawn. RCSZ.
2 | // game module(desc): pawn actor & npc.
3 |
4 | #ifndef __ZERO_PROJECT_PAWN
5 | #define __ZERO_PROJECT_PAWN
6 | #include "base_define_header.hpp"
7 |
8 | extern ShaderCode PawnActorNormal;
9 |
10 | struct PlayerActorAttribute {
11 | float StateMaxHealth = 122000.0f;
12 | };
13 |
14 | struct NpcActorAttribute {
15 | float StateMaxHealth = 12000.0f;
16 | };
17 |
18 | class ZPGamePawnActor :public GameLogic::INTERFACE_DEVCLASS_GAME,
19 | public ZPGameGlobale {
20 | protected:
21 | Mptr::DefinePointer ActorShaders = {};
22 |
23 | PlayerActorAttribute PPActorParams = {};
24 | NpcActorAttribute NpcActorParams = {};
25 |
26 | // player pawn actor_entity.
27 | Mptr::DefinePointer PlayerActorEntity = {};
28 | Mptr::DefinePointer PlayerActorStation = {};
29 | Mptr::DefinePointer PlayerActorCamera = {};
30 | Mptr::DefinePointer PlayerActorPawn = {};
31 |
32 | // npc pawn actor_entities.
33 | Mptr::DefinePointer NpcActorEntities = {};
34 |
35 | Mptr::DefinePointer DEBUG_GUI = {};
36 |
37 | void CreateNpcActor(size_t number);
38 | void CreateNpcActorEntity(const Vector2T& position);
39 | public:
40 | // init: return flag: false:failed, true:success.
41 | bool LogicInitialization(const Vector2T& WinSize);
42 | void LogicCloseFree();
43 | // loop: return flag: false:continue, true:exit.
44 | bool LogicEventLoopGame(GameLogic::FrameworkParams& RunningState);
45 | };
46 |
47 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_pawn_glsl.cpp:
--------------------------------------------------------------------------------
1 | // zero_project_pawn_glsl.
2 | #include "zero_project_pawn.h"
3 |
4 | using namespace std;
5 |
6 | ShaderCode PawnActorNormal = R"(
7 | #define WAVE_FREQUENCY 48.0
8 | #define WAVE_AMPLITUDE 0.005
9 |
10 | void main()
11 | {
12 | float Wave = sin(WAVE_FREQUENCY * FxCoord.y + RenderTime) * WAVE_AMPLITUDE;
13 | vec2 DistTexCoord = vec2(FxCoord.x + Wave, FxCoord.y);
14 |
15 | FragColor = SampleTexturePPActor(DistTexCoord);
16 | }
17 | )";
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_scene.h:
--------------------------------------------------------------------------------
1 | // zero_project_scene. RCSZ.
2 | // game module(desc): main scene.
3 |
4 | #ifndef __ZERO_PROJECT_SCENE
5 | #define __ZERO_PROJECT_SCENE
6 | #include "base_define_header.hpp"
7 |
8 | extern ShaderCode SceneBackground;
9 |
10 | class ZPGameSceneMain :public GameLogic::INTERFACE_DEVCLASS_GAME,
11 | public ZPGameGlobale {
12 | protected:
13 | Mptr::DefinePointer SceneShaders = {};
14 | Mptr::DefinePointer SceneStatic = {};
15 |
16 | Mptr::DefinePointer SceneFinal = {};
17 | void CreateSceneStatic();
18 |
19 | // x: mouse wheel out, y: value lerp.
20 | ImVec2 SceneScaleTrans = ImVec2(1.0f, 1.0f);
21 | void SceneMouseScaleLerp(float timestep, float NoiseScale);
22 | public:
23 | // init: return flag: false:failed, true:success.
24 | bool LogicInitialization(const Vector2T& WinSize);
25 | void LogicCloseFree();
26 | // loop: return flag: false:continue, true:exit.
27 | bool LogicEventLoopGame(GameLogic::FrameworkParams& RunningState);
28 | };
29 |
30 | #endif
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_scene_glsl.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/GameZeroProject/zero_project_scene_glsl.cpp
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/PSAGameUserActorV2/ActorShipV2.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/PSAGameUserActorV2/ActorShipV2.psd
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/PSAGameUserActorV2/ActorV2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/PSAGameUserActorV2/ActorV2.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameFrameworkDev/PSAGameUserActorV2/ActorV2_HDR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameFrameworkDev/PSAGameUserActorV2/ActorV2_HDR.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameHDR12-TEST/PSAG_HDR_TEST.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameHDR12-TEST/PSAG_HDR_TEST.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameHDR12-TEST/PSAG_HDR_TEST_BLEND.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameHDR12-TEST/PSAG_HDR_TEST_BLEND.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameSystemFiles/ExternalModulePathlist.json:
--------------------------------------------------------------------------------
1 | {
2 | "ExtModuleVersion": 100,
3 | "ExtModuleHeader": [
4 | "ExternalLibrary/GraphicsLibrary/glew_library/include/",
5 | "ExternalLibrary/GraphicsLibrary/glfw_library/include/",
6 | "ExternalLibrary/GraphicsLibrary/glm_library/include/",
7 | "ExternalLibrary/GraphicsLibrary/image_loader/",
8 | "ExternalLibrary/GuiimguiLibrary/",
9 | "ExternalLibrary/FiletoolsLibrary/RapidJSON/include/",
10 | "ExternalLibrary/FiletoolsLibrary/OpenAL/include/",
11 | "ExternalLibrary/FiletoolsLibrary/Zlib/include/",
12 | "ExternalLibrary/FiletoolsLibrary/Base64/",
13 | "ExternalLibrary/PhysicalLibray/include"
14 | ],
15 | "ExtModuleLibray": [
16 | "ExternalLibrary/GraphicsLibrary/glfw_libray/lib-vc2019/",
17 | "ExternalLibrary/GraphicsLibrary/glew_libray/bin/Release/x64/",
18 | "ExternalLibrary/FiletoolsLibrary/OpenAL/lib/Win64/",
19 | "ExternalLibrary/FiletoolsLibrary/Zlib/lib/",
20 | "ExternalLibrary/PhysicalLibray/lib"
21 | ]
22 | }
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameSystemFiles/JetBrainsMonoBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameSystemFiles/JetBrainsMonoBold.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameSystemFiles/PomeloStarLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameSystemFiles/PomeloStarLogo.png
--------------------------------------------------------------------------------
/PSAGameFramework/PSAGameSystemFiles/YouSheBiaoTiHei.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rcszc/PSAGame2D/29e232eec7e286b1f2e261cf9d58c54f9e1cb566/PSAGameFramework/PSAGameSystemFiles/YouSheBiaoTiHei.ttf
--------------------------------------------------------------------------------
/PSAGameFramework/x64/Debug/PSAGameFramework.exe.recipe:
--------------------------------------------------------------------------------
1 |
2 |
3 |