From eeb69fe0dfce87bf10223f19fcd14a049c07d1f1 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Sun, 19 Nov 2023 20:21:56 -0500 Subject: [PATCH] License project as open-source under the MIT license This commit also adds a README with build and usage instructions. --- AUTHORS | 1 + CMakeLists.txt | 6 +++--- LICENSE | 7 +++++++ README.md | 21 +++++++++++++++++++++ bolt.hexpat | 3 +++ cmake/Policies.cmake | 3 +++ cmake/ProjectFuncs.cmake | 3 +++ lib/base/CMakeLists.txt | 2 ++ lib/base/ErrorOr.hpp | 3 +++ lib/base/MmapFile.cpp | 3 +++ lib/base/MmapFile.hpp | 3 +++ lib/base/MmapFile.linux.cpp | 3 +++ lib/base/OffsetPtr.hpp | 3 +++ lib/base/Types.hpp | 3 +++ lib/structs/BoltStructs.hpp | 3 +++ src/main.cpp | 3 +++ 16 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 AUTHORS create mode 100644 LICENSE create mode 100644 README.md diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..df89c99 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Lily Tsuru \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 2edb747..f8d488a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright 2023 The LightningBolt Authors +# SPDX-License-Identifier: MIT + cmake_minimum_required(VERSION 3.15) project(lightningbolt @@ -20,9 +23,6 @@ lb_set_alternate_linker() add_subdirectory(lib/base) -# third party vendor dependencies -#add_subdirectory(third_party) - add_executable(lightningbolt src/main.cpp ) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e5cc25f --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023 The LightningBolt Developers + +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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9905c91 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# LightningBolt + +A (only semi-WIP) extractor for The Simpsons Skateboarding BOLT archive files. + +Currently only works with US copies. + +# Building + +You need: + +- CMake +- A C++20 compiler (clang/gcc, MSVC won't work on Windows, you need clang-cl) + +```bash +$ cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release +$ cmake --build build +``` + +# Using + +Run `lightningbolt` where both the game executable and ASSETS.BLT reside. \ No newline at end of file diff --git a/bolt.hexpat b/bolt.hexpat index f666455..c3dbee1 100644 --- a/bolt.hexpat +++ b/bolt.hexpat @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + struct BoltHdr { char magic[6]; // BOLT\r\n diff --git a/cmake/Policies.cmake b/cmake/Policies.cmake index d7a084b..84f399f 100644 --- a/cmake/Policies.cmake +++ b/cmake/Policies.cmake @@ -1,3 +1,6 @@ +# Copyright 2023 The LightningBolt Authors +# SPDX-License-Identifier: MIT + # CMake policy configuration # Macro to enable new CMake policy. diff --git a/cmake/ProjectFuncs.cmake b/cmake/ProjectFuncs.cmake index 3278ccd..a20e849 100644 --- a/cmake/ProjectFuncs.cmake +++ b/cmake/ProjectFuncs.cmake @@ -1,3 +1,6 @@ +# Copyright 2023 The LightningBolt Authors +# SPDX-License-Identifier: MIT + function(lb_target target) target_compile_definitions(${target} PRIVATE "$<$:LIGHTNINGBOLT_DEBUG>") #target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}) diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt index b61f9b0..d422c4f 100644 --- a/lib/base/CMakeLists.txt +++ b/lib/base/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright 2023 The LightningBolt Authors +# SPDX-License-Identifier: MIT add_library(lb_base MmapFile.cpp ) diff --git a/lib/base/ErrorOr.hpp b/lib/base/ErrorOr.hpp index ed96e65..7e9080d 100644 --- a/lib/base/ErrorOr.hpp +++ b/lib/base/ErrorOr.hpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #pragma once #include #include diff --git a/lib/base/MmapFile.cpp b/lib/base/MmapFile.cpp index f3eb1db..8904766 100644 --- a/lib/base/MmapFile.cpp +++ b/lib/base/MmapFile.cpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #include #ifdef __linux__ diff --git a/lib/base/MmapFile.hpp b/lib/base/MmapFile.hpp index afb3f0f..1d32c50 100644 --- a/lib/base/MmapFile.hpp +++ b/lib/base/MmapFile.hpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #pragma once #include #include diff --git a/lib/base/MmapFile.linux.cpp b/lib/base/MmapFile.linux.cpp index 711302a..236af0e 100644 --- a/lib/base/MmapFile.linux.cpp +++ b/lib/base/MmapFile.linux.cpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #include "MmapFile.hpp" #include #include diff --git a/lib/base/OffsetPtr.hpp b/lib/base/OffsetPtr.hpp index d5b8c2a..b2bb05c 100644 --- a/lib/base/OffsetPtr.hpp +++ b/lib/base/OffsetPtr.hpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #pragma once #include #include diff --git a/lib/base/Types.hpp b/lib/base/Types.hpp index f16ab7d..8168d28 100644 --- a/lib/base/Types.hpp +++ b/lib/base/Types.hpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + //! Core types and includes #pragma once diff --git a/lib/structs/BoltStructs.hpp b/lib/structs/BoltStructs.hpp index 6061bae..9243245 100644 --- a/lib/structs/BoltStructs.hpp +++ b/lib/structs/BoltStructs.hpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/src/main.cpp b/src/main.cpp index e841db9..e588a76 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,6 @@ +// Copyright 2023 The LightningBolt Authors +// SPDX-License-Identifier: MIT + #include #include #include