mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 06:09:57 +00:00
lint: add include sorting config to clang-format (#1517)
This commit is contained in:
parent
b3f2b81481
commit
2d595c1ac0
@ -1,4 +1,18 @@
|
|||||||
---
|
---
|
||||||
BasedOnStyle: Chromium
|
BasedOnStyle: Chromium
|
||||||
ColumnLimit: 100
|
ColumnLimit: 100
|
||||||
SortIncludes: false
|
SortIncludes: true
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^<[a-zA-Z_\-\.]+>'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '^"[a-zA-Z_\-\.]+"'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '^(<|")common.*'
|
||||||
|
Priority: 3
|
||||||
|
- Regex: '^"third-party.*'
|
||||||
|
Priority: 4
|
||||||
|
SortPriority: 5
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 5
|
||||||
|
SortPriority: 4
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "audio_formats.h"
|
#include "audio_formats.h"
|
||||||
|
|
||||||
#include "common/util/BinaryWriter.h"
|
#include "common/util/BinaryWriter.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/util/BinaryReader.h"
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "common/util/BinaryReader.h"
|
||||||
|
|
||||||
// The header data for a simple wave file
|
// The header data for a simple wave file
|
||||||
struct WaveFileHeader {
|
struct WaveFileHeader {
|
||||||
|
@ -4,28 +4,32 @@
|
|||||||
* Nothing in here should hold state, that should all be managed in Debugger.
|
* Nothing in here should hold state, that should all be managed in Debugger.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include "common/goal_constants.h"
|
|
||||||
#include "common/util/Timer.h"
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "xdbg.h"
|
#include "xdbg.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
#include "common/goal_constants.h"
|
||||||
|
#include "common/util/Timer.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <sys/ptrace.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <sys/ptrace.h>
|
|
||||||
#include <sys/prctl.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/user.h>
|
#include <sys/user.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <mutex>
|
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
#include <mutex>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace xdbg {
|
namespace xdbg {
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
* Cross platform socket library used for the listener.
|
* Cross platform socket library used for the listener.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@ -17,6 +18,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
int open_socket(int af, int type, int protocol) {
|
int open_socket(int af, int type, int protocol) {
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
|
@ -5,18 +5,20 @@
|
|||||||
* Cross platform socket library used for the listener.
|
* Cross platform socket library used for the listener.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/tcp.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <unistd.h>
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
const int TCP_SOCKET_LEVEL = SOL_TCP;
|
const int TCP_SOCKET_LEVEL = SOL_TCP;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#include "XSocketClient.h"
|
#include "XSocketClient.h"
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocket.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "common/cross_sockets/XSocket.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@ -11,7 +13,9 @@
|
|||||||
#include <WS2tcpip.h>
|
#include <WS2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
#include "common/nrepl/ReplServer.h"
|
#include "common/nrepl/ReplServer.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
XSocketClient::XSocketClient(int _tcp_port) {
|
XSocketClient::XSocketClient(int _tcp_port) {
|
||||||
tcp_port = _tcp_port;
|
tcp_port = _tcp_port;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocket.h"
|
|
||||||
|
|
||||||
#include <thread>
|
|
||||||
#include "common/common_types.h"
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
#include "common/cross_sockets/XSocket.h"
|
||||||
|
|
||||||
/// @brief A cross platform generic socket client implementation
|
/// @brief A cross platform generic socket client implementation
|
||||||
class XSocketClient {
|
class XSocketClient {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
// clang-format off
|
||||||
#include "XSocketServer.h"
|
#include "XSocketServer.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocket.h"
|
#include "common/cross_sockets/XSocket.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@ -11,6 +12,7 @@
|
|||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <WS2tcpip.h>
|
#include <WS2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
XSocketServer::XSocketServer(std::function<bool()> shutdown_callback,
|
XSocketServer::XSocketServer(std::function<bool()> shutdown_callback,
|
||||||
int _tcp_port,
|
int _tcp_port,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocket.h"
|
|
||||||
|
|
||||||
#include <thread>
|
|
||||||
#include "common/common_types.h"
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
#include "common/cross_sockets/XSocket.h"
|
||||||
|
|
||||||
/// @brief A cross platform generic socket server implementation
|
/// @brief A cross platform generic socket server implementation
|
||||||
class XSocketServer {
|
class XSocketServer {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include <functional>
|
|
||||||
#include <algorithm>
|
|
||||||
#include "Tfrag3Data.h"
|
#include "Tfrag3Data.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
namespace tfrag3 {
|
namespace tfrag3 {
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/dma/gs.h"
|
#include "common/dma/gs.h"
|
||||||
#include "common/util/Serializer.h"
|
|
||||||
#include "common/math/Vector.h"
|
#include "common/math/Vector.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
#include "common/util/Serializer.h"
|
||||||
|
|
||||||
namespace tfrag3 {
|
namespace tfrag3 {
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "pack_helpers.h"
|
#include "pack_helpers.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
constexpr float kClusterSize = 4096 * 40; // 100 in-game meters
|
constexpr float kClusterSize = 4096 * 40; // 100 in-game meters
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#include "subtitles.h"
|
#include "subtitles.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <regex>
|
||||||
|
|
||||||
|
#include "common/util/FileUtil.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
#include "third-party/fmt/ranges.h"
|
#include "third-party/fmt/ranges.h"
|
||||||
#include <regex>
|
|
||||||
#include "common/util/FileUtil.h"
|
|
||||||
#include "third-party/json.hpp"
|
#include "third-party/json.hpp"
|
||||||
|
|
||||||
bool write_subtitle_db_to_files(const GameSubtitleDB& db) {
|
bool write_subtitle_db_to_files(const GameSubtitleDB& db) {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include "dma.h"
|
#include "dma.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
std::string DmaTag::print() {
|
std::string DmaTag::print() {
|
||||||
std::string result;
|
std::string result;
|
||||||
const char* mode_names[8] = {"refe", "cnt", "next", "ref", "refs", "call", "ret", "end"};
|
const char* mode_names[8] = {"refe", "cnt", "next", "ref", "refs", "call", "ret", "end"};
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
* PS2 DMA and VIF types.
|
* PS2 DMA and VIF types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
struct DmaStats {
|
struct DmaStats {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "common/dma/dma.h"
|
#include "common/dma/dma.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
#include "common/goal_constants.h"
|
|
||||||
#include "common/dma/dma_chain_read.h"
|
|
||||||
#include "dma_copy.h"
|
#include "dma_copy.h"
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
|
#include "common/dma/dma_chain_read.h"
|
||||||
|
#include "common/goal_constants.h"
|
||||||
#include "common/util/Timer.h"
|
#include "common/util/Timer.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Convert a DMA chain to an array of bytes that can be directly fed to VIF.
|
* Convert a DMA chain to an array of bytes that can be directly fed to VIF.
|
||||||
*/
|
*/
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#include "gs.h"
|
#include "gs.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
std::string reg_descriptor_name(GifTag::RegisterDescriptor reg) {
|
std::string reg_descriptor_name(GifTag::RegisterDescriptor reg) {
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
case GifTag::RegisterDescriptor::PRIM:
|
case GifTag::RegisterDescriptor::PRIM:
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
|
// clang-format off
|
||||||
#include "GlobalProfiler.h"
|
#include "GlobalProfiler.h"
|
||||||
|
|
||||||
#include <thread>
|
|
||||||
#include <cstring>
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include "third-party/fmt/core.h"
|
#include <cstring>
|
||||||
#include "third-party/json.hpp"
|
#include <thread>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
#include "third-party/json.hpp"
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
u32 get_current_tid() {
|
u32 get_current_tid() {
|
||||||
return (u32)pthread_self();
|
return (u32)pthread_self();
|
||||||
@ -21,6 +24,7 @@ u32 get_current_tid() {
|
|||||||
return (u32)GetCurrentThreadId();
|
return (u32)GetCurrentThreadId();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
u64 get_current_ts() {
|
u64 get_current_ts() {
|
||||||
return std::chrono::steady_clock::now().time_since_epoch().count();
|
return std::chrono::steady_clock::now().time_since_epoch().count();
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/common_types.h"
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
struct ProfNode {
|
struct ProfNode {
|
||||||
u64 ts;
|
u64 ts;
|
||||||
|
@ -3,10 +3,14 @@
|
|||||||
* The GOOS Interpreter and implementation of special and "built-in forms"
|
* The GOOS Interpreter and implementation of special and "built-in forms"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
#include "Interpreter.h"
|
#include "Interpreter.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "ParseHelpers.h"
|
#include "ParseHelpers.h"
|
||||||
|
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
#include "Reader.h"
|
#include "Reader.h"
|
||||||
|
|
||||||
|
@ -38,12 +38,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
|
|
||||||
|
#include <cinttypes>
|
||||||
|
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/util/print_float.h"
|
#include "common/util/print_float.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -43,14 +43,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdexcept>
|
|
||||||
#include <map>
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "ParseHelpers.h"
|
#include "ParseHelpers.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
@ -4,17 +4,20 @@
|
|||||||
* It is not very good, but significantly better than putting everything on one line
|
* It is not very good, but significantly better than putting everything on one line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "PrettyPrinter.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cstring>
|
|
||||||
#include "PrettyPrinter.h"
|
|
||||||
#include "Reader.h"
|
#include "Reader.h"
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/log/log.h"
|
|
||||||
|
|
||||||
#include "common/goos/PrettyPrinter2.h"
|
#include "common/goos/PrettyPrinter2.h"
|
||||||
|
#include "common/log/log.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace pretty_print {
|
namespace pretty_print {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/goos/Object.h"
|
#include "common/goos/Object.h"
|
||||||
#include "common/goos/Reader.h"
|
|
||||||
#include "common/goos/Printer.h"
|
|
||||||
#include "common/goos/PrettyPrinter2.h"
|
#include "common/goos/PrettyPrinter2.h"
|
||||||
|
#include "common/goos/Printer.h"
|
||||||
|
#include "common/goos/Reader.h"
|
||||||
|
|
||||||
namespace pretty_print {
|
namespace pretty_print {
|
||||||
// main pretty print function
|
// main pretty print function
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#include "PrettyPrinter2.h"
|
#include "PrettyPrinter2.h"
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace pretty_print {
|
namespace pretty_print {
|
||||||
|
|
||||||
namespace v2 {
|
namespace v2 {
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/goos/Object.h"
|
#include "common/goos/Object.h"
|
||||||
#include "common/goos/Reader.h"
|
|
||||||
#include "common/goos/Printer.h"
|
#include "common/goos/Printer.h"
|
||||||
|
#include "common/goos/Reader.h"
|
||||||
|
|
||||||
namespace pretty_print {
|
namespace pretty_print {
|
||||||
// main pretty print function
|
// main pretty print function
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "Printer.h"
|
#include "Printer.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace pretty_print {
|
namespace pretty_print {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/goos/Object.h"
|
#include "common/goos/Object.h"
|
||||||
#include "common/goos/Reader.h"
|
#include "common/goos/Reader.h"
|
||||||
|
|
||||||
|
@ -10,11 +10,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Reader.h"
|
#include "Reader.h"
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
#include "ReplUtils.h"
|
||||||
|
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
#include "common/util/FontUtils.h"
|
#include "common/util/FontUtils.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
#include <filesystem>
|
|
||||||
#include "ReplUtils.h"
|
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
|
||||||
|
@ -12,15 +12,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <unordered_map>
|
||||||
#include "common/goos/Object.h"
|
#include <utility>
|
||||||
#include "common/goos/TextDB.h"
|
|
||||||
|
|
||||||
#include "ReplUtils.h"
|
#include "ReplUtils.h"
|
||||||
|
|
||||||
|
#include "common/goos/Object.h"
|
||||||
|
#include "common/goos/TextDB.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include "ReplUtils.h"
|
#include "ReplUtils.h"
|
||||||
|
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
#include "third-party/replxx/include/replxx.hxx"
|
|
||||||
#include "common/versions.h"
|
#include "common/versions.h"
|
||||||
|
|
||||||
#include "third-party/fmt/color.h"
|
#include "third-party/fmt/color.h"
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
#include "third-party/replxx/include/replxx.hxx"
|
||||||
|
|
||||||
// TODO - expand a list of hints (ie. a hint for defun to show at a glance how to write a function,
|
// TODO - expand a list of hints (ie. a hint for defun to show at a glance how to write a function,
|
||||||
// or perhaps, show the docstring for the current function being used?)
|
// or perhaps, show the docstring for the current function being used?)
|
||||||
|
@ -11,11 +11,12 @@
|
|||||||
* (+ 1 (+ a b)) ; compute the sum
|
* (+ 1 (+ a b)) ; compute the sum
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common/util/FileUtil.h"
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
|
|
||||||
#include "TextDB.h"
|
#include "TextDB.h"
|
||||||
|
|
||||||
|
#include "common/util/FileUtil.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace goos {
|
namespace goos {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
* (+ 1 (+ a b)) ; compute the sum
|
* (+ 1 (+ a b)) ; compute the sum
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/goos/Object.h"
|
#include "common/goos/Object.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
#include "log.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
#include "third-party/fmt/color.h"
|
#include "third-party/fmt/color.h"
|
||||||
#include "log.h"
|
|
||||||
#ifdef _WIN32 // see lg::initialize
|
#ifdef _WIN32 // see lg::initialize
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace lg {
|
namespace lg {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
// clang-format off
|
||||||
#include "ReplClient.h"
|
#include "ReplClient.h"
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocket.h"
|
#include "common/cross_sockets/XSocket.h"
|
||||||
|
#include "common/versions.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
#include "common/versions.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
@ -12,6 +13,7 @@
|
|||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <WS2tcpip.h>
|
#include <WS2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
void ReplClient::eval(std::string form) {
|
void ReplClient::eval(std::string form) {
|
||||||
if (!is_connected()) {
|
if (!is_connected()) {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocketClient.h"
|
|
||||||
#include "ReplServer.h"
|
#include "ReplServer.h"
|
||||||
|
|
||||||
|
#include "common/cross_sockets/XSocketClient.h"
|
||||||
|
|
||||||
class ReplClient : public XSocketClient {
|
class ReplClient : public XSocketClient {
|
||||||
public:
|
public:
|
||||||
using XSocketClient::XSocketClient;
|
using XSocketClient::XSocketClient;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
|
// clang-format off
|
||||||
#include "ReplServer.h"
|
#include "ReplServer.h"
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocket.h"
|
#include "common/cross_sockets/XSocket.h"
|
||||||
|
#include <common/versions.h>
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
#include <common/versions.h>
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
@ -12,6 +13,7 @@
|
|||||||
#include <WinSock2.h>
|
#include <WinSock2.h>
|
||||||
#include <WS2tcpip.h>
|
#include <WS2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
// TODO - basically REPL to listen and inject commands into a running REPL
|
// TODO - basically REPL to listen and inject commands into a running REPL
|
||||||
// - we will need a C++ side client as well which will let us communicate with the repl via for
|
// - we will need a C++ side client as well which will let us communicate with the repl via for
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/cross_sockets/XSocketServer.h"
|
|
||||||
#include <set>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
|
#include "common/cross_sockets/XSocketServer.h"
|
||||||
|
|
||||||
enum ReplServerMessageType { PING = 0, EVAL = 10, SHUTDOWN = 20 };
|
enum ReplServerMessageType { PING = 0, EVAL = 10, SHUTDOWN = 20 };
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#include "subtitles.h"
|
#include "subtitles.h"
|
||||||
|
|
||||||
#include "common/goos/ParseHelpers.h"
|
#include "common/goos/ParseHelpers.h"
|
||||||
#include "common/goos/Reader.h"
|
#include "common/goos/Reader.h"
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/util/json_util.h"
|
#include "common/util/json_util.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
static const std::unordered_map<std::string, GameTextVersion> s_text_ver_enum_map = {
|
static const std::unordered_map<std::string, GameTextVersion> s_text_ver_enum_map = {
|
||||||
{"jak1-v1", GameTextVersion::JAK1_V1},
|
{"jak1-v1", GameTextVersion::JAK1_V1},
|
||||||
{"jak1-v2", GameTextVersion::JAK1_V2}};
|
{"jak1-v2", GameTextVersion::JAK1_V2}};
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/util/FontUtils.h"
|
|
||||||
#include "common/util/Assert.h"
|
|
||||||
#include "common/goos/Object.h"
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <unordered_set>
|
|
||||||
#include <memory>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
|
#include "common/goos/Object.h"
|
||||||
|
#include "common/util/Assert.h"
|
||||||
|
#include "common/util/FontUtils.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* The text bank contains all lines (accessed with an ID) for a language.
|
* The text bank contains all lines (accessed with an ID) for a language.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Convert from a pixel location in a texture (x, y, texture buffer width) to VRAM address (byte).
|
* Convert from a pixel location in a texture (x, y, texture buffer width) to VRAM address (byte).
|
||||||
|
@ -3,11 +3,14 @@
|
|||||||
* Representation of a GOAL type in the type system.
|
* Representation of a GOAL type in the type system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "Type.h"
|
#include "Type.h"
|
||||||
|
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
std::string reg_kind_to_string(RegClass kind) {
|
std::string reg_kind_to_string(RegClass kind) {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
|
@ -5,11 +5,13 @@
|
|||||||
* Representation of a GOAL type in the type system.
|
* Representation of a GOAL type in the type system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "common/goal_constants.h"
|
|
||||||
#include "TypeSpec.h"
|
#include "TypeSpec.h"
|
||||||
|
|
||||||
|
#include "common/goal_constants.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
class TypeSystem;
|
class TypeSystem;
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "TypeSystem.h"
|
#include "TypeSystem.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// debug prints for the reverse lookup
|
// debug prints for the reverse lookup
|
||||||
bool debug_reverse_lookup = false;
|
bool debug_reverse_lookup = false;
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
* A GOAL TypeSpec is a reference to a type or compound type.
|
* A GOAL TypeSpec is a reference to a type or compound type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
#include "TypeSpec.h"
|
#include "TypeSpec.h"
|
||||||
|
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
bool TypeTag::operator==(const TypeTag& other) const {
|
bool TypeTag::operator==(const TypeTag& other) const {
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
* A GOAL TypeSpec is a reference to a type or compound type.
|
* A GOAL TypeSpec is a reference to a type or compound type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include "common/util/SmallVector.h"
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
#include "common/util/SmallVector.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* A :name value modifier to apply to a type.
|
* A :name value modifier to apply to a type.
|
||||||
|
@ -5,12 +5,15 @@
|
|||||||
* access types, and reverse type lookups.
|
* access types, and reverse type lookups.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "third-party/fmt/color.h"
|
|
||||||
#include <stdexcept>
|
|
||||||
#include "TypeSystem.h"
|
#include "TypeSystem.h"
|
||||||
#include "common/util/math_util.h"
|
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
#include "common/util/math_util.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/color.h"
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
|
@ -7,16 +7,16 @@
|
|||||||
* access types, and reverse type lookups.
|
* access types, and reverse type lookups.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <optional>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
#include "TypeSpec.h"
|
|
||||||
#include "Type.h"
|
#include "Type.h"
|
||||||
|
#include "TypeSpec.h"
|
||||||
|
|
||||||
struct TypeFlags {
|
struct TypeFlags {
|
||||||
union {
|
union {
|
||||||
|
@ -4,12 +4,15 @@
|
|||||||
* This is used both in the compiler and in the decompiler for the type definition file.
|
* This is used both in the compiler and in the decompiler for the type definition file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common/goos/ParseHelpers.h"
|
|
||||||
#include "defenum.h"
|
#include "defenum.h"
|
||||||
|
|
||||||
#include "deftype.h"
|
#include "deftype.h"
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
|
#include "common/goos/ParseHelpers.h"
|
||||||
#include "common/util/BitUtils.h"
|
#include "common/util/BitUtils.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const goos::Object& car(const goos::Object* x) {
|
const goos::Object& car(const goos::Object* x) {
|
||||||
if (!x->is_pair()) {
|
if (!x->is_pair()) {
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "TypeSystem.h"
|
#include "TypeSystem.h"
|
||||||
|
|
||||||
#include "common/goos/Object.h"
|
#include "common/goos/Object.h"
|
||||||
|
|
||||||
EnumType* parse_defenum(const goos::Object& defenum, TypeSystem* ts);
|
EnumType* parse_defenum(const goos::Object& defenum, TypeSystem* ts);
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
* This is used both in the compiler and in the decompiler for the type definition file.
|
* This is used both in the compiler and in the decompiler for the type definition file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common/goos/ParseHelpers.h"
|
|
||||||
#include "deftype.h"
|
#include "deftype.h"
|
||||||
|
|
||||||
|
#include "common/goos/ParseHelpers.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "TypeSystem.h"
|
#include "TypeSystem.h"
|
||||||
|
|
||||||
#include "common/goos/Object.h"
|
#include "common/goos/Object.h"
|
||||||
|
|
||||||
struct DeftypeResult {
|
struct DeftypeResult {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "state.h"
|
#include "state.h"
|
||||||
|
|
||||||
#include "common/type_system/TypeSystem.h"
|
#include "common/type_system/TypeSystem.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include "common/type_system/TypeSpec.h"
|
#include "common/type_system/TypeSpec.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
* Write raw data like a stream.
|
* Write raw data like a stream.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <vector>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
struct BinaryWriterRef {
|
struct BinaryWriterRef {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include "common/util/Range.h"
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
#include "common/util/Range.h"
|
||||||
|
|
||||||
constexpr int BITS_PER_BYTE = 8;
|
constexpr int BITS_PER_BYTE = 8;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
#include <cstring>
|
|
||||||
#include <utility>
|
|
||||||
#include <unordered_set>
|
|
||||||
#include "DgoReader.h"
|
#include "DgoReader.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <unordered_set>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "BinaryReader.h"
|
#include "BinaryReader.h"
|
||||||
#include "common/link_types.h"
|
|
||||||
#include "third-party/json.hpp"
|
|
||||||
#include "BitUtils.h"
|
#include "BitUtils.h"
|
||||||
#include "dgo_util.h"
|
#include "dgo_util.h"
|
||||||
|
|
||||||
|
#include "common/link_types.h"
|
||||||
|
|
||||||
|
#include "third-party/json.hpp"
|
||||||
|
|
||||||
DgoReader::DgoReader(std::string file_name, const std::vector<u8>& data)
|
DgoReader::DgoReader(std::string file_name, const std::vector<u8>& data)
|
||||||
: m_file_name(std::move(file_name)) {
|
: m_file_name(std::move(file_name)) {
|
||||||
BinaryReader reader(data);
|
BinaryReader reader(data);
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
struct DgoDataEntry {
|
struct DgoDataEntry {
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
* Create a DGO from existing files.
|
* Create a DGO from existing files.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "DgoWriter.h"
|
||||||
|
|
||||||
#include "BinaryWriter.h"
|
#include "BinaryWriter.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
#include "DgoWriter.h"
|
|
||||||
|
|
||||||
void build_dgo(const DgoDescription& description) {
|
void build_dgo(const DgoDescription& description) {
|
||||||
BinaryWriter writer;
|
BinaryWriter writer;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
* Create a DGO from existing files.
|
* Create a DGO from existing files.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
struct DgoDescription {
|
struct DgoDescription {
|
||||||
std::string dgo_name;
|
std::string dgo_name;
|
||||||
|
@ -4,23 +4,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
#include <iostream>
|
|
||||||
#include <filesystem>
|
|
||||||
#include <cstdio> /* defines FILENAME_MAX */
|
#include <cstdio> /* defines FILENAME_MAX */
|
||||||
#include <fstream>
|
|
||||||
#include <sstream>
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include "common/util/BinaryReader.h"
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "BinaryWriter.h"
|
#include "BinaryWriter.h"
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "common/util/BinaryReader.h"
|
||||||
|
|
||||||
// This disables the use of PCLMULQDQ which is probably ok, but let's just be safe and disable it
|
// This disables the use of PCLMULQDQ which is probably ok, but let's just be safe and disable it
|
||||||
// because nobody will care if png compression is 10% slower.
|
// because nobody will care if png compression is 10% slower.
|
||||||
#define FPNG_NO_SSE 1
|
#define FPNG_NO_SSE 1
|
||||||
#include "third-party/fpng/fpng.cpp"
|
|
||||||
|
|
||||||
#include "third-party/fpng/fpng.h"
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
#include "third-party/fpng/fpng.cpp"
|
||||||
|
#include "third-party/fpng/fpng.h"
|
||||||
#include "third-party/lzokay/lzokay.hpp"
|
#include "third-party/lzokay/lzokay.hpp"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -28,8 +30,8 @@
|
|||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
#include <common/log/log.h>
|
#include <common/log/log.h>
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
* Utility functions for reading and writing files.
|
* Utility functions for reading and writing files.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
@ -7,8 +7,10 @@
|
|||||||
* Always verify the encoding if string detection suddenly goes awry.
|
* Always verify the encoding if string detection suddenly goes awry.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include "FontUtils.h"
|
#include "FontUtils.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
GameTextFontBank::GameTextFontBank(GameTextVersion version,
|
GameTextFontBank::GameTextFontBank(GameTextVersion version,
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
* Always verify the encoding if string detection suddenly goes awry.
|
* Always verify the encoding if string detection suddenly goes awry.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common/common_types.h"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <unordered_set>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#include <unordered_set>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
// version of the game text file's text encoding. Not real, but we need to differentiate them
|
// version of the game text file's text encoding. Not real, but we need to differentiate them
|
||||||
// somehow, since the encoding changes.
|
// somehow, since the encoding changes.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "FrameLimiter.h"
|
#include "FrameLimiter.h"
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
double FrameLimiter::round_to_nearest_60fps(double current) {
|
double FrameLimiter::round_to_nearest_60fps(double current) {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "SimpleThreadGroup.h"
|
#include "SimpleThreadGroup.h"
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
void SimpleThreadGroup::run(const std::function<void(int)>& func, int num_runs) {
|
void SimpleThreadGroup::run(const std::function<void(int)>& func, int num_runs) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
#include <functional>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Very simple group of threads.
|
* Very simple group of threads.
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <new>
|
#include <new>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
namespace cu {
|
namespace cu {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#include <cstring>
|
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
#include "compress.h"
|
#include "compress.h"
|
||||||
#include "third-party/zstd/lib/zstd.h"
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
#include "third-party/zstd/lib/zstd.h"
|
||||||
|
|
||||||
namespace compression {
|
namespace compression {
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
namespace compression {
|
namespace compression {
|
||||||
// compress and decompress data with zstd
|
// compress and decompress data with zstd
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
u32 crc32(const u8* data, size_t size);
|
u32 crc32(const u8* data, size_t size);
|
@ -1,8 +1,11 @@
|
|||||||
#include <cstring>
|
|
||||||
#include "dgo_util.h"
|
#include "dgo_util.h"
|
||||||
#include "common/versions.h"
|
|
||||||
#include "third-party/fmt/core.h"
|
#include <cstring>
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
#include "common/versions.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Assert false if the char[] has non-null data after the null terminated string.
|
* Assert false if the char[] has non-null data after the null terminated string.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/versions.h"
|
#include "common/versions.h"
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@
|
|||||||
|
|
||||||
#include "diff.h"
|
#include "diff.h"
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <map>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <map>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
enum EditType { kMatch, kAdd, kRemove, kReplace };
|
enum EditType { kMatch, kAdd, kRemove, kReplace };
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "common/log/log.h"
|
|
||||||
#include "json_util.h"
|
#include "json_util.h"
|
||||||
|
|
||||||
|
#include "common/log/log.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "common/util/Range.h"
|
#include "common/util/Range.h"
|
||||||
|
|
||||||
#include "third-party/json.hpp"
|
#include "third-party/json.hpp"
|
||||||
|
|
||||||
std::string strip_cpp_style_comments(const std::string& input);
|
std::string strip_cpp_style_comments(const std::string& input);
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
|
#include "print_float.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#include "common/goal_constants.h"
|
||||||
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
#include "third-party/dragonbox.h"
|
#include "third-party/dragonbox.h"
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
#include "print_float.h"
|
|
||||||
#include "common/goal_constants.h"
|
|
||||||
#include "common/util/Assert.h"
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Convert a float to a string. The string is _always_ in this format:
|
* Convert a float to a string. The string is _always_ in this format:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
float fixed_point_to_float(s64 value, s64 scale);
|
float fixed_point_to_float(s64 value, s64 scale);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "read_iso_file.h"
|
#include "read_iso_file.h"
|
||||||
#include "common/log/log.h"
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "common/log/log.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
#include "common/util/FileUtil.h"
|
#include "common/util/FileUtil.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <filesystem>
|
|
||||||
#include "third-party/xxhash.hpp"
|
#include "third-party/xxhash.hpp"
|
||||||
|
|
||||||
struct IsoFile {
|
struct IsoFile {
|
||||||
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Instruction.h"
|
#include "Instruction.h"
|
||||||
#include "decompiler/ObjectFile/LinkedObjectFile.h"
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "decompiler/ObjectFile/LinkedObjectFile.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
/*!
|
/*!
|
||||||
* Convert atom to a string for disassembly.
|
* Convert atom to a string for disassembly.
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "OpcodeInfo.h"
|
#include "OpcodeInfo.h"
|
||||||
#include "Register.h"
|
#include "Register.h"
|
||||||
|
|
||||||
|
@ -4,11 +4,14 @@
|
|||||||
* This is the part of the disassembler that decodes MIPS instructions.
|
* This is the part of the disassembler that decodes MIPS instructions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
|
||||||
#include "InstructionDecode.h"
|
#include "InstructionDecode.h"
|
||||||
#include "decompiler/ObjectFile/LinkedObjectFile.h"
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
|
#include "decompiler/ObjectFile/LinkedObjectFile.h"
|
||||||
|
|
||||||
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
// utility class to extract fields of an opcode.
|
// utility class to extract fields of an opcode.
|
||||||
struct OpcodeFields {
|
struct OpcodeFields {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "InstructionMatching.h"
|
#include "InstructionMatching.h"
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Instruction.h"
|
#include "Instruction.h"
|
||||||
|
|
||||||
#include "decompiler/util/MatchParam.h"
|
#include "decompiler/util/MatchParam.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#include <algorithm>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <optional>
|
|
||||||
#include "common/common_types.h"
|
|
||||||
#include "InstructionParser.h"
|
#include "InstructionParser.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <optional>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
#include "third-party/fmt/core.h"
|
#include "third-party/fmt/core.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "Instruction.h"
|
|
||||||
#include "DecompilerLabel.h"
|
#include "DecompilerLabel.h"
|
||||||
|
#include "Instruction.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
struct ParsedProgram {
|
struct ParsedProgram {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "OpcodeInfo.h"
|
#include "OpcodeInfo.h"
|
||||||
|
|
||||||
#include "common/util/Assert.h"
|
#include "common/util/Assert.h"
|
||||||
|
|
||||||
namespace decompiler {
|
namespace decompiler {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user