From 3e5d447f9b3fcfb5f88afaf954d541bc22f8c0ce Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Mon, 16 Jun 2025 14:51:22 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Anders Jenbo --- CMakeLists.txt | 8 +++++--- LEGO1/tgl/d3drm/mesh.cpp | 6 +----- LEGO1/tgl/d3drm/meshbuilder.cpp | 6 +----- miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp | 1 - 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2689878d..8b35daa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -643,9 +643,7 @@ endif() set(CPACK_PACKAGE_DIRECTORY "dist") set(CPACK_PACKAGE_FILE_NAME "isle-${PROJECT_VERSION}-${ISLE_PACKAGE_NAME}-${CMAKE_SYSTEM_PROCESSOR}") -if(MSVC) - set(CPACK_GENERATOR ZIP) -elseif(NINTENDO_3DS) +if(NINTENDO_3DS) include(Tools3DS) set(APP_TITLE "LEGO Island") set(APP_DESCRIPTION "LEGO Island port for 3DS") @@ -654,6 +652,10 @@ elseif(NINTENDO_3DS) set(APP_VERSION ${PROJECT_VERSION}) add_3dsx_target(isle) +endif() + +if(MSVC) + set(CPACK_GENERATOR ZIP) else() set(CPACK_GENERATOR TGZ) endif() diff --git a/LEGO1/tgl/d3drm/mesh.cpp b/LEGO1/tgl/d3drm/mesh.cpp index 8d20acae..8dd16fd5 100644 --- a/LEGO1/tgl/d3drm/mesh.cpp +++ b/LEGO1/tgl/d3drm/mesh.cpp @@ -102,11 +102,7 @@ inline Result MeshDeepClone(MeshImpl::MeshData* pSource, MeshImpl::MeshData*& rp assert(Succeeded(result)); -#if defined(__3DS__) - unsigned long* faceBuffer = new unsigned long[dataSize]; -#else - unsigned int* faceBuffer = new unsigned int[dataSize]; -#endif + DWORD* faceBuffer = new DWORD[dataSize]; result = ResultVal(pSource->groupMesh->GetGroup(pSource->groupIndex, &vcount, &fcount, &vperface, &dataSize, faceBuffer) ); diff --git a/LEGO1/tgl/d3drm/meshbuilder.cpp b/LEGO1/tgl/d3drm/meshbuilder.cpp index d152e5aa..00785603 100644 --- a/LEGO1/tgl/d3drm/meshbuilder.cpp +++ b/LEGO1/tgl/d3drm/meshbuilder.cpp @@ -63,11 +63,7 @@ inline Result CreateMesh( int count = faceCount * 3; int index = 0; -#if defined(__3DS__) - unsigned long* fData = new unsigned long[count]; -#else - unsigned int* fData = new unsigned int[count]; -#endif + DWORD* fData = new DWORD[count]; D3DRMVERTEX* vertices = new D3DRMVERTEX[vertexCount]; memset(vertices, 0, sizeof(*vertices) * vertexCount); diff --git a/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp b/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp index 37bd0beb..ea182dc2 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp +++ b/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp @@ -192,7 +192,6 @@ Direct3DRMRenderer* Direct3DRMSDL3GPURenderer::Create(DWORD width, DWORD height) )}; if (!device.ptr) { SDL_LogError(LOG_CATEGORY_MINIWIN, "SDL_CreateGPUDevice failed (%s)", SDL_GetError()); - SDL_Log("width: %d height: %d", width, height); return nullptr; }