mirror of
https://github.com/open-goal/jak-project
synced 2026-08-05 01:30:22 -04:00
Jak3 Build Environment (#3098)
This sets out the bones of a Jak 3 build, many things are stubbed out, guessed, or copied from Jak 2 but it should at least be good enough to: run `task set-game-jak3` launch the repl run builds from the repl build outputs themselves are untested but the build itself runs without errors --------- Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
@@ -122,7 +122,7 @@ Form* try_cast_simplify(Form* in,
|
||||
return in;
|
||||
}
|
||||
|
||||
if (env.version == GameVersion::Jak2) {
|
||||
if (env.version >= GameVersion::Jak2) {
|
||||
if (new_type == TypeSpec("float")) {
|
||||
auto ic = get_goal_integer_constant(in, env);
|
||||
if (ic) {
|
||||
@@ -138,7 +138,7 @@ Form* try_cast_simplify(Form* in,
|
||||
if (new_type == TypeSpec("meters")) {
|
||||
auto fc = get_goal_float_constant(in);
|
||||
|
||||
if (!fc && env.version == GameVersion::Jak2) {
|
||||
if (!fc && env.version >= GameVersion::Jak2) {
|
||||
auto ic = get_goal_integer_constant(in, env);
|
||||
if (ic) {
|
||||
ASSERT((s64)*ic == (s64)(s32)*ic);
|
||||
@@ -2853,7 +2853,7 @@ bool try_to_rewrite_vector_inline_ctor(const Env& env,
|
||||
token_matchers = {DerefTokenMatcher::string("quad")};
|
||||
}
|
||||
|
||||
if (env.version == GameVersion::Jak2) {
|
||||
if (env.version >= GameVersion::Jak2) {
|
||||
token_matchers = {DerefTokenMatcher::string("quad")};
|
||||
}
|
||||
|
||||
@@ -3376,7 +3376,7 @@ void FunctionCallElement::update_from_stack(const Env& env,
|
||||
argset = argset.substr(1);
|
||||
auto argsym = arg_forms.at(1)->to_string(env);
|
||||
// convert the float param
|
||||
if (env.version == GameVersion::Jak2) {
|
||||
if (env.version >= GameVersion::Jak2) {
|
||||
static const std::unordered_set<std::string> use_degrees_settings = {
|
||||
"matrix-blend-max-angle",
|
||||
"fov",
|
||||
@@ -4081,7 +4081,7 @@ void DerefElement::update_from_stack(const Env& env,
|
||||
}
|
||||
|
||||
auto as_simple_expr = m_base->try_as_element<SimpleExpressionElement>();
|
||||
if (env.version == GameVersion::Jak2 && as_simple_expr && as_simple_expr->expr().is_identity() &&
|
||||
if (env.version >= GameVersion::Jak2 && as_simple_expr && as_simple_expr->expr().is_identity() &&
|
||||
as_simple_expr->expr().get_arg(0).is_sym_val() &&
|
||||
as_simple_expr->expr().get_arg(0).get_str() == "*game-info*" && m_tokens.size() >= 2 &&
|
||||
m_tokens.at(0).is_field_name("sub-task-list") && m_tokens.at(1).is_int()) {
|
||||
|
||||
Reference in New Issue
Block a user