proper support for hardcoded "time" types (#1141)

* hardcode `time-frame`things

* Update cam-states_REF.gc

* Update level-info_REF.gc

* update refs 1

* update refs 2

* update refs 3

* update refs 4

* update refs 5

* update detection and casting

* Update FormExpressionAnalysis.cpp

* update refs 6

* update mood decomp

* update refs 7

* update refs 8

* remove temp entity birth code

* update time-frame casts

* fix compiler

* hardcode stuff and fix some types

* fix some bitfield detection being wrong

* bug fixes

* detect seconds on adds with immediate

* update refs 9

* fix casts and rand-vu-int-range bugs (update refs 10)

* update refs 11

* update 12

* update 13

* update 14

* Update game-info_REF.gc

* improve cpad macros detection

* remove unused code

* update refs

* clang

* update source code

* Update cam-states.gc

* `lavatube-energy` finish

* update refs

* fix actor bank stuff

* Update navigate.gc

* reduce entity default stack size

* Update transformq-h.gc

* oops forgot these

* fix code and tests

* fix mood sound stuff

* Update load-dgo.gc

* Update README.md
This commit is contained in:
ManDude
2022-02-12 17:26:19 +00:00
committed by GitHub
parent ad2278713c
commit 24578b64b9
444 changed files with 9293 additions and 10998 deletions
+27 -1
View File
@@ -638,7 +638,21 @@ DerefTokenMatcher DerefTokenMatcher::any_integer(int match_id) {
return result;
}
bool DerefTokenMatcher::do_match(const DerefToken& input, MatchResult::Maps* maps_out) const {
DerefTokenMatcher DerefTokenMatcher::any_expr(int match_id) {
DerefTokenMatcher result;
result.m_kind = Kind::ANY_EXPR;
result.m_str_out_id = match_id;
return result;
}
DerefTokenMatcher DerefTokenMatcher::any_expr_or_int(int match_id) {
DerefTokenMatcher result;
result.m_kind = Kind::ANY_EXPR_OR_INT;
result.m_str_out_id = match_id;
return result;
}
bool DerefTokenMatcher::do_match(DerefToken& input, MatchResult::Maps* maps_out) const {
switch (m_kind) {
case Kind::STRING:
return input.kind() == DerefToken::Kind::FIELD_NAME && input.field_name() == m_str;
@@ -652,6 +666,18 @@ bool DerefTokenMatcher::do_match(const DerefToken& input, MatchResult::Maps* map
return false;
case Kind::CONSTANT_INTEGER:
return input.kind() == DerefToken::Kind::INTEGER_CONSTANT && input.is_int(m_int);
case Kind::ANY_EXPR:
case Kind::ANY_EXPR_OR_INT:
if (input.is_expr()) {
if (m_str_out_id != -1) {
maps_out->forms[m_str_out_id] = input.expr();
}
return true;
}
// NOTE intentional fallthrough
if (m_kind != Kind::ANY_EXPR_OR_INT) {
return false;
}
case Kind::ANY_INTEGER:
if (input.kind() == DerefToken::Kind::INTEGER_CONSTANT) {
if (m_str_out_id != -1) {