terrible horrible no good very bad ""fixes""

The NXDK seems to be very very broken. Currently, these changes get things all the way to 100% compilation, but fail on the linking step due to `miniaudio`. These changes really need to be actually fixed in future to not be as bad as they are, but I haven't got much of a clue how best to do that.
This commit is contained in:
VoxelTek 2025-08-04 12:55:56 +10:00
parent 9afc40891d
commit 59f4cf9814
11 changed files with 20 additions and 9 deletions

View File

@ -48,7 +48,7 @@ option(ISLE_WERROR "Treat warnings as errors" OFF)
cmake_dependent_option(ISLE_DEBUG "Enable imgui debug" ON "NOT NXDK" OFF)
cmake_dependent_option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" "${NOT_MINGW}" "WIN32;CMAKE_SIZEOF_VOID_P EQUAL 4" OFF)
cmake_dependent_option(ISLE_MINIWIN "Use miniwin" ON "NOT ISLE_USE_DX5" OFF)
cmake_dependent_option(ISLE_EXTENSIONS "Use extensions" ON "NOT ISLE_USE_DX5" OFF)
cmake_dependent_option(ISLE_EXTENSIONS "Use extensions" ON "NOT ISLE_USE_DX5;NOT NXDK" OFF)
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN;NOT NINTENDO_3DS;NOT WINDOWS_STORE;NOT NXDK" OFF)
cmake_dependent_option(ISLE_COMPILE_SHADERS "Compile shaders" ON "SDL_SHADERCROSS_BIN;TARGET Python3::Interpreter" OFF)
option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON)
@ -177,7 +177,7 @@ add_library(lego1
LEGO1/main.cpp
)
target_precompile_headers(lego1 PRIVATE "LEGO1/lego1_pch.h")
set_property(TARGET lego1 PROPERTY DEFINE_SYMBOL "LEGO1_DLL")
set_property(TARGET lego1 PROPERTY DEFINE_SYMBOL "LEGO1_STATIC")
target_include_directories(lego1 PUBLIC "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/util>")
target_include_directories(lego1 PUBLIC "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/extensions/include>")
target_include_directories(lego1 PUBLIC "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/LEGO1>")
@ -378,7 +378,8 @@ target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include
if (WIN32)
target_link_libraries(lego1 INTERFACE winmm)
endif()
target_link_libraries(lego1 PRIVATE libsmacker miniaudio)
#target_link_libraries(lego1 PRIVATE libsmacker miniaudio)
target_link_libraries(lego1 PRIVATE libsmacker)
target_include_directories(lego1 PUBLIC $<BUILD_INTERFACE:$<TARGET_PROPERTY:miniaudio,INTERFACE_INCLUDE_DIRECTORIES>>)
# lego1_impl sources

View File

@ -1190,7 +1190,7 @@ bool IsleApp::LoadConfig()
m_videoParam.GetRect() = MxRect32(0, 0, (m_xRes - 1), (m_yRes - 1));
}
m_frameRate = (1000.0f / iniparser_getdouble(dict, "isle:Frame Delta", m_frameDelta));
m_frameDelta = static_cast<int>(std::round(iniparser_getdouble(dict, "isle:Frame Delta", m_frameDelta)));
m_frameDelta = static_cast<int>((iniparser_getdouble(dict, "isle:Frame Delta", m_frameDelta)));
m_videoParam.SetMSAASamples((m_msaaSamples = iniparser_getint(dict, "isle:MSAA", m_msaaSamples)));
m_videoParam.SetAnisotropic((m_anisotropic = iniparser_getdouble(dict, "isle:Anisotropic", m_anisotropic)));

View File

@ -10,6 +10,7 @@
#include "mxautolock.h"
#include "mxdebug.h"
#include "roi/legoroi.h"
#include "lego/sources/misc/legoutil.h"
#include <SDL3/SDL_log.h>

View File

@ -31,6 +31,7 @@
#include "mxvariabletable.h"
#include "scripts.h"
#include "viewmanager/viewmanager.h"
#include "legopartpresenter.h"
#include <SDL3/SDL_log.h>
#include <SDL3/SDL_stdinc.h>

View File

@ -2,7 +2,8 @@
#include "decomp.h"
#include "legostorage.h"
#include "memory.h"
//#include "memory.h"
#include "string.h"
DECOMP_SIZE_ASSERT(LegoPaletteEntry, 0x03);
DECOMP_SIZE_ASSERT(LegoImage, 0x310);

View File

@ -2,7 +2,7 @@
#include "decomp.h"
#include <memory.h>
//#include <memory.h>
#include <string.h>
DECOMP_SIZE_ASSERT(LegoStorage, 0x08);

View File

@ -1,6 +1,9 @@
#ifndef LEGO1_EXPORT_H
#define LEGO1_EXPORT_H
#undef LEGO1_DLL
#define LEGO1_STATIC
#ifdef LEGO1_STATIC
#define LEGO1_EXPORT
#elif defined(LEGO1_DLL)

View File

@ -3,6 +3,7 @@
#endif
#include "mxdirect3d.h"
#include "mxvideoparam.h"
#include <SDL3/SDL.h> // for SDL_Log
#include <assert.h>

View File

@ -4,7 +4,8 @@
#include "matrix.h"
#include <math.h>
#include <memory.h>
//#include <memory.h>
#include <string.h>
// FUNCTION: LEGO1 0x10002320
// FUNCTION: BETA10 0x1000fcb0

View File

@ -4,7 +4,8 @@
#include "vector.h"
#include <math.h>
#include <memory.h>
//#include <memory.h>
#include <string.h>
// FUNCTION: LEGO1 0x10001f80
// FUNCTION: BETA10 0x10010a20

View File

@ -4,7 +4,8 @@
#include "vector.h"
#include <math.h>
#include <memory.h>
//#include <memory.h>
#include <string.h>
// FUNCTION: LEGO1 0x10002870
// FUNCTION: BETA10 0x10048500