2023-01-05 23:23:26 +01:00
|
|
|
# Configure with [fxsdk build-fx] or [fxsdk build-cg], which provide the
|
|
|
|
# toolchain file and module path of the fxSDK
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.15)
|
2023-01-07 20:15:39 +01:00
|
|
|
project(Schmup VERSION 1.0 LANGUAGES CXX C ASM)
|
2023-01-05 23:23:26 +01:00
|
|
|
|
|
|
|
include(GenerateG3A)
|
|
|
|
include(Fxconv)
|
2023-01-07 20:15:39 +01:00
|
|
|
|
|
|
|
find_package(Azur 0.1 REQUIRED)
|
2023-01-05 23:23:26 +01:00
|
|
|
find_package(Gint 2.9 REQUIRED)
|
|
|
|
find_package(LibProf 2.4 REQUIRED)
|
|
|
|
|
2023-01-26 22:35:33 +01:00
|
|
|
|
|
|
|
fxconv_declare_converters(assets-cg/converters.py)
|
|
|
|
|
|
|
|
add_custom_command(
|
2023-01-31 23:07:32 +01:00
|
|
|
OUTPUT "${CMAKE_CURRENT_LIST_DIR}/assets-cg/Levels/Level2.json"
|
2023-01-26 22:35:33 +01:00
|
|
|
COMMENT "Convert Tiled TMX map to usable JSON file"
|
|
|
|
COMMAND tiled --export-tileset json Tileset_Space.tsx Tileset_Space.json
|
|
|
|
COMMAND find | grep .*.tmx | sed 's/.tmx//g' | xargs -l bash -c 'tiled --export-map json $$0.tmx $$0.json'
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets-cg/Levels/
|
2023-01-31 23:07:32 +01:00
|
|
|
DEPENDS assets-cg/Levels/Level2.tmx
|
2023-01-26 22:35:33 +01:00
|
|
|
assets-cg/converters.py
|
|
|
|
assets-cg/Levels/tileset.png
|
|
|
|
assets-cg/Levels/Tileset_Space.tsx)
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-05 23:23:26 +01:00
|
|
|
set(SOURCES
|
2023-01-07 20:15:39 +01:00
|
|
|
src/main.cpp
|
2023-01-28 14:11:13 +01:00
|
|
|
|
2023-02-05 10:05:05 +01:00
|
|
|
src/fast_trig.cpp
|
2023-01-28 14:11:13 +01:00
|
|
|
src/extrakeyboard.cpp
|
|
|
|
|
2023-01-22 13:39:43 +01:00
|
|
|
src/collections.cpp
|
2023-01-22 14:30:19 +01:00
|
|
|
src/impact.cpp
|
2023-01-21 22:45:10 +01:00
|
|
|
src/player.cpp
|
2023-01-07 20:15:39 +01:00
|
|
|
src/utilities.cpp
|
|
|
|
src/particles.cpp
|
2023-01-20 21:11:57 +01:00
|
|
|
src/bullet.cpp
|
2023-01-22 13:39:43 +01:00
|
|
|
src/enemy.cpp
|
2023-01-13 22:12:08 +01:00
|
|
|
src/starfieldshader.cpp
|
2023-01-26 22:35:33 +01:00
|
|
|
src/background.cpp
|
2023-02-05 16:49:56 +01:00
|
|
|
src/bonus.cpp
|
2023-08-13 17:33:25 +02:00
|
|
|
src/boss.cpp
|
2023-01-23 08:02:13 +01:00
|
|
|
src/point2D.cpp
|
|
|
|
src/trajectory.cpp
|
|
|
|
|
2023-01-05 23:23:26 +01:00
|
|
|
# ...
|
|
|
|
)
|
|
|
|
set(ASSETS_cg
|
2023-08-14 14:22:53 +02:00
|
|
|
#assets-cg/font.png
|
|
|
|
assets-cg/milifont.png
|
2023-01-20 21:11:57 +01:00
|
|
|
|
2023-01-21 22:45:10 +01:00
|
|
|
assets-cg/Sprites/Explosions/firstboom.png
|
|
|
|
assets-cg/Sprites/Explosions/emp_circ.png
|
|
|
|
assets-cg/Sprites/Explosions/fill_circ.png
|
2023-01-20 21:11:57 +01:00
|
|
|
|
2023-02-05 16:49:56 +01:00
|
|
|
assets-cg/Sprites/Bonus/life_bonus.png
|
|
|
|
assets-cg/Sprites/Bonus/sat_bonus.png
|
|
|
|
|
2023-01-21 22:45:10 +01:00
|
|
|
assets-cg/Sprites/Bullets/bullet_normal.png
|
|
|
|
assets-cg/Sprites/Bullets/bullet_blue.png
|
2023-01-22 11:07:36 +01:00
|
|
|
assets-cg/Sprites/Bullets/bullet_laser.png
|
2023-02-05 10:05:05 +01:00
|
|
|
assets-cg/Sprites/Bullets/bullet_enemy_blue.png
|
2023-01-20 21:11:57 +01:00
|
|
|
|
2023-01-21 22:45:10 +01:00
|
|
|
assets-cg/Sprites/Players/mainship1.png
|
|
|
|
assets-cg/Sprites/Players/Satellite_Lvl1.png
|
|
|
|
|
2023-02-05 10:05:05 +01:00
|
|
|
assets-cg/Sprites/Enemies/Lifebar.png
|
2023-01-22 13:39:43 +01:00
|
|
|
assets-cg/Sprites/Enemies/mainship2.png
|
|
|
|
assets-cg/Sprites/Enemies/Enemy_Blue_Lvl1.png
|
2023-01-23 22:03:09 +01:00
|
|
|
assets-cg/Sprites/Enemies/Enemy_Red_Lvl1.png
|
2023-08-13 17:33:25 +02:00
|
|
|
|
|
|
|
assets-cg/Sprites/Boss/Boss1.png
|
2023-01-20 21:11:57 +01:00
|
|
|
|
2023-01-26 22:35:33 +01:00
|
|
|
assets-cg/Levels/tileset.png
|
2023-01-31 23:07:32 +01:00
|
|
|
assets-cg/Levels/Level2.json
|
2023-01-26 22:35:33 +01:00
|
|
|
# assets-cg/Levels/Tileset_Space.json
|
2023-01-05 23:23:26 +01:00
|
|
|
# ...
|
|
|
|
)
|
|
|
|
|
|
|
|
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
|
|
|
|
|
2023-01-07 20:15:39 +01:00
|
|
|
add_executable(shmup ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
|
|
|
target_compile_options(shmup PRIVATE -Wall -Wextra -Os -std=c++20)
|
2023-03-31 21:44:44 +02:00
|
|
|
target_link_options(shmup PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage -fno-use-cxa-atexit -fpermissive)
|
2023-01-07 20:15:39 +01:00
|
|
|
target_link_libraries(shmup Azur::Azur -lnum LibProf::LibProf Gint::Gint -lstdc++)
|
2023-01-05 23:23:26 +01:00
|
|
|
|
|
|
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
2023-01-07 20:15:39 +01:00
|
|
|
generate_g3a(TARGET shmup OUTPUT "MyShmup.g3a"
|
2023-01-05 23:23:26 +01:00
|
|
|
NAME "MyShmup" ICONS assets-cg/icon-uns.png assets-cg/icon-sel.png)
|
|
|
|
endif()
|