├── .clang-format ├── .github ├── PULL_REQUEST_TEMPLATES │ ├── pull_request_template.md │ └── release_template.md └── workflows │ ├── macosx-ci.yml │ ├── ubuntu-24.04.yml │ ├── windows-server-2019.yml │ └── windows-server-2022.yml ├── .gitignore ├── .mailmap ├── CMakeLists.txt ├── Makefile ├── README.md ├── assets ├── .gitignore ├── CMakeLists.txt ├── doc │ ├── liberapay.svg │ ├── license.svg │ ├── matrix.svg │ ├── matrixroom.svg │ └── reddit.svg ├── logo │ ├── CMakeLists.txt │ ├── banner-xlink.svg │ ├── banner.png │ ├── banner.svg │ ├── crown.svg │ ├── crown_print.svg │ └── favicon.ico ├── qml │ ├── .gitignore │ ├── Actions.qml │ ├── ActionsGrid.qml │ ├── BindsHelp.qml │ ├── ButtonExtruded.qml │ ├── ButtonExtrudedStyle.qml │ ├── ButtonFlat.qml │ ├── ButtonFlatStyle.qml │ ├── CheckBoxFlat.qml │ ├── CheckBoxFlatStyle.qml │ ├── CreateGameWhenReady.qml │ ├── GeneratorControl.qml │ ├── GeneratorParametersConfiguration.qml │ ├── IngameHud.qml │ ├── Paper.qml │ ├── TextFieldFlat.qml │ ├── TextFieldFlatStyle.qml │ ├── TypePicker.qml │ └── main.qml ├── shaders │ ├── CMakeLists.txt │ ├── alphamask.frag.glsl │ ├── alphamask.vert.glsl │ ├── equalsEpsilon.glsl │ ├── final.frag.glsl │ ├── final.vert.glsl │ ├── hud_drag_select.frag.glsl │ ├── hud_drag_select.vert.glsl │ ├── identity.vert.glsl │ ├── maptexture.frag.glsl │ ├── maptexture.vert.glsl │ ├── skybox.frag.glsl │ ├── skybox.vert.glsl │ ├── teamcolors.frag.glsl │ ├── terrain.frag.glsl │ ├── terrain.vert.glsl │ ├── texturefont.frag.glsl │ ├── texturefont.vert.glsl │ ├── world2d.frag.glsl │ ├── world2d.vert.glsl │ └── world3d.vert.glsl ├── test │ ├── CMakeLists.txt │ ├── nyan │ │ ├── CMakeLists.txt │ │ └── pong.nyan │ ├── qml │ │ ├── CMakeLists.txt │ │ └── main.qml │ ├── shaders │ │ ├── CMakeLists.txt │ │ ├── demo_0_display.frag.glsl │ │ ├── demo_0_display.vert.glsl │ │ ├── demo_1_display.frag.glsl │ │ ├── demo_1_display.vert.glsl │ │ ├── demo_1_obj.frag.glsl │ │ ├── demo_1_obj.vert.glsl │ │ ├── demo_2_display.frag.glsl │ │ ├── demo_2_display.vert.glsl │ │ ├── demo_2_obj.frag.glsl │ │ ├── demo_2_obj.vert.glsl │ │ ├── demo_4_display.frag.glsl │ │ ├── demo_4_display.vert.glsl │ │ ├── demo_4_obj.frag.glsl │ │ ├── demo_4_obj.vert.glsl │ │ ├── demo_5_obj.frag.glsl │ │ ├── demo_5_obj.vert.glsl │ │ ├── demo_6_2d.frag.glsl │ │ ├── demo_6_2d.vert.glsl │ │ ├── demo_6_2d_frame.frag.glsl │ │ ├── demo_6_2d_frame.vert.glsl │ │ ├── demo_6_2d_frustum_frame.vert.glsl │ │ ├── demo_6_3d.frag.glsl │ │ ├── demo_6_3d.vert.glsl │ │ ├── demo_6_display.frag.glsl │ │ ├── demo_6_display.vert.glsl │ │ ├── demo_7_shader_command.frag.glsl │ │ ├── demo_7_shader_command.vert.glsl │ │ ├── demo_7_snippets │ │ │ ├── alpha.snippet │ │ │ └── color.snippet │ │ └── pathfinding │ │ │ ├── CMakeLists.txt │ │ │ ├── demo_0_cost_field.frag.glsl │ │ │ ├── demo_0_cost_field.vert.glsl │ │ │ ├── demo_0_display.frag.glsl │ │ │ ├── demo_0_display.vert.glsl │ │ │ ├── demo_0_flow_field.frag.glsl │ │ │ ├── demo_0_flow_field.vert.glsl │ │ │ ├── demo_0_grid.frag.glsl │ │ │ ├── demo_0_grid.vert.glsl │ │ │ ├── demo_0_integration_field.frag.glsl │ │ │ ├── demo_0_integration_field.vert.glsl │ │ │ ├── demo_0_obj.frag.glsl │ │ │ ├── demo_0_obj.vert.glsl │ │ │ ├── demo_0_vector.frag.glsl │ │ │ ├── demo_0_vector.vert.glsl │ │ │ ├── demo_1_display.frag.glsl │ │ │ ├── demo_1_display.vert.glsl │ │ │ ├── demo_1_grid.frag.glsl │ │ │ ├── demo_1_grid.vert.glsl │ │ │ ├── demo_1_obj.frag.glsl │ │ │ └── demo_1_obj.vert.glsl │ └── textures │ │ ├── CMakeLists.txt │ │ ├── gaben.png │ │ ├── missing.png │ │ ├── test_animation.sprite │ │ ├── test_gaben.sprite │ │ ├── test_gaben.texture │ │ ├── test_missing.sprite │ │ ├── test_missing.texture │ │ ├── test_tank.png │ │ ├── test_tank.sprite │ │ ├── test_tank.texture │ │ ├── test_tank_mirrored.sprite │ │ ├── test_terrain.png │ │ ├── test_terrain.terrain │ │ ├── test_terrain.texture │ │ ├── test_terrain2.png │ │ ├── test_terrain2.terrain │ │ ├── test_terrain2.texture │ │ ├── test_texture.png │ │ └── test_texture.texture └── textures │ ├── CMakeLists.txt │ ├── torn_paper_edge.docx │ └── torn_paper_edge.png ├── buildsystem ├── CheckCompilerFeatures.cmake ├── CheckInSourceBuild.cmake ├── CheckRuntimeDependencies.cmake ├── DependencyFetch.cmake ├── DetectProjectVersion.cmake ├── HandleCXXOptions.cmake ├── HandlePythonOptions.cmake ├── __init__.py ├── check_py_file_list.py ├── codecompliance │ ├── __init__.py │ ├── __main__.py │ ├── authors.py │ ├── clangtidy.py │ ├── cppstyle.py │ ├── cython.py │ ├── headerguards.py │ ├── legal.py │ ├── modes.py │ ├── pylint.py │ ├── pystyle.py │ ├── textfiles.py │ └── util.py ├── codegen.cmake ├── compilepy.py ├── cpp.cmake ├── cythonize.py ├── doxygen.cmake ├── doxygen_custom.css ├── inplacemodules.py ├── modules │ ├── DownloadCache.cmake │ ├── FindCython.cmake │ ├── FindEpoxy.cmake │ ├── FindGCCBacktrace.cmake │ ├── FindGPerfTools.cmake │ ├── FindHarfBuzz.cmake │ ├── FindInotify.cmake │ ├── FindOgg.cmake │ ├── FindOpusfile.cmake │ ├── FindPython.cmake │ └── FindPython_test.cpp ├── options.cmake ├── pxdgen.py ├── python.cmake ├── scripts │ ├── EmbedFont.cmake │ ├── EmbedPython.cmake │ ├── EmbedWinDependencies.cmake │ └── copy_modules.py ├── templates │ ├── Doxyfile.in │ ├── ExternalFetch.cmake.in │ ├── ForwardVariables.cmake.in │ ├── openage.bat.in │ └── qt.conf └── util.cmake ├── cfg ├── .gitignore ├── CMakeLists.txt ├── converter │ └── games │ │ ├── aoc │ │ └── version_hashes.toml │ │ ├── aoc_demo │ │ └── version_hashes.toml │ │ ├── aok │ │ └── version_hashes.toml │ │ ├── de1 │ │ └── version_hashes.toml │ │ ├── de2 │ │ └── version_hashes.toml │ │ ├── game_editions.toml │ │ ├── game_expansions.toml │ │ ├── hd │ │ └── version_hashes.toml │ │ ├── hd_ak │ │ └── version_hashes.toml │ │ ├── hd_fgt │ │ └── version_hashes.toml │ │ ├── hd_raj │ │ └── version_hashes.toml │ │ ├── ror │ │ └── version_hashes.toml │ │ ├── swgb │ │ └── version_hashes.toml │ │ └── swgb_cc │ │ └── version_hashes.toml └── keybinds.oac ├── changelog.md ├── configure ├── copying.md ├── dist ├── CMakeLists.txt ├── README.md └── openage.desktop ├── doc ├── README.md ├── assets.md ├── build_instructions │ ├── arch_linux.md │ ├── debian.md │ ├── docker.md │ ├── fedora.md │ ├── freebsd.md │ ├── gentoo.md │ ├── macos.md │ ├── nix.md │ ├── opensuse.md │ ├── ubuntu.md │ └── windows_msvc.md ├── building.md ├── buildsystem.md ├── changelogs │ ├── engine │ │ ├── v0.0.0.md │ │ ├── v0.1.0.md │ │ ├── v0.2.0.md │ │ ├── v0.2.1.md │ │ ├── v0.2.2.md │ │ ├── v0.2.3.md │ │ ├── v0.3.0-alpha.md │ │ ├── v0.3.0.md │ │ ├── v0.4.0.md │ │ ├── v0.4.1.md │ │ ├── v0.5.0.md │ │ ├── v0.5.1.md │ │ ├── v0.5.2.md │ │ ├── v0.5.3.md │ │ └── v0.6.0.md │ └── nyan_api │ │ ├── v0.1.0.md │ │ ├── v0.2.0.md │ │ ├── v0.3.0.md │ │ ├── v0.4.0.md │ │ ├── v0.4.1.md │ │ └── v0.5.0.md ├── code │ ├── README.md │ ├── architecture.md │ ├── converter │ │ ├── README.md │ │ ├── architecture_overview.md │ │ ├── images │ │ │ └── workflow.svg │ │ └── workflow.md │ ├── coordinate-systems.md │ ├── curves.md │ ├── event_system.md │ ├── exceptions.md │ ├── game_simulation │ │ ├── README.md │ │ ├── activity.md │ │ ├── components.md │ │ ├── game_entity.md │ │ ├── images │ │ │ ├── activity_graph.svg │ │ │ ├── activity_workflow.png │ │ │ ├── component_activity_uml.svg │ │ │ ├── component_command_queue_uml.svg │ │ │ ├── component_idle_uml.svg │ │ │ ├── component_live_uml.svg │ │ │ ├── component_move_uml.svg │ │ │ ├── component_ownership_uml.svg │ │ │ ├── component_position_uml.svg │ │ │ ├── component_turn_uml.svg │ │ │ ├── component_uml.svg │ │ │ ├── game_entity_overview.svg │ │ │ ├── game_entity_uml.svg │ │ │ ├── simulation_uml.svg │ │ │ ├── system_idle.svg │ │ │ └── system_move.svg │ │ └── systems.md │ ├── gui.md │ ├── images │ │ ├── component_classes.uxf │ │ ├── continuous_curve.ggb │ │ ├── continuous_curve.png │ │ ├── curve_classes_uml.svg │ │ ├── curves_classes.uxf │ │ ├── discrete_curve.ggb │ │ ├── discrete_curve.png │ │ ├── engine_architecture.svg │ │ ├── engine_architecture.uxf │ │ ├── engine_target_architecture.svg │ │ ├── event_classes.uxf │ │ ├── event_classes_uml.svg │ │ ├── game_entity_classes.uxf │ │ ├── pathfinder_architecture.svg │ │ ├── pathfinder_architecture.uxf │ │ ├── primitive_curves_uml.svg │ │ ├── segmented_curve.ggb │ │ ├── segmented_curve.png │ │ ├── simulation.uxf │ │ ├── system_classes.uxf │ │ ├── time_classes.uxf │ │ └── time_classes_uml.svg │ ├── input │ │ ├── README.md │ │ └── images │ │ │ ├── class_relationships_input_controller.svg │ │ │ └── workflow_input_controller.svg │ ├── logger.md │ ├── optimization.md │ ├── pathfinding │ │ ├── README.md │ │ ├── field_types.md │ │ └── images │ │ │ ├── cost_field.png │ │ │ ├── flow_field.png │ │ │ └── integration_field.png │ ├── pyinterface.md │ ├── renderer │ │ ├── README.md │ │ ├── demos.md │ │ ├── images │ │ │ ├── demo_0.png │ │ │ ├── demo_1.png │ │ │ ├── demo_2.png │ │ │ ├── demo_3.png │ │ │ ├── demo_4.png │ │ │ ├── demo_5.png │ │ │ ├── demo_6.png │ │ │ ├── demo_7.mp4 │ │ │ ├── renderer_hierarchy.svg │ │ │ ├── stresstest_0.png │ │ │ ├── stresstest_1.png │ │ │ ├── terrain_renderer.svg │ │ │ └── world_renderer.svg │ │ ├── level1.md │ │ └── level2.md │ ├── testing.md │ └── time.md ├── code_style │ ├── .gitignore │ ├── inttypes.md │ ├── mom.cpp │ ├── mom.h │ └── tabs_n_spaces.md ├── contributing.md ├── convert │ ├── README.md │ ├── convert_single_file.md │ ├── debugger.md │ ├── interactive.md │ └── nyan.md ├── debug.md ├── development.md ├── ide │ ├── README.md │ ├── configs │ │ └── vscode │ │ │ └── tasks.json │ ├── emacs.md │ ├── qt_creator.md │ └── vscode.md ├── ideas │ ├── ai.md │ ├── editor │ │ ├── README.md │ │ ├── campaigns.md │ │ ├── economy.md │ │ ├── multiplayer.md │ │ ├── scripting.md │ │ ├── tech.md │ │ ├── terrain-ui.txt │ │ ├── terrain.md │ │ └── units.md │ ├── fr_technical_overview.md │ ├── gameplay.md │ ├── interface.md │ └── technical.md ├── media │ ├── aoc-slp-list.md │ ├── blendomatic.md │ ├── drs-files.md │ ├── evolution-openage-gource.md │ ├── filtermaps-dat.md │ ├── images │ │ └── damage_window_visualization.svg │ ├── lzx_compression_info.md │ ├── openage │ │ ├── blendmask_format_spec.md │ │ ├── blendtable_format_spec.md │ │ ├── file_referencing.md │ │ ├── modpack_definition_file.md │ │ ├── modpacks.md │ │ ├── palette_format_spec.md │ │ ├── sprite_format_spec.md │ │ ├── terrain_format_spec.md │ │ └── texture_format_spec.md │ ├── original-metadata.md │ ├── patterns │ │ ├── sld.hexpat │ │ ├── slp.hexpat │ │ └── slp_v4.hexpat │ ├── sld-files.md │ ├── slp-files.md │ ├── smp-files.md │ ├── smx-files.md │ ├── sound.md │ ├── stemplet-dat.md │ └── terrain.md ├── media_convert.md ├── nyan │ ├── README.md │ ├── aoe2_nyan_tree.svg │ ├── aoe2_nyan_tree.uxf │ ├── api_reference │ │ ├── reference_ability.md │ │ ├── reference_effect.md │ │ ├── reference_modifier.md │ │ ├── reference_resistance.md │ │ ├── reference_root.md │ │ └── reference_util.md │ └── openage-lib.md ├── project_structure.md ├── releasing.md ├── reverse_engineering │ ├── aoc_structures_00_09_26_0809 │ ├── civilizations.md │ ├── game_mechanics │ │ ├── accuracy.md │ │ ├── attacking_alarm.md │ │ ├── build_speed.md │ │ ├── building_placement.md │ │ ├── damage.md │ │ ├── formations.md │ │ ├── garrison.md │ │ ├── market.md │ │ ├── monk_conversion.md │ │ ├── pathfinding.md │ │ ├── ram_speed.md │ │ ├── rates.md │ │ ├── repair.md │ │ ├── research.md │ │ ├── selection.md │ │ ├── swgb │ │ │ ├── power.md │ │ │ ├── shields.md │ │ │ ├── stealth.md │ │ │ ├── ui-empire-nopower-detection.png │ │ │ ├── ui-empire-shield-power.png │ │ │ ├── ui-gungan-all-off-lq.png │ │ │ ├── ui-gungan-all-off.png │ │ │ ├── ui-gungan-stealth-detection-lq.png │ │ │ └── user-interface.md │ │ ├── switching_villager_tasks.md │ │ ├── town_bell.md │ │ ├── waypoints.md │ │ └── wolves.md │ ├── networking │ │ ├── 01-general.md │ │ ├── 02-header.md │ │ ├── 03-sync.md │ │ ├── 04-lobby.md │ │ ├── 05-chat_protocol.md │ │ ├── 06-chat_message_spoofing.md │ │ ├── 07-primary_action.md │ │ ├── 08-movement.md │ │ ├── 09-formation.md │ │ ├── 10-unit_creation.md │ │ ├── 11-buildings.md │ │ ├── 12-market.md │ │ ├── 13-other.md │ │ ├── 14-ai.md │ │ ├── 15-c-structs.md │ │ ├── images │ │ │ ├── aoe2-message-spoofing1.png │ │ │ ├── aoe2-message-spoofing2.png │ │ │ └── aoe2-message-spoofing3.png │ │ └── technology_ids.md │ ├── scoring.md │ └── unit_stats │ │ ├── unit_stats.md │ │ ├── unit_stats_afr.csv │ │ ├── unit_stats_aoc.csv │ │ ├── unit_stats_aoe.csv │ │ ├── unit_stats_aoe.txt │ │ ├── unit_stats_aok.csv │ │ └── unit_stats_fe.csv ├── running.md └── troubleshooting.md ├── etc ├── gdb_pretty │ ├── __init__.py │ └── printers.py ├── lsan.supp ├── openage.gdbinit ├── pylintrc └── valgrind-python.supp ├── flake.lock ├── flake.nix ├── kevinfile ├── legal ├── BSD-3-clause ├── GPLv3 └── LGPLv2.0 ├── libopenage ├── .gitignore ├── CMakeLists.txt ├── assets │ ├── CMakeLists.txt │ ├── mod_manager.cpp │ ├── mod_manager.h │ ├── modpack.cpp │ └── modpack.h ├── audio │ ├── CMakeLists.txt │ ├── audio_manager.cpp │ ├── audio_manager.h │ ├── category.cpp │ ├── category.h │ ├── dynamic_loader.cpp │ ├── dynamic_loader.h │ ├── dynamic_resource.cpp │ ├── dynamic_resource.h │ ├── error.cpp │ ├── error.h │ ├── format.cpp │ ├── format.h │ ├── hash_functions.h │ ├── in_memory_loader.cpp │ ├── in_memory_loader.h │ ├── in_memory_resource.cpp │ ├── in_memory_resource.h │ ├── loader_policy.cpp │ ├── loader_policy.h │ ├── opus_dynamic_loader.cpp │ ├── opus_dynamic_loader.h │ ├── opus_in_memory_loader.cpp │ ├── opus_in_memory_loader.h │ ├── opus_loading.cpp │ ├── opus_loading.h │ ├── resource.cpp │ ├── resource.h │ ├── resource_def.cpp │ ├── resource_def.h │ ├── sound.cpp │ ├── sound.h │ └── types.h ├── config.cpp.in ├── config.h.in ├── console │ ├── CMakeLists.txt │ ├── buf.cpp │ ├── buf.h │ ├── console.cpp │ ├── console.h │ ├── draw.cpp │ ├── draw.h │ └── tests.cpp ├── coord │ ├── CMakeLists.txt │ ├── chunk.cpp │ ├── chunk.h │ ├── coord.cpp.template │ ├── coord.h.template │ ├── coord_test.cpp │ ├── declarations.cpp │ ├── declarations.h │ ├── phys.cpp │ ├── phys.h │ ├── pixel.cpp │ ├── pixel.h │ ├── scene.cpp │ ├── scene.h │ ├── term.cpp │ ├── term.h │ ├── tile.cpp │ └── tile.h ├── curve │ ├── CMakeLists.txt │ ├── base_curve.cpp │ ├── base_curve.h │ ├── container │ │ ├── CMakeLists.txt │ │ ├── array.cpp │ │ ├── array.h │ │ ├── element_wrapper.cpp │ │ ├── element_wrapper.h │ │ ├── iterator.cpp │ │ ├── iterator.h │ │ ├── map.cpp │ │ ├── map.h │ │ ├── map_filter_iterator.cpp │ │ ├── map_filter_iterator.h │ │ ├── queue.cpp │ │ ├── queue.h │ │ ├── queue_filter_iterator.cpp │ │ └── queue_filter_iterator.h │ ├── continuous.cpp │ ├── continuous.h │ ├── discrete.cpp │ ├── discrete.h │ ├── discrete_mod.cpp │ ├── discrete_mod.h │ ├── interpolated.cpp │ ├── interpolated.h │ ├── keyframe.cpp │ ├── keyframe.h │ ├── keyframe_container.cpp │ ├── keyframe_container.h │ ├── segmented.cpp │ ├── segmented.h │ └── tests │ │ ├── CMakeLists.txt │ │ ├── container.cpp │ │ └── curve_types.cpp ├── cvar │ ├── CMakeLists.txt │ ├── cvar.cpp │ └── cvar.h ├── datastructure │ ├── CMakeLists.txt │ ├── concurrent_queue.h │ ├── constexpr_map.h │ ├── pairing_heap.h │ ├── tests.cpp │ └── tests.h ├── engine │ ├── CMakeLists.txt │ ├── engine.cpp │ └── engine.h ├── error │ ├── CMakeLists.txt │ ├── backtrace.cpp │ ├── backtrace.h │ ├── demo.cpp │ ├── error.cpp │ ├── error.h │ ├── handlers.cpp │ ├── handlers.h │ ├── stackanalyzer.cpp │ └── stackanalyzer.h ├── event │ ├── CMakeLists.txt │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── aicontroller.cpp │ │ ├── aicontroller.h │ │ ├── gamestate.cpp │ │ ├── gamestate.h │ │ ├── gui.cpp │ │ ├── gui.h │ │ ├── main.cpp │ │ ├── main.h │ │ ├── physics.cpp │ │ └── physics.h │ ├── event.cpp │ ├── event.h │ ├── event_loop.cpp │ ├── event_loop.h │ ├── evententity.cpp │ ├── evententity.h │ ├── eventhandler.cpp │ ├── eventhandler.h │ ├── eventqueue.cpp │ ├── eventqueue.h │ ├── eventstore.cpp │ ├── eventstore.h │ ├── state.cpp │ ├── state.h │ └── tests.cpp ├── gamestate │ ├── CMakeLists.txt │ ├── activity │ │ ├── CMakeLists.txt │ │ ├── activity.cpp │ │ ├── activity.h │ │ ├── condition │ │ │ ├── CMakeLists.txt │ │ │ ├── command_in_queue.cpp │ │ │ ├── command_in_queue.h │ │ │ ├── next_command.cpp │ │ │ └── next_command.h │ │ ├── end_node.cpp │ │ ├── end_node.h │ │ ├── event │ │ │ ├── CMakeLists.txt │ │ │ ├── command_in_queue.cpp │ │ │ ├── command_in_queue.h │ │ │ ├── wait.cpp │ │ │ └── wait.h │ │ ├── node.cpp │ │ ├── node.h │ │ ├── start_node.cpp │ │ ├── start_node.h │ │ ├── task_node.cpp │ │ ├── task_node.h │ │ ├── task_system_node.cpp │ │ ├── task_system_node.h │ │ ├── tests.cpp │ │ ├── types.cpp │ │ ├── types.h │ │ ├── xor_event_gate.cpp │ │ ├── xor_event_gate.h │ │ ├── xor_gate.cpp │ │ └── xor_gate.h │ ├── api │ │ ├── CMakeLists.txt │ │ ├── ability.cpp │ │ ├── ability.h │ │ ├── activity.cpp │ │ ├── activity.h │ │ ├── animation.cpp │ │ ├── animation.h │ │ ├── definitions.cpp │ │ ├── definitions.h │ │ ├── patch.cpp │ │ ├── patch.h │ │ ├── player_setup.cpp │ │ ├── player_setup.h │ │ ├── property.cpp │ │ ├── property.h │ │ ├── sound.cpp │ │ ├── sound.h │ │ ├── terrain.cpp │ │ ├── terrain.h │ │ ├── types.cpp │ │ ├── types.h │ │ ├── util.cpp │ │ └── util.h │ ├── component │ │ ├── CMakeLists.txt │ │ ├── api │ │ │ ├── CMakeLists.txt │ │ │ ├── idle.cpp │ │ │ ├── idle.h │ │ │ ├── live.cpp │ │ │ ├── live.h │ │ │ ├── move.cpp │ │ │ ├── move.h │ │ │ ├── selectable.cpp │ │ │ ├── selectable.h │ │ │ ├── turn.cpp │ │ │ └── turn.h │ │ ├── api_component.cpp │ │ ├── api_component.h │ │ ├── base_component.cpp │ │ ├── base_component.h │ │ ├── internal │ │ │ ├── CMakeLists.txt │ │ │ ├── activity.cpp │ │ │ ├── activity.h │ │ │ ├── command_queue.cpp │ │ │ ├── command_queue.h │ │ │ ├── commands │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── base_command.cpp │ │ │ │ ├── base_command.h │ │ │ │ ├── custom.cpp │ │ │ │ ├── custom.h │ │ │ │ ├── idle.cpp │ │ │ │ ├── idle.h │ │ │ │ ├── move.cpp │ │ │ │ ├── move.h │ │ │ │ ├── types.cpp │ │ │ │ └── types.h │ │ │ ├── ownership.cpp │ │ │ ├── ownership.h │ │ │ ├── position.cpp │ │ │ └── position.h │ │ ├── internal_component.cpp │ │ ├── internal_component.h │ │ ├── types.cpp │ │ └── types.h │ ├── definitions.cpp │ ├── definitions.h │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── demo_0.cpp │ │ ├── demo_0.h │ │ ├── tests.cpp │ │ └── tests.h │ ├── entity_factory.cpp │ ├── entity_factory.h │ ├── event │ │ ├── CMakeLists.txt │ │ ├── drag_select.cpp │ │ ├── drag_select.h │ │ ├── process_command.cpp │ │ ├── process_command.h │ │ ├── send_command.cpp │ │ ├── send_command.h │ │ ├── spawn_entity.cpp │ │ ├── spawn_entity.h │ │ ├── wait.cpp │ │ └── wait.h │ ├── game.cpp │ ├── game.h │ ├── game_entity.cpp │ ├── game_entity.h │ ├── game_state.cpp │ ├── game_state.h │ ├── manager.cpp │ ├── manager.h │ ├── map.cpp │ ├── map.h │ ├── player.cpp │ ├── player.h │ ├── simulation.cpp │ ├── simulation.h │ ├── system │ │ ├── CMakeLists.txt │ │ ├── activity.cpp │ │ ├── activity.h │ │ ├── idle.cpp │ │ ├── idle.h │ │ ├── move.cpp │ │ ├── move.h │ │ ├── types.cpp │ │ └── types.h │ ├── terrain.cpp │ ├── terrain.h │ ├── terrain_chunk.cpp │ ├── terrain_chunk.h │ ├── terrain_factory.cpp │ ├── terrain_factory.h │ ├── terrain_tile.cpp │ ├── terrain_tile.h │ ├── types.cpp │ ├── types.h │ ├── universe.cpp │ ├── universe.h │ ├── world.cpp │ └── world.h ├── input │ ├── CMakeLists.txt │ ├── action.cpp │ ├── action.h │ ├── controller │ │ ├── CMakeLists.txt │ │ ├── camera │ │ │ ├── CMakeLists.txt │ │ │ ├── binding.cpp │ │ │ ├── binding.h │ │ │ ├── binding_context.cpp │ │ │ ├── binding_context.h │ │ │ ├── controller.cpp │ │ │ └── controller.h │ │ ├── game │ │ │ ├── CMakeLists.txt │ │ │ ├── binding.cpp │ │ │ ├── binding.h │ │ │ ├── binding_context.cpp │ │ │ ├── binding_context.h │ │ │ ├── controller.cpp │ │ │ └── controller.h │ │ └── hud │ │ │ ├── CMakeLists.txt │ │ │ ├── binding.cpp │ │ │ ├── binding.h │ │ │ ├── binding_context.cpp │ │ │ ├── binding_context.h │ │ │ ├── controller.cpp │ │ │ └── controller.h │ ├── event.cpp │ ├── event.h │ ├── input_context.cpp │ ├── input_context.h │ ├── input_manager.cpp │ ├── input_manager.h │ ├── tests.cpp │ ├── text_to_event.cpp │ └── text_to_event.h ├── job │ ├── CMakeLists.txt │ ├── abortable_job_state.h │ ├── job.h │ ├── job_aborted_exception.h │ ├── job_group.cpp │ ├── job_group.h │ ├── job_manager.cpp │ ├── job_manager.h │ ├── job_state.h │ ├── job_state_base.h │ ├── tests.cpp │ ├── typed_job_state_base.h │ ├── types.h │ ├── worker.cpp │ └── worker.h ├── log │ ├── CMakeLists.txt │ ├── file_logsink.cpp │ ├── file_logsink.h │ ├── level.cpp │ ├── level.h │ ├── log.cpp │ ├── log.h │ ├── logsink.cpp │ ├── logsink.h │ ├── logsource.cpp │ ├── logsource.h │ ├── message.cpp │ ├── message.h │ ├── named_logsource.cpp │ ├── named_logsource.h │ ├── stdout_logsink.cpp │ ├── stdout_logsink.h │ └── test.cpp ├── main.cpp ├── main.h ├── main │ ├── CMakeLists.txt │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── interactive │ │ │ ├── CMakeLists.txt │ │ │ ├── interactive.cpp │ │ │ └── interactive.h │ │ ├── pong │ │ │ ├── CMakeLists.txt │ │ │ ├── aicontroller.cpp │ │ │ ├── aicontroller.h │ │ │ ├── gamestate.cpp │ │ │ ├── gamestate.h │ │ │ ├── gui.cpp │ │ │ ├── gui.h │ │ │ ├── physics.cpp │ │ │ ├── physics.h │ │ │ ├── pong.cpp │ │ │ └── pong.h │ │ └── presenter │ │ │ ├── CMakeLists.txt │ │ │ ├── presenter.cpp │ │ │ └── presenter.h │ ├── tests.cpp │ └── tests.h ├── options.cpp ├── options.h ├── pathfinding │ ├── CMakeLists.txt │ ├── cost_field.cpp │ ├── cost_field.h │ ├── definitions.cpp │ ├── definitions.h │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── demo_0.cpp │ │ ├── demo_0.h │ │ ├── demo_1.cpp │ │ ├── demo_1.h │ │ ├── tests.cpp │ │ └── tests.h │ ├── field_cache.cpp │ ├── field_cache.h │ ├── flow_field.cpp │ ├── flow_field.h │ ├── grid.cpp │ ├── grid.h │ ├── integration_field.cpp │ ├── integration_field.h │ ├── integrator.cpp │ ├── integrator.h │ ├── legacy │ │ ├── CMakeLists.txt │ │ ├── a_star.cpp │ │ ├── a_star.h │ │ ├── heuristics.cpp │ │ ├── heuristics.h │ │ ├── path.cpp │ │ ├── path.h │ │ ├── path_utils.h │ │ └── tests.cpp │ ├── path.cpp │ ├── path.h │ ├── pathfinder.cpp │ ├── pathfinder.h │ ├── portal.cpp │ ├── portal.h │ ├── sector.cpp │ ├── sector.h │ ├── tests.cpp │ ├── types.cpp │ └── types.h ├── presenter │ ├── CMakeLists.txt │ ├── presenter.cpp │ └── presenter.h ├── pyinterface │ ├── CMakeLists.txt │ ├── defs.cpp │ ├── defs.h │ ├── exctranslate.cpp │ ├── exctranslate.h │ ├── exctranslate_tests.cpp │ ├── exctranslate_tests.h │ ├── functional.cpp │ ├── functional.h │ ├── hacks.cpp │ ├── hacks.h │ ├── pyexception.cpp │ ├── pyexception.h │ ├── pyobject.cpp │ ├── pyobject.h │ ├── pyobject_tests.cpp │ ├── pyobject_tests.h │ ├── setup.cpp │ └── setup.h ├── renderer │ ├── CMakeLists.txt │ ├── camera │ │ ├── CMakeLists.txt │ │ ├── boundaries.cpp │ │ ├── boundaries.h │ │ ├── camera.cpp │ │ ├── camera.h │ │ ├── definitions.cpp │ │ ├── definitions.h │ │ ├── frustum_2d.cpp │ │ ├── frustum_2d.h │ │ ├── frustum_3d.cpp │ │ └── frustum_3d.h │ ├── color.cpp │ ├── color.h │ ├── definitions.cpp │ ├── definitions.h │ ├── demo │ │ ├── CMakeLists.txt │ │ ├── demo_0.cpp │ │ ├── demo_0.h │ │ ├── demo_1.cpp │ │ ├── demo_1.h │ │ ├── demo_2.cpp │ │ ├── demo_2.h │ │ ├── demo_3.cpp │ │ ├── demo_3.h │ │ ├── demo_4.cpp │ │ ├── demo_4.h │ │ ├── demo_5.cpp │ │ ├── demo_5.h │ │ ├── demo_6.cpp │ │ ├── demo_6.h │ │ ├── demo_7.cpp │ │ ├── demo_7.h │ │ ├── stresstest_0.cpp │ │ ├── stresstest_0.h │ │ ├── stresstest_1.cpp │ │ ├── stresstest_1.h │ │ ├── tests.cpp │ │ ├── tests.h │ │ ├── util.cpp │ │ └── util.h │ ├── font │ │ ├── CMakeLists.txt │ │ ├── font.cpp │ │ ├── font.h │ │ ├── font_manager.cpp │ │ ├── font_manager.h │ │ ├── glyph_atlas.cpp │ │ ├── glyph_atlas.h │ │ └── tests.cpp │ ├── geometry.cpp │ ├── geometry.h │ ├── gui │ │ ├── CMakeLists.txt │ │ ├── gui.cpp │ │ ├── gui.h │ │ ├── guisys │ │ │ ├── CMakeLists.txt │ │ │ ├── link │ │ │ │ ├── gui_item.cpp │ │ │ │ ├── gui_item.h │ │ │ │ ├── gui_item_link.h │ │ │ │ ├── gui_item_list_model.h │ │ │ │ ├── gui_list_model.cpp │ │ │ │ ├── gui_list_model.h │ │ │ │ ├── gui_property_map_impl.cpp │ │ │ │ ├── gui_property_map_impl.h │ │ │ │ ├── gui_singleton_item.cpp │ │ │ │ ├── gui_singleton_item.h │ │ │ │ └── qtgui_checked_static_cast.h │ │ │ ├── private │ │ │ │ ├── gui_application_impl.cpp │ │ │ │ ├── gui_application_impl.h │ │ │ │ ├── gui_ctx_setup.cpp │ │ │ │ ├── gui_ctx_setup.h │ │ │ │ ├── gui_engine_impl.cpp │ │ │ │ ├── gui_engine_impl.h │ │ │ │ ├── gui_input_impl.cpp │ │ │ │ ├── gui_input_impl.h │ │ │ │ ├── gui_renderer_impl.cpp │ │ │ │ ├── gui_renderer_impl.h │ │ │ │ ├── gui_rendering_setup_routines.cpp │ │ │ │ ├── gui_rendering_setup_routines.h │ │ │ │ ├── gui_subtree_impl.cpp │ │ │ │ ├── gui_subtree_impl.h │ │ │ │ ├── livereload │ │ │ │ │ ├── deferred_initial_constant_property_values.cpp │ │ │ │ │ ├── deferred_initial_constant_property_values.h │ │ │ │ │ ├── gui_live_reloader.cpp │ │ │ │ │ ├── gui_live_reloader.h │ │ │ │ │ ├── recursive_directory_watcher.cpp │ │ │ │ │ ├── recursive_directory_watcher.h │ │ │ │ │ ├── recursive_directory_watcher_worker.cpp │ │ │ │ │ └── recursive_directory_watcher_worker.h │ │ │ │ ├── opengl_debug_logger.cpp │ │ │ │ └── opengl_debug_logger.h │ │ │ └── public │ │ │ │ ├── gui_application.cpp │ │ │ │ ├── gui_application.h │ │ │ │ ├── gui_engine.cpp │ │ │ │ ├── gui_engine.h │ │ │ │ ├── gui_input.cpp │ │ │ │ ├── gui_input.h │ │ │ │ ├── gui_renderer.cpp │ │ │ │ ├── gui_renderer.h │ │ │ │ ├── gui_subtree.cpp │ │ │ │ └── gui_subtree.h │ │ └── integration │ │ │ ├── CMakeLists.txt │ │ │ ├── private │ │ │ ├── CMakeLists.txt │ │ │ ├── gui_filled_texture_handles.cpp │ │ │ ├── gui_filled_texture_handles.h │ │ │ ├── gui_log.cpp │ │ │ ├── gui_log.h │ │ │ ├── gui_make_standalone_subtexture.cpp │ │ │ ├── gui_make_standalone_subtexture.h │ │ │ ├── gui_standalone_subtexture.cpp │ │ │ ├── gui_standalone_subtexture.h │ │ │ ├── gui_texture.cpp │ │ │ ├── gui_texture.h │ │ │ ├── gui_texture_handle.cpp │ │ │ └── gui_texture_handle.h │ │ │ └── public │ │ │ ├── CMakeLists.txt │ │ │ ├── gui_application_with_logger.cpp │ │ │ └── gui_application_with_logger.h │ ├── opengl │ │ ├── CMakeLists.txt │ │ ├── buffer.cpp │ │ ├── buffer.h │ │ ├── context.cpp │ │ ├── context.h │ │ ├── debug.cpp │ │ ├── debug.h │ │ ├── error.cpp │ │ ├── error.h │ │ ├── framebuffer.cpp │ │ ├── framebuffer.h │ │ ├── geometry.cpp │ │ ├── geometry.h │ │ ├── lookup.h │ │ ├── render_pass.cpp │ │ ├── render_pass.h │ │ ├── render_target.cpp │ │ ├── render_target.h │ │ ├── renderer.cpp │ │ ├── renderer.h │ │ ├── shader.cpp │ │ ├── shader.h │ │ ├── shader_data.cpp │ │ ├── shader_data.h │ │ ├── shader_program.cpp │ │ ├── shader_program.h │ │ ├── simple_object.cpp │ │ ├── simple_object.h │ │ ├── texture.cpp │ │ ├── texture.h │ │ ├── texture_array.cpp │ │ ├── texture_array.h │ │ ├── uniform_buffer.cpp │ │ ├── uniform_buffer.h │ │ ├── uniform_input.cpp │ │ ├── uniform_input.h │ │ ├── util.cpp │ │ ├── util.h │ │ ├── vertex_array.cpp │ │ ├── vertex_array.h │ │ ├── window.cpp │ │ └── window.h │ ├── render_factory.cpp │ ├── render_factory.h │ ├── render_pass.cpp │ ├── render_pass.h │ ├── render_target.cpp │ ├── render_target.h │ ├── renderable.cpp │ ├── renderable.h │ ├── renderer.cpp │ ├── renderer.h │ ├── resources │ │ ├── CMakeLists.txt │ │ ├── animation │ │ │ ├── CMakeLists.txt │ │ │ ├── angle_info.cpp │ │ │ ├── angle_info.h │ │ │ ├── animation_info.cpp │ │ │ ├── animation_info.h │ │ │ ├── frame_info.cpp │ │ │ ├── frame_info.h │ │ │ ├── layer_info.cpp │ │ │ └── layer_info.h │ │ ├── assets │ │ │ ├── CMakeLists.txt │ │ │ ├── asset_manager.cpp │ │ │ ├── asset_manager.h │ │ │ ├── cache.cpp │ │ │ ├── cache.h │ │ │ ├── texture_manager.cpp │ │ │ └── texture_manager.h │ │ ├── buffer_info.cpp │ │ ├── buffer_info.h │ │ ├── frame_timing.cpp │ │ ├── frame_timing.h │ │ ├── mesh_data.cpp │ │ ├── mesh_data.h │ │ ├── palette_info.cpp │ │ ├── palette_info.h │ │ ├── parser │ │ │ ├── CMakeLists.txt │ │ │ ├── common.cpp │ │ │ ├── common.h │ │ │ ├── parse_blendmask.cpp │ │ │ ├── parse_blendmask.h │ │ │ ├── parse_blendtable.cpp │ │ │ ├── parse_blendtable.h │ │ │ ├── parse_palette.cpp │ │ │ ├── parse_palette.h │ │ │ ├── parse_sprite.cpp │ │ │ ├── parse_sprite.h │ │ │ ├── parse_terrain.cpp │ │ │ ├── parse_terrain.h │ │ │ ├── parse_texture.cpp │ │ │ └── parse_texture.h │ │ ├── shader_source.cpp │ │ ├── shader_source.h │ │ ├── shader_template.cpp │ │ ├── shader_template.h │ │ ├── terrain │ │ │ ├── CMakeLists.txt │ │ │ ├── blendpattern_info.cpp │ │ │ ├── blendpattern_info.h │ │ │ ├── blendtable_info.cpp │ │ │ ├── blendtable_info.h │ │ │ ├── frame_info.cpp │ │ │ ├── frame_info.h │ │ │ ├── layer_info.cpp │ │ │ ├── layer_info.h │ │ │ ├── terrain_info.cpp │ │ │ └── terrain_info.h │ │ ├── texture_data.cpp │ │ ├── texture_data.h │ │ ├── texture_info.cpp │ │ ├── texture_info.h │ │ ├── texture_subinfo.cpp │ │ └── texture_subinfo.h │ ├── shader_program.cpp │ ├── shader_program.h │ ├── stages │ │ ├── CMakeLists.txt │ │ ├── camera │ │ │ ├── CMakeLists.txt │ │ │ ├── manager.cpp │ │ │ └── manager.h │ │ ├── hud │ │ │ ├── CMakeLists.txt │ │ │ ├── object.cpp │ │ │ ├── object.h │ │ │ ├── render_entity.cpp │ │ │ ├── render_entity.h │ │ │ ├── render_stage.cpp │ │ │ └── render_stage.h │ │ ├── render_entity.cpp │ │ ├── render_entity.h │ │ ├── screen │ │ │ ├── CMakeLists.txt │ │ │ ├── render_stage.cpp │ │ │ ├── render_stage.h │ │ │ ├── screenshot.cpp │ │ │ └── screenshot.h │ │ ├── skybox │ │ │ ├── CMakeLists.txt │ │ │ ├── render_stage.cpp │ │ │ └── render_stage.h │ │ ├── terrain │ │ │ ├── CMakeLists.txt │ │ │ ├── chunk.cpp │ │ │ ├── chunk.h │ │ │ ├── mesh.cpp │ │ │ ├── mesh.h │ │ │ ├── model.cpp │ │ │ ├── model.h │ │ │ ├── render_entity.cpp │ │ │ ├── render_entity.h │ │ │ ├── render_stage.cpp │ │ │ └── render_stage.h │ │ └── world │ │ │ ├── CMakeLists.txt │ │ │ ├── object.cpp │ │ │ ├── object.h │ │ │ ├── render_entity.cpp │ │ │ ├── render_entity.h │ │ │ ├── render_stage.cpp │ │ │ └── render_stage.h │ ├── texture.cpp │ ├── texture.h │ ├── texture_array.cpp │ ├── texture_array.h │ ├── types.cpp │ ├── types.h │ ├── uniform_buffer.cpp │ ├── uniform_buffer.h │ ├── uniform_input.cpp │ ├── uniform_input.h │ ├── util.cpp │ ├── util.h │ ├── vulkan │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── graphics_device.cpp │ │ ├── graphics_device.h │ │ ├── loader.cpp │ │ ├── loader.h │ │ ├── render_target.h │ │ ├── renderer.cpp │ │ ├── renderer.h │ │ ├── shader_program.h │ │ ├── util.h │ │ ├── windowvk.cpp │ │ └── windowvk.h │ ├── window.cpp │ ├── window.h │ ├── window_event_handler.cpp │ └── window_event_handler.h ├── rng │ ├── CMakeLists.txt │ ├── global_rng.cpp │ ├── global_rng.h │ ├── rng.cpp │ ├── rng.h │ └── rng_tests.cpp ├── testing │ ├── CMakeLists.txt │ ├── benchmark_test.cpp │ ├── testing.cpp │ ├── testing.h │ ├── testlist.cpp.template │ └── testlist.h ├── time │ ├── CMakeLists.txt │ ├── clock.cpp │ ├── clock.h │ ├── time.cpp │ ├── time.h │ ├── time_loop.cpp │ └── time_loop.h ├── util │ ├── CMakeLists.txt │ ├── algorithm.h │ ├── color.cpp │ ├── color.h │ ├── compiler.cpp │ ├── compiler.h │ ├── compress │ │ ├── CMakeLists.txt │ │ ├── bitstream.h │ │ ├── lzxd.cpp │ │ └── lzxd.h │ ├── consteval.h │ ├── constinit_vector.cpp │ ├── constinit_vector.h │ ├── enum.cpp │ ├── enum.h │ ├── enum_test.cpp │ ├── enum_test.h │ ├── externalprofiler.cpp │ ├── externalprofiler.h │ ├── externalsstream.cpp │ ├── externalsstream.h │ ├── fds.cpp │ ├── fds.h │ ├── file.cpp │ ├── file.h │ ├── filelike │ │ ├── CMakeLists.txt │ │ ├── filelike.cpp │ │ ├── filelike.h │ │ ├── native.cpp │ │ ├── native.h │ │ ├── python.cpp │ │ └── python.h │ ├── fixed_point.cpp │ ├── fixed_point.h │ ├── fixed_point_test.cpp │ ├── fps.cpp │ ├── fps.h │ ├── fslike │ │ ├── CMakeLists.txt │ │ ├── directory.cpp │ │ ├── directory.h │ │ ├── fslike.cpp │ │ ├── fslike.h │ │ ├── native.cpp │ │ ├── native.h │ │ ├── python.cpp │ │ └── python.h │ ├── hash.cpp │ ├── hash.h │ ├── hash_test.cpp │ ├── init.cpp │ ├── init.h │ ├── language.cpp │ ├── language.h │ ├── macro │ │ ├── concat.h │ │ └── loop.h │ ├── math.h │ ├── math_constants.h │ ├── matrix.cpp │ ├── matrix.h │ ├── matrix_test.cpp │ ├── misc.cpp │ ├── misc.h │ ├── misc_test.cpp │ ├── os.cpp │ ├── os.h │ ├── path.cpp │ ├── path.h │ ├── pty.h │ ├── quaternion.cpp │ ├── quaternion.h │ ├── quaternion_test.cpp │ ├── repr.cpp │ ├── repr.h │ ├── signal.h │ ├── stringformatter.cpp │ ├── stringformatter.h │ ├── strings.cpp │ ├── strings.h │ ├── subprocess.cpp │ ├── subprocess.h │ ├── thread_id.cpp │ ├── thread_id.h │ ├── timer.cpp │ ├── timer.h │ ├── timing.cpp │ ├── timing.h │ ├── unicode.cpp │ ├── unicode.h │ ├── variable.h │ ├── vector.cpp │ ├── vector.h │ └── vector_test.cpp ├── version.cpp.in ├── version.h.in └── versions │ ├── CMakeLists.txt │ ├── compiletime.cpp.in │ ├── compiletime.h.in │ ├── versions.cpp │ └── versions.h ├── nix ├── nyan.nix └── openage.nix ├── openage ├── .gitignore ├── CMakeLists.txt ├── __init__.py ├── __main__.py ├── assets.py ├── cabextract │ ├── CMakeLists.txt │ ├── __init__.py │ ├── cab.py │ ├── cabchecksum.pyx │ ├── gen_test_arc.sh │ ├── lzxd.pyx │ ├── lzxdstream.py │ └── test.py ├── codegen │ ├── CMakeLists.txt │ ├── __init__.py │ ├── codegen.py │ ├── coord.py │ ├── cpp_testlist.py │ ├── listing.py │ └── main.py ├── config.py.in ├── convert │ ├── CMakeLists.txt │ ├── __init__.py │ ├── entity_object │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── conversion │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── aoc │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── genie_civ.py │ │ │ │ ├── genie_connection.py │ │ │ │ ├── genie_effect.py │ │ │ │ ├── genie_graphic.py │ │ │ │ ├── genie_object_container.py │ │ │ │ ├── genie_sound.py │ │ │ │ ├── genie_tech.py │ │ │ │ ├── genie_terrain.py │ │ │ │ └── genie_unit.py │ │ │ ├── combined_sound.py │ │ │ ├── combined_sprite.py │ │ │ ├── combined_terrain.py │ │ │ ├── converter_object.py │ │ │ ├── modpack.py │ │ │ ├── ror │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── genie_sound.py │ │ │ │ ├── genie_tech.py │ │ │ │ └── genie_unit.py │ │ │ ├── stringresource.py │ │ │ └── swgbcc │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── genie_tech.py │ │ │ │ └── genie_unit.py │ │ └── export │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── data_definition.py │ │ │ ├── formats │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── blmask_metadata.py │ │ │ ├── bltable_metadata.py │ │ │ ├── media_cache.py │ │ │ ├── modpack_info.py │ │ │ ├── modpack_manifest.py │ │ │ ├── nyan_file.py │ │ │ ├── palette_metadata.py │ │ │ ├── sprite_metadata.py │ │ │ ├── terrain_metadata.py │ │ │ └── texture_metadata.py │ │ │ ├── media_export_request.py │ │ │ ├── metadata_export.py │ │ │ └── texture.py │ ├── main.py │ ├── processor │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── conversion │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── aoc │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── ability_subprocessor.py │ │ │ │ ├── auxiliary_subprocessor.py │ │ │ │ ├── civ_subprocessor.py │ │ │ │ ├── effect_subprocessor.py │ │ │ │ ├── media_subprocessor.py │ │ │ │ ├── modifier_subprocessor.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ ├── nyan_subprocessor.py │ │ │ │ ├── pregen_processor.py │ │ │ │ ├── processor.py │ │ │ │ ├── tech_subprocessor.py │ │ │ │ ├── upgrade_ability_subprocessor.py │ │ │ │ ├── upgrade_attribute_subprocessor.py │ │ │ │ ├── upgrade_effect_subprocessor.py │ │ │ │ └── upgrade_resource_subprocessor.py │ │ │ ├── aoc_demo │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ └── processor.py │ │ │ ├── de1 │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── media_subprocessor.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ └── processor.py │ │ │ ├── de2 │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── ability_subprocessor.py │ │ │ │ ├── civ_subprocessor.py │ │ │ │ ├── media_subprocessor.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ ├── nyan_subprocessor.py │ │ │ │ ├── processor.py │ │ │ │ ├── tech_subprocessor.py │ │ │ │ ├── upgrade_attribute_subprocessor.py │ │ │ │ └── upgrade_resource_subprocessor.py │ │ │ ├── hd │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── media_subprocessor.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ └── processor.py │ │ │ ├── ror │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── ability_subprocessor.py │ │ │ │ ├── auxiliary_subprocessor.py │ │ │ │ ├── civ_subprocessor.py │ │ │ │ ├── media_subprocessor.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ ├── nyan_subprocessor.py │ │ │ │ ├── pregen_subprocessor.py │ │ │ │ ├── processor.py │ │ │ │ ├── tech_subprocessor.py │ │ │ │ ├── upgrade_ability_subprocessor.py │ │ │ │ ├── upgrade_attribute_subprocessor.py │ │ │ │ └── upgrade_resource_subprocessor.py │ │ │ └── swgbcc │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── ability_subprocessor.py │ │ │ │ ├── auxiliary_subprocessor.py │ │ │ │ ├── civ_subprocessor.py │ │ │ │ ├── modpack_subprocessor.py │ │ │ │ ├── nyan_subprocessor.py │ │ │ │ ├── pregen_subprocessor.py │ │ │ │ ├── processor.py │ │ │ │ ├── tech_subprocessor.py │ │ │ │ ├── upgrade_attribute_subprocessor.py │ │ │ │ └── upgrade_resource_subprocessor.py │ │ └── export │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.pxd │ │ │ ├── __init__.py │ │ │ ├── data_exporter.py │ │ │ ├── generate_manifest_hashes.py │ │ │ ├── media_exporter.py │ │ │ ├── modpack_exporter.py │ │ │ ├── terrain_merge.pyx │ │ │ └── texture_merge.pyx │ ├── service │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── conversion │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ └── internal_name_lookups.py │ │ ├── debug_info.py │ │ ├── export │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── interface │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ ├── cutter.py │ │ │ │ ├── rename.py │ │ │ │ └── visgrep.pyx │ │ │ ├── load_media_cache.py │ │ │ ├── opus │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.pxd │ │ │ │ ├── __init__.py │ │ │ │ ├── bytearray.pxd │ │ │ │ ├── demo.py │ │ │ │ ├── ogg.pxd │ │ │ │ ├── opus.pxd │ │ │ │ └── opusenc.pyx │ │ │ └── png │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.pxd │ │ │ │ ├── __init__.py │ │ │ │ ├── binpack.pxd │ │ │ │ ├── binpack.pyx │ │ │ │ ├── libpng.pxd │ │ │ │ ├── png_create.pyx │ │ │ │ └── png_tmp_file.pxd │ │ ├── init │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── api_export_required.py │ │ │ ├── changelog.py │ │ │ ├── modpack_search.py │ │ │ ├── mount_asset_dirs.py │ │ │ └── version_detect.py │ │ └── read │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── gamedata.py │ │ │ ├── nyan_api_loader.py │ │ │ ├── palette.py │ │ │ ├── register_media.py │ │ │ └── string_resource.py │ ├── tool │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── api_export.py │ │ ├── driver.py │ │ ├── interactive.py │ │ ├── singlefile.py │ │ └── subtool │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── acquire_sourcedir.py │ │ │ └── version_select.py │ └── value_object │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── conversion │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── aoc │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ └── internal_nyan_names.py │ │ ├── de1 │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ └── internal_nyan_names.py │ │ ├── de2 │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ └── internal_nyan_names.py │ │ ├── forward_ref.py │ │ ├── hd │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── ak │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ └── internal_nyan_names.py │ │ │ ├── fgt │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ └── internal_nyan_names.py │ │ │ └── raj │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── __init__.py │ │ │ │ └── internal_nyan_names.py │ │ ├── ror │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ └── internal_nyan_names.py │ │ └── swgb │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ └── internal_nyan_names.py │ │ ├── init │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── game_file_version.py │ │ └── game_version.py │ │ └── read │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── dynamic_loader.py │ │ ├── genie_structure.py │ │ ├── media │ │ ├── CMakeLists.txt │ │ ├── __init__.pxd │ │ ├── __init__.py │ │ ├── blendomatic.py │ │ ├── colortable.py │ │ ├── datfile │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── civ.py │ │ │ ├── empiresdat.py │ │ │ ├── graphic.py │ │ │ ├── lookup_dicts.py │ │ │ ├── maps.py │ │ │ ├── playercolor.py │ │ │ ├── research.py │ │ │ ├── sound.py │ │ │ ├── tech.py │ │ │ ├── terrain.py │ │ │ └── unit.py │ │ ├── drs.py │ │ ├── hardcoded │ │ │ ├── CMakeLists.txt │ │ │ ├── __init__.py │ │ │ ├── interface.py │ │ │ ├── termcolors.py │ │ │ ├── terrain_tile_size.py │ │ │ └── texture.py │ │ ├── langcodes.py │ │ ├── pefile.py │ │ ├── peresource.py │ │ ├── sld.pyx │ │ ├── slp.pyx │ │ ├── smp.pyx │ │ └── smx.pyx │ │ ├── media_types.py │ │ ├── member_access.py │ │ ├── read_members.py │ │ └── value_members.py ├── cppinterface │ ├── CMakeLists.txt │ ├── __init__.py │ ├── exctranslate.pyx │ ├── exctranslate_tests.pyx │ ├── pyobject.pyx │ ├── setup.py │ ├── setup_checker.pyx │ └── typedefs.pxd ├── cvar │ ├── CMakeLists.txt │ ├── __init__.py │ ├── config_file.py │ ├── cvar.pyx │ └── location.py ├── cython_check.pyx ├── default_dirs.py ├── devmode.py ├── event │ ├── CMakeLists.txt │ ├── __init__.py │ └── demo.pyx ├── game │ ├── CMakeLists.txt │ ├── __init__.py │ ├── main.py │ └── main_cpp.pyx ├── gamestate │ ├── CMakeLists.txt │ ├── __init__.py │ └── tests.pyx ├── log │ ├── CMakeLists.txt │ ├── __init__.py │ ├── log_cpp.pyx │ └── tests.py ├── main │ ├── CMakeLists.txt │ ├── __init__.py │ ├── main.py │ ├── main_cpp.pyx │ └── tests.pyx ├── nyan │ ├── CMakeLists.txt │ ├── __init__.py │ ├── import_tree.py │ └── nyan_structs.py ├── pathfinding │ ├── CMakeLists.txt │ ├── __init__.py │ └── tests.pyx ├── renderer │ ├── CMakeLists.txt │ ├── __init__.py │ ├── renderer_cpp.pyx │ └── tests.pyx ├── testing │ ├── CMakeLists.txt │ ├── __init__.py │ ├── benchmark.py │ ├── cpp_testing.pyx │ ├── doctest.py │ ├── list_processor.py │ ├── main.py │ ├── misc_cpp.pyx │ ├── testing.py │ └── testlist.py ├── util │ ├── CMakeLists.txt │ ├── __init__.py │ ├── bytequeue.py │ ├── context.py │ ├── decorators.py │ ├── dll.py │ ├── filelike │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── abstract.py │ │ ├── cpp.pyx │ │ ├── fifo.py │ │ ├── readonly.py │ │ └── stream.py │ ├── files.py │ ├── fslike │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── abstract.py │ │ ├── cpp.pxd │ │ ├── cpp.pyx │ │ ├── directory.py │ │ ├── filecollection.py │ │ ├── path.py │ │ ├── test.py │ │ ├── union.py │ │ └── wrapper.py │ ├── fsprinting.py │ ├── hash.py │ ├── iterators.py │ ├── math.py │ ├── observer.py │ ├── ordered_set.py │ ├── profiler.py │ ├── strings.py │ ├── struct.py │ ├── system.py │ ├── threading.py │ └── version.py └── versions │ ├── CMakeLists.txt │ ├── __init__.py │ └── versions.pyx ├── openage_version ├── packaging ├── CMakeLists.txt ├── CPackOptions.cmake └── docker │ └── devenv │ └── Dockerfile.ubuntu.2404 ├── run.py.in └── shell.nix /.github/PULL_REQUEST_TEMPLATES/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Merge Checklist 2 | 3 | 4 | 5 | 6 | - [ ] I have read the [contribution guide](doc/contributing.md) 7 | - [ ] I have added my info to [copying.md](copying.md) (only first time contributors) 8 | - [ ] I have run `make checkmerge` and fixed all mentioned problems 9 | 10 | 11 | ### Description 12 | 13 | 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATES/release_template.md: -------------------------------------------------------------------------------- 1 | ### Checklist 2 | 3 | - [ ] Changelog 4 | - [ ] Release date 5 | - [ ] Version number in title 6 | - [ ] Full commit log 7 | - [ ] Bump version in `openage_version` 8 | -------------------------------------------------------------------------------- /assets/.gitignore: -------------------------------------------------------------------------------- 1 | # converted game assets 2 | /converted/ 3 | -------------------------------------------------------------------------------- /assets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2017 the openage authors. See copying.md for legal info. 2 | 3 | add_subdirectory(logo/) 4 | add_subdirectory(shaders/) 5 | add_subdirectory(test/) 6 | add_subdirectory(textures/) 7 | 8 | install(DIRECTORY "qml" 9 | DESTINATION "${ASSET_DIR}" 10 | ) 11 | 12 | # To show QML files in the QtCreator. 13 | file(GLOB QML_SRC "qml/*.qml") 14 | add_custom_target(qtcreator-show-qml SOURCES ${QML_SRC}) 15 | -------------------------------------------------------------------------------- /assets/logo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install( 2 | FILES "crown.svg" 3 | RENAME "openage.svg" 4 | DESTINATION "share/pixmaps/" 5 | ) 6 | 7 | install( 8 | FILES "banner.svg" 9 | DESTINATION "${ASSET_DIR}" 10 | ) 11 | -------------------------------------------------------------------------------- /assets/logo/banner-xlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | openage 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/logo/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/logo/banner.png -------------------------------------------------------------------------------- /assets/logo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/logo/favicon.ico -------------------------------------------------------------------------------- /assets/qml/.gitignore: -------------------------------------------------------------------------------- 1 | *.qmlc 2 | -------------------------------------------------------------------------------- /assets/qml/ButtonExtruded.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | import QtQuick 2.4 4 | import QtQuick.Controls 1.1 5 | import QtQuick.Controls.Styles 1.3 6 | 7 | Button { 8 | style: ButtonExtrudedStyle {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/qml/ButtonFlat.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | import QtQuick 2.4 4 | import QtQuick.Controls 1.1 5 | import QtQuick.Controls.Styles 1.3 6 | 7 | Button { 8 | style: ButtonFlatStyle {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/qml/CheckBoxFlat.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | import QtQuick 2.4 4 | import QtQuick.Controls 1.1 5 | import QtQuick.Controls.Styles 1.3 6 | 7 | CheckBox { 8 | style: CheckBoxFlatStyle {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/qml/TextFieldFlat.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | import QtQuick 2.4 4 | import QtQuick.Controls 1.1 5 | import QtQuick.Controls.Styles 1.3 6 | 7 | TextField { 8 | style: TextFieldFlatStyle {} 9 | } 10 | -------------------------------------------------------------------------------- /assets/qml/TextFieldFlatStyle.qml: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | import QtQuick 2.4 4 | import QtQuick.Controls 1.1 5 | import QtQuick.Controls.Styles 1.3 6 | 7 | TextFieldStyle { 8 | textColor: "white" 9 | 10 | background: Rectangle { 11 | color: "transparent" 12 | 13 | border.width: 1 14 | border.color: "white" 15 | radius: 4 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /assets/shaders/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/shaders" 3 | FILES_MATCHING PATTERN "*.glsl" 4 | ) 5 | -------------------------------------------------------------------------------- /assets/shaders/equalsEpsilon.glsl: -------------------------------------------------------------------------------- 1 | bool equalsEpsilon(vec4 left, vec4 right, float epsilon) { 2 | return all(lessThanEqual(abs(left - right), vec4(epsilon))); 3 | } 4 | 5 | bool equalsEpsilon(vec3 left, vec3 right, float epsilon) { 6 | return all(lessThanEqual(abs(left - right), vec3(epsilon))); 7 | } 8 | 9 | bool equalsEpsilon(vec2 left, vec2 right, float epsilon) { 10 | return all(lessThanEqual(abs(left - right), vec2(epsilon))); 11 | } 12 | 13 | bool equalsEpsilon(float left, float right, float epsilon) { 14 | return (abs(left - right) <= epsilon); 15 | } 16 | -------------------------------------------------------------------------------- /assets/shaders/final.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 tex_pos; 4 | 5 | out vec4 out_col; 6 | 7 | uniform sampler2D tex; 8 | 9 | void main() { 10 | out_col = texture(tex, tex_pos); 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/final.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | 6 | out vec2 tex_pos; 7 | 8 | void main() { 9 | gl_Position = vec4(position, 0.0, 1.0); 10 | tex_pos = uv; 11 | } 12 | -------------------------------------------------------------------------------- /assets/shaders/hud_drag_select.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | // Color of the drag rectangle 4 | uniform vec4 in_col; 5 | 6 | layout(location=0) out vec4 out_col; 7 | 8 | void main() { 9 | out_col = in_col; 10 | } 11 | -------------------------------------------------------------------------------- /assets/shaders/hud_drag_select.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | 5 | void main() { 6 | gl_Position = vec4(position, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /assets/shaders/identity.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // no-transformation texture mapping vertex shader 4 | 5 | // the position of this vertex 6 | attribute vec4 vertex_position; 7 | 8 | // interpolated texture coordinates sent to fragment shader 9 | varying vec2 tex_position; 10 | 11 | void main(void) { 12 | gl_Position = vertex_position; 13 | 14 | // convert from screen coordinates (-1, 1) to texture coordinates (0, 1) 15 | tex_position = (vertex_position.xy + vec2(1.f)) / 2.f; 16 | } 17 | -------------------------------------------------------------------------------- /assets/shaders/maptexture.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 120 2 | // total basic standard texture drawing fragment shader 3 | 4 | // the texture data 5 | uniform sampler2D texture; 6 | 7 | // interpolated texture coordinates received from vertex shader 8 | varying vec2 tex_position; 9 | 10 | void main (void) { 11 | // this sets the fragment color to the corresponding texel. 12 | gl_FragColor = texture2D(texture, tex_position); 13 | } 14 | -------------------------------------------------------------------------------- /assets/shaders/skybox.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform vec4 in_col; 4 | 5 | layout(location=0) out vec4 out_col; 6 | 7 | void main() { 8 | out_col = in_col; 9 | } 10 | -------------------------------------------------------------------------------- /assets/shaders/skybox.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | 5 | void main() { 6 | gl_Position = vec4(position, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /assets/shaders/terrain.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 tex_pos; 4 | 5 | layout(location=0) out vec4 out_col; 6 | 7 | uniform sampler2D tex; 8 | 9 | void main() 10 | { 11 | vec4 tex_val = texture(tex, tex_pos); 12 | out_col = tex_val; 13 | } 14 | -------------------------------------------------------------------------------- /assets/shaders/texturefont.frag.glsl: -------------------------------------------------------------------------------- 1 | varying vec2 tex_position; 2 | uniform sampler2D texture; 3 | uniform vec4 color; 4 | 5 | void main() { 6 | // Glyph's image data is stored in the RED channel of the texture 7 | float red = texture2D(texture, tex_position).r; 8 | if (red < 0.01) { 9 | discard; 10 | } 11 | 12 | gl_FragColor = color * vec4(1.0f, 1.0f, 1.0f, red); 13 | } 14 | -------------------------------------------------------------------------------- /assets/shaders/texturefont.vert.glsl: -------------------------------------------------------------------------------- 1 | attribute vec4 vertex_position; 2 | attribute vec2 tex_coordinates; 3 | varying vec2 tex_position; 4 | 5 | void main() { 6 | gl_Position = gl_ModelViewProjectionMatrix * vertex_position; 7 | tex_position = tex_coordinates; 8 | } 9 | -------------------------------------------------------------------------------- /assets/shaders/world3d.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | 6 | out vec2 vert_uv; 7 | 8 | uniform mat4 model; 9 | uniform mat4 view; 10 | uniform mat4 proj; 11 | 12 | void main() { 13 | gl_Position = proj * view * model * vec4(position, 0.0, 1.0); 14 | vert_uv = vec2(uv.x, 1.0 - uv.y); 15 | } 16 | -------------------------------------------------------------------------------- /assets/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | add_subdirectory(nyan/) 4 | add_subdirectory(qml/) 5 | add_subdirectory(shaders/) 6 | add_subdirectory(textures/) 7 | -------------------------------------------------------------------------------- /assets/test/nyan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/test/nyan" 3 | FILES_MATCHING PATTERN "*.nyan" 4 | ) 5 | -------------------------------------------------------------------------------- /assets/test/nyan/pong.nyan: -------------------------------------------------------------------------------- 1 | !version 1 2 | 3 | PongGame(): 4 | ball : Ball 5 | player1 : Player 6 | player2 : Player 7 | 8 | Ball(): 9 | Color(): 10 | r : int = 0 11 | g : int = 200 12 | b : int = 0 13 | color : Color = Color 14 | 15 | Player(): 16 | lives : int = 3 17 | size : int = 200 18 | 19 | GameTest(PongGame): 20 | ball = Ball 21 | player1 = Player 22 | player2 = Player 23 | 24 | LeftColor(): 25 | r = 0 26 | g = 20 27 | b = 230 28 | 29 | RightColor(): 30 | r = 180 31 | g = 40 32 | b = 0 33 | -------------------------------------------------------------------------------- /assets/test/qml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/test/qml" 3 | FILES_MATCHING PATTERN "*.qml" 4 | ) 5 | -------------------------------------------------------------------------------- /assets/test/shaders/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/test/shaders" 3 | FILES_MATCHING PATTERN "*.glsl" 4 | ) 5 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_0_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | out vec4 col; 4 | 5 | void main() { 6 | col = vec4(1.0, 0.4, 0.0, 0.8); 7 | } 8 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_0_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | 5 | void main() { 6 | gl_Position = vec4(position, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_1_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform sampler2D color_texture; 4 | 5 | in vec2 v_uv; 6 | out vec4 col; 7 | 8 | void main() { 9 | col = texture(color_texture, v_uv); 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_1_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | out vec2 v_uv; 6 | 7 | void main() { 8 | gl_Position = vec4(position, 0.0, 1.0); 9 | v_uv = uv; 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_1_obj.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 v_uv; 4 | uniform sampler2D tex; 5 | uniform uint u_id; 6 | 7 | layout(location=0) out vec4 col; 8 | layout(location=1) out uint id; 9 | 10 | void main() { 11 | vec4 tex_val = texture(tex, v_uv); 12 | if (tex_val.a == 0) { 13 | discard; 14 | } 15 | col = tex_val; 16 | id = u_id; 17 | } 18 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_1_obj.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | uniform mat4 mv; 6 | uniform mat4 proj; 7 | out vec2 v_uv; 8 | 9 | void main() { 10 | gl_Position = proj * mv * vec4(position, 0.0, 1.0); 11 | v_uv = vec2(uv.x, 1.0 - uv.y); 12 | } 13 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_2_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform sampler2D color_texture; 4 | 5 | in vec2 v_uv; 6 | out vec4 col; 7 | 8 | void main() { 9 | col = texture(color_texture, v_uv); 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_2_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | out vec2 v_uv; 6 | 7 | void main() { 8 | gl_Position = vec4(position, 0.0, 1.0); 9 | v_uv = uv; 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_2_obj.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | 6 | uniform mat4 mv; 7 | uniform mat4 proj; 8 | uniform vec4 offset_tile; 9 | 10 | float width = offset_tile.y - offset_tile.x; 11 | float height = offset_tile.w - offset_tile.z; 12 | 13 | out vec2 v_uv; 14 | 15 | void main() { 16 | gl_Position = proj * mv * vec4(position, 0.0, 1.0); 17 | v_uv = vec2((uv.x * width) + offset_tile.x, (((1.0 - uv.y) * height) + offset_tile.z)); 18 | } 19 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_4_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform sampler2D color_texture; 4 | 5 | in vec2 v_uv; 6 | out vec4 col; 7 | 8 | void main() { 9 | col = texture(color_texture, v_uv); 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_4_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | out vec2 v_uv; 6 | 7 | void main() { 8 | gl_Position = vec4(position, 0.0, 1.0); 9 | v_uv = uv; 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_4_obj.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | 6 | uniform mat4 mv; 7 | uniform mat4 proj; 8 | uniform vec4 offset_tile; 9 | 10 | float width = offset_tile.y - offset_tile.x; 11 | float height = offset_tile.w - offset_tile.z; 12 | 13 | out vec2 v_uv; 14 | 15 | void main() { 16 | gl_Position = proj * mv * vec4(position, 0.0, 1.0); 17 | v_uv = vec2((uv.x * width) + offset_tile.x, (((1.0 - uv.y) * height) + offset_tile.z)); 18 | } 19 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_5_obj.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 tex_pos; 4 | 5 | layout(location=0) out vec4 out_col; 6 | 7 | uniform sampler2D tex; 8 | 9 | void main() 10 | { 11 | vec4 tex_val = texture(tex, tex_pos); 12 | out_col = tex_val; 13 | } 14 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_5_obj.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout (location = 0) in vec3 position; 4 | layout (location = 1) in vec2 uv; 5 | 6 | out vec2 tex_pos; 7 | 8 | uniform mat4 model; 9 | 10 | layout (std140) uniform cam { 11 | mat4 view; 12 | mat4 proj; 13 | }; 14 | 15 | void main() { 16 | gl_Position = proj * view * model * vec4(position, 1.0); 17 | tex_pos = vec2(uv.x, 1.0 - uv.y); 18 | } 19 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_6_2d_frame.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | out vec4 outcol; 4 | 5 | uniform vec4 incol; 6 | 7 | void main() { 8 | outcol = incol; 9 | } 10 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_6_2d_frustum_frame.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 v_position; 4 | 5 | void main() { 6 | // flip the y coordinate in OpenGL 7 | gl_Position = vec4(v_position.x, v_position.y, 0.0, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_6_3d.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 tex_pos; 4 | 5 | layout(location=0) out vec4 out_col; 6 | 7 | uniform sampler2D tex; 8 | 9 | void main() 10 | { 11 | vec4 tex_val = texture(tex, tex_pos); 12 | out_col = tex_val; 13 | } 14 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_6_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform sampler2D color_texture; 4 | 5 | in vec2 v_uv; 6 | out vec4 col; 7 | 8 | void main() { 9 | col = texture(color_texture, v_uv); 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_6_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | out vec2 v_uv; 6 | 7 | void main() { 8 | gl_Position = vec4(position, 0.0, 1.0); 9 | v_uv = uv; 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_7_shader_command.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 tex_coord; 4 | out vec4 frag_color; 5 | 6 | uniform float time; 7 | 8 | void main() { 9 | // PLACEHOLDER: color 10 | // PLACEHOLDER: alpha 11 | frag_color = vec4(r, g, b, alpha); 12 | } 13 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_7_shader_command.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec2 position; 4 | out vec2 tex_coord; 5 | 6 | void main() { 7 | tex_coord = position.xy * 0.5 + 0.5; 8 | gl_Position = vec4(position.xy, 0.0, 1.0); 9 | } 10 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_7_snippets/alpha.snippet: -------------------------------------------------------------------------------- 1 | float alpha = (sin(time) + 1.0) * 0.5; 2 | -------------------------------------------------------------------------------- /assets/test/shaders/demo_7_snippets/color.snippet: -------------------------------------------------------------------------------- 1 | float r = 0.5 + 0.5 * sin(time); 2 | float g = 0.5 + 0.5 * sin(time + 2.0); 3 | float b = 0.5 + 0.5 * sin(time + 4.0); 4 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/test/shaders/pathfinding" 3 | FILES_MATCHING PATTERN "*.glsl" 4 | ) 5 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_cost_field.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in float v_cost; 4 | 5 | out vec4 out_col; 6 | 7 | void main() 8 | { 9 | if (v_cost == 255.0) { 10 | out_col = vec4(0.0, 0.0, 0.0, 1.0); 11 | return; 12 | } 13 | float cost = (v_cost / 256) * 2.0; 14 | float red = clamp(cost, 0.0, 1.0); 15 | float green = clamp(2.0 - cost, 0.0, 1.0); 16 | out_col = vec4(red, green, 0.0, 1.0); 17 | } 18 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_cost_field.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout (location = 0) in vec3 position; 4 | layout (location = 1) in float cost; 5 | 6 | uniform mat4 model; 7 | uniform mat4 view; 8 | uniform mat4 proj; 9 | 10 | out float v_cost; 11 | 12 | void main() { 13 | gl_Position = proj * view * model * vec4(position, 1.0); 14 | v_cost = cost; 15 | } 16 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform sampler2D color_texture; 4 | 5 | in vec2 v_uv; 6 | out vec4 col; 7 | 8 | void main() { 9 | col = texture(color_texture, v_uv); 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | out vec2 v_uv; 6 | 7 | void main() { 8 | gl_Position = vec4(position, 0.0, 1.0); 9 | v_uv = uv; 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_flow_field.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec3 position; 4 | layout(location=1) in float flow_cell; 5 | layout(location=2) in float int_cell; 6 | 7 | uniform mat4 model; 8 | uniform mat4 view; 9 | uniform mat4 proj; 10 | 11 | out float flow_val; 12 | out float int_val; 13 | 14 | void main() { 15 | gl_Position = proj * view * model * vec4(position, 1.0); 16 | flow_val = flow_cell; 17 | int_val = int_cell; 18 | } 19 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_grid.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | out vec4 out_col; 4 | 5 | void main() 6 | { 7 | out_col = vec4(0.0, 0.0, 0.0, 0.3); 8 | } 9 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_grid.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout (location = 0) in vec3 position; 4 | 5 | uniform mat4 model; 6 | uniform mat4 view; 7 | uniform mat4 proj; 8 | 9 | void main() { 10 | gl_Position = proj * view * model * vec4(position, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_integration_field.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in float v_cost; 4 | 5 | out vec4 out_col; 6 | 7 | void main() 8 | { 9 | if (v_cost > 512.0) { 10 | out_col = vec4(0.0, 0.0, 0.0, 1.0); 11 | return; 12 | } 13 | float cost = 0.05 * v_cost; 14 | float green = clamp(1.0 - cost, 0.0, 1.0); 15 | out_col = vec4(0.75, green, 0.5, 1.0); 16 | } 17 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_integration_field.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout (location = 0) in vec3 position; 4 | layout (location = 1) in float cost; 5 | 6 | uniform mat4 model; 7 | uniform mat4 view; 8 | uniform mat4 proj; 9 | 10 | out float v_cost; 11 | 12 | void main() { 13 | gl_Position = proj * view * model * vec4(position, 1.0); 14 | v_cost = cost; 15 | } 16 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_obj.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform vec4 color; 4 | 5 | out vec4 outcol; 6 | 7 | void main() { 8 | outcol = color; 9 | } 10 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_obj.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | 5 | void main() { 6 | gl_Position = vec4(position, 0.0, 1.0); 7 | } 8 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_vector.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform vec4 color; 4 | 5 | out vec4 outcol; 6 | 7 | void main() { 8 | outcol = color; 9 | } 10 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_0_vector.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec3 position; 4 | 5 | uniform mat4 model; 6 | uniform mat4 view; 7 | uniform mat4 proj; 8 | 9 | void main() { 10 | gl_Position = proj * view * model * vec4(position, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_1_display.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform sampler2D color_texture; 4 | 5 | in vec2 v_uv; 6 | out vec4 col; 7 | 8 | void main() { 9 | col = texture(color_texture, v_uv); 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_1_display.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | layout(location=1) in vec2 uv; 5 | out vec2 v_uv; 6 | 7 | void main() { 8 | gl_Position = vec4(position, 0.0, 1.0); 9 | v_uv = uv; 10 | } 11 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_1_grid.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | out vec4 out_col; 4 | 5 | void main() 6 | { 7 | out_col = vec4(0.0, 0.0, 0.0, 0.3); 8 | } 9 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_1_grid.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout (location = 0) in vec2 position; 4 | 5 | uniform mat4 model; 6 | uniform mat4 view; 7 | uniform mat4 proj; 8 | 9 | void main() { 10 | gl_Position = proj * view * model * vec4(position, 0.0, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_1_obj.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform vec4 color; 4 | 5 | out vec4 outcol; 6 | 7 | void main() { 8 | outcol = color; 9 | } 10 | -------------------------------------------------------------------------------- /assets/test/shaders/pathfinding/demo_1_obj.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | layout(location=0) in vec2 position; 4 | 5 | uniform mat4 model; 6 | uniform mat4 view; 7 | uniform mat4 proj; 8 | 9 | void main() { 10 | gl_Position = proj * view * model * vec4(position, 0.0, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /assets/test/textures/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/test/textures" 3 | PATTERN "CMakeLists.txt" EXCLUDE 4 | ) 5 | -------------------------------------------------------------------------------- /assets/test/textures/gaben.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/test/textures/gaben.png -------------------------------------------------------------------------------- /assets/test/textures/missing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/test/textures/missing.png -------------------------------------------------------------------------------- /assets/test/textures/test_gaben.sprite: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | # openage sprite definition file 3 | 4 | version 2 5 | 6 | texture 0 "test_gaben.texture" 7 | 8 | scalefactor 0.2 9 | 10 | layer 0 mode=once 11 | 12 | angle 0 13 | 14 | frame 0 0 0 0 0 15 | -------------------------------------------------------------------------------- /assets/test/textures/test_gaben.texture: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. 2 | # openage texture definition file 3 | 4 | version 1 5 | 6 | imagefile "gaben.png" 7 | 8 | size 719 1073 9 | 10 | pxformat rgba8 cbits=True 11 | 12 | subtex 0 0 719 1073 359 1000 13 | -------------------------------------------------------------------------------- /assets/test/textures/test_missing.sprite: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | # openage sprite definition file 3 | 4 | version 2 5 | 6 | texture 0 "test_missing.texture" 7 | 8 | scalefactor 1.0 9 | 10 | layer 0 mode=once 11 | 12 | angle 0 13 | 14 | frame 0 0 0 0 0 15 | -------------------------------------------------------------------------------- /assets/test/textures/test_missing.texture: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. 2 | # openage texture definition file 3 | 4 | version 1 5 | 6 | imagefile "missing.png" 7 | 8 | size 32 32 9 | 10 | pxformat rgba8 cbits=True 11 | 12 | subtex 0 0 32 32 16 16 13 | -------------------------------------------------------------------------------- /assets/test/textures/test_tank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/test/textures/test_tank.png -------------------------------------------------------------------------------- /assets/test/textures/test_tank.sprite: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | # openage sprite definition file 3 | 4 | version 2 5 | 6 | texture 0 "test_tank.texture" 7 | 8 | scalefactor 2.0 9 | 10 | layer 0 mode=off 11 | 12 | angle 0 13 | angle 45 14 | angle 90 15 | angle 135 16 | angle 180 17 | angle 225 18 | angle 270 19 | angle 315 20 | 21 | frame 0 0 0 0 0 22 | frame 0 45 0 0 1 23 | frame 0 90 0 0 2 24 | frame 0 135 0 0 3 25 | frame 0 180 0 0 4 26 | frame 0 225 0 0 5 27 | frame 0 270 0 0 6 28 | frame 0 315 0 0 7 29 | -------------------------------------------------------------------------------- /assets/test/textures/test_tank_mirrored.sprite: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | # openage sprite definition file 3 | 4 | version 2 5 | 6 | texture 0 "test_tank.texture" 7 | 8 | scalefactor 2.0 9 | 10 | layer 0 mode=off 11 | 12 | angle 0 13 | angle 45 14 | angle 90 15 | angle 135 16 | angle 180 17 | angle 225 mirror_from=135 18 | angle 270 mirror_from=90 19 | angle 315 mirror_from=45 20 | 21 | frame 0 0 0 0 0 22 | frame 0 45 0 0 1 23 | frame 0 90 0 0 2 24 | frame 0 135 0 0 3 25 | frame 0 180 0 0 4 26 | -------------------------------------------------------------------------------- /assets/test/textures/test_terrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/test/textures/test_terrain.png -------------------------------------------------------------------------------- /assets/test/textures/test_terrain.terrain: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | # openage terrain definition file 3 | 4 | version 2 5 | 6 | texture 0 "test_terrain.texture" 7 | 8 | scalefactor 1.0 9 | 10 | layer 0 11 | 12 | frame 0 0 0 0 13 | -------------------------------------------------------------------------------- /assets/test/textures/test_terrain.texture: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. 2 | # openage texture definition file 3 | 4 | version 1 5 | 6 | imagefile "test_terrain.png" 7 | 8 | size 500 500 9 | 10 | pxformat rgba8 cbits=True 11 | 12 | subtex 0 0 500 500 0 0 13 | -------------------------------------------------------------------------------- /assets/test/textures/test_terrain2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/test/textures/test_terrain2.png -------------------------------------------------------------------------------- /assets/test/textures/test_terrain2.terrain: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | # openage terrain definition file 3 | 4 | version 2 5 | 6 | texture 0 "test_terrain2.texture" 7 | 8 | scalefactor 1.0 9 | 10 | layer 0 11 | 12 | frame 0 0 0 0 13 | -------------------------------------------------------------------------------- /assets/test/textures/test_terrain2.texture: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. 2 | # openage texture definition file 3 | 4 | version 1 5 | 6 | imagefile "test_terrain2.png" 7 | 8 | size 500 500 9 | 10 | pxformat rgba8 cbits=True 11 | 12 | subtex 0 0 500 500 0 0 13 | -------------------------------------------------------------------------------- /assets/test/textures/test_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/test/textures/test_texture.png -------------------------------------------------------------------------------- /assets/textures/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(DIRECTORY "." 2 | DESTINATION "${ASSET_DIR}/textures" 3 | PATTERN "CMakeLists.txt" EXCLUDE 4 | ) 5 | -------------------------------------------------------------------------------- /assets/textures/torn_paper_edge.docx: -------------------------------------------------------------------------------- 1 | # x,y,w,h,cx,cy 2 | 0,0,512,16,0,0 3 | -------------------------------------------------------------------------------- /assets/textures/torn_paper_edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/assets/textures/torn_paper_edge.png -------------------------------------------------------------------------------- /buildsystem/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | CMake build helpers; see doc/buildsystem.md for further info. 5 | 6 | Modules in the 'buildsystem' package are not intended to be installed 7 | with openage, or used from outside the build process; otherwise, they 8 | would be in the 'openage' package. 9 | """ 10 | -------------------------------------------------------------------------------- /buildsystem/codecompliance/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Code compliance checker module 5 | 6 | Integrated into the root Makefile. 7 | """ 8 | -------------------------------------------------------------------------------- /buildsystem/modules/FindCython.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | # This module defines: 4 | # 5 | # CYTHON_FOUND 6 | # CYTHON_VERSION - e.g. '0.23dev' 7 | # CYTHON - invocation (using python) 8 | # 9 | # It depends on: 10 | # 11 | # PYTHON 12 | 13 | set(CYTHON "${PYTHON} -m cython") 14 | py_exec("import cython; print(cython.__version__)" CYTHON_VERSION) 15 | 16 | include(FindPackageHandleStandardArgs) 17 | find_package_handle_standard_args(Cython VERSION_VAR CYTHON_VERSION REQUIRED_VARS CYTHON) 18 | -------------------------------------------------------------------------------- /buildsystem/modules/FindInotify.cmake: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2020 the openage authors. See copying.md for legal info. 2 | 3 | # This module defines 4 | # 5 | # INOTIFY_INCLUDE_DIR 6 | # INOTIFY_FOUND 7 | 8 | find_path(INOTIFY_INCLUDE_DIR sys/inotify.h HINTS /usr/include/${CMAKE_LIBRARY_ARCHITECTURE}) 9 | 10 | include(FindPackageHandleStandardArgs) 11 | find_package_handle_standard_args(Inotify DEFAULT_MSG INOTIFY_INCLUDE_DIR) 12 | 13 | mark_as_advanced(INOTIFY_INCLUDE_DIR) 14 | -------------------------------------------------------------------------------- /buildsystem/modules/FindPython_test.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include 4 | 5 | int main() { 6 | // set by preprocessor: 7 | constexpr uint64_t min_ver = TARGET_VERSION; 8 | 9 | static_assert(PY_VERSION_HEX >= min_ver, "unsuitable: " PY_VERSION); 10 | 11 | Py_Initialize(); 12 | Py_Finalize(); 13 | } 14 | -------------------------------------------------------------------------------- /buildsystem/templates/openage.bat.in: -------------------------------------------------------------------------------- 1 | @rem Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | @echo off 3 | 4 | rem @AUTOGEN_WARNING@ 5 | 6 | set INST_DIR=%CD% 7 | set PATH=%INST_DIR%\@CMAKE_INSTALL_BINDIR@; 8 | set XDG_DATA_HOME=%INST_DIR%\share 9 | 10 | call "%INST_DIR%\@CMAKE_PY_INSTALL_PREFIX@\python.exe" -m openage 11 | -------------------------------------------------------------------------------- /buildsystem/templates/qt.conf: -------------------------------------------------------------------------------- 1 | [Paths] 2 | Plugins = ..\\bin\\plugins 3 | Qml2Imports = ..\\bin\\qml 4 | -------------------------------------------------------------------------------- /cfg/.gitignore: -------------------------------------------------------------------------------- 1 | asset_location 2 | -------------------------------------------------------------------------------- /cfg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2017-2021 the openage authors. See copying.md for legal info. 2 | 3 | install(FILES 4 | "${CMAKE_CURRENT_SOURCE_DIR}/keybinds.oac" 5 | DESTINATION "${GLOBAL_CONFIG_DIR}" 6 | ) 7 | 8 | install(DIRECTORY 9 | "${CMAKE_CURRENT_SOURCE_DIR}/converter" 10 | DESTINATION "${GLOBAL_CONFIG_DIR}/" 11 | ) 12 | -------------------------------------------------------------------------------- /cfg/converter/games/aoc/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 2: The Conqueror's 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [age2_x1] 7 | paths = ["age2_x1/age2_x1.exe"] 8 | 9 | [age2_x1.map] 10 | d02ef2f4935c5ef568eaa873442b4b2b547067ed8e3572758bbbbee8 = "1.0c" 11 | 4568f37f309c0a89fa9e84a0c0f6c61b0f394c28adc82c0b3f2203b3 = "1.0c" 12 | 13 | [empires2_x1_p1dat] 14 | paths = ["Data/empires2_x1_p1.dat"] 15 | 16 | [empires2_x1_p1dat.map] 17 | 6aab4c7468c3d319ec00f577835dc7799b70ffab1de6bfd25ac227b5 = "1.0c" 18 | -------------------------------------------------------------------------------- /cfg/converter/games/aoc_demo/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 2: The Conqueror's Demo 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [age2_x1t] 7 | paths = ["age2_x1t.exe"] 8 | 9 | [age2_x1t.map] 10 | d02ef2f4935c5ef568eaa873442b4b2b547067ed8e3572758bbbbee8 = "1.0c" 11 | 4568f37f309c0a89fa9e84a0c0f6c61b0f394c28adc82c0b3f2203b3 = "1.0c" 12 | 13 | [empires2_x1dat] 14 | paths = ["Data/empires2_x1.dat"] 15 | 16 | [empires2_x1dat.map] 17 | 6aab4c7468c3d319ec00f577835dc7799b70ffab1de6bfd25ac227b5 = "1.0c" 18 | -------------------------------------------------------------------------------- /cfg/converter/games/aok/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 2: Age of Kings 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [empires2] 7 | paths = ["empires2.exe"] 8 | 9 | [empires2.map] 10 | 0425273b541b8405325775a4bae48d078db7444a94888943148b4e1a = "2.0a" 11 | 12 | [empires2dat] 13 | paths = ["data/empires2.dat"] 14 | 15 | [empires2dat.map] 16 | f7a9d214e16182747bd1c3e3302398740609413407aeffd32a0acdd8 = "2.0a" 17 | -------------------------------------------------------------------------------- /cfg/converter/games/de1/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 1: Definitive Edition (Steam) 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [AoEDE_s] 7 | paths = ["AoEDE_s.exe", "AoEDE.exe"] 8 | 9 | [AoEDE_s.map] 10 | 3356c013f2cb732601e1acf286654e4360d7e7304a092bdbeaa63d48 = "steam" 11 | 12 | [empiresdat] 13 | paths = ["Data/empires.dat"] 14 | 15 | [empiresdat.map] 16 | 4d1f3cb7ce20074bfa23445c62755b95e4ec193b41507d5196921033 = "steam" 17 | -------------------------------------------------------------------------------- /cfg/converter/games/de2/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 2: Definitive Edition 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [AoE2DE_s] 7 | paths = ["AoE2DE_s.exe", "AoE2DE.exe"] 8 | 9 | [AoE2DE_s.map] 10 | 01ff7cc7819e4f77be059c8efc6c07472dd1a58f429621e937328750 = "36906" 11 | 12 | [empires2_x2_p1dat] 13 | paths = ["resources/_common/dat/empires2_x2_p1.dat"] 14 | 15 | [empires2_x2_p1dat.map] 16 | cf13c553c78df192da1af957d1519870db15c9dbca314b245a5abe6f = "36906" 17 | -------------------------------------------------------------------------------- /cfg/converter/games/hd/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 2: HD Edition 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | ["AoK HD"] 7 | paths = ["AoK HD.exe"] 8 | 9 | ["AoK HD".map] 10 | 73a068f353efd50e058762ca090062600a7ca50e435fe55a6ca87efa = "5.8" 11 | 12 | [empires2_x1_p1dat] 13 | paths = ["resources/_common/dat/empires2_x1_p1.dat"] 14 | 15 | [empires2_x1_p1dat.map] 16 | 91f7370b75b2fadf238b25f6fdd2f43a88a1f01ea022cd6086e44f43 = "5.8" 17 | -------------------------------------------------------------------------------- /cfg/converter/games/hd_ak/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of African Kingdoms (HD) 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [empires2_x2_p1dat] 7 | paths = ["resources/_common/dat/empires2_x2_p1.dat"] 8 | 9 | [empires2_x2_p1dat.map] 10 | b2a69980a1ef39e68de2be1771392858cb639a9f2797373ab1649acf = "5.8" 11 | -------------------------------------------------------------------------------- /cfg/converter/games/hd_fgt/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Forgotten Empires (HD) 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [empires2_x2_p1dat] 7 | paths = ["resources/_common/dat/empires2_x2_p1.dat"] 8 | 9 | [empires2_x2_p1dat.map] 10 | b2a69980a1ef39e68de2be1771392858cb639a9f2797373ab1649acf = "5.8" 11 | -------------------------------------------------------------------------------- /cfg/converter/games/hd_raj/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Rise of the Rajas (HD) 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [empires2_x2_p1dat] 7 | paths = ["resources/_common/dat/empires2_x2_p1.dat"] 8 | 9 | [empires2_x2_p1dat.map] 10 | b2a69980a1ef39e68de2be1771392858cb639a9f2797373ab1649acf = "5.8" 11 | -------------------------------------------------------------------------------- /cfg/converter/games/ror/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Age of Empires 1: Rise of Rome 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [EMPIRESX] 7 | paths = ["EMPIRESX.EXE"] 8 | 9 | [EMPIRESX.map] 10 | bd55a288136ea5457c61fbc794e3e4a4ac526b1d53809f1b16762119 = "1.0B" 11 | 12 | [empiresdat] 13 | paths = ["data2/empires.dat"] 14 | 15 | [empiresdat.map] 16 | 0376368ce4c78be31596dea7b76f592b2352f6b5c3aca222b7939b4a = "1.0B" 17 | -------------------------------------------------------------------------------- /cfg/converter/games/swgb/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Star Wars: Galactic Battlegrounds 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [Battlegrounds] 7 | paths = ["Game/Battlegrounds.exe"] 8 | 9 | [Battlegrounds.map] 10 | 0a5e2b7828b5b0a45cb6dfbf52e3becb2021e97259ba23a5cee94230 = "GOG" 11 | 12 | [GENIE] 13 | paths = ["Game/Data/GENIE.DAT"] 14 | 15 | [GENIE.map] 16 | f1f641f201dac9d7663df4cf1ece7a60a78770a09e70e202399505d9 = "GOG" 17 | -------------------------------------------------------------------------------- /cfg/converter/games/swgb_cc/version_hashes.toml: -------------------------------------------------------------------------------- 1 | # version hashes of Clone Campaigns 2 | 3 | file_version = "2.0" 4 | hash_algo = "SHA3-256" 5 | 6 | [battlegrounds_x1] 7 | paths = ["Game/battlegrounds_x1.exe"] 8 | 9 | [battlegrounds_x1.map] 10 | fb722624bae8a4626925926d5709e1397766dd3ee2dcd1df7849ad27 = "GOG" 11 | 12 | [genie_x1dat] 13 | paths = ["Game/Data/genie_x1.dat"] 14 | 15 | [genie_x1dat.map] 16 | 036a16aefd1a66f5bad121786e66b8cc9542cbe88b43c4eb8f73eadb = "GOG" -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 3 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) since release [0.4.0]. 4 | 5 | Individual changelogs for the individual engine parts are stored in the [doc/changelogs](doc/changelogs) folder. 6 | -------------------------------------------------------------------------------- /dist/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install( 2 | FILES "openage.desktop" 3 | DESTINATION "share/applications" 4 | ) 5 | -------------------------------------------------------------------------------- /dist/README.md: -------------------------------------------------------------------------------- 1 | # Distribution 2 | 3 | Contains files useful for package distribution. 4 | 5 | ## Desktop file 6 | 7 | The [openage.desktop](openage.desktop) file can be found in this directory and will be installed at 8 | `/usr/share/applications/openage.desktop`. 9 | -------------------------------------------------------------------------------- /dist/openage.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=openage 4 | Comment=Free engine clone of Age of Empires II 5 | Exec=openage %U 6 | Terminal=true 7 | Type=Application 8 | Icon=openage 9 | Categories=Game;StrategyGame;Amusement 10 | -------------------------------------------------------------------------------- /doc/build_instructions/debian.md: -------------------------------------------------------------------------------- 1 | # Prerequisite steps for Debian users 2 | 3 | - `sudo apt-get update` 4 | - `sudo apt-get install cmake cython3 libeigen3-dev libepoxy-dev libfontconfig1-dev libfreetype-dev libharfbuzz-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libtoml11-dev python3-dev python3-mako python3-numpy python3-lz4 python3-pil python3-pip python3-pygments python3-toml qml6-module-qtquick-controls qt6-declarative-dev qt6-multimedia-dev qml6-module-qtquick3d-spatialaudio` 5 | 6 | You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies. 7 | -------------------------------------------------------------------------------- /doc/build_instructions/fedora.md: -------------------------------------------------------------------------------- 1 | # Prerequisite steps for Fedora users (Fedora >= 34) 2 | 3 | Run the following command: 4 | 5 | `sudo dnf install clang cmake eigen3-devel fontconfig-devel gcc-c harfbuzz-devel libepoxy-devel libogg-devel libopusenc-devel libpng-devel opusfile-devel python3-Cython python3-devel python3-mako python3-numpy python3-lz4 python3-pillow python3-pygments python3-toml toml11-devel qt6-qtdeclarative-devel qt6-qtmultimedia-devel` 6 | 7 | You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies. 8 | -------------------------------------------------------------------------------- /doc/build_instructions/opensuse.md: -------------------------------------------------------------------------------- 1 | # Prerequisite steps for openSUSE users 2 | 3 | - `zypper install --no-recommends cmake doxygen eigen3-devel fontconfig-devel gcc-c graphviz++ harfbuzz-devel libepoxy-devel libfreetype-dev libogg-devel libopus-devel libpng-devel libtoml11-dev qt6-declarative-dev qt6-quickcontrols2 qt6-multimedia-dev opusfile-devel python3-Cython python3-Mako python3-lz4 python3-Pillow python3-Pygments python3-toml python3-devel` 4 | 5 | You will also need [nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md) and its dependencies. 6 | -------------------------------------------------------------------------------- /doc/changelogs/nyan_api/v0.1.0.md: -------------------------------------------------------------------------------- 1 | # [0.1.0] - 2019-05-20 2 | All notable changes for version [v0.1.0] are documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## Added 8 | Initial draft. Contains 99% of the features from AoE1, AoE2 and SWGB. 9 | 10 | ## Reference visualization 11 | 12 | * [Gamedata](https://github.com/SFTtech/openage/blob/317947efc7219c5bc049a8b6c20fb79ce75f8323/doc/nyan/aoe2_nyan_tree.svg) 13 | -------------------------------------------------------------------------------- /doc/code/README.md: -------------------------------------------------------------------------------- 1 | Code documentation 2 | ================== 3 | 4 | In here resides documentation of concepts and APIs implemented in source code 5 | already. 6 | 7 | This is to provide information about what the author thought of when the code 8 | was written so others can understand the ideas. 9 | -------------------------------------------------------------------------------- /doc/code/converter/README.md: -------------------------------------------------------------------------------- 1 | # Converter 2 | 3 | The converter transforms the old and janky Genie Engine formats 4 | into new and shiny openage formats. 5 | 6 | The major parts are implemented in Python 3. Where speed is important 7 | or external libraries are used, we use Cython. 8 | 9 | 10 | ## Architecture 11 | 12 | [Architecture](architecture_overview.md) 13 | 14 | This document gives you an overview of the paradigms used in the code. 15 | 16 | 17 | ## Workflow 18 | 19 | [Workflow](workflow.md) 20 | 21 | Here you can find out about the workflow of a converter run and what 22 | happens in the individual stages of conversion. 23 | -------------------------------------------------------------------------------- /doc/code/game_simulation/images/activity_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/game_simulation/images/activity_workflow.png -------------------------------------------------------------------------------- /doc/code/images/continuous_curve.ggb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/images/continuous_curve.ggb -------------------------------------------------------------------------------- /doc/code/images/continuous_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/images/continuous_curve.png -------------------------------------------------------------------------------- /doc/code/images/discrete_curve.ggb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/images/discrete_curve.ggb -------------------------------------------------------------------------------- /doc/code/images/discrete_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/images/discrete_curve.png -------------------------------------------------------------------------------- /doc/code/images/segmented_curve.ggb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/images/segmented_curve.ggb -------------------------------------------------------------------------------- /doc/code/images/segmented_curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/images/segmented_curve.png -------------------------------------------------------------------------------- /doc/code/pathfinding/images/cost_field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/pathfinding/images/cost_field.png -------------------------------------------------------------------------------- /doc/code/pathfinding/images/flow_field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/pathfinding/images/flow_field.png -------------------------------------------------------------------------------- /doc/code/pathfinding/images/integration_field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/pathfinding/images/integration_field.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_0.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_1.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_2.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_3.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_4.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_5.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_6.png -------------------------------------------------------------------------------- /doc/code/renderer/images/demo_7.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/demo_7.mp4 -------------------------------------------------------------------------------- /doc/code/renderer/images/stresstest_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/stresstest_0.png -------------------------------------------------------------------------------- /doc/code/renderer/images/stresstest_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/code/renderer/images/stresstest_1.png -------------------------------------------------------------------------------- /doc/code_style/.gitignore: -------------------------------------------------------------------------------- 1 | doc 2 | -------------------------------------------------------------------------------- /doc/code_style/inttypes.md: -------------------------------------------------------------------------------- 1 | Guide to using Integer Types 2 | ============================ 3 | 4 | If integer width does not matter (most cases): 5 | ```cpp 6 | int, unsigned int 7 | ``` 8 | 9 | If integer width matters: 10 | ```cpp 11 | (u)intXX_t 12 | ``` 13 | 14 | For machine width integers (in memory management): 15 | ```cpp 16 | size_t 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/convert/nyan.md: -------------------------------------------------------------------------------- 1 | # nyan data conversion 2 | 3 | We depend on the original game. 4 | We have a converter which spits out a files in our formats 5 | by parsing the original data. 6 | 7 | ## Gamedata conversion 8 | 9 | `openage/convert/value_object/read/media/datfile/` specifies the format of the `.dat` from various games. 10 | -------------------------------------------------------------------------------- /doc/ide/README.md: -------------------------------------------------------------------------------- 1 | # Developing openage in Integrated Development Environments (IDEs) 2 | 3 | We have created a collection instructions for setting up IDEs to use them for openage. 4 | 5 | * [Qt Creator](qt_creator.md) 6 | * [Visual Studio Code](vscode.md) 7 | -------------------------------------------------------------------------------- /doc/ideas/editor/campaigns.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/ideas/editor/campaigns.md -------------------------------------------------------------------------------- /doc/ideas/editor/economy.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/ideas/editor/economy.md -------------------------------------------------------------------------------- /doc/ideas/editor/scripting.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/ideas/editor/scripting.md -------------------------------------------------------------------------------- /doc/ideas/editor/tech.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/ideas/editor/tech.md -------------------------------------------------------------------------------- /doc/ideas/editor/units.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/ideas/editor/units.md -------------------------------------------------------------------------------- /doc/media/sound.md: -------------------------------------------------------------------------------- 1 | Sound documentation 2 | =================== 3 | 4 | Known sound files: 5 | 6 | You may add sounds here, but most of them are already referenced in the 7 | dat file structure. 8 | 9 | interfac.drs 10 | ------------ 11 | 12 | 50313.wav - One of your units is being converted 13 | 50315.wav - Your military units are attacked 14 | 50316.wav - A villager or building of yours is attacked 15 | 50357.wav - City center bell 16 | 50366.wav - Wild animal attacks your units (not played for boar) 17 | -------------------------------------------------------------------------------- /doc/nyan/api_reference/reference_root.md: -------------------------------------------------------------------------------- 1 | # engine.root 2 | 3 | Reference documentation of the `engine.root` module of the openage modding API. 4 | 5 | ## root.Object 6 | 7 | ```python 8 | Object(): 9 | pass 10 | ``` 11 | 12 | Root object of the API. All other objects inherit from it, either explicitly or implicitly. 13 | -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/rates.md: -------------------------------------------------------------------------------- 1 | # Rates 2 | 3 | This file lists some rates used in AoE2 4 | 5 | # Animals 6 | 7 | Sheep and deer rot at rate of `1 food / 2 seconds`. 8 | Shepherds get food at `10 food / 12 seconds` (one every 0.8333 seconds). 9 | 10 | # Relics 11 | 12 | Relics give gold at rate of `1 every 2 / (number of relics) seconds`. Since one 13 | can get a maximum of 10 relics, this means they can provide at most 5 gold per 14 | second. 15 | -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/research.md: -------------------------------------------------------------------------------- 1 | the following information stems from the internet (tm) and is thus utterly 100-% correct. 2 | 3 | buildings have exactly one sprite 4 | exception: e.g. town center, which has multiple sprites for different sections (walkable...) 5 | 6 | units have 5 states: idle, walking, attacking, dying, rotting. for each state, there is a sprite for every direction the unit could be facing 7 | exception: villagers, ofc, have a lot more states 8 | ships have extra sprites for their sails 9 | -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/swgb/ui-empire-nopower-detection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/game_mechanics/swgb/ui-empire-nopower-detection.png -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/swgb/ui-empire-shield-power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/game_mechanics/swgb/ui-empire-shield-power.png -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/swgb/ui-gungan-all-off-lq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/game_mechanics/swgb/ui-gungan-all-off-lq.png -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/swgb/ui-gungan-all-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/game_mechanics/swgb/ui-gungan-all-off.png -------------------------------------------------------------------------------- /doc/reverse_engineering/game_mechanics/swgb/ui-gungan-stealth-detection-lq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/game_mechanics/swgb/ui-gungan-stealth-detection-lq.png -------------------------------------------------------------------------------- /doc/reverse_engineering/networking/images/aoe2-message-spoofing1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/networking/images/aoe2-message-spoofing1.png -------------------------------------------------------------------------------- /doc/reverse_engineering/networking/images/aoe2-message-spoofing2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/networking/images/aoe2-message-spoofing2.png -------------------------------------------------------------------------------- /doc/reverse_engineering/networking/images/aoe2-message-spoofing3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/doc/reverse_engineering/networking/images/aoe2-message-spoofing3.png -------------------------------------------------------------------------------- /doc/reverse_engineering/unit_stats/unit_stats_aoe.txt: -------------------------------------------------------------------------------- 1 | Notes: 2 | This unit attributes table is copied from the original game manual of Age of Empires I for MacOS 9 3 | Missile weapons: Archery Range units, towers, Scout Ship, War Galley, Trireme 4 | -------------------------------------------------------------------------------- /etc/gdb_pretty/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | GDB pretty printers for openage. 5 | """ 6 | -------------------------------------------------------------------------------- /etc/lsan.supp: -------------------------------------------------------------------------------- 1 | # Curse you, Python! (this list is probably incomplete) 2 | leak:_PyObject_Malloc 3 | leak:_PyObject_GC_Resize 4 | leak:PyThread_allocate_lock 5 | leak:PyCode_New 6 | leak:PyList_New 7 | leak:new_keys_object 8 | leak:make_keys_shared 9 | leak:new_dict_with_shared_keys 10 | leak:list_resize 11 | leak:set_table_resize 12 | leak:resize_compact 13 | leak:atexit_register 14 | leak:PyInit_atexit 15 | leak:PyModule_Create2 16 | leak:newblock 17 | leak:_buffered_init 18 | 19 | # stdlib 20 | leak:__strdup 21 | -------------------------------------------------------------------------------- /etc/openage.gdbinit: -------------------------------------------------------------------------------- 1 | python 2 | import sys, os 3 | 4 | print("Loading openage.gdbinit") 5 | print(f"Adding custom pretty-printers directory to the GDB path: {os.getcwd() + '../../etc'}") 6 | 7 | sys.path.insert(0, "../../etc") 8 | 9 | import gdb_pretty.printers 10 | end 11 | -------------------------------------------------------------------------------- /libopenage/.gitignore: -------------------------------------------------------------------------------- 1 | # generated by codegen 2 | *.gen.* 3 | # generated by pxdgen 4 | *.pxd 5 | __init__.py 6 | # generated by cmake 7 | /config.h 8 | /config.cpp 9 | -------------------------------------------------------------------------------- /libopenage/assets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | mod_manager.cpp 3 | modpack.cpp 4 | ) 5 | -------------------------------------------------------------------------------- /libopenage/audio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | audio_manager.cpp 3 | category.cpp 4 | dynamic_loader.cpp 5 | dynamic_resource.cpp 6 | error.cpp 7 | format.cpp 8 | in_memory_loader.cpp 9 | in_memory_resource.cpp 10 | opus_dynamic_loader.cpp 11 | opus_in_memory_loader.cpp 12 | opus_loading.cpp 13 | loader_policy.cpp 14 | resource.cpp 15 | resource_def.cpp 16 | sound.cpp 17 | ) 18 | -------------------------------------------------------------------------------- /libopenage/audio/category.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage::audio { 8 | 9 | enum class category_t { 10 | GAME, 11 | INTERFACE, 12 | MUSIC, 13 | TAUNT 14 | }; 15 | 16 | 17 | const char *category_t_to_str(category_t val); 18 | std::ostream &operator<<(std::ostream &os, category_t val); 19 | 20 | 21 | } // namespace openage::audio 22 | -------------------------------------------------------------------------------- /libopenage/audio/error.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "error.h" 4 | 5 | namespace openage { 6 | namespace audio { 7 | 8 | Error::Error(const log::message &msg) 9 | : 10 | error::Error(msg) {} 11 | 12 | 13 | }} // openage::audio 14 | -------------------------------------------------------------------------------- /libopenage/audio/error.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "../error/error.h" 6 | 7 | namespace openage { 8 | namespace audio { 9 | 10 | class Error : public error::Error { 11 | public: 12 | Error(const log::message &msg); 13 | }; 14 | 15 | } // namespace audio 16 | } // namespace openage 17 | -------------------------------------------------------------------------------- /libopenage/audio/format.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | 8 | namespace openage { 9 | namespace audio { 10 | 11 | enum class format_t { 12 | OPUS, 13 | WAV, 14 | MP3, 15 | FLAC 16 | }; 17 | 18 | const char *format_t_to_str(format_t val); 19 | 20 | std::ostream &operator<<(std::ostream &os, format_t val); 21 | 22 | } // namespace audio 23 | } // namespace openage 24 | -------------------------------------------------------------------------------- /libopenage/audio/loader_policy.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | #include 7 | 8 | 9 | namespace openage { 10 | namespace audio { 11 | 12 | enum class loader_policy_t { 13 | IN_MEMORY, 14 | DYNAMIC 15 | }; 16 | 17 | 18 | const char *loader_policy_t_to_str(loader_policy_t val); 19 | 20 | std::ostream &operator<<(std::ostream &os, loader_policy_t val); 21 | 22 | } // namespace audio 23 | } // namespace openage 24 | -------------------------------------------------------------------------------- /libopenage/audio/resource_def.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "resource_def.h" 4 | 5 | namespace openage { 6 | namespace audio { 7 | 8 | }} // openage::audio 9 | -------------------------------------------------------------------------------- /libopenage/config.cpp.in: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2020 the openage authors. See copying.md for legal info. 2 | 3 | // ${AUTOGEN_WARNING} 4 | 5 | #include "config.h" 6 | 7 | namespace openage { 8 | namespace config { 9 | 10 | const char *const config_option_string = "${CONFIG_OPTION_STRING}"; 11 | 12 | }} // openage::config 13 | -------------------------------------------------------------------------------- /libopenage/console/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | buf.cpp 3 | console.cpp 4 | draw.cpp 5 | tests.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /libopenage/coord/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2018 the openage authors. See copying.md for legal info. 2 | 3 | add_sources(libopenage 4 | chunk.cpp 5 | coord_test.cpp 6 | declarations.cpp 7 | phys.cpp 8 | pixel.cpp 9 | scene.cpp 10 | term.cpp 11 | tile.cpp 12 | ) 13 | 14 | target_include_directories(libopenage 15 | PRIVATE 16 | ${CMAKE_CURRENT_BINARY_DIR} 17 | ) 18 | -------------------------------------------------------------------------------- /libopenage/coord/chunk.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "chunk.h" 4 | 5 | #include "coord/tile.h" 6 | 7 | 8 | namespace openage { 9 | namespace coord { 10 | 11 | tile_delta chunk_delta::to_tile(tile_t tiles_per_chunk) const { 12 | return tile_delta{this->ne * tiles_per_chunk, this->se * tiles_per_chunk}; 13 | } 14 | 15 | tile chunk::to_tile(tile_t tiles_per_chunk) const { 16 | return tile{this->ne * tiles_per_chunk, this->se * tiles_per_chunk}; 17 | } 18 | 19 | } // namespace coord 20 | } // namespace openage 21 | -------------------------------------------------------------------------------- /libopenage/coord/coord.cpp.template: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2023 the openage authors. See copying.md for legal info. 2 | 3 | ${"#"}include "coord_${formatted_members("{}", join_with="")}.gen.h" 4 | 5 | #include 6 | 7 | namespace openage { 8 | namespace coord { 9 | 10 | // fully implemented as templated code in the header file. 11 | 12 | } // namespace coord 13 | } // namespace openage 14 | -------------------------------------------------------------------------------- /libopenage/coord/declarations.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "declarations.h" 4 | 5 | namespace openage::coord { 6 | 7 | // This file is intended to be empty. 8 | 9 | } 10 | -------------------------------------------------------------------------------- /libopenage/coord/term.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "term.h" 4 | 5 | namespace openage { 6 | namespace coord { 7 | 8 | }} // namespace openage::coord 9 | -------------------------------------------------------------------------------- /libopenage/curve/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | base_curve.cpp 3 | continuous.cpp 4 | discrete.cpp 5 | discrete_mod.cpp 6 | interpolated.cpp 7 | keyframe.cpp 8 | keyframe_container.cpp 9 | segmented.cpp 10 | ) 11 | 12 | add_subdirectory("container") 13 | add_subdirectory("tests") 14 | -------------------------------------------------------------------------------- /libopenage/curve/base_curve.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "base_curve.h" 4 | 5 | namespace openage::curve { 6 | 7 | } // openage::curve 8 | -------------------------------------------------------------------------------- /libopenage/curve/container/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | array.cpp 3 | element_wrapper.cpp 4 | iterator.cpp 5 | map.cpp 6 | map_filter_iterator.cpp 7 | queue.cpp 8 | queue_filter_iterator.cpp 9 | ) 10 | -------------------------------------------------------------------------------- /libopenage/curve/container/array.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2025 the openage authors. See copying.md for legal info. 2 | 3 | 4 | #include "array.h" 5 | 6 | namespace openage::curve { 7 | 8 | // This file is intended to be empty 9 | 10 | } // openage::curve 11 | -------------------------------------------------------------------------------- /libopenage/curve/container/element_wrapper.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2025 the openage authors. See copying.md for legal info. 2 | 3 | #include "element_wrapper.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/container/iterator.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2025 the openage authors. See copying.md for legal info. 2 | 3 | #include "iterator.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/container/map.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2025 the openage authors. See copying.md for legal info. 2 | 3 | #include "map.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/container/map_filter_iterator.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2025 the openage authors. See copying.md for legal info. 2 | 3 | #include "map_filter_iterator.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/container/queue.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2025 the openage authors. See copying.md for legal info. 2 | 3 | #include "queue.h" 4 | 5 | namespace openage::curve { 6 | 7 | } // namespace openage::curve 8 | -------------------------------------------------------------------------------- /libopenage/curve/container/queue_filter_iterator.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2025 the openage authors. See copying.md for legal info. 2 | 3 | #include "queue_filter_iterator.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/continuous.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "continuous.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/discrete.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "discrete.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/discrete_mod.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "discrete_mod.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/interpolated.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "interpolated.h" 4 | -------------------------------------------------------------------------------- /libopenage/curve/keyframe.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "keyframe.h" 4 | -------------------------------------------------------------------------------- /libopenage/curve/keyframe_container.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "keyframe_container.h" 4 | 5 | namespace openage::curve { 6 | 7 | // nothing to see here, keep walking (to the header) 8 | 9 | } // openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/segmented.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "segmented.h" 4 | 5 | namespace openage::curve { 6 | 7 | // This file is intended to be empty 8 | 9 | } // namespace openage::curve 10 | -------------------------------------------------------------------------------- /libopenage/curve/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | curve_types.cpp 3 | container.cpp 4 | ) 5 | -------------------------------------------------------------------------------- /libopenage/cvar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | cvar.cpp 3 | ) 4 | 5 | pxdgen( 6 | cvar.h 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/datastructure/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | tests.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/engine/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | engine.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/error/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | backtrace.cpp 3 | demo.cpp 4 | error.cpp 5 | handlers.cpp 6 | stackanalyzer.cpp 7 | ) 8 | 9 | pxdgen( 10 | backtrace.h 11 | error.h 12 | handlers.h 13 | ) 14 | -------------------------------------------------------------------------------- /libopenage/event/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | event_loop.cpp 3 | event.cpp 4 | evententity.cpp 5 | eventhandler.cpp 6 | eventqueue.cpp 7 | eventstore.cpp 8 | state.cpp 9 | tests.cpp 10 | ) 11 | 12 | add_subdirectory("demo") 13 | -------------------------------------------------------------------------------- /libopenage/event/demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | aicontroller.cpp 3 | gamestate.cpp 4 | gui.cpp 5 | main.cpp 6 | physics.cpp 7 | ) 8 | 9 | 10 | pxdgen( 11 | main.h 12 | ) 13 | -------------------------------------------------------------------------------- /libopenage/event/demo/aicontroller.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "gamestate.h" 6 | 7 | #include 8 | 9 | namespace openage::event::demo { 10 | 11 | std::vector get_ai_inputs(const std::shared_ptr &player, 12 | const std::shared_ptr &ball, 13 | const time::time_t &now); 14 | 15 | } // namespace openage::event::demo 16 | -------------------------------------------------------------------------------- /libopenage/event/demo/gamestate.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "gamestate.h" 4 | 5 | namespace openage::event::demo { 6 | 7 | // This file is intentionally left empty 8 | 9 | } // openage::event::demo 10 | -------------------------------------------------------------------------------- /libopenage/event/demo/main.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "../../util/compiler.h" 6 | // pxd: from libcpp cimport bool 7 | 8 | 9 | namespace openage::event::demo { 10 | 11 | // pxd: void curvepong(bool disable_gui, bool no_human) except + 12 | OAAPI void curvepong(bool disable_gui, bool no_human); 13 | 14 | 15 | } // namespace openage::event::demo 16 | -------------------------------------------------------------------------------- /libopenage/event/state.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "state.h" 4 | 5 | namespace openage::event { 6 | 7 | } // openage::event 8 | -------------------------------------------------------------------------------- /libopenage/event/state.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | 8 | namespace openage::event { 9 | 10 | class EventLoop; 11 | 12 | 13 | class State { 14 | public: 15 | State(const std::shared_ptr & /*mgr*/) {} 16 | virtual ~State() = default; 17 | }; 18 | 19 | } // namespace openage::event 20 | -------------------------------------------------------------------------------- /libopenage/gamestate/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | definitions.cpp 3 | entity_factory.cpp 4 | game_entity.cpp 5 | game_state.cpp 6 | game.cpp 7 | manager.cpp 8 | map.cpp 9 | player.cpp 10 | simulation.cpp 11 | terrain_chunk.cpp 12 | terrain_factory.cpp 13 | terrain_tile.cpp 14 | terrain.cpp 15 | types.cpp 16 | world.cpp 17 | universe.cpp 18 | ) 19 | 20 | add_subdirectory(activity/) 21 | add_subdirectory(api/) 22 | add_subdirectory(component/) 23 | add_subdirectory(demo/) 24 | add_subdirectory(event/) 25 | add_subdirectory(system/) 26 | -------------------------------------------------------------------------------- /libopenage/gamestate/activity/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | activity.cpp 3 | end_node.cpp 4 | node.cpp 5 | start_node.cpp 6 | task_node.cpp 7 | task_system_node.cpp 8 | tests.cpp 9 | types.cpp 10 | xor_event_gate.cpp 11 | xor_gate.cpp 12 | ) 13 | 14 | add_subdirectory("event") 15 | add_subdirectory("condition") 16 | -------------------------------------------------------------------------------- /libopenage/gamestate/activity/condition/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | command_in_queue.cpp 3 | next_command.cpp 4 | ) 5 | -------------------------------------------------------------------------------- /libopenage/gamestate/activity/end_node.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "end_node.h" 4 | 5 | #include "error/error.h" 6 | #include "log/message.h" 7 | 8 | 9 | namespace openage::gamestate::activity { 10 | 11 | EndNode::EndNode(node_id_t id, 12 | node_label_t label) : 13 | Node{id, label, {}} { 14 | } 15 | 16 | } // namespace openage::gamestate::activity 17 | -------------------------------------------------------------------------------- /libopenage/gamestate/activity/event/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | command_in_queue.cpp 3 | wait.cpp 4 | ) 5 | -------------------------------------------------------------------------------- /libopenage/gamestate/activity/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | 6 | namespace openage::gamestate::activity { 7 | 8 | } // namespace openage::gamestate::activity 9 | -------------------------------------------------------------------------------- /libopenage/gamestate/activity/types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | namespace openage::gamestate::activity { 7 | 8 | /** 9 | * Node types in the flow graph. 10 | */ 11 | enum class node_t { 12 | START, 13 | END, 14 | XOR_EVENT_GATE, 15 | XOR_GATE, 16 | TASK_CUSTOM, 17 | TASK_SYSTEM, 18 | }; 19 | 20 | } // namespace openage::gamestate::activity 21 | -------------------------------------------------------------------------------- /libopenage/gamestate/api/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | ability.cpp 3 | activity.cpp 4 | animation.cpp 5 | definitions.cpp 6 | patch.cpp 7 | player_setup.cpp 8 | property.cpp 9 | sound.cpp 10 | terrain.cpp 11 | types.cpp 12 | util.cpp 13 | ) 14 | -------------------------------------------------------------------------------- /libopenage/gamestate/api/definitions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "definitions.h" 4 | 5 | namespace openage::gamestate::api { 6 | 7 | // this file is intended to be empty 8 | 9 | } // namespace openage::gamestate::api 10 | -------------------------------------------------------------------------------- /libopenage/gamestate/api/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | namespace openage::gamestate::api { 6 | 7 | // this file is intended to be empty 8 | 9 | } // namespace openage::gamestate::api 10 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | api_component.cpp 3 | base_component.cpp 4 | internal_component.cpp 5 | types.cpp 6 | ) 7 | 8 | add_subdirectory(api/) 9 | add_subdirectory(internal/) 10 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | idle.cpp 3 | live.cpp 4 | move.cpp 5 | selectable.cpp 6 | turn.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/idle.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "idle.h" 4 | 5 | #include "gamestate/component/types.h" 6 | 7 | namespace openage::gamestate::component { 8 | 9 | component_t Idle::get_type() const { 10 | return component_t::IDLE; 11 | } 12 | 13 | } // namespace openage::gamestate::component 14 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/idle.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "gamestate/component/api_component.h" 6 | #include "gamestate/component/types.h" 7 | 8 | namespace openage::gamestate::component { 9 | 10 | class Idle final : public APIComponent { 11 | public: 12 | using APIComponent::APIComponent; 13 | 14 | component_t get_type() const override; 15 | }; 16 | 17 | } // namespace openage::gamestate::component 18 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/move.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "move.h" 4 | 5 | #include "gamestate/component/types.h" 6 | 7 | 8 | namespace openage::gamestate::component { 9 | 10 | component_t Move::get_type() const { 11 | return component_t::MOVE; 12 | } 13 | 14 | } // namespace openage::gamestate::component 15 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/move.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "gamestate/component/api_component.h" 6 | #include "gamestate/component/types.h" 7 | 8 | 9 | namespace openage::gamestate::component { 10 | 11 | class Move final : public APIComponent { 12 | public: 13 | using APIComponent::APIComponent; 14 | 15 | component_t get_type() const override; 16 | }; 17 | 18 | } // namespace openage::gamestate::component 19 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/selectable.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "selectable.h" 4 | 5 | 6 | namespace openage::gamestate::component { 7 | 8 | component_t Selectable::get_type() const { 9 | return component_t::SELECTABLE; 10 | } 11 | 12 | } // namespace openage::gamestate::component 13 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/selectable.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #include "gamestate/component/api_component.h" 8 | #include "gamestate/component/types.h" 9 | 10 | 11 | namespace openage::gamestate::component { 12 | 13 | class Selectable final : public APIComponent { 14 | public: 15 | using APIComponent::APIComponent; 16 | 17 | component_t get_type() const override; 18 | }; 19 | 20 | } // namespace openage::gamestate::component 21 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/turn.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "turn.h" 4 | 5 | #include "gamestate/component/types.h" 6 | 7 | 8 | namespace openage::gamestate::component { 9 | 10 | component_t Turn::get_type() const { 11 | return component_t::TURN; 12 | } 13 | 14 | } // namespace openage::gamestate::component 15 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/api/turn.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #include "gamestate/component/api_component.h" 8 | #include "gamestate/component/types.h" 9 | 10 | 11 | namespace openage::gamestate::component { 12 | 13 | class Turn final : public APIComponent { 14 | public: 15 | using APIComponent::APIComponent; 16 | 17 | component_t get_type() const override; 18 | }; 19 | 20 | } // namespace openage::gamestate::component 21 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/base_component.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "base_component.h" 4 | 5 | namespace openage::gamestate::component { 6 | 7 | 8 | } // namespace openage::gamestate::component 9 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/base_component.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "gamestate/component/types.h" 6 | 7 | namespace openage::gamestate::component { 8 | 9 | /** 10 | * Interface for components. 11 | */ 12 | class Component { 13 | public: 14 | virtual ~Component() = default; 15 | 16 | /** 17 | * Get the component type of the component. 18 | * 19 | * @return Component type of the component. 20 | */ 21 | virtual component_t get_type() const = 0; 22 | }; 23 | 24 | } // namespace openage::gamestate::component 25 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | activity.cpp 3 | command_queue.cpp 4 | ownership.cpp 5 | position.cpp 6 | ) 7 | 8 | add_subdirectory(commands/) 9 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | base_command.cpp 3 | custom.cpp 4 | idle.cpp 5 | move.cpp 6 | types.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/base_command.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "base_command.h" 4 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/base_command.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "gamestate/component/internal/commands/types.h" 6 | 7 | 8 | namespace openage::gamestate::component::command { 9 | 10 | /** 11 | * Base interface for commands. 12 | */ 13 | class Command { 14 | public: 15 | virtual ~Command() = default; 16 | 17 | /** 18 | * Get the type of the command. 19 | * 20 | * @return Command type. 21 | */ 22 | virtual command_t get_type() const = 0; 23 | }; 24 | 25 | } // namespace openage::gamestate::component::command 26 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/custom.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "custom.h" 4 | 5 | 6 | namespace openage::gamestate::component::command { 7 | 8 | CustomCommand::CustomCommand(const std::string &id) : 9 | id{id} {} 10 | 11 | 12 | } // namespace openage::gamestate::component::command 13 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/idle.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "idle.h" 4 | 5 | 6 | namespace openage::gamestate::component::command { 7 | 8 | // this file is intended to be empty 9 | 10 | } // namespace openage::gamestate::component::command 11 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/move.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "move.h" 4 | 5 | 6 | namespace openage::gamestate::component::command { 7 | 8 | MoveCommand::MoveCommand(const coord::phys3 &target) : 9 | target{target} {} 10 | 11 | const coord::phys3 &MoveCommand::get_target() const { 12 | return this->target; 13 | } 14 | 15 | } // namespace openage::gamestate::component::command 16 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | 6 | namespace openage::gamestate::component::command { 7 | 8 | // this file is intended to be empty 9 | 10 | } // namespace openage::gamestate::component::command 11 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal/commands/types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | namespace openage::gamestate::component::command { 7 | 8 | /** 9 | * Command types. 10 | */ 11 | enum class command_t { 12 | NONE, 13 | 14 | CUSTOM, 15 | IDLE, 16 | MOVE, 17 | }; 18 | 19 | } // namespace openage::gamestate::component::command 20 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal_component.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "internal_component.h" 4 | 5 | namespace openage::gamestate::component { 6 | 7 | 8 | } // namespace openage::gamestate::component 9 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/internal_component.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "gamestate/component/base_component.h" 6 | 7 | namespace openage::gamestate::component { 8 | 9 | /** 10 | * Interface for components that track ingame information about 11 | * a game entity, but don't use information from the nyan API. 12 | */ 13 | class InternalComponent : public Component {}; 14 | 15 | } // namespace openage::gamestate::component 16 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | namespace openage::gamestate::component { 6 | 7 | 8 | } // namespace openage::gamestate::component 9 | -------------------------------------------------------------------------------- /libopenage/gamestate/component/types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | namespace openage::gamestate::component { 7 | 8 | /** 9 | * Types of components. 10 | */ 11 | enum class component_t { 12 | // Internal 13 | POSITION, 14 | COMMANDQUEUE, 15 | OWNERSHIP, 16 | ACTIVITY, 17 | 18 | // API 19 | IDLE, 20 | TURN, 21 | MOVE, 22 | SELECTABLE, 23 | LIVE 24 | }; 25 | 26 | } // namespace openage::gamestate::component 27 | -------------------------------------------------------------------------------- /libopenage/gamestate/definitions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "definitions.h" 4 | 5 | namespace openage::gamestate { 6 | 7 | } // namespace openage::gamestate 8 | -------------------------------------------------------------------------------- /libopenage/gamestate/definitions.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "coord/phys.h" 6 | 7 | /** 8 | * Hardcoded definitions for parameters used in the gamestate. 9 | * 10 | * May be moved to configuration files in the future. 11 | */ 12 | namespace openage::gamestate { 13 | 14 | /** 15 | * Origin point of the game world. 16 | */ 17 | constexpr coord::phys3 WORLD_ORIGIN = coord::phys3{0, 0, 0}; 18 | 19 | } // namespace openage::gamestate 20 | -------------------------------------------------------------------------------- /libopenage/gamestate/demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | demo_0.cpp 3 | tests.cpp 4 | ) 5 | 6 | pxdgen( 7 | tests.h 8 | ) 9 | -------------------------------------------------------------------------------- /libopenage/gamestate/demo/demo_0.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | 8 | namespace openage::gamestate::tests { 9 | 10 | /** 11 | * Show the initialization of a game instance. 12 | */ 13 | void simulation_demo_0(const util::Path &path); 14 | 15 | } // namespace openage::gamestate::tests 16 | -------------------------------------------------------------------------------- /libopenage/gamestate/demo/tests.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "tests.h" 4 | 5 | #include "log/log.h" 6 | #include "log/message.h" 7 | 8 | #include "gamestate/demo/demo_0.h" 9 | 10 | 11 | namespace openage::gamestate::tests { 12 | 13 | void simulation_demo(int demo_id, const util::Path &path) { 14 | switch (demo_id) { 15 | case 0: 16 | simulation_demo_0(path); 17 | break; 18 | 19 | default: 20 | log::log(MSG(err) << "Unknown renderer demo requested: " << demo_id << "."); 21 | break; 22 | } 23 | } 24 | 25 | } // namespace openage::gamestate::tests 26 | -------------------------------------------------------------------------------- /libopenage/gamestate/demo/tests.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "../../util/compiler.h" 6 | // pxd: from libopenage.util.path cimport Path 7 | 8 | 9 | namespace openage { 10 | namespace util { 11 | class Path; 12 | } // namespace util 13 | 14 | namespace gamestate::tests { 15 | 16 | // pxd: void simulation_demo(int demo_id, Path path) except + 17 | OAAPI void simulation_demo(int demo_id, const util::Path &path); 18 | 19 | } // namespace gamestate::tests 20 | } // namespace openage 21 | -------------------------------------------------------------------------------- /libopenage/gamestate/event/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | drag_select.cpp 3 | process_command.cpp 4 | send_command.cpp 5 | spawn_entity.cpp 6 | wait.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/gamestate/system/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | activity.cpp 3 | idle.cpp 4 | move.cpp 5 | types.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /libopenage/gamestate/system/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | 6 | namespace openage::gamestate::system { 7 | 8 | // this file is intended to be empty 9 | 10 | } // namespace openage::gamestate::system 11 | -------------------------------------------------------------------------------- /libopenage/gamestate/system/types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | namespace openage::gamestate::system { 7 | 8 | /** 9 | * Associates a system function with an identifier. 10 | */ 11 | enum class system_id_t { 12 | NONE, 13 | 14 | IDLE, 15 | 16 | MOVE_COMMAND, 17 | MOVE_DEFAULT, 18 | 19 | ACTIVITY_ADVANCE, 20 | }; 21 | 22 | } // namespace openage::gamestate::system 23 | -------------------------------------------------------------------------------- /libopenage/gamestate/terrain_tile.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "terrain_tile.h" 4 | 5 | 6 | namespace openage::gamestate { 7 | 8 | // This file is intentionally empty. 9 | 10 | } // namespace openage::gamestate 11 | -------------------------------------------------------------------------------- /libopenage/gamestate/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | namespace openage::gamestate { 6 | 7 | } // namespace openage::gamestate 8 | -------------------------------------------------------------------------------- /libopenage/gamestate/types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage::gamestate { 8 | 9 | /** 10 | * Game entity IDs. 11 | */ 12 | using entity_id_t = uint64_t; 13 | 14 | /** 15 | * Player IDs. 16 | */ 17 | using player_id_t = uint64_t; 18 | 19 | } // namespace openage::gamestate 20 | -------------------------------------------------------------------------------- /libopenage/input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | action.cpp 3 | event.cpp 4 | input_context.cpp 5 | input_manager.cpp 6 | tests.cpp 7 | text_to_event.cpp 8 | ) 9 | 10 | add_subdirectory("controller") 11 | -------------------------------------------------------------------------------- /libopenage/input/action.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "input/action.h" 4 | 5 | namespace openage::input { 6 | 7 | } // namespace openage::input 8 | -------------------------------------------------------------------------------- /libopenage/input/controller/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory("camera") 2 | add_subdirectory("game") 3 | add_subdirectory("hud") 4 | -------------------------------------------------------------------------------- /libopenage/input/controller/camera/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | binding_context.cpp 3 | binding.cpp 4 | controller.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/input/controller/camera/binding.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "binding.h" 4 | 5 | namespace openage::input::camera { 6 | 7 | } // namespace openage::input::camera 8 | -------------------------------------------------------------------------------- /libopenage/input/controller/game/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | binding_context.cpp 3 | binding.cpp 4 | controller.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/input/controller/game/binding.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "binding.h" 4 | 5 | namespace openage::input::game { 6 | 7 | } // namespace openage::input::game 8 | -------------------------------------------------------------------------------- /libopenage/input/controller/hud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | binding_context.cpp 3 | binding.cpp 4 | controller.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/input/controller/hud/binding.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "binding.h" 4 | 5 | namespace openage::input::hud { 6 | 7 | } // namespace openage::input::hud 8 | -------------------------------------------------------------------------------- /libopenage/input/text_to_event.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #include "input/event.h" 8 | 9 | namespace openage::input { 10 | 11 | /** 12 | * Convert a string to an event. 13 | * 14 | * TODO: Mouse/Wheel/GUI events 15 | * 16 | * @throws if the string is not a valid event. 17 | */ 18 | Event text_to_event(const std::string &event_str); 19 | 20 | } // namespace openage::input 21 | -------------------------------------------------------------------------------- /libopenage/job/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | job_group.cpp 3 | job_manager.cpp 4 | tests.cpp 5 | worker.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /libopenage/job/job_aborted_exception.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage { 8 | namespace job { 9 | 10 | /** An exception that is thrown when a job wants to abort itself. */ 11 | class JobAbortedException : public std::exception { 12 | public: 13 | const char *what() const noexcept override { 14 | return "job aborted"; 15 | } 16 | }; 17 | 18 | } // namespace job 19 | } // namespace openage 20 | -------------------------------------------------------------------------------- /libopenage/job/job_group.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "job_group.h" 4 | 5 | namespace openage::job { 6 | 7 | JobGroup::JobGroup() 8 | : 9 | JobGroup{nullptr} { 10 | } 11 | 12 | JobGroup::JobGroup(Worker *parent_worker) 13 | : 14 | parent_worker{parent_worker} { 15 | } 16 | 17 | } // namespace openage::job 18 | -------------------------------------------------------------------------------- /libopenage/log/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | file_logsink.cpp 3 | level.cpp 4 | log.cpp 5 | logsink.cpp 6 | logsource.cpp 7 | message.cpp 8 | named_logsource.cpp 9 | stdout_logsink.cpp 10 | test.cpp 11 | ) 12 | 13 | pxdgen( 14 | level.h 15 | log.h 16 | logsource.h 17 | named_logsource.h 18 | message.h 19 | ) 20 | -------------------------------------------------------------------------------- /libopenage/log/file_logsink.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #include "logsink.h" 8 | 9 | namespace openage { 10 | namespace log { 11 | class LogSource; 12 | struct message; 13 | 14 | class FileSink : public LogSink { 15 | public: 16 | FileSink(const char *filename, bool append); 17 | 18 | private: 19 | virtual void output_log_message(const message &msg, LogSource *source) override; 20 | 21 | std::ofstream outfile; 22 | }; 23 | 24 | } // namespace log 25 | } // namespace openage 26 | -------------------------------------------------------------------------------- /libopenage/log/level.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "level.h" 4 | 5 | namespace openage { 6 | 7 | namespace log { 8 | 9 | static constexpr level_value undefined {{"UNDEFINED", 999}, "5"}; 10 | 11 | level::level() : Enum{undefined} {} 12 | 13 | }} // openage::log 14 | -------------------------------------------------------------------------------- /libopenage/log/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "log.h" 4 | 5 | #include "log/named_logsource.h" 6 | #include "log/stdout_logsink.h" 7 | 8 | 9 | namespace openage { 10 | namespace log { 11 | 12 | 13 | void log(const message &msg) { 14 | general_source().log(msg); 15 | } 16 | 17 | 18 | void set_level(level lvl) { 19 | global_stdoutsink().set_loglevel(lvl); 20 | } 21 | 22 | 23 | } // namespace log 24 | } // namespace openage 25 | -------------------------------------------------------------------------------- /libopenage/log/named_logsource.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "named_logsource.h" 4 | 5 | #include 6 | 7 | namespace openage::log { 8 | 9 | 10 | NamedLogSource::NamedLogSource(std::string name) 11 | : 12 | name{std::move(name)} {} 13 | 14 | 15 | std::string NamedLogSource::logsource_name() { 16 | return this->name; 17 | } 18 | 19 | 20 | NamedLogSource &general_source() { 21 | static NamedLogSource value{"general"}; 22 | return value; 23 | } 24 | 25 | 26 | } // namespace openage::log 27 | -------------------------------------------------------------------------------- /libopenage/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | tests.cpp 3 | ) 4 | 5 | pxdgen( 6 | tests.h 7 | ) 8 | 9 | add_subdirectory("demo") 10 | -------------------------------------------------------------------------------- /libopenage/main/demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory("pong") 2 | add_subdirectory("presenter") 3 | add_subdirectory("interactive") 4 | -------------------------------------------------------------------------------- /libopenage/main/demo/interactive/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | interactive.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/main/demo/interactive/interactive.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | 8 | namespace openage::main::tests::interactive { 9 | 10 | void demo(const util::Path &path); 11 | 12 | } // namespace openage::main::tests::interactive 13 | -------------------------------------------------------------------------------- /libopenage/main/demo/pong/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | aicontroller.cpp 3 | gamestate.cpp 4 | gui.cpp 5 | physics.cpp 6 | pong.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/main/demo/pong/aicontroller.h: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "main/demo/pong/gamestate.h" 6 | 7 | 8 | namespace openage::main::tests::pong { 9 | 10 | std::vector get_ai_inputs( 11 | const std::shared_ptr &player, 12 | const std::shared_ptr &ball, 13 | const std::shared_ptr> &area_size, 14 | const time::time_t &now, 15 | bool right_player); 16 | 17 | } // namespace openage::main::tests::pong 18 | -------------------------------------------------------------------------------- /libopenage/main/demo/pong/pong.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | 8 | namespace openage::main::tests::pong { 9 | 10 | /** 11 | * Run pong, the non-terminal variant. 12 | */ 13 | void main(const util::Path &path); 14 | 15 | 16 | } // namespace openage::main::tests::pong 17 | -------------------------------------------------------------------------------- /libopenage/main/demo/presenter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | presenter.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/main/demo/presenter/presenter.h: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | 8 | namespace openage::main::tests::presenter { 9 | 10 | void demo(const util::Path &path); 11 | 12 | } // namespace openage::main::tests::presenter 13 | -------------------------------------------------------------------------------- /libopenage/main/tests.h: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "../util/compiler.h" 6 | // pxd: from libopenage.util.path cimport Path 7 | 8 | 9 | namespace openage { 10 | namespace util { 11 | class Path; 12 | } // namespace util 13 | 14 | namespace main::tests { 15 | 16 | // pxd: void engine_demo(int demo_id, Path path) except + 17 | OAAPI void engine_demo(int demo_id, const util::Path &path); 18 | 19 | } // namespace main::tests 20 | } // namespace openage 21 | -------------------------------------------------------------------------------- /libopenage/pathfinding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | cost_field.cpp 3 | definitions.cpp 4 | field_cache.cpp 5 | flow_field.cpp 6 | grid.cpp 7 | integration_field.cpp 8 | integrator.cpp 9 | path.cpp 10 | pathfinder.cpp 11 | portal.cpp 12 | sector.cpp 13 | tests.cpp 14 | types.cpp 15 | ) 16 | 17 | add_subdirectory("demo") 18 | add_subdirectory("legacy") 19 | -------------------------------------------------------------------------------- /libopenage/pathfinding/definitions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | 6 | namespace openage::path { 7 | 8 | // this file is intentionally empty 9 | 10 | } // namespace openage::path 11 | -------------------------------------------------------------------------------- /libopenage/pathfinding/demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | demo_0.cpp 3 | demo_1.cpp 4 | tests.cpp 5 | ) 6 | 7 | pxdgen( 8 | tests.h 9 | ) 10 | -------------------------------------------------------------------------------- /libopenage/pathfinding/demo/tests.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "../../util/compiler.h" 6 | // pxd: from libopenage.util.path cimport Path 7 | 8 | 9 | namespace openage { 10 | namespace util { 11 | class Path; 12 | } // namespace util 13 | 14 | namespace path::tests { 15 | 16 | // pxd: void path_demo(int demo_id, Path path) except + 17 | OAAPI void path_demo(int demo_id, const util::Path &path); 18 | 19 | } // namespace path::tests 20 | } // namespace openage 21 | -------------------------------------------------------------------------------- /libopenage/pathfinding/legacy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | a_star.cpp 3 | heuristics.cpp 4 | path.cpp 5 | tests.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /libopenage/pathfinding/legacy/path_utils.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | namespace openage { 6 | namespace path::legacy { 7 | 8 | } // namespace path 9 | } // namespace openage 10 | -------------------------------------------------------------------------------- /libopenage/pathfinding/path.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "path.h" 4 | 5 | 6 | namespace openage::path { 7 | 8 | // this file is intentionally empty 9 | 10 | } // namespace openage::path 11 | -------------------------------------------------------------------------------- /libopenage/pathfinding/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | 6 | namespace openage::path { 7 | 8 | // this file is intentionally empty 9 | 10 | } // namespace openage::path 11 | -------------------------------------------------------------------------------- /libopenage/presenter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | presenter.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/pyinterface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | exctranslate.cpp 3 | exctranslate_tests.cpp 4 | defs.cpp 5 | functional.cpp 6 | hacks.cpp 7 | pyexception.cpp 8 | pyobject.cpp 9 | pyobject_tests.cpp 10 | setup.cpp 11 | ) 12 | 13 | pxdgen( 14 | exctranslate.h 15 | exctranslate_tests.h 16 | defs.h 17 | functional.h 18 | hacks.h 19 | pyexception.h 20 | pyobject.h 21 | setup.h 22 | ) 23 | -------------------------------------------------------------------------------- /libopenage/pyinterface/defs.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "defs.h" 4 | 5 | 6 | namespace openage { 7 | namespace pyinterface { 8 | 9 | }} // openage::pyinterface 10 | -------------------------------------------------------------------------------- /libopenage/pyinterface/defs.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | // we want to avoid the Python.h import, 6 | // we only need the prototype anyway. 7 | #ifndef Py_OBJECT_H 8 | // pxd: from cpython.ref cimport PyObject 9 | extern "C" { 10 | typedef struct _object PyObject; 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /libopenage/pyinterface/functional.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "functional.h" 4 | 5 | namespace openage { 6 | namespace pyinterface { 7 | 8 | 9 | }} // openage::pyinterface 10 | -------------------------------------------------------------------------------- /libopenage/pyinterface/hacks.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "hacks.h" 4 | 5 | /* 6 | * hacks.h is mainly for inclusion by Cython; 7 | * 8 | * This file exists to test whether hacks.h compiles properly. 9 | * Otherwise, Cython might incorrectly receive the blame for C++ errors. 10 | */ 11 | -------------------------------------------------------------------------------- /libopenage/pyinterface/pyobject_tests.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | namespace openage { 6 | namespace pyinterface { 7 | namespace tests { 8 | 9 | void pyobject(); 10 | void pyobject_demo(); 11 | 12 | } // namespace tests 13 | } // namespace pyinterface 14 | } // namespace openage 15 | -------------------------------------------------------------------------------- /libopenage/renderer/camera/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | boundaries.cpp 3 | camera.cpp 4 | definitions.cpp 5 | frustum_2d.cpp 6 | frustum_3d.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/renderer/camera/boundaries.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "boundaries.h" 4 | 5 | 6 | namespace openage::renderer::camera { 7 | 8 | 9 | } // namespace openage::renderer::camera 10 | -------------------------------------------------------------------------------- /libopenage/renderer/camera/definitions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "definitions.h" 4 | 5 | namespace openage::renderer::camera { 6 | 7 | // this file is intentionally empty 8 | 9 | } // namespace openage::renderer::camera 10 | -------------------------------------------------------------------------------- /libopenage/renderer/definitions.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "definitions.h" 4 | 5 | namespace openage::renderer { 6 | 7 | } // namespace openage::renderer 8 | -------------------------------------------------------------------------------- /libopenage/renderer/demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | demo_0.cpp 3 | demo_1.cpp 4 | demo_2.cpp 5 | demo_3.cpp 6 | demo_4.cpp 7 | demo_5.cpp 8 | demo_6.cpp 9 | demo_7.cpp 10 | stresstest_0.cpp 11 | stresstest_1.cpp 12 | tests.cpp 13 | util.cpp 14 | ) 15 | 16 | pxdgen( 17 | tests.h 18 | ) 19 | -------------------------------------------------------------------------------- /libopenage/renderer/demo/demo_0.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | namespace openage::renderer::tests { 8 | 9 | /** 10 | * Show the window creation functionality of the level 1 renderer: 11 | * - Window creation 12 | * - Loading shaders 13 | * - Creating a render pass 14 | * - Creating a renderable from a mesh 15 | * 16 | * @param path Path to the project rootdir. 17 | */ 18 | void renderer_demo_0(const util::Path &path); 19 | 20 | } // namespace openage::renderer::tests 21 | -------------------------------------------------------------------------------- /libopenage/renderer/demo/demo_5.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | namespace openage::renderer::tests { 8 | 9 | /** 10 | * Show the usage of uniform buffers in the renderer. 11 | * - Window creation 12 | * - Loading shaders 13 | * - Vertex data and mesh creation 14 | * - Uniform buffer assignment 15 | * - Uniform buffer update 16 | * 17 | * @param path Path to the openage asset directory. 18 | */ 19 | void renderer_demo_5(const util::Path &path); 20 | 21 | } // namespace openage::renderer::tests 22 | -------------------------------------------------------------------------------- /libopenage/renderer/demo/stresstest_0.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | 8 | namespace openage::renderer::tests { 9 | 10 | /** 11 | * Stresstest for the renderer. 12 | * 13 | * @param path Path to the openage asset directory. 14 | */ 15 | void renderer_stresstest_0(const util::Path &path); 16 | 17 | } // namespace openage::renderer::tests 18 | -------------------------------------------------------------------------------- /libopenage/renderer/demo/stresstest_1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "util/path.h" 6 | 7 | namespace openage::renderer::tests { 8 | 9 | /** 10 | * Stresstest for the renderer's frustum culling feature. 11 | * 12 | * @param path Path to the openage asset directory. 13 | */ 14 | void renderer_stresstest_1(const util::Path &path); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /libopenage/renderer/demo/util.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "util.h" 4 | 5 | #include "renderer/uniform_input.h" 6 | 7 | 8 | namespace openage::renderer::tests { 9 | 10 | bool check_uniform_completeness(const std::vector &renderables) { 11 | // Iterate over each renderable object 12 | for (const auto &renderable : renderables) { 13 | if (renderable.uniform and not renderable.uniform->is_complete()) { 14 | return false; 15 | } 16 | } 17 | 18 | return true; 19 | } 20 | 21 | } // namespace openage::renderer::tests 22 | -------------------------------------------------------------------------------- /libopenage/renderer/font/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | font.cpp 3 | font_manager.cpp 4 | glyph_atlas.cpp 5 | 6 | tests.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/renderer/geometry.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "geometry.h" 4 | 5 | 6 | namespace openage { 7 | namespace renderer { 8 | 9 | Geometry::Geometry(geometry_t type) 10 | : type(type) {} 11 | 12 | geometry_t Geometry::get_type() const { 13 | return this->type; 14 | } 15 | 16 | void Geometry::update_verts(const std::vector& verts) { 17 | this->update_verts_offset(verts, 0); 18 | } 19 | 20 | }} //openage::renderer 21 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | gui.cpp 3 | ) 4 | 5 | add_subdirectory("guisys") 6 | add_subdirectory("integration") 7 | 8 | add_sources(libopenage 9 | ${QTGUI_SOURCES} 10 | ) 11 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/link/gui_item.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "gui_item.h" 4 | 5 | 6 | namespace qtgui { 7 | 8 | 9 | QString name_tidier(const char *name) { 10 | QString cleaner_name = QString::fromLatin1(name); 11 | cleaner_name.remove(QRegularExpression("qtgui|PersistentCoreHolder")); 12 | return cleaner_name; 13 | } 14 | 15 | GuiItemQObject::GuiItemQObject(QObject *parent) : 16 | QObject{parent}, 17 | GuiItemBase{} { 18 | } 19 | 20 | } // namespace qtgui 21 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/link/gui_property_map_impl.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | 8 | namespace qtgui { 9 | 10 | class GuiPropertyMapImpl : public QObject { 11 | Q_OBJECT 12 | 13 | public: 14 | GuiPropertyMapImpl(); 15 | virtual ~GuiPropertyMapImpl(); 16 | 17 | signals: 18 | void property_changed(const QByteArray &name, const QVariant &value); 19 | 20 | private: 21 | virtual bool event(QEvent *e) override; 22 | }; 23 | 24 | } // namespace qtgui 25 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/link/gui_singleton_item.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "gui_singleton_item.h" 4 | 5 | 6 | namespace qtgui { 7 | 8 | GuiSingletonItem::GuiSingletonItem(QObject *parent) : 9 | QObject{parent}, 10 | GuiItemLink{} { 11 | } 12 | 13 | GuiSingletonItem::~GuiSingletonItem() = default; 14 | 15 | } // namespace qtgui 16 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/link/gui_singleton_item.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #include "renderer/gui/guisys/link/gui_item_link.h" 8 | 9 | 10 | namespace qtgui { 11 | 12 | class GuiSingletonItem : public QObject 13 | , public GuiItemLink { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit GuiSingletonItem(QObject *parent = nullptr); 18 | virtual ~GuiSingletonItem(); 19 | }; 20 | 21 | } // namespace qtgui 22 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/link/qtgui_checked_static_cast.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | 8 | namespace qtgui { 9 | 10 | template 11 | T checked_static_cast(U *u) { 12 | assert(dynamic_cast(u)); 13 | return static_cast(u); 14 | } 15 | 16 | } // namespace qtgui 17 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/public/gui_application.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2022 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace qtgui { 8 | 9 | class GuiApplicationImpl; 10 | 11 | /** 12 | * Houses gui logic event queue. 13 | */ 14 | class GuiApplication { 15 | public: 16 | GuiApplication(); 17 | GuiApplication(std::shared_ptr application); 18 | ~GuiApplication(); 19 | 20 | void process_events(); 21 | 22 | private: 23 | std::shared_ptr application; 24 | }; 25 | 26 | } // namespace qtgui 27 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/public/gui_engine.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2022 the openage authors. See copying.md for legal info. 2 | 3 | #include "renderer/gui/guisys/public/gui_engine.h" 4 | 5 | #include "renderer/gui/guisys/private/gui_engine_impl.h" 6 | 7 | namespace qtgui { 8 | 9 | GuiQmlEngine::GuiQmlEngine(std::shared_ptr renderer) : 10 | impl{std::make_unique(renderer)} { 11 | } 12 | 13 | GuiQmlEngine::~GuiQmlEngine() = default; 14 | 15 | } // namespace qtgui 16 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/guisys/public/gui_input.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "gui_input.h" 4 | 5 | #include "renderer/gui/guisys/private/gui_input_impl.h" 6 | 7 | namespace qtgui { 8 | 9 | GuiInput::GuiInput(const std::shared_ptr &renderer) : 10 | impl{std::make_unique(renderer)} { 11 | } 12 | 13 | 14 | bool GuiInput::process(const std::shared_ptr &event) { 15 | return this->impl->process(event); 16 | } 17 | 18 | } // namespace qtgui 19 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/integration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory("private") 2 | add_subdirectory("public") 3 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/integration/private/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | gui_filled_texture_handles.cpp 3 | gui_log.cpp 4 | gui_make_standalone_subtexture.cpp 5 | gui_standalone_subtexture.cpp 6 | gui_texture.cpp 7 | gui_texture_handle.cpp 8 | ) 9 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/integration/private/gui_log.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2022 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage::renderer::gui { 8 | 9 | void gui_log(QtMsgType type, const QMessageLogContext &context, const QString &msg); 10 | 11 | } // namespace openage::renderer::gui 12 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/integration/private/gui_make_standalone_subtexture.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "gui_make_standalone_subtexture.h" 4 | 5 | #include "renderer/gui/integration/private/gui_standalone_subtexture.h" 6 | 7 | 8 | namespace openage::renderer::gui { 9 | 10 | std::unique_ptr make_standalone_subtexture(GLuint id, const QSize &size) { 11 | return std::make_unique(id, size); 12 | } 13 | 14 | } // namespace openage::renderer::gui 15 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/integration/public/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | gui_application_with_logger.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/renderer/gui/integration/public/gui_application_with_logger.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2022 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include "../../guisys/public/gui_application.h" 6 | 7 | namespace openage::renderer::gui { 8 | 9 | /** 10 | * Houses gui logic event queue and attaches to game logger. 11 | */ 12 | class GuiApplicationWithLogger : public qtgui::GuiApplication { 13 | public: 14 | GuiApplicationWithLogger(); 15 | ~GuiApplicationWithLogger(); 16 | }; 17 | 18 | } // namespace openage::renderer::gui 19 | -------------------------------------------------------------------------------- /libopenage/renderer/opengl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | buffer.cpp 3 | context.cpp 4 | debug.cpp 5 | error.cpp 6 | framebuffer.cpp 7 | geometry.cpp 8 | render_pass.cpp 9 | render_target.cpp 10 | renderer.cpp 11 | shader.cpp 12 | shader_data.cpp 13 | shader_program.cpp 14 | simple_object.cpp 15 | texture.cpp 16 | texture_array.cpp 17 | uniform_buffer.cpp 18 | uniform_input.cpp 19 | util.cpp 20 | vertex_array.cpp 21 | window.cpp 22 | ) 23 | -------------------------------------------------------------------------------- /libopenage/renderer/opengl/error.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | namespace openage::renderer::opengl { 6 | 7 | /** 8 | * query the current opengl context for any errors. 9 | * 10 | * raises exceptions on any error. 11 | */ 12 | void gl_check_error(); 13 | 14 | } // namespace openage::renderer::opengl 15 | -------------------------------------------------------------------------------- /libopenage/renderer/opengl/shader_data.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "shader_data.h" 4 | 5 | 6 | namespace openage::renderer::opengl { 7 | 8 | // this file is intentionally empty 9 | 10 | } // namespace openage::renderer::opengl 11 | -------------------------------------------------------------------------------- /libopenage/renderer/opengl/util.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "util.h" 4 | 5 | namespace openage::renderer::opengl { 6 | 7 | } // namespace openage::renderer::opengl 8 | -------------------------------------------------------------------------------- /libopenage/renderer/render_target.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "render_target.h" 4 | 5 | 6 | namespace openage::renderer { 7 | 8 | } // namespace openage::renderer 9 | -------------------------------------------------------------------------------- /libopenage/renderer/renderable.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "renderable.h" 4 | 5 | 6 | namespace openage::renderer { 7 | 8 | } // namespace openage::renderer 9 | -------------------------------------------------------------------------------- /libopenage/renderer/renderer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2024 the openage authors. See copying.md for legal info. 2 | 3 | #include "renderer.h" 4 | 5 | namespace openage::renderer { 6 | 7 | } // namespace openage::renderer 8 | -------------------------------------------------------------------------------- /libopenage/renderer/resources/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | buffer_info.cpp 3 | frame_timing.cpp 4 | mesh_data.cpp 5 | palette_info.cpp 6 | shader_source.cpp 7 | shader_template.cpp 8 | texture_data.cpp 9 | texture_info.cpp 10 | texture_subinfo.cpp 11 | ) 12 | 13 | add_subdirectory(animation/) 14 | add_subdirectory(assets/) 15 | add_subdirectory(parser/) 16 | add_subdirectory(terrain/) 17 | -------------------------------------------------------------------------------- /libopenage/renderer/resources/animation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | angle_info.cpp 3 | animation_info.cpp 4 | frame_info.cpp 5 | layer_info.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /libopenage/renderer/resources/animation/frame_info.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2021-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "frame_info.h" 4 | 5 | namespace openage::renderer::resources { 6 | 7 | FrameInfo::FrameInfo(const size_t texture_idx, 8 | const size_t subtexture_idx) : 9 | texture_idx{texture_idx}, 10 | subtexture_idx{subtexture_idx} {} 11 | 12 | size_t FrameInfo::get_texture_idx() const { 13 | return this->texture_idx; 14 | } 15 | 16 | size_t FrameInfo::get_subtexture_idx() const { 17 | return this->subtexture_idx; 18 | } 19 | 20 | } // namespace openage::renderer::resources 21 | -------------------------------------------------------------------------------- /libopenage/renderer/resources/assets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | asset_manager.cpp 3 | cache.cpp 4 | texture_manager.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/renderer/resources/parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | common.cpp 3 | parse_blendmask.cpp 4 | parse_blendtable.cpp 5 | parse_palette.cpp 6 | parse_sprite.cpp 7 | parse_terrain.cpp 8 | parse_texture.cpp 9 | ) 10 | -------------------------------------------------------------------------------- /libopenage/renderer/resources/terrain/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | blendpattern_info.cpp 3 | blendtable_info.cpp 4 | frame_info.cpp 5 | layer_info.cpp 6 | terrain_info.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/renderer/shader_program.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "shader_program.h" 4 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | render_entity.cpp 3 | ) 4 | 5 | add_subdirectory(camera/) 6 | add_subdirectory(hud/) 7 | add_subdirectory(screen/) 8 | add_subdirectory(skybox/) 9 | add_subdirectory(terrain/) 10 | add_subdirectory(world/) 11 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/camera/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | manager.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/hud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | object.cpp 3 | render_entity.cpp 4 | render_stage.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/screen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | render_stage.cpp 3 | screenshot.cpp 4 | ) 5 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/skybox/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | render_stage.cpp 3 | ) 4 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/terrain/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | chunk.cpp 3 | mesh.cpp 4 | model.cpp 5 | render_entity.cpp 6 | render_stage.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/renderer/stages/world/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | object.cpp 3 | render_entity.cpp 4 | render_stage.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/renderer/texture.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include 4 | 5 | #include "texture.h" 6 | #include "../error/error.h" 7 | 8 | 9 | namespace openage { 10 | namespace renderer { 11 | 12 | Texture2d::Texture2d(const resources::Texture2dInfo& info) 13 | : info(info) {} 14 | 15 | Texture2d::~Texture2d() = default; 16 | 17 | const resources::Texture2dInfo& Texture2d::get_info() const { 18 | return this->info; 19 | } 20 | 21 | }} // namespace openage::renderer 22 | -------------------------------------------------------------------------------- /libopenage/renderer/texture_array.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2018-2018 the openage authors. See copying.md for legal info. 2 | 3 | #include "texture_array.h" 4 | 5 | 6 | namespace openage { 7 | namespace renderer { 8 | 9 | Texture2dArray::Texture2dArray(const resources::Texture2dInfo& info) 10 | : layer_info(info) {} 11 | 12 | Texture2dArray::~Texture2dArray() = default; 13 | 14 | resources::Texture2dInfo const& Texture2dArray::get_info() const { 15 | return this->layer_info; 16 | } 17 | 18 | }} // namespace openage::renderer 19 | -------------------------------------------------------------------------------- /libopenage/renderer/types.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "types.h" 4 | 5 | 6 | namespace openage::renderer { 7 | 8 | // this file is intentionally empty 9 | 10 | } // namespace openage::renderer 11 | -------------------------------------------------------------------------------- /libopenage/renderer/types.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | 8 | namespace openage::renderer { 9 | 10 | /** 11 | * IDs for shader uniforms. 12 | */ 13 | using uniform_id_t = uint32_t; 14 | 15 | /** 16 | * Graphics API types. 17 | */ 18 | enum class graphics_api_t { 19 | DEFAULT, 20 | OPENGL, 21 | VULKAN, 22 | }; 23 | 24 | 25 | } // namespace openage::renderer 26 | -------------------------------------------------------------------------------- /libopenage/renderer/uniform_buffer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "uniform_buffer.h" 4 | -------------------------------------------------------------------------------- /libopenage/renderer/vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | graphics_device.cpp 3 | loader.cpp 4 | renderer.cpp 5 | windowvk.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /libopenage/renderer/vulkan/README.md: -------------------------------------------------------------------------------- 1 | # Vulkan renderer 2 | 3 | An experimental, mostly unimplemented Vulkan renderer. Can draw one triangle at best. 4 | -------------------------------------------------------------------------------- /libopenage/rng/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | rng.cpp 3 | global_rng.cpp 4 | rng_tests.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/testing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | testing.cpp 3 | benchmark_test.cpp 4 | ) 5 | 6 | pxdgen( 7 | testlist.h 8 | ) 9 | -------------------------------------------------------------------------------- /libopenage/testing/benchmark_test.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include 4 | #include 5 | 6 | namespace openage { 7 | namespace test { 8 | 9 | void benchmark() { 10 | using namespace std::chrono_literals; 11 | std::this_thread::sleep_for(1ms); 12 | } 13 | 14 | }} // openage::test 15 | -------------------------------------------------------------------------------- /libopenage/testing/testing.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "testing.h" 4 | 5 | namespace openage { 6 | namespace testing { 7 | 8 | 9 | bool fail(const log::message &msg) { 10 | throw TestError{msg}; 11 | } 12 | 13 | 14 | }} // opeange::testing 15 | -------------------------------------------------------------------------------- /libopenage/testing/testlist.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | // pxd: from libcpp.string cimport string 7 | #include 8 | 9 | #include "testing.h" 10 | 11 | 12 | namespace openage { 13 | namespace testing { 14 | 15 | 16 | /** 17 | * Invokes the test or demo with the given name. 18 | * 19 | * pxd: void run_method(string name) except + 20 | */ 21 | OAAPI void run_method(const std::string &name); 22 | 23 | 24 | } // namespace testing 25 | } // namespace openage 26 | -------------------------------------------------------------------------------- /libopenage/time/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | clock.cpp 3 | time.cpp 4 | time_loop.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /libopenage/time/time.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "time.h" 4 | 5 | 6 | namespace openage::time { 7 | 8 | // This file is intended to be empty 9 | 10 | } // namespace openage::time 11 | -------------------------------------------------------------------------------- /libopenage/util/color.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2023 the openage authors. See copying.md for legal info. 2 | 3 | #include "color.h" 4 | 5 | #include 6 | 7 | namespace openage::util { 8 | 9 | void col::use() { 10 | //TODO use glColor4b 11 | glColor4f(r / 255.f, g / 255.f, b / 255.f, a / 255.f); 12 | } 13 | 14 | void col::use(float alpha) { 15 | glColor4f(r / 255.f, g / 255.f, b / 255.f, alpha); 16 | } 17 | 18 | } // namespace openage::util 19 | -------------------------------------------------------------------------------- /libopenage/util/color.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2023 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | namespace openage { 7 | namespace util { 8 | 9 | struct col { 10 | col(unsigned r, unsigned g, unsigned b, unsigned a) : 11 | r{r}, g{g}, b{b}, a{a} {} 12 | 13 | unsigned r, g, b, a; 14 | 15 | void use(); 16 | void use(float alpha); 17 | }; 18 | 19 | } // namespace util 20 | } // namespace openage 21 | -------------------------------------------------------------------------------- /libopenage/util/compress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | lzxd.cpp 3 | ) 4 | 5 | pxdgen( 6 | lzxd.h 7 | ) 8 | -------------------------------------------------------------------------------- /libopenage/util/enum.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "enum.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | // Enum is all templated, so there's nothing to implement. 9 | 10 | }} // openage::util 11 | -------------------------------------------------------------------------------- /libopenage/util/externalprofiler.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2016 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | class ExternalProfiler { 9 | public: 10 | ExternalProfiler(); 11 | 12 | static const char *const profiling_filename; 13 | static const char *const profiling_pdf_filename; 14 | 15 | bool currently_profiling; 16 | const bool can_profile; 17 | 18 | void start(); 19 | void stop(); 20 | 21 | void show_results(); 22 | }; 23 | 24 | } // namespace util 25 | } // namespace openage 26 | -------------------------------------------------------------------------------- /libopenage/util/externalsstream.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "externalsstream.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | }} // openage::util 9 | -------------------------------------------------------------------------------- /libopenage/util/filelike/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | filelike.cpp 3 | native.cpp 4 | python.cpp 5 | ) 6 | 7 | pxdgen( 8 | filelike.h 9 | python.h 10 | ) 11 | -------------------------------------------------------------------------------- /libopenage/util/filelike/filelike.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2019 the openage authors. See copying.md for legal info. 2 | 3 | #include "filelike.h" 4 | 5 | namespace openage::util::filelike { 6 | 7 | 8 | FileLike::FileLike() = default; 9 | 10 | bool FileLike::is_python_native() const noexcept { 11 | return false; 12 | } 13 | 14 | } // openage::util::filelike 15 | -------------------------------------------------------------------------------- /libopenage/util/fixed_point.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2016-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "fixed_point.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | // FixedPoint is all templated, so there's nothing to implement. 9 | 10 | }} // openage::util 11 | -------------------------------------------------------------------------------- /libopenage/util/fslike/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_sources(libopenage 2 | directory.cpp 3 | fslike.cpp 4 | native.cpp 5 | python.cpp 6 | ) 7 | 8 | pxdgen( 9 | fslike.h 10 | python.h 11 | ) 12 | -------------------------------------------------------------------------------- /libopenage/util/fslike/native.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "native.h" 4 | 5 | 6 | namespace openage { 7 | namespace util { 8 | namespace fslike { 9 | 10 | }}} // openage::util::fslike 11 | -------------------------------------------------------------------------------- /libopenage/util/fslike/native.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | 6 | namespace openage { 7 | namespace util { 8 | namespace fslike { 9 | 10 | 11 | // TODO: at compiletime, figure out the path separator. 12 | // this is most likely a job of the buildsystem configuration. 13 | constexpr char PATHSEP = '/'; 14 | 15 | 16 | } // namespace fslike 17 | } // namespace util 18 | } // namespace openage 19 | -------------------------------------------------------------------------------- /libopenage/util/language.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "language.h" 4 | -------------------------------------------------------------------------------- /libopenage/util/math.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage { 8 | namespace math { 9 | 10 | template 11 | T square(T arg) { 12 | return arg * arg; 13 | } 14 | 15 | 16 | template 17 | T hypot3(T x, T y, T z) { 18 | return sqrt(x * x + y * y + z * z); 19 | } 20 | 21 | } // namespace math 22 | } // namespace openage 23 | -------------------------------------------------------------------------------- /libopenage/util/matrix.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "matrix.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | // Matrix is all templated, so there's nothing to implement. 9 | 10 | }} // openage::util 11 | -------------------------------------------------------------------------------- /libopenage/util/misc.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "misc.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | std::string empty_string; 9 | 10 | } // namespace util 11 | } // namespace openage 12 | -------------------------------------------------------------------------------- /libopenage/util/os.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage { 8 | 9 | /** 10 | * similar in its goals to Python's os module 11 | */ 12 | namespace os { 13 | 14 | /** 15 | * reads a symlink 16 | */ 17 | std::string read_symlink(const char *path); 18 | 19 | /** 20 | * returns openage's executable name 21 | */ 22 | std::string self_exec_filename(); 23 | 24 | /** 25 | * tries to xdg-open the file 26 | */ 27 | int execute_file(const char *path, bool background = true); 28 | 29 | } // namespace os 30 | } // namespace openage 31 | -------------------------------------------------------------------------------- /libopenage/util/pty.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #ifdef __APPLE__ 6 | #include 7 | #elif defined(__FreeBSD__) 8 | #include 9 | #include 10 | #include 11 | #include 12 | #elif _WIN32 13 | // TODO not yet implemented 14 | #else 15 | #include 16 | #endif 17 | -------------------------------------------------------------------------------- /libopenage/util/quaternion.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | #include "quaternion.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | // Quaternion is all templated, so there's nothing to implement. 9 | 10 | }} // openage::util 11 | -------------------------------------------------------------------------------- /libopenage/util/repr.h: -------------------------------------------------------------------------------- 1 | // Copyright 2017-2018 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage { 8 | namespace util { 9 | 10 | 11 | /** 12 | * method that behaves similar to python's "repr". 13 | * puts the string in quotes and escapes all sorts of stuff inside. 14 | */ 15 | std::string repr(const std::string &arg); 16 | 17 | 18 | } // namespace util 19 | } // namespace openage 20 | -------------------------------------------------------------------------------- /libopenage/util/signal.h: -------------------------------------------------------------------------------- 1 | // Copyright 2014-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | // TODO: change these to ifndef __linux ? 8 | #ifdef __APPLE__ 9 | typedef void (*sighandler_t)(int); 10 | #endif 11 | #ifdef _WIN32 12 | typedef void (*sighandler_t)(int); 13 | #endif 14 | -------------------------------------------------------------------------------- /libopenage/util/thread_id.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2024 the openage authors. See copying.md for legal info. 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace openage { 8 | namespace util { 9 | 10 | /** 11 | * Returns the unique identifier of the current thread. 12 | * 13 | * For compilers with support for thread_local storage, the function also guarantees 14 | * to return strictly monotonically increasing identifier (no collision). 15 | */ 16 | size_t get_current_thread_id(); 17 | 18 | } // namespace util 19 | } // namespace openage 20 | -------------------------------------------------------------------------------- /libopenage/util/vector.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | #include "vector.h" 4 | 5 | namespace openage { 6 | namespace util { 7 | 8 | // Vector is all templated, so there's nothing to implement. 9 | 10 | }} // openage::util 11 | -------------------------------------------------------------------------------- /libopenage/version.cpp.in: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2019 the openage authors. See copying.md for legal info. 2 | 3 | // ${AUTOGEN_WARNING} 4 | 5 | #include "version.h" 6 | 7 | namespace openage::version { 8 | 9 | const char *const version = "${VERSION_FULL_STRING}"; 10 | 11 | } // openage::version 12 | -------------------------------------------------------------------------------- /libopenage/version.h.in: -------------------------------------------------------------------------------- 1 | // Copyright 2019-2019 the openage authors. See copying.md for legal info. 2 | 3 | // ${AUTOGEN_WARNING} 4 | 5 | #pragma once 6 | 7 | namespace openage::version { 8 | 9 | extern const char *const version; 10 | 11 | } // openage::version 12 | -------------------------------------------------------------------------------- /libopenage/versions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file(compiletime.h.in compiletime.h) 2 | configure_file(compiletime.cpp.in compiletime.cpp) 3 | 4 | add_sources(libopenage 5 | ${CMAKE_CURRENT_BINARY_DIR}/compiletime.cpp 6 | versions.cpp 7 | ) 8 | 9 | pxdgen( 10 | versions.h 11 | ) 12 | -------------------------------------------------------------------------------- /libopenage/versions/compiletime.cpp.in: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | // ${AUTOGEN_WARNING} 4 | 5 | #include "compiletime.h" 6 | 7 | namespace openage::versions { 8 | 9 | const char *const engine_version = "${VERSION_FULL_STRING}"; 10 | const char *const nyan_version = "${nyan_VERSION}"; 11 | 12 | } // namespace openage::versions 13 | -------------------------------------------------------------------------------- /libopenage/versions/compiletime.h.in: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | // ${AUTOGEN_WARNING} 4 | 5 | #pragma once 6 | 7 | namespace openage::versions { 8 | 9 | extern const char *const engine_version; 10 | extern const char *const nyan_version; 11 | 12 | } // namespace openage::versions 13 | -------------------------------------------------------------------------------- /openage/.gitignore: -------------------------------------------------------------------------------- 1 | # generated by cmake 2 | /config.py 3 | # generated by cython 4 | *.cpp 5 | *.html 6 | -------------------------------------------------------------------------------- /openage/cabextract/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | lzxd.pyx 3 | cabchecksum.pyx 4 | ) 5 | 6 | add_py_modules( 7 | __init__.py 8 | cab.py 9 | lzxdstream.py 10 | test.py 11 | ) 12 | -------------------------------------------------------------------------------- /openage/cabextract/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | This package contains modules that allow extracting LZX-compressed MSCAB 5 | files (not to be confused with InstallShield CAB files, which are 6 | totally different). 7 | 8 | It allows converting media directly from the Age of Empires setup disk. 9 | """ 10 | -------------------------------------------------------------------------------- /openage/codegen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | codegen.py 4 | coord.py 5 | cpp_testlist.py 6 | listing.py 7 | main.py 8 | ) 9 | -------------------------------------------------------------------------------- /openage/codegen/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2015 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Package for C++ code generation, as part of the openage build process. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/codegen/listing.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2021 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Contains the listing of all code generator invocations. 5 | """ 6 | 7 | 8 | def generate_all(projectdir): 9 | """ 10 | Generates all source files in targetdir. 11 | """ 12 | from .cpp_testlist import generate_testlist 13 | generate_testlist(projectdir) 14 | 15 | from .coord import generate_coord_basetypes 16 | generate_coord_basetypes(projectdir) 17 | -------------------------------------------------------------------------------- /openage/convert/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | main.py 4 | ) 5 | 6 | add_subdirectory(entity_object) 7 | add_subdirectory(processor) 8 | add_subdirectory(service) 9 | add_subdirectory(tool) 10 | add_subdirectory(value_object) 11 | -------------------------------------------------------------------------------- /openage/convert/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2015 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Asset conversion 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ) 4 | 5 | add_subdirectory(conversion) 6 | add_subdirectory(export) 7 | -------------------------------------------------------------------------------- /openage/convert/entity_object/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Entity objects used by the converter 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | combined_sprite.py 4 | combined_sound.py 5 | combined_terrain.py 6 | converter_object.py 7 | modpack.py 8 | stringresource.py 9 | ) 10 | 11 | add_subdirectory(aoc) 12 | add_subdirectory(ror) 13 | add_subdirectory(swgbcc) 14 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Objects for storing conversion data. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/aoc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | genie_civ.py 4 | genie_connection.py 5 | genie_effect.py 6 | genie_graphic.py 7 | genie_object_container.py 8 | genie_sound.py 9 | genie_tech.py 10 | genie_terrain.py 11 | genie_unit.py 12 | ) 13 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/aoc/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires II. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/ror/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | genie_sound.py 4 | genie_tech.py 5 | genie_unit.py 6 | ) 7 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/ror/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires I. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/swgbcc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | genie_tech.py 4 | genie_unit.py 5 | ) 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/conversion/swgbcc/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Star Wars: Galactic Battlegrounds (Clone Campaigns). 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/export/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | data_definition.py 4 | media_export_request.py 5 | metadata_export.py 6 | texture.py 7 | ) 8 | 9 | add_subdirectory(formats) 10 | -------------------------------------------------------------------------------- /openage/convert/entity_object/export/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Entity objects for exporting. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/entity_object/export/formats/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | blmask_metadata.py 3 | bltable_metadata.py 4 | __init__.py 5 | media_cache.py 6 | modpack_info.py 7 | modpack_manifest.py 8 | nyan_file.py 9 | palette_metadata.py 10 | sprite_metadata.py 11 | terrain_metadata.py 12 | texture_metadata.py 13 | ) 14 | -------------------------------------------------------------------------------- /openage/convert/entity_object/export/formats/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Export formats used by the engine. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ) 4 | 5 | add_subdirectory(conversion) 6 | add_subdirectory(export) 7 | -------------------------------------------------------------------------------- /openage/convert/processor/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Processors for the conversion. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ) 4 | 5 | add_subdirectory(aoc) 6 | add_subdirectory(aoc_demo) 7 | add_subdirectory(de1) 8 | add_subdirectory(de2) 9 | add_subdirectory(hd) 10 | add_subdirectory(ror) 11 | add_subdirectory(swgbcc) 12 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Processors used for conversion. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/aoc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ability_subprocessor.py 4 | auxiliary_subprocessor.py 5 | civ_subprocessor.py 6 | effect_subprocessor.py 7 | media_subprocessor.py 8 | modifier_subprocessor.py 9 | modpack_subprocessor.py 10 | nyan_subprocessor.py 11 | pregen_processor.py 12 | processor.py 13 | tech_subprocessor.py 14 | upgrade_ability_subprocessor.py 15 | upgrade_attribute_subprocessor.py 16 | upgrade_effect_subprocessor.py 17 | upgrade_resource_subprocessor.py 18 | ) 19 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/aoc/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2019-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Drives the conversion process for AoE2: The Conquerors 1.0c. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/aoc_demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | modpack_subprocessor.py 4 | processor.py 5 | ) 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/aoc_demo/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Drives the conversion process for AoE2: The Conquerors Demo. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/de1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | media_subprocessor.py 4 | modpack_subprocessor.py 5 | processor.py 6 | ) 7 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/de1/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/processor/conversion/de1/__init__.py -------------------------------------------------------------------------------- /openage/convert/processor/conversion/de2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | ability_subprocessor.py 3 | __init__.py 4 | civ_subprocessor.py 5 | media_subprocessor.py 6 | modpack_subprocessor.py 7 | nyan_subprocessor.py 8 | processor.py 9 | tech_subprocessor.py 10 | upgrade_attribute_subprocessor.py 11 | upgrade_resource_subprocessor.py 12 | ) 13 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/de2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Drives the conversion process for AoE2: Definitive Edition. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/hd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | media_subprocessor.py 4 | modpack_subprocessor.py 5 | processor.py 6 | ) 7 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/hd/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2021-2021 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Drives the conversion process for AoE2: HD Edition. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/ror/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ability_subprocessor.py 4 | auxiliary_subprocessor.py 5 | civ_subprocessor.py 6 | media_subprocessor.py 7 | modpack_subprocessor.py 8 | nyan_subprocessor.py 9 | pregen_subprocessor.py 10 | processor.py 11 | tech_subprocessor.py 12 | upgrade_ability_subprocessor.py 13 | upgrade_attribute_subprocessor.py 14 | upgrade_resource_subprocessor.py 15 | ) 16 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/ror/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Drives the conversion process for AoE1: Rise of Rome. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/swgbcc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ability_subprocessor.py 4 | auxiliary_subprocessor.py 5 | civ_subprocessor.py 6 | modpack_subprocessor.py 7 | nyan_subprocessor.py 8 | pregen_subprocessor.py 9 | processor.py 10 | tech_subprocessor.py 11 | upgrade_attribute_subprocessor.py 12 | upgrade_resource_subprocessor.py 13 | ) 14 | -------------------------------------------------------------------------------- /openage/convert/processor/conversion/swgbcc/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Drives the conversion process for Star Wars: Galactic Battlegrounds (Clone Campaigns). 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/processor/export/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | data_exporter.py 4 | generate_manifest_hashes.py 5 | media_exporter.py 6 | modpack_exporter.py 7 | ) 8 | 9 | add_cython_modules( 10 | terrain_merge.pyx 11 | texture_merge.pyx 12 | ) 13 | -------------------------------------------------------------------------------- /openage/convert/processor/export/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/processor/export/__init__.pxd -------------------------------------------------------------------------------- /openage/convert/processor/export/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Processors used for export. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | debug_info.py 4 | ) 5 | 6 | add_subdirectory(conversion) 7 | add_subdirectory(init) 8 | add_subdirectory(export) 9 | add_subdirectory(read) 10 | -------------------------------------------------------------------------------- /openage/convert/service/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Services used by the converter. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/conversion/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_name_lookups.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/service/conversion/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Services used for conversion. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/export/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | load_media_cache.py 4 | ) 5 | 6 | add_subdirectory(interface) 7 | add_subdirectory(opus) 8 | add_subdirectory(png) 9 | -------------------------------------------------------------------------------- /openage/convert/service/export/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Entity objects used for export. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/export/interface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | cutter.py 4 | rename.py 5 | ) 6 | 7 | add_cython_modules( 8 | visgrep.pyx 9 | ) 10 | -------------------------------------------------------------------------------- /openage/convert/service/export/interface/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Interface assets conversion. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/export/opus/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Ogg REQUIRED) 2 | find_package(Opusfile REQUIRED) 3 | 4 | add_cython_modules( 5 | opusenc.pyx 6 | ) 7 | 8 | pyext_link_libraries( 9 | opusenc.pyx 10 | ${OGG_LIBRARIES} 11 | ${OPUS_LIBRARIES} 12 | ) 13 | 14 | pyext_include_directories( 15 | opusenc.pyx 16 | ${OGG_INCLUDE_DIRS} 17 | ${OPUS_INCLUDE_DIRS} 18 | ) 19 | 20 | add_pxds( 21 | __init__.pxd 22 | bytearray.pxd 23 | ogg.pxd 24 | opus.pxd 25 | ) 26 | 27 | add_py_modules( 28 | __init__.py 29 | demo.py 30 | ) 31 | -------------------------------------------------------------------------------- /openage/convert/service/export/opus/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/service/export/opus/__init__.pxd -------------------------------------------------------------------------------- /openage/convert/service/export/opus/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Cython module to encode opus-files using libopus. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/export/opus/bytearray.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "Python.h": 2 | char *PyByteArray_AS_STRING(object string) except NULL 3 | Py_ssize_t PyByteArray_GET_SIZE(object string) 4 | int PyByteArray_Resize(object string, Py_ssize_t len) except -1 5 | -------------------------------------------------------------------------------- /openage/convert/service/export/png/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(PNG REQUIRED) 2 | 3 | add_cython_modules( 4 | binpack.pyx 5 | png_create.pyx 6 | ) 7 | 8 | pyext_link_libraries( 9 | png_create.pyx 10 | PNG::PNG 11 | ) 12 | 13 | add_pxds( 14 | __init__.pxd 15 | libpng.pxd 16 | png_tmp_file.pxd 17 | ) 18 | 19 | add_py_modules( 20 | __init__.py 21 | ) 22 | -------------------------------------------------------------------------------- /openage/convert/service/export/png/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/service/export/png/__init__.pxd -------------------------------------------------------------------------------- /openage/convert/service/export/png/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Cython module to create png files using libpng. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/init/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | api_export_required.py 4 | changelog.py 5 | modpack_search.py 6 | mount_asset_dirs.py 7 | version_detect.py 8 | ) 9 | -------------------------------------------------------------------------------- /openage/convert/service/init/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Services used during converter initialization. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/service/read/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | gamedata.py 4 | nyan_api_loader.py 5 | palette.py 6 | register_media.py 7 | string_resource.py 8 | ) 9 | -------------------------------------------------------------------------------- /openage/convert/service/read/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Services used for reading data. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/tool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | api_export.py 4 | driver.py 5 | interactive.py 6 | singlefile.py 7 | ) 8 | 9 | add_subdirectory(subtool) 10 | -------------------------------------------------------------------------------- /openage/convert/tool/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Tools used by the converter. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/tool/subtool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | acquire_sourcedir.py 4 | version_select.py 5 | ) 6 | -------------------------------------------------------------------------------- /openage/convert/tool/subtool/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Subtools for fetching user input. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ) 4 | 5 | add_subdirectory(conversion) 6 | add_subdirectory(init) 7 | add_subdirectory(read) 8 | -------------------------------------------------------------------------------- /openage/convert/value_object/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Value objects used by the converter. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | forward_ref.py 4 | ) 5 | 6 | add_subdirectory(aoc) 7 | add_subdirectory(de1) 8 | add_subdirectory(de2) 9 | add_subdirectory(hd) 10 | add_subdirectory(ror) 11 | add_subdirectory(swgb) 12 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Value objects used during conversion. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/aoc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/aoc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/value_object/conversion/aoc/__init__.py -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/de1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/de1/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/value_object/conversion/de1/__init__.py -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/de1/internal_nyan_names.py: -------------------------------------------------------------------------------- 1 | # Copyright 2021-2021 the openage authors. See copying.md for legal info. 2 | # 3 | # pylint: disable=line-too-long 4 | 5 | """ 6 | Age of Empires games do not necessarily come with an english 7 | translation. Therefore, we use the strings in this file to 8 | figure out the names for a nyan object. 9 | """ 10 | 11 | # key: armor class; value: Gather ability name 12 | # contains only new armor classes of DE1 13 | ARMOR_CLASS_LOOKUPS = { 14 | 17: "Wall", 15 | } 16 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/de2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/de2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires II: Definitive Edition. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | ) 4 | 5 | add_subdirectory(ak) 6 | add_subdirectory(fgt) 7 | add_subdirectory(raj) 8 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires II: HD Edition. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/ak/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/ak/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires II: HD Edition- African Kingdoms. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/fgt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/fgt/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires II: HD Edition - The Forgotten. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/raj/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/hd/raj/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Conversion data formats for Age of Empires II: HD Edition - Rise of the Rajas. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/ror/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/ror/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/value_object/conversion/ror/__init__.py -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/swgb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | internal_nyan_names.py 4 | ) 5 | -------------------------------------------------------------------------------- /openage/convert/value_object/conversion/swgb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/value_object/conversion/swgb/__init__.py -------------------------------------------------------------------------------- /openage/convert/value_object/init/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | game_file_version.py 4 | game_version.py 5 | ) 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/init/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Value objects used for the converter initilization. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | dynamic_loader.py 4 | genie_structure.py 5 | media_types.py 6 | member_access.py 7 | read_members.py 8 | value_members.py 9 | ) 10 | 11 | add_subdirectory(media) 12 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Value objects used for reading data. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | blendomatic.py 4 | colortable.py 5 | drs.py 6 | langcodes.py 7 | pefile.py 8 | peresource.py 9 | ) 10 | 11 | add_cython_modules( 12 | sld.pyx 13 | slp.pyx 14 | smp.pyx 15 | smx.pyx 16 | ) 17 | 18 | add_pxds( 19 | __init__.pxd 20 | ) 21 | 22 | add_subdirectory(datfile) 23 | add_subdirectory(hardcoded) 24 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SFTtech/openage/163e0ea33fbfb544ce1957f253887e50ca64433c/openage/convert/value_object/read/media/__init__.pxd -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Python containers for the original media files. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/datfile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | civ.py 4 | empiresdat.py 5 | graphic.py 6 | lookup_dicts.py 7 | maps.py 8 | playercolor.py 9 | research.py 10 | sound.py 11 | tech.py 12 | terrain.py 13 | unit.py 14 | ) 15 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/datfile/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | The various structs that make up empires.dat 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/hardcoded/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | interface.py 4 | termcolors.py 5 | terrain_tile_size.py 6 | texture.py 7 | ) 8 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/hardcoded/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Various constants. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/hardcoded/terrain_tile_size.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Tile size for terrain pieces. 5 | """ 6 | 7 | TILE_HALFSIZE = { 8 | "x": 48, 9 | "y": 24, 10 | } 11 | -------------------------------------------------------------------------------- /openage/convert/value_object/read/media/hardcoded/texture.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Constants for texture generation. 5 | """ 6 | 7 | # The maximum allowed texture dimension. 8 | # TODO: Maximum allowed dimension needs to 9 | # be determined by converter. 10 | MAX_TEXTURE_DIMENSION = 100000 11 | 12 | # Margin between subtextures in atlas to avoid texture bleeding. 13 | MARGIN = 1 14 | 15 | # The aspect ratio of terrain tiles. 16 | TERRAIN_ASPECT_RATIO = 97 / 94 17 | -------------------------------------------------------------------------------- /openage/cppinterface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | exctranslate.pyx 3 | exctranslate_tests.pyx 4 | pyobject.pyx 5 | setup_checker.pyx 6 | ) 7 | 8 | add_pxds( 9 | typedefs.pxd 10 | ) 11 | 12 | add_py_modules( 13 | __init__.py 14 | setup.py 15 | ) 16 | -------------------------------------------------------------------------------- /openage/cppinterface/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Code for interfacing C++. 5 | 6 | This includes using the C++ logger and translating C++ exceptions to 7 | python exceptions. 8 | """ 9 | -------------------------------------------------------------------------------- /openage/cppinterface/setup_checker.pyx: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Wraps openage::pyinterface::check, which checks whether setup has 5 | properly initialized all interface components. 6 | """ 7 | 8 | from libopenage.pyinterface.setup cimport check as check_cpp 9 | 10 | 11 | def check(): 12 | check_cpp() 13 | -------------------------------------------------------------------------------- /openage/cppinterface/typedefs.pxd: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2017 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Some types that are not available in Cython's shipped include files. 5 | """ 6 | 7 | 8 | # in some cases, pointers can't be properly used for template arguments. 9 | ctypedef void *voidptr 10 | -------------------------------------------------------------------------------- /openage/cvar/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | config_file.py 4 | location.py 5 | ) 6 | 7 | add_cython_modules( 8 | cvar.pyx 9 | ) 10 | -------------------------------------------------------------------------------- /openage/cvar/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Handles cvar access. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/cython_check.pyx: -------------------------------------------------------------------------------- 1 | # Copyright 2019-2019 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | The only purpose of this module is to be imported by __main__.py 5 | in order to verify if the cython modules were correctly compiled 6 | and called from the build directory. 7 | """ 8 | 9 | 10 | def this_is_true(): 11 | return True 12 | -------------------------------------------------------------------------------- /openage/devmode.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | The only purpose of this module is _not_ to be installed, so it's only 5 | available when running openage from its development directory. 6 | 7 | config.py uses this fact to set its DEVMODE member variable. 8 | """ 9 | -------------------------------------------------------------------------------- /openage/event/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | demo.pyx 3 | ) 4 | 5 | add_py_modules( 6 | __init__.py 7 | ) 8 | -------------------------------------------------------------------------------- /openage/event/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2018 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | This package contains the python parts of the event simulation submodule. 5 | It is the game simulation core. 6 | """ 7 | -------------------------------------------------------------------------------- /openage/game/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | main_cpp.pyx 3 | ) 4 | 5 | add_py_modules( 6 | __init__.py 7 | main.py 8 | ) 9 | -------------------------------------------------------------------------------- /openage/game/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2015 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Package for openage's actual game code. 5 | 6 | Contains the method that invokes the game. 7 | """ 8 | -------------------------------------------------------------------------------- /openage/gamestate/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | tests.pyx 3 | ) 4 | 5 | add_py_modules( 6 | __init__.py 7 | ) 8 | -------------------------------------------------------------------------------- /openage/gamestate/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2023-2023 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | openage game simulation 5 | """ 6 | -------------------------------------------------------------------------------- /openage/log/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | log_cpp.pyx 3 | ) 4 | 5 | add_py_modules( 6 | __init__.py 7 | tests.py 8 | ) 9 | -------------------------------------------------------------------------------- /openage/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | main_cpp.pyx 3 | tests.pyx 4 | ) 5 | 6 | add_py_modules( 7 | __init__.py 8 | main.py 9 | ) 10 | -------------------------------------------------------------------------------- /openage/main/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018-2018 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Main engine entry point. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/nyan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | import_tree.py 4 | nyan_structs.py 5 | ) 6 | -------------------------------------------------------------------------------- /openage/nyan/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2022-2022 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Nyan-compatible object creation and export for use with 5 | https://github.com/SFTtech/nyan 6 | """ 7 | -------------------------------------------------------------------------------- /openage/pathfinding/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | tests.pyx 3 | ) 4 | 5 | add_py_modules( 6 | __init__.py 7 | ) 8 | -------------------------------------------------------------------------------- /openage/pathfinding/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2024-2024 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | openage pathfinding system 5 | """ 6 | -------------------------------------------------------------------------------- /openage/renderer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | renderer_cpp.pyx 3 | tests.pyx 4 | ) 5 | 6 | add_py_modules( 7 | __init__.py 8 | ) 9 | -------------------------------------------------------------------------------- /openage/renderer/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | openage graphics renderer 5 | """ 6 | -------------------------------------------------------------------------------- /openage/renderer/renderer_cpp.pyx: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2018 the openage authors. See copying.md for legal info. 2 | -------------------------------------------------------------------------------- /openage/testing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | cpp_testing.pyx 3 | misc_cpp.pyx 4 | ) 5 | 6 | add_py_modules( 7 | __init__.py 8 | doctest.py 9 | list_processor.py 10 | main.py 11 | testing.py 12 | testlist.py 13 | benchmark.py 14 | ) 15 | -------------------------------------------------------------------------------- /openage/testing/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013-2015 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Handles all testing and demos. 5 | """ 6 | -------------------------------------------------------------------------------- /openage/testing/cpp_testing.pyx: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Provides a wrapper for openage::testing::run_method. 5 | """ 6 | 7 | from libopenage.testing.testlist cimport run_method as run_method 8 | 9 | 10 | def run_cpp_method(str methodname): 11 | """ Runs the given C++ void () method, by its name. """ 12 | run_method(methodname.encode()) 13 | -------------------------------------------------------------------------------- /openage/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | bytequeue.py 4 | context.py 5 | decorators.py 6 | dll.py 7 | files.py 8 | fsprinting.py 9 | hash.py 10 | iterators.py 11 | math.py 12 | observer.py 13 | ordered_set.py 14 | profiler.py 15 | strings.py 16 | struct.py 17 | system.py 18 | threading.py 19 | version.py 20 | ) 21 | 22 | add_subdirectory(filelike) 23 | add_subdirectory(fslike) 24 | -------------------------------------------------------------------------------- /openage/util/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Various utility classes and functions, for use by all the python code of 5 | openage. 6 | """ 7 | -------------------------------------------------------------------------------- /openage/util/context.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2021 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Provides some utility context guards. 5 | """ 6 | 7 | 8 | class DummyGuard: 9 | """ Context guard that does nothing. """ 10 | # pylint: disable=too-few-public-methods 11 | 12 | @staticmethod 13 | def __enter__(): 14 | pass 15 | 16 | @staticmethod 17 | def __exit__(exc_type, exc_value, traceback): 18 | pass 19 | -------------------------------------------------------------------------------- /openage/util/filelike/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | abstract.py 4 | fifo.py 5 | readonly.py 6 | stream.py 7 | ) 8 | 9 | add_cython_modules( 10 | cpp.pyx 11 | ) 12 | -------------------------------------------------------------------------------- /openage/util/filelike/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | File-like object utility package. 5 | 6 | Types that implement analogous objects for the built-in open() result. 7 | 8 | Also used from C++ for more complicated file access. 9 | """ 10 | -------------------------------------------------------------------------------- /openage/util/fslike/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_py_modules( 2 | __init__.py 3 | abstract.py 4 | directory.py 5 | filecollection.py 6 | path.py 7 | test.py 8 | union.py 9 | wrapper.py 10 | ) 11 | 12 | add_pxds( 13 | cpp.pxd 14 | ) 15 | 16 | add_cython_modules( 17 | cpp.pyx 18 | ) 19 | -------------------------------------------------------------------------------- /openage/util/fslike/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2016 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Filesystem-like object utility package. 5 | 6 | Types that implement FSLikeObject provide pathlib.Path-analogous VirtualPath 7 | objects, which in turn provide file-like objects. 8 | 9 | In addition, a C++ interface for VirtualPath objects is provided. 10 | """ 11 | -------------------------------------------------------------------------------- /openage/util/fslike/cpp.pxd: -------------------------------------------------------------------------------- 1 | # Copyright 2017-2017 the openage authors. See copying.md for legal info. 2 | 3 | from libopenage.util.path cimport Path 4 | 5 | 6 | cdef cpppath_to_pypath(const Path &path) 7 | -------------------------------------------------------------------------------- /openage/util/iterators.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015-2022 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Provides all sorts of iterator-related stuff. 5 | """ 6 | 7 | 8 | from typing import Iterable 9 | 10 | 11 | def denote_last(iterable: Iterable): 12 | """ 13 | Similar to enumerate, this iterates over an iterable, and yields 14 | tuples of item, is_last. 15 | """ 16 | # pylint: disable=stop-iteration-return 17 | iterator = iter(iterable) 18 | current = next(iterator) 19 | 20 | for future in iterator: 21 | yield current, False 22 | current = future 23 | 24 | yield current, True 25 | -------------------------------------------------------------------------------- /openage/versions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_cython_modules( 2 | versions.pyx 3 | ) 4 | 5 | add_py_modules( 6 | __init__.py 7 | ) 8 | -------------------------------------------------------------------------------- /openage/versions/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020-2020 the openage authors. See copying.md for legal info. 2 | 3 | """ 4 | Handles version numbers. 5 | """ 6 | -------------------------------------------------------------------------------- /openage_version: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | --------------------------------------------------------------------------------