License project as open-source under the MIT license
This commit also adds a README with build and usage instructions.
This commit is contained in:
parent
35cabf05da
commit
eeb69fe0df
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright 2023 The LightningBolt Authors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.15)
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
project(lightningbolt
|
project(lightningbolt
|
||||||
|
@ -20,9 +23,6 @@ lb_set_alternate_linker()
|
||||||
|
|
||||||
add_subdirectory(lib/base)
|
add_subdirectory(lib/base)
|
||||||
|
|
||||||
# third party vendor dependencies
|
|
||||||
#add_subdirectory(third_party)
|
|
||||||
|
|
||||||
add_executable(lightningbolt
|
add_executable(lightningbolt
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
)
|
)
|
||||||
|
|
|
@ -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.
|
|
@ -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.
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
struct BoltHdr {
|
struct BoltHdr {
|
||||||
char magic[6]; // BOLT\r\n
|
char magic[6]; // BOLT\r\n
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright 2023 The LightningBolt Authors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
# CMake policy configuration
|
# CMake policy configuration
|
||||||
|
|
||||||
# Macro to enable new CMake policy.
|
# Macro to enable new CMake policy.
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# Copyright 2023 The LightningBolt Authors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
function(lb_target target)
|
function(lb_target target)
|
||||||
target_compile_definitions(${target} PRIVATE "$<$<CONFIG:DEBUG>:LIGHTNINGBOLT_DEBUG>")
|
target_compile_definitions(${target} PRIVATE "$<$<CONFIG:DEBUG>:LIGHTNINGBOLT_DEBUG>")
|
||||||
#target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR})
|
#target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR})
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# Copyright 2023 The LightningBolt Authors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
add_library(lb_base
|
add_library(lb_base
|
||||||
MmapFile.cpp
|
MmapFile.cpp
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <system_error>
|
#include <system_error>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include <base/MmapFile.hpp>
|
#include <base/MmapFile.hpp>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <base/Types.hpp>
|
#include <base/Types.hpp>
|
||||||
#include <base/ErrorOr.hpp>
|
#include <base/ErrorOr.hpp>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include "MmapFile.hpp"
|
#include "MmapFile.hpp"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <base/Types.hpp>
|
#include <base/Types.hpp>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
//! Core types and includes
|
//! Core types and includes
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include <base/Types.hpp>
|
#include <base/Types.hpp>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <span>
|
#include <span>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 The LightningBolt Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
#include <base/MmapFile.hpp>
|
#include <base/MmapFile.hpp>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <format>
|
#include <format>
|
||||||
|
|
Loading…
Reference in New Issue