- Added File to Memory and FastHashMomory - Add Protection that only one app can exist - Add a Trace exist Variable as GetTraceRef automatically creates a trace - Outsource the LI::Rect to its own header - Add a CurrentScreen func - Use Rect for uv (to manually set all corners) - Rect still supports to use vec4 for uv - Add tex3ds Spritesheet support - Add T3X Loader to Texture (if single tex) - Integrate an autounload into Texture as in case of spritesheet the Tex needs to be unloaded manually - Safe some performance in texture loading by combining the Loops (best thing ive ever found) - Use the Momory Hash to only render one error icon into the TTF Texture - Also Try loading the whole 16-Bit range - Use GPU_A8 format for TTF rendering to save 24Bits per pixel and use the same Rendermode as System Font - Simplify Quad Command by using modern vec api - Integrate Text aligning - Fix FPS displayed twice in Performance overlay - UI7 DrawList now has its own AST system - TODO: do the same layering for the objects as Text uses - Map Drawcommands with a bool that declares either bottom or top screen was active - Add first basic Manu functions - Fix Typos in Theme - Add a basic UI7 Context Handler ## Extra - Added JetBrainsMono font in Test app ## Bugs: - Performance Overlay Freezes 3ds hardware and crashes Citra with Vulkan when System Font is used - UI7 Menu scrolling is as scruffed as back in RenderD7 0.9.5
		
			
				
	
	
		
			98 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			98 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
cmake_minimum_required(VERSION 3.18)
 | 
						|
 | 
						|
# Setup Toolchain if not specified
 | 
						|
# Could propably avoided by using arm-none-eabi-cmake
 | 
						|
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
 | 
						|
    if(DEFINED ENV{DEVKITPRO})
 | 
						|
        set(CMAKE_TOOLCHAIN_FILE "$ENV{DEVKITPRO}/cmake/3DS.cmake" CACHE PATH "toolchain file")
 | 
						|
    else()
 | 
						|
        message(FATAL_ERROR "Please define DEVKITPRO to point to your SDK path!")
 | 
						|
    endif()
 | 
						|
endif()
 | 
						|
 | 
						|
# Set Project
 | 
						|
project(palladium LANGUAGES C CXX VERSION 1.0.0)
 | 
						|
 | 
						|
# Enable Compile Command Export
 | 
						|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 | 
						|
 | 
						|
# Force C++ 20
 | 
						|
set(CMAKE_CXX_STANDARD 20)
 | 
						|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
 | 
						|
 | 
						|
# Set Special C and CXX flags
 | 
						|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-psabi -O3")
 | 
						|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -fno-rtti -fno-exceptions")
 | 
						|
 | 
						|
set(SRC_FILES
 | 
						|
    # Core (common)
 | 
						|
    source/common/app.cpp
 | 
						|
    source/common/strings.cpp
 | 
						|
    source/common/timetrace.cpp
 | 
						|
    source/common/sys.cpp
 | 
						|
    source/common/lang.cpp
 | 
						|
    source/common/error.cpp
 | 
						|
    source/common/io.cpp
 | 
						|
    # Controls
 | 
						|
    source/controls/hid.cpp
 | 
						|
    # Maths
 | 
						|
    source/maths/color.cpp
 | 
						|
    source/maths/bit_util.cpp
 | 
						|
    source/maths/img_convert.cpp
 | 
						|
    # Graphics
 | 
						|
    source/graphics/texture.cpp
 | 
						|
    source/graphics/spritesheet.cpp
 | 
						|
    source/graphics/li7_shader.cpp
 | 
						|
    source/graphics/lithium.cpp
 | 
						|
    # Overlays
 | 
						|
    source/overlays/message_mgr.cpp
 | 
						|
    source/overlays/overlay_mgr.cpp
 | 
						|
    source/overlays/keyboard.cpp
 | 
						|
    source/overlays/performance.cpp
 | 
						|
    # Tools
 | 
						|
    source/tools/gamepad_icons.cpp
 | 
						|
    # UI7
 | 
						|
    source/ui7/drawlist.cpp
 | 
						|
    source/ui7/menu.cpp
 | 
						|
    source/ui7/theme.cpp
 | 
						|
    source/ui7/ui7.cpp
 | 
						|
    # External
 | 
						|
    source/external/stb.cpp
 | 
						|
)
 | 
						|
 | 
						|
set(TARGET_NAME palladium)
 | 
						|
 | 
						|
# Set Executable and its sources
 | 
						|
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
 | 
						|
 | 
						|
# Set dependencies, include dirs and definitions
 | 
						|
target_include_directories(${TARGET_NAME} PUBLIC
 | 
						|
    include
 | 
						|
    ${DEVKITPRO}/portlibs/3ds/include
 | 
						|
)
 | 
						|
target_compile_definitions(${TARGET_NAME} PUBLIC
 | 
						|
    -D_GNU_SOURCE=1
 | 
						|
    -DVERSION="${PROJECT_VERSION}"
 | 
						|
    -DBUILD_CTR=1
 | 
						|
)
 | 
						|
 | 
						|
add_executable(test test/main.cpp)
 | 
						|
target_include_directories(test PUBLIC include test)
 | 
						|
target_link_directories(test PUBLIC ${CMAKE_BINARY_DIR})
 | 
						|
target_link_libraries(test PUBLIC palladium citro3d ctru m)
 | 
						|
# Generate 3DSX
 | 
						|
ctr_generate_smdh(
 | 
						|
    ${CMAKE_BINARY_DIR}/test.smdh
 | 
						|
    NAME "${APP_NAME}"
 | 
						|
    DESCRIPTION "Palladium test app"
 | 
						|
    AUTHOR "tobid7"
 | 
						|
    ICON "test/romfs/icon.png"
 | 
						|
)
 | 
						|
ctr_create_3dsx(
 | 
						|
    test
 | 
						|
    OUTPUT "${CMAKE_BINARY_DIR}/test.3dsx"
 | 
						|
    SMDH "${CMAKE_BINARY_DIR}/test.smdh"
 | 
						|
    ROMFS "${CMAKE_SOURCE_DIR}/test/romfs"
 | 
						|
)
 | 
						|
install(TARGETS ${TARGET_NAME})
 | 
						|
install(DIRECTORY include DESTINATION ".") |