Skip to content

Commit

Permalink
some tests and rosetta file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ate47 committed Oct 8, 2023
1 parent 95e0e56 commit 5638ae2
Show file tree
Hide file tree
Showing 19 changed files with 957 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
.antlr
scripts/antlr4.jar
.antlr4
src/cli/tools/ps4/*

*.aps

Expand Down
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@
path = deps/zlib
url = https://github.com/madler/zlib
branch = master
[submodule "deps/jit-lua"]
path = deps/jit-lua
url = https://github.com/Pirulax/luajit-premake
branch = master
[submodule "deps/ps4debug"]
path = deps/ps4debug
url = https://github.com/jogolden/ps4debug
branch = master
File renamed without changes.
7 changes: 7 additions & 0 deletions config/stringtable_replace.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Config file for the ctr mod

# Target file

target gamedata/events/schedule_pc.csv
struct string,int,int,string

1 change: 1 addition & 0 deletions deps/ps4debug
Submodule ps4debug added at b446dc
26 changes: 24 additions & 2 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ project "AtianCodTools"
"./scripts/**.ps1",
"./release/**",
"./resources/**",
"./config/**",
".gitignore",
"premake5.lua",
"packages.txt",
"resolver.cfg",
"gsc.conf",
"LICENSE",
"README.md"
Expand All @@ -142,7 +142,8 @@ project "AtianCodTools"
"src/shared",
-- link antlr4
"deps/antlr4/runtime/Cpp/runtime/src/",
"deps/zlib/"
"deps/zlib/",
"deps/ps4debug/libdebug/cpp/include/",
}

vpaths {
Expand All @@ -156,9 +157,11 @@ project "AtianCodTools"
links { "antlr4-runtime" }
links { "ACTSSharedLibrary" }
links { "zlib" }
links { "libps4debug" }
dependson "antlr4-runtime"
dependson "ACTSSharedLibrary"
dependson "zlib"
dependson "libps4debug"

group "deps"
project "antlr4-runtime"
Expand Down Expand Up @@ -224,3 +227,22 @@ group "deps"
"deps/zlib/*.c",
"deps/zlib/*.h",
}
project "libps4debug"
language "C++"
kind "StaticLib"
cppdialect "C++17"
warnings "Off"

targetname "libps4debug"
targetdir "%{wks.location}/bin/"
objdir "%{wks.location}/obj/"

files {
"deps/ps4debug/libdebug/cpp/source/*.cpp",
"deps/ps4debug/libdebug/cpp/include/*.hpp"
}

includedirs {
"deps/ps4debug/libdebug/cpp/include/"
}

13 changes: 10 additions & 3 deletions scripts/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ try {
$base = (Get-Item $PSScriptRoot).parent
Set-Location ($base.Fullname)

# Update submodules
Write-Host "-- Update submodules"
git submodule update --init --recursive
# install packages

Write-Host "-- Install packages"
vcpkg install "@.\packages.txt"
# create solution

Write-Host "-- Create jit-lua projects"
Push-Location deps\jit-lua
premake5 vs2022
Pop-Location

Write-Host "-- Create solution"
if ($ci) {
premake5 vs2022 --ci-build
} else {
Expand Down
22 changes: 17 additions & 5 deletions src/bo4-dll/error_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ std::unordered_map<UINT64, LPCCH> error_handler::errors = {
{ 245612264, "foreach should be used with an array" },
{ 647662103, "var can't be converted to string" },
{ 4213634562, "precacheLeaderboards must be called before any wait statements in the gametype or level script" },
{ 3143575744, "parameter does not exist" }, // GetVector
{ 2517242050, "parameter does not exist" }, // GetString
{ 4196473479, "parameter does not exist" }, // GetBool
{ 3699844858, "parameter does not exist" }, // GetType
{ 280703902, "parameter does not exist" }, // GetPointerType
{ 3143575744, "parameter does not exist" },
{ 2517242050, "parameter does not exist" },
{ 4196473479, "parameter does not exist" },
{ 3699844858, "parameter does not exist" },
{ 280703902, "parameter does not exist" },
{ 2606724305, "parameter does not exist" },
{ 312545010, "not a vector" },
{ 647662103, "parameter can't be cast to a string" },
{ 952690413, "parameter can't be cast to a boolean" },
{ 1412130119, "parameter can't be cast to a hash" },
{ 3761634992, "not a pointer" },
{ 754846421, "invalid vehicle spawn origin" },
{ 1909233687, "Optional argument must be a vector type" },
Expand Down Expand Up @@ -62,6 +64,16 @@ std::unordered_map<UINT64, LPCCH> error_handler::errors = {
{ 209668787, "RandomInt parm must be positive integer." },
{ 753495682, "RandomIntRange's second parameter must be greater than the first." },
{ 1045192683, "Scr_RandomFloatRange's second parameter must be greater than the first." },
{ 1377489376, "Gesture key can't have the higher bit set" },
{ 2355618801, "Gesture table key can't have the higher bit set" },
{ 2838301872, "Gesture table key can't have the higher bit set" },
{ 1099145600, "Can't find asset" },
{ 4088624643, "Can't find asset" },
{ 3016026156, "Can't find asset" },
{ 3251676101, "Could not load raw file" },
{ 1088278929, "Raw file is not a file of the right type" },
{ 1072585573, "Raw file is not a file of the right type" },
{ 3894031202, "Can't find gamedata/playeranim/playeranimtypes.txt" },

// messages handled by detours
{ 2737681163, "assert fail (with message)" },
Expand Down
7 changes: 7 additions & 0 deletions src/cli/includes.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#pragma once

#define _WINSOCKAPI_
#include <includes_shared.hpp>
#include <zlib.h>

#pragma warning(push)
#pragma warning(disable:4455)
#include <PS4DBG.hpp>
#pragma warning(pop)

#include "memapi.hpp"
#include "hashutils.hpp"

Expand All @@ -12,5 +18,6 @@
#include "tools/dump.hpp"
#include "tools/gsc.hpp"
#include "tools/gsc_opcodes.hpp"
#include "tools/pool.hpp"

extern LPCCH g_progPath;
Loading

0 comments on commit 5638ae2

Please sign in to comment.