-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9e4fa1
commit 83ce81f
Showing
151 changed files
with
11,411 additions
and
9,651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
// Copyright © 2022 Luis Michaelis <[email protected]> | ||
// Copyright © 2022-2023 GothicKit Contributors. | ||
// SPDX-License-Identifier: MIT | ||
#include <phoenix/vdfs.hh> | ||
#include <zenkit/Vfs.hh> | ||
|
||
#include <iostream> | ||
|
||
void print_entries(const std::set<phoenix::vdf_entry, phoenix::vdf_entry_comparator>& entries) { | ||
void print_entries(const std::set<zenkit::VfsNode, zenkit::VfsNodeComparator>& entries) { | ||
for (auto& e : entries) { | ||
if (e.is_directory()) { | ||
print_entries(e.children); | ||
if (e.type() == zenkit::VfsNodeType::DIRECTORY) { | ||
print_entries(e.children()); | ||
} else { | ||
std::cout << " " << e.name << ": " << e.size << " bytes\n"; | ||
std::cout << e.name() << "\n"; | ||
} | ||
} | ||
} | ||
|
@@ -20,12 +20,8 @@ int main(int argc, char** argv) { | |
return -1; | ||
} | ||
|
||
auto vdf = phoenix::vdf_file::open(argv[1]); | ||
auto& header = vdf.header; | ||
|
||
std::cout << "Description: " << header.comment << "\n" | ||
<< "Timestamp (Unix): " << header.timestamp << "\nEntries:\n"; | ||
|
||
print_entries(vdf.entries); | ||
zenkit::Vfs vfs {}; | ||
vfs.mount_disk(argv[1]); | ||
print_entries(vfs.root().children()); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright © 2022 Luis Michaelis <[email protected]> | ||
// Copyright © 2022-2023 GothicKit Contributors. | ||
// SPDX-License-Identifier: MIT | ||
#include <phoenix/archive.hh> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// Copyright © 2022 Luis Michaelis <[email protected]> | ||
// Copyright © 2022-2023 GothicKit Contributors. | ||
// SPDX-License-Identifier: MIT | ||
#include <phoenix/ext/daedalus_classes.hh> | ||
#include <phoenix/script.hh> | ||
#include <phoenix/vm.hh> | ||
#include <zenkit/Logger.hh> | ||
|
||
#include <iostream> | ||
|
||
|
@@ -11,6 +13,8 @@ int main(int argc, char** argv) { | |
return -1; | ||
} | ||
|
||
zenkit::Logger::set_default(zenkit::LogLevel::DEBUG); | ||
|
||
phoenix::vm vm {phoenix::script::parse(argv[1])}; | ||
phoenix::register_all_script_classes(vm); // needed for Gothic scripts | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright © 2023 GothicKit Contributors. | ||
// SPDX-License-Identifier: MIT | ||
#pragma once | ||
#include "zenkit/Vfs.hh" | ||
|
||
namespace phoenix { | ||
using VfsBrokenDiskError ZKREM("renamed to zenkit::VfsBrokenDiskError") = zenkit::VfsBrokenDiskError; | ||
using VfsFileExistsError ZKREM("renamed to zenkit::VfsFileExistsError") = zenkit::VfsFileExistsError; | ||
using VfsNotFoundError ZKREM("renamed to zenkit::VfsNotFoundError") = zenkit::VfsNotFoundError; | ||
using VfsNodeType ZKREM("renamed to zenkit::VfsNodeType") = zenkit::VfsNodeType; | ||
using VfsFileDescriptor ZKREM("renamed to zenkit::VfsFileDescriptor") = zenkit::VfsFileDescriptor; | ||
using VfsNode ZKREM("renamed to zenkit::VfsNode") = zenkit::VfsNode; | ||
using VfsNodeComparator ZKREM("renamed to zenkit::VfsNodeComparator") = zenkit::VfsNodeComparator; | ||
using VfsNode ZKREM("renamed to zenkit::VfsNode") = zenkit::VfsNode; | ||
using VfsOverwriteBehavior ZKREM("renamed to zenkit::VfsOverwriteBehavior") = zenkit::VfsOverwriteBehavior; | ||
using Vfs ZKREM("renamed to zenkit::Vfs") = zenkit::Vfs; | ||
} // namespace phoenix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright © 2023 GothicKit Contributors. | ||
// SPDX-License-Identifier: MIT | ||
#pragma once | ||
#include "zenkit/ModelAnimation.hh" | ||
|
||
namespace phoenix { | ||
using animation ZKREM("renamed to zenkit::Animation") = zenkit::ModelAnimation; | ||
using animation_sample ZKREM("renamed to zenkit::AnimationSample") = zenkit::AnimationSample; | ||
using animation_event ZKREM("renamed to zenkit::AnimationEvent") = zenkit::AnimationEvent; | ||
using animation_event_type ZKREM("renamed to zenkit::AnimationEventType") = zenkit::AnimationEventType; | ||
} // namespace phoenix |
Oops, something went wrong.