2011-08-03 20:05:33 +00:00
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
|
|
PROJECT(Aquaria)
|
|
|
|
|
|
|
|
INCLUDE(CheckCCompilerFlag)
|
2017-01-14 12:09:12 +00:00
|
|
|
INCLUDE(CheckCXXCompilerFlag)
|
2011-08-03 20:05:33 +00:00
|
|
|
INCLUDE(CheckFunctionExists)
|
|
|
|
|
|
|
|
IF(NOT CMAKE_BUILD_TYPE)
|
2013-06-19 15:44:37 +00:00
|
|
|
SET(CMAKE_BUILD_TYPE Release CACHE STRING "None Debug Release RelWithDebInfo MinSizeRel" FORCE)
|
2011-08-03 20:05:33 +00:00
|
|
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
|
|
|
|
|
|
|
IF(APPLE)
|
|
|
|
SET(MACOSX TRUE)
|
|
|
|
ENDIF(APPLE)
|
|
|
|
|
2012-09-23 03:31:29 +00:00
|
|
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
|
|
|
|
SET(HAIKU TRUE)
|
|
|
|
ENDIF()
|
|
|
|
|
2013-06-19 15:44:37 +00:00
|
|
|
IF(WIN32)
|
|
|
|
SET(WIN32_TRUE TRUE)
|
|
|
|
ELSE(WIN32)
|
|
|
|
SET(WIN32_TRUE FALSE)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
# if no build type was provided, set a default one
|
|
|
|
IF(NOT CMAKE_BUILD_TYPE)
|
|
|
|
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug, RelWithDebInfo, Release)" FORCE)
|
|
|
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
|
|
|
|
2012-02-10 19:28:35 +00:00
|
|
|
OPTION(AQUARIA_DEMO_BUILD "Demo Build?" FALSE)
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
OPTION(AQUARIA_USE_VFS "Use Virtual File System? Required for some additional features." TRUE)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
2016-08-06 18:03:51 +00:00
|
|
|
OPTION(AQUARIA_USE_SDL2 "Use SDL2" TRUE)
|
2015-07-12 20:16:55 +00:00
|
|
|
OPTION(AQUARIA_USE_GLM "Use GLM for matrix math" TRUE)
|
2013-07-18 21:29:55 +00:00
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
# No Steamworks SDK for Linux at the moment. Roll our own achievements.
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_ACHIEVEMENTS_INTERNAL=1)
|
|
|
|
|
|
|
|
SET(BBGEDIR ${CMAKE_CURRENT_SOURCE_DIR}/BBGE)
|
|
|
|
SET(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/Aquaria)
|
|
|
|
SET(EXTLIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/ExternalLibs)
|
|
|
|
|
|
|
|
SET(FTGLDIR ${EXTLIBDIR}/FTGL)
|
|
|
|
SET(FTGLSRCDIR ${FTGLDIR}/src)
|
|
|
|
SET(FREETYPE2DIR ${EXTLIBDIR}/freetype2)
|
|
|
|
SET(FREETYPE2SRCDIR ${FREETYPE2DIR}/src)
|
|
|
|
SET(LUADIR ${EXTLIBDIR}/lua-5.1.4)
|
|
|
|
SET(LUASRCDIR ${LUADIR}/src)
|
2017-01-13 12:06:31 +00:00
|
|
|
SET(LIBOGGDIR ${EXTLIBDIR}/libogg)
|
|
|
|
SET(LIBVORBISDIR ${EXTLIBDIR}/libvorbis)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
################ Look for external libraries
|
|
|
|
|
|
|
|
### FreeType
|
|
|
|
|
2013-06-19 15:44:37 +00:00
|
|
|
OPTION(AQUARIA_INTERNAL_FREETYPE "Always use included FreeType library" TRUE)
|
2011-08-03 20:05:33 +00:00
|
|
|
if(NOT AQUARIA_INTERNAL_FREETYPE)
|
|
|
|
find_package(Freetype)
|
|
|
|
endif(NOT AQUARIA_INTERNAL_FREETYPE)
|
|
|
|
if(NOT FREETYPE_FOUND)
|
|
|
|
set(FREETYPE_INCLUDE_DIRS ${FREETYPE2DIR}/include)
|
|
|
|
endif(NOT FREETYPE_FOUND)
|
|
|
|
|
|
|
|
### Lua
|
|
|
|
|
2013-06-19 15:44:37 +00:00
|
|
|
OPTION(AQUARIA_INTERNAL_LUA "Always use included Lua library" TRUE)
|
2011-08-03 20:05:33 +00:00
|
|
|
if(NOT AQUARIA_INTERNAL_LUA)
|
|
|
|
find_package(Lua51)
|
|
|
|
endif(NOT AQUARIA_INTERNAL_LUA)
|
|
|
|
if(NOT LUA51_FOUND)
|
|
|
|
set(LUA_INCLUDE_DIR ${LUASRCDIR})
|
|
|
|
endif(NOT LUA51_FOUND)
|
|
|
|
|
|
|
|
### Ogg/Vorbis
|
|
|
|
|
2013-06-19 15:44:37 +00:00
|
|
|
OPTION(AQUARIA_INTERNAL_OGGVORBIS "Always use included Ogg/Vorbis libraries" TRUE)
|
2011-08-03 20:05:33 +00:00
|
|
|
if(NOT AQUARIA_INTERNAL_OGGVORBIS)
|
|
|
|
# CMake doesn't seem to have a module for libogg or libvorbis yet, so
|
|
|
|
# we roll our own based on existing find_package modules.
|
|
|
|
|
|
|
|
find_path(OGG_INCLUDE_DIR ogg.h
|
|
|
|
HINTS $ENV{OGG_DIR}
|
|
|
|
PATH_SUFFIXES include/ogg include
|
|
|
|
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
|
|
|
)
|
|
|
|
find_library(OGG_LIBRARY
|
|
|
|
NAMES ogg
|
|
|
|
HINTS $ENV{OGG_DIR}
|
|
|
|
PATH_SUFFIXES lib64 lib
|
|
|
|
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
|
|
|
)
|
|
|
|
|
|
|
|
if(OGG_LIBRARY)
|
|
|
|
|
|
|
|
find_path(VORBIS_INCLUDE_DIR vorbisfile.h
|
|
|
|
HINTS $ENV{VORBIS_DIR}
|
|
|
|
PATH_SUFFIXES include/vorbis include
|
|
|
|
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
|
|
|
)
|
|
|
|
find_library(VORBIS_LIBRARY
|
|
|
|
NAMES vorbis
|
|
|
|
HINTS $ENV{VORBIS_DIR}
|
|
|
|
PATH_SUFFIXES lib64 lib
|
|
|
|
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
|
|
|
)
|
|
|
|
find_library(VORBISFILE_LIBRARY
|
|
|
|
NAMES vorbisfile
|
|
|
|
HINTS $ENV{VORBIS_DIR}
|
|
|
|
PATH_SUFFIXES lib64 lib
|
|
|
|
PATHS ~/Library/Frameworks /Library/Frameworks /usr/local /usr /sw /opt/local /opt/csw /opt
|
|
|
|
)
|
|
|
|
|
|
|
|
if(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
|
|
|
|
set(OGGVORBIS_INCLUDE_DIRS "${OGG_INCLUDE_DIR};${VORBIS_INCLUDE_DIR}" CACHE STRING "Ogg/Vorbis include directories")
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
find_library(VORBIS_MATH_LIBRARY m)
|
|
|
|
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${VORBIS_MATH_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
|
|
|
|
else(UNIX AND NOT APPLE)
|
|
|
|
set(OGGVORBIS_LIBRARIES "${VORBISFILE_LIBRARY};${VORBIS_LIBRARY};${OGG_LIBRARY}" CACHE STRING "Ogg/Vorbis libraries")
|
|
|
|
endif(UNIX AND NOT APPLE)
|
|
|
|
endif(VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
|
|
|
|
|
|
|
|
endif(OGG_LIBRARY)
|
|
|
|
|
|
|
|
find_package_handle_standard_args(OggVorbis DEFAULT_MSG OGGVORBIS_LIBRARIES OGGVORBIS_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGGVORBIS_INCLUDE_DIRS)
|
|
|
|
mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBIS_MATH_LIBRARY OGGVORBIS_LIBRARIES)
|
|
|
|
|
|
|
|
endif(NOT AQUARIA_INTERNAL_OGGVORBIS)
|
|
|
|
|
|
|
|
if(NOT OGGVORBIS_FOUND)
|
|
|
|
set(OGGVORBIS_INCLUDE_DIRS ${LIBOGGDIR}/include ${LIBVORBISDIR}/include)
|
|
|
|
endif(NOT OGGVORBIS_FOUND)
|
|
|
|
|
|
|
|
### SDL
|
|
|
|
|
2013-06-19 15:44:37 +00:00
|
|
|
OPTION(AQUARIA_INTERNAL_SDL "Always use included SDL library" ${WIN32_TRUE})
|
2011-08-03 20:05:33 +00:00
|
|
|
if(NOT AQUARIA_INTERNAL_SDL)
|
2013-07-18 21:29:55 +00:00
|
|
|
if(AQUARIA_USE_SDL2)
|
2013-07-19 13:23:01 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
2013-07-18 21:29:55 +00:00
|
|
|
find_package(SDL2)
|
2013-07-19 13:23:01 +00:00
|
|
|
if(SDL2_FOUND)
|
|
|
|
set(SDL_FOUND TRUE)
|
|
|
|
set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR})
|
|
|
|
set(SDL_LIBRARY ${SDL2_LIBRARY})
|
|
|
|
endif(SDL2_FOUND)
|
2013-07-18 21:29:55 +00:00
|
|
|
else(AQUARIA_USE_SDL2)
|
|
|
|
find_package(SDL)
|
|
|
|
endif(AQUARIA_USE_SDL2)
|
2011-08-03 20:05:33 +00:00
|
|
|
endif(NOT AQUARIA_INTERNAL_SDL)
|
2012-01-10 18:34:31 +00:00
|
|
|
if(NOT SDL_FOUND)
|
2013-07-18 21:29:55 +00:00
|
|
|
if(AQUARIA_USE_SDL2)
|
|
|
|
set(SDLDIR "${EXTLIBDIR}/SDL2")
|
|
|
|
else(AQUARIA_USE_SDL2)
|
2011-08-03 20:05:33 +00:00
|
|
|
set(SDLDIR "${EXTLIBDIR}/SDL12")
|
2013-07-18 21:29:55 +00:00
|
|
|
endif(AQUARIA_USE_SDL2)
|
2014-05-30 20:51:12 +00:00
|
|
|
|
2013-07-18 21:29:55 +00:00
|
|
|
if(MACOSX)
|
2011-08-03 20:05:33 +00:00
|
|
|
set(SDL_INCLUDE_DIR "${SDLDIR}/include")
|
|
|
|
message(STATUS "Using internal copy of SDL")
|
2013-07-18 21:29:55 +00:00
|
|
|
if(AQUARIA_USE_SDL2)
|
|
|
|
set(SDL_LIBRARY "${SDLDIR}/lib/macosx/libSDL-2.0.0.dylib")
|
|
|
|
else(AQUARIA_USE_SDL2)
|
|
|
|
set(SDL_LIBRARY "${SDLDIR}/lib/macosx/libSDL-1.2.0.dylib;${SDLDIR}/lib/macosx/libSDLmain.a")
|
|
|
|
endif(AQUARIA_USE_SDL2)
|
2011-08-03 20:05:33 +00:00
|
|
|
elseif(WIN32)
|
2011-08-10 23:42:10 +00:00
|
|
|
set(SDL_INCLUDE_DIR "${SDLDIR}/include" CACHE PATH "SDL include directory" FORCE)
|
|
|
|
message(STATUS "Using internal copy of SDL")
|
2013-07-18 21:29:55 +00:00
|
|
|
if(AQUARIA_USE_SDL2)
|
|
|
|
set(SDLMAIN_LIBRARY "${SDLDIR}/lib/win32/SDL2main.lib" CACHE FILEPATH "Where the SDL2main library can be found" FORCE)
|
|
|
|
set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL2.lib" CACHE FILEPATH "Where the SDL2 library can be found" FORCE)
|
|
|
|
else(AQUARIA_USE_SDL2)
|
|
|
|
set(SDLMAIN_LIBRARY "${SDLDIR}/lib/win32/SDLmain.lib" CACHE FILEPATH "Where the SDLmain library can be found" FORCE)
|
|
|
|
set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL.lib" CACHE FILEPATH "Where the SDL library can be found" FORCE)
|
|
|
|
endif(AQUARIA_USE_SDL2)
|
2011-08-11 15:01:36 +00:00
|
|
|
set(SDL_LIBRARY ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user
|
2011-08-03 20:05:33 +00:00
|
|
|
else(MACOSX)
|
|
|
|
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
|
|
|
|
endif(MACOSX)
|
2012-01-10 18:34:31 +00:00
|
|
|
endif(NOT SDL_FOUND)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
### OpenAL
|
|
|
|
|
2022-03-30 20:54:03 +00:00
|
|
|
if(AQUARIA_USE_SDL2)
|
|
|
|
OPTION(AQUARIA_USE_MOJOAL "Use mojoAL instead of OpenAL (requires SDL2)" TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(AQUARIA_USE_MOJOAL)
|
|
|
|
set(OPENALDIR "${EXTLIBDIR}/AL")
|
|
|
|
set(OPENAL_INCLUDE_DIR "${OPENALDIR}/include" CACHE PATH "OpenAL include directory" FORCE)
|
|
|
|
else()
|
|
|
|
OPTION(AQUARIA_INTERNAL_OPENAL "Always use included OpenAL library" ${WIN32_TRUE})
|
|
|
|
if(NOT AQUARIA_INTERNAL_OPENAL)
|
|
|
|
find_package(OpenAL)
|
|
|
|
endif(NOT AQUARIA_INTERNAL_OPENAL)
|
|
|
|
if (NOT OPENAL_FOUND)
|
|
|
|
if(WIN32)
|
|
|
|
set(OPENALDIR "${EXTLIBDIR}/AL")
|
|
|
|
set(OPENAL_INCLUDE_DIR "${OPENALDIR}/include" CACHE PATH "OpenAL include directory" FORCE)
|
|
|
|
message(STATUS "Using internal copy of OpenAL")
|
|
|
|
set(OPENAL_LIBRARY "${OPENALDIR}/lib/win32/OpenAL32.lib" CACHE FILEPATH "Where the OpenAL library can be found" FORCE)
|
|
|
|
else(WIN32)
|
|
|
|
message(SEND_ERROR "We don't have a prebuilt OpenAL for this platform.")
|
|
|
|
endif(WIN32)
|
|
|
|
endif (NOT OPENAL_FOUND)
|
|
|
|
endif()
|
2011-08-03 20:05:33 +00:00
|
|
|
|
2014-06-08 20:11:23 +00:00
|
|
|
### TinyXML2
|
|
|
|
|
2014-06-09 20:21:24 +00:00
|
|
|
OPTION(AQUARIA_INTERNAL_TINYXML2 "Always use included TinyXML2 library" ${WIN32_TRUE})
|
2014-06-08 20:11:23 +00:00
|
|
|
if(NOT AQUARIA_INTERNAL_TINYXML2)
|
2015-09-18 04:49:32 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
2014-06-08 20:11:23 +00:00
|
|
|
find_package(TinyXML2)
|
|
|
|
endif(NOT AQUARIA_INTERNAL_TINYXML2)
|
2015-09-18 04:52:48 +00:00
|
|
|
if(NOT TINYXML2_FOUND)
|
2014-06-09 20:21:24 +00:00
|
|
|
message(STATUS "Using internal copy of TinyXML2")
|
2017-02-09 20:22:59 +00:00
|
|
|
set(TINYXML2_INCLUDE_DIRS "${EXTLIBDIR}/tinyxml2")
|
|
|
|
set(TINYXML2_SRCS "${EXTLIBDIR}/tinyxml2/tinyxml2.cpp")
|
2015-09-18 04:52:48 +00:00
|
|
|
endif(NOT TINYXML2_FOUND)
|
2014-06-08 20:11:23 +00:00
|
|
|
|
2015-09-17 22:55:50 +00:00
|
|
|
### FTGL
|
|
|
|
|
|
|
|
OPTION(AQUARIA_INTERNAL_FTGL "Always use included FTGL library" TRUE)
|
|
|
|
if(NOT AQUARIA_INTERNAL_FTGL)
|
|
|
|
find_package(FTGL)
|
|
|
|
endif(NOT AQUARIA_INTERNAL_FTGL)
|
|
|
|
if(FTGL_FOUND)
|
|
|
|
# Nothing else uses freetype2 directly
|
|
|
|
set(FREETYPE_INCLUDE_DIRS)
|
|
|
|
else(FTGL_FOUND)
|
|
|
|
message(STATUS "Using internal copy of FTGL")
|
|
|
|
set(FTGL_INCLUDE_DIRS "${FTGLDIR}/include")
|
|
|
|
ADD_DEFINITIONS(-DAQUARIA_INTERNAL_FTGL=1)
|
|
|
|
endif(FTGL_FOUND)
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
################ End of external libraries
|
|
|
|
|
2013-06-26 13:15:00 +00:00
|
|
|
INCLUDE_DIRECTORIES(${BBGEDIR})
|
|
|
|
INCLUDE_DIRECTORIES(${BBGEDIR}/GL)
|
|
|
|
INCLUDE_DIRECTORIES(${SRCDIR})
|
2015-09-17 22:55:50 +00:00
|
|
|
INCLUDE_DIRECTORIES(${FTGL_INCLUDE_DIRS})
|
2013-06-26 13:15:00 +00:00
|
|
|
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS})
|
|
|
|
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
|
|
|
|
INCLUDE_DIRECTORIES(${OGGVORBIS_INCLUDE_DIRS})
|
|
|
|
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
|
|
|
|
INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
|
2015-09-18 04:55:42 +00:00
|
|
|
INCLUDE_DIRECTORIES(${TINYXML2_INCLUDE_DIRS})
|
2013-06-26 13:15:00 +00:00
|
|
|
INCLUDE_DIRECTORIES(${EXTLIBDIR})
|
2014-04-07 00:10:05 +00:00
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Custom build ID: e.g. "-custom", " (my very own build)"
|
|
|
|
SET(AQUARIA_CUSTOM_BUILD_ID "" CACHE STRING
|
|
|
|
"Text to append to the Aquaria version ID on the title screen.")
|
|
|
|
if (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL ""))
|
|
|
|
ADD_DEFINITIONS("-DAQUARIA_CUSTOM_BUILD_ID=\"${AQUARIA_CUSTOM_BUILD_ID}\"")
|
|
|
|
endif (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL ""))
|
|
|
|
|
2013-06-24 01:09:58 +00:00
|
|
|
# Custom version string override (displayed as-is instead of "Aquaria vx.x.x ..." on the title screen
|
|
|
|
SET(AQUARIA_OVERRIDE_VERSION_STRING "" CACHE STRING
|
|
|
|
"Text to display instead of the Aquaria version ID on the title screen. (Overrides AQUARIA_CUSTOM_BUILD_ID as well)")
|
|
|
|
if (NOT(AQUARIA_OVERRIDE_VERSION_STRING STREQUAL ""))
|
2013-06-26 13:15:00 +00:00
|
|
|
ADD_DEFINITIONS("-DAQUARIA_OVERRIDE_VERSION_STRING=\"${AQUARIA_OVERRIDE_VERSION_STRING}\"")
|
2013-06-24 01:09:58 +00:00
|
|
|
endif (NOT(AQUARIA_OVERRIDE_VERSION_STRING STREQUAL ""))
|
|
|
|
|
2013-06-19 00:08:24 +00:00
|
|
|
# Custom data directories
|
|
|
|
SET(AQUARIA_DEFAULT_DATA_DIR "" CACHE STRING
|
|
|
|
"Default data directory (for package maintainers only)")
|
|
|
|
if(NOT(AQUARIA_DEFAULT_DATA_DIR STREQUAL ""))
|
|
|
|
ADD_DEFINITIONS("-DAQUARIA_DEFAULT_DATA_DIR=\"${AQUARIA_DEFAULT_DATA_DIR}\"")
|
|
|
|
endif(NOT(AQUARIA_DEFAULT_DATA_DIR STREQUAL ""))
|
|
|
|
|
|
|
|
SET(AQUARIA_EXTRA_DATA_DIR "" CACHE STRING
|
|
|
|
"Extra data directory, overrides files from default datadir (for package maintainers only)")
|
|
|
|
if(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL ""))
|
|
|
|
ADD_DEFINITIONS("-DAQUARIA_EXTRA_DATA_DIR=\"${AQUARIA_EXTRA_DATA_DIR}\"")
|
|
|
|
endif(NOT(AQUARIA_EXTRA_DATA_DIR STREQUAL ""))
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
# Aquaria/BBGE specific defines...
|
2011-08-10 23:42:10 +00:00
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DBBGE_SKIP_CONFIG_HEADERS=1) # if this is not defined, it will use .h files to set the necessary defines
|
2011-08-03 20:05:33 +00:00
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_OPENGL_DYNAMIC=1)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_FMOD_OPENAL_BRIDGE=1)
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
IF(AQUARIA_USE_VFS)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_VFS=1)
|
2014-04-07 05:07:31 +00:00
|
|
|
ADD_DEFINITIONS(-DVFS_ENABLE_C_API=1)
|
2014-04-07 00:10:05 +00:00
|
|
|
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs)
|
|
|
|
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs_zip)
|
|
|
|
INCLUDE_DIRECTORIES(${EXTLIBDIR}/ttvfs_cfileapi)
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
ENDIF(AQUARIA_USE_VFS)
|
2012-02-10 19:28:35 +00:00
|
|
|
|
2013-07-18 21:29:55 +00:00
|
|
|
IF(AQUARIA_USE_SDL2)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_SDL2=1)
|
|
|
|
ENDIF(AQUARIA_USE_SDL2)
|
|
|
|
|
2015-07-12 20:16:55 +00:00
|
|
|
IF(AQUARIA_USE_GLM)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_USE_GLM=1)
|
|
|
|
ENDIF(AQUARIA_USE_GLM)
|
|
|
|
|
2012-02-10 19:28:35 +00:00
|
|
|
IF(AQUARIA_DEMO_BUILD)
|
|
|
|
message(STATUS "Demo build.")
|
|
|
|
ADD_DEFINITIONS(-DAQUARIA_DEMO=1)
|
|
|
|
ELSE(AQUARIA_DEMO_BUILD)
|
|
|
|
ADD_DEFINITIONS(-DAQUARIA_BUILD_CONSOLE=1)
|
|
|
|
ADD_DEFINITIONS(-DAQUARIA_BUILD_SCENEEDITOR=1)
|
|
|
|
ENDIF(AQUARIA_DEMO_BUILD)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
2015-09-18 05:00:20 +00:00
|
|
|
IF(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
|
|
ADD_DEFINITIONS(-DNDEBUG) # MSVC defines this in release mode by default, gcc/mingw do not
|
|
|
|
message(STATUS "This is a release build.")
|
|
|
|
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release")
|
2011-08-11 00:26:46 +00:00
|
|
|
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
ADD_DEFINITIONS(-D_DEBUG) # MSVC defines this in debug mode by default, gcc/mingw do not
|
|
|
|
message(STATUS "This is a debug build.")
|
|
|
|
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
IF(UNIX)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_UNIX=1)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
IF(MACOSX)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_MACOSX=1)
|
|
|
|
ENDIF(MACOSX)
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
ADD_DEFINITIONS(-DBBGE_BUILD_WINDOWS=1)
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
SET(EXETYPE WIN32)
|
2012-01-10 18:09:44 +00:00
|
|
|
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} aquaria.rc)
|
2011-08-03 20:05:33 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
|
|
|
|
# Build Lua with Unix _setjmp/_longjmp support.
|
2012-09-23 03:31:29 +00:00
|
|
|
IF(UNIX AND NOT HAIKU)
|
2011-08-03 20:05:33 +00:00
|
|
|
ADD_DEFINITIONS(-DLUA_USE_ULONGJMP=1)
|
2012-09-23 03:31:29 +00:00
|
|
|
ENDIF()
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
IF(CMAKE_COMPILER_IS_GNUCC)
|
2017-09-02 18:28:19 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pipe -fsigned-char")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -pipe -fsigned-char -std=gnu99")
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
# See if -fno-stack-protector is available to us.
|
|
|
|
# It doesn't seem to work well, and it adds bulk to the binary.
|
|
|
|
CHECK_C_COMPILER_FLAG("-fno-stack-protector" AQUARIA_GCC_HAS_STACKPROT)
|
|
|
|
IF(AQUARIA_GCC_HAS_STACKPROT)
|
2017-09-02 20:13:46 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-stack-protector")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-stack-protector")
|
2011-08-03 20:05:33 +00:00
|
|
|
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
2014-05-30 20:51:12 +00:00
|
|
|
|
2013-06-19 15:44:37 +00:00
|
|
|
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
|
|
|
# Exceptions are not used, excluding support for release builds adds less bulk as well.
|
2015-09-18 05:00:20 +00:00
|
|
|
set(CMAKE_C_FLAGS_RELEASE "-O2" CACHE STRING "Flags used for release builds" FORCE)
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-exceptions" CACHE STRING "Flags used for release builds" FORCE)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
# !!! FIXME: probably not safe long-term.
|
|
|
|
# CMake mailing list had this hack for getting rid of -rdynamic:
|
|
|
|
# http://public.kitware.com/pipermail/cmake/2006-July/010404.html
|
|
|
|
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
|
|
|
|
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
|
2017-01-14 12:06:42 +00:00
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++11" AQUARIA_CC_HAS_GNUXX11)
|
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++1x" AQUARIA_CC_HAS_GNUXX1X)
|
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" AQUARIA_CC_HAS_GNUXX0X)
|
|
|
|
IF(AQUARIA_CC_HAS_GNUXX11)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
|
|
|
ELSEIF(AQUARIA_CC_HAS_GNUXX1X)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1x")
|
|
|
|
ELSEIF(AQUARIA_CC_HAS_GNUXX0X)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
|
|
|
ENDIF(AQUARIA_CC_HAS_GNUXX11)
|
2017-01-13 23:27:19 +00:00
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
|
|
|
|
IF(HAVE_STRCASECMP)
|
|
|
|
ADD_DEFINITIONS(-DHAVE_STRCASECMP)
|
|
|
|
ENDIF(HAVE_STRCASECMP)
|
|
|
|
|
|
|
|
# Main game source code for Aquaria, minus engine and other middleware...
|
|
|
|
SET(AQUARIA_SRCS
|
|
|
|
${SRCDIR}/AnimationEditor.cpp
|
|
|
|
${SRCDIR}/AquariaComboBox.cpp
|
|
|
|
${SRCDIR}/AquariaMenuItem.cpp
|
|
|
|
${SRCDIR}/AquariaSaveSlot.cpp
|
|
|
|
${SRCDIR}/Avatar.cpp
|
|
|
|
${SRCDIR}/Beam.cpp
|
|
|
|
${SRCDIR}/BitBlotLogo.cpp
|
|
|
|
${SRCDIR}/CollideEntity.cpp
|
|
|
|
${SRCDIR}/Continuity.cpp
|
|
|
|
${SRCDIR}/Credits.cpp
|
|
|
|
${SRCDIR}/CurrentRender.cpp
|
|
|
|
${SRCDIR}/Demo.cpp
|
|
|
|
${SRCDIR}/DSQ.cpp
|
|
|
|
${SRCDIR}/Element.cpp
|
|
|
|
${SRCDIR}/Emote.cpp
|
|
|
|
${SRCDIR}/Entity.cpp
|
|
|
|
${SRCDIR}/FlockEntity.cpp
|
|
|
|
${SRCDIR}/Game.cpp
|
2016-07-09 02:18:40 +00:00
|
|
|
${SRCDIR}/GameStructs.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${SRCDIR}/GameplayVariables.cpp
|
|
|
|
${SRCDIR}/GasCloud.cpp
|
|
|
|
${SRCDIR}/GridRender.cpp
|
|
|
|
${SRCDIR}/Hair.cpp
|
|
|
|
${SRCDIR}/Ingredient.cpp
|
2016-06-30 00:58:55 +00:00
|
|
|
${SRCDIR}/InGameMenu.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${SRCDIR}/Intro.cpp
|
|
|
|
${SRCDIR}/Logo.cpp
|
|
|
|
${SRCDIR}/Main.cpp
|
|
|
|
${SRCDIR}/ManaBall.cpp
|
|
|
|
${SRCDIR}/MiniMapRender.cpp
|
|
|
|
${SRCDIR}/Mod.cpp
|
|
|
|
${SRCDIR}/ModSelector.cpp
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
${SRCDIR}/ModDownloader.cpp
|
|
|
|
${SRCDIR}/Network.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${SRCDIR}/ParticleEditor.cpp
|
|
|
|
${SRCDIR}/Path.cpp
|
|
|
|
${SRCDIR}/PathFinding.cpp
|
|
|
|
${SRCDIR}/PathRender.cpp
|
|
|
|
${SRCDIR}/RecipeMenuEntry.cpp
|
|
|
|
${SRCDIR}/SceneEditor.cpp
|
|
|
|
${SRCDIR}/SchoolFish.cpp
|
2021-01-12 18:00:05 +00:00
|
|
|
${SRCDIR}/Scriptable.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${SRCDIR}/ScriptedEntity.cpp
|
|
|
|
${SRCDIR}/ScriptInterface.cpp
|
|
|
|
${SRCDIR}/Segmented.cpp
|
|
|
|
${SRCDIR}/SFXLoops.cpp
|
|
|
|
${SRCDIR}/Shot.cpp
|
|
|
|
${SRCDIR}/Spore.cpp
|
|
|
|
${SRCDIR}/States.cpp
|
|
|
|
${SRCDIR}/StatsAndAchievements.cpp
|
|
|
|
${SRCDIR}/SteamRender.cpp
|
|
|
|
${SRCDIR}/Strand.cpp
|
2018-01-02 14:31:47 +00:00
|
|
|
${SRCDIR}/StringBank_gen.h
|
2011-08-03 20:05:33 +00:00
|
|
|
${SRCDIR}/SubtitlePlayer.cpp
|
|
|
|
${SRCDIR}/ToolTip.cpp
|
|
|
|
${SRCDIR}/UserSettings.cpp
|
|
|
|
${SRCDIR}/WaterSurfaceRender.cpp
|
|
|
|
${SRCDIR}/Web.cpp
|
|
|
|
${SRCDIR}/WorldMapRender.cpp
|
|
|
|
${SRCDIR}/WorldMapTiles.cpp
|
|
|
|
)
|
|
|
|
|
2015-09-18 05:16:57 +00:00
|
|
|
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
|
|
|
# We knowingly apply offsetof to non-POD types.
|
|
|
|
${SRCDIR}/ScriptInterface.cpp
|
|
|
|
PROPERTIES COMPILE_FLAGS "-Wno-invalid-offsetof"
|
|
|
|
)
|
|
|
|
ENDIF()
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
IF(MACOSX)
|
2014-04-15 18:32:31 +00:00
|
|
|
IF(NOT AQUARIA_USE_SDL2)
|
2014-04-07 01:28:56 +00:00
|
|
|
SET(COCOA_SRCS "${BBGEDIR}/Cocoa.mm")
|
2014-04-15 18:32:31 +00:00
|
|
|
ENDIF(NOT AQUARIA_USE_SDL2)
|
2011-08-03 20:05:33 +00:00
|
|
|
ENDIF(MACOSX)
|
|
|
|
|
|
|
|
# Bit Blot Game Engine sources...
|
|
|
|
SET(BBGE_SRCS
|
|
|
|
${BBGEDIR}/ActionInput.cpp
|
|
|
|
${BBGEDIR}/ActionMapper.cpp
|
|
|
|
${BBGEDIR}/ActionSet.cpp
|
2016-07-17 20:25:24 +00:00
|
|
|
${BBGEDIR}/ActionStatus.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/AfterEffect.cpp
|
|
|
|
${BBGEDIR}/Base.cpp
|
|
|
|
${BBGEDIR}/BitmapFont.cpp
|
|
|
|
${BBGEDIR}/Core.cpp
|
|
|
|
${BBGEDIR}/DarkLayer.cpp
|
|
|
|
${BBGEDIR}/DebugFont.cpp
|
|
|
|
${BBGEDIR}/Effects.cpp
|
|
|
|
${BBGEDIR}/Emitter.cpp
|
|
|
|
${BBGEDIR}/Event.cpp
|
|
|
|
${BBGEDIR}/FrameBuffer.cpp
|
2017-02-27 01:18:46 +00:00
|
|
|
${BBGEDIR}/GameKeyNames.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/Gradient.cpp
|
2016-08-06 17:50:07 +00:00
|
|
|
${BBGEDIR}/GLLoad.cpp
|
2022-03-31 19:03:40 +00:00
|
|
|
${BBGEDIR}/Image.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/Joystick.cpp
|
|
|
|
${BBGEDIR}/LensFlare.cpp
|
2012-07-11 14:19:22 +00:00
|
|
|
${BBGEDIR}/Localization.cpp
|
2012-05-25 15:38:59 +00:00
|
|
|
${BBGEDIR}/MT.cpp
|
2016-07-09 02:18:40 +00:00
|
|
|
${BBGEDIR}/OSFunctions.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/ParticleEffect.cpp
|
|
|
|
${BBGEDIR}/ParticleManager.cpp
|
|
|
|
${BBGEDIR}/Particles.cpp
|
|
|
|
${BBGEDIR}/Precacher.cpp
|
|
|
|
${BBGEDIR}/Quad.cpp
|
|
|
|
${BBGEDIR}/QuadTrail.cpp
|
2016-07-09 02:18:40 +00:00
|
|
|
${BBGEDIR}/ReadXML.cpp
|
|
|
|
${BBGEDIR}/RenderBase.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/RenderObject.cpp
|
|
|
|
${BBGEDIR}/RenderObjectLayer.cpp
|
|
|
|
${BBGEDIR}/RenderRect.cpp
|
|
|
|
${BBGEDIR}/RoundedRect.cpp
|
|
|
|
${BBGEDIR}/ScreenTransition.cpp
|
2012-01-03 03:38:28 +00:00
|
|
|
${BBGEDIR}/ScriptObject.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/Shader.cpp
|
|
|
|
${BBGEDIR}/SkeletalSprite.cpp
|
|
|
|
${BBGEDIR}/Slider.cpp
|
|
|
|
${BBGEDIR}/SoundManager.cpp
|
|
|
|
${BBGEDIR}/SpawnParticleData.cpp
|
|
|
|
${BBGEDIR}/StateMachine.cpp
|
|
|
|
${BBGEDIR}/StateManager.cpp
|
2018-01-02 14:31:47 +00:00
|
|
|
${BBGEDIR}/StringBank.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/Texture.cpp
|
|
|
|
${BBGEDIR}/TTFFont.cpp
|
|
|
|
${BBGEDIR}/Vector.cpp
|
2019-01-28 23:36:48 +00:00
|
|
|
${BBGEDIR}/Window.cpp
|
|
|
|
${BBGEDIR}/Window_SDL1.cpp
|
|
|
|
${BBGEDIR}/Window_SDL2.cpp
|
2011-08-03 20:05:33 +00:00
|
|
|
${BBGEDIR}/FmodOpenALBridge.cpp
|
|
|
|
${COCOA_SRCS}
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
${EXTLIBDIR}/DeflateCompressor.cpp
|
2021-01-23 13:12:31 +00:00
|
|
|
${EXTLIBDIR}/luaalloc.cpp
|
2012-01-10 18:09:44 +00:00
|
|
|
${EXTLIBDIR}/glfont2/glfont2.cpp
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
${EXTLIBDIR}/minihttp.cpp
|
2022-03-30 17:29:36 +00:00
|
|
|
${EXTLIBDIR}/jps.hh
|
2022-03-31 19:03:40 +00:00
|
|
|
${EXTLIBDIR}/miniz.cpp
|
|
|
|
${EXTLIBDIR}/tinylibs.cpp
|
2012-01-10 18:09:44 +00:00
|
|
|
)
|
|
|
|
|
2022-03-30 20:54:03 +00:00
|
|
|
if(AQUARIA_USE_MOJOAL)
|
|
|
|
set(BBGE_SRCS ${BBGE_SRCS} ${EXTLIBDIR}/mojoal.c)
|
|
|
|
endif()
|
|
|
|
|
2011-08-11 15:01:36 +00:00
|
|
|
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
2011-08-10 23:42:10 +00:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
2012-02-10 19:28:35 +00:00
|
|
|
${BBGEDIR}/MT.cpp
|
2011-08-10 23:42:10 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS "-fpermissive"
|
|
|
|
)
|
|
|
|
ENDIF()
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
SET(FTGL_SRCS
|
|
|
|
${FTGLSRCDIR}/FTCharmap.cpp
|
|
|
|
${FTGLSRCDIR}/FTContour.cpp
|
|
|
|
${FTGLSRCDIR}/FTFace.cpp
|
|
|
|
${FTGLSRCDIR}/FTFont.cpp
|
|
|
|
${FTGLSRCDIR}/FTGLTextureFont.cpp
|
|
|
|
${FTGLSRCDIR}/FTGlyph.cpp
|
|
|
|
${FTGLSRCDIR}/FTGlyphContainer.cpp
|
|
|
|
${FTGLSRCDIR}/FTLibrary.cpp
|
|
|
|
${FTGLSRCDIR}/FTPoint.cpp
|
|
|
|
${FTGLSRCDIR}/FTSize.cpp
|
|
|
|
${FTGLSRCDIR}/FTTextureGlyph.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
|
|
|
${FTGL_SRCS}
|
|
|
|
PROPERTIES COMPILE_FLAGS "-DFTGL_LIBRARY_STATIC"
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(OGGVORBIS_SRCS
|
|
|
|
${LIBOGGDIR}/src/bitwise.c
|
|
|
|
${LIBOGGDIR}/src/framing.c
|
|
|
|
${LIBVORBISDIR}/lib/analysis.c
|
|
|
|
${LIBVORBISDIR}/lib/bitrate.c
|
|
|
|
${LIBVORBISDIR}/lib/block.c
|
|
|
|
${LIBVORBISDIR}/lib/codebook.c
|
|
|
|
${LIBVORBISDIR}/lib/envelope.c
|
|
|
|
${LIBVORBISDIR}/lib/floor0.c
|
|
|
|
${LIBVORBISDIR}/lib/floor1.c
|
|
|
|
${LIBVORBISDIR}/lib/info.c
|
|
|
|
${LIBVORBISDIR}/lib/lpc.c
|
|
|
|
${LIBVORBISDIR}/lib/lsp.c
|
|
|
|
${LIBVORBISDIR}/lib/mapping0.c
|
|
|
|
${LIBVORBISDIR}/lib/mdct.c
|
|
|
|
${LIBVORBISDIR}/lib/psy.c
|
|
|
|
${LIBVORBISDIR}/lib/registry.c
|
|
|
|
${LIBVORBISDIR}/lib/res0.c
|
|
|
|
${LIBVORBISDIR}/lib/sharedbook.c
|
|
|
|
${LIBVORBISDIR}/lib/smallft.c
|
|
|
|
${LIBVORBISDIR}/lib/synthesis.c
|
|
|
|
${LIBVORBISDIR}/lib/vorbisfile.c
|
|
|
|
${LIBVORBISDIR}/lib/window.c
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(FREETYPE2_SRCS
|
|
|
|
${FREETYPE2SRCDIR}/base/ftsystem.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftdebug.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftinit.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftbase.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftbbox.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftbdf.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftbitmap.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftcid.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftfstype.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftgasp.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftglyph.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftgxval.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftlcdfil.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftmm.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftotval.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftpatent.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftpfr.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftstroke.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftsynth.c
|
|
|
|
${FREETYPE2SRCDIR}/base/fttype1.c
|
|
|
|
${FREETYPE2SRCDIR}/base/ftwinfnt.c
|
|
|
|
${FREETYPE2SRCDIR}/truetype/truetype.c
|
|
|
|
${FREETYPE2SRCDIR}/type1/type1.c
|
|
|
|
${FREETYPE2SRCDIR}/cff/cff.c
|
|
|
|
${FREETYPE2SRCDIR}/cid/type1cid.c
|
|
|
|
${FREETYPE2SRCDIR}/pfr/pfr.c
|
|
|
|
${FREETYPE2SRCDIR}/type42/type42.c
|
|
|
|
${FREETYPE2SRCDIR}/winfonts/winfnt.c
|
|
|
|
${FREETYPE2SRCDIR}/pcf/pcf.c
|
|
|
|
${FREETYPE2SRCDIR}/bdf/bdf.c
|
|
|
|
${FREETYPE2SRCDIR}/sfnt/sfnt.c
|
|
|
|
${FREETYPE2SRCDIR}/autofit/autofit.c
|
|
|
|
${FREETYPE2SRCDIR}/pshinter/pshinter.c
|
|
|
|
${FREETYPE2SRCDIR}/raster/raster.c
|
|
|
|
${FREETYPE2SRCDIR}/smooth/smooth.c
|
|
|
|
${FREETYPE2SRCDIR}/cache/ftcache.c
|
|
|
|
${FREETYPE2SRCDIR}/gzip/ftgzip.c
|
|
|
|
${FREETYPE2SRCDIR}/lzw/ftlzw.c
|
|
|
|
${FREETYPE2SRCDIR}/psaux/psaux.c
|
|
|
|
${FREETYPE2SRCDIR}/psnames/psmodule.c
|
|
|
|
)
|
|
|
|
|
|
|
|
IF(MSVC)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
|
|
|
${FREETYPE2_SRCS}
|
|
|
|
PROPERTIES COMPILE_FLAGS "-DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT2_BUILD_LIBRARY -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H"
|
|
|
|
)
|
|
|
|
ELSE(MSVC)
|
|
|
|
# FT2 seems to not be strict-aliasing safe, so disable that in GCC.
|
|
|
|
CHECK_C_COMPILER_FLAG("-fno-strict-aliasing" COMPILER_HAS_NOSTRICTALIAS)
|
|
|
|
IF(COMPILER_HAS_NOSTRICTALIAS)
|
|
|
|
SET(NOSTRICTALIAS "-fno-strict-aliasing")
|
|
|
|
ELSE(COMPILER_HAS_NOSTRICTALIAS)
|
|
|
|
SET(NOSTRICTALIAS "")
|
|
|
|
ENDIF(COMPILER_HAS_NOSTRICTALIAS)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
|
|
|
${FREETYPE2_SRCS}
|
2017-01-13 23:27:19 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS "-Wno-extended-offsetof -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DFT_CONFIG_CONFIG_H='\"${FREETYPE2DIR}/include/freetype/config/ftconfig.h\"' -DFT2_BUILD_LIBRARY -DFT_CONFIG_MODULES_H='\"${FREETYPE2DIR}/include/freetype/config/ftmodule.h\"' -I${FREETYPE2SRCDIR} -I${FREETYPE2DIR}/include/freetype/config -DHAVE_FCNTL_H ${NOSTRICTALIAS}"
|
2011-08-03 20:05:33 +00:00
|
|
|
)
|
|
|
|
ENDIF(MSVC)
|
|
|
|
|
|
|
|
|
|
|
|
SET(LUA_SRCS
|
|
|
|
${LUASRCDIR}/lapi.c
|
Script interface improvements & extensions.
- Pointer typechecks are now enabled by default.
- enabled all script warnings for non-FULL or DEMO builds by default
- Added generic obj_* functions that operate on any type of RenderObject.
These give quite low-level control about the renderer, and are quite
dangerous too.
Subsequently, many functions sharing the same code (*_setPosition, for example)
could be removed, and simply call the generic functions after a type check.
- Added interface function deathNotify(). The original logic of death
notifiers was never used, so i thought i'd make use of it.
This is useful in scripts to safely drop dangling pointers.
- removed sendEntityMessage, entity_setCollideWithAvatar, entity_setTouchDamage,
which were essentially no-ops.
- Replaced all unnecessary luaReturnNum(0) and luaReturnInt(0),
now it does only push a return value on the stack if the function
is actually supposed to have a retun value.
- Allow variadic calling of entity_msg(). Now any parameters can be passed
to the function, and the target entity will receive all of them.
Any values returned from the entity's msg() callback will be returned
by entity_msg() to the original caller. This allows nice RPC-like
entity communication.
- fixed possible crash in debugLog, bone_update, entity_debugText
- added an override function for loadfile() that is case-insensitive like dofile()
- entity_createEntity returns the created entity now
- spawnParticleEffect returns the associated RenderObject
- Added some text rendering functions
- Added beam_setFirer()
- removed the underflow check in avatar_decrLeaches() I added earlier
- added a panic function for Lua.
- added the Lua debug library
- fixed a stupid typo in ScriptObject::isType() that made the type checks a lot less accurate
- misc stuff I forgot
2012-02-05 19:22:54 +00:00
|
|
|
${LUASRCDIR}/ldblib.c
|
2011-08-03 20:05:33 +00:00
|
|
|
${LUASRCDIR}/ldebug.c
|
|
|
|
${LUASRCDIR}/ldo.c
|
|
|
|
${LUASRCDIR}/ldump.c
|
|
|
|
${LUASRCDIR}/lfunc.c
|
|
|
|
${LUASRCDIR}/lgc.c
|
2014-05-30 20:51:12 +00:00
|
|
|
${LUASRCDIR}/linit.c
|
|
|
|
${LUASRCDIR}/liolib.c
|
2011-08-03 20:05:33 +00:00
|
|
|
${LUASRCDIR}/lmem.c
|
2014-05-30 20:51:12 +00:00
|
|
|
${LUASRCDIR}/loadlib.c
|
2011-08-03 20:05:33 +00:00
|
|
|
${LUASRCDIR}/lobject.c
|
|
|
|
${LUASRCDIR}/lopcodes.c
|
2014-05-30 20:51:12 +00:00
|
|
|
${LUASRCDIR}/loslib.c
|
2011-08-03 20:05:33 +00:00
|
|
|
${LUASRCDIR}/lstate.c
|
|
|
|
${LUASRCDIR}/lstring.c
|
|
|
|
${LUASRCDIR}/ltable.c
|
|
|
|
${LUASRCDIR}/ltm.c
|
|
|
|
${LUASRCDIR}/lundump.c
|
|
|
|
${LUASRCDIR}/lvm.c
|
|
|
|
${LUASRCDIR}/lzio.c
|
|
|
|
${LUASRCDIR}/lauxlib.c
|
|
|
|
${LUASRCDIR}/lbaselib.c
|
|
|
|
${LUASRCDIR}/lstrlib.c
|
|
|
|
${LUASRCDIR}/ltablib.c
|
|
|
|
${LUASRCDIR}/lparser.c
|
|
|
|
${LUASRCDIR}/llex.c
|
|
|
|
${LUASRCDIR}/lcode.c
|
|
|
|
${LUASRCDIR}/lmathlib.c
|
|
|
|
)
|
|
|
|
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
IF(AQUARIA_USE_VFS)
|
2013-06-19 16:35:06 +00:00
|
|
|
ADD_SUBDIRECTORY("${EXTLIBDIR}/ttvfs")
|
|
|
|
ADD_SUBDIRECTORY("${EXTLIBDIR}/ttvfs_zip")
|
2014-04-07 00:10:05 +00:00
|
|
|
ADD_SUBDIRECTORY("${EXTLIBDIR}/ttvfs_cfileapi")
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ttvfs")
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ttvfs_zip")
|
2014-04-07 00:10:05 +00:00
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ttvfs_cfileapi")
|
[vfs, #3] All file reading code goes through the VFS now, new mod downloader & mod selector in place. Also a bunch of other stuff. (...)
- HTTP networking support, mods can be downloaded via the builtin downloader.
All network activity runs in a seperate thread, which is started
as soon as any network activity is requested.
- The master server is hard-coded to fg.wzff.de/aqmods/ if not specified otherwise;
this setting can be overridden in the config file.
- The mod selector screen is now a grid-view for much better navigation;
also works with joystick.
- VFS code is functionally similar to the old molebox-packed release
for win32. The game could also have its data shipped in a Zip file
or any other kind of archive.
- It is still possible to build without VFS support, but then the mod
downloader and soft-patching will not be available.
The full commit history can be found here:
https://github.com/fgenesis/Aquaria_clean/compare/master...vfs
The most important commit messages follow:
[...]
This replaces all std::ifstream with InStream, and fopen(), ... with vfopen(), ...
Some code is #ifdef'd for better performance and less memory-copying.
VFILE is defined to whatever type of file is in use:
- FILE if BBGE_BUILD_VFS is not defined
- tttvfs::VFSFile if it is.
Other changes:
- [un]packFile() is now unused and obsolete. That code has not been adjusted to use VFILE.
- glpng can now load from a memory buffer.
- TinyXML uses the VFS for reading operations now.
- The rather clunky binary stream loading of glfont2 got replaced with ByteBuffer,
which gets its data in one block (necessary to use the VFS without implementing
a somewhat STL-compliant std::ifstream replacement.)
-------------
Implement loading mods from zip files.
-------------
Implement soft-patching game data files. (Replacing textures/audio/... on the fly)
-------------
Misc bits:
- Extended GUI focus handling a bit
- Fixed weirdness in texture loading... not sure but this seems more correct to me.
Actually, considering that the texture will have its native size after restarting the game,
the lines removed with this commit seem pretty useless.
2012-06-01 15:52:19 +00:00
|
|
|
ENDIF(AQUARIA_USE_VFS)
|
|
|
|
|
2013-06-19 16:35:06 +00:00
|
|
|
IF(WIN32)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "ws2_32")
|
|
|
|
ENDIF(WIN32)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
IF(MACOSX)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "-framework Carbon")
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "-framework Cocoa")
|
2015-01-28 01:28:39 +00:00
|
|
|
#SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "-framework OpenAL")
|
2011-08-03 20:05:33 +00:00
|
|
|
ENDIF(MACOSX)
|
|
|
|
|
2012-09-23 03:31:29 +00:00
|
|
|
IF(HAIKU)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} "network")
|
|
|
|
ENDIF()
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${SDL_LIBRARY})
|
2022-03-30 20:54:03 +00:00
|
|
|
|
|
|
|
if(NOT AQUARIA_USE_MOJOAL)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${OPENAL_LIBRARY})
|
|
|
|
endif()
|
2011-08-03 20:05:33 +00:00
|
|
|
|
2015-09-17 22:55:50 +00:00
|
|
|
IF(NOT FTGL_FOUND)
|
2011-08-03 20:05:33 +00:00
|
|
|
IF(FREETYPE_FOUND)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${FREETYPE_LIBRARIES})
|
|
|
|
ELSE(FREETYPE_FOUND)
|
|
|
|
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FREETYPE2_SRCS})
|
|
|
|
ENDIF(FREETYPE_FOUND)
|
2015-09-17 22:55:50 +00:00
|
|
|
ENDIF(NOT FTGL_FOUND)
|
2011-08-03 20:05:33 +00:00
|
|
|
|
|
|
|
IF(LUA51_FOUND)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${LUA_LIBRARIES})
|
|
|
|
ELSE(LUA51_FOUND)
|
|
|
|
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${LUA_SRCS})
|
|
|
|
ENDIF(LUA51_FOUND)
|
|
|
|
|
|
|
|
IF(OGGVORBIS_FOUND)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${OGGVORBIS_LIBRARIES})
|
|
|
|
ELSE(OGGVORBIS_FOUND)
|
|
|
|
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${OGGVORBIS_SRCS})
|
|
|
|
ENDIF(OGGVORBIS_FOUND)
|
|
|
|
|
2014-06-08 20:11:23 +00:00
|
|
|
IF(TINYXML2_FOUND)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${TINYXML2_LIBRARIES})
|
|
|
|
ELSE(TINYXML2_FOUND)
|
2014-06-09 20:21:24 +00:00
|
|
|
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${TINYXML2_SRCS})
|
2014-06-08 20:11:23 +00:00
|
|
|
ENDIF(TINYXML2_FOUND)
|
|
|
|
|
2015-09-17 22:55:50 +00:00
|
|
|
IF(FTGL_FOUND)
|
|
|
|
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${FTGL_LIBRARIES})
|
|
|
|
ELSE(FTGL_FOUND)
|
|
|
|
SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} ${FTGL_SRCS})
|
|
|
|
ENDIF(FTGL_FOUND)
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
ADD_EXECUTABLE(aquaria ${EXETYPE}
|
|
|
|
${AQUARIA_SRCS}
|
|
|
|
${BBGE_SRCS}
|
|
|
|
${OPTIONAL_SRCS}
|
|
|
|
)
|
|
|
|
TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
|
|
|
|
|
2018-01-02 14:31:47 +00:00
|
|
|
IF(WIN32)
|
|
|
|
SET(RC_DEFINES "" FORCE)
|
|
|
|
SET(RC_INCLUDES "" FORCE)
|
|
|
|
SET(RC_FLAGS "" FORCE)
|
|
|
|
endif(WIN32)
|
|
|
|
|
2011-08-03 20:05:33 +00:00
|
|
|
# end of CMakeLists.txt ...
|
|
|
|
|