diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35cd65592..7ae6248e9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -464,32 +464,32 @@ endif() set( PLAT_POSIX_SOURCES posix/i_steam.cpp - posix/i_system_posix.cpp ) + common/platform/posix/i_system_posix.cpp ) set( PLAT_SDL_SOURCES - posix/sdl/crashcatcher.c - posix/sdl/hardware.cpp - posix/sdl/i_gui.cpp - posix/sdl/i_input.cpp - posix/sdl/i_joystick.cpp - posix/sdl/i_main.cpp - posix/sdl/i_system.cpp - posix/sdl/sdlglvideo.cpp - posix/sdl/st_start.cpp ) + common/platform/posix/sdl/crashcatcher.c + common/platform/posix/sdl/hardware.cpp + common/platform/posix/sdl/i_gui.cpp + common/platform/posix/sdl/i_input.cpp + common/platform/posix/sdl/i_joystick.cpp + common/platform/posix/sdl/i_main.cpp + common/platform/posix/sdl/i_system.cpp + common/platform/posix/sdl/sdlglvideo.cpp + common/platform/posix/sdl/st_start.cpp ) set( PLAT_UNIX_SOURCES - posix/unix/i_specialpaths.cpp - posix/unix/gtk_dialogs.cpp ) + common/platform/posix/unix/i_specialpaths.cpp + common/platform/posix/unix/gtk_dialogs.cpp ) set( PLAT_OSX_SOURCES - posix/osx/iwadpicker_cocoa.mm - posix/osx/i_specialpaths.mm + common/platform/posix/osx/iwadpicker_cocoa.mm + common/platform/posix/osx/i_specialpaths.mm posix/osx/zdoom.icns ) set( PLAT_COCOA_SOURCES - posix/cocoa/i_input.mm - posix/cocoa/i_joystick.cpp - posix/cocoa/i_main.mm - posix/cocoa/i_system.mm - posix/cocoa/i_video.mm - posix/cocoa/st_console.mm - posix/cocoa/st_start.mm ) + common/platform/posix/cocoa/i_input.mm + common/platform/posix/cocoa/i_joystick.cpp + common/platform/posix/cocoa/i_main.mm + common/platform/posix/cocoa/i_system.mm + common/platform/posix/cocoa/i_video.mm + common/platform/posix/cocoa/st_console.mm + common/platform/posix/cocoa/st_start.mm ) if( WIN32 ) set( SYSTEM_SOURCES_DIR win32 ) @@ -499,22 +499,22 @@ if( WIN32 ) set( SYSTEM_SOURCES ${SYSTEM_SOURCES} win32/zdoom.rc ) elseif( APPLE ) if( OSX_COCOA_BACKEND ) - set( SYSTEM_SOURCES_DIR posix posix/cocoa ) + set( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/cocoa ) set( SYSTEM_SOURCES ${PLAT_COCOA_SOURCES} ) set( OTHER_SYSTEM_SOURCES ${PLAT_WIN32_SOURCES} ${PLAT_SDL_SOURCES} ${PLAT_UNIX_SOURCES} ) else() - set( SYSTEM_SOURCES_DIR posix posix/sdl ) + set( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/sdl ) set( SYSTEM_SOURCES ${PLAT_SDL_SOURCES} ) - set( PLAT_OSX_SOURCES ${PLAT_OSX_SOURCES} posix/sdl/i_system.mm ) + set( PLAT_OSX_SOURCES ${PLAT_OSX_SOURCES} common/platform/posix/sdl/i_system.mm ) set( OTHER_SYSTEM_SOURCES ${PLAT_WIN32_SOURCES} ${PLAT_COCOA_SOURCES} ${PLAT_UNIX_SOURCES} ) endif() set( SYSTEM_SOURCES ${SYSTEM_SOURCES} ${PLAT_POSIX_SOURCES} ${PLAT_OSX_SOURCES} ) set_source_files_properties( posix/osx/zdoom.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) - set_source_files_properties( posix/osx/iwadpicker_cocoa.mm PROPERTIES COMPILE_FLAGS -fobjc-exceptions ) + set_source_files_properties( common/platform/posix/osx/iwadpicker_cocoa.mm PROPERTIES COMPILE_FLAGS -fobjc-exceptions ) else() - set( SYSTEM_SOURCES_DIR posix posix/sdl ) + set( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/sdl ) set( SYSTEM_SOURCES ${PLAT_POSIX_SOURCES} ${PLAT_SDL_SOURCES} ${PLAT_UNIX_SOURCES} ) set( OTHER_SYSTEM_SOURCES ${PLAT_WIN32_SOURCES} ${PLAT_OSX_SOURCES} ${PLAT_COCOA_SOURCES} ) endif() @@ -594,8 +594,6 @@ file( GLOB HEADER_FILES sound/*.h sound/backend/*.h* posix/*.h - posix/cocoa/*.h - posix/sdl/*.h win32/*.h r_data/*.h r_data/models/*.h @@ -610,6 +608,8 @@ file( GLOB HEADER_FILES common/fonts/*.h common/objects/*.h common/filesystem/*.h + common/platform/posix/cocoa/*.h + common/platform/posix/sdl/*.h common/textures/*.h common/textures/hires/hqnx/*.h common/textures/hires/hqnx_asm/*.h @@ -1441,10 +1441,6 @@ source_group("Render Data" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_da source_group("Render Data\\Models" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_data/models/.+") source_group("Render Interface" FILES r_defs.h r_renderer.h r_sky.cpp r_sky.h r_state.h r_utility.cpp r_utility.h) source_group("Platforms\\POSIX Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/posix/.+") -source_group("Platforms\\Cocoa Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/posix/cocoa/.+") -source_group("Platforms\\OS X Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/posix/osx/.+") -source_group("Platforms\\Unix Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/posix/unix/.+") -source_group("Platforms\\SDL Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/posix/sdl/.+") source_group("Platforms\\Win32 Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/win32/.+") source_group("Scripting\\Decorate frontend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/scripting/decorate/.+") source_group("Scripting\\ZScript frontend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/scripting/zscript/.+") @@ -1470,6 +1466,10 @@ source_group("Common\\Scripting\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_S source_group("Common\\Scripting\\Core" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/core/.+") source_group("Common\\Scripting\\JIT" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/jit/.+") source_group("Common\\Scripting\\VM" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/scripting/vm/.+") +source_group("Common\\Platforms\\Cocoa Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/cocoa/.+") +source_group("Common\\Platforms\\OS X Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/osx/.+") +source_group("Common\\Platforms\\Unix Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/unix/.+") +source_group("Common\\Platforms\\SDL Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/platform/posix/sdl/.+") source_group("Common\\Rendering" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/.+") source_group("Common\\Rendering\\OpenGL Loader" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/rendering/gl_load/.+") source_group("Common\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/textures/.+") diff --git a/src/common/audio/sound/i_soundinternal.h b/src/common/audio/sound/i_soundinternal.h index 36ccd52c0..be3486440 100644 --- a/src/common/audio/sound/i_soundinternal.h +++ b/src/common/audio/sound/i_soundinternal.h @@ -146,4 +146,5 @@ class SoundStream; void S_SetSoundPaused(int state); + #endif diff --git a/src/g_input.h b/src/common/engine/g_input.h similarity index 100% rename from src/g_input.h rename to src/common/engine/g_input.h diff --git a/src/posix/cocoa/gl_sysfb.h b/src/common/platform/posix/cocoa/gl_sysfb.h similarity index 100% rename from src/posix/cocoa/gl_sysfb.h rename to src/common/platform/posix/cocoa/gl_sysfb.h diff --git a/src/posix/cocoa/i_common.h b/src/common/platform/posix/cocoa/i_common.h similarity index 100% rename from src/posix/cocoa/i_common.h rename to src/common/platform/posix/cocoa/i_common.h diff --git a/src/posix/cocoa/i_input.mm b/src/common/platform/posix/cocoa/i_input.mm similarity index 100% rename from src/posix/cocoa/i_input.mm rename to src/common/platform/posix/cocoa/i_input.mm diff --git a/src/posix/cocoa/i_joystick.cpp b/src/common/platform/posix/cocoa/i_joystick.cpp similarity index 100% rename from src/posix/cocoa/i_joystick.cpp rename to src/common/platform/posix/cocoa/i_joystick.cpp diff --git a/src/posix/cocoa/i_main.mm b/src/common/platform/posix/cocoa/i_main.mm similarity index 100% rename from src/posix/cocoa/i_main.mm rename to src/common/platform/posix/cocoa/i_main.mm diff --git a/src/posix/cocoa/i_system.mm b/src/common/platform/posix/cocoa/i_system.mm similarity index 100% rename from src/posix/cocoa/i_system.mm rename to src/common/platform/posix/cocoa/i_system.mm diff --git a/src/posix/cocoa/i_video.mm b/src/common/platform/posix/cocoa/i_video.mm similarity index 100% rename from src/posix/cocoa/i_video.mm rename to src/common/platform/posix/cocoa/i_video.mm diff --git a/src/posix/cocoa/st_console.h b/src/common/platform/posix/cocoa/st_console.h similarity index 100% rename from src/posix/cocoa/st_console.h rename to src/common/platform/posix/cocoa/st_console.h diff --git a/src/posix/cocoa/st_console.mm b/src/common/platform/posix/cocoa/st_console.mm similarity index 100% rename from src/posix/cocoa/st_console.mm rename to src/common/platform/posix/cocoa/st_console.mm diff --git a/src/posix/cocoa/st_start.mm b/src/common/platform/posix/cocoa/st_start.mm similarity index 100% rename from src/posix/cocoa/st_start.mm rename to src/common/platform/posix/cocoa/st_start.mm diff --git a/src/posix/dikeys.h b/src/common/platform/posix/dikeys.h similarity index 100% rename from src/posix/dikeys.h rename to src/common/platform/posix/dikeys.h diff --git a/src/posix/hardware.h b/src/common/platform/posix/hardware.h similarity index 100% rename from src/posix/hardware.h rename to src/common/platform/posix/hardware.h diff --git a/src/posix/i_system.h b/src/common/platform/posix/i_system.h similarity index 100% rename from src/posix/i_system.h rename to src/common/platform/posix/i_system.h diff --git a/src/posix/i_system_posix.cpp b/src/common/platform/posix/i_system_posix.cpp similarity index 100% rename from src/posix/i_system_posix.cpp rename to src/common/platform/posix/i_system_posix.cpp diff --git a/src/posix/osx/i_specialpaths.mm b/src/common/platform/posix/osx/i_specialpaths.mm similarity index 100% rename from src/posix/osx/i_specialpaths.mm rename to src/common/platform/posix/osx/i_specialpaths.mm diff --git a/src/posix/osx/iwadpicker_cocoa.mm b/src/common/platform/posix/osx/iwadpicker_cocoa.mm similarity index 100% rename from src/posix/osx/iwadpicker_cocoa.mm rename to src/common/platform/posix/osx/iwadpicker_cocoa.mm diff --git a/src/posix/readme.md b/src/common/platform/posix/readme.md similarity index 100% rename from src/posix/readme.md rename to src/common/platform/posix/readme.md diff --git a/src/posix/sdl/crashcatcher.c b/src/common/platform/posix/sdl/crashcatcher.c similarity index 100% rename from src/posix/sdl/crashcatcher.c rename to src/common/platform/posix/sdl/crashcatcher.c diff --git a/src/posix/sdl/gl_sysfb.h b/src/common/platform/posix/sdl/gl_sysfb.h similarity index 100% rename from src/posix/sdl/gl_sysfb.h rename to src/common/platform/posix/sdl/gl_sysfb.h diff --git a/src/posix/sdl/hardware.cpp b/src/common/platform/posix/sdl/hardware.cpp similarity index 100% rename from src/posix/sdl/hardware.cpp rename to src/common/platform/posix/sdl/hardware.cpp diff --git a/src/posix/sdl/i_gui.cpp b/src/common/platform/posix/sdl/i_gui.cpp similarity index 100% rename from src/posix/sdl/i_gui.cpp rename to src/common/platform/posix/sdl/i_gui.cpp diff --git a/src/posix/sdl/i_input.cpp b/src/common/platform/posix/sdl/i_input.cpp similarity index 100% rename from src/posix/sdl/i_input.cpp rename to src/common/platform/posix/sdl/i_input.cpp diff --git a/src/posix/sdl/i_joystick.cpp b/src/common/platform/posix/sdl/i_joystick.cpp similarity index 100% rename from src/posix/sdl/i_joystick.cpp rename to src/common/platform/posix/sdl/i_joystick.cpp diff --git a/src/posix/sdl/i_main.cpp b/src/common/platform/posix/sdl/i_main.cpp similarity index 100% rename from src/posix/sdl/i_main.cpp rename to src/common/platform/posix/sdl/i_main.cpp diff --git a/src/posix/sdl/i_system.cpp b/src/common/platform/posix/sdl/i_system.cpp similarity index 100% rename from src/posix/sdl/i_system.cpp rename to src/common/platform/posix/sdl/i_system.cpp diff --git a/src/posix/sdl/i_system.mm b/src/common/platform/posix/sdl/i_system.mm similarity index 100% rename from src/posix/sdl/i_system.mm rename to src/common/platform/posix/sdl/i_system.mm diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/common/platform/posix/sdl/sdlglvideo.cpp similarity index 100% rename from src/posix/sdl/sdlglvideo.cpp rename to src/common/platform/posix/sdl/sdlglvideo.cpp diff --git a/src/posix/sdl/st_start.cpp b/src/common/platform/posix/sdl/st_start.cpp similarity index 100% rename from src/posix/sdl/st_start.cpp rename to src/common/platform/posix/sdl/st_start.cpp diff --git a/src/posix/unix/gtk_dialogs.cpp b/src/common/platform/posix/unix/gtk_dialogs.cpp similarity index 100% rename from src/posix/unix/gtk_dialogs.cpp rename to src/common/platform/posix/unix/gtk_dialogs.cpp diff --git a/src/posix/unix/i_specialpaths.cpp b/src/common/platform/posix/unix/i_specialpaths.cpp similarity index 100% rename from src/posix/unix/i_specialpaths.cpp rename to src/common/platform/posix/unix/i_specialpaths.cpp