Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Checks: [
-clang-analyzer-core.DivideZero,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-core.UndefinedBinaryOperatorResult,
-clang-analyzer-cplusplus.InnerPointer,
-clang-analyzer-cplusplus.NewDelete,
# We often use enums as bitsets and do things like `enum::A | enum::B`
# which is explicitly unsupported by this check, and it is officially recommended to disable
Expand Down
46 changes: 46 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,60 @@
Cataclysm is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

--------------------------------------------------------------------------------

GNU Unifont (data/font/unifont.ttf) is licensed under SIL Open Font License version 1.1 and GNU General Public License v2+ with the GNU font embedding exception. Visit http://unifoundry.com/LICENSE.txt for details.

--------------------------------------------------------------------------------

Terminus Font (data/font/terminus.ttf) is licensed under the SIL Open Font License (see LICENSE-OFL-Terminus-Font.txt).

--------------------------------------------------------------------------------

Vecterminus Font (data/font/VecTerminus12Medium.otf) is licensed under the SIL Open Font License (see LICENSE-OFL-Terminus-Font.txt).

--------------------------------------------------------------------------------

Robot font (data/font/Roboto-Medium.tt) is licensed under the Apache License, version 2.0 (see LICENSE-Apache-Roboto-Font.txt).

--------------------------------------------------------------------------------

CATCH unit-test framework (tests/catch/catch.hpp) is licensed under the Boost Software License. Visit https://github.com/philsquared/Catch/blob/master/LICENSE.txt to read the license.

--------------------------------------------------------------------------------

PLF List and PLF Colony (src/list.h, src/colony.h) are licensed under the zLib license (https://www.zlib.net/zlib_license.html).

--------------------------------------------------------------------------------

getpost (tools/json_tools/format/getpost.h) is licensed under the MIT license, see file for text of license.

--------------------------------------------------------------------------------

fmt is licensed under the MIT license. The full license text is as follows:

Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------

libbacktrace is licensed under a BSD license (https://github.com/ianlancetaylor/libbacktrace/blob/master/LICENSE). The full license text is as follows:

# Copyright (C) 2012-2016 Free Software Foundation, Inc.
Expand Down Expand Up @@ -46,6 +87,8 @@ libbacktrace is licensed under a BSD license (https://github.com/ianlancetaylor/
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

zstd is licensed under a BSD license. The full license text is as follows:

BSD License
Expand Down Expand Up @@ -78,3 +121,6 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

33 changes: 21 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ endif
CPPFLAGS += -Isrc -isystem ${SRC_DIR}/third-party $(DEFINES)
CXXFLAGS += $(WARNINGS) $(DEBUG) $(DEBUGSYMS) $(PROFILE) $(OTHERS)
TOOL_CXXFLAGS = -DCATA_IN_TOOL
DEFINES += -DZSTD_STATIC_LINKING_ONLY -DZSTD_DISABLE_ASM
DEFINES += -DZSTD_STATIC_LINKING_ONLY -DZSTD_DISABLE_ASM -DFMT_USE_LOCALE=0

BINDIST_EXTRAS += README.md data doc LICENSE.txt LICENSE-OFL-Terminus-Font.txt VERSION.txt $(JSON_FORMATTER_BIN)
BINDIST = $(BUILD_PREFIX)cataclysmdda-$(VERSION).tar.gz
Expand Down Expand Up @@ -785,20 +785,20 @@ ifeq ($(TILES), 1)
else # libsdl build
DEFINES += -DOSX_SDL2_LIBS
# handle #include "SDL2/SDL.h" and "SDL.h"
CXXFLAGS += $(shell sdl2-config --cflags) \
-I$(shell dirname $(shell sdl2-config --cflags | sed 's/-I\(.[^ ]*\) .*/\1/'))
CXXFLAGS += $(subst -I,-isystem ,$(shell sdl2-config --cflags)) \
-isystem $(shell dirname $(shell sdl2-config --cflags | sed 's/-I\(.[^ ]*\) .*/\1/'))
LDFLAGS += -framework Cocoa $(shell sdl2-config --libs) -lSDL2_ttf
LDFLAGS += -lSDL2_image
ifeq ($(SOUND), 1)
LDFLAGS += -lSDL2_mixer
endif
endif
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags freetype2)
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags freetype2))
LDFLAGS += $(shell $(PKG_CONFIG) --libs freetype2)
else ifneq ($(NATIVE),emscripten)
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags sdl2)
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags SDL2_image SDL2_ttf)
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags freetype2)
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags sdl2))
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags SDL2_image SDL2_ttf))
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags freetype2))

ifeq ($(STATIC), 1)
LDFLAGS += $(shell $(PKG_CONFIG) sdl2 --static --libs)
Expand Down Expand Up @@ -855,7 +855,7 @@ else

# Link to ncurses if we're using a non-tiles, Linux build
ifeq ($(HAVE_PKGCONFIG),1)
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(NCURSES_PREFIX))
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags $(NCURSES_PREFIX)))
LDFLAGS += $(shell $(PKG_CONFIG) --libs $(NCURSES_PREFIX))
else
ifeq ($(HAVE_NCURSES5CONFIG),1)
Expand Down Expand Up @@ -883,13 +883,13 @@ ifeq ($(SOUND), 1)
ifeq ($(MACPORTS), 1)
LDFLAGS += -lSDL2_mixer -lvorbisfile -lvorbis -logg
else # homebrew
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags SDL2_mixer)
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags SDL2_mixer))
LDFLAGS += $(shell $(PKG_CONFIG) --libs SDL2_mixer)
LDFLAGS += -lvorbisfile -lvorbis -logg
endif
endif
else # not osx
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags SDL2_mixer)
CXXFLAGS += $(subst -I,-isystem ,$(shell $(PKG_CONFIG) --cflags SDL2_mixer))
LDFLAGS += $(shell $(PKG_CONFIG) --libs SDL2_mixer)
LDFLAGS += -lpthread
endif
Expand Down Expand Up @@ -980,7 +980,7 @@ ifeq ($(HEADERPOPULARITY), 1)
else
SOURCES := $(wildcard $(SRC_DIR)/*.cpp)
endif
THIRD_PARTY_SOURCES := $(wildcard $(SRC_DIR)/third-party/flatbuffers/*.cpp)
THIRD_PARTY_SOURCES := $(wildcard $(SRC_DIR)/third-party/flatbuffers/*.cpp $(SRC_DIR)/third-party/fmt/*.cc)
THIRD_PARTY_C_SOURCES := $(wildcard $(SRC_DIR)/third-party/zstd/common/*.c $(SRC_DIR)/third-party/zstd/compress/*.c $(SRC_DIR)/third-party/zstd/decompress/*.c)
HEADERS := $(wildcard $(SRC_DIR)/*.h)
TESTSRC := $(wildcard tests/*.cpp)
Expand Down Expand Up @@ -1022,7 +1022,10 @@ endif

SOURCES += $(IMGUI_SOURCES)

_OBJS = $(SOURCES:$(SRC_DIR)/%.cpp=%.o)
CPP_SOURCES := $(filter %.cpp,$(SOURCES))
CC_SOURCES := $(filter %.cc,$(SOURCES))
_OBJS = $(CPP_SOURCES:$(SRC_DIR)/%.cpp=%.o)
_OBJS += $(CC_SOURCES:$(SRC_DIR)/%.cc=%.o)
_OBJS += $(C_SOURCES:$(SRC_DIR)/%.c=%.o)
ifeq ($(TARGETSYSTEM),WINDOWS)
RSRC = $(wildcard $(SRC_DIR)/*.rc)
Expand Down Expand Up @@ -1141,6 +1144,9 @@ $(shell mkdir -p $(DIRS))
$(ODIR)/%.inc: $(SRC_DIR)/%.cpp
$(COMPILE.cc) -o /dev/null -Wno-error -H -E $< 2> $@

$(ODIR)/%.inc: $(SRC_DIR)/%.cc
$(COMPILE.cc) -o /dev/null -Wno-error -H -E $< 2> $@

$(ODIR)/%.inc: $(SRC_DIR)/%.c
$(COMPILE.c) -o /dev/null -Wno-error -H -E $< 2> $@

Expand All @@ -1151,6 +1157,9 @@ includes: $(OBJS:.o=.inc)
$(ODIR)/third-party/%.o: $(SRC_DIR)/third-party/%.cpp
$(COMPILE.cc) $(OUTPUT_OPTION) -w -MMD -MP $<

$(ODIR)/third-party/%.o: $(SRC_DIR)/third-party/%.cc
$(COMPILE.cc) $(OUTPUT_OPTION) -w -MMD -MP $<

$(ODIR)/third-party/%.o: $(SRC_DIR)/third-party/%.c
$(COMPILE.c) $(OUTPUT_OPTION) -x c $(CFLAGS) -w -MMD -MP $<

Expand Down
3 changes: 2 additions & 1 deletion android/app/jni/src/third-party/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ LOCAL_CPP_FEATURES := exceptions rtti

# Add your application source files here...
FLATBUFFERS_SRCS := $(sort $(wildcard $(LOCAL_PATH)/third-party/flatbuffers/*.cpp))
FMT_SRCS := $(sort $(wildcard $(LOCAL_PATH)/third-party/fmt/*.cc))
ZSTD_SRCS := $(sort $(wildcard $(LOCAL_PATH)/third-party/zstd/common/*.c) $(wildcard $(LOCAL_PATH)/third-party/zstd/compress/*.c) $(wildcard $(LOCAL_PATH)/third-party/zstd/decompress/*.c))
LOCAL_SRC_FILES := $(sort $(FLATBUFFERS_SRCS:$(LOCAL_PATH)/%=%) $(ZSTD_SRCS:$(LOCAL_PATH)/%=%))
LOCAL_SRC_FILES := $(sort $(FLATBUFFERS_SRCS:$(LOCAL_PATH)/%=%) $(FMT_SRCS:$(LOCAL_PATH)/%=%) $(ZSTD_SRCS:$(LOCAL_PATH)/%=%))

LOCAL_CFLAGS += -DBACKTRACE=1 -DLOCALIZE=1 -DZSTD_STATIC_LINKING_ONLY -DZSTD_DISABLE_ASM -Wextra -Wall -fsigned-char

Expand Down
10 changes: 5 additions & 5 deletions data/json/vehicleparts/vp_flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"id": "ALTERNATOR",
"type": "json_flag",
"info": "When mounted on an engine and the engine is on it will provide up to <color_green>%sW</color> of electrical power to the vehicle.",
"info": "When mounted on an engine and the engine is on it will provide up to <color_green>%dW</color> of electrical power to the vehicle.",
"requires_flag": "E_ALTERNATOR"
},
{
Expand Down Expand Up @@ -87,12 +87,12 @@
{
"id": "ENABLED_DRAINS_EPOWER",
"type": "json_flag",
"info": "When turned on, this device drains <color_red>%sW</color> from the vehicle's batteries."
"info": "When turned on, this device drains <color_red>%dW</color> from the vehicle's batteries."
},
{
"id": "SOLAR_PANEL",
"type": "json_flag",
"info": "Provides up to <color_green>%sW</color> of electrical power to the vehicle when exposed to the sun. Weather and clouds will affect power generation."
"info": "Provides up to <color_green>%dW</color> of electrical power to the vehicle when exposed to the sun. Weather and clouds will affect power generation."
},
{
"id": "ENGINE",
Expand Down Expand Up @@ -195,12 +195,12 @@
{
"id": "WIND_TURBINE",
"type": "json_flag",
"info": "Provides <color_green>%sW</color> of electrical power to the vehicle for every 1 m/s of wind the vehicle is exposed to."
"info": "Provides <color_green>%dW</color> of electrical power to the vehicle for every 1 m/s of wind the vehicle is exposed to."
},
{
"id": "WATER_WHEEL",
"type": "json_flag",
"info": "Provides up to <color_green>%sW</color> of electrical power to the vehicle when built over shallow moving water."
"info": "Provides up to <color_green>%dW</color> of electrical power to the vehicle when built over shallow moving water."
},
{
"id": "FLAT_SURF",
Expand Down
4 changes: 4 additions & 0 deletions msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
<Project>{8a533a64-435d-4d4f-9ff0-1e97aace9374}</Project>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
<ProjectReference Include="fmt.vcxproj">
<Project>{f2098959-aad9-4210-a64c-fc4a09a45556}</Project>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
<ProjectReference Include="zstd.vcxproj">
<Project>{f49f14c6-b046-41c7-b707-03366f4b1578}</Project>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
Expand Down
42 changes: 40 additions & 2 deletions msvc-full-features/Cataclysm-vcpkg-static.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32104.313
# Visual Studio Version 18
VisualStudioVersion = 18.3.11312.210 d18.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04F55049-F0DE-4AE6-9D10-3DB97DFF2E2F}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -32,6 +32,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "zstd.vcxproj", "{F4
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzip", "zzip.vcxproj", "{1232212E-8B83-40E9-B502-F25DBC4DB6CF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "fmt.vcxproj", "{F2098959-AAD9-4210-A64C-FC4A09A45556}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64EC = Debug|ARM64EC
Expand Down Expand Up @@ -352,6 +354,42 @@ Global
{1232212E-8B83-40E9-B502-F25DBC4DB6CF}.Release-NoTiles|x64.Build.0 = Release|x64
{1232212E-8B83-40E9-B502-F25DBC4DB6CF}.Release-NoTiles|x86.ActiveCfg = Release|Win32
{1232212E-8B83-40E9-B502-F25DBC4DB6CF}.Release-NoTiles|x86.Build.0 = Release|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug|x64.ActiveCfg = Debug|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug|x64.Build.0 = Debug|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug|x86.ActiveCfg = Debug|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug|x86.Build.0 = Debug|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug-NoTiles|ARM64EC.ActiveCfg = Debug|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug-NoTiles|ARM64EC.Build.0 = Debug|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug-NoTiles|x64.ActiveCfg = Debug|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug-NoTiles|x64.Build.0 = Debug|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug-NoTiles|x86.ActiveCfg = Debug|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Debug-NoTiles|x86.Build.0 = Debug|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick|ARM64EC.Build.0 = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick|x64.ActiveCfg = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick|x64.Build.0 = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick|x86.ActiveCfg = Debug|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick|x86.Build.0 = Debug|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick-NoTiles|ARM64EC.ActiveCfg = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick-NoTiles|ARM64EC.Build.0 = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick-NoTiles|x64.ActiveCfg = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick-NoTiles|x64.Build.0 = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick-NoTiles|x86.ActiveCfg = Release|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Quick-NoTiles|x86.Build.0 = Release|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release|ARM64EC.Build.0 = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release|x64.ActiveCfg = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release|x64.Build.0 = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release|x86.ActiveCfg = Release|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release|x86.Build.0 = Release|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release-NoTiles|ARM64EC.ActiveCfg = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release-NoTiles|ARM64EC.Build.0 = Release|ARM64EC
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release-NoTiles|x64.ActiveCfg = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release-NoTiles|x64.Build.0 = Release|x64
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release-NoTiles|x86.ActiveCfg = Release|Win32
{F2098959-AAD9-4210-A64C-FC4A09A45556}.Release-NoTiles|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading
Loading