This commit is contained in:
Joshua Peisach 2025-06-29 14:26:36 -04:00
parent 93a4448e89
commit 4d47eebad2
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A
8 changed files with 26 additions and 35 deletions

View File

@ -523,18 +523,8 @@ if (ISLE_BUILD_APP)
if(NINTENDO_3DS) if(NINTENDO_3DS)
target_sources(isle PRIVATE target_sources(isle PRIVATE
ISLE/3ds/apthooks.cpp ISLE/3ds/apthooks.cpp
ISLE/3ds/filesystem.cpp ISLE/3ds/config.cpp
) )
ctr_generate_smdh(isle.smdh
NAME "LEGO Island"
TITLE "LEGO Island"
DESCRIPTION "LEGO Island for the Nintendo 3DS"
AUTHOR "isledecomp/isle-portable"
VERSION "${PROJECT_VERSION}"
ICON "ISLE/res/3ds/isle.png"
)
ctr_create_3dsx(isle SMDH isle.smdh)
endif() endif()
endif() endif()
@ -661,6 +651,18 @@ endif()
set(CPACK_PACKAGE_DIRECTORY "dist") set(CPACK_PACKAGE_DIRECTORY "dist")
set(CPACK_PACKAGE_FILE_NAME "isle-${PROJECT_VERSION}-${ISLE_PACKAGE_NAME}-${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_PACKAGE_FILE_NAME "isle-${PROJECT_VERSION}-${ISLE_PACKAGE_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
if(NINTENDO_3DS)
ctr_generate_smdh(isle.smdh
NAME "LEGO Island"
TITLE "LEGO Island"
DESCRIPTION "LEGO Island for the Nintendo 3DS"
AUTHOR "isledecomp/isle-portable"
VERSION "${PROJECT_VERSION}"
ICON "ISLE/res/3ds/isle.png"
)
ctr_create_3dsx(isle SMDH isle.smdh)
endif()
if(MSVC) if(MSVC)
set(CPACK_GENERATOR ZIP) set(CPACK_GENERATOR ZIP)
else() else()

View File

@ -1,4 +1,4 @@
#include "filesystem.h" #include "config.h"
#include <SDL3/SDL_log.h> #include <SDL3/SDL_log.h>
#include <iniparser.h> #include <iniparser.h>
@ -17,15 +17,6 @@ void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary)
// Extra / at the end causes some issues // Extra / at the end causes some issues
iniparser_set(p_dictionary, "isle:savepath", "sdmc:/3ds/isle"); iniparser_set(p_dictionary, "isle:savepath", "sdmc:/3ds/isle");
// We are currently just rendering to the touch screen
iniparser_set(p_dictionary, "isle:Full Screen", "true");
// Wide view angle takes more resources
iniparser_set(p_dictionary, "isle:Wide View Angle", "false");
// Set back buffers in video RAM
iniparser_set(p_dictionary, "isle:Back Buffers in Video RAM", "1");
// Use e_noAnimation/cut transition // Use e_noAnimation/cut transition
iniparser_set(p_dictionary, "isle:Transition Type", "1"); iniparser_set(p_dictionary, "isle:Transition Type", "1");
} }

View File

@ -1,8 +1,8 @@
#ifndef N3DS_FILESYSTEM_H #ifndef N3DS_CONFIG_H
#define N3DS_FILESYSTEM_H #define N3DS_CONFIG_H
#include "dictionary.h" #include "dictionary.h"
void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary); void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary);
#endif // N3DS_FILESYSTEM_H #endif // N3DS_CONFIG_H

View File

@ -52,7 +52,7 @@
#ifdef __3DS__ #ifdef __3DS__
#include "3ds/apthooks.h" #include "3ds/apthooks.h"
#include "3ds/filesystem.h" #include "3ds/config.h"
#endif #endif
DECOMP_SIZE_ASSERT(IsleApp, 0x8c) DECOMP_SIZE_ASSERT(IsleApp, 0x8c)

View File

@ -58,11 +58,9 @@ if(NINTENDO_3DS)
else() else()
find_library(CITRO3D_LIBRARY NAMES citro3d) find_library(CITRO3D_LIBRARY NAMES citro3d)
endif() endif()
find_library(CTRU_LIBRARY NAMES ctru) if(CITRO3D_LIBRARY)
if(CTRU_LIBRARY AND CITRO3D_LIBRARY) message(STATUS "Found citro3d: enabling Citro3D renderer")
message(STATUS "Found libctru and citro3d: enabling Citro3D renderer")
target_sources(miniwin PRIVATE src/d3drm/backends/citro3d/renderer.cpp) target_sources(miniwin PRIVATE src/d3drm/backends/citro3d/renderer.cpp)
target_compile_definitions(miniwin PRIVATE USE_CITRO3D)
ctr_add_shader_library(vshader src/d3drm/backends/citro3d/vshader.v.pica) ctr_add_shader_library(vshader src/d3drm/backends/citro3d/vshader.v.pica)
dkp_add_embedded_binary_library(3ds_shaders vshader) dkp_add_embedded_binary_library(3ds_shaders vshader)
target_link_libraries(miniwin PRIVATE ${CITRO3D_LIBRARY} 3ds_shaders) target_link_libraries(miniwin PRIVATE ${CITRO3D_LIBRARY} 3ds_shaders)

View File

@ -13,7 +13,7 @@
#ifdef USE_OPENGLES2 #ifdef USE_OPENGLES2
#include "d3drmrenderer_opengles2.h" #include "d3drmrenderer_opengles2.h"
#endif #endif
#ifdef USE_CITRO3D #ifdef __3DS__
#include "d3drmrenderer_citro3d.h" #include "d3drmrenderer_citro3d.h"
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
@ -162,7 +162,7 @@ HRESULT Direct3DRMImpl::CreateDeviceFromSurface(
DDRenderer = OpenGL1Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight); DDRenderer = OpenGL1Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight);
} }
#endif #endif
#ifdef USE_CITRO3D #ifdef __3DS__
else if (SDL_memcmp(&guid, &Citro3D_GUID, sizeof(GUID)) == 0) { else if (SDL_memcmp(&guid, &Citro3D_GUID, sizeof(GUID)) == 0) {
DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight);
} }

View File

@ -155,7 +155,7 @@ void Direct3DRMDevice2Impl::Resize()
{ {
int width, height; int width, height;
SDL_GetWindowSizeInPixels(DDWindow, &width, &height); SDL_GetWindowSizeInPixels(DDWindow, &width, &height);
#ifdef USE_CITRO3D #ifdef __3DS__
width = 320; // We are on the lower screen width = 320; // We are on the lower screen
height = 240; height = 240;
#endif #endif

View File

@ -4,7 +4,7 @@
#ifdef USE_OPENGLES2 #ifdef USE_OPENGLES2
#include "d3drmrenderer_opengles2.h" #include "d3drmrenderer_opengles2.h"
#endif #endif
#ifdef USE_CITRO3D #ifdef __3DS__
#include "d3drmrenderer_citro3d.h" #include "d3drmrenderer_citro3d.h"
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
@ -231,7 +231,7 @@ HRESULT DirectDrawImpl::EnumDevices(LPD3DENUMDEVICESCALLBACK cb, void* ctx)
#ifdef USE_OPENGL1 #ifdef USE_OPENGL1
OpenGL1Renderer_EnumDevice(cb, ctx); OpenGL1Renderer_EnumDevice(cb, ctx);
#endif #endif
#ifdef USE_CITRO3D #ifdef __3DS__
Citro3DRenderer_EnumDevice(cb, ctx); Citro3DRenderer_EnumDevice(cb, ctx);
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
@ -348,7 +348,7 @@ HRESULT DirectDrawImpl::CreateDevice(
DDRenderer = OpenGL1Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight); DDRenderer = OpenGL1Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight);
} }
#endif #endif
#ifdef USE_CITRO3D #ifdef __3DS__
else if (SDL_memcmp(&guid, &Citro3D_GUID, sizeof(GUID)) == 0) { else if (SDL_memcmp(&guid, &Citro3D_GUID, sizeof(GUID)) == 0) {
DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight);
} }