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)
target_sources(isle PRIVATE
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()
@ -661,6 +651,18 @@ endif()
set(CPACK_PACKAGE_DIRECTORY "dist")
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)
set(CPACK_GENERATOR ZIP)
else()

View File

@ -1,4 +1,4 @@
#include "filesystem.h"
#include "config.h"
#include <SDL3/SDL_log.h>
#include <iniparser.h>
@ -17,15 +17,6 @@ void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary)
// Extra / at the end causes some issues
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
iniparser_set(p_dictionary, "isle:Transition Type", "1");
}

View File

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

View File

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

View File

@ -58,11 +58,9 @@ if(NINTENDO_3DS)
else()
find_library(CITRO3D_LIBRARY NAMES citro3d)
endif()
find_library(CTRU_LIBRARY NAMES ctru)
if(CTRU_LIBRARY AND CITRO3D_LIBRARY)
message(STATUS "Found libctru and citro3d: enabling Citro3D renderer")
if(CITRO3D_LIBRARY)
message(STATUS "Found citro3d: enabling Citro3D renderer")
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)
dkp_add_embedded_binary_library(3ds_shaders vshader)
target_link_libraries(miniwin PRIVATE ${CITRO3D_LIBRARY} 3ds_shaders)

View File

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

View File

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

View File

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