mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 05:17:40 -07:00
Compare commits
4 Commits
8c2213e75b
...
e9d061eaca
Author | SHA1 | Date | |
---|---|---|---|
|
e9d061eaca | ||
|
7c1d2a64f4 | ||
|
b2f6fab6f4 | ||
|
a371c8f1e0 |
@ -127,6 +127,8 @@ if (ENABLE_JIT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(core INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
set(MELONDS_VERSION_SUFFIX "$ENV{MELONDS_VERSION_SUFFIX}" CACHE STRING "Suffix to add to displayed melonDS version")
|
||||
option(MELONDS_EMBED_BUILD_INFO "Embed detailed build info into the binary" OFF)
|
||||
set(MELONDS_GIT_BRANCH "$ENV{MELONDS_GIT_BRANCH}" CACHE STRING "The Git branch used for this build")
|
||||
@ -178,6 +180,7 @@ endif()
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(core PRIVATE ole32 comctl32 wsock32 ws2_32)
|
||||
target_compile_definitions(core PUBLIC WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||
elseif(NOT APPLE AND NOT HAIKU)
|
||||
check_library_exists(rt shm_open "" NEED_LIBRT)
|
||||
if (NEED_LIBRT)
|
||||
|
@ -849,6 +849,8 @@ int ClipAgainstPlane(const GPU3D& gpu, Vertex* vertices, int nverts, int clipsta
|
||||
temp[1] = vertices[1];
|
||||
}
|
||||
|
||||
Vertex holdit;
|
||||
bool heldit = false;
|
||||
for (int i = clipstart; i < nverts; i++)
|
||||
{
|
||||
prev = i-1; if (prev < 0) prev = nverts-1;
|
||||
@ -861,10 +863,18 @@ int ClipAgainstPlane(const GPU3D& gpu, Vertex* vertices, int nverts, int clipsta
|
||||
|
||||
Vertex* vprev = &vertices[prev];
|
||||
if (vprev->Position[comp] <= vprev->Position[3])
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
ClipSegment<comp, 1, attribs>(&holdit, &vtx, vprev);
|
||||
heldit = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ClipSegment<comp, 1, attribs>(&temp[c], &vtx, vprev);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
|
||||
Vertex* vnext = &vertices[next];
|
||||
if (vnext->Position[comp] <= vnext->Position[3])
|
||||
@ -877,6 +887,12 @@ int ClipAgainstPlane(const GPU3D& gpu, Vertex* vertices, int nverts, int clipsta
|
||||
temp[c++] = vtx;
|
||||
}
|
||||
|
||||
if (heldit)
|
||||
{
|
||||
temp[c++] = holdit;
|
||||
}
|
||||
heldit = false;
|
||||
|
||||
nverts = c; c = clipstart;
|
||||
for (int i = clipstart; i < nverts; i++)
|
||||
{
|
||||
@ -888,10 +904,19 @@ int ClipAgainstPlane(const GPU3D& gpu, Vertex* vertices, int nverts, int clipsta
|
||||
{
|
||||
Vertex* vprev = &temp[prev];
|
||||
if (vprev->Position[comp] >= -vprev->Position[3])
|
||||
{
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
ClipSegment<comp, -1, attribs>(&holdit, &vtx, vprev);
|
||||
heldit = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ClipSegment<comp, -1, attribs>(&vertices[c], &vtx, vprev);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
|
||||
Vertex* vnext = &temp[next];
|
||||
if (vnext->Position[comp] >= -vnext->Position[3])
|
||||
@ -904,6 +929,11 @@ int ClipAgainstPlane(const GPU3D& gpu, Vertex* vertices, int nverts, int clipsta
|
||||
vertices[c++] = vtx;
|
||||
}
|
||||
|
||||
if (heldit)
|
||||
{
|
||||
vertices[c++] = holdit;
|
||||
}
|
||||
|
||||
// checkme
|
||||
for (int i = 0; i < c; i++)
|
||||
{
|
||||
|
@ -91,8 +91,7 @@ add_compile_definitions(ARCHIVE_SUPPORT_ENABLED)
|
||||
add_executable(melonDS ${SOURCES_QT_SDL})
|
||||
|
||||
add_subdirectory("../../net"
|
||||
"${CMAKE_BINARY_DIR}/net"
|
||||
)
|
||||
${CMAKE_BINARY_DIR}/net)
|
||||
|
||||
target_link_libraries(melonDS PRIVATE net-utils)
|
||||
|
||||
@ -171,10 +170,10 @@ if (BUILD_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../..")
|
||||
target_include_directories(melonDS PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../net")
|
||||
target_include_directories(melonDS PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
|
||||
if (USE_QT6)
|
||||
target_include_directories(melonDS PUBLIC ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||
else()
|
||||
|
@ -11,9 +11,9 @@ add_library(net-utils STATIC
|
||||
MPInterface.cpp
|
||||
)
|
||||
|
||||
target_include_directories(net-utils PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
target_include_directories(net-utils PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
|
||||
target_include_directories(net-utils PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
|
||||
option(USE_SYSTEM_LIBSLIRP "Use system libslirp instead of the bundled version" OFF)
|
||||
if (USE_SYSTEM_LIBSLIRP)
|
||||
|
Loading…
Reference in New Issue
Block a user