mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Use __declspec(dllexport) for exporting symbols from dll
Refactored CMake script such that all objects are passed to the lego1 library.
This commit is contained in:
parent
62f02e1dd4
commit
3ab4b264ad
237
CMakeLists.txt
237
CMakeLists.txt
@ -60,19 +60,6 @@ if (ENABLE_CLANG_TIDY)
|
||||
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_BIN}")
|
||||
endif()
|
||||
|
||||
set(MSVC_FOR_DECOMP FALSE)
|
||||
if (MSVC)
|
||||
# Visual C++ 4.2 -> cl version 10.2.0
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.0")
|
||||
set(MSVC_FOR_DECOMP TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(lego1_targets)
|
||||
macro(register_lego1_target __target)
|
||||
list(APPEND lego1_targets ${__target})
|
||||
endmacro()
|
||||
|
||||
function(add_cxx_warning WARNING)
|
||||
if(ISLE_WERROR)
|
||||
set(compiler_option "-Werror=${WARNING}")
|
||||
@ -104,14 +91,11 @@ endif()
|
||||
|
||||
add_subdirectory(3rdparty EXCLUDE_FROM_ALL SYSTEM)
|
||||
|
||||
message(STATUS "MSVC for decompilation: ${MSVC_FOR_DECOMP}")
|
||||
|
||||
option(ISLE_WERROR "Treat warnings as errors" OFF)
|
||||
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
|
||||
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "NOT MINGW" OFF)
|
||||
option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ${NOT_MINGW})
|
||||
cmake_dependent_option(ISLE_D3DRM_FROM_WINE "Use d3drm from wine" "${MINGW}" "NOT ISLE_USE_DX5" OFF)
|
||||
option(ISLE_DECOMP_ASSERT "Assert struct size" ${MSVC_FOR_DECOMP})
|
||||
|
||||
message(STATUS "Using internal DirectX5 SDK: ${ISLE_USE_DX5}")
|
||||
message(STATUS "Using d3drm from wine: ${ISLE_D3DRM_FROM_WINE}")
|
||||
@ -127,8 +111,20 @@ add_subdirectory(3rdparty/d3drm EXCLUDE_FROM_ALL)
|
||||
add_library(Vec::Vec INTERFACE IMPORTED)
|
||||
target_include_directories(Vec::Vec INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/vec")
|
||||
|
||||
set(lego1_targets)
|
||||
macro(add_lego1_static_library NAME)
|
||||
list(APPEND lego1_targets ${NAME})
|
||||
add_library(${NAME}-interface INTERFACE)
|
||||
add_library(${NAME}-objects STATIC ${ARGN})
|
||||
target_link_libraries(${NAME}-objects PRIVATE ${NAME}-interface)
|
||||
|
||||
add_library(tglrl STATIC
|
||||
target_include_directories(${NAME}-objects PRIVATE $<$<BOOL:${ISLE_D3DRM_FROM_WINE}>:$<TARGET_PROPERTY:d3drm-wine,INTERFACE_INCLUDE_DIRECTORIES>>)
|
||||
target_link_libraries(${NAME}-interface INTERFACE $<$<BOOL:${ISLE_USE_DX5}>:DirectX5::DirectX5> SDL3::SDL3)
|
||||
target_compile_definitions(${NAME}-objects PRIVATE $<$<BOOL:${ISLE_USE_DX5}>:DIRECTX5_SDK>)
|
||||
target_compile_definitions(${NAME}-objects PRIVATE $<$<BOOL:${ISLE_D3DRM_FROM_WINE}>:D3DRM_WINE>)
|
||||
endmacro()
|
||||
|
||||
add_lego1_static_library(tglrl
|
||||
LEGO1/tgl/d3drm/camera.cpp
|
||||
LEGO1/tgl/d3drm/device.cpp
|
||||
LEGO1/tgl/d3drm/group.cpp
|
||||
@ -139,90 +135,74 @@ add_library(tglrl STATIC
|
||||
LEGO1/tgl/d3drm/texture.cpp
|
||||
LEGO1/tgl/d3drm/view.cpp
|
||||
)
|
||||
register_lego1_target(tglrl)
|
||||
set_property(TARGET tglrl PROPERTY ARCHIVE_OUTPUT_NAME "tglrl40$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(tglrl PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_include_directories(tglrl-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
if(ISLE_D3DRM_FROM_WINE)
|
||||
target_link_libraries(tglrl PRIVATE d3drm-wine)
|
||||
target_link_libraries(tglrl-interface INTERFACE d3drm-wine)
|
||||
else()
|
||||
target_link_libraries(tglrl PRIVATE d3drm)
|
||||
target_link_libraries(tglrl-interface INTERFACE d3drm)
|
||||
endif()
|
||||
|
||||
add_library(realtime STATIC
|
||||
add_lego1_static_library(realtime
|
||||
LEGO1/realtime/matrix.cpp
|
||||
LEGO1/realtime/orientableroi.cpp
|
||||
LEGO1/realtime/realtime.cpp
|
||||
LEGO1/realtime/realtimeview.cpp
|
||||
LEGO1/realtime/vector.cpp
|
||||
)
|
||||
register_lego1_target(realtime)
|
||||
set_property(TARGET realtime PROPERTY ARCHIVE_OUTPUT_NAME "realtime$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(realtime PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(realtime PRIVATE Vec::Vec)
|
||||
target_include_directories(realtime-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(realtime-interface INTERFACE Vec::Vec)
|
||||
|
||||
add_library(viewmanager STATIC
|
||||
add_lego1_static_library(viewmanager
|
||||
LEGO1/viewmanager/viewlod.cpp
|
||||
LEGO1/viewmanager/viewlodlist.cpp
|
||||
LEGO1/viewmanager/viewmanager.cpp
|
||||
LEGO1/viewmanager/viewroi.cpp
|
||||
)
|
||||
register_lego1_target(viewmanager)
|
||||
set_property(TARGET viewmanager PROPERTY ARCHIVE_OUTPUT_NAME "viewmanager$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(viewmanager PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(viewmanager PRIVATE Vec::Vec)
|
||||
target_include_directories(viewmanager-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(viewmanager-interface INTERFACE Vec::Vec)
|
||||
|
||||
add_library(mxdirectx STATIC
|
||||
add_lego1_static_library(mxdirectx
|
||||
LEGO1/mxdirectx/mxdirect3d.cpp
|
||||
LEGO1/mxdirectx/mxdirectdraw.cpp
|
||||
LEGO1/mxdirectx/mxdirectxinfo.cpp
|
||||
LEGO1/mxdirectx/legodxinfo.cpp
|
||||
)
|
||||
register_lego1_target(mxdirectx)
|
||||
set_property(TARGET mxdirectx PROPERTY ARCHIVE_OUTPUT_NAME "MxDirectX$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(mxdirectx PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(mxdirectx PRIVATE ddraw)
|
||||
target_include_directories(mxdirectx-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(mxdirectx-interface INTERFACE ddraw)
|
||||
|
||||
add_library(roi STATIC
|
||||
add_lego1_static_library(roi
|
||||
LEGO1/lego/sources/roi/legolod.cpp
|
||||
LEGO1/lego/sources/roi/legoroi.cpp
|
||||
)
|
||||
register_lego1_target(roi)
|
||||
set_property(TARGET roi PROPERTY ARCHIVE_OUTPUT_NAME "roi$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(roi PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(roi PRIVATE viewmanager Vec::Vec)
|
||||
target_include_directories(roi-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(roi-interface INTERFACE viewmanager-interface Vec::Vec)
|
||||
|
||||
add_library(geom STATIC
|
||||
add_lego1_static_library(geom
|
||||
LEGO1/lego/sources/geom/legoedge.cpp
|
||||
LEGO1/lego/sources/geom/legounkown100db7f4.cpp
|
||||
LEGO1/lego/sources/geom/legoweedge.cpp
|
||||
LEGO1/lego/sources/geom/legowegedge.cpp
|
||||
)
|
||||
register_lego1_target(geom)
|
||||
set_property(TARGET geom PROPERTY ARCHIVE_OUTPUT_NAME "geom$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(geom PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(geom PRIVATE)
|
||||
target_include_directories(geom-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(geom-interface INTERFACE)
|
||||
|
||||
add_library(shape STATIC
|
||||
add_lego1_static_library(shape
|
||||
LEGO1/lego/sources/shape/legocolor.cpp
|
||||
LEGO1/lego/sources/shape/legobox.cpp
|
||||
LEGO1/lego/sources/shape/legomesh.cpp
|
||||
LEGO1/lego/sources/shape/legosphere.cpp
|
||||
LEGO1/lego/sources/shape/legovertex.cpp
|
||||
)
|
||||
register_lego1_target(shape)
|
||||
set_property(TARGET shape PROPERTY ARCHIVE_OUTPUT_NAME "shape$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(shape PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(shape PRIVATE)
|
||||
target_include_directories(shape-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(shape-interface INTERFACE)
|
||||
|
||||
add_library(anim STATIC
|
||||
add_lego1_static_library(anim
|
||||
LEGO1/lego/sources/anim/legoanim.cpp
|
||||
)
|
||||
register_lego1_target(anim)
|
||||
set_property(TARGET anim PROPERTY ARCHIVE_OUTPUT_NAME "anim$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(anim PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(anim PRIVATE)
|
||||
target_include_directories(anim-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(anim-interface INTERFACE)
|
||||
|
||||
add_library(misc STATIC
|
||||
add_lego1_static_library(misc
|
||||
LEGO1/lego/sources/misc/legocontainer.cpp
|
||||
LEGO1/lego/sources/misc/legoimage.cpp
|
||||
LEGO1/lego/sources/misc/legostorage.cpp
|
||||
@ -230,23 +210,19 @@ add_library(misc STATIC
|
||||
LEGO1/lego/sources/misc/legotree.cpp
|
||||
LEGO1/lego/sources/misc/legounknown.cpp
|
||||
)
|
||||
register_lego1_target(misc)
|
||||
set_property(TARGET misc PROPERTY ARCHIVE_OUTPUT_NAME "misc$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(misc PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(misc PRIVATE)
|
||||
target_include_directories(misc-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(misc-interface INTERFACE)
|
||||
|
||||
add_library(3dmanager STATIC
|
||||
add_lego1_static_library(3dmanager
|
||||
LEGO1/lego/sources/3dmanager/lego3dmanager.cpp
|
||||
LEGO1/lego/sources/3dmanager/lego3dview.cpp
|
||||
LEGO1/lego/sources/3dmanager/legoview1.cpp
|
||||
LEGO1/lego/sources/3dmanager/tglsurface.cpp
|
||||
)
|
||||
register_lego1_target(3dmanager)
|
||||
set_property(TARGET 3dmanager PROPERTY ARCHIVE_OUTPUT_NAME "3dmanager$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(3dmanager PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(3dmanager PRIVATE Vec::Vec)
|
||||
target_include_directories(3dmanager-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(3dmanager-interface INTERFACE Vec::Vec)
|
||||
|
||||
add_library(omni STATIC
|
||||
add_lego1_static_library(omni
|
||||
LEGO1/omni/src/action/mxdsaction.cpp
|
||||
LEGO1/omni/src/action/mxdsanim.cpp
|
||||
LEGO1/omni/src/action/mxdsevent.cpp
|
||||
@ -324,12 +300,10 @@ add_library(omni STATIC
|
||||
LEGO1/omni/src/video/mxvideoparamflags.cpp
|
||||
LEGO1/omni/src/video/mxvideopresenter.cpp
|
||||
)
|
||||
register_lego1_target(omni)
|
||||
set_property(TARGET omni PROPERTY ARCHIVE_OUTPUT_NAME "omni$<$<CONFIG:Debug>:d>")
|
||||
target_include_directories(omni PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(omni PRIVATE winmm libsmacker miniaudio)
|
||||
target_include_directories(omni-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||
target_link_libraries(omni-interface INTERFACE winmm libsmacker miniaudio)
|
||||
|
||||
add_library(lego1 SHARED
|
||||
add_lego1_static_library(lego1_impl
|
||||
LEGO1/define.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act2actor.cpp
|
||||
LEGO1/lego/legoomni/src/actors/act2genactor.cpp
|
||||
@ -442,41 +416,33 @@ add_library(lego1 SHARED
|
||||
LEGO1/lego/legoomni/src/worlds/police.cpp
|
||||
LEGO1/lego/legoomni/src/worlds/registrationbook.cpp
|
||||
LEGO1/lego/legoomni/src/worlds/score.cpp
|
||||
LEGO1/main.cpp
|
||||
LEGO1/modeldb/modeldb.cpp
|
||||
)
|
||||
register_lego1_target(lego1)
|
||||
target_include_directories(lego1_impl-interface INTERFACE "${CMAKE_SOURCE_DIR}/util")
|
||||
target_include_directories(lego1_impl-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1")
|
||||
target_include_directories(lego1_impl-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include")
|
||||
target_include_directories(lego1_impl-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources")
|
||||
target_include_directories(lego1_impl-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/lego/legoomni/include")
|
||||
target_include_directories(lego1_impl-interface INTERFACE "${CMAKE_SOURCE_DIR}/LEGO1/lego/legoomni/include/actions")
|
||||
target_link_libraries(lego1_impl-interface INTERFACE omni-interface Vec::Vec)
|
||||
|
||||
if (MINGW)
|
||||
target_compile_definitions(lego1 PRIVATE DIRECTINPUT_VERSION=0x0500)
|
||||
if(MINGW)
|
||||
target_compile_definitions(lego1_impl-interface INTERFACE DIRECTINPUT_VERSION=0x0500)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
target_sources(lego1 PRIVATE LEGO1/LegoOmni.def)
|
||||
else()
|
||||
target_sources(lego1 PRIVATE LEGO1/LegoOmni64.def)
|
||||
endif()
|
||||
else()
|
||||
target_sources(lego1 PRIVATE LEGO1/LegoOmni.mingw.def)
|
||||
endif()
|
||||
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/util")
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1")
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1/omni/include")
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1/lego/sources")
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1/lego/legoomni/include")
|
||||
target_include_directories(lego1 PUBLIC "${CMAKE_SOURCE_DIR}/LEGO1/lego/legoomni/include/actions")
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(lego1 PRIVATE tglrl viewmanager realtime mxdirectx roi geom anim Vec::Vec dxguid d3drm_guid misc 3dmanager miniaudio omni shape)
|
||||
|
||||
foreach(tgt IN LISTS lego1_targets)
|
||||
target_include_directories(${tgt} PRIVATE $<$<BOOL:${ISLE_D3DRM_FROM_WINE}>:$<TARGET_PROPERTY:d3drm-wine,INTERFACE_INCLUDE_DIRECTORIES>>)
|
||||
target_link_libraries(${tgt} PRIVATE $<$<BOOL:${ISLE_USE_DX5}>:DirectX5::DirectX5> SDL3::SDL3)
|
||||
target_compile_definitions(${tgt} PRIVATE $<$<BOOL:${ISLE_USE_DX5}>:DIRECTX5_SDK>)
|
||||
target_compile_definitions(${tgt} PRIVATE $<$<BOOL:${ISLE_D3DRM_FROM_WINE}>:D3DRM_WINE>)
|
||||
set(lego1_objects)
|
||||
set(lego1_link_libraries dxguid)
|
||||
foreach(lego1_library IN LISTS lego1_targets)
|
||||
message("lego1_library:${lego1_library}")
|
||||
target_compile_definitions(${lego1_library}-objects PRIVATE LEGO1_DLL)
|
||||
list(APPEND lego1_objects $<TARGET_OBJECTS:${lego1_library}-objects>)
|
||||
list(APPEND lego1_link_libraries ${lego1_library}-interface)
|
||||
endforeach()
|
||||
add_library(lego1 SHARED
|
||||
LEGO1/main.cpp
|
||||
${lego1_objects}
|
||||
)
|
||||
target_link_libraries(lego1 PUBLIC ${lego1_link_libraries})
|
||||
|
||||
# Make sure filenames are ALL CAPS
|
||||
set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1)
|
||||
@ -565,73 +531,6 @@ if(MSVC)
|
||||
target_link_options(lego1 PRIVATE "/SAFESEH:NO")
|
||||
endif()
|
||||
|
||||
if (ISLE_DECOMP_ASSERT)
|
||||
message(STATUS "Decomp asserts enabled")
|
||||
foreach(tgt IN LISTS lego1_targets)
|
||||
target_compile_definitions(${tgt} PRIVATE "ENABLE_DECOMP_ASSERTS")
|
||||
endforeach()
|
||||
|
||||
if (TARGET isle)
|
||||
target_compile_definitions(isle PRIVATE "ENABLE_DECOMP_ASSERTS")
|
||||
endif()
|
||||
if (TARGET config)
|
||||
target_compile_definitions(config PRIVATE "ENABLE_DECOMP_ASSERTS")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC_FOR_DECOMP)
|
||||
# These flags have been taken from the defaults for a Visual C++ 4.20 project (the compiler the
|
||||
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
|
||||
# They ensure a recompilation that can be byte/instruction accurate to the original binaries.
|
||||
if (ISLE_BUILD_APP)
|
||||
target_link_options(isle PRIVATE "/OPT:REF")
|
||||
set_property(TARGET isle ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
# Equivalent to target_compile_options(... PRIVATE "/MT$<$<CONFIG:Debug>:d>")
|
||||
set_property(TARGET lego1 ${lego1_targets} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "/W3 /GX /D \"WIN32\" /D \"_WINDOWS\"")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "/Gm /Zi /Od /D \"_DEBUG\"")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /D \"NDEBUG\"")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /O2 /D \"NDEBUG\"")
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "/Os /D \"NDEBUG\"")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "/machine:I386")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/incremental:yes /debug")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/incremental:no")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/incremental:no /debug")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "/incremental:no")
|
||||
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "/machine:I386")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "/machine:I386")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/incremental:yes /debug")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/incremental:no")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/incremental:no /debug")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "/incremental:no")
|
||||
|
||||
# Older MSVC versions don't support building in parallel.
|
||||
# Force non-parallel builds of isle and lego1 by putting them in a pool with 1 available job.
|
||||
if (CMAKE_CXX_COMPILER_ID VERSION_LESS 12)
|
||||
foreach(tgt IN LISTS lego1_targets)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_${tgt}=1")
|
||||
set_property(TARGET ${tgt} PROPERTY JOB_POOL_COMPILE "msvc_${tgt}")
|
||||
set_property(TARGET ${tgt} PROPERTY JOB_POOL_LINK "msvc_${tgt}")
|
||||
endforeach()
|
||||
if (TARGET isle)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_isle=1")
|
||||
set_property(TARGET isle PROPERTY JOB_POOL_COMPILE "msvc_isle")
|
||||
set_property(TARGET isle PROPERTY JOB_POOL_LINK "msvc_isle")
|
||||
endif()
|
||||
if (TARGET config)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS "msvc_config=1")
|
||||
set_property(TARGET config PROPERTY JOB_POOL_COMPILE "msvc_config")
|
||||
set_property(TARGET config PROPERTY JOB_POOL_LINK "msvc_config")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_program(CLANGFORMAT_BIN NAMES clang-format)
|
||||
if(EXISTS "${CLANGFORMAT_BIN}")
|
||||
execute_process(COMMAND "${CLANGFORMAT_BIN}" --version
|
||||
|
||||
@ -185,12 +185,12 @@ MxS32 IsleApp::SetupLegoOmni()
|
||||
#ifdef COMPAT_MODE
|
||||
MxS32 failure;
|
||||
{
|
||||
MxOmniCreateParam param(mediaPath, (struct HWND__*) hwnd, m_videoParam, MxOmniCreateFlags());
|
||||
MxOmniCreateParam param(mediaPath, hwnd, m_videoParam, MxOmniCreateFlags());
|
||||
failure = Lego()->Create(param) == FAILURE;
|
||||
}
|
||||
#else
|
||||
MxS32 failure =
|
||||
Lego()->Create(MxOmniCreateParam(mediaPath, (struct HWND__*) hwnd, m_videoParam, MxOmniCreateFlags())) ==
|
||||
Lego()->Create(MxOmniCreateParam(mediaPath, hwnd, m_videoParam, MxOmniCreateFlags())) ==
|
||||
FAILURE;
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef ISLEAPP_H
|
||||
#define ISLEAPP_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "legoutils.h"
|
||||
#include "mxtypes.h"
|
||||
#include "mxvideoparam.h"
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOANIMATIONMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "legolocations.h"
|
||||
#include "legomain.h"
|
||||
#include "legostate.h"
|
||||
@ -196,7 +197,7 @@ class LegoAnimationManager : public MxCore {
|
||||
MxResult FUN_10064880(const char* p_name, MxS32 p_unk0x0c, MxS32 p_unk0x10);
|
||||
MxBool FUN_10064ee0(MxU32 p_objectId);
|
||||
|
||||
static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
|
||||
LEGO1_EXPORT static void configureLegoAnimationManager(MxS32 p_legoAnimationManagerConfig);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1005ed10
|
||||
// LegoAnimationManager::`scalar deleting destructor'
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOBUILDINGMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "misc/legotypes.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
@ -63,7 +64,7 @@ class LegoBuildingManager : public MxCore {
|
||||
return "LegoBuildingManager";
|
||||
}
|
||||
|
||||
static void configureLegoBuildingManager(MxS32);
|
||||
LEGO1_EXPORT static void configureLegoBuildingManager(MxS32);
|
||||
static void SetCustomizeAnimFile(const char* p_value);
|
||||
|
||||
void Init();
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "actionsfwd.h"
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
#include <string.h>
|
||||
@ -144,24 +145,24 @@ class LegoGameState {
|
||||
undefined2 m_unk0x372; // 0x372
|
||||
};
|
||||
|
||||
LegoGameState();
|
||||
LEGO1_EXPORT LegoGameState();
|
||||
~LegoGameState();
|
||||
|
||||
void SetActor(MxU8 p_actorId);
|
||||
void RemoveActor();
|
||||
void ResetROI();
|
||||
|
||||
MxResult Save(MxULong);
|
||||
LEGO1_EXPORT MxResult Save(MxULong);
|
||||
MxResult DeleteState();
|
||||
MxResult Load(MxULong);
|
||||
|
||||
void SerializePlayersInfo(MxS16 p_flags);
|
||||
LEGO1_EXPORT void SerializePlayersInfo(MxS16 p_flags);
|
||||
MxResult AddPlayer(Username& p_player);
|
||||
void SwitchPlayer(MxS16 p_playerId);
|
||||
MxS16 FindPlayer(Username& p_player);
|
||||
|
||||
void SerializeScoreHistory(MxS16 p_flags);
|
||||
void SetSavePath(char*);
|
||||
LEGO1_EXPORT void SerializeScoreHistory(MxS16 p_flags);
|
||||
LEGO1_EXPORT void SetSavePath(char*);
|
||||
|
||||
LegoState* GetState(const char* p_stateName);
|
||||
LegoState* CreateState(const char* p_stateName);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOINPUTMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "legoeventnotificationparam.h"
|
||||
#include "mxlist.h"
|
||||
#include "mxpresenter.h"
|
||||
@ -85,7 +86,7 @@ class LegoInputManager : public MxPresenter {
|
||||
LegoInputManager();
|
||||
~LegoInputManager() override;
|
||||
|
||||
void QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key);
|
||||
LEGO1_EXPORT void QueueEvent(NotificationId p_id, MxU8 p_modifier, MxLong p_x, MxLong p_y, MxU8 p_key);
|
||||
void Register(MxCore*);
|
||||
void UnRegister(MxCore*);
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOMAIN_H
|
||||
|
||||
#include "compat.h"
|
||||
#include "lego1_export.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxomni.h"
|
||||
|
||||
@ -133,8 +134,8 @@ class LegoOmni : public MxOmni {
|
||||
void AddWorld(LegoWorld* p_world);
|
||||
void DeleteWorld(LegoWorld* p_world);
|
||||
void FUN_1005b4f0(MxBool p_disable, MxU16 p_flags);
|
||||
void CreateBackgroundAudio();
|
||||
void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId);
|
||||
LEGO1_EXPORT void CreateBackgroundAudio();
|
||||
LEGO1_EXPORT void RemoveWorld(const MxAtomId& p_atom, MxLong p_objectId);
|
||||
MxResult RegisterWorlds();
|
||||
const char* GetWorldName(LegoOmni::World p_id);
|
||||
MxAtomId* GetWorldAtom(LegoOmni::World p_id);
|
||||
@ -142,8 +143,8 @@ class LegoOmni : public MxOmni {
|
||||
void DeleteAction();
|
||||
|
||||
static MxS32 GetCurrPathInfo(LegoPathBoundary**, MxS32&);
|
||||
static void CreateInstance();
|
||||
static LegoOmni* GetInstance();
|
||||
LEGO1_EXPORT static void CreateInstance();
|
||||
LEGO1_EXPORT static LegoOmni* GetInstance();
|
||||
|
||||
LegoVideoManager* GetVideoManager() { return (LegoVideoManager*) m_videoManager; }
|
||||
LegoSoundManager* GetSoundManager() { return (LegoSoundManager*) m_soundManager; }
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOMODELPRESENTER_H
|
||||
#define LEGOMODELPRESENTER_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxvideopresenter.h"
|
||||
|
||||
class LegoROI;
|
||||
@ -18,7 +19,7 @@ class LegoModelPresenter : public MxVideoPresenter {
|
||||
// FUNCTION: LEGO1 0x10067a10
|
||||
~LegoModelPresenter() override { Destroy(TRUE); }
|
||||
|
||||
static void configureLegoModelPresenter(MxS32 p_modelPresenterConfig);
|
||||
LEGO1_EXPORT static void configureLegoModelPresenter(MxS32 p_modelPresenterConfig);
|
||||
|
||||
// FUNCTION: BETA10 0x100a7180
|
||||
static const char* HandlerClassName()
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOPARTPRESENTER_H
|
||||
#define LEGOPARTPRESENTER_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "legonamedpartlist.h"
|
||||
#include "mxmediapresenter.h"
|
||||
|
||||
@ -37,7 +38,7 @@ class LegoPartPresenter : public MxMediaPresenter {
|
||||
MxResult AddToManager() override; // vtable+0x34
|
||||
void Destroy() override; // vtable+0x38
|
||||
|
||||
static void configureLegoPartPresenter(MxS32, MxS32);
|
||||
LEGO1_EXPORT static void configureLegoPartPresenter(MxS32, MxS32);
|
||||
|
||||
// SYNTHETIC: LEGO1 0x1000d060
|
||||
// LegoPartPresenter::`scalar deleting destructor'
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOVIDEOMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "legophonemelist.h"
|
||||
#include "mxvideomanager.h"
|
||||
|
||||
@ -26,11 +27,11 @@ class LegoVideoManager : public MxVideoManager {
|
||||
LegoVideoManager();
|
||||
~LegoVideoManager() override;
|
||||
|
||||
int EnableRMDevice();
|
||||
LEGO1_EXPORT int EnableRMDevice();
|
||||
int DisableRMDevice();
|
||||
void EnableFullScreenMovie(MxBool p_enable);
|
||||
void EnableFullScreenMovie(MxBool p_enable, MxBool p_scale);
|
||||
void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY);
|
||||
LEGO1_EXPORT void EnableFullScreenMovie(MxBool p_enable, MxBool p_scale);
|
||||
LEGO1_EXPORT void MoveCursor(MxS32 p_cursorX, MxS32 p_cursorY);
|
||||
void ToggleFPS(MxBool p_visible);
|
||||
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOWORLDPRESENTER_H
|
||||
#define LEGOWORLDPRESENTER_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "legoentitypresenter.h"
|
||||
|
||||
#include <SDL3/SDL_iostream.h>
|
||||
@ -16,7 +17,7 @@ class LegoWorldPresenter : public LegoEntityPresenter {
|
||||
LegoWorldPresenter();
|
||||
~LegoWorldPresenter() override; // vtable+0x00
|
||||
|
||||
static void configureLegoWorldPresenter(MxS32 p_legoWorldPresenterQuality);
|
||||
LEGO1_EXPORT static void configureLegoWorldPresenter(MxS32 p_legoWorldPresenterQuality);
|
||||
|
||||
// FUNCTION: BETA10 0x100e41c0
|
||||
static const char* HandlerClassName()
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include "decomp.h"
|
||||
// Long include path due to dependency of misc library on LegoOmni
|
||||
#include "lego/legoomni/include/actions/actionsfwd.h"
|
||||
#include "lego1_export.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class LegoAnimationManager;
|
||||
@ -31,13 +32,13 @@ class ViewManager;
|
||||
|
||||
extern MxBool g_isWorldActive;
|
||||
|
||||
LegoOmni* Lego();
|
||||
LEGO1_EXPORT LegoOmni* Lego();
|
||||
LegoSoundManager* SoundManager();
|
||||
LegoVideoManager* VideoManager();
|
||||
MxBackgroundAudioManager* BackgroundAudioManager();
|
||||
LegoInputManager* InputManager();
|
||||
LEGO1_EXPORT LegoVideoManager* VideoManager();
|
||||
LEGO1_EXPORT MxBackgroundAudioManager* BackgroundAudioManager();
|
||||
LEGO1_EXPORT LegoInputManager* InputManager();
|
||||
LegoControlManager* ControlManager();
|
||||
LegoGameState* GameState();
|
||||
LEGO1_EXPORT LegoGameState* GameState();
|
||||
LegoAnimationManager* AnimationManager();
|
||||
LegoNavController* NavController();
|
||||
LegoPathActor* UserActor();
|
||||
@ -57,7 +58,7 @@ void DeleteAction();
|
||||
LegoWorld* FindWorld(const MxAtomId& p_atom, MxS32 p_entityid);
|
||||
MxDSAction& GetCurrentAction();
|
||||
void SetCurrentWorld(LegoWorld* p_world);
|
||||
MxTransitionManager* TransitionManager();
|
||||
LEGO1_EXPORT MxTransitionManager* TransitionManager();
|
||||
void PlayMusic(JukeboxScript::Script p_objectId);
|
||||
void SetIsWorldActive(MxBool p_isWorldActive);
|
||||
void DeleteObjects(MxAtomId* p_id, MxS32 p_first, MxS32 p_last);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXBACKGROUNDAUDIOMANAGER_H
|
||||
#define MXBACKGROUNDAUDIOMANAGER_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxcore.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxpresenter.h"
|
||||
@ -43,7 +44,7 @@ class MxBackgroundAudioManager : public MxCore {
|
||||
void FUN_1007ef40();
|
||||
void FadeInOrFadeOut();
|
||||
|
||||
void Enable(MxBool p_enable);
|
||||
LEGO1_EXPORT void Enable(MxBool p_enable);
|
||||
virtual MxResult Create(MxAtomId& p_script, MxU32 p_frequencyMS);
|
||||
|
||||
void Init();
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define MXTRANSITIONMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
#include <ddraw.h>
|
||||
@ -17,7 +18,7 @@ class MxTransitionManager : public MxCore {
|
||||
MxTransitionManager();
|
||||
~MxTransitionManager() override; // vtable+0x00
|
||||
|
||||
void SetWaitIndicator(MxVideoPresenter* p_waitIndicator);
|
||||
LEGO1_EXPORT void SetWaitIndicator(MxVideoPresenter* p_waitIndicator);
|
||||
|
||||
MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOROI_H
|
||||
#define LEGOROI_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "misc/legotypes.h"
|
||||
#include "viewmanager/viewroi.h"
|
||||
|
||||
@ -53,7 +54,7 @@ class LegoROI : public ViewROI {
|
||||
|
||||
static LegoResult FUN_100a8cb0(LegoAnimNodeData* p_data, LegoTime p_time, Matrix4& p_matrix);
|
||||
static void FUN_100a81b0(const LegoChar* p_error, const LegoChar* p_name);
|
||||
static void configureLegoROI(int p_roi);
|
||||
LEGO1_EXPORT static void configureLegoROI(int p_roi);
|
||||
static void FUN_100a9d30(ROIHandler p_func);
|
||||
static LegoBool FUN_100a9bf0(const LegoChar* p_param, float& p_red, float& p_green, float& p_blue, float& p_alpha);
|
||||
static LegoBool ColorAliasLookup(
|
||||
|
||||
20
LEGO1/lego1_export.h
Normal file
20
LEGO1/lego1_export.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef LEGO1_EXPORT_H
|
||||
#define LEGO1_EXPORT_H
|
||||
|
||||
#ifdef LEGO1_STATIC
|
||||
# define LEGO1_EXPORT
|
||||
#elif defined(LEGO1_DLL)
|
||||
# ifdef _WIN32
|
||||
# define LEGO1_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define LEGO1_EXPORT __attribute__((visibility("default")))
|
||||
# endif
|
||||
#else
|
||||
# ifdef _WIN32
|
||||
# define LEGO1_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define LEGO1_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXDIRECTDRAW_H
|
||||
#define MXDIRECTDRAW_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxdirectxinfo.h"
|
||||
|
||||
#include <ddraw.h>
|
||||
@ -12,7 +13,7 @@ class MxDirectDraw {
|
||||
public:
|
||||
typedef void (*ErrorHandler)(const char*, HRESULT, void*);
|
||||
|
||||
static int GetPrimaryBitDepth();
|
||||
LEGO1_EXPORT static int GetPrimaryBitDepth();
|
||||
|
||||
MxDirectDraw();
|
||||
virtual ~MxDirectDraw();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXATOM_H
|
||||
#define MXATOM_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxstl/stlcompat.h"
|
||||
#include "mxstring.h"
|
||||
#include "mxtypes.h"
|
||||
@ -61,9 +62,9 @@ enum LookupMode {
|
||||
class MxAtomId {
|
||||
public:
|
||||
MxAtomId(const char*, LookupMode);
|
||||
~MxAtomId();
|
||||
LEGO1_EXPORT ~MxAtomId();
|
||||
|
||||
MxAtomId& operator=(const MxAtomId& p_atomId);
|
||||
LEGO1_EXPORT MxAtomId& operator=(const MxAtomId& p_atomId);
|
||||
|
||||
// FUNCTION: BETA10 0x100178d0
|
||||
MxBool operator==(const MxAtomId& p_atomId) const { return this->m_internal == p_atomId.m_internal; }
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXDSACTION_H
|
||||
#define MXDSACTION_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxdsobject.h"
|
||||
#include "mxgeometry/mxgeometry3d.h"
|
||||
#include "mxtypes.h"
|
||||
@ -25,8 +26,8 @@ class MxDSAction : public MxDSObject {
|
||||
c_bit11 = 0x400,
|
||||
};
|
||||
|
||||
MxDSAction();
|
||||
~MxDSAction() override;
|
||||
LEGO1_EXPORT MxDSAction();
|
||||
LEGO1_EXPORT ~MxDSAction() override;
|
||||
|
||||
MxDSAction(MxDSAction& p_dsAction);
|
||||
void CopyFrom(MxDSAction& p_dsAction);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXDSFILE_H
|
||||
#define MXDSFILE_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxdssource.h"
|
||||
#include "mxio.h"
|
||||
#include "mxstring.h"
|
||||
@ -24,7 +25,7 @@ class MxDSFile : public MxDSSource {
|
||||
// since it is inlined everywhere in LEGO1.DLL
|
||||
// FUNCTION: LEGO1 0x100bfed0
|
||||
// FUNCTION: BETA10 0x10148ac0
|
||||
__declspec(dllexport) ~MxDSFile() override { Close(); }
|
||||
LEGO1_EXPORT ~MxDSFile() override { Close(); }
|
||||
#endif
|
||||
|
||||
// FUNCTION: LEGO1 0x100c0120
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXMISC_H
|
||||
#define MXMISC_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class MxAtomSet;
|
||||
@ -15,13 +16,13 @@ class MxTimer;
|
||||
class MxVariableTable;
|
||||
class MxVideoManager;
|
||||
|
||||
MxTickleManager* TickleManager();
|
||||
MxTimer* Timer();
|
||||
MxStreamer* Streamer();
|
||||
LEGO1_EXPORT MxTickleManager* TickleManager();
|
||||
LEGO1_EXPORT MxTimer* Timer();
|
||||
LEGO1_EXPORT MxStreamer* Streamer();
|
||||
MxSoundManager* MSoundManager();
|
||||
MxVariableTable* VariableTable();
|
||||
LEGO1_EXPORT MxVariableTable* VariableTable();
|
||||
MxEventManager* EventManager();
|
||||
MxResult Start(MxDSAction*);
|
||||
LEGO1_EXPORT MxResult Start(MxDSAction*);
|
||||
MxNotificationManager* NotificationManager();
|
||||
MxVideoManager* MVideoManager();
|
||||
MxAtomSet* AtomSet();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXOMNI_H
|
||||
#define MXOMNI_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxcore.h"
|
||||
#include "mxcriticalsection.h"
|
||||
#include "mxstring.h"
|
||||
@ -28,14 +29,14 @@ class MxVideoManager;
|
||||
// SIZE 0x68
|
||||
class MxOmni : public MxCore {
|
||||
public:
|
||||
static void DestroyInstance();
|
||||
static const char* GetCD();
|
||||
LEGO1_EXPORT static void DestroyInstance();
|
||||
LEGO1_EXPORT static const char* GetCD();
|
||||
static const char* GetHD();
|
||||
static MxOmni* GetInstance();
|
||||
static MxBool IsSound3D();
|
||||
static void SetCD(const char* p_cd);
|
||||
static void SetHD(const char* p_hd);
|
||||
static void SetSound3D(MxBool p_use3dSound);
|
||||
LEGO1_EXPORT static void SetCD(const char* p_cd);
|
||||
LEGO1_EXPORT static void SetHD(const char* p_hd);
|
||||
LEGO1_EXPORT static void SetSound3D(MxBool p_use3dSound);
|
||||
static void NormalizePath(char* p_path);
|
||||
|
||||
MxOmni();
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
#ifndef MXOMNICREATEFLAGS_H
|
||||
#define MXOMNICREATEFLAGS_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// SIZE 0x02
|
||||
class MxOmniCreateFlags {
|
||||
public:
|
||||
MxOmniCreateFlags();
|
||||
LEGO1_EXPORT MxOmniCreateFlags();
|
||||
|
||||
// FUNCTION: BETA10 0x10092b50
|
||||
void CreateObjectFactory(MxBool p_enable) { m_flags1.m_bit0 = p_enable; }
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXOMNICREATEPARAM_H
|
||||
#define MXOMNICREATEPARAM_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxomnicreateflags.h"
|
||||
#include "mxparam.h"
|
||||
#include "mxstring.h"
|
||||
@ -12,9 +13,9 @@
|
||||
// VTABLE: BETA10 0x101c1ca8
|
||||
class MxOmniCreateParam : public MxParam {
|
||||
public:
|
||||
MxOmniCreateParam(
|
||||
LEGO1_EXPORT MxOmniCreateParam(
|
||||
const char* p_mediaPath,
|
||||
struct HWND__* p_windowHandle,
|
||||
HWND p_windowHandle,
|
||||
MxVideoParam& p_vparam,
|
||||
MxOmniCreateFlags p_flags
|
||||
);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define MXSTREAMER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "mxcore.h"
|
||||
#include "mxmemorypool.h"
|
||||
#include "mxnotificationparam.h"
|
||||
@ -50,8 +51,8 @@ class MxStreamer : public MxCore {
|
||||
MxStreamer();
|
||||
~MxStreamer() override; // vtable+0x00
|
||||
|
||||
MxStreamController* Open(const char* p_name, MxU16 p_openMode);
|
||||
MxLong Close(const char* p_name);
|
||||
LEGO1_EXPORT MxStreamController* Open(const char* p_name, MxU16 p_openMode);
|
||||
LEGO1_EXPORT MxLong Close(const char* p_name);
|
||||
|
||||
MxLong Notify(MxParam& p_param) override; // vtable+0x04
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXSTRING_H
|
||||
#define MXSTRING_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
// VTABLE: LEGO1 0x100dc110
|
||||
@ -12,7 +13,7 @@ class MxString : public MxCore {
|
||||
MxString(const MxString& p_str);
|
||||
MxString(const char* p_str);
|
||||
MxString(const char* p_str, MxU16 p_maxlen);
|
||||
~MxString() override;
|
||||
LEGO1_EXPORT ~MxString() override;
|
||||
|
||||
void Reverse();
|
||||
void ToUpperCase();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXTIMER_H
|
||||
#define MXTIMER_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxcore.h"
|
||||
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
@ -15,7 +16,7 @@ class MxTimer : public MxCore {
|
||||
void Start();
|
||||
void Stop();
|
||||
|
||||
MxLong GetRealTime();
|
||||
LEGO1_EXPORT MxLong GetRealTime();
|
||||
|
||||
// FUNCTION: BETA10 0x1012bf50
|
||||
void InitLastTimeCalculated() { g_lastTimeCalculated = m_startTime; }
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef MXVARIABLETABLE_H
|
||||
#define MXVARIABLETABLE_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxhashtable.h"
|
||||
#include "mxtypes.h"
|
||||
#include "mxvariable.h"
|
||||
@ -12,7 +13,7 @@ class MxVariableTable : public MxHashTable<MxVariable*> {
|
||||
public:
|
||||
// FUNCTION: BETA10 0x10130e50
|
||||
MxVariableTable() { SetDestroy(Destroy); }
|
||||
void SetVariable(const char* p_key, const char* p_value);
|
||||
LEGO1_EXPORT void SetVariable(const char* p_key, const char* p_value);
|
||||
void SetVariable(MxVariable* p_var);
|
||||
const char* GetVariable(const char* p_key);
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define MXVIDEOPARAM_H
|
||||
|
||||
#include "compat.h"
|
||||
#include "lego1_export.h"
|
||||
#include "mxrect32.h"
|
||||
#include "mxtypes.h"
|
||||
#include "mxvideoparamflags.h"
|
||||
@ -13,13 +14,12 @@ class MxPalette;
|
||||
// SIZE 0x24
|
||||
class MxVideoParam {
|
||||
public:
|
||||
MxVideoParam();
|
||||
__declspec(dllexport)
|
||||
MxVideoParam(MxRect32& p_rect, MxPalette* p_palette, MxULong p_backBuffers, MxVideoParamFlags& p_flags);
|
||||
LEGO1_EXPORT MxVideoParam();
|
||||
LEGO1_EXPORT MxVideoParam(MxRect32& p_rect, MxPalette* p_palette, MxULong p_backBuffers, MxVideoParamFlags& p_flags);
|
||||
MxVideoParam(MxVideoParam& p_videoParam);
|
||||
~MxVideoParam();
|
||||
void SetDeviceName(char* p_deviceId);
|
||||
MxVideoParam& operator=(const MxVideoParam& p_videoParam);
|
||||
LEGO1_EXPORT ~MxVideoParam();
|
||||
LEGO1_EXPORT void SetDeviceName(char* p_deviceId);
|
||||
LEGO1_EXPORT MxVideoParam& operator=(const MxVideoParam& p_videoParam);
|
||||
|
||||
// FUNCTION: BETA10 0x100886e0
|
||||
MxVideoParamFlags& Flags() { return m_flags; }
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
#ifndef MXVIDEOPARAMFLAGS_H
|
||||
#define MXVIDEOPARAMFLAGS_H
|
||||
|
||||
#include "lego1_export.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
class MxVideoParamFlags {
|
||||
public:
|
||||
MxVideoParamFlags();
|
||||
LEGO1_EXPORT MxVideoParamFlags();
|
||||
|
||||
// inlined in ISLE
|
||||
void SetFullScreen(MxBool p_e) { m_flags1.m_bit0 = p_e; }
|
||||
|
||||
@ -8,13 +8,13 @@ DECOMP_SIZE_ASSERT(MxOmniCreateParam, 0x40)
|
||||
// FUNCTION: BETA10 0x10130b6b
|
||||
MxOmniCreateParam::MxOmniCreateParam(
|
||||
const char* p_mediaPath,
|
||||
struct HWND__* p_windowHandle,
|
||||
HWND p_windowHandle,
|
||||
MxVideoParam& p_vparam,
|
||||
MxOmniCreateFlags p_flags
|
||||
)
|
||||
{
|
||||
this->m_mediaPath = p_mediaPath;
|
||||
this->m_windowHandle = (HWND) p_windowHandle;
|
||||
this->m_windowHandle = p_windowHandle;
|
||||
this->m_videoParam = p_vparam;
|
||||
this->m_createFlags = p_flags;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define VIEWMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "lego1_export.h"
|
||||
#include "realtime/realtimeview.h"
|
||||
#include "viewroi.h"
|
||||
|
||||
@ -22,7 +23,7 @@ class ViewManager {
|
||||
virtual ~ViewManager();
|
||||
|
||||
void Remove(ViewROI* p_roi);
|
||||
void RemoveAll(ViewROI* p_roi);
|
||||
LEGO1_EXPORT void RemoveAll(ViewROI* p_roi);
|
||||
unsigned int IsBoundingBoxInFrustum(const BoundingBox& p_bounding_box);
|
||||
void UpdateROIDetailBasedOnLOD(ViewROI* p_roi, int p_und);
|
||||
void RemoveROIDetailFromScene(ViewROI* p_roi);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user