mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-02 02:23:56 +00:00
Support building isle as DOS app
This commit is contained in:
parent
57dfd0adde
commit
c52a5204a4
71
.github/actions/setup-djgpp-toolchain/action.yml
vendored
Normal file
71
.github/actions/setup-djgpp-toolchain/action.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
name: 'Setup DJGPP toolchain'
|
||||
description: 'Download DJGPP and setup CMake toolchain'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Calculate variables'
|
||||
id: calc
|
||||
shell: sh
|
||||
run: |
|
||||
version="12.2.0"
|
||||
case "${{ runner.os }}-${{ runner.arch }}" in
|
||||
"Linux-X86")
|
||||
archive="djgpp-linux32-gcc1220.tar.bz2"
|
||||
;;
|
||||
"Linux-X64")
|
||||
archive="djgpp-linux64-gcc1220.tar.bz2"
|
||||
;;
|
||||
"macOS-X86" | "macOS-X64" | "macOS-ARM64")
|
||||
archive="djgpp-osx-gcc1220.tar.bz2"
|
||||
;;
|
||||
"Windows-X86" | "Windows-X64")
|
||||
archive="djgpp-mingw-gcc1220.zip"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
echo "url=https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/${archive}" >> ${GITHUB_OUTPUT}
|
||||
echo "archive=${archive}" >> ${GITHUB_OUTPUT}
|
||||
echo "version=${version}" >> ${GITHUB_OUTPUT}
|
||||
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT}
|
||||
- name: 'Restore cached ${{ steps.calc.outputs.archive }}'
|
||||
id: cache-restore
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Download DJGPP ${{ steps.calc.outputs.version }} for ${{ runner.os }} (${{ runner.arch }})'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest "${{ steps.calc.outputs.url }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
- name: 'Cache ${{ steps.calc.outputs.archive }}'
|
||||
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
|
||||
key: ${{ steps.calc.outputs.cache-key }}
|
||||
- name: 'Extract DJGP archive'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$archive = "${{ steps.calc.outputs.archive }}";
|
||||
if ($archive.EndsWith(".bz2")) {
|
||||
# Remove ".bz2" suffix
|
||||
$tar_archive = $archive.Substring(0, $archive.Length - 4)
|
||||
7z "-o${{ runner.temp }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
7z "-o${{ runner.temp }}" x "${{ runner.temp }}/$tar_archive"
|
||||
} else {
|
||||
7z "-o${{ runner.temp }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
|
||||
}
|
||||
- name: 'Install Linux dependenciy'
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: sh
|
||||
run: |
|
||||
sudo apt-get install -y libfl-dev
|
||||
- name: 'Set output variables'
|
||||
id: final
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "${{ runner.temp }}/djgpp/bin" >> $env:GITHUB_PATH
|
||||
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
name: 'clang-format'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: Run clang-format
|
||||
run: |
|
||||
find CONFIG LEGO1 ISLE miniwin -iname '*.h' -o -iname '*.cpp' | xargs \
|
||||
@ -48,10 +48,11 @@ jobs:
|
||||
- { name: 'iOS', os: 'macos-15', generator: 'Xcode', dx5: false, config: false, brew: true, werror: true, clang-tidy: false, cmake-args: '-DCMAKE_SYSTEM_NAME=iOS', ios: true }
|
||||
- { name: 'Emscripten', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
||||
- { name: 'Nintendo 3DS', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, n3ds: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake' }
|
||||
- { name: 'Nintendo Switch', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, nx: true, werror: true, clang-tidy: false, container: 'devkitpro/devkita64:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake' }
|
||||
- { name: 'Nintendo Switch', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, nx: true, werror: true, clang-tidy: false, container: 'devkitpro/devkita64:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake' }
|
||||
- { name: 'Xbox One', os: 'windows-latest', generator: 'Visual Studio 17 2022', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64', cmake-args: '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0', xbox-one: true}
|
||||
- { name: 'Android', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, android: true, werror: true, clang-tidy: false,}
|
||||
- { name: 'Vita', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, vita: true, werror: true, clang-tidy: false, cmake-args: '--toolchain /usr/local/vitasdk/share/vita.toolchain.cmake'}
|
||||
- { name: 'DOS', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, dos: true, werror: true, clang-tidy: false, cmake-args: '--toolchain $GITHUB_WORKSPACE/CMake/i586-pc-msdosdjgpp.cmake'}
|
||||
steps:
|
||||
- name: Setup vcvars
|
||||
if: ${{ !!matrix.msvc }}
|
||||
@ -134,7 +135,7 @@ jobs:
|
||||
echo "$VITASDK/bin" >> $GITHUB_PATH
|
||||
./install-all.sh
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Checkout LFS
|
||||
if: ${{ matrix.build-assets }}
|
||||
@ -143,11 +144,15 @@ jobs:
|
||||
|
||||
- name: Setup Java (Android)
|
||||
if: ${{ matrix.android }}
|
||||
uses: actions/setup-java@v4
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: 'Set up DJGPP toolchain'
|
||||
uses: ./.github/actions/setup-djgpp-toolchain
|
||||
if: ${{ matrix.dos }}
|
||||
|
||||
- name: Get CMake (Android)
|
||||
if: ${{ matrix.android }}
|
||||
uses: lukka/get-cmake@latest
|
||||
@ -271,7 +276,7 @@ jobs:
|
||||
run: (cd build/assets && zip -r ../dist/isle-assets.zip .)
|
||||
|
||||
- name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: '${{ matrix.name }}'
|
||||
path: |
|
||||
@ -287,7 +292,7 @@ jobs:
|
||||
name: 'FreeBSD'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Build on FreeBSD
|
||||
uses: vmactions/freebsd-vm@v1
|
||||
@ -307,7 +312,7 @@ jobs:
|
||||
cd build && cpack .
|
||||
|
||||
- name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: 'FreeBSD'
|
||||
path: build/dist/isle-*
|
||||
@ -331,7 +336,7 @@ jobs:
|
||||
options: --privileged
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Build Flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
@ -345,7 +350,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install LLVM and Clang
|
||||
uses: KyleMayes/install-llvm-action@v1
|
||||
@ -389,14 +394,14 @@ jobs:
|
||||
- freebsd
|
||||
steps:
|
||||
- name: Download All Artifacts
|
||||
uses: actions/download-artifact@main
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: "*"
|
||||
path: Release
|
||||
merge-multiple: true
|
||||
|
||||
- name: Checkout uploadtool
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: 'probonopd/uploadtool'
|
||||
path: 'uploadtool'
|
||||
|
||||
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
@ -48,7 +48,7 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v2
|
||||
uses: actions/attest-build-provenance@v4
|
||||
with:
|
||||
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
|
||||
4
3rdparty/CMakeLists.txt
vendored
4
3rdparty/CMakeLists.txt
vendored
@ -5,8 +5,8 @@ if(DOWNLOAD_DEPENDENCIES)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
miniaudio
|
||||
URL https://github.com/mackron/miniaudio/archive/refs/tags/0.11.24.tar.gz
|
||||
URL_MD5 19e8eb21223c56a4a2d167d04decddc9
|
||||
URL https://github.com/mackron/miniaudio/archive/refs/tags/0.11.25.tar.gz
|
||||
URL_HASH MD5=6fae6da8f30afb3ddcba26fcaa64f540
|
||||
)
|
||||
block()
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
2
3rdparty/miniaudio
vendored
2
3rdparty/miniaudio
vendored
@ -1 +1 @@
|
||||
Subproject commit 13d161bc8d856ad61ae46b798bbeffc0f49808e8
|
||||
Subproject commit 9634bedb5b5a2ca38c1ee7108a9358a4e233f14d
|
||||
17
CMake/djgpp-platform-overrides.cmake
Normal file
17
CMake/djgpp-platform-overrides.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
# DJGPP platform overrides for DOS
|
||||
#
|
||||
# CMake's built-in Platform/DOS.cmake assumes OpenWatcom naming conventions
|
||||
# (no prefix, .lib suffix, CMAKE_LINK_LIBRARY_SUFFIX=".lib"). DJGPP uses
|
||||
# standard Unix/GCC conventions for its system libraries (lib prefix, .a
|
||||
# suffix — e.g. libm.a).
|
||||
#
|
||||
# This file is loaded via CMAKE_USER_MAKE_RULES_OVERRIDE in the toolchain
|
||||
# file, which runs *after* the platform module has set its defaults, giving
|
||||
# us the final say on these variables.
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(CMAKE_LINK_LIBRARY_SUFFIX "")
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".lib")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".exe")
|
||||
82
CMake/i586-pc-msdosdjgpp.cmake
Normal file
82
CMake/i586-pc-msdosdjgpp.cmake
Normal file
@ -0,0 +1,82 @@
|
||||
set(CMAKE_SYSTEM_NAME DOS)
|
||||
|
||||
set(DJGPP TRUE)
|
||||
|
||||
# CMake's Platform/DOS.cmake assumes OpenWatcom naming conventions (no prefix,
|
||||
# .lib suffix). DJGPP uses standard Unix/GCC conventions for its system
|
||||
# libraries (lib prefix, .a suffix — e.g. libm.a), so we override the platform
|
||||
# defaults via CMAKE_USER_MAKE_RULES_OVERRIDE, which runs *after* the platform
|
||||
# module has set its defaults, giving us the final say on these variables.
|
||||
# The path must be cached because CMake re-parses the toolchain file during
|
||||
# try_compile, where CMAKE_CURRENT_LIST_DIR may point elsewhere.
|
||||
set(DJGPP_PLATFORM_OVERRIDES "${CMAKE_CURRENT_LIST_DIR}/djgpp-platform-overrides.cmake" CACHE FILEPATH "" FORCE)
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${DJGPP_PLATFORM_OVERRIDES}")
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
|
||||
set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_IMPORT_LIBRARY_SUFFIX ".a")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".exe")
|
||||
set(CMAKE_LINK_LIBRARY_SUFFIX "")
|
||||
set(CMAKE_DL_LIBS "")
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
|
||||
#
|
||||
# CMake toolchain file for DJGPP. Usage:
|
||||
#
|
||||
# 1. Download and extract DGJPP
|
||||
# 2. Add directory containing i586-pc-msdosdjgpp-gcc to PATH environment variable
|
||||
# 3. When configuring your CMake project, specify the toolchain file like this:
|
||||
#
|
||||
# cmake -DCMAKE_TOOLCHAIN_FILE=path/to/i586-pc-msdosdjgpp.cmake ...
|
||||
#
|
||||
|
||||
# specify the cross compiler
|
||||
find_program(CMAKE_C_COMPILER NAMES "i586-pc-msdosdjgpp-gcc" "i386-pc-msdosdjgpp-gcc" REQUIRED)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES "i586-pc-msdosdjgpp-g++" "i386-pc-msdosdjgpp-g++" REQUIRED)
|
||||
|
||||
execute_process(COMMAND "${CMAKE_C_COMPILER}" -print-search-dirs
|
||||
RESULT_VARIABLE CC_SEARCH_DIRS_RESULT
|
||||
OUTPUT_VARIABLE CC_SEARCH_DIRS_OUTPUT)
|
||||
|
||||
if(CC_SEARCH_DIRS_RESULT)
|
||||
message(FATAL_ERROR "Could not determine search dirs")
|
||||
endif()
|
||||
|
||||
string(REGEX MATCH ".*libraries: (.*).*" CC_SD_LIBS "${CC_SEARCH_DIRS_OUTPUT}")
|
||||
string(STRIP "${CMAKE_MATCH_1}" CC_SEARCH_DIRS)
|
||||
string(REPLACE ":" ";" CC_SEARCH_DIRS "${CC_SEARCH_DIRS}")
|
||||
|
||||
foreach(CC_SEARCH_DIR ${CC_SEARCH_DIRS})
|
||||
if(CC_SEARCH_DIR MATCHES "=.*")
|
||||
string(REGEX MATCH "=(.*)" CC_LIB "${CC_SEARCH_DIR}")
|
||||
set(CC_SEARCH_DIR "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
if(IS_DIRECTORY "${CC_SEARCH_DIR}")
|
||||
if(IS_DIRECTORY "${CC_SEARCH_DIR}/../include" OR IS_DIRECTORY "${CC_SEARCH_DIR}/../lib" OR IS_DIRECTORY "${CC_SEARCH_DIR}/../bin")
|
||||
list(APPEND CC_ROOTS "${CC_SEARCH_DIR}/..")
|
||||
else()
|
||||
list(APPEND CC_ROOTS "${CC_SEARCH_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(APPEND CMAKE_FIND_ROOT_PATH ${CC_ROOTS})
|
||||
|
||||
# search for programs in the host directories
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# for libraries, headers and packages in the target directories
|
||||
if(NOT DEFINED CACHE{CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
endif()
|
||||
if(NOT DEFINED CACHE{CMAKE_FIND_ROOT_PATH_MODE_INCLUDE})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endif()
|
||||
if(NOT DEFINED CACHE{CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
endif()
|
||||
@ -86,15 +86,15 @@ option(ISLE_WERROR "Treat warnings as errors" 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;NOT WINDOWS_STORE" OFF)
|
||||
cmake_dependent_option(ISLE_USE_LWS "Use libwebsockets for native multiplayer" ON "ISLE_EXTENSIONS;NOT EMSCRIPTEN;NOT NINTENDO_3DS;NOT NINTENDO_SWITCH;NOT VITA" OFF)
|
||||
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN;NOT NINTENDO_3DS;NOT NINTENDO_SWITCH;NOT WINDOWS_STORE;NOT VITA" OFF)
|
||||
cmake_dependent_option(ISLE_USE_LWS "Use libwebsockets for native multiplayer" ON "ISLE_EXTENSIONS;NOT DOS;NOT EMSCRIPTEN;NOT NINTENDO_3DS;NOT NINTENDO_SWITCH;NOT VITA" OFF)
|
||||
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN;NOT DOS;NOT NINTENDO_3DS;NOT NINTENDO_SWITCH;NOT WINDOWS_STORE;NOT VITA" OFF)
|
||||
cmake_dependent_option(ISLE_COMPILE_SHADERS "Compile shaders" ON "SDL_SHADERCROSS_BIN;TARGET Python3::Interpreter" OFF)
|
||||
cmake_dependent_option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON "NOT VITA" OFF)
|
||||
cmake_dependent_option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON "NOT DOS;NOT VITA" OFF)
|
||||
option(ENABLE_CLANG_TIDY "Enable clang-tidy")
|
||||
option(DOWNLOAD_DEPENDENCIES "Download dependencies" ON)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" CACHE PATH "Directory where to put executables and dll")
|
||||
set(ISLE_EMSCRIPTEN_HOST "" CACHE STRING "Host URL for Emscripten streaming (e.g., https://test.com)")
|
||||
cmake_dependent_option(BUILD_SHARED_LIBS "Build lego1 as a shared library" ON "NOT EMSCRIPTEN;NOT VITA" OFF)
|
||||
cmake_dependent_option(BUILD_SHARED_LIBS "Build lego1 as a shared library" ON "NOT DOS;NOT EMSCRIPTEN;NOT VITA" OFF)
|
||||
|
||||
message(STATUS "Isle app: ${ISLE_BUILD_APP}")
|
||||
message(STATUS "Config app: ${ISLE_BUILD_CONFIG}")
|
||||
|
||||
@ -1251,7 +1251,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)));
|
||||
m_activeInBackground = iniparser_getboolean(dict, "isle:Active in Background", m_activeInBackground);
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x10001f80
|
||||
// FUNCTION: BETA10 0x10010a20
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
// FUNCTION: LEGO1 0x10002870
|
||||
// FUNCTION: BETA10 0x10048500
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -69,6 +69,10 @@ if(NOT (VITA OR WINDOWS_STORE))
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DOS)
|
||||
list(REMOVE_ITEM GRAPHICS_BACKENDS USE_SDL_GPU USE_OPENGL1 USE_OPENGLES2) #USE_SDL_GPU
|
||||
endif()
|
||||
|
||||
if(NINTENDO_SWITCH)
|
||||
# Remove USE_OPENGL1 as incompatible.
|
||||
# Remove everything else as not needed.
|
||||
|
||||
@ -64,14 +64,14 @@ void Direct3DRMSoftwareRenderer::ClearZBuffer()
|
||||
const float inf = std::numeric_limits<float>::infinity();
|
||||
size_t i = 0;
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
|
||||
#if (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)) && defined(__SSE2__)
|
||||
if (SDL_HasSSE2()) {
|
||||
__m128 inf4 = _mm_set1_ps(inf);
|
||||
for (; i + 4 <= size; i += 4) {
|
||||
_mm_storeu_ps(&m_zBuffer[i], inf4);
|
||||
}
|
||||
}
|
||||
#if defined(__i386__) || defined(_M_IX86)
|
||||
#if (defined(__i386__) || defined(_M_IX86)) && defined(__MMX__)
|
||||
else if (SDL_HasMMX()) {
|
||||
const __m64 mm_inf = _mm_set_pi32(0x7F800000, 0x7F800000);
|
||||
for (; i + 2 <= size; i += 2) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user