hexsha
stringlengths
40
40
size
int64
19
11.4M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
270
max_stars_repo_name
stringlengths
5
110
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
270
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
9
max_issues_count
float64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
270
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
9
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
19
11.4M
avg_line_length
float64
1.93
229k
max_line_length
int64
12
688k
alphanum_fraction
float64
0.07
0.99
matches
listlengths
1
10
ad999b291d9d5fa0170eb4d551423cd4e29ffe86
7,609
cpp
C++
tests/wifi_standard/wifi_hal/unittest/mock_wpa_ctrl.cpp
openharmony-gitee-mirror/communication_wifi
de1ca7ecb2b61d2385f6450fdadab7df9d3a4e37
[ "Apache-2.0" ]
1
2021-12-03T14:28:10.000Z
2021-12-03T14:28:10.000Z
tests/wifi_standard/wifi_hal/unittest/mock_wpa_ctrl.cpp
openharmony-gitee-mirror/communication_wifi
de1ca7ecb2b61d2385f6450fdadab7df9d3a4e37
[ "Apache-2.0" ]
null
null
null
tests/wifi_standard/wifi_hal/unittest/mock_wpa_ctrl.cpp
openharmony-gitee-mirror/communication_wifi
de1ca7ecb2b61d2385f6450fdadab7df9d3a4e37
[ "Apache-2.0" ]
1
2021-09-13T11:18:00.000Z
2021-09-13T11:18:00.000Z
/* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <stdlib.h> #include <string.h> #include <stddef.h> #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include "mock_wpa_ctrl.h" #include "wifi_hal_common_func.h" static std::vector<int> gPipeFd; static int gUsePipeFdNum = 0; const int OncePipeFdNum = 2; const int MaxExactCmdLength = 32; static std::map<std::string, std::string> gSupportedCmd; void MockSetWpaExpectCmdResponse(const std::string &cmd, const std::string &response) { gSupportedCmd[cmd] = response; } void MockEraseSupportedCmd(const std::string &cmd) { gSupportedCmd.erase(cmd); } void MockInitGlobalCmd(void) { gSupportedCmd["INTERFACE_ADD"] = "OK"; gSupportedCmd["INTERFACE_REMOVE"] = "OK"; } void MockInitStaSupportedCmd(void) { gSupportedCmd["STATUS"] = "OK"; gSupportedCmd["ADD_NETWORK"] = "OK"; gSupportedCmd["RECONNECT"] = "OK"; gSupportedCmd["REASSOCIATE"] = "OK"; gSupportedCmd["DISCONNECT"] = "OK"; gSupportedCmd["SAVE_CONFIG"] = "OK"; gSupportedCmd["SET_NETWORK"] = "OK"; gSupportedCmd["ENABLE_NETWORK"] = "OK"; gSupportedCmd["SELECT_NETWORK"] = "OK"; gSupportedCmd["DISABLE_NETWORK"] = "OK"; gSupportedCmd["REMOVE_NETWORK"] = "OK"; gSupportedCmd["GET_NETWORK"] = "OK"; gSupportedCmd["WPS_PBC"] = "OK"; gSupportedCmd["WPS_PIN"] = "OK"; gSupportedCmd["WPS_CANCEL"] = "OK"; gSupportedCmd["SET"] = "OK"; gSupportedCmd["GET"] = "OK"; gSupportedCmd["STA_AUTOCONNECT"] = "OK"; gSupportedCmd["RECONFIGURE"] = "OK"; gSupportedCmd["LIST_NETWORKS"] = "OK"; gSupportedCmd["SIGNAL_POLL"] = "OK"; return; } void MockInitApSupportedCmd(void) { gSupportedCmd["ENABLE"] = "OK"; gSupportedCmd["SET"] = "OK"; gSupportedCmd["STATUS"] = "OK"; gSupportedCmd["DISABLE"] = "OK"; gSupportedCmd["DENY_ACL"] = "OK"; gSupportedCmd["STA-FIRST"] = "OK"; gSupportedCmd["STA-NEXT"] = "OK"; gSupportedCmd["RELOAD"] = "OK"; gSupportedCmd["DEAUTHENTICATE"] = "OK"; gSupportedCmd["DISASSOCIATE"] = "OK"; return; } void MockInitP2pSupportedCmd(void) { gSupportedCmd["P2P_STOP_FIND"] = "OK"; gSupportedCmd["P2P_FIND"] = "OK"; gSupportedCmd["SET"] = "OK"; gSupportedCmd["STATUS"] = "OK"; gSupportedCmd["P2P_FLUSH"] = "OK"; gSupportedCmd["P2P_SERVICE_FLUSH"] = "OK"; gSupportedCmd["P2P_PROV_DISC"] = "OK"; gSupportedCmd["P2P_GROUP_ADD"] = "OK"; gSupportedCmd["SAVE_CONFIG"] = "OK"; gSupportedCmd["LIST_NETWORKS"] = "OK"; gSupportedCmd["P2P_PEER"] = "OK\n"; gSupportedCmd["P2P_SERV_DISC_RESP"] = "OK"; gSupportedCmd["P2P_SERV_DISC_EXTERNAL"] = "OK"; gSupportedCmd["DRIVER"] = "OK"; gSupportedCmd["P2P_SERV_DISC_CANCEL_REQ"] = "OK"; gSupportedCmd["P2P_SERV_DISC_REQ"] = "OK"; gSupportedCmd["P2P_SERVICE_ADD"] = "OK"; gSupportedCmd["P2P_SERVICE_DEL"] = "OK"; gSupportedCmd["P2P_INVITE"] = "OK"; gSupportedCmd["P2P_CANCEL"] = "OK"; gSupportedCmd["P2P_SET"] = "OK"; gSupportedCmd["P2P_EXT_LISTEN"] = "OK"; gSupportedCmd["WFD_SUBELEM_SET"] = "OK"; gSupportedCmd["REMOVE_NETWORK"] = "OK"; gSupportedCmd["P2P_GROUP_REMOVE"] = "OK"; gSupportedCmd["WPS_PBC"] = "OK"; gSupportedCmd["WPS_PIN"] = "OK"; gSupportedCmd["P2P_CONNECT"] = "OK"; return; } void MockWpaCallback(struct wpa_ctrl *send, const char *message) { if (send == NULL || message == NULL) { return; } write(send->s, message, strlen(message)); return; } static void SetNonBlock(int fd) { int flags = fcntl(fd, F_GETFL, 0); if (flags < 0) { return; } flags |= O_NONBLOCK; fcntl(fd, F_SETFL, flags); return; } struct wpa_ctrl *wpa_ctrl_open(const char *ctrl_path) { (void)ctrl_path; struct wpa_ctrl *ctrl = (struct wpa_ctrl *)calloc(1, sizeof(struct wpa_ctrl)); if (ctrl == NULL) { return NULL; } if (gUsePipeFdNum % OncePipeFdNum == 0) { int pipeFd[OncePipeFdNum] = {0}; pipe(pipeFd); SetNonBlock(pipeFd[0]); gPipeFd.push_back(pipeFd[0]); gPipeFd.push_back(pipeFd[1]); } if (gUsePipeFdNum % OncePipeFdNum == 0) { ctrl->s = gPipeFd[gUsePipeFdNum + 1]; } else { ctrl->s = gPipeFd[gUsePipeFdNum - 1]; } ++gUsePipeFdNum; return ctrl; } struct wpa_ctrl * wpa_ctrl_open2(const char *ctrl_path, const char *cli_path) { (void)cli_path; return wpa_ctrl_open(ctrl_path); } void wpa_ctrl_close(struct wpa_ctrl *ctrl) { if (ctrl == NULL) { return; } close(ctrl->s); for (auto iter = gPipeFd.begin(); iter != gPipeFd.end(); ++iter) { if (*iter == ctrl->s) { gPipeFd.erase(iter); break; } } --gUsePipeFdNum; free(ctrl); return; } static void GetExactCmd(const char *cmd, char *out, int out_len) { if (cmd == NULL || out == NULL) { return; } int i = 0; int j = 0; if (strncmp(cmd, "IFNAME=", strlen("IFNAME=")) == 0) { const char *p = strchr(cmd, ' '); if (p == NULL) { return; } j = p - cmd + 1; } while (i < out_len - 1 && cmd[i + j] != '\0' && cmd[i + j] != ' ') { out[i] = cmd[i + j]; ++i; } out[i] = '\0'; return; } static int CheckInputCmdArgs(const char *cmd) { (void)cmd; return 0; } int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len, char *reply, size_t *reply_len, void (*msg_cb)(char *msg, size_t len)) { if (ctrl == NULL || cmd == NULL || reply == NULL || reply_len == NULL) { return -1; } (void)cmd_len; (void)msg_cb; char exactCmd[MaxExactCmdLength] = {0}; GetExactCmd(cmd, exactCmd, MaxExactCmdLength); std::map<std::string, std::string>::iterator iter = gSupportedCmd.find(std::string(exactCmd)); if (iter == gSupportedCmd.end()) { StrSafeCopy(reply, *reply_len, "UNKNOWN COMMAND\n"); *reply_len = strlen(reply); return -1; } if (CheckInputCmdArgs(cmd) < 0) { StrSafeCopy(reply, *reply_len, "FAIL\n"); } else { StrSafeCopy(reply, *reply_len, iter->second.c_str()); } *reply_len = strlen(reply); return 0; } int wpa_ctrl_attach(struct wpa_ctrl *ctrl) { (void)ctrl; return 0; } int wpa_ctrl_detach(struct wpa_ctrl *ctrl) { (void)ctrl; return 0; } int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len) { size_t pos = 0; while (pos < *reply_len) { int ret = read(ctrl->s, reply + pos, 1); if (ret <= 0) { break; } if (reply[pos] == '\n') { break; } ++pos; } *reply_len = pos; reply[pos] = '\0'; return 0; } int wpa_ctrl_pending(struct wpa_ctrl *ctrl) { (void)ctrl; return 0; } int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl) { if (ctrl != NULL) { return ctrl->s; } return -1; } size_t printf_decode(u8 *buf, size_t maxlen, const char *str) { return 0; }
26.512195
108
0.613221
[ "vector" ]
ada0e54bff3611b5d0a4fe080db95ad46cb46db2
30,462
cpp
C++
src/cpp/RoaringBitmap32/RoaringBitmap32_operations.cpp
cigolpl/roaring-node
5ff7381d2ab6ea6883897ff4691e693bcd4fe484
[ "Apache-2.0" ]
1
2021-08-02T10:37:32.000Z
2021-08-02T10:37:32.000Z
src/cpp/RoaringBitmap32/RoaringBitmap32_operations.cpp
cigolpl/roaring-node
5ff7381d2ab6ea6883897ff4691e693bcd4fe484
[ "Apache-2.0" ]
null
null
null
src/cpp/RoaringBitmap32/RoaringBitmap32_operations.cpp
cigolpl/roaring-node
5ff7381d2ab6ea6883897ff4691e693bcd4fe484
[ "Apache-2.0" ]
null
null
null
#include "RoaringBitmap32.h" void RoaringBitmap32::isSubset(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self == other || (self && other && roaring_bitmap_is_subset(&self->roaring, &other->roaring))); } void RoaringBitmap32::isStrictSubset(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self && other && roaring_bitmap_is_strict_subset(&self->roaring, &other->roaring)); } void RoaringBitmap32::isEqual(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self == other || (self && other && roaring_bitmap_equals(&self->roaring, &other->roaring))); } void RoaringBitmap32::intersects(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self && other && roaring_bitmap_intersect(&self->roaring, &other->roaring)); } void RoaringBitmap32::andCardinality(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self && other ? (double)roaring_bitmap_and_cardinality(&self->roaring, &other->roaring) : -1); } void RoaringBitmap32::orCardinality(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self && other ? (double)roaring_bitmap_or_cardinality(&self->roaring, &other->roaring) : -1); } void RoaringBitmap32::andNotCardinality(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(other ? (double)roaring_bitmap_andnot_cardinality(&self->roaring, &other->roaring) : -1); } void RoaringBitmap32::xorCardinality(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self && other ? (double)roaring_bitmap_xor_cardinality(&self->roaring, &other->roaring) : -1); } void RoaringBitmap32::jaccardIndex(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, 0, RoaringBitmap32::constructorTemplate); info.GetReturnValue().Set(self && other ? roaring_bitmap_jaccard_index(&self->roaring, &other->roaring) : -1); } inline bool roaringAddMany(v8::Isolate * isolate, RoaringBitmap32 * self, v8::Local<v8::Value> arg, bool replace = false) { if (arg.IsEmpty()) { return false; } if (arg->IsNullOrUndefined()) { if (replace && self->roaring.high_low_container.containers != nullptr) { roaring_bitmap_clear(&self->roaring); } return true; } if (!arg->IsObject()) { return false; } if (arg->IsUint32Array() || arg->IsInt32Array()) { if (replace && self->roaring.high_low_container.containers != nullptr) { roaring_bitmap_clear(&self->roaring); } const v8utils::TypedArrayContent<uint32_t> typedArray(arg); roaring_bitmap_add_many(&self->roaring, typedArray.length, typedArray.data); self->invalidate(); return true; } RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(arg, RoaringBitmap32::constructorTemplate, isolate); if (other) { if (other && self != other) { if (replace || self->roaring.high_low_container.containers == nullptr) { if (self->roaring.high_low_container.containers != nullptr) { roaring_bitmap_clear(&self->roaring); } bool is_ok = ra_copy(&other->roaring.high_low_container, &self->roaring.high_low_container, roaring_bitmap_get_copy_on_write(&other->roaring)); if (!is_ok) { v8utils::throwError(isolate, "RoaringBitmap32 - Failed to copy bitmap"); } } else { roaring_bitmap_or_inplace(&self->roaring, &other->roaring); } self->invalidate(); } return true; } v8::Local<v8::Value> argv[] = {arg}; auto t = JSTypes::Uint32Array_from.Get(isolate)->Call(isolate->GetCurrentContext(), JSTypes::Uint32Array.Get(isolate), 1, argv); if (t.IsEmpty()) { return false; } const v8utils::TypedArrayContent<uint32_t> typedArray(t.ToLocalChecked()); if (replace) { roaring_bitmap_clear(&self->roaring); } roaring_bitmap_add_many(&self->roaring, typedArray.length, typedArray.data); self->invalidate(); return true; } void RoaringBitmap32::copyFrom(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); if (info.Length() == 0 || !roaringAddMany(isolate, self, info[0], true)) { return v8utils::throwError(isolate, "RoaringBitmap32::copyFrom expects a RoaringBitmap32, an Uint32Array or an Iterable"); } self->invalidate(); } void RoaringBitmap32::addMany(const v8::FunctionCallbackInfo<v8::Value> & info) { auto isolate = info.GetIsolate(); if (info.Length() > 0) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); self->invalidate(); if (roaringAddMany(isolate, self, info[0])) { return info.GetReturnValue().Set(info.Holder()); } } return v8utils::throwTypeError(isolate, "Uint32Array, RoaringBitmap32 or Iterable<number> expected"); } void RoaringBitmap32::add(const v8::FunctionCallbackInfo<v8::Value> & info) { uint32_t v; auto isolate = info.GetIsolate(); if (info.Length() < 1 || !info[0]->IsUint32() || !info[0]->Uint32Value(isolate->GetCurrentContext()).To(&v)) { return v8utils::throwTypeError(isolate, "RoaringBitmap32::add - 32 bit unsigned integer expected"); } RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); roaring_bitmap_add(&self->roaring, v); self->invalidate(); return info.GetReturnValue().Set(info.Holder()); } void RoaringBitmap32::tryAdd(const v8::FunctionCallbackInfo<v8::Value> & info) { uint32_t v; if (info.Length() < 1 || !info[0]->IsUint32() || !info[0]->Uint32Value(info.GetIsolate()->GetCurrentContext()).To(&v)) { return info.GetReturnValue().Set(false); } RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); bool result = roaring_bitmap_add_checked(&self->roaring, v); if (result) { self->invalidate(); } info.GetReturnValue().Set(result); } void RoaringBitmap32::removeMany(const v8::FunctionCallbackInfo<v8::Value> & info) { bool done = false; v8::Isolate * isolate = info.GetIsolate(); if (info.Length() > 0) { auto const & arg = info[0]; RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); if (arg->IsUint32Array() || arg->IsInt32Array()) { const v8utils::TypedArrayContent<uint32_t> typedArray(arg); roaring_bitmap_remove_many(&self->roaring, typedArray.length, typedArray.data); self->invalidate(); done = true; } else { RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(arg, RoaringBitmap32::constructorTemplate, isolate); if (other) { roaring_bitmap_andnot_inplace(&self->roaring, &other->roaring); self->invalidate(); done = true; } else { v8::Local<v8::Value> argv[] = {arg}; auto tMaybe = JSTypes::Uint32Array_from.Get(isolate)->Call(isolate->GetCurrentContext(), JSTypes::Uint32Array.Get(isolate), 1, argv); v8::Local<v8::Value> t; if (tMaybe.ToLocal(&t)) { const v8utils::TypedArrayContent<uint32_t> typedArray(t); roaring_bitmap_remove_many(&self->roaring, typedArray.length, typedArray.data); self->invalidate(); done = true; } else { RoaringBitmap32 tmp; if (roaringAddMany(isolate, &tmp, arg)) { roaring_bitmap_andnot_inplace(&self->roaring, &tmp.roaring); self->invalidate(); done = true; } } } } } if (done) { info.GetReturnValue().Set(info.Holder()); } else { v8utils::throwTypeError(isolate, "Uint32Array, RoaringBitmap32 or Iterable<number> expected"); } } void RoaringBitmap32::andInPlace(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); if (info.Length() > 0) { auto const & arg = info[0]; RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(arg, RoaringBitmap32::constructorTemplate, isolate); if (other) { roaring_bitmap_and_inplace(&self->roaring, &other->roaring); self->invalidate(); return info.GetReturnValue().Set(info.Holder()); } else { RoaringBitmap32 tmp; if (roaringAddMany(isolate, &tmp, arg)) { roaring_bitmap_and_inplace(&self->roaring, &tmp.roaring); self->invalidate(); return info.GetReturnValue().Set(info.Holder()); } } } return v8utils::throwTypeError(isolate, "Uint32Array, RoaringBitmap32 or Iterable<number> expected"); } void RoaringBitmap32::xorInPlace(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); if (info.Length() > 0) { auto const & arg = info[0]; RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); RoaringBitmap32 * other = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(arg, RoaringBitmap32::constructorTemplate, isolate); if (other) { roaring_bitmap_xor_inplace(&self->roaring, &other->roaring); self->invalidate(); return info.GetReturnValue().Set(info.Holder()); } else { RoaringBitmap32 tmp; roaringAddMany(info.GetIsolate(), &tmp, arg); roaring_bitmap_xor_inplace(&self->roaring, &tmp.roaring); self->invalidate(); return info.GetReturnValue().Set(info.Holder()); } } return v8utils::throwTypeError(isolate, "Uint32Array, RoaringBitmap32 or Iterable<number> expected"); } void RoaringBitmap32::remove(const v8::FunctionCallbackInfo<v8::Value> & info) { uint32_t v; if (info.Length() >= 1 && info[0]->IsUint32() && info[0]->Uint32Value(info.GetIsolate()->GetCurrentContext()).To(&v)) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); roaring_bitmap_remove(&self->roaring, v); self->invalidate(); } } void RoaringBitmap32::removeChecked(const v8::FunctionCallbackInfo<v8::Value> & info) { uint32_t v; if (info.Length() < 1 || !info[0]->IsUint32() || !info[0]->Uint32Value(info.GetIsolate()->GetCurrentContext()).To(&v)) { return info.GetReturnValue().Set(false); } RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); bool result = roaring_bitmap_remove_checked(&self->roaring, v); if (result) { self->invalidate(); } info.GetReturnValue().Set(result); } void RoaringBitmap32::clear(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); if (self->roaring.high_low_container.size == 0) { info.GetReturnValue().Set(false); } else { ra_clear(&self->roaring.high_low_container); self->roaring.high_low_container = roaring_array_t{}; self->invalidate(); info.GetReturnValue().Set(true); } } inline static bool getRangeOperationParameters(const v8::FunctionCallbackInfo<v8::Value> & info, uint64_t & minInteger, uint64_t & maxInteger) { if (info.Length() < 2 || !info[0]->IsNumber() || !info[1]->IsNumber()) { return false; } v8::Isolate * isolate = info.GetIsolate(); double minimum, maximum; if (!info[0]->NumberValue(isolate->GetCurrentContext()).To(&minimum) || std::isnan(minimum)) { return false; } if (!info[1]->NumberValue(isolate->GetCurrentContext()).To(&maximum) || std::isnan(maximum)) { return false; } if (minimum < 0) { minimum = 0; } if (maximum < 0) { maximum = 0; } else if (maximum > 4294967296) { maximum = 4294967296; } minInteger = (uint64_t)minimum; maxInteger = (uint64_t)maximum; return minInteger < maxInteger; } void RoaringBitmap32::rangeCardinality(const v8::FunctionCallbackInfo<v8::Value> & info) { uint64_t minInteger, maxInteger; if (getRangeOperationParameters(info, minInteger, maxInteger)) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); auto card = roaring_bitmap_range_cardinality(&self->roaring, minInteger, maxInteger); if (card <= 0xFFFFFFFF) { return info.GetReturnValue().Set((uint32_t)card); } return info.GetReturnValue().Set((double)card); } return info.GetReturnValue().Set(0u); } void RoaringBitmap32::flipRange(const v8::FunctionCallbackInfo<v8::Value> & info) { uint64_t minInteger, maxInteger; if (getRangeOperationParameters(info, minInteger, maxInteger)) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); roaring_bitmap_flip_inplace(&self->roaring, minInteger, maxInteger); self->invalidate(); } } void RoaringBitmap32::addRange(const v8::FunctionCallbackInfo<v8::Value> & info) { uint64_t minInteger, maxInteger; if (getRangeOperationParameters(info, minInteger, maxInteger)) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); roaring_bitmap_add_range_closed(&self->roaring, (uint32_t)minInteger, (uint32_t)(maxInteger - 1)); self->invalidate(); } } void RoaringBitmap32::removeRange(const v8::FunctionCallbackInfo<v8::Value> & info) { uint64_t minInteger, maxInteger; if (getRangeOperationParameters(info, minInteger, maxInteger)) { RoaringBitmap32 * self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(info.Holder()); roaring_bitmap_remove_range_closed(&self->roaring, (uint32_t)minInteger, (uint32_t)(maxInteger - 1)); self->invalidate(); } } void RoaringBitmap32::swapStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); if (info.Length() < 2) return v8utils::throwTypeError(isolate, "RoaringBitmap32::swap expects 2 arguments"); auto constructorTemplate = RoaringBitmap32::constructorTemplate.Get(isolate); RoaringBitmap32 * a = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[0], constructorTemplate, isolate); if (!a) return v8utils::throwTypeError(isolate, "RoaringBitmap32::swap first argument must be a RoaringBitmap32"); RoaringBitmap32 * b = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[1], constructorTemplate, isolate); if (!b) return v8utils::throwTypeError(isolate, "RoaringBitmap32::swap second argument must be a RoaringBitmap32"); if (a != b) { std::swap(a->roaring, b->roaring); a->invalidate(); b->invalidate(); } } void RoaringBitmap32::andStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); v8::HandleScope scope(isolate); auto constructorTemplate = RoaringBitmap32::constructorTemplate.Get(isolate); if (info.Length() < 2) return v8utils::throwTypeError(isolate, "RoaringBitmap32::and expects 2 arguments"); RoaringBitmap32 * a = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[0], constructorTemplate, isolate); if (!a) return v8utils::throwTypeError(isolate, "RoaringBitmap32::and first argument must be a RoaringBitmap32"); RoaringBitmap32 * b = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[1], constructorTemplate, isolate); if (!b) return v8utils::throwTypeError(isolate, "RoaringBitmap32::and second argument must be a RoaringBitmap32"); v8::Local<v8::Function> cons = constructor.Get(isolate); auto resultMaybe = cons->NewInstance(isolate->GetCurrentContext(), 0, nullptr); v8::Local<v8::Object> result; if (!resultMaybe.ToLocal(&result)) { return v8utils::throwTypeError(isolate, "RoaringBitmap32::and failed to create new instance"); } auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); roaring_bitmap_t * r = roaring_bitmap_and(&a->roaring, &b->roaring); if (r == nullptr) { return v8utils::throwTypeError(isolate, "RoaringBitmap32::and failed materalization"); } self->roaring.high_low_container = std::move(r->high_low_container); free(r); info.GetReturnValue().Set(result); } void RoaringBitmap32::orStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); v8::HandleScope scope(isolate); if (info.Length() < 2) return v8utils::throwTypeError(isolate, "RoaringBitmap32::or expects 2 arguments"); auto constructorTemplate = RoaringBitmap32::constructorTemplate.Get(isolate); RoaringBitmap32 * a = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[0], constructorTemplate, isolate); if (!a) return v8utils::throwTypeError(isolate, "RoaringBitmap32::or first argument must be a RoaringBitmap32"); RoaringBitmap32 * b = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[1], constructorTemplate, isolate); if (!b) return v8utils::throwTypeError(isolate, "RoaringBitmap32::or second argument must be a RoaringBitmap32"); v8::Local<v8::Function> cons = constructor.Get(isolate); auto resultMaybe = cons->NewInstance(isolate->GetCurrentContext(), 0, nullptr); if (resultMaybe.IsEmpty()) return; auto result = resultMaybe.ToLocalChecked(); auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); roaring_bitmap_t * r = roaring_bitmap_or(&a->roaring, &b->roaring); if (r == nullptr) return v8utils::throwTypeError(isolate, "RoaringBitmap32::or failed materalization"); self->roaring.high_low_container = std::move(r->high_low_container); free(r); info.GetReturnValue().Set(result); } void RoaringBitmap32::xorStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); v8::HandleScope scope(isolate); if (info.Length() < 2) return v8utils::throwTypeError(isolate, "RoaringBitmap32::xor expects 2 arguments"); auto constructorTemplate = RoaringBitmap32::constructorTemplate.Get(isolate); RoaringBitmap32 * a = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[0], constructorTemplate, isolate); if (!a) return v8utils::throwTypeError(isolate, "RoaringBitmap32::xor first argument must be a RoaringBitmap32"); RoaringBitmap32 * b = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[1], constructorTemplate, isolate); if (!b) return v8utils::throwTypeError(isolate, "RoaringBitmap32::xor second argument must be a RoaringBitmap32"); v8::Local<v8::Function> cons = constructor.Get(isolate); auto resultMaybe = cons->NewInstance(isolate->GetCurrentContext(), 0, nullptr); if (resultMaybe.IsEmpty()) return; auto result = resultMaybe.ToLocalChecked(); auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); roaring_bitmap_t * r = roaring_bitmap_xor(&a->roaring, &b->roaring); if (r == nullptr) return v8utils::throwTypeError(isolate, "RoaringBitmap32::xor failed materalization"); self->roaring.high_low_container = std::move(r->high_low_container); free(r); info.GetReturnValue().Set(result); } void RoaringBitmap32::andNotStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); v8::HandleScope scope(isolate); if (info.Length() < 2) return v8utils::throwTypeError(isolate, "RoaringBitmap32::andnot expects 2 arguments"); auto constructorTemplate = RoaringBitmap32::constructorTemplate.Get(isolate); RoaringBitmap32 * a = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[0], constructorTemplate, isolate); if (!a) return v8utils::throwTypeError(isolate, "RoaringBitmap32::andnot first argument must be a RoaringBitmap32"); RoaringBitmap32 * b = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info[1], constructorTemplate, isolate); if (!b) return v8utils::throwTypeError(isolate, "RoaringBitmap32::andnot second argument must be a RoaringBitmap32"); v8::Local<v8::Function> cons = constructor.Get(isolate); auto resultMaybe = cons->NewInstance(isolate->GetCurrentContext(), 0, nullptr); if (resultMaybe.IsEmpty()) { return; } auto result = resultMaybe.ToLocalChecked(); auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); roaring_bitmap_t * r = roaring_bitmap_andnot(&a->roaring, &b->roaring); if (r == nullptr) { return v8utils::throwTypeError(isolate, "RoaringBitmap32::andnot failed materalization"); } self->roaring.high_low_container = std::move(r->high_low_container); free(r); info.GetReturnValue().Set(result); } void RoaringBitmap32::fromRangeStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = v8::Isolate::GetCurrent(); v8::HandleScope scope(isolate); v8::Local<v8::Function> cons = RoaringBitmap32::constructor.Get(isolate); auto resultMaybe = cons->NewInstance(isolate->GetCurrentContext(), 0, nullptr); if (resultMaybe.IsEmpty()) { return; } uint32_t v; uint32_t step = 1; if (info.Length() >= 3 && info[2]->IsUint32() && info[2]->Uint32Value(isolate->GetCurrentContext()).To(&v)) { step = v; if (step == 0) { step = 1; } } auto result = resultMaybe.ToLocalChecked(); auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); uint64_t minInteger, maxInteger; if (getRangeOperationParameters(info, minInteger, maxInteger)) { roaring_bitmap_t * r = roaring_bitmap_from_range(minInteger, maxInteger, step); if (r != nullptr) { self->roaring.high_low_container = std::move(r->high_low_container); free(r); } } info.GetReturnValue().Set(result); } template <typename TSize> void RoaringBitmap32_opManyStatic(const char * opName, roaring_bitmap_t * op(TSize number, const roaring_bitmap_t ** x), const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = info.GetIsolate(); v8::HandleScope scope(isolate); int length = info.Length(); v8::Local<v8::FunctionTemplate> ctorType = RoaringBitmap32::constructorTemplate.Get(isolate); v8::Local<v8::Function> cons = RoaringBitmap32::constructor.Get(isolate); auto context = isolate->GetCurrentContext(); if (length == 0) { auto vMaybe = cons->NewInstance(context, 0, nullptr); v8::Local<v8::Object> v; if (vMaybe.ToLocal(&v)) { info.GetReturnValue().Set(v); } return; } if (length == 1) { if (info[0]->IsArray()) { auto array = v8::Local<v8::Array>::Cast(info[0]); size_t arrayLength = array->Length(); if (arrayLength == 0) { auto vMaybe = cons->NewInstance(context, 0, nullptr); v8::Local<v8::Object> v; if (vMaybe.ToLocal(&v)) { info.GetReturnValue().Set(v); } return; } if (arrayLength == 1) { auto itemMaybe = array->Get(context, 0); v8::Local<v8::Value> item; if (!itemMaybe.ToLocal(&item) || !ctorType->HasInstance(item)) { return v8utils::throwTypeError(isolate, std::string(opName) + " accepts only RoaringBitmap32 instances"); } v8::Local<v8::Value> argv[] = {item}; auto vMaybe = cons->NewInstance(context, 1, argv); v8::Local<v8::Object> v; if (vMaybe.ToLocal(&v)) { info.GetReturnValue().Set(v); } return; } const roaring_bitmap_t ** x = (const roaring_bitmap_t **)malloc(arrayLength * sizeof(roaring_bitmap_t *)); if (x == nullptr) { return v8utils::throwTypeError(isolate, std::string(opName) + " failed allocation"); } for (size_t i = 0; i < arrayLength; ++i) { v8::Local<v8::Value> item; auto itemMaybe = array->Get(context, i); if (!itemMaybe.ToLocal(&item) || !ctorType->HasInstance(item)) { return v8utils::throwTypeError(isolate, std::string(opName) + " accepts only RoaringBitmap32 instances"); } RoaringBitmap32 * p = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(item, ctorType, isolate); if (p == nullptr) { free(x); return v8utils::throwTypeError(isolate, std::string(opName) + " accepts only RoaringBitmap32 instances"); } x[i] = &p->roaring; } auto resultMaybe = cons->NewInstance(context, 0, nullptr); if (resultMaybe.IsEmpty()) { free(x); return; } auto result = resultMaybe.ToLocalChecked(); auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); roaring_bitmap_t * r = op((TSize)arrayLength, x); if (r == nullptr) { free(x); return v8utils::throwTypeError(isolate, std::string(opName) + " failed roaring allocation"); } self->roaring.high_low_container = std::move(r->high_low_container); free(r); info.GetReturnValue().Set(result); } else { if (!ctorType->HasInstance(info[0])) { return v8utils::throwTypeError(isolate, std::string(opName) + " accepts only RoaringBitmap32 instances"); } v8::Local<v8::Value> argv[] = {info[0]}; auto v = cons->NewInstance(isolate->GetCurrentContext(), 1, argv); if (!v.IsEmpty()) { info.GetReturnValue().Set(v.ToLocalChecked()); } } } else { const roaring_bitmap_t ** x = (const roaring_bitmap_t **)malloc(length * sizeof(roaring_bitmap_t *)); if (x == nullptr) { return v8utils::throwTypeError(isolate, std::string(opName) + " failed allocation"); } for (int i = 0; i < length; ++i) { RoaringBitmap32 * p = v8utils::ObjectWrap::TryUnwrap<RoaringBitmap32>(info, i, ctorType); if (p == nullptr) { free(x); return v8utils::throwTypeError(isolate, std::string(opName) + " accepts only RoaringBitmap32 instances"); } x[i] = &p->roaring; } v8::MaybeLocal<v8::Object> resultMaybe = cons->NewInstance(isolate->GetCurrentContext(), 0, nullptr); if (resultMaybe.IsEmpty()) { free(x); return; } v8::Local<v8::Object> result = resultMaybe.ToLocalChecked(); auto self = v8utils::ObjectWrap::Unwrap<RoaringBitmap32>(result); roaring_bitmap_t * r = op((TSize)length, x); if (r == nullptr) { free(x); return v8utils::throwTypeError(isolate, std::string(opName) + " failed roaring allocation"); } self->roaring.high_low_container = std::move(r->high_low_container); free(r); info.GetReturnValue().Set(result); } } void RoaringBitmap32::orManyStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32_opManyStatic("RoaringBitmap32::orMany", roaring_bitmap_or_many_heap, info); } void RoaringBitmap32::xorManyStatic(const v8::FunctionCallbackInfo<v8::Value> & info) { RoaringBitmap32_opManyStatic("RoaringBitmap32::xorMany", roaring_bitmap_xor_many, info); } struct FromArrayAsyncWorker : public RoaringBitmap32FactoryAsyncWorker { public: v8::Persistent<v8::Value> argPersistent; v8utils::TypedArrayContent<uint32_t> buffer; FromArrayAsyncWorker(v8::Isolate * isolate) : RoaringBitmap32FactoryAsyncWorker(isolate) { } virtual ~FromArrayAsyncWorker() { argPersistent.Reset(); } protected: virtual void work() { roaring_bitmap_add_many(&bitmap, buffer.length, buffer.data); roaring_bitmap_run_optimize(&bitmap); roaring_bitmap_shrink_to_fit(&bitmap); } }; void RoaringBitmap32::fromArrayStaticAsync(const v8::FunctionCallbackInfo<v8::Value> & info) { v8::Isolate * isolate = v8::Isolate::GetCurrent(); v8::HandleScope scope(isolate); v8::Local<v8::Value> arg; if (info.Length() >= 1) { arg = info[0]; } FromArrayAsyncWorker * worker = new FromArrayAsyncWorker(isolate); if (worker == nullptr) { return v8utils::throwError(isolate, "Failed to allocate async worker"); } if (!arg->IsNullOrUndefined() && !arg->IsFunction()) { if (arg->IsUint32Array() || arg->IsInt32Array()) { worker->buffer.set(arg); const v8utils::TypedArrayContent<uint32_t> typedArray(arg); } else if (arg->IsObject()) { if (RoaringBitmap32::constructorTemplate.Get(isolate)->HasInstance(arg)) { return v8utils::throwTypeError(isolate, "RoaringBitmap32::fromArrayAsync cannot be called with a RoaringBitmap32 instance"); } else { v8::Local<v8::Value> argv[] = {arg}; auto carg = JSTypes::Uint32Array_from.Get(isolate)->Call(isolate->GetCurrentContext(), JSTypes::Uint32Array.Get(isolate), 1, argv); if (carg.IsEmpty()) { return; } worker->buffer.set(carg.ToLocalChecked()); } } worker->argPersistent.Reset(isolate, arg); } if (info.Length() >= 2 && info[1]->IsFunction()) { worker->setCallback(info[1]); } else if (info.Length() >= 1 && info[0]->IsFunction()) { worker->setCallback(info[0]); } v8::Local<v8::Value> returnValue = v8utils::AsyncWorker::run(worker); info.GetReturnValue().Set(returnValue); }
39.003841
151
0.695621
[ "object" ]
adcf9de7cd5a2f87b86fc5b1ffa15e97d739fa8c
2,329
cpp
C++
src/LBFGS/test_lbfgs.cpp
microsoft/pSDCA
0933d4dc27c21aafa204ee28b3dd21236a4e8b7a
[ "MIT" ]
null
null
null
src/LBFGS/test_lbfgs.cpp
microsoft/pSDCA
0933d4dc27c21aafa204ee28b3dd21236a4e8b7a
[ "MIT" ]
null
null
null
src/LBFGS/test_lbfgs.cpp
microsoft/pSDCA
0933d4dc27c21aafa204ee28b3dd21236a4e8b7a
[ "MIT" ]
2
2020-09-04T04:31:36.000Z
2021-11-10T11:28:01.000Z
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include<iostream> //#include<functional> #include "utils.h" #include "randalgms.h" #include "lbfgs_omp.h" using namespace std; using namespace distropt; int main_test_lbfgs(int argc, char* argv[]) //int main(int argc, char* argv[]) { if (argc < 2) { std::cout << "Need to specify training data file." << std::endl; std::exit(0); } string data_file = argv[1]; // read training and testing files vector<spmatT> labels; vector<spmatT> weights; vector<spmatT> values; vector<size_t> colidx; vector<size_t> rowptr; std::cout << "Loading training data ... " << std::endl; // news20 actually has column index starting from 0, rcv1 and most others start with 1. Need to revise code! //size_t n_examples = load_datafile(data_file, labels, weights, values, colidx, rowptr, false, true, true, 0); size_t n_examples = load_datafile(data_file, labels, weights, values, colidx, rowptr, false, true, true); SparseMatrixCSR X(values, colidx, rowptr, false); Vector y(labels); X.normalize_rows(); // ------------------------------------------------------------------------------------- lbfgs_params params; params.max_itrs = 100; params.eps_grad = 1e-8; params.m_memory = 20; params.btls_rho = 0.5; params.btls_dec = 1e-4; params.btls_max = 20; params.btls_ada = false; double lambda = 1.0e-5; size_t dim = X.ncols(); Vector w0(dim), w(dim); // ------------------------------------------------------------------------------------- RegularizedLoss reguloss(X, y, 'l', lambda, '2'); // Replace std::bind solution by using lambdas //using namespace std::placeholders; //auto fval = std::bind(&RegularizedLoss::regu_loss, &reguloss, _1); //auto grad = std::bind(&RegularizedLoss::regu_grad, &reguloss, _1, _2); auto fval = [&reguloss](const Vector &x) {return reguloss.regu_loss(x); }; auto grad = [&reguloss](const Vector &x, Vector &g) {return reguloss.regu_grad(x, g); }; lbfgs_omp(fval, grad, w0, w, params); // ------------------------------------------------------------------------------------- float train_err = binary_error_rate(X, y, w); std::cout << "Training error rate = " << train_err * 100 << " %" << std::endl; return 0; }
31.472973
112
0.590812
[ "vector" ]
add84b3d2b6b29fa950b6e3d85d215123467124a
45,081
cxx
C++
main/sw/source/core/objectpositioning/anchoredobjectposition.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
679
2015-01-06T06:34:58.000Z
2022-03-30T01:06:03.000Z
main/sw/source/core/objectpositioning/anchoredobjectposition.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
102
2017-11-07T08:51:31.000Z
2022-03-17T12:13:49.000Z
main/sw/source/core/objectpositioning/anchoredobjectposition.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
331
2015-01-06T11:40:55.000Z
2022-03-14T04:07:51.000Z
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" #include <anchoredobjectposition.hxx> #ifndef _ENVIRONMENTOFANCHOREDOBJECT #include <environmentofanchoredobject.hxx> #endif #include <flyfrm.hxx> #include <flyfrms.hxx> #include <txtfrm.hxx> #include <pagefrm.hxx> #include <frmtool.hxx> #ifndef _SVX_SVDOBJ_HXX #include <svx/svdobj.hxx> #endif #include <dflyobj.hxx> #include <dcontact.hxx> #include <frmfmt.hxx> #include <fmtornt.hxx> // --> OD 2006-03-15 #i62875# #include <fmtfollowtextflow.hxx> // <-- #include <editeng/lrspitem.hxx> #include <editeng/ulspitem.hxx> #include <ndtxt.hxx> #include <IDocumentSettingAccess.hxx> using namespace ::com::sun::star; using namespace objectpositioning; // ************************************************************************** // constructor, destructor, initialization // ************************************************************************** SwAnchoredObjectPosition::SwAnchoredObjectPosition( SdrObject& _rDrawObj ) : mrDrawObj( _rDrawObj ), mbIsObjFly( false ), mpAnchoredObj( 0 ), mpAnchorFrm( 0 ), mpContact( 0 ), // --> OD 2006-03-15 #i62875# mbFollowTextFlow( false ), mbDoNotCaptureAnchoredObj( false ) // <-- { #if OSL_DEBUG_LEVEL > 1 // assert, if object isn't of excepted type const bool bObjOfExceptedType = mrDrawObj.ISA(SwVirtFlyDrawObj) || // object representing fly frame mrDrawObj.ISA(SwDrawVirtObj) || // 'virtual' drawing object ( !mrDrawObj.ISA(SdrVirtObj) && // 'master' drawing object !mrDrawObj.ISA(SwFlyDrawObj) ); // - indirectly checked (void) bObjOfExceptedType; ASSERT( bObjOfExceptedType, "SwAnchoredObjectPosition(..) - object of unexcepted type!" ); #endif _GetInfoAboutObj(); } /** determine information about object OD 30.07.2003 #110978# members <mbIsObjFly>, <mpFrmOfObj>, <mpAnchorFrm>, <mpContact>, <mbFollowTextFlow> and <mbDoNotCaptureAnchoredObj> are set @author OD */ void SwAnchoredObjectPosition::_GetInfoAboutObj() { // determine, if object represents a fly frame { mbIsObjFly = mrDrawObj.ISA(SwVirtFlyDrawObj); } // determine contact object { mpContact = static_cast<SwContact*>(GetUserCall( &mrDrawObj )); ASSERT( mpContact, "SwAnchoredObjectPosition::_GetInfoAboutObj() - missing SwContact-object." ); } // determine anchored object, the object belongs to { // OD 2004-03-30 #i26791# mpAnchoredObj = mpContact->GetAnchoredObj( &mrDrawObj ); ASSERT( mpAnchoredObj, "SwAnchoredObjectPosition::_GetInfoAboutObj() - missing anchored object." ); } // determine frame, the object is anchored at { // OD 2004-03-23 #i26791# mpAnchorFrm = mpAnchoredObj->AnchorFrm(); ASSERT( mpAnchorFrm, "SwAnchoredObjectPosition::_GetInfoAboutObj() - missing anchor frame." ); } // determine format the object belongs to { // --> OD 2004-07-01 #i28701# mpFrmFmt = &mpAnchoredObj->GetFrmFmt(); ASSERT( mpFrmFmt, "<SwAnchoredObjectPosition::_GetInfoAboutObj() - missing frame format." ); } // --> OD 2006-03-15 #i62875# // determine attribute value of <Follow-Text-Flow> { mbFollowTextFlow = mpFrmFmt->GetFollowTextFlow().GetValue(); } // determine, if anchored object has not to be captured on the page. // the following conditions must be hold to *not* capture it: // - corresponding document compatibility flag is set // - it's a drawing object // - it doesn't follow the text flow { mbDoNotCaptureAnchoredObj = !mbIsObjFly && !mbFollowTextFlow && mpFrmFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE); } // <-- } SwAnchoredObjectPosition::~SwAnchoredObjectPosition() {} bool SwAnchoredObjectPosition::IsAnchoredToChar() const { return false; } const SwFrm* SwAnchoredObjectPosition::ToCharOrientFrm() const { return NULL; } const SwRect* SwAnchoredObjectPosition::ToCharRect() const { return NULL; } // OD 12.11.2003 #i22341# SwTwips SwAnchoredObjectPosition::ToCharTopOfLine() const { return 0L; } /** helper method to determine top of a frame for the vertical object positioning OD 2004-03-11 #i11860# @author OD */ SwTwips SwAnchoredObjectPosition::_GetTopForObjPos( const SwFrm& _rFrm, const SwRectFn& _fnRect, const bool _bVert ) const { SwTwips nTopOfFrmForObjPos = (_rFrm.Frm().*_fnRect->fnGetTop)(); if ( _rFrm.IsTxtFrm() ) { const SwTxtFrm& rTxtFrm = static_cast<const SwTxtFrm&>(_rFrm); if ( _bVert ) { nTopOfFrmForObjPos -= rTxtFrm.GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); } else { nTopOfFrmForObjPos += rTxtFrm.GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid(); } } return nTopOfFrmForObjPos; } void SwAnchoredObjectPosition::_GetVertAlignmentValues( const SwFrm& _rVertOrientFrm, const SwFrm& _rPageAlignLayFrm, const sal_Int16 _eRelOrient, SwTwips& _orAlignAreaHeight, SwTwips& _orAlignAreaOffset ) const { SwTwips nHeight = 0; SwTwips nOffset = 0; SWRECTFN( (&_rVertOrientFrm) ) // OD 2004-03-11 #i11860# - top of <_rVertOrientFrm> for object positioning const SwTwips nVertOrientTop = _GetTopForObjPos( _rVertOrientFrm, fnRect, bVert ); // OD 2004-03-11 #i11860# - upper space amount of <_rVertOrientFrm> considered // for previous frame const SwTwips nVertOrientUpperSpaceForPrevFrmAndPageGrid = _rVertOrientFrm.IsTxtFrm() ? static_cast<const SwTxtFrm&>(_rVertOrientFrm). GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() : 0; switch ( _eRelOrient ) { case text::RelOrientation::FRAME: { // OD 2004-03-11 #i11860# - consider upper space of previous frame nHeight = (_rVertOrientFrm.Frm().*fnRect->fnGetHeight)() - nVertOrientUpperSpaceForPrevFrmAndPageGrid; nOffset = 0; } break; case text::RelOrientation::PRINT_AREA: { nHeight = (_rVertOrientFrm.Prt().*fnRect->fnGetHeight)(); // OD 2004-03-11 #i11860# - consider upper space of previous frame nOffset = (_rVertOrientFrm.*fnRect->fnGetTopMargin)() - nVertOrientUpperSpaceForPrevFrmAndPageGrid; // if aligned to page in horizontal layout, consider header and // footer frame height appropriately. if( _rVertOrientFrm.IsPageFrm() && !bVert ) { const SwFrm* pPrtFrm = static_cast<const SwPageFrm&>(_rVertOrientFrm).Lower(); while( pPrtFrm ) { if( pPrtFrm->IsHeaderFrm() ) { nHeight -= pPrtFrm->Frm().Height(); nOffset += pPrtFrm->Frm().Height(); } else if( pPrtFrm->IsFooterFrm() ) { nHeight -= pPrtFrm->Frm().Height(); } pPrtFrm = pPrtFrm->GetNext(); } } } break; case text::RelOrientation::PAGE_FRAME: { nHeight = (_rPageAlignLayFrm.Frm().*fnRect->fnGetHeight)(); nOffset = (*fnRect->fnYDiff)( (_rPageAlignLayFrm.Frm().*fnRect->fnGetTop)(), nVertOrientTop ); } break; case text::RelOrientation::PAGE_PRINT_AREA: { nHeight = (_rPageAlignLayFrm.Prt().*fnRect->fnGetHeight)(); nOffset = (_rPageAlignLayFrm.*fnRect->fnGetTopMargin)() + (*fnRect->fnYDiff)( (_rPageAlignLayFrm.Frm().*fnRect->fnGetTop)(), nVertOrientTop ); // if aligned to page in horizontal layout, consider header and // footer frame height appropriately. if( _rPageAlignLayFrm.IsPageFrm() && !bVert ) { const SwFrm* pPrtFrm = static_cast<const SwPageFrm&>(_rPageAlignLayFrm).Lower(); while( pPrtFrm ) { if( pPrtFrm->IsHeaderFrm() ) { nHeight -= pPrtFrm->Frm().Height(); nOffset += pPrtFrm->Frm().Height(); } else if( pPrtFrm->IsFooterFrm() ) { nHeight -= pPrtFrm->Frm().Height(); } pPrtFrm = pPrtFrm->GetNext(); } } } break; // OD 12.11.2003 #i22341# - vertical alignment at top of line case text::RelOrientation::TEXT_LINE: { if ( IsAnchoredToChar() ) { nHeight = 0; nOffset = (*fnRect->fnYDiff)( ToCharTopOfLine(), nVertOrientTop ); } else { ASSERT( false, "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); } } break; case text::RelOrientation::CHAR: { if ( IsAnchoredToChar() ) { nHeight = (ToCharRect()->*fnRect->fnGetHeight)(); nOffset = (*fnRect->fnYDiff)( (ToCharRect()->*fnRect->fnGetTop)(), nVertOrientTop ); } else { ASSERT( false, "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); } } break; // no break here, because text::RelOrientation::CHAR is invalid, if !mbAnchorToChar default: //case text::RelOrientation::PAGE_LEFT: not valid for vertical alignment //case text::RelOrientation::PAGE_RIGHT: not valid for vertical alignment //case text::RelOrientation::FRAME_LEFT: not valid for vertical alignment //case text::RelOrientation::FRAME_RIGHT: not valid for vertical alignment { ASSERT( false, "<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" ); } } _orAlignAreaHeight = nHeight; _orAlignAreaOffset = nOffset; } // --> OD 2004-06-17 #i26791# - add output parameter <_roVertOffsetToFrmAnchorPos> SwTwips SwAnchoredObjectPosition::_GetVertRelPos( const SwFrm& _rVertOrientFrm, const SwFrm& _rPageAlignLayFrm, const sal_Int16 _eVertOrient, const sal_Int16 _eRelOrient, const SwTwips _nVertPos, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, SwTwips& _roVertOffsetToFrmAnchorPos ) const { SwTwips nRelPosY = 0; SWRECTFN( (&_rVertOrientFrm) ); SwTwips nAlignAreaHeight; SwTwips nAlignAreaOffset; _GetVertAlignmentValues( _rVertOrientFrm, _rPageAlignLayFrm, _eRelOrient, nAlignAreaHeight, nAlignAreaOffset ); nRelPosY = nAlignAreaOffset; const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() ); const SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)(); switch ( _eVertOrient ) { case text::VertOrientation::NONE: { // 'manual' vertical position nRelPosY += _nVertPos; } break; case text::VertOrientation::TOP: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin nRelPosY += bVert ? ( bVertL2R ? _rLRSpacing.GetLeft() : _rLRSpacing.GetRight() ) : _rULSpacing.GetUpper(); } break; case text::VertOrientation::CENTER: { nRelPosY += (nAlignAreaHeight / 2) - (nObjHeight / 2); } break; case text::VertOrientation::BOTTOM: { //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin nRelPosY += nAlignAreaHeight - ( nObjHeight + ( bVert ? ( bVertL2R ? _rLRSpacing.GetRight() : _rLRSpacing.GetLeft() ) : _rULSpacing.GetLower() ) ); } break; default: { ASSERT( false, "<SwAnchoredObjectPosition::_GetVertRelPos(..) - invalid vertical positioning" ); } } // --> OD 2004-06-17 #i26791# _roVertOffsetToFrmAnchorPos = nAlignAreaOffset; return nRelPosY; } /** adjust calculated vertical in order to keep object inside 'page' alignment layout frame. OD 2004-07-01 #i28701# - parameter <nTopOfAnch> and <bVert> added OD 2004-07-22 #i31805# - add parameter <bCheckBottom> OD 2004-10-08 #i26945# - add parameter <bFollowTextFlow> OD 2006-03-15 #i62875# - method now private and renamed. OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R> @author OD */ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnch, const bool bVert, const bool bVertL2R, const SwFrm& rPageAlignLayFrm, const SwTwips nProposedRelPosY, const bool bFollowTextFlow, const bool bCheckBottom ) const { SwTwips nAdjustedRelPosY = nProposedRelPosY; const Size aObjSize( GetAnchoredObj().GetObjRect().SSize() ); // determine the area of 'page' alignment frame, to which the vertical // position is restricted. // --> OD 2004-07-06 #i28701# - Extend restricted area for the vertical // position to area of the page frame, if wrapping style influence is // considered on object positioning. Needed to avoid layout loops in the // object positioning algorithm considering the wrapping style influence // caused by objects, which follow the text flow and thus are restricted // to its environment (e.g. page header/footer). SwRect aPgAlignArea; { // --> OD 2004-10-08 #i26945# - no extension of restricted area, if // object's attribute follow text flow is set and its inside a table if ( GetFrmFmt().getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) && ( !bFollowTextFlow || !GetAnchoredObj().GetAnchorFrm()->IsInTab() ) ) { aPgAlignArea = rPageAlignLayFrm.FindPageFrm()->Frm(); } else { aPgAlignArea = rPageAlignLayFrm.Frm(); } } if ( bVert ) { // --> OD 2009-09-01 #mongolianlayout# if ( !bVertL2R ) // <-- { if ( bCheckBottom && nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() < aPgAlignArea.Left() ) { nAdjustedRelPosY = aPgAlignArea.Left() + nTopOfAnch - aObjSize.Width(); } if ( nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() ) { nAdjustedRelPosY = nTopOfAnch - aPgAlignArea.Right(); } } // --> OD 2009-09-01 #mongolianlayout# else { if ( bCheckBottom && nTopOfAnch + nAdjustedRelPosY + aObjSize.Width() > aPgAlignArea.Right() ) { nAdjustedRelPosY = aPgAlignArea.Right() - nTopOfAnch - aObjSize.Width(); } if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Left() ) { nAdjustedRelPosY = aPgAlignArea.Left() - nTopOfAnch; } } // <-- } else { if ( bCheckBottom && nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() > aPgAlignArea.Top() + aPgAlignArea.Height() ) { nAdjustedRelPosY = aPgAlignArea.Top() + aPgAlignArea.Height() - nTopOfAnch - aObjSize.Height(); } if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() ) { nAdjustedRelPosY = aPgAlignArea.Top() - nTopOfAnch; } } return nAdjustedRelPosY; } /** adjust calculated horizontal in order to keep object inside 'page' alignment layout frame. OD 2006-03-15 #i62875# - method now private and renamed. @author OD */ SwTwips SwAnchoredObjectPosition::_ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm, const SwTwips _nProposedRelPosX ) const { SwTwips nAdjustedRelPosX = _nProposedRelPosX; const SwFrm& rAnchorFrm = GetAnchorFrm(); const bool bVert = rAnchorFrm.IsVertical(); const Size aObjSize( GetAnchoredObj().GetObjRect().SSize() ); if( bVert ) { if ( rAnchorFrm.Frm().Top() + nAdjustedRelPosX + aObjSize.Height() > _rPageAlignLayFrm.Frm().Bottom() ) { nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Bottom() - rAnchorFrm.Frm().Top() - aObjSize.Height(); } if ( rAnchorFrm.Frm().Top() + nAdjustedRelPosX < _rPageAlignLayFrm.Frm().Top() ) { nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Top() - rAnchorFrm.Frm().Top(); } } else { if ( rAnchorFrm.Frm().Left() + nAdjustedRelPosX + aObjSize.Width() > _rPageAlignLayFrm.Frm().Right() ) { nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Right() - rAnchorFrm.Frm().Left() - aObjSize.Width(); } if ( rAnchorFrm.Frm().Left() + nAdjustedRelPosX < _rPageAlignLayFrm.Frm().Left() ) { nAdjustedRelPosX = _rPageAlignLayFrm.Frm().Left() - rAnchorFrm.Frm().Left(); } } return nAdjustedRelPosX; } /** determine alignment value for horizontal position of object @author OD */ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrientFrm, const SwFrm& _rPageAlignLayFrm, const sal_Int16 _eRelOrient, const bool _bObjWrapThrough, SwTwips& _orAlignAreaWidth, SwTwips& _orAlignAreaOffset, bool& _obAlignedRelToPage ) const { SwTwips nWidth = 0; SwTwips nOffset = 0; SWRECTFN( (&_rHoriOrientFrm) ) switch ( _eRelOrient ) { case text::RelOrientation::PRINT_AREA: { nWidth = (_rHoriOrientFrm.Prt().*fnRect->fnGetWidth)(); nOffset = (_rHoriOrientFrm.*fnRect->fnGetLeftMargin)(); if ( _rHoriOrientFrm.IsTxtFrm() ) { // consider movement of text frame left nOffset += static_cast<const SwTxtFrm&>(_rHoriOrientFrm).GetBaseOfstForFly( !_bObjWrapThrough ); } else if ( _rHoriOrientFrm.IsPageFrm() && bVert ) { // for to-page anchored objects, consider header/footer frame // in vertical layout const SwFrm* pPrtFrm = static_cast<const SwPageFrm&>(_rHoriOrientFrm).Lower(); while( pPrtFrm ) { if( pPrtFrm->IsHeaderFrm() ) { nWidth -= pPrtFrm->Frm().Height(); nOffset += pPrtFrm->Frm().Height(); } else if( pPrtFrm->IsFooterFrm() ) { nWidth -= pPrtFrm->Frm().Height(); } pPrtFrm = pPrtFrm->GetNext(); } } break; } case text::RelOrientation::PAGE_LEFT: { // align at left border of page frame/fly frame/cell frame nWidth = (_rPageAlignLayFrm.*fnRect->fnGetLeftMargin)(); nOffset = (*fnRect->fnXDiff)( (_rPageAlignLayFrm.Frm().*fnRect->fnGetLeft)(), (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); _obAlignedRelToPage = true; } break; case text::RelOrientation::PAGE_RIGHT: { // align at right border of page frame/fly frame/cell frame nWidth = (_rPageAlignLayFrm.*fnRect->fnGetRightMargin)(); nOffset = (*fnRect->fnXDiff)( (_rPageAlignLayFrm.*fnRect->fnGetPrtRight)(), (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); _obAlignedRelToPage = true; } break; case text::RelOrientation::FRAME_LEFT: { // align at left border of anchor frame nWidth = (_rHoriOrientFrm.*fnRect->fnGetLeftMargin)(); nOffset = 0; } break; case text::RelOrientation::FRAME_RIGHT: { // align at right border of anchor frame // OD 19.08.2003 #110978# - unify and simplify nWidth = (_rHoriOrientFrm.*fnRect->fnGetRightMargin)(); //nOffset = (_rHoriOrientFrm.Frm().*fnRect->fnGetWidth)() - // nWidth; nOffset = (_rHoriOrientFrm.Prt().*fnRect->fnGetRight)(); } break; case text::RelOrientation::CHAR: { // alignment relative to character - assure, that corresponding // character rectangle is set. if ( IsAnchoredToChar() ) { nWidth = 0; nOffset = (*fnRect->fnXDiff)( (ToCharRect()->*fnRect->fnGetLeft)(), (ToCharOrientFrm()->Frm().*fnRect->fnGetLeft)() ); break; } // no break! } case text::RelOrientation::PAGE_PRINT_AREA: { nWidth = (_rPageAlignLayFrm.Prt().*fnRect->fnGetWidth)(); nOffset = (*fnRect->fnXDiff)( (_rPageAlignLayFrm.*fnRect->fnGetPrtLeft)(), (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); if ( _rHoriOrientFrm.IsPageFrm() && bVert ) { // for to-page anchored objects, consider header/footer frame // in vertical layout const SwFrm* pPrtFrm = static_cast<const SwPageFrm&>(_rHoriOrientFrm).Lower(); while( pPrtFrm ) { if( pPrtFrm->IsHeaderFrm() ) { nWidth -= pPrtFrm->Frm().Height(); nOffset += pPrtFrm->Frm().Height(); } else if( pPrtFrm->IsFooterFrm() ) { nWidth -= pPrtFrm->Frm().Height(); } pPrtFrm = pPrtFrm->GetNext(); } } _obAlignedRelToPage = true; break; } case text::RelOrientation::PAGE_FRAME: { nWidth = (_rPageAlignLayFrm.Frm().*fnRect->fnGetWidth)(); nOffset = (*fnRect->fnXDiff)( (_rPageAlignLayFrm.Frm().*fnRect->fnGetLeft)(), (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)() ); _obAlignedRelToPage = true; break; } default: // case text::RelOrientation::FRAME: { nWidth = (_rHoriOrientFrm.Frm().*fnRect->fnGetWidth)(); nOffset = _rHoriOrientFrm.IsTxtFrm() ? static_cast<const SwTxtFrm&>(_rHoriOrientFrm).GetBaseOfstForFly( !_bObjWrapThrough ) : 0; break; } } _orAlignAreaWidth = nWidth; _orAlignAreaOffset = nOffset; } /** toggle given horizontal orientation and relative alignment @author OD */ void SwAnchoredObjectPosition::_ToggleHoriOrientAndAlign( const bool _bToggleLeftRight, sal_Int16& _ioeHoriOrient, sal_Int16& _iopeRelOrient ) const { if( _bToggleLeftRight ) { // toggle orientation switch ( _ioeHoriOrient ) { case text::HoriOrientation::RIGHT : { _ioeHoriOrient = text::HoriOrientation::LEFT; } break; case text::HoriOrientation::LEFT : { _ioeHoriOrient = text::HoriOrientation::RIGHT; } break; default: break; } // toggle relative alignment switch ( _iopeRelOrient ) { case text::RelOrientation::PAGE_RIGHT : { _iopeRelOrient = text::RelOrientation::PAGE_LEFT; } break; case text::RelOrientation::PAGE_LEFT : { _iopeRelOrient = text::RelOrientation::PAGE_RIGHT; } break; case text::RelOrientation::FRAME_RIGHT : { _iopeRelOrient = text::RelOrientation::FRAME_LEFT; } break; case text::RelOrientation::FRAME_LEFT : { _iopeRelOrient = text::RelOrientation::FRAME_RIGHT; } break; default: break; } } } /** calculate relative horizontal position @author OD */ SwTwips SwAnchoredObjectPosition::_CalcRelPosX( const SwFrm& _rHoriOrientFrm, const SwEnvironmentOfAnchoredObject& _rEnvOfObj, const SwFmtHoriOrient& _rHoriOrient, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, const bool _bObjWrapThrough, const SwTwips _nRelPosY, SwTwips& _roHoriOffsetToFrmAnchorPos ) const { // determine 'page' alignment layout frame const SwFrm& rPageAlignLayFrm = _rEnvOfObj.GetHoriEnvironmentLayoutFrm( _rHoriOrientFrm ); const bool bEvenPage = !rPageAlignLayFrm.OnRightPage(); const bool bToggle = _rHoriOrient.IsPosToggle() && bEvenPage; // determine orientation and relative alignment sal_Int16 eHoriOrient = _rHoriOrient.GetHoriOrient(); sal_Int16 eRelOrient = _rHoriOrient.GetRelationOrient(); // toggle orientation and relative alignment _ToggleHoriOrientAndAlign( bToggle, eHoriOrient, eRelOrient ); // determine alignment parameter // <nWidth>: 'width' of alignment area // <nOffset>: offset of alignment area, relative to 'left' of anchor frame SwTwips nWidth = 0; SwTwips nOffset = 0; bool bAlignedRelToPage = false; _GetHoriAlignmentValues( _rHoriOrientFrm, rPageAlignLayFrm, eRelOrient, _bObjWrapThrough, nWidth, nOffset, bAlignedRelToPage ); const SwFrm& rAnchorFrm = GetAnchorFrm(); SWRECTFN( (&_rHoriOrientFrm) ) SwTwips nObjWidth = (GetAnchoredObj().GetObjRect().*fnRect->fnGetWidth)(); SwTwips nRelPosX = nOffset; if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE ) { // 'manual' horizontal position const bool bR2L = rAnchorFrm.IsRightToLeft(); if( IsAnchoredToChar() && text::RelOrientation::CHAR == eRelOrient ) { if( bR2L ) nRelPosX -= _rHoriOrient.GetPos(); else nRelPosX += _rHoriOrient.GetPos(); } else if ( bToggle || ( !_rHoriOrient.IsPosToggle() && bR2L ) ) { // OD 04.08.2003 #110978# - correction: consider <nOffset> also for // toggling from left to right. nRelPosX += nWidth - nObjWidth - _rHoriOrient.GetPos(); } else { nRelPosX += _rHoriOrient.GetPos(); } } else if ( text::HoriOrientation::CENTER == eHoriOrient ) nRelPosX += (nWidth / 2) - (nObjWidth / 2); else if ( text::HoriOrientation::RIGHT == eHoriOrient ) nRelPosX += nWidth - ( nObjWidth + ( bVert ? _rULSpacing.GetLower() : _rLRSpacing.GetRight() ) ); else nRelPosX += bVert ? _rULSpacing.GetUpper() : _rLRSpacing.GetLeft(); // adjust relative position by distance between anchor frame and // the frame, the object is oriented at. if ( &rAnchorFrm != &_rHoriOrientFrm ) { SwTwips nLeftOrient = (_rHoriOrientFrm.Frm().*fnRect->fnGetLeft)(); SwTwips nLeftAnchor = (rAnchorFrm.Frm().*fnRect->fnGetLeft)(); nRelPosX += (*fnRect->fnXDiff)( nLeftOrient, nLeftAnchor ); } // OD 2004-05-21 #i28701# - deactivate follow code // // adjust relative horizontal position, if object is manual horizontal // // positioned (not 'page' aligned) and orients not at the anchor frame, // // but it overlaps anchor frame. // if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE && !bAlignedRelToPage && // &rAnchorFrm != &_rHoriOrientFrm ) // { // // E.g.: consider a columned page/section with an horizontal // // negative positioned object. // // OD 2004-03-23 #i26791# // const SwRect& rObjRect = GetAnchoredObj().GetObjRect(); // if( bVert ) // { // if( _rHoriOrientFrm.Frm().Top() > rAnchorFrm.Frm().Bottom() && // rObjRect.Right() > rAnchorFrm.Frm().Left() ) // { // const SwTwips nProposedPosX = nRelPosX + rAnchorFrm.Frm().Top(); // if ( nProposedPosX < rAnchorFrm.Frm().Bottom() ) // nRelPosX = rAnchorFrm.Frm().Height() + 1; // } // } // else // { // if( _rHoriOrientFrm.Frm().Left() > rAnchorFrm.Frm().Right() && // rObjRect.Top() < rAnchorFrm.Frm().Bottom() ) // { // // OD 04.08.2003 #110978# - correction: use <nRelPosX> // // instead of <aRelPos.X()> // const SwTwips nProposedPosX = nRelPosX + rAnchorFrm.Frm().Left(); // if ( nProposedPosX < rAnchorFrm.Frm().Right() ) // nRelPosX = rAnchorFrm.Frm().Width() + 1; // } // } // } // adjust calculated relative horizontal position, in order to // keep object inside 'page' alignment layout frame const SwFrm& rEnvironmentLayFrm = _rEnvOfObj.GetHoriEnvironmentLayoutFrm( _rHoriOrientFrm ); nRelPosX = _AdjustHoriRelPos( rEnvironmentLayFrm, nRelPosX ); // if object is a Writer fly frame and it's anchored to a content and // it is horizontal positioned left or right, but not relative to character, // it has to be drawn aside another object, which have the same horizontal // position and lay below it. if ( GetAnchoredObj().ISA(SwFlyFrm) && ( GetContact().ObjAnchoredAtPara() || GetContact().ObjAnchoredAtChar() ) && ( eHoriOrient == text::HoriOrientation::LEFT || eHoriOrient == text::HoriOrientation::RIGHT ) && eRelOrient != text::RelOrientation::CHAR ) { nRelPosX = _AdjustHoriRelPosForDrawAside( _rHoriOrientFrm, nRelPosX, _nRelPosY, eHoriOrient, eRelOrient, _rLRSpacing, _rULSpacing, bEvenPage ); } // --> OD 2004-06-17 #i26791# _roHoriOffsetToFrmAnchorPos = nOffset; return nRelPosX; } // ************************************************************************** // method incl. helper methods for adjusting proposed horizontal position, // if object has to draw aside another object. // ************************************************************************** /** adjust calculated horizontal position in order to draw object aside other objects with same positioning @author OD */ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside( const SwFrm& _rHoriOrientFrm, const SwTwips _nProposedRelPosX, const SwTwips _nRelPosY, const sal_Int16 _eHoriOrient, const sal_Int16 _eRelOrient, const SvxLRSpaceItem& _rLRSpacing, const SvxULSpaceItem& _rULSpacing, const bool _bEvenPage ) const { // OD 2004-03-23 #i26791# if ( !GetAnchorFrm().ISA(SwTxtFrm) || !GetAnchoredObj().ISA(SwFlyAtCntFrm) ) { ASSERT( false, "<SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(..) - usage for wrong anchor type" ); return _nProposedRelPosX; } const SwTxtFrm& rAnchorTxtFrm = static_cast<const SwTxtFrm&>(GetAnchorFrm()); // OD 2004-03-23 #i26791# const SwFlyAtCntFrm& rFlyAtCntFrm = static_cast<const SwFlyAtCntFrm&>(GetAnchoredObj()); const SwRect aObjBoundRect( GetAnchoredObj().GetObjRect() ); SWRECTFN( (&_rHoriOrientFrm) ) SwTwips nAdjustedRelPosX = _nProposedRelPosX; // determine proposed object bound rectangle Point aTmpPos = (rAnchorTxtFrm.Frm().*fnRect->fnGetPos)(); if( bVert ) { aTmpPos.X() -= _nRelPosY + aObjBoundRect.Width(); aTmpPos.Y() += nAdjustedRelPosX; } else { aTmpPos.X() += nAdjustedRelPosX; aTmpPos.Y() += _nRelPosY; } SwRect aTmpObjRect( aTmpPos, aObjBoundRect.SSize() ); const sal_uInt32 nObjOrdNum = GetObject().GetOrdNum(); const SwPageFrm* pObjPage = rFlyAtCntFrm.FindPageFrm(); const SwFrm* pObjContext = ::FindKontext( &rAnchorTxtFrm, FRM_COLUMN ); sal_uLong nObjIndex = rAnchorTxtFrm.GetTxtNode()->GetIndex(); SwOrderIter aIter( pObjPage, sal_True ); const SwFlyFrm* pFly = ((SwVirtFlyDrawObj*)aIter.Bottom())->GetFlyFrm(); while ( pFly && nObjOrdNum > pFly->GetVirtDrawObj()->GetOrdNumDirect() ) { if ( _DrawAsideFly( pFly, aTmpObjRect, pObjContext, nObjIndex, _bEvenPage, _eHoriOrient, _eRelOrient ) ) { if( bVert ) { const SvxULSpaceItem& rOtherUL = pFly->GetFmt()->GetULSpace(); const SwTwips nOtherTop = pFly->Frm().Top() - rOtherUL.GetUpper(); const SwTwips nOtherBot = pFly->Frm().Bottom() + rOtherUL.GetLower(); if ( nOtherTop <= aTmpObjRect.Bottom() + _rULSpacing.GetLower() && nOtherBot >= aTmpObjRect.Top() - _rULSpacing.GetUpper() ) { if ( _eHoriOrient == text::HoriOrientation::LEFT ) { SwTwips nTmp = nOtherBot + 1 + _rULSpacing.GetUpper() - rAnchorTxtFrm.Frm().Top(); if ( nTmp > nAdjustedRelPosX && rAnchorTxtFrm.Frm().Top() + nTmp + aObjBoundRect.Height() + _rULSpacing.GetLower() <= pObjPage->Frm().Height() + pObjPage->Frm().Top() ) { nAdjustedRelPosX = nTmp; } } else if ( _eHoriOrient == text::HoriOrientation::RIGHT ) { SwTwips nTmp = nOtherTop - 1 - _rULSpacing.GetLower() - aObjBoundRect.Height() - rAnchorTxtFrm.Frm().Top(); if ( nTmp < nAdjustedRelPosX && rAnchorTxtFrm.Frm().Top() + nTmp - _rULSpacing.GetUpper() >= pObjPage->Frm().Top() ) { nAdjustedRelPosX = nTmp; } } aTmpObjRect.Pos().Y() = rAnchorTxtFrm.Frm().Top() + nAdjustedRelPosX; } } else { const SvxLRSpaceItem& rOtherLR = pFly->GetFmt()->GetLRSpace(); const SwTwips nOtherLeft = pFly->Frm().Left() - rOtherLR.GetLeft(); const SwTwips nOtherRight = pFly->Frm().Right() + rOtherLR.GetRight(); if( nOtherLeft <= aTmpObjRect.Right() + _rLRSpacing.GetRight() && nOtherRight >= aTmpObjRect.Left() - _rLRSpacing.GetLeft() ) { if ( _eHoriOrient == text::HoriOrientation::LEFT ) { SwTwips nTmp = nOtherRight + 1 + _rLRSpacing.GetLeft() - rAnchorTxtFrm.Frm().Left(); if ( nTmp > nAdjustedRelPosX && rAnchorTxtFrm.Frm().Left() + nTmp + aObjBoundRect.Width() + _rLRSpacing.GetRight() <= pObjPage->Frm().Width() + pObjPage->Frm().Left() ) { nAdjustedRelPosX = nTmp; } } else if ( _eHoriOrient == text::HoriOrientation::RIGHT ) { SwTwips nTmp = nOtherLeft - 1 - _rLRSpacing.GetRight() - aObjBoundRect.Width() - rAnchorTxtFrm.Frm().Left(); if ( nTmp < nAdjustedRelPosX && rAnchorTxtFrm.Frm().Left() + nTmp - _rLRSpacing.GetLeft() >= pObjPage->Frm().Left() ) { nAdjustedRelPosX = nTmp; } } aTmpObjRect.Pos().X() = rAnchorTxtFrm.Frm().Left() + nAdjustedRelPosX; } } // end of <if (bVert)> } // end of <if _DrawAsideFly(..)> pFly = ((SwVirtFlyDrawObj*)aIter.Next())->GetFlyFrm(); } // end of <loop on fly frames return nAdjustedRelPosX; } /** detemine, if object has to draw aside given fly frame method used by <_AdjustHoriRelPosForDrawAside(..)> @author OD */ bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly, const SwRect& _rObjRect, const SwFrm* _pObjContext, const sal_uLong _nObjIndex, const bool _bEvenPage, const sal_Int16 _eHoriOrient, const sal_Int16 _eRelOrient ) const { bool bRetVal = false; SWRECTFN( (&GetAnchorFrm()) ) if ( _pFly->IsFlyAtCntFrm() && (_pFly->Frm().*fnRect->fnBottomDist)( (_rObjRect.*fnRect->fnGetTop)() ) < 0 && (_rObjRect.*fnRect->fnBottomDist)( (_pFly->Frm().*fnRect->fnGetTop)() ) < 0 && ::FindKontext( _pFly->GetAnchorFrm(), FRM_COLUMN ) == _pObjContext ) { sal_uLong nOtherIndex = static_cast<const SwTxtFrm*>(_pFly->GetAnchorFrm())->GetTxtNode()->GetIndex(); if( _nObjIndex >= nOtherIndex ) { const SwFmtHoriOrient& rHori = _pFly->GetFmt()->GetHoriOrient(); sal_Int16 eOtherRelOrient = rHori.GetRelationOrient(); if( text::RelOrientation::CHAR != eOtherRelOrient ) { sal_Int16 eOtherHoriOrient = rHori.GetHoriOrient(); _ToggleHoriOrientAndAlign( _bEvenPage && rHori.IsPosToggle(), eOtherHoriOrient, eOtherRelOrient ); if ( eOtherHoriOrient == _eHoriOrient && _Minor( _eRelOrient, eOtherRelOrient, text::HoriOrientation::LEFT == _eHoriOrient ) ) { bRetVal = true; } } } } return bRetVal; } /** determine, if object has to draw aside another object the different alignments of the objects determines, if one has to draw aside another one. Thus, the given alignment are checked against each other, which one has to be drawn aside the other one. depending on parameter _bLeft check is done for left or right positioning. method used by <_DrawAsideFly(..)> @author OD */ bool SwAnchoredObjectPosition::_Minor( sal_Int16 _eRelOrient1, sal_Int16 _eRelOrient2, bool _bLeft ) const { bool bRetVal; // draw aside order for left horizontal position //! one array entry for each value in text::RelOrientation static sal_uInt16 __READONLY_DATA aLeft[ 10 ] = { 5, 6, 0, 1, 8, 4, 7, 2, 3, 9 }; // draw aside order for right horizontal position //! one array entry for each value in text::RelOrientation static sal_uInt16 __READONLY_DATA aRight[ 10 ] = { 5, 6, 0, 8, 1, 7, 4, 2, 3, 9 }; // decide depending on given order, which frame has to draw aside another frame if( _bLeft ) bRetVal = aLeft[ _eRelOrient1 ] >= aLeft[ _eRelOrient2 ]; else bRetVal = aRight[ _eRelOrient1 ] >= aRight[ _eRelOrient2 ]; return bRetVal; }
39.3034
137
0.51982
[ "object" ]
addce405815b1bdc090b364c34c80d0eab03987b
3,696
hh
C++
include/sot/torque_control/torque-offset-estimator.hh
nim65s/sot-torque-control
0277baa065e6addf16df804676d47597cf1b4b06
[ "BSD-2-Clause" ]
6
2017-11-01T20:14:53.000Z
2020-04-03T04:51:07.000Z
include/sot/torque_control/torque-offset-estimator.hh
nim65s/sot-torque-control
0277baa065e6addf16df804676d47597cf1b4b06
[ "BSD-2-Clause" ]
52
2017-03-31T21:24:38.000Z
2021-11-03T08:27:46.000Z
include/sot/torque_control/torque-offset-estimator.hh
nim65s/sot-torque-control
0277baa065e6addf16df804676d47597cf1b4b06
[ "BSD-2-Clause" ]
14
2017-04-06T20:03:27.000Z
2020-07-28T14:20:42.000Z
/* * Copyright 2014-2017, Andrea Del Prete, Rohan Budhiraja LAAS-CNRS * */ #ifndef __sot_torque_control_TorqueOffsetEstimator_H__ #define __sot_torque_control_TorqueOffsetEstimator_H__ /* --------------------------------------------------------------------- */ /* --- API ------------------------------------------------------------- */ /* --------------------------------------------------------------------- */ #if defined(WIN32) #if defined(torque_offset_estimator_EXPORTS) #define TORQUEOFFSETESTIMATOR_EXPORT __declspec(dllexport) #else #define TORQUEOFFSETESTIMATOR_EXPORT __declspec(dllimport) #endif #else #define TORQUEOFFSETESTIMATOR_EXPORT #endif //#define VP_DEBUG 1 /// enable debug output //#define VP_DEBUG_MODE 20 /* --------------------------------------------------------------------- */ /* --- INCLUDE --------------------------------------------------------- */ /* --------------------------------------------------------------------- */ #include <boost/circular_buffer.hpp> #include <Eigen/StdVector> /*Motor model*/ #include <pinocchio/multibody/model.hpp> #include <pinocchio/parsers/urdf.hpp> #include <pinocchio/algorithm/rnea.hpp> #include <pinocchio/algorithm/kinematics.hpp> /* HELPER */ #include <dynamic-graph/signal-helper.h> #include <sot/core/matrix-geometry.hh> #include <sot/core/robot-utils.hh> #include <sot/core/stop-watch.hh> /*Motor model*/ #include <sot/torque_control/motor-model.hh> namespace dynamicgraph { namespace sot { namespace torque_control { class TORQUEOFFSETESTIMATOR_EXPORT TorqueOffsetEstimator : public ::dynamicgraph::Entity { DYNAMIC_GRAPH_ENTITY_DECL(); public: /* --- SIGNALS --- */ EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef int dummy; typedef std::vector<Eigen::VectorXd, Eigen::aligned_allocator<Eigen::VectorXd> > stdAlignedVector; /** --- CONSTRUCTOR ---- */ TorqueOffsetEstimator(const std::string& name); void init(const std::string& urdfFile, const Eigen::Matrix4d& _m_torso_X_imu, const double& gyro_epsilon, const std::string& ffJointName, const std::string& torsoJointName); void computeOffset(const int& nIterations, const double& epsilon); virtual void display(std::ostream& os) const; DECLARE_SIGNAL_IN(base6d_encoders, dynamicgraph::Vector); DECLARE_SIGNAL_IN(accelerometer, dynamicgraph::Vector); DECLARE_SIGNAL_IN(gyroscope, dynamicgraph::Vector); DECLARE_SIGNAL_IN(jointTorques, dynamicgraph::Vector); DECLARE_SIGNAL_INNER(collectSensorData, dummy); DECLARE_SIGNAL_OUT(jointTorquesEstimated, dynamicgraph::Vector); protected: RobotUtilShrPtr m_robot_util; pinocchio::Model m_model; /// Pinocchio robot model pinocchio::Data* m_data; /// Pinocchio robot data int n_iterations; // Number of iterations to consider double epsilon; double gyro_epsilon; pinocchio::JointIndex ffIndex, torsoIndex; // Index of the free-flyer and torso frames Eigen::VectorXd jointTorqueOffsets; pinocchio::SE3 m_torso_X_imu; // Definition of the imu in the chest frame. // stdAlignedVector encSignals; // stdAlignedVector accSignals; // stdAlignedVector gyrSignals; // stdAlignedVector tauSignals; // stdAlignedVector stdVecJointTorqueOffsets; void sendMsg(const std::string& msg, MsgType t = MSG_TYPE_INFO, const char* = "", int = 0) { logger_.stream(t) << ("[" + name + "] " + msg) << '\n'; } private: enum { PRECOMPUTATION, INPROGRESS, COMPUTED } sensor_offset_status; // void calculateSensorOffsets(); int current_progress; }; // class TorqueOffsetEstimator } // namespace torque_control } // namespace sot } // namespace dynamicgraph #endif // #ifndef __sot_torque_control_TorqueOffsetEstimator_H__
33.908257
107
0.669372
[ "geometry", "vector", "model" ]
ade0712e700331d15d7d980091caf5944b8f0dee
1,871
cpp
C++
TialVFS/src/Driver.cpp
mplucinski/TialVFS
79c7e62ea211cadeb2859f900e1383f14c5a37c5
[ "BSD-2-Clause" ]
null
null
null
TialVFS/src/Driver.cpp
mplucinski/TialVFS
79c7e62ea211cadeb2859f900e1383f14c5a37c5
[ "BSD-2-Clause" ]
null
null
null
TialVFS/src/Driver.cpp
mplucinski/TialVFS
79c7e62ea211cadeb2859f900e1383f14c5a37c5
[ "BSD-2-Clause" ]
null
null
null
#include "Driver.hpp" #include "Directory.hpp" #include "Exception.hpp" #include <TialUtility/TialUtility.hpp> #define TIAL_MODULE "Tial::VFS::Driver" void Tial::VFS::Driver::mark(const Path &path, std::function<void(const std::shared_ptr<Object> &)> function) { assert(!path.empty()); assert(path[0] == "/"); for(auto &i: mountPoints) { auto mountPoint = i.lock(); if(!mountPoint) THROW std::logic_error("Mount point is no longer available"); if(path.size() == 1) function(mountPoint); else function(mountPoint->get(path.subpath(1))); } } void Tial::VFS::Driver::markInvalid(const Path &path) { mark(path, [](const std::shared_ptr<Object> &object) { object->markInvalid(); }); } void Tial::VFS::Driver::markBroken(const Path &path) { mark(path, [](const std::shared_ptr<Object> &object) { object->markBroken(); }); } Tial::VFS::Driver::OpenFile::~OpenFile() {} Tial::VFS::Driver::MappedFile::~MappedFile() {} Tial::VFS::Driver::FileEntry::FileEntry(const std::string &fileName, bool directory): fileName(fileName), directory(directory) {} Tial::VFS::Driver::Driver(const std::string &name): name(name) {} Tial::VFS::Driver::~Driver() {} void Tial::VFS::Driver::registerMountPoint(const std::shared_ptr<Directory> &directory) { mountPoints.push_back(directory); } void Tial::VFS::Driver::unregisterMountPoint(const std::shared_ptr<Directory> &directory) { auto i = std::find_if(mountPoints.begin(), mountPoints.end(), [&directory](std::weak_ptr<Directory> &mountPoint)->bool{ return mountPoint.lock() == directory; }); if(i == mountPoints.end()) THROW Exceptions::NoMountPoint(directory->path()); mountPoints.erase(i); } Tial::Utility::Logger::Stream &Tial::VFS::operator<<( Tial::Utility::Logger::Stream &stream, const Tial::VFS::Driver &driver ) { stream << "VFS::Driver{" << driver.name << "}"; return stream; }
28.784615
120
0.692143
[ "object" ]
ade424c941c993bce9d4ea8e5943eb55817fe97f
1,305
cpp
C++
2. Рекуррентные соотношения/0.3. Порядок перемножения матриц #3537/[OK]217069.cpp
godnoTA/acm.bsu.by
3e1cf1c545c691de82b5e1d2e0768b41ea581734
[ "Unlicense" ]
19
2018-05-19T16:37:14.000Z
2022-03-23T20:13:43.000Z
2. Рекуррентные соотношения/0.3. Порядок перемножения матриц #3537/[OK]217069.cpp
godnoTA/acm.bsu.by
3e1cf1c545c691de82b5e1d2e0768b41ea581734
[ "Unlicense" ]
6
2020-05-07T21:06:48.000Z
2020-06-05T17:52:57.000Z
2. Рекуррентные соотношения/0.3. Порядок перемножения матриц #3537/[OK]217069.cpp
godnoTA/acm.bsu.by
3e1cf1c545c691de82b5e1d2e0768b41ea581734
[ "Unlicense" ]
31
2019-03-01T21:41:38.000Z
2022-03-27T17:56:39.000Z
#include <iostream> #include <fstream> #include <vector> int main() { std::ifstream in("input.txt"); size_t size; in >> size; std::vector<std::pair<size_t, size_t>> matrices; matrices.reserve(size); for (size_t i = 0; i < size; ++i) { size_t first, second; in >> first >> second; matrices.emplace_back(first, second); } std::vector<std::vector<int64_t >> dp(size, std::vector<int64_t>(size)); for (size_t amount = 1; amount < size; ++amount) { for (size_t i = 0; i + amount < size; ++i) { size_t j = i + amount; int64_t minMultiplications = INT64_MAX; size_t firstDimension = matrices[i].first; size_t secondDimension = matrices[j].second; for (size_t delimiter = i; delimiter < j; ++delimiter) { int64_t currentMultiplications = secondDimension * firstDimension * matrices[delimiter].second + dp[i][delimiter] + dp[delimiter+1][j]; if (currentMultiplications < minMultiplications) { minMultiplications = currentMultiplications; } } dp[i][j] = minMultiplications; } } std::ofstream out("output.txt"); out << dp[0][size-1]; return 0; }
34.342105
91
0.56092
[ "vector" ]
ade9402114ba4b1ea460f9d0709868566c806cce
936
cc
C++
CSE-1305/lab-exam/program_1.cc
imrande/university-courses
e10af95d1e6bfc2f0a0e467e732f9b39bf8d99c1
[ "MIT" ]
null
null
null
CSE-1305/lab-exam/program_1.cc
imrande/university-courses
e10af95d1e6bfc2f0a0e467e732f9b39bf8d99c1
[ "MIT" ]
null
null
null
CSE-1305/lab-exam/program_1.cc
imrande/university-courses
e10af95d1e6bfc2f0a0e467e732f9b39bf8d99c1
[ "MIT" ]
null
null
null
/* Multilevel Inheritance => when the process of single inheritance is extended up to minimum 2 levels, the concept is known as Multilevel Inheritance... */ // write a c++ program to add 2 integers multilevel inheritance #include <iostream> using namespace std; class A{ // Base class protected: // access specifier int number1; }; class B:public A { // derived class protected: // access specifier int number2; }; class C: public B { // derived class public: // access specifier void inputValue(){ // member function cout << "Enter the number: "; cin >> number1; cout << "Enter the another number: "; cin >> number2; } int displayValue(){ // member function return number1 + number2; } }; int main(){ C object_of_c; // object reference object_of_c.inputValue(); cout << "The Sum is " << object_of_c.displayValue() <<endl; }
24
125
0.63141
[ "object" ]
bc01b3247a555568821e19cfcceba21af39aafcd
1,410
cpp
C++
simulated/seven/pc.cpp
joaovicentesouto/INE5452
4813630b303a9c6dbd4fb14fae0fb3b850e1aea3
[ "MIT" ]
null
null
null
simulated/seven/pc.cpp
joaovicentesouto/INE5452
4813630b303a9c6dbd4fb14fae0fb3b850e1aea3
[ "MIT" ]
null
null
null
simulated/seven/pc.cpp
joaovicentesouto/INE5452
4813630b303a9c6dbd4fb14fae0fb3b850e1aea3
[ "MIT" ]
null
null
null
#include <iostream> #include <string> #include <vector> using namespace std; void kmp_table(string &w, vector<int> &t) { int pos = 1; int cnd = 0; t[0] = -1; while (pos < w.size()) { if (w[pos] == w[cnd]) t[pos] = t[cnd]; else { t[pos] = cnd; cnd = t[cnd]; while (cnd >= 0 && w[pos] != w[cnd]) cnd = t[cnd]; } pos++; cnd++; } t[pos] = cnd; } int kmp_search(string &s, string &w, vector<int> &T) { int j = 0; int k = 0; int nP = 0; while (j < s.size()) { if (w[k] == s[j]) { j++; k++; if (k == w.size()) { s = s.substr(0, j-w.size()) + s.substr(j); return 1; } } else { k = T[k]; if (k < 0) { j++; k++; } } } return 0; } int main() { while (true) { int n, m; cin >> n >> m; if (!n && !m) break; vector<string> Ws(n); vector<vector<int>> Ts; for (int i = 0; i < n; ++i) { cin >> Ws[i]; Ts.push_back(vector<int>(Ws.size())); kmp_table(Ws[i], Ts[i]); } int count = 0; while (m--) { string line; cin >> ws; getline(cin, line); cin >> ws; bool still_cleaning = true; while (still_cleaning && !line.empty()) { int local_count = 0; for (int i = 0; i < Ws.size(); ++i) local_count += kmp_search(line, Ws[i], Ts[i]); still_cleaning = (local_count != 0); count += local_count; } } cout << count << endl; } return 0; }
12.26087
52
0.474468
[ "vector" ]
bc098280eeb9181f9a5934b387568cc588785352
25,714
cpp
C++
source/Ragdoll.cpp
Slin/Project-Sacrifice
805b895b819dd980cf2e73c88c9c8dd1c1f42068
[ "MIT" ]
1
2018-01-01T15:17:21.000Z
2018-01-01T15:17:21.000Z
source/Ragdoll.cpp
Slin/Project-Sacrifice
805b895b819dd980cf2e73c88c9c8dd1c1f42068
[ "MIT" ]
null
null
null
source/Ragdoll.cpp
Slin/Project-Sacrifice
805b895b819dd980cf2e73c88c9c8dd1c1f42068
[ "MIT" ]
null
null
null
// // Created by gclmini-06 on 07.11.2015. // #include "Ragdoll.h" #include <iostream> namespace PS { Ragdoll::Ragdoll(sf::Vector2f vec){ float density=2.0f; float friction = 0.3f; position=vec; //position.x =600;// rand() % World::GetInstance()->GetWindow()->getSize().x/2+100; //position.y = rand() % 100; sf::Vector2f tempVec; //_shape_torso = new sf::Sprite(); _shape_torso = new sf::Sprite(); _shape_torso->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Koerper.png"),true); _shape_torso->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_torso->getGlobalBounds().width; tempVec.y=_shape_torso->getGlobalBounds().height; _shape_torso->setOrigin(tempVec/2.0f); _shape_head = new sf::Sprite(); _shape_head->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Head_02.png"),true); _shape_head->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_head->getGlobalBounds().width; tempVec.y=_shape_head->getGlobalBounds().height; _shape_head->setOrigin(tempVec/2.0f); _shape_arm_left = new sf::Sprite(); _shape_arm_left->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Oberarm.png"),true); _shape_arm_left->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_arm_left->getGlobalBounds().width; tempVec.y=_shape_arm_left->getGlobalBounds().height; _shape_arm_left->setOrigin(tempVec/2.0f); _shape_arm_left2 = new sf::Sprite(); _shape_arm_left2->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Unterarm.png"),true); _shape_arm_left2->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_arm_left2->getGlobalBounds().width; tempVec.y=_shape_arm_left2->getGlobalBounds().height; _shape_arm_left2->setOrigin(tempVec/2.0f); _shape_arm_right = new sf::Sprite(); _shape_arm_right->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Oberarm.png"),true); _shape_arm_right->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_arm_right->getGlobalBounds().width; tempVec.y=_shape_arm_right->getGlobalBounds().height; _shape_arm_right->setOrigin(tempVec/2.0f); _shape_arm_right2 = new sf::Sprite(); _shape_arm_right2->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Unterarm.png"),true); _shape_arm_right2->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_arm_right2->getGlobalBounds().width; tempVec.y=_shape_arm_right2->getGlobalBounds().height; _shape_arm_right2->setOrigin(tempVec/2.0f); _shape_leg_left = new sf::Sprite(); _shape_leg_left->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Oberschenkel.png"),true); _shape_leg_left->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_leg_left->getGlobalBounds().width; tempVec.y=_shape_leg_left->getGlobalBounds().height; _shape_leg_left->setOrigin(tempVec/2.0f); _shape_leg_left2 = new sf::Sprite(); _shape_leg_left2->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Unterschenkel.png"),true); _shape_leg_left2->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_leg_left2->getGlobalBounds().width; tempVec.y=_shape_leg_left2->getGlobalBounds().height; _shape_leg_left2->setOrigin(tempVec/2.0f); _shape_leg_right = new sf::Sprite(); _shape_leg_right->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Oberschenkel.png"),true); _shape_leg_right->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_leg_right->getGlobalBounds().width; tempVec.y=_shape_leg_right->getGlobalBounds().height; _shape_leg_right->setOrigin(tempVec/2.0f); _shape_leg_right2 = new sf::Sprite(); _shape_leg_right2->setTexture(*TexturePool::GetInstance()->GetTexture("assets/textures/Opfer_puppet_Unterschenkel.png"),true); _shape_leg_right2->setScale(World::GetInstance()->GetScaleFactor(),World::GetInstance()->GetScaleFactor()); tempVec.x=_shape_leg_right2->getGlobalBounds().width; tempVec.y=_shape_leg_right2->getGlobalBounds().height; _shape_leg_right2->setOrigin(tempVec/2.0f); //b2d torso _bodyDef_torso.type = b2_dynamicBody; _bodyDef_torso.position.Set( position.x*World::WORLD_TO_BOX2D, position.y*World::WORLD_TO_BOX2D); _bodyDef_torso.angle=90*DEGTORAD; _body_torso = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_torso); b2PolygonShape dynamicBox; dynamicBox.SetAsBox((_shape_torso->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_torso->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); b2FixtureDef fixtureDef; fixtureDef.shape = &dynamicBox; fixtureDef.density = density; fixtureDef.friction = friction; _body_torso->CreateFixture(&fixtureDef); //b2d head _bodyDef_head.type = b2_dynamicBody; _bodyDef_head.position.Set( (position.x+_shape_head->getGlobalBounds().width)*World::WORLD_TO_BOX2D, position.y*World::WORLD_TO_BOX2D); _bodyDef_head.angle = 90*DEGTORAD; _body_head = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_head); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_head->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_head->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDef.shape = &dynamicBox; fixtureDef.density = density*.5f; fixtureDef.friction = friction; _body_head->CreateFixture(&fixtureDef); //b2d arm _bodyDef_arm_left.type = b2_dynamicBody; _bodyDef_arm_left.position.Set( (position.x)*World::WORLD_TO_BOX2D, (position.y+_shape_torso->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); _bodyDef_arm_left.angle = 90*DEGTORAD; _body_arm_left = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_arm_left); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_arm_left->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_arm_left->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDef.shape = &dynamicBox; fixtureDef.density = density; fixtureDef.friction = friction; _body_arm_left->CreateFixture(&fixtureDef); //b2d arm left2 _bodyDef_arm_left2.type = b2_dynamicBody; _bodyDef_arm_left2.position.Set( _bodyDef_arm_left.position.x, _bodyDef_arm_left.position.y ); _bodyDef_arm_left2.angle = 90*DEGTORAD; _body_arm_left2 = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_arm_left2); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_arm_left2->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_arm_left2->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); b2FixtureDef fixtureDefhead2; fixtureDefhead2.shape = &dynamicBox; fixtureDefhead2.density = density; fixtureDefhead2.friction = .8f; fixtureDefhead2.filter.maskBits=0; _body_arm_left2->CreateFixture(&fixtureDefhead2); //b2d arm right _bodyDef_arm_right.type = b2_dynamicBody; _bodyDef_arm_right.position.Set( (position.x)*World::WORLD_TO_BOX2D, (position.y-_shape_torso->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D); _bodyDef_arm_right.angle = 90*DEGTORAD; _body_arm_right = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_arm_right); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_arm_right->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_arm_right->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDef.shape = &dynamicBox; fixtureDef.density = density; fixtureDef.friction = friction; _body_arm_right->CreateFixture(&fixtureDef); //b2d arm right2 _bodyDef_arm_right2.type = b2_dynamicBody; _bodyDef_arm_right2.position.Set( _bodyDef_arm_right.position.x, _bodyDef_arm_right.position.y ); _bodyDef_arm_right2.angle = 90*DEGTORAD; _body_arm_right2 = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_arm_right2); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_arm_right2->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_arm_right2->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDefhead2.shape = &dynamicBox; fixtureDefhead2.density = density; fixtureDefhead2.friction = .8f; fixtureDefhead2.filter.maskBits=0; _body_arm_right2->CreateFixture(&fixtureDefhead2); // b2d leg left _bodyDef_leg_left.type = b2_dynamicBody; _bodyDef_leg_left.position.Set( (position.x-_shape_leg_left->getGlobalBounds().width*2)*World::WORLD_TO_BOX2D, (position.y)*World::WORLD_TO_BOX2D); _bodyDef_leg_left.angle = 90*DEGTORAD; _body_leg_left = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_leg_left); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_leg_left->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_leg_left->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDef.shape = &dynamicBox; fixtureDef.density = density; fixtureDef.friction = friction; _body_leg_left->CreateFixture(&fixtureDef); // b2d leg left2 _bodyDef_leg_left2.type = b2_dynamicBody; _bodyDef_leg_left2.position.Set( _bodyDef_leg_left.position.x-_shape_leg_left2->getGlobalBounds().width*World::WORLD_TO_BOX2D, _bodyDef_leg_left.position.y ); _bodyDef_leg_left.angle = 90*DEGTORAD; _body_leg_left2 = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_leg_left2); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox( (_shape_leg_left2->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_leg_left2->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDefhead2.shape = &dynamicBox; fixtureDefhead2.density = density; fixtureDefhead2.friction = .8f; fixtureDefhead2.filter.maskBits=0; _body_leg_left2->CreateFixture(&fixtureDefhead2); //b2d leg right _bodyDef_leg_right.type = b2_dynamicBody; _bodyDef_leg_right.position.Set( (position.x-_shape_leg_right->getGlobalBounds().width*2)*World::WORLD_TO_BOX2D, (position.y)*World::WORLD_TO_BOX2D); _bodyDef_leg_right.angle = 90*DEGTORAD; _body_leg_right = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_leg_right); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_leg_right->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_leg_right->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDef.shape = &dynamicBox; fixtureDef.density = density; fixtureDef.friction = friction; _body_leg_right->CreateFixture(&fixtureDef); //b2d leg right2 _bodyDef_leg_right2.type = b2_dynamicBody; _bodyDef_leg_right2.position.Set( _bodyDef_leg_right.position.x-_shape_leg_right->getGlobalBounds().width*World::WORLD_TO_BOX2D, _bodyDef_leg_right.position.y ); _bodyDef_leg_right2.angle = 90*DEGTORAD; _body_leg_right2 = World::GetInstance()->GetPhysicsWorld()->CreateBody(&_bodyDef_leg_right2); //b2PolygonShape dynamicBox2; dynamicBox.SetAsBox((_shape_leg_right2->getGlobalBounds().width/2.0f)*World::WORLD_TO_BOX2D, (_shape_leg_right2->getGlobalBounds().height/2.0f)*World::WORLD_TO_BOX2D); //b2FixtureDef fixtureDefhead; fixtureDefhead2.shape = &dynamicBox; fixtureDefhead2.density = density; fixtureDefhead2.friction = .8f; fixtureDefhead2.filter.maskBits=0; _body_leg_right2->CreateFixture(&fixtureDefhead2); //joints ////////////////////////////// b2RevoluteJointDef headJointDef = getDefGetJointDef( _body_torso,_body_head, 0, -_shape_torso->getGlobalBounds().height/3.f, _shape_head->getGlobalBounds().width/6.f, _shape_head->getGlobalBounds().height/3.f); headJointDef.enableLimit = true; headJointDef.lowerAngle = 00 * DEGTORAD; headJointDef.upperAngle = 180 * DEGTORAD; _head_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&headJointDef); b2RevoluteJointDef armLeftJointDef = getDefGetJointDef( _body_torso,_body_arm_left, _shape_torso->getGlobalBounds().width/4.f, -_shape_torso->getGlobalBounds().height/4.f, 0, -_shape_arm_left->getGlobalBounds().height/3.5f); _arm_left_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&armLeftJointDef); b2RevoluteJointDef armleft2JointDef = getDefGetJointDef( _body_arm_left,_body_arm_left2, 0, _shape_arm_left->getGlobalBounds().height/2.f, _shape_arm_left2->getGlobalBounds().width/4.f, -_shape_arm_left2->getGlobalBounds().height/2.3f); armleft2JointDef.enableLimit = true; armleft2JointDef.lowerAngle = 0 * DEGTORAD; armleft2JointDef.upperAngle = 160 * DEGTORAD; _arm_left2_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&armleft2JointDef); b2RevoluteJointDef armRightJointDef = getDefGetJointDef( _body_torso,_body_arm_right, _shape_torso->getGlobalBounds().width/4.f, -_shape_torso->getGlobalBounds().height/4.f, 0, -_shape_arm_right->getGlobalBounds().height/3.5f); _arm_right_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&armRightJointDef); b2RevoluteJointDef armright2JointDef = getDefGetJointDef( _body_arm_right,_body_arm_right2, 0, _shape_arm_right->getGlobalBounds().height/2.f, _shape_arm_right2->getGlobalBounds().width/4.f, -_shape_arm_right2->getGlobalBounds().height/2.3f); armright2JointDef.enableLimit = true; armright2JointDef.lowerAngle = 0 * DEGTORAD; armright2JointDef.upperAngle = 160 * DEGTORAD; _arm_right2_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&armright2JointDef); b2RevoluteJointDef legLeftJointDef = getDefGetJointDef( _body_torso,_body_leg_left, 0, _shape_torso->getGlobalBounds().height/2.f, 0, -_shape_leg_left->getGlobalBounds().height/3.0f); legLeftJointDef.enableLimit = true; legLeftJointDef.lowerAngle = -90 * DEGTORAD; legLeftJointDef.upperAngle = 160 * DEGTORAD; _leg_left_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&legLeftJointDef); b2RevoluteJointDef legleft2JointDef = getDefGetJointDef( _body_leg_left,_body_leg_left2, -5*World::GetInstance()->GetScaleFactor(), _shape_leg_left->getGlobalBounds().height/2.f -4*World::GetInstance()->GetScaleFactor(), 0, -_shape_leg_left2->getGlobalBounds().height/2.0f+12*World::GetInstance()->GetScaleFactor()); legleft2JointDef.enableLimit = true; legleft2JointDef.lowerAngle = -90 * DEGTORAD; legleft2JointDef.upperAngle = 0 * DEGTORAD; _leg_left2_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&legleft2JointDef); b2RevoluteJointDef legRightJointDef = getDefGetJointDef( _body_torso,_body_leg_right, 0, _shape_torso->getGlobalBounds().height/2.f, 0, -_shape_leg_right->getGlobalBounds().height/3.0f); legRightJointDef.enableLimit = true; legRightJointDef.lowerAngle = -90 * DEGTORAD; legRightJointDef.upperAngle = 160 * DEGTORAD; _leg_right_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&legRightJointDef); b2RevoluteJointDef legright2JointDef = getDefGetJointDef( _body_leg_right,_body_leg_right2, -5*World::GetInstance()->GetScaleFactor(), _shape_leg_right->getGlobalBounds().height/2.f -4*World::GetInstance()->GetScaleFactor(), 0, -_shape_leg_right2->getGlobalBounds().height/2.0f+12*World::GetInstance()->GetScaleFactor()); legright2JointDef.enableLimit = true; legright2JointDef.lowerAngle = -90 * DEGTORAD; legright2JointDef.upperAngle = 0 * DEGTORAD; _leg_right2_joint = (b2RevoluteJoint*) World::GetInstance()->GetPhysicsWorld()->CreateJoint(&legright2JointDef); //SetStiff(true,0); //_body_torso->SetTransform(_body_torso->GetPosition(),-90*DEGTORAD); //_body_torso->SetAngularVelocity(0); //SetStiff(false,0); b2Vec2 forceVec; float rnd = (rand()/(float)RAND_MAX); forceVec.Set((rnd>.5f?-1:1)*20*(.5f+rnd),-35.f); _body_torso->ApplyLinearImpulse (forceVec,_body_torso->GetPosition(), true); } void Ragdoll::GetFixtureDef(b2FixtureDef& fixtureDef,b2PolygonShape& dynamicShape, sf::Sprite *shape, float32 density, float32 friction) { b2PolygonShape dynamicBox; dynamicBox.SetAsBox(shape->getGlobalBounds().width, shape->getGlobalBounds().height); //dynamicBox.SetAsBox(50.0f, 50.0f); fixtureDef.shape = &dynamicBox; fixtureDef.density = density; fixtureDef.friction = friction; //return fixtureDef; } b2RevoluteJointDef Ragdoll::getDefGetJointDef(b2Body *bodyA, b2Body *bodyB, float32 anchorAX, float32 anchorAY, float32 anchorBX, float32 anchorBY) const { b2RevoluteJointDef revoluteJointDef; revoluteJointDef.bodyA = bodyA; revoluteJointDef.bodyB = bodyB; revoluteJointDef.collideConnected = false; revoluteJointDef.localAnchorA.Set(anchorAX*World::WORLD_TO_BOX2D,anchorAY*World::WORLD_TO_BOX2D);//the top right corner of the box revoluteJointDef.localAnchorB.Set(anchorBX*World::WORLD_TO_BOX2D,anchorBY*World::WORLD_TO_BOX2D);//center of the circle return revoluteJointDef; } Ragdoll::~Ragdoll() { World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_head_joint ); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_arm_left_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_arm_right_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_leg_left_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_leg_right_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_arm_left2_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_arm_right2_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_leg_left2_joint); World::GetInstance()->GetPhysicsWorld()->DestroyJoint(_leg_right2_joint); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_head ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_torso ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_arm_left ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_arm_right ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_leg_left ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_leg_right ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_arm_left2); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_arm_right2 ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_leg_left2 ); World::GetInstance()->GetPhysicsWorld()->DestroyBody( _body_leg_right2 ); delete _head_joint; delete _arm_left_joint; delete _arm_right_joint; delete _leg_left_joint; delete _leg_right_joint; delete _arm_left2_joint; delete _arm_right2_joint; delete _leg_left2_joint; delete _leg_right2_joint; delete _shape_torso; delete _shape_head; delete _shape_arm_left; delete _shape_arm_right; delete _shape_leg_left; delete _shape_leg_right; delete _shape_arm_left2; delete _shape_arm_right2; delete _shape_leg_left2; delete _shape_leg_right2; } void Ragdoll::Update(float timeStep) { b2Vec2 position = _body_torso->GetPosition(); float32 angle = _body_torso->GetAngle(); _shape_torso->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_torso->setRotation(angle*180/3.14f); position = _body_head->GetPosition(); angle = _body_head->GetAngle(); _shape_head->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_head->setRotation(angle*180/3.14f); position = _body_arm_left->GetPosition(); angle = _body_arm_left->GetAngle(); _shape_arm_left->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_arm_left->setRotation(angle*180/3.14f); position = _body_arm_right->GetPosition(); angle = _body_arm_right->GetAngle(); _shape_arm_right->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_arm_right->setRotation(angle*180/3.14f); position = _body_leg_left->GetPosition(); angle = _body_leg_left->GetAngle(); _shape_leg_left->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_leg_left->setRotation(angle*180/3.14f); position = _body_leg_right->GetPosition(); angle = _body_leg_right->GetAngle(); _shape_leg_right->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_leg_right->setRotation(angle*180/3.14f); position = _body_arm_left2->GetPosition(); angle = _body_arm_left2->GetAngle(); _shape_arm_left2->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_arm_left2->setRotation(angle*180/3.14f); position = _body_arm_right2->GetPosition(); angle = _body_arm_right2->GetAngle(); _shape_arm_right2->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_arm_right2->setRotation(angle*180/3.14f); position = _body_leg_left2->GetPosition(); angle = _body_leg_left2->GetAngle(); _shape_leg_left2->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_leg_left2->setRotation(angle*180/3.14f); position = _body_leg_right2->GetPosition(); angle = _body_leg_right2->GetAngle(); _shape_leg_right2->setPosition(position.x/World::WORLD_TO_BOX2D, position.y/World::WORLD_TO_BOX2D); _shape_leg_right2->setRotation(angle*180/3.14f); // CheckBreakForce(_head_joint,timeStep); // CheckBreakForce(_arm_left_joint,timeStep); // CheckBreakForce(_arm_right_joint,timeStep); if(!headJointDetached){ headJointDetached=CheckBreakForce(_head_joint,timeStep); } if(!armLJointDetached){ armLJointDetached=CheckBreakForce(_arm_left_joint,timeStep); } if(!armRJointDetached){ armRJointDetached=CheckBreakForce(_arm_right_joint,timeStep); } if(!legLJointDetached){ legLJointDetached=CheckBreakForce(_leg_left_joint,timeStep); } if(!legRJointDetached){ legRJointDetached=CheckBreakForce(_leg_right_joint,timeStep); } // CheckBreakForce(_leg_right_joint,timeStep); } bool Ragdoll::CheckBreakForce(b2RevoluteJoint* joint,float timeStep) { if(joint!=NULL) { reactionForce = joint->GetReactionForce(1 / timeStep); float forceModuleSq = reactionForce.LengthSquared(); if(forceModuleSq > 45000 && forceModuleSq< 50000) { World::GetInstance()->GetPhysicsWorld()->DestroyJoint(joint); return true; } } return false; } void Ragdoll::Draw(sf::RenderWindow *window) { window->draw(*_shape_arm_left2); window->draw(*_shape_arm_left); window->draw(*_shape_leg_left2); window->draw(*_shape_leg_left); window->draw(*_shape_head); window->draw(*_shape_torso); window->draw(*_shape_leg_right2); window->draw(*_shape_leg_right); window->draw(*_shape_arm_right2); window->draw(*_shape_arm_right); } void Ragdoll::SetStiff(bool enable,float32 limit) { if(enable){ _body_head->SetType(b2_kinematicBody); _body_torso->SetType(b2_kinematicBody); _body_arm_left->SetType(b2_kinematicBody); _body_arm_right->SetType(b2_kinematicBody); _body_leg_left->SetType(b2_kinematicBody); _body_leg_right->SetType(b2_kinematicBody); _body_arm_left2->SetType(b2_kinematicBody); _body_arm_right2->SetType(b2_kinematicBody); _body_leg_left2->SetType(b2_kinematicBody); _body_leg_right2->SetType(b2_kinematicBody); _head_joint->SetLimits(limit,limit); _arm_left_joint->EnableLimit(true); _arm_left_joint->SetLimits(limit,limit); _arm_left2_joint->SetLimits(limit,limit); _arm_right_joint->EnableLimit(true); _arm_right_joint->SetLimits(limit,limit); _arm_right2_joint->SetLimits(limit,limit); _leg_left_joint->SetLimits(limit,limit); _leg_left2_joint->SetLimits(limit,limit); _leg_right_joint->SetLimits(limit,limit); _leg_right2_joint->SetLimits(limit,limit); } else { _head_joint->SetLimits(-90 * DEGTORAD,90 * DEGTORAD); _arm_left_joint->EnableLimit(false); _arm_left2_joint->SetLimits(0*DEGTORAD,160*DEGTORAD); _arm_right_joint->EnableLimit(false); _arm_right2_joint->SetLimits(0*DEGTORAD,160*DEGTORAD); _leg_left_joint->SetLimits(-90 * DEGTORAD,160*DEGTORAD); _leg_left2_joint->SetLimits(-90 * DEGTORAD,0*DEGTORAD); _leg_right_joint->SetLimits(-90 * DEGTORAD,160*DEGTORAD); _leg_right2_joint->SetLimits(-90 * DEGTORAD,0*DEGTORAD); _body_head->SetType(b2_dynamicBody); _body_torso->SetType(b2_dynamicBody); _body_arm_left->SetType(b2_dynamicBody); _body_arm_right->SetType(b2_dynamicBody); _body_leg_left->SetType(b2_dynamicBody); _body_leg_right->SetType(b2_dynamicBody); _body_arm_left2->SetType(b2_dynamicBody); _body_arm_right2->SetType(b2_dynamicBody); _body_leg_left2->SetType(b2_dynamicBody); _body_leg_right2->SetType(b2_dynamicBody); } _head_joint; _arm_left_joint; _arm_right_joint; _leg_left_joint; _leg_right_joint; _arm_left2_joint; _arm_right2_joint; _leg_left2_joint; _leg_right2_joint; } }
40.304075
169
0.76612
[ "shape" ]
bc0db67330adb1af22725cb823398fdc5375196f
18,120
cpp
C++
thrift/gen-cpp/common_types.cpp
pspringer/AlluxioWorker
df07f554449c91b1e0f70abe2317b76903f97545
[ "Apache-2.0" ]
null
null
null
thrift/gen-cpp/common_types.cpp
pspringer/AlluxioWorker
df07f554449c91b1e0f70abe2317b76903f97545
[ "Apache-2.0" ]
null
null
null
thrift/gen-cpp/common_types.cpp
pspringer/AlluxioWorker
df07f554449c91b1e0f70abe2317b76903f97545
[ "Apache-2.0" ]
null
null
null
/** * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #include "common_types.h" #include <algorithm> #include <ostream> #include <thrift/TToString.h> int _kCommandTypeValues[] = { CommandType::Unknown, CommandType::Nothing, CommandType::Register, CommandType::Free, CommandType::Delete, CommandType::Persist }; const char* _kCommandTypeNames[] = { "Unknown", "Nothing", "Register", "Free", "Delete", "Persist" }; const std::map<int, const char*> _CommandType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kCommandTypeValues, _kCommandTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _kTTtlActionValues[] = { TTtlAction::Delete, TTtlAction::Free }; const char* _kTTtlActionNames[] = { "Delete", "Free" }; const std::map<int, const char*> _TTtlAction_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kTTtlActionValues, _kTTtlActionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); WorkerNetAddress::~WorkerNetAddress() throw() { } void WorkerNetAddress::__set_host(const std::string& val) { this->host = val; } void WorkerNetAddress::__set_rpcPort(const int32_t val) { this->rpcPort = val; } void WorkerNetAddress::__set_dataPort(const int32_t val) { this->dataPort = val; } void WorkerNetAddress::__set_webPort(const int32_t val) { this->webPort = val; } uint32_t WorkerNetAddress::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->host); this->__isset.host = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->rpcPort); this->__isset.rpcPort = true; } else { xfer += iprot->skip(ftype); } break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->dataPort); this->__isset.dataPort = true; } else { xfer += iprot->skip(ftype); } break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->webPort); this->__isset.webPort = true; } else { xfer += iprot->skip(ftype); } break; default: xfer += iprot->skip(ftype); break; } xfer += iprot->readFieldEnd(); } xfer += iprot->readStructEnd(); return xfer; } uint32_t WorkerNetAddress::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("WorkerNetAddress"); xfer += oprot->writeFieldBegin("host", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->host); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("rpcPort", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->rpcPort); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("dataPort", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32(this->dataPort); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("webPort", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->webPort); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } void swap(WorkerNetAddress &a, WorkerNetAddress &b) { using ::std::swap; swap(a.host, b.host); swap(a.rpcPort, b.rpcPort); swap(a.dataPort, b.dataPort); swap(a.webPort, b.webPort); swap(a.__isset, b.__isset); } WorkerNetAddress::WorkerNetAddress(const WorkerNetAddress& other0) { host = other0.host; rpcPort = other0.rpcPort; dataPort = other0.dataPort; webPort = other0.webPort; __isset = other0.__isset; } WorkerNetAddress& WorkerNetAddress::operator=(const WorkerNetAddress& other1) { host = other1.host; rpcPort = other1.rpcPort; dataPort = other1.dataPort; webPort = other1.webPort; __isset = other1.__isset; return *this; } void WorkerNetAddress::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "WorkerNetAddress("; out << "host=" << to_string(host); out << ", " << "rpcPort=" << to_string(rpcPort); out << ", " << "dataPort=" << to_string(dataPort); out << ", " << "webPort=" << to_string(webPort); out << ")"; } BlockInfo::~BlockInfo() throw() { } void BlockInfo::__set_blockId(const int64_t val) { this->blockId = val; } void BlockInfo::__set_length(const int64_t val) { this->length = val; } void BlockInfo::__set_locations(const std::vector<BlockLocation> & val) { this->locations = val; } uint32_t BlockInfo::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->blockId); this->__isset.blockId = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->length); this->__isset.length = true; } else { xfer += iprot->skip(ftype); } break; case 3: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->locations.clear(); uint32_t _size2; ::apache::thrift::protocol::TType _etype5; xfer += iprot->readListBegin(_etype5, _size2); this->locations.resize(_size2); uint32_t _i6; for (_i6 = 0; _i6 < _size2; ++_i6) { xfer += this->locations[_i6].read(iprot); } xfer += iprot->readListEnd(); } this->__isset.locations = true; } else { xfer += iprot->skip(ftype); } break; default: xfer += iprot->skip(ftype); break; } xfer += iprot->readFieldEnd(); } xfer += iprot->readStructEnd(); return xfer; } uint32_t BlockInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("BlockInfo"); xfer += oprot->writeFieldBegin("blockId", ::apache::thrift::protocol::T_I64, 1); xfer += oprot->writeI64(this->blockId); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("length", ::apache::thrift::protocol::T_I64, 2); xfer += oprot->writeI64(this->length); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("locations", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->locations.size())); std::vector<BlockLocation> ::const_iterator _iter7; for (_iter7 = this->locations.begin(); _iter7 != this->locations.end(); ++_iter7) { xfer += (*_iter7).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } void swap(BlockInfo &a, BlockInfo &b) { using ::std::swap; swap(a.blockId, b.blockId); swap(a.length, b.length); swap(a.locations, b.locations); swap(a.__isset, b.__isset); } BlockInfo::BlockInfo(const BlockInfo& other8) { blockId = other8.blockId; length = other8.length; locations = other8.locations; __isset = other8.__isset; } BlockInfo& BlockInfo::operator=(const BlockInfo& other9) { blockId = other9.blockId; length = other9.length; locations = other9.locations; __isset = other9.__isset; return *this; } void BlockInfo::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "BlockInfo("; out << "blockId=" << to_string(blockId); out << ", " << "length=" << to_string(length); out << ", " << "locations=" << to_string(locations); out << ")"; } BlockLocation::~BlockLocation() throw() { } void BlockLocation::__set_workerId(const int64_t val) { this->workerId = val; } void BlockLocation::__set_workerAddress(const WorkerNetAddress& val) { this->workerAddress = val; } void BlockLocation::__set_tierAlias(const std::string& val) { this->tierAlias = val; } uint32_t BlockLocation::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->workerId); this->__isset.workerId = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->workerAddress.read(iprot); this->__isset.workerAddress = true; } else { xfer += iprot->skip(ftype); } break; case 3: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tierAlias); this->__isset.tierAlias = true; } else { xfer += iprot->skip(ftype); } break; default: xfer += iprot->skip(ftype); break; } xfer += iprot->readFieldEnd(); } xfer += iprot->readStructEnd(); return xfer; } uint32_t BlockLocation::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("BlockLocation"); xfer += oprot->writeFieldBegin("workerId", ::apache::thrift::protocol::T_I64, 1); xfer += oprot->writeI64(this->workerId); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("workerAddress", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->workerAddress.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tierAlias", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->tierAlias); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } void swap(BlockLocation &a, BlockLocation &b) { using ::std::swap; swap(a.workerId, b.workerId); swap(a.workerAddress, b.workerAddress); swap(a.tierAlias, b.tierAlias); swap(a.__isset, b.__isset); } BlockLocation::BlockLocation(const BlockLocation& other10) { workerId = other10.workerId; workerAddress = other10.workerAddress; tierAlias = other10.tierAlias; __isset = other10.__isset; } BlockLocation& BlockLocation::operator=(const BlockLocation& other11) { workerId = other11.workerId; workerAddress = other11.workerAddress; tierAlias = other11.tierAlias; __isset = other11.__isset; return *this; } void BlockLocation::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "BlockLocation("; out << "workerId=" << to_string(workerId); out << ", " << "workerAddress=" << to_string(workerAddress); out << ", " << "tierAlias=" << to_string(tierAlias); out << ")"; } Command::~Command() throw() { } void Command::__set_commandType(const CommandType::type val) { this->commandType = val; } void Command::__set_data(const std::vector<int64_t> & val) { this->data = val; } uint32_t Command::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast12; xfer += iprot->readI32(ecast12); this->commandType = (CommandType::type)ecast12; this->__isset.commandType = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->data.clear(); uint32_t _size13; ::apache::thrift::protocol::TType _etype16; xfer += iprot->readListBegin(_etype16, _size13); this->data.resize(_size13); uint32_t _i17; for (_i17 = 0; _i17 < _size13; ++_i17) { xfer += iprot->readI64(this->data[_i17]); } xfer += iprot->readListEnd(); } this->__isset.data = true; } else { xfer += iprot->skip(ftype); } break; default: xfer += iprot->skip(ftype); break; } xfer += iprot->readFieldEnd(); } xfer += iprot->readStructEnd(); return xfer; } uint32_t Command::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("Command"); xfer += oprot->writeFieldBegin("commandType", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->commandType); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("data", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->data.size())); std::vector<int64_t> ::const_iterator _iter18; for (_iter18 = this->data.begin(); _iter18 != this->data.end(); ++_iter18) { xfer += oprot->writeI64((*_iter18)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } void swap(Command &a, Command &b) { using ::std::swap; swap(a.commandType, b.commandType); swap(a.data, b.data); swap(a.__isset, b.__isset); } Command::Command(const Command& other19) { commandType = other19.commandType; data = other19.data; __isset = other19.__isset; } Command& Command::operator=(const Command& other20) { commandType = other20.commandType; data = other20.data; __isset = other20.__isset; return *this; } void Command::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "Command("; out << "commandType=" << to_string(commandType); out << ", " << "data=" << to_string(data); out << ")"; } RpcOptions::~RpcOptions() throw() { } void RpcOptions::__set_key(const std::string& val) { this->key = val; __isset.key = true; } uint32_t RpcOptions::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->key); this->__isset.key = true; } else { xfer += iprot->skip(ftype); } break; default: xfer += iprot->skip(ftype); break; } xfer += iprot->readFieldEnd(); } xfer += iprot->readStructEnd(); return xfer; } uint32_t RpcOptions::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("RpcOptions"); if (this->__isset.key) { xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->key); xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } void swap(RpcOptions &a, RpcOptions &b) { using ::std::swap; swap(a.key, b.key); swap(a.__isset, b.__isset); } RpcOptions::RpcOptions(const RpcOptions& other21) { key = other21.key; __isset = other21.__isset; } RpcOptions& RpcOptions::operator=(const RpcOptions& other22) { key = other22.key; __isset = other22.__isset; return *this; } void RpcOptions::printTo(std::ostream& out) const { using ::apache::thrift::to_string; out << "RpcOptions("; out << "key="; (__isset.key ? (out << to_string(key)) : (out << "<null>")); out << ")"; }
26.686303
188
0.624779
[ "vector" ]
bc0ef24deb84c71bae3e7bbcbaae406aad5c651d
9,442
hpp
C++
inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
1
2020-06-21T09:51:42.000Z
2020-06-21T09:51:42.000Z
inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
4
2021-04-01T08:29:48.000Z
2021-08-30T16:12:52.000Z
inference-engine/tests_deprecated/behavior/shared_tests/plugin_tests/behavior_test_plugin_layout.hpp
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
3
2021-03-09T08:27:29.000Z
2021-04-07T04:58:54.000Z
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "behavior_test_plugin.h" #include "precision_utils.h" #include "common_test_utils/xml_net_builder/xml_net_builder.hpp" using namespace std; using namespace CommonTestUtils; using namespace InferenceEngine; using namespace InferenceEngine::details; static constexpr int testDimW = 17; static constexpr int testDimH = 3; struct in_params { std::vector<size_t> in; }; struct base_layout_test_params { std::string device; Layout layout; std::string precision; base_layout_test_params(std::string name, std::string _precision = "FP32", Layout _layout = Layout::C) { device = name; precision = _precision; layout = _layout; } }; struct power_params : in_params { int power; int scale; int shift; power_params(in_params in, int _power, int _scale, int _shift ) : in_params(in) { power = _power; scale = _scale; shift = _shift; } }; struct layout_test_params : power_params, base_layout_test_params { layout_test_params(std::string name, std::string precision, Layout layout, power_params params) : power_params(params), base_layout_test_params(name, precision, layout) {} }; std::ostream &operator<<(std::ostream &os, const layout_test_params &p) { return os << "device: " << p.device; } std::string layoutToString(Layout l) { std::string str_layout; switch (l) { case InferenceEngine::NCHW: str_layout = "NCHW"; break; case InferenceEngine::NHWC: str_layout = "NHWC"; break; case InferenceEngine::C: str_layout = "C"; break; case InferenceEngine::CHW: str_layout = "CHW"; break; case InferenceEngine::HW: str_layout = "HW"; break; case InferenceEngine::NC: str_layout = "NC"; break; case InferenceEngine::CN: str_layout = "CN"; break; default: break; } return str_layout; } std::string getTestName(testing::TestParamInfo<layout_test_params> obj) { return "layout_" + layoutToString(obj.param.layout) + "_" + obj.param.device; } class LayoutTestCanLoad : public TestsCommon, public testing::WithParamInterface<layout_test_params>{ protected: std::string getPowerModel(const layout_test_params &p) { std::map<std::string, std::string> params = { { "power", std::to_string(p.power) }, { "scale", std::to_string(p.scale) }, { "shift", std::to_string(p.shift) } }; InOutShapes inout = {{p.in}, {p.in}}; V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( "Power_Only", inout.inDims[0], p.precision) .addLayer("Power", p.precision, &params, inout); return model.finish(false); } std::string getConvModel(const layout_test_params &p) { std::map<std::string, std::string> params = { { "stride-x", "1" }, { "stride-y", "1" }, { "pad-x", "0" }, { "pad-y", "0" }, { "kernel-x", "1" }, { "kernel-y", "1" }, { "output", std::to_string(testDimW)}, { "group", "1" } }; std::vector<size_t> out = p.in; if (out.size() == 1 || out.size() == 3) { out[0] = testDimW; } else { out[1] = testDimW; } InOutShapes inout = {{p.in}, {out}}; const auto elemSize = p.precision == "FP16" ? sizeof(ie_fp16) : sizeof(float); size_t weights = testDimW * testDimH * elemSize; size_t biases = testDimW * elemSize; V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( "Convolution_Only", inout.inDims[0], p.precision) .addLayer("Convolution", p.precision, &params, inout, weights, biases); return model.finish(false); } std::string getActivModel(const layout_test_params &p) { std::map<std::string, std::string> params = { { "type", "sigmoid" } }; InOutShapes inout = {{p.in}, {p.in}}; V2NetBuilder model = V2NetBuilder::buildNetworkWithOneInput( "Activation_Only", inout.inDims[0], p.precision) .addLayer("Activation", p.precision, &params, inout); return model.finish(false); } Blob::Ptr getNetworkWeights(const layout_test_params &p) { const auto elemSize = p.precision == "FP16" ? sizeof(ie_fp16) : sizeof(float); TensorDesc tdesc (Precision::U8, { (testDimW * testDimH + testDimW ) * elemSize }, C); TBlob<uint8_t> *weights = new TBlob<uint8_t>(tdesc); weights->allocate(); fill_data(weights->buffer().as<float*>(), weights->size() / sizeof(float)); TBlob<uint8_t>::Ptr weights_ptr = TBlob<uint8_t>::Ptr(weights); return weights_ptr; } }; class LayoutTestCanLoadPower : public LayoutTestCanLoad {}; class LayoutTestCanLoadConv : public LayoutTestCanLoad {}; class LayoutTestCanLoadActiv : public LayoutTestCanLoad {}; class LayoutTestCanNotLoadPower : public LayoutTestCanLoad {}; class LayoutTestCanNotLoadConv : public LayoutTestCanLoad {}; TEST_P(LayoutTestCanLoadPower, NetWithLayout) { auto param = GetParam(); InferenceEngine::Core core; std::string model = getPowerModel(param); Blob::CPtr weights; auto network = core.ReadNetwork(model, weights); ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {})); } TEST_P(LayoutTestCanLoadConv, NetWithLayout) { auto param = GetParam(); InferenceEngine::Core core; std::string model = getConvModel(param); Blob::Ptr weights = getNetworkWeights(param); auto network = core.ReadNetwork(model, weights); try { ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); } catch (InferenceEngineException ex) { std::cout << "Device" << param.device << " threw exception \"" << ex.what() << "\" with status code " << ex.getStatus() << std::endl; GTEST_FAIL() << ex.what(); } catch (std::exception ex) { std::cout << "Caught" << ex.what() << std::endl; GTEST_FAIL() << ex.what(); } catch (...) { GTEST_FAIL(); } } TEST_P(LayoutTestCanLoadActiv, NetWithLayout) { auto param = GetParam(); InferenceEngine::Core core; std::string model = getActivModel(param); CNNNetwork network; Blob::CPtr weights; ASSERT_NO_THROW(network = core.ReadNetwork(model, weights)); ASSERT_NO_THROW(ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {})); } TEST_P(LayoutTestCanNotLoadPower, NetWithLayout) { auto param = GetParam(); string ref_error = (param.device == CommonTestUtils::DEVICE_MYRIAD) ? "Unsupported 1D dimensions" : (param.device == CommonTestUtils::DEVICE_FPGA) ? "Graph is not supported on FPGA plugin due to existance of layer (Name: Input0, Type: Input)\n"\ "in topology. Most likely you need to use heterogeneous plugin instead of FPGA plugin directly." : "Invalid data dimensions"; InferenceEngine::Core core; std::string model = getPowerModel(param); CNNNetwork network; Blob::CPtr weights; ASSERT_NO_THROW(network = core.ReadNetwork(model, weights)); try { ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); } catch (InferenceEngineException ex) { std::cout << "Device" << param.device << " threw exception \"" << ex.what() << "\" with status code " << ex.getStatus() << std::endl; //ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); ASSERT_STR_CONTAINS(ex.what(), ref_error); } catch (std::exception ex) { std::cout << "Caught" << ex.what() << std::endl; GTEST_FAIL() << ex.what(); } catch (...) { GTEST_FAIL(); } } TEST_P(LayoutTestCanNotLoadConv, NetWithLayout) { auto param = GetParam(); string ref_error = (param.device == CommonTestUtils::DEVICE_MYRIAD) ? "Convolution supports only 3D or 4D or 5D input" : (param.device == CommonTestUtils::DEVICE_FPGA) ? "Graph is not supported on FPGA" : (param.device == CommonTestUtils::DEVICE_CPU) ? "Convolution layer. Unsupported mode. Only 4D and 5D blobs are supported as input." : "Invalid data dimensions"; InferenceEngine::Core core; std::string model = getConvModel(param); CNNNetwork network; ASSERT_NO_THROW(network = core.ReadNetwork(model, getNetworkWeights(param))); try { ExecutableNetwork exeNetwork = core.LoadNetwork(network, param.device, {}); } catch (InferenceEngineException ex) { std::cout << "Device" << param.device << " threw exception \"" << ex.what() << "\" with status code " << ex.getStatus() << std::endl; /*if (param.device != CommonTestUtils::DEVICE_CPU) { ASSERT_EQ(ex.getStatus(), StatusCode::GENERAL_ERROR); }*/ ASSERT_STR_CONTAINS(ex.what(), ref_error); } catch (std::exception ex) { std::cout << "Caught" << ex.what() << std::endl; GTEST_FAIL() << ex.what(); } catch (...) { GTEST_FAIL(); } }
34.713235
168
0.617136
[ "vector", "model", "3d" ]
bc2095321d4569ba0ba782f90e8278e82a78a08d
450
cpp
C++
src/cpp/interviewbit/graph/some/a.cpp
ajaybiswas22/gfg-coding-problems
9484ff82f7fb7f663a15bc6058bc0bc24cd13015
[ "MIT" ]
1
2021-02-08T14:50:50.000Z
2021-02-08T14:50:50.000Z
src/cpp/interviewbit/graph/some/a.cpp
ajaybiswas22/gfg-coding-problems
9484ff82f7fb7f663a15bc6058bc0bc24cd13015
[ "MIT" ]
null
null
null
src/cpp/interviewbit/graph/some/a.cpp
ajaybiswas22/gfg-coding-problems
9484ff82f7fb7f663a15bc6058bc0bc24cd13015
[ "MIT" ]
null
null
null
#include <iomanip> #include <iostream> #include <utility> #include <vector> #include <string> class Employee { public: std::string *name; const unsigned int employeeNum; unsigned int lineManagerEmployeeNum; Employee& operator =( Employee&& other) { if (&other == this) return *this; name = std::move(other.name); employeeNum = std::move(other.employeeNum); lineManagerEmployeeNum = std::move(other. lineManagerEmployeeNum); return *this; } };
19.565217
66
0.735556
[ "vector" ]
bc2e69b54d2cf0fba16f05fdc497bb11da38269f
4,961
cpp
C++
Source/VoxelTerrain/Private/VoxelTerrainPaintTool.cpp
code0100fun/UE4VoxelTerrainEditor
0665ed84f38532eca7bd559c5707b021e5ef36bf
[ "MIT" ]
70
2017-09-23T16:47:54.000Z
2021-10-14T07:00:25.000Z
Source/VoxelTerrain/Private/VoxelTerrainPaintTool.cpp
code0100fun/UE4VoxelTerrainEditor
0665ed84f38532eca7bd559c5707b021e5ef36bf
[ "MIT" ]
1
2019-02-13T19:18:48.000Z
2019-02-13T20:13:21.000Z
Source/VoxelTerrain/Private/VoxelTerrainPaintTool.cpp
code0100fun/UE4VoxelTerrainEditor
0665ed84f38532eca7bd559c5707b021e5ef36bf
[ "MIT" ]
23
2017-11-28T00:05:44.000Z
2021-10-14T07:00:27.000Z
#include "VoxelTerrainPrivatePCH.h" #include "VoxelTerrainPaintTool.h" #include "VoxelTerrainUtils.h" #include "VoxelTerrainActor.h" #include "VoxelTerrainData.h" #include "VoxelTerrainChunkComponent.h" DECLARE_CYCLE_STAT(TEXT("Paint/Tick"), STAT_PaintTick, STATGROUP_VoxelTerrainPaintTool); bool FVoxelTerrainPaintTool::Click() { return false; } bool FVoxelTerrainPaintTool::Enter() { voxelTerrain = nullptr; return true; } void FVoxelTerrainPaintTool::Exit() { if (voxelTerrain != nullptr) { voxelTerrain->UpdateBrushPosition(FVector((float)INT_MAX)); voxelTerrain = nullptr; } pressed = false; shift = false; } bool FVoxelTerrainPaintTool::MouseMove() { return false; } bool FVoxelTerrainPaintTool::InputKey(FViewport * viewport, FKey Key, EInputEvent Event) { if (voxelTerrain == nullptr) return false; if (Key == EKeys::LeftMouseButton && Event != EInputEvent::IE_Repeat) pressed = (Event == EInputEvent::IE_Pressed); else if (Key == EKeys::LeftShift && Event != EInputEvent::IE_Repeat) shift = (Event == EInputEvent::IE_Pressed); return false; } void FVoxelTerrainPaintTool::Render(FViewport * viewport, const FSceneView * view) { // } void FVoxelTerrainPaintTool::Tick(FViewport * viewport, const FSceneView * view, float deltaTime) { SCOPE_CYCLE_COUNTER(STAT_PaintTick); FVector2D pos = FVector2D(viewport->GetMouseX(), viewport->GetMouseY()); FVector RayOrigin = FVector(); FVector RayDirection = FVector(); FSceneView::DeprojectScreenToWorld(pos, view->UnconstrainedViewRect, view->ViewMatrices.GetInvViewProjectionMatrix(), RayOrigin, RayDirection); //TRACE IN DIR :D hitResult = new FHitResult(ForceInit); FCollisionQueryParams paramsCall = FCollisionQueryParams(FName(TEXT("Trace")), true); //Ignore player if available APlayerController* playerController = viewport->GetClient()->GetWorld()->GetFirstPlayerController(); if (playerController != NULL) paramsCall.AddIgnoredActor(playerController->GetPawn()); bool traced = viewport->GetClient()->GetWorld()->LineTraceSingleByChannel(*hitResult, RayOrigin, RayOrigin + RayDirection * WORLD_MAX, ECollisionChannel::ECC_WorldDynamic, paramsCall); if (traced && hitResult->GetActor()->IsA<AVoxelTerrain>()) { AVoxelTerrain* currentTerrain = (AVoxelTerrain*)hitResult->GetActor(); if (currentTerrain != voxelTerrain) { if (voxelTerrain != nullptr) { voxelTerrain->UpdateBrushPosition(FVector((float)INT_MAX)); } voxelTerrain = currentTerrain; } currentTerrain->UpdateBrushPosition(hitResult->ImpactPoint); currentTerrain->UpdateBrushInfo(BrushSize, BrushFalloff); if (pressed) { //Calculate diameter in voxel space UVoxelTerrainData* data = voxelTerrain->Settings; FVector center = UVoxelTerrainUtils::WorldPosToTerrainPos(hitResult->ImpactPoint, voxelTerrain) + hitResult->Normal; float radius = ((BrushSize*0.01f)*data->VoxelsPerMeter + 2)*0.5f; for (int x = center.X - radius; x < center.X + radius; x++) { for (int y = center.Y - radius; y < center.Y + radius; y++) { for (int z = center.Z - radius; z < center.Z + radius; z++) { if (z < 0 || z >= data->TerrainHeight) continue; FVector voxelToCheck = FVector(x, y, z); if (FVector::Dist(center, voxelToCheck) > radius) { continue; } FIntPoint chunkPos; chunkPos.X = FMath::FloorToInt(x / (float)data->ChunkSize); chunkPos.Y = FMath::FloorToInt(y / (float)data->ChunkSize); FIntVector localPos; localPos.X = x%data->ChunkSize; if (localPos.X < 0) localPos.X = data->ChunkSize - FMath::Abs(localPos.X); localPos.Y = y%data->ChunkSize; if (localPos.Y < 0) localPos.Y = data->ChunkSize - FMath::Abs(localPos.Y); localPos.Z = z; UVoxelTerrainChunkComponent* component = voxelTerrain->GetChunkComponentAt(chunkPos); if (!component) continue; UVoxelTerrainChunkData* chunkData = component->chunkData; if (!shift && PaintMaterial) { if (component->GetPaintLayer(PaintMaterial) != -1) { FVoxelTerrainVoxel* voxel = component->GetVoxelAt(FIntVector(localPos.X, localPos.Y, localPos.Z), true); if (voxel) voxel->Material = PaintMaterial; } } else if (shift) { FVoxelTerrainVoxel* voxel = component->GetVoxelAt(FIntVector(localPos.X, localPos.Y, localPos.Z), true); if (voxel) voxel->Material = NULL; } } } } UE_LOG(LogTemp, Warning, TEXT("update brush")); FIntPoint chunkPos; chunkPos.X = FMath::FloorToInt(center.X / (float)data->ChunkSize); chunkPos.Y = FMath::FloorToInt(center.Y / (float)data->ChunkSize); int range = (radius + 1) / data->ChunkSize; if (range <= 0) range = 1; voxelTerrain->UpdateChunks(chunkPos, range); } } else { if (voxelTerrain != nullptr) { voxelTerrain->UpdateBrushPosition(FVector((float)INT_MAX)); voxelTerrain = nullptr; } } }
33.52027
185
0.695827
[ "render" ]
bc3102949133a47e881220fa12d6098023f520e5
880
cpp
C++
Dataset/Leetcode/test/88/81.cpp
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/test/88/81.cpp
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/test/88/81.cpp
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution { public: void XXX(vector<int>& nums1, int m, vector<int>& nums2, int n) { int num1_p = 0; int num2_p = 0; int cur_pos = 0; while(num1_p<m && num2_p < n) { if(nums2[num2_p] < nums1[cur_pos]) { vector<int>::iterator it = nums1.begin(); nums1.insert(it+cur_pos,nums2[num2_p]); cur_pos++; num2_p++; } else { num1_p++; cur_pos++; } } if(num1_p==m) { while(num2_p<n) { vector<int>::iterator it = nums1.begin(); nums1.insert(it+cur_pos,nums2[num2_p]); cur_pos++; num2_p++; } } nums1.resize(m+n,0); } };
23.783784
68
0.380682
[ "vector" ]
bc3204e2b3532519f4221e74df184989b2da4773
6,153
hpp
C++
InstructionSets/CachingExecutor.hpp
laurentd75/CLK
55dbeefeb2539541409265391ba9f7d70d89449e
[ "MIT" ]
674
2016-05-05T18:47:48.000Z
2022-03-30T01:48:53.000Z
InstructionSets/CachingExecutor.hpp
laurentd75/CLK
55dbeefeb2539541409265391ba9f7d70d89449e
[ "MIT" ]
223
2016-05-11T13:45:11.000Z
2022-03-27T08:20:26.000Z
InstructionSets/CachingExecutor.hpp
laurentd75/CLK
55dbeefeb2539541409265391ba9f7d70d89449e
[ "MIT" ]
36
2017-11-24T18:07:52.000Z
2022-03-17T23:30:14.000Z
// // CachingExecutor.hpp // Clock Signal // // Created by Thomas Harte on 16/01/2021. // Copyright © 2021 Thomas Harte. All rights reserved. // #ifndef CachingExecutor_hpp #define CachingExecutor_hpp #include "../Numeric/Sizes.hpp" #include <array> #include <cstdint> #include <limits> #include <list> #include <map> #include <queue> #include <unordered_map> namespace InstructionSet { /*! A caching executor makes use of an instruction set-specific executor to cache 'performers' (i.e. function pointers) that result from decoding. In other words, it's almost a JIT compiler, but producing threaded code (in the Forth sense) and then incurring whatever costs sit behind using the C ABI for calling. Since there'll always be exactly one parameter, being the specific executor, hopefully the calling costs are acceptable. Intended usage is for specific executors to subclass from this and declare it a friend. TODO: determine promises re: interruption, amongst other things. */ template < /// Indicates the Executor for this platform. typename Executor, /// Indicates the greatest value the program counter might take. uint64_t max_address, /// Indicates the maximum number of potential performers that will be provided. uint64_t max_performer_count, /// Provides the type of Instruction to expect. typename InstructionType, /// Indicates whether instructions should be treated as ephemeral or included in the cache. bool retain_instructions > class CachingExecutor { public: using Performer = void (Executor::*)(); using PerformerIndex = typename MinIntTypeValue<max_performer_count>::type; using ProgramCounterType = typename MinIntTypeValue<max_address>::type; // MARK: - Parser call-ins. void announce_overflow(ProgramCounterType) { /* Should be impossible for now; this is intended to provide information when page caching. */ } void announce_instruction(ProgramCounterType, InstructionType instruction) { // Dutifully map the instruction to a performer and keep it. program_.push_back(static_cast<Executor *>(this)->action_for(instruction)); if constexpr (retain_instructions) { // TODO. } } protected: // Storage for the statically-allocated list of performers. It's a bit more // work for executors to fill this array, but subsequently performers can be // indexed by array position, which is a lot more compact than a generic pointer. std::array<Performer, max_performer_count+1> performers_; ProgramCounterType program_counter_; /*! Moves the current point of execution to @c address, updating necessary performer caches and doing any translation as is necessary. */ void set_program_counter(ProgramCounterType address) { // Set flag to terminate any inner loop currently running through // previously-parsed content. has_branched_ = true; program_counter_ = address; // Temporary implementation: just interpret. program_.clear(); program_index_ = 0; static_cast<Executor *>(this)->parse(address, ProgramCounterType(max_address)); // const auto page = find_page(address); // const auto entry = page->entry_points.find(address); // if(entry == page->entry_points.end()) { // // Requested segment wasn't found; check whether it was // // within the recently translated list and otherwise // // translate it. // } } /*! Indicates whether the processor is currently 'stopped', i.e. whether all attempts to run should produce no activity. Some processors have such a state when waiting for interrupts or for a reset. */ void set_is_stopped(bool) {} /*! Executes up to the next branch. */ void run_to_branch() { has_branched_ = false; for(auto index: program_) { const auto performer = performers_[index]; (static_cast<Executor *>(this)->*performer)(); if(has_branched_) break; } } /*! Runs for @c duration; the intention is that subclasses provide a method that is clear about units, and call this to count down in whatever units they count down in. */ void run_for(int duration) { remaining_duration_ += duration; while(remaining_duration_ > 0) { has_branched_ = false; Executor *const executor = static_cast<Executor *>(this); while(remaining_duration_ > 0 && !has_branched_) { const auto performer = performers_[program_[program_index_]]; ++program_index_; (executor->*performer)(); } } } /*! Should be called by a specific executor to subtract from the remaining running duration. */ inline void subtract_duration(int duration) { remaining_duration_ -= duration; } private: bool has_branched_ = false; int remaining_duration_ = 0; std::vector<PerformerIndex> program_; size_t program_index_ = 0; /* TODO: almost below here can be shoved off into an LRUCache object, or similar. */ // static constexpr size_t max_cached_pages = 64; // struct Page { // std::map<ProgramCounterType, PerformerIndex> entry_points; // TODO: can I statically these two? Should I? // std::vector<PerformerIndex> actions_; // std::vector<typename std::enable_if<!std::is_same<InstructionType, void>::value, InstructionType>::type> instructions_; // }; // std::array<Page, max_cached_pages> pages_; // Maps from page numbers to pages. // std::unordered_map<ProgramCounterType, Page *> cached_pages_; // Maintains an LRU of recently-used pages in case of a need for reuse. // std::list<ProgramCounterType> touched_pages_; /*! Finds or creates the page that contains @c address. */ /* Page *find_page(ProgramCounterType address) { // TODO: are 1kb pages always appropriate? Is 64 the correct amount to keep? const auto page_address = ProgramCounterType(address >> 10); auto page = cached_pages_.find(page_address); if(page == cached_pages_.end()) { // Page wasn't found; either allocate a new one or // reuse one that already exists. if(cached_pages_.size() == max_cached_pages) { } else { } } else { // Page was found; LRU shuffle it. } return nullptr; }*/ }; } #endif /* CachingExecutor_hpp */
30.61194
124
0.719649
[ "object", "vector" ]
bc3bcfbfd5318d88c740858d0cab78aa1fe58ff3
10,718
hxx
C++
include/nifty/graph/agglo/agglomerative_clustering.hxx
konopczynski/nifty
dc02ac60febaabfaf9b2ee5a854bb61436ebdc97
[ "MIT" ]
null
null
null
include/nifty/graph/agglo/agglomerative_clustering.hxx
konopczynski/nifty
dc02ac60febaabfaf9b2ee5a854bb61436ebdc97
[ "MIT" ]
null
null
null
include/nifty/graph/agglo/agglomerative_clustering.hxx
konopczynski/nifty
dc02ac60febaabfaf9b2ee5a854bb61436ebdc97
[ "MIT" ]
1
2018-02-07T09:29:26.000Z
2018-02-07T09:29:26.000Z
#pragma once #include <iostream> #include "nifty/graph/subgraph_mask.hxx" namespace nifty{ namespace graph{ namespace agglo{ // forward declarations template<class AGGLOMERATIVE_CLUSTERING> class AgglomerativeClustering; template<class AGGLOMERATIVE_CLUSTERING> class DendrogramAgglomerativeClusteringVisitor{ private: typedef std::tuple<uint64_t,uint64_t, double, double> MergeEncodingType; public: typedef AGGLOMERATIVE_CLUSTERING AgglomerativeClusteringType; typedef typename AgglomerativeClusteringType::GraphType GraphType; typedef typename GraphType:: template NodeMap<double> NodeToEncoding; typedef typename GraphType:: template NodeMap<double> NodeSize; DendrogramAgglomerativeClusteringVisitor( const AgglomerativeClusteringType & agglomerativeClustering ) : nodeSizes_(agglomerativeClustering.graph()), agglomerativeClustering_(agglomerativeClustering), nodeToEncoding_(agglomerativeClustering.graph()), encoding_(), timeStamp_(agglomerativeClustering.graph().numberOfNodes()) { for( auto node : agglomerativeClustering.graph().nodes()){ nodeToEncoding_[node] = node; nodeSizes_[node] = 1.0; } } template<class NODE_SIZES> DendrogramAgglomerativeClusteringVisitor( const AgglomerativeClusteringType & agglomerativeClustering, NODE_SIZES & nodeSizes ) : nodeSizes_(agglomerativeClustering.graph()), agglomerativeClustering_(agglomerativeClustering), nodeToEncoding_(agglomerativeClustering.graph()), encoding_(), timeStamp_(agglomerativeClustering.graph().numberOfNodes()) { for( auto node : agglomerativeClustering.graph().nodes()){ nodeToEncoding_[node] = node; nodeSizes_[node] = nodeSizes[node]; } } bool isDone()const{ return false; } void visit(const uint64_t aliveNode, const uint64_t deadNode, const double p){ //std::cout<<"a "<<aliveNode<<" d "<<deadNode<<" p "<<p<<"\n"; auto ea = nodeToEncoding_[aliveNode]; auto ed = nodeToEncoding_[deadNode]; nodeSizes_[aliveNode] += nodeSizes_[deadNode]; nodeToEncoding_[aliveNode] = timeStamp_; nodeToEncoding_[deadNode] = timeStamp_; encoding_.emplace_back(ea, ed, p, nodeSizes_[aliveNode]); ++timeStamp_; } const auto & agglomerativeClustering()const{ return agglomerativeClustering_; } const auto & dendrogramEncoding()const{ return encoding_; } private: const AgglomerativeClusteringType & agglomerativeClustering_; NodeSize nodeSizes_; NodeToEncoding nodeToEncoding_; std::vector<MergeEncodingType > encoding_; uint64_t timeStamp_; }; // template<class AGGLOMERATIVE_CLUSTERING> // class EmptyAgglomerativeClusteringVisitor{ // public: // typedef AGGLOMERATIVE_CLUSTERING AgglomerativeClusteringType; // private: // }; template<class CLUSTER_POLICY> class AgglomerativeClustering{ public: typedef CLUSTER_POLICY ClusterPolicyType; typedef typename ClusterPolicyType::EdgeContractionGraphType::WithEdgeUfd WithEdgeUfd; typedef typename ClusterPolicyType::GraphType GraphType; typedef typename ClusterPolicyType::EdgeContractionGraphType EdgeContractionGraphType; AgglomerativeClustering(ClusterPolicyType & clusterPolicy) : clusterPolicy_(clusterPolicy){ } void run(const bool verbose=false, const uint64_t printNth=100){ while(!clusterPolicy_.isDone()){ if(clusterPolicy_.edgeContractionGraph().numberOfEdges() == 0) break; //std::cout<<"AgglomerativeClustering edgeToContractNext\n"; const auto edgeToContractNextAndPriority = clusterPolicy_.edgeToContractNext(); //std::cout<<"AgglomerativeClustering edgeToContractNext done\n"; const auto edgeToContractNext = edgeToContractNextAndPriority.first; const auto priority = edgeToContractNextAndPriority.second; if(verbose){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); const auto nNodes = cgraph.numberOfNodes(); if( (nNodes + 1) % printNth == 0){ std::cout<<"Nodes "<<cgraph.numberOfNodes()<<" p="<<priority<<"\n"; } } clusterPolicy_.edgeContractionGraph().contractEdge(edgeToContractNext); } } template<class VISITOR> void run( VISITOR & visitor, const bool verbose=false, const uint64_t printNth=100 ){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); while(!clusterPolicy_.isDone() && !visitor.isDone() ){ if(clusterPolicy_.edgeContractionGraph().numberOfEdges() == 0) break; //std::cout<<"AgglomerativeClustering edgeToContractNext\n"; const auto edgeToContractNextAndPriority = clusterPolicy_.edgeToContractNext(); //std::cout<<"AgglomerativeClustering edgeToContractNext done\n"; const auto edgeToContractNext = edgeToContractNextAndPriority.first; const auto priority = edgeToContractNextAndPriority.second; if(verbose){ const auto nNodes = cgraph.numberOfNodes(); if( (nNodes + 1) % printNth == 0){ std::cout<<"Nodes "<<cgraph.numberOfNodes()<<" p="<<priority<<"\n"; } } const auto uv = cgraph.uv(edgeToContractNext); clusterPolicy_.edgeContractionGraph().contractEdge(edgeToContractNext); const auto aliveNode =cgraph.findRepresentativeNode(uv.first); const auto deadNode = uv.first == aliveNode ? uv.second : uv.first; visitor.visit(aliveNode, deadNode, priority); } } template<class MERGE_TIMES, class EDGE_DENDROGRAM_HEIGHT> void runAndGetMergeTimesAndDendrogramHeight( MERGE_TIMES & mergeTimes, EDGE_DENDROGRAM_HEIGHT & dendrogramHeight, const bool verbose=false ){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); const auto & graph = cgraph.graph(); for(const auto edge: graph.edges()){ mergeTimes[edge] = graph.numberOfNodes(); } auto t=-0; while(!clusterPolicy_.isDone()){ if(clusterPolicy_.edgeContractionGraph().numberOfEdges() == 0) break; const auto edgeToContractNextAndPriority = clusterPolicy_.edgeToContractNext(); const auto edgeToContractNext = edgeToContractNextAndPriority.first; const auto priority = edgeToContractNextAndPriority.second; dendrogramHeight[edgeToContractNext] = priority; mergeTimes[edgeToContractNext] = edgeToContractNext; if(verbose){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); std::cout<<"Nodes "<<cgraph.numberOfNodes()<<" p="<<priority<<"\n"; } clusterPolicy_.edgeContractionGraph().contractEdge(edgeToContractNext); } this->ucmTransform(mergeTimes); this->ucmTransform(dendrogramHeight); } template<class MERGE_TIMES> void runAndGetMergeTimes( MERGE_TIMES & mergeTimes, const bool verbose=false ){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); const auto & graph = cgraph.graph(); for(const auto edge: graph.edges()){ mergeTimes[edge] = graph.numberOfNodes(); } auto t=-0; while(!clusterPolicy_.isDone()){ if(clusterPolicy_.edgeContractionGraph().numberOfEdges() == 0) break; const auto edgeToContractNextAndPriority = clusterPolicy_.edgeToContractNext(); const auto edgeToContractNext = edgeToContractNextAndPriority.first; const auto priority = edgeToContractNextAndPriority.second; mergeTimes[edgeToContractNext] = edgeToContractNext; if(verbose){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); std::cout<<"Nodes "<<cgraph.numberOfNodes()<<" p="<<priority<<"\n"; } clusterPolicy_.edgeContractionGraph().contractEdge(edgeToContractNext); } this->ucmTransform(mergeTimes); } template<class EDGE_DENDROGRAM_HEIGHT> void runAndGetDendrogramHeight(EDGE_DENDROGRAM_HEIGHT & dendrogramHeight,const bool verbose=false){ while(!clusterPolicy_.isDone()){ const auto edgeToContractNextAndPriority = clusterPolicy_.edgeToContractNext(); const auto edgeToContractNext = edgeToContractNextAndPriority.first; const auto priority = edgeToContractNextAndPriority.second; dendrogramHeight[edgeToContractNext] = priority; if(verbose){ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); std::cout<<"Nodes "<<cgraph.numberOfNodes()<<" p="<<priority<<"\n"; } clusterPolicy_.edgeContractionGraph().contractEdge(edgeToContractNext); } this->ucmTransform(dendrogramHeight); } template<class EDGE_MAP> void ucmTransform(EDGE_MAP & edgeMap)const{ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); this->graph().forEachEdge([&](const uint64_t edge){ const auto reprEdge = cgraph.findRepresentativeEdge(edge); edgeMap[edge] = edgeMap[reprEdge]; }); } template<class EDGE_MAP, class EDGE_MAP_OUT> void ucmTransform(const EDGE_MAP & edgeMap, EDGE_MAP_OUT & edgeMapOut)const{ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); this->graph().forEachEdge([&](const uint64_t edge){ const auto reprEdge = cgraph.findRepresentativeEdge(edge); edgeMapOut[edge] = edgeMap[reprEdge]; }); } const ClusterPolicyType & clusterPolicy()const{ return clusterPolicy_; } const GraphType & graph()const{ return clusterPolicy_.edgeContractionGraph().graph(); } template<class NODE_MAP> void result(NODE_MAP & nodeMap)const{ const auto & cgraph = clusterPolicy_.edgeContractionGraph(); const auto & graph = cgraph.graph(); for(const auto node : graph.nodes()){ nodeMap[node] = cgraph.findRepresentativeNode(node); } } private: ClusterPolicyType & clusterPolicy_; }; } // namespace agglo } // namespace nifty::graph } // namespace nifty
33.704403
103
0.658332
[ "vector" ]
bc3d8e453c0afb36f51aaa39a87208957da4c660
99,542
cpp
C++
thirdparty/moab/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
yumin/SMTK
d280f10c5b70953b2a0196f71832955c7fc75e7f
[ "BSD-3-Clause-Clear" ]
null
null
null
thirdparty/moab/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
yumin/SMTK
d280f10c5b70953b2a0196f71832955c7fc75e7f
[ "BSD-3-Clause-Clear" ]
4
2016-11-10T15:49:51.000Z
2017-02-06T23:24:16.000Z
thirdparty/moab/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
yumin/SMTK
d280f10c5b70953b2a0196f71832955c7fc75e7f
[ "BSD-3-Clause-Clear" ]
null
null
null
#include "iMeshP.h" #include "moab_mpi.h" #include <iostream> #include <algorithm> #include <vector> #include <sstream> #include <assert.h> #include <math.h> #include <map> #include <string.h> #include <stdio.h> // remove() #if !defined(_MSC_VER) && !defined(__MINGW32__) #include <unistd.h> #endif #define STRINGIFY_(X) #X #define STRINGIFY(X) STRINGIFY_(X) const char* const FILENAME = "iMeshP_test_file"; /************************************************************************** Error Checking **************************************************************************/ #define CHKERR do { \ if (ierr) { \ std::cerr << "Error code " << ierr << " at " << __FILE__ << ":" << __LINE__ << std::endl;\ return ierr; \ } \ } while (false) #define PCHECK do { ierr = is_any_proc_error(ierr); CHKERR; } while(false) // Use my_rank instead of rank to avoid shadowed declaration #define ASSERT(A) do { \ if (is_any_proc_error(!(A))) { \ int my_rank = 0; \ MPI_Comm_rank( MPI_COMM_WORLD, &my_rank ); \ if (0 == my_rank) std::cerr << "Failed assertion: " #A << std::endl \ << " at " __FILE__ ":" << __LINE__ << std::endl; \ return 1; \ } } while (false) // Test if is_my_error is non-zero on any processor in MPI_COMM_WORLD int is_any_proc_error( int is_my_error ) { int result; int err = MPI_Allreduce( &is_my_error, &result, 1, MPI_INT, MPI_MAX, MPI_COMM_WORLD ); return err || result; } /************************************************************************** Test Declarations **************************************************************************/ class PartMap; /**\brief Consistency check for parallel load * * All other tests depend on this one. */ int test_load( iMesh_Instance, iMeshP_PartitionHandle prtn, PartMap& map, int comm_size ); /**\brief Test partition query methods * * Test: * - iMeshP_getPartitionComm * - iMeshP_getNumPartitions * - iMeshP_getPartitions */ int test_get_partitions( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test part quyery methods * * Test: * - iMeshP_getNumGlobalParts * - iMeshP_getNumLocalParts * - iMeshP_getLocalParts */ int test_get_parts( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test query by entity type * * Test: * - iMeshP_getNumOfTypeAll * - iMeshP_getNumOfType * - iMeshP_getEntities * - */ int test_get_by_type( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test query by entity topology * * Test: * - iMeshP_getNumOfTopoAll * - iMeshP_getNumOfTopo * - iMeshP_getEntities * - */ int test_get_by_topo( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test mapping from part id to part handle * * Test: * - iMeshP_getPartIdFromPartHandle * - iMeshP_getPartIdsFromPartHandlesArr * - iMeshP_getPartHandleFromPartId * - iMeshP_getPartHandlesFromPartsIdsArr * - iMeshP_getRankOfPart * - iMeshP_getRankOfPartArr */ int test_part_id_handle( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test get part rank * * Tests: * - iMeshP_getRankOfPart * - iMeshP_getRankOfPartArr */ int test_part_rank( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test querying of part neighbors * * Test: * - iMeshP_getNumPartNbors * - iMeshP_getNumPartNborsArr * - iMeshP_getPartNbors * - iMeshP_getPartNborsArr */ int test_get_neighbors( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test querying of part boundary entities * * Test: * - iMeshP_getNumPartBdryEnts * - iMeshP_getPartBdryEnts */ int test_get_part_boundary( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test querying of part boundary entities * * Test: * - iMeshP_initPartBdryEntIter * - iMeshP_initPartBdryEntArrIter */ int test_part_boundary_iter( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test adjacent entity query * * Test: * - iMeshP_getAdjEntities */ int test_get_adjacencies( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test entity iterators * * Test: * - iMeshP_initEntIter * - iMeshP_initEntArrIter */ int test_entity_iterator( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test entity owner queries * * Test: * - iMeshP_getEntOwnerPart * - iMeshP_getEntOwnerPartArr * - iMeshP_isEntOwner * - iMeshP_isEntOwnerArr */ int test_entity_owner( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test entity status * * Test: * - iMeshP_getEntStatus * - iMeshP_getEntStatusArr */ int test_entity_status( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test information about entity copies for interface entities * * Test: * - iMeshP_getNumCopies * - iMeshP_getCopyParts */ int test_entity_copy_parts( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test information about entity copies for interface entities * * Test: * - iMeshP_getCopies * - iMeshP_getCopyOnPart * - iMeshP_getOwnerCopy */ int test_entity_copies( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test creation of ghost entities * * Test: * - iMeshP_createGhostEntsAll */ int test_create_ghost_ents( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); /**\brief Test commuinication of tag data * * Test: * - iMeshP_pushTags * - iMeshP_pushTagsEnt */ int test_push_tag_data_iface( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); int test_push_tag_data_ghost( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& ); int test_exchange_ents( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ); /************************************************************************** Helper Funcions **************************************************************************/ class PartMap { public: int num_parts() const { return sortedPartList.size(); } iMeshP_Part part_id_from_local_id( int local_id ) const { return sortedPartList[idx_from_local_id(local_id)]; } int local_id_from_part_id( iMeshP_Part part ) const { return partLocalIds[idx_from_part_id(part)]; } int rank_from_part_id( iMeshP_Part part ) const { return partRanks[idx_from_part_id(part)]; } int rank_from_local_id( int id ) const { return partRanks[idx_from_local_id(id)]; } int count_from_rank( int rank ) const { return std::count( partRanks.begin(), partRanks.end(), rank ); } void part_id_from_rank( int rank, std::vector<iMeshP_Part>& parts ) const; void local_id_from_rank( int rank, std::vector<int>& ids ) const; const std::vector<iMeshP_Part>& get_parts() const { return sortedPartList; } const std::vector<int>& get_ranks() const { return partRanks; } int build_map( iMesh_Instance imesh, iMeshP_PartitionHandle partition, int num_expected_parts ); static int part_from_coords( iMesh_Instance imesh, iMeshP_PartHandle part, int& id_out ); private: inline int idx_from_part_id( iMeshP_Part id ) const { return std::lower_bound( sortedPartList.begin(), sortedPartList.end(), id ) - sortedPartList.begin(); } inline int idx_from_local_id( int id ) const { return localIdReverseMap[id]; } std::vector<iMeshP_Part> sortedPartList; std::vector<int> partRanks; std::vector<int> partLocalIds; std::vector<int> localIdReverseMap; }; /**\brief Create mesh for use in parallel tests */ int create_mesh( const char* filename, int num_parts ); /**\brief get unique identifier for each vertex */ int vertex_tag( iMesh_Instance imesh, iBase_EntityHandle vertex, int& tag ); int get_local_parts( iMesh_Instance instance, iMeshP_PartitionHandle prtn, std::vector<iMeshP_PartHandle>& handles, std::vector<iMeshP_Part>* ids = 0 ) { iMeshP_PartHandle* arr = 0; int ierr, alloc = 0, size; iMeshP_getLocalParts( instance, prtn, &arr, &alloc, &size, &ierr ); CHKERR; handles.resize( size ); std::copy( arr, arr + size, handles.begin() ); if (!ids) return iBase_SUCCESS; ids->resize( size ); alloc = size; iMeshP_Part* ptr = &(*ids)[0]; iMeshP_getPartIdsFromPartHandlesArr( instance, prtn, &handles[0], handles.size(), &ptr, &alloc, &size, &ierr ); CHKERR; assert( size == (int)ids->size() ); assert( ptr == &(*ids)[0] ); return iBase_SUCCESS; } static int get_entities( iMesh_Instance imesh, iBase_EntitySetHandle set, iBase_EntityType type, iMesh_EntityTopology topo, std::vector<iBase_EntityHandle>& entities ) { iBase_EntityHandle* array = 0; int junk = 0, size = 0, err; iMesh_getEntities( imesh, set, type, topo, &array, &junk, &size, &err ); if (!err) { entities.clear(); entities.resize( size ); std::copy( array, array + size, entities.begin() ); free( array ); } return err; } static int get_part_quads_and_verts( iMesh_Instance imesh, iMeshP_PartHandle part, std::vector<iBase_EntityHandle>& elems, std::vector<iBase_EntityHandle>& verts ) { int ierr = get_entities( imesh, part, iBase_FACE, iMesh_QUADRILATERAL, elems ); CHKERR; verts.resize(4*elems.size()); std::vector<int> junk(elems.size()+1); int junk1 = verts.size(), count, junk2 = junk.size(), junk3; iBase_EntityHandle* junk4 = &verts[0]; int* junk5 = &junk[0]; iMesh_getEntArrAdj( imesh, &elems[0], elems.size(), iBase_VERTEX, &junk4, &junk1, &count, &junk5, &junk2, &junk3, &ierr ); CHKERR; assert( junk1 == (int)verts.size() ); assert( count == (int)(4*elems.size()) ); assert( junk2 == (int)junk.size() ); assert( junk4 == &verts[0] ); assert( junk5 == &junk[0] ); std::sort( verts.begin(), verts.end() ); verts.erase( std::unique( verts.begin(), verts.end() ), verts.end() ); return iBase_SUCCESS; } static int get_coords( iMesh_Instance imesh, const iBase_EntityHandle* verts, int num_verts, double* coords ) { double* junk1 = coords; int junk2 = 3*num_verts; int junk3; int ierr; iMesh_getVtxArrCoords( imesh, verts, num_verts, iBase_INTERLEAVED, &junk1, &junk2, &junk3, &ierr ); if (iBase_SUCCESS != ierr) return ierr; assert( junk1 == coords ); assert( junk2 == 3*num_verts ); assert( junk3 == 3*num_verts ); return iBase_SUCCESS; } /************************************************************************** Main Method **************************************************************************/ #define RUN_TEST(A) run_test( &A, #A ) int run_test( int (*func)(iMesh_Instance, iMeshP_PartitionHandle, const PartMap&), const char* func_name ) { int rank, size, ierr; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); if (rank == 0) { ierr = create_mesh( FILENAME, size ); } MPI_Bcast( &ierr, 1, MPI_INT, 0, MPI_COMM_WORLD ); if (ierr) { if (rank == 0) { std::cerr << "Failed to create input test file on root processor. Aborting." << std::endl; } abort(); } iMesh_Instance imesh; iMesh_newMesh( 0, &imesh, &ierr, 0 ); PCHECK; iMeshP_PartitionHandle prtn; iMeshP_createPartitionAll( imesh, MPI_COMM_WORLD, &prtn, &ierr ); PCHECK; PartMap map; ierr = test_load( imesh, prtn, map, size ); if (ierr) { if (rank == 0) { std::cerr << "Failed to load input mesh." << std::endl << "Cannot run further tests." << std::endl << "ABORTING" << std::endl; } abort(); } int result = (*func)(imesh,prtn,map); int is_err = is_any_proc_error( result ); if (rank == 0) { if (is_err) std::cout << func_name << " : FAILED!!" << std::endl; else std::cout << func_name << " : success" << std::endl; } iMesh_dtor( imesh, &ierr ); CHKERR; return is_err; } int main( int argc, char* argv[] ) { MPI_Init(&argc, &argv); int size, rank; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); if (argc > 2 && !strcmp(argv[1], "-p")) { #if !defined(_MSC_VER) && !defined(__MINGW32__) std::cout << "Processor " << rank << " of " << size << " with PID " << getpid() << std::endl; std::cout.flush(); #endif // loop forever on requested processor, giving the user time // to attach a debugger. Once the debugger in attached, user // can change 'pause'. E.g. on gdb do "set var pause = 0" if (atoi(argv[2]) == rank) { volatile int pause = 1; while (pause); } MPI_Barrier(MPI_COMM_WORLD); } int num_errors = 0; num_errors += RUN_TEST( test_get_partitions ); num_errors += RUN_TEST( test_get_parts ); num_errors += RUN_TEST( test_get_by_type ); num_errors += RUN_TEST( test_get_by_topo ); num_errors += RUN_TEST( test_part_id_handle ); num_errors += RUN_TEST( test_part_rank ); num_errors += RUN_TEST( test_get_neighbors ); num_errors += RUN_TEST( test_get_part_boundary ); num_errors += RUN_TEST( test_part_boundary_iter ); num_errors += RUN_TEST( test_get_adjacencies ); num_errors += RUN_TEST( test_entity_iterator ); num_errors += RUN_TEST( test_entity_owner ); num_errors += RUN_TEST( test_entity_status ); num_errors += RUN_TEST( test_entity_copy_parts ); num_errors += RUN_TEST( test_entity_copies ); num_errors += RUN_TEST( test_push_tag_data_iface ); num_errors += RUN_TEST( test_push_tag_data_ghost ); num_errors += RUN_TEST( test_create_ghost_ents ); num_errors += RUN_TEST( test_exchange_ents ); // wait until all procs are done before writing summary data std::cout.flush(); MPI_Barrier( MPI_COMM_WORLD ); // clean up output file if (rank == 0) remove( FILENAME ); if (rank == 0) { if (!num_errors) std::cout << "All tests passed" << std::endl; else std::cout << num_errors << " TESTS FAILED!" << std::endl; } MPI_Finalize(); return num_errors; } // Create a mesh // // // Groups of four quads will be arranged into parts as follows: // +------+------+------+------+------+----- // | | | // | | | // + Part 0 + Part 2 + Part 4 // | | | // | | | // +------+------+------+------+------+----- // | | | // | | | // + Part 1 + Part 3 + Part 5 // | | | // | | | // +------+------+------+------+------+----- // // Vertices will be enumerated as follows: // 1------6-----11-----16-----21-----26----- // | | | // | | | // 2 7 12 17 22 27 // | | | // | | | // 3------8-----13-----18-----23-----28----- // | | | // | | | // 4 9 14 19 24 29 // | | | // | | | // 5-----10-----15-----20-----25-----30----- // // Element IDs will be [4*rank+1,4*rank+5] template <int size> struct EHARR { iBase_EntityHandle h[size]; iBase_EntityHandle& operator[](int i){ return h[i]; } operator iBase_EntityHandle*() { return h; } }; int create_mesh( const char* filename, int num_parts ) { const char* tagname = "GLOBAL_ID"; int ierr; iMesh_Instance imesh; iMesh_newMesh( 0, &imesh, &ierr, 0 ); CHKERR; const int num_full_cols = 2 * (num_parts / 2); const int need_half_cols = num_parts % 2; const int num_cols = num_full_cols + 2*need_half_cols; const int num_vtx = 5+5*num_cols - 4*(num_parts%2); std::vector< EHARR<5> > vertices( num_cols + 1 ); std::vector< EHARR<4> > elements( num_cols ); std::vector<int> vertex_ids( num_vtx ); std::vector<iBase_EntityHandle> vertex_list(num_vtx); for (int i = 0; i < num_vtx; ++i) vertex_ids[i] = i+1; // create vertices int vl_pos = 0; for (int i = 0; i <= num_cols; ++i) { double coords[15] = { static_cast<double>(i), 0, 0, static_cast<double>(i), 1, 0, static_cast<double>(i), 2, 0, static_cast<double>(i), 3, 0, static_cast<double>(i), 4, 0 }; iBase_EntityHandle* ptr = vertices[i]; const int n = (num_full_cols == num_cols || i <= num_full_cols) ? 5 : 3; int junk1 = n, junk2 = n; iMesh_createVtxArr( imesh, n, iBase_INTERLEAVED, coords, 3*n, &ptr, &junk1, &junk2, &ierr ); CHKERR; assert( ptr == vertices[i] ); assert( junk1 == n ); assert( junk2 == n ); for (int j = 0; j < n; ++j) vertex_list[vl_pos++] = vertices[i][j]; } // create elements for (int i = 0; i < num_cols; ++i) { iBase_EntityHandle conn[16]; for (int j = 0; j < 4; ++j) { conn[4*j ] = vertices[i ][j ]; conn[4*j+1] = vertices[i ][j+1]; conn[4*j+2] = vertices[i+1][j+1]; conn[4*j+3] = vertices[i+1][j ]; } iBase_EntityHandle* ptr = elements[i]; const int n = (i < num_full_cols) ? 4 : 2; int junk1 = n, junk2 = n, junk3 = n, junk4 = n; int stat[4]; int* ptr2 = stat; iMesh_createEntArr( imesh, iMesh_QUADRILATERAL, conn, 4*n, &ptr, &junk1, &junk2, &ptr2, &junk3, &junk4, &ierr ); CHKERR; assert( ptr == elements[i] ); assert( junk1 == n ); assert( junk2 == n ); assert( ptr2 == stat ); assert( junk3 == n ); assert( junk4 == n ); } // create partition iMeshP_PartitionHandle partition; iMeshP_createPartitionAll( imesh, MPI_COMM_SELF, &partition, &ierr ); CHKERR; for (int i = 0; i < num_parts; ++i) { iMeshP_PartHandle part; iMeshP_createPart( imesh, partition, &part, &ierr ); CHKERR; iBase_EntityHandle quads[] = { elements[2*(i/2) ][2*(i%2) ], elements[2*(i/2)+1][2*(i%2) ], elements[2*(i/2) ][2*(i%2)+1], elements[2*(i/2)+1][2*(i%2)+1] }; iMesh_addEntArrToSet( imesh, quads, 4, part, &ierr ); CHKERR; } // assign global ids to vertices iBase_TagHandle id_tag = 0; iMesh_getTagHandle( imesh, tagname, &id_tag, &ierr, strlen(tagname) ); if (iBase_SUCCESS == ierr) { int tag_size, tag_type; iMesh_getTagSizeValues( imesh, id_tag, &tag_size, &ierr ); CHKERR; if (tag_size != 1) return iBase_TAG_ALREADY_EXISTS; iMesh_getTagType( imesh, id_tag, &tag_type, &ierr ); CHKERR; if (tag_type != iBase_INTEGER) return iBase_TAG_ALREADY_EXISTS; } else { iMesh_createTag( imesh, tagname, 1, iBase_INTEGER, &id_tag, &ierr, strlen(tagname) ); CHKERR; } iMesh_setIntArrData( imesh, &vertex_list[0], num_vtx, id_tag, &vertex_ids[0], num_vtx, &ierr ); CHKERR; // write file iBase_EntitySetHandle root_set; iMesh_getRootSet( imesh, &root_set, &ierr ); iMeshP_saveAll( imesh, partition, root_set, filename, 0, &ierr, strlen(filename), 0 ); CHKERR; iMesh_dtor( imesh, &ierr ); CHKERR; return 0; } // generate unique for each vertex from coordinates. // Assume integer coordinate values with x in [0,inf] and y in [0,4] // as generated by create_mean(..). int vertex_tag( iMesh_Instance imesh, iBase_EntityHandle vertex, int& tag ) { int ierr; double x, y, z; iMesh_getVtxCoord( imesh, vertex, &x, &y, &z, &ierr ); CHKERR; int xc = (int)round(x); int yc = (int)round(y); tag = 5*xc + yc + 1; return ierr; } /************************************************************************** Test Implementations **************************************************************************/ int test_load( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, PartMap& map, int proc_size ) { int ierr; iBase_EntitySetHandle root_set; iMesh_getRootSet( imesh, &root_set, &ierr ); const char *opt = "moab:PARTITION=PARALLEL_PARTITION"; iMeshP_loadAll( imesh, prtn, root_set, FILENAME, opt, &ierr, strlen(FILENAME), strlen(opt) ); PCHECK; ierr = map.build_map( imesh, prtn, proc_size ); CHKERR; return iBase_SUCCESS; } /**\brief Test partition query methods * * Test: * - iMeshP_getPartitionComm * - iMeshP_getNumPartitions * - iMeshP_getPartitions */ int test_get_partitions( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& ) { int ierr; // test iMeshP_getPartitionCom MPI_Comm comm = MPI_COMM_SELF; iMeshP_getPartitionComm( imesh, prtn, &comm, &ierr ); PCHECK; ASSERT(comm == MPI_COMM_WORLD); // test iMeshP_getPartitions iMeshP_PartitionHandle* array = 0; int alloc = 0, size = -1; iMeshP_getPartitions( imesh, &array, &alloc, &size, &ierr ); PCHECK; ASSERT(array != 0); ASSERT(alloc == size); ASSERT(size > 0); int idx = std::find(array, array+size, prtn) - array; free(array); ASSERT(idx < size); // test iMesP_getNumPartitions int size2 = -1; iMeshP_getNumPartitions( imesh, &size2, &ierr ); PCHECK; ASSERT(size2 == size); return 0; } /**\brief Test part quyery methods * * Test: * - iMeshP_getNumGlobalParts * - iMeshP_getNumLocalParts * - iMeshP_getLocalParts */ int test_get_parts( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int size, rank, ierr; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); int num_part_g; iMeshP_getNumGlobalParts( imesh, prtn, &num_part_g, &ierr ); PCHECK; ASSERT( num_part_g == map.num_parts() ); int num_part_l; iMeshP_getNumLocalParts( imesh, prtn, &num_part_l, &ierr ); PCHECK; ASSERT( num_part_l == map.count_from_rank( rank ) ); std::vector<iMeshP_PartHandle> parts(num_part_l); iMeshP_PartHandle* ptr = &parts[0]; int junk1 = num_part_l, count = -1; iMeshP_getLocalParts( imesh, prtn, &ptr, &junk1, &count, &ierr ); PCHECK; assert( ptr == &parts[0] ); assert( junk1 == num_part_l ); ASSERT( count == num_part_l ); return iBase_SUCCESS; } static int test_get_by_type_topo_all( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, bool test_type, int num_parts ) { // calculate number of quads and vertices in entire mesh // from number of parts (see create_mesh(..) function.) const int expected_global_quad_count = 4 * num_parts; const int num_col = 2 * (num_parts / 2 + num_parts % 2); const int expected_global_vtx_count = num_parts == 1 ? 9 : num_parts % 2 ? 1 + 5*num_col : 5 + 5*num_col; // test getNumOf*All for root set int ierr, count; iBase_EntitySetHandle root; iMesh_getRootSet( imesh, &root, &ierr ); if (test_type) iMeshP_getNumOfTypeAll( imesh, prtn, root, iBase_VERTEX, &count, &ierr ); else iMeshP_getNumOfTopoAll( imesh, prtn, root, iMesh_POINT, &count, &ierr ); PCHECK; ASSERT( count == expected_global_vtx_count ); if (test_type) iMeshP_getNumOfTypeAll( imesh, prtn, root, iBase_FACE, &count, &ierr ); else iMeshP_getNumOfTopoAll( imesh, prtn, root, iMesh_QUADRILATERAL, &count, &ierr ); PCHECK; ASSERT( count == expected_global_quad_count ); // create an entity set containing half of the quads std::vector<iBase_EntityHandle> all_quads, half_quads; ierr = get_entities( imesh, root, iBase_FACE, iMesh_QUADRILATERAL, all_quads ); assert( 0 == all_quads.size() % 2 ); half_quads.resize(all_quads.size()/2); for (size_t i = 0; i < all_quads.size() / 2; ++i) half_quads[i] = all_quads[2*i]; iBase_EntitySetHandle set; iMesh_createEntSet( imesh, 1, &set, &ierr ); CHKERR; iMesh_addEntArrToSet( imesh, &half_quads[0], half_quads.size(), set, &ierr ); CHKERR; // test getNumOf*All with defined set if (test_type) iMeshP_getNumOfTypeAll( imesh, prtn, set, iBase_VERTEX, &count, &ierr ); else iMeshP_getNumOfTopoAll( imesh, prtn, set, iMesh_POINT, &count, &ierr ); PCHECK; ASSERT( count == 0 ); if (test_type) iMeshP_getNumOfTypeAll( imesh, prtn, set, iBase_FACE, &count, &ierr ); else iMeshP_getNumOfTopoAll( imesh, prtn, set, iMesh_QUADRILATERAL, &count, &ierr ); PCHECK; ASSERT( count == expected_global_quad_count/2 ); return 0; } static int test_get_by_type_topo_local( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, bool test_type ) { int ierr; iBase_EntitySetHandle root; iMesh_getRootSet( imesh, &root, &ierr ); // select a single part std::vector<iMeshP_PartHandle> parts; ierr = get_local_parts( imesh, prtn, parts ); CHKERR; iMeshP_PartHandle part = parts.front(); // get the entities contained in the part std::vector<iBase_EntityHandle> part_quads, part_all; ierr = get_entities( imesh, part, iBase_FACE, iMesh_QUADRILATERAL, part_quads ); CHKERR; ierr = get_entities( imesh, part, iBase_ALL_TYPES, iMesh_ALL_TOPOLOGIES, part_all ); CHKERR; // compare local counts (using root set) int count; if (test_type) iMeshP_getNumOfType( imesh, prtn, part, root, iBase_FACE, &count, &ierr ); else iMeshP_getNumOfTopo( imesh, prtn, part, root, iMesh_QUADRILATERAL, &count, &ierr ); CHKERR; ASSERT( count == (int)part_quads.size() ); if (test_type) iMeshP_getNumOfType( imesh, prtn, part, root, iBase_ALL_TYPES, &count, &ierr ); else iMeshP_getNumOfTopo( imesh, prtn, part, root, iMesh_ALL_TOPOLOGIES, &count, &ierr ); CHKERR; ASSERT( count == (int)part_all.size() ); // compare local contents (using root set) iBase_EntityHandle* ptr = 0; int num_ent, junk1 = 0; iMeshP_getEntities( imesh, prtn, part, root, test_type ? iBase_FACE : iBase_ALL_TYPES, test_type ? iMesh_ALL_TOPOLOGIES : iMesh_QUADRILATERAL, &ptr, &junk1, &num_ent, &ierr ); CHKERR; std::vector<iBase_EntityHandle> act_quads( ptr, ptr+num_ent ); free(ptr); junk1 = num_ent = 0; ptr = 0; iMeshP_getEntities( imesh, prtn, part, root, iBase_ALL_TYPES, iMesh_ALL_TOPOLOGIES, &ptr, &junk1, &num_ent, &ierr ); CHKERR; std::vector<iBase_EntityHandle> act_all( ptr, ptr+num_ent ); free(ptr); std::sort( part_quads.begin(), part_quads.end() ); std::sort( part_all.begin(), part_all.end() ); std::sort( act_quads.begin(), act_quads.end() ); std::sort( act_all.begin(), act_all.end() ); ASSERT( part_quads == act_quads ); ASSERT( part_all == act_all ); // create an entity set containing half of the quads from the part std::vector<iBase_EntityHandle> half_quads(part_quads.size()/2); for (size_t i = 0; i < half_quads.size(); ++i) half_quads[i] = part_quads[2*i]; iBase_EntitySetHandle set; iMesh_createEntSet( imesh, 1, &set, &ierr ); CHKERR; iMesh_addEntArrToSet( imesh, &half_quads[0], half_quads.size(), set, &ierr ); CHKERR; // check if there exists any quads not in the part that we // can add to the set std::vector<iBase_EntityHandle> all_quads, other_quads; ierr = get_entities( imesh, root, iBase_FACE, iMesh_QUADRILATERAL, all_quads); CHKERR; std::sort( all_quads.begin(), all_quads.end() ); std::sort( part_quads.begin(), part_quads.end() ); std::set_difference( all_quads.begin(), all_quads.end(), part_quads.begin(), part_quads.end(), std::back_inserter( other_quads ) ); iMesh_addEntArrToSet( imesh, &other_quads[0], other_quads.size(), set, &ierr ); CHKERR; // compare local counts (using non-root set) if (test_type) iMeshP_getNumOfType( imesh, prtn, part, set, iBase_FACE, &count, &ierr ); else iMeshP_getNumOfTopo( imesh, prtn, part, set, iMesh_QUADRILATERAL, &count, &ierr ); CHKERR; ASSERT( count == (int)half_quads.size() ); if (test_type) iMeshP_getNumOfType( imesh, prtn, part, set, iBase_VERTEX, &count, &ierr ); else iMeshP_getNumOfTopo( imesh, prtn, part, set, iMesh_POINT, &count, &ierr ); CHKERR; ASSERT( count == 0 ); // compare local contents (using non-root set) junk1 = 0; num_ent = 0; ptr = 0; iMeshP_getEntities( imesh, prtn, part, set, test_type ? iBase_FACE : iBase_ALL_TYPES, test_type ? iMesh_ALL_TOPOLOGIES : iMesh_QUADRILATERAL, &ptr, &junk1, &num_ent, &ierr ); CHKERR; act_quads.resize(num_ent); std::copy( ptr, ptr + num_ent, act_quads.begin() ); free(ptr); std::sort( half_quads.begin(), half_quads.end() ); std::sort( act_quads.begin(), act_quads.end() ); ASSERT( act_quads == half_quads ); return iBase_SUCCESS; } /**\brief Test query by entity type * * Test: * - iMeshP_getNumOfTypeAll * - iMeshP_getNumOfType * - iMeshP_getEntities * - */ int test_get_by_type( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr; ierr = test_get_by_type_topo_all( imesh, prtn, true, map.num_parts() ); PCHECK; ierr = test_get_by_type_topo_local( imesh, prtn, true ); PCHECK; return 0; } /**\brief Test query by entity topology * * Test: * - iMeshP_getNumOfTopoAll * - iMeshP_getNumOfTopo * - iMeshP_getEntities * - */ int test_get_by_topo( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr; ierr = test_get_by_type_topo_all( imesh, prtn, false, map.num_parts() ); PCHECK; ierr = test_get_by_type_topo_local( imesh, prtn, false ); PCHECK; return 0; } /**\brief Test mapping from part id to part handle * * Test: * - iMeshP_getPartIdFromPartHandle * - iMeshP_getPartIdsFromPartHandlesArr * - iMeshP_getPartHandleFromPartId * - iMeshP_getPartHandlesFromPartsIdsArr */ int test_part_id_handle( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { // get local part ids int rank, ierr; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); std::vector<iMeshP_Part> ids; map.part_id_from_rank( rank, ids ); // check single-part functions and build list of part handles std::vector<iMeshP_PartHandle> handles( ids.size() ); size_t i; for (i = 0; i < ids.size(); ++i) { iMeshP_getPartHandleFromPartId( imesh, prtn, ids[i], &handles[i], &ierr ); CHKERR; iMeshP_Part id; iMeshP_getPartIdFromPartHandle( imesh, prtn, handles[i], &id, &ierr ); CHKERR; if (id != ids[i]) break; } ASSERT( i == ids.size() ); // test iMeshP_getPartIdsFromPartHandlesArr std::vector<iMeshP_Part> ids2( ids.size() ); int junk1 = ids.size(), junk2 = 0; iMeshP_Part* ptr = &ids2[0]; iMeshP_getPartIdsFromPartHandlesArr( imesh, prtn, &handles[0], handles.size(), &ptr, &junk1, &junk2, &ierr ); PCHECK; ASSERT( ptr == &ids2[0] ); ASSERT( junk2 == (int)ids2.size() ); ASSERT( ids == ids2 ); // test iMeshP_getPartHandlesFromPartsIdsArr std::vector<iMeshP_PartHandle> handles2(handles.size()); junk1 = handles.size(); junk2 = 0; iMeshP_PartHandle* ptr2 = &handles2[0]; iMeshP_getPartHandlesFromPartsIdsArr( imesh, prtn, &ids[0], ids.size(), &ptr2, &junk1, &junk2, &ierr ); PCHECK; ASSERT( ptr2 == &handles2[0] ); ASSERT( junk2 == (int)handles2.size() ); ASSERT( handles == handles2 ); return 0; } /**\brief Test get part rank * * Tests: * - iMeshP_getRankOfPart * - iMeshP_getRankOfPartArr */ int test_part_rank( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr = 0, rank; std::vector<iMeshP_Part> invalid, failed; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // test iMeshP_getRankOfPart for (size_t i = 0; i < map.get_parts().size(); ++i) { int pr; iMeshP_getRankOfPart( imesh, prtn, map.get_parts()[i], &pr, &ierr ); if (iBase_SUCCESS != ierr) failed.push_back( map.get_parts()[i] ); else if (pr != map.get_ranks()[i]) invalid.push_back( map.get_parts()[i] ); } if (!failed.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getRankOfPart failed for " << failed.size() << " parts." << std::endl; ierr = iBase_FAILURE; } if (!invalid.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getRankOfPart was incorrect for " << invalid.size() << " parts." << std::endl; ierr = iBase_FAILURE; } PCHECK; // test iMeshP_getRankOfPartArr std::vector<int> ranks( map.get_parts().size() ); int junk1 = ranks.size(), junk2, *ptr = &ranks[0]; iMeshP_getRankOfPartArr( imesh, prtn, &map.get_parts()[0], map.get_parts().size(), &ptr, &junk1, &junk2, &ierr ); PCHECK; assert( ptr == &ranks[0] ); assert( junk1 == (int)ranks.size() ); ASSERT( junk2 == (int)ranks.size() ); for (size_t i = 0; i < map.get_parts().size(); ++i) { if (ranks[i] != map.get_ranks()[i]) invalid.push_back( map.get_parts()[i] ); } if (!invalid.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getRankOfPartArr was incorrect for " << invalid.size() << " parts." << std::endl; ierr = iBase_FAILURE; } PCHECK; return 0; } // see create_mesh(..) static void get_part_neighbors( int logical_part_id, int num_parts, int neighbors[5], int& num_neighbors ) { num_neighbors = 0; if (logical_part_id + 1 < num_parts) neighbors[num_neighbors++] = logical_part_id + 1; if (logical_part_id + 2 < num_parts) neighbors[num_neighbors++] = logical_part_id + 2; if (logical_part_id % 2) { neighbors[num_neighbors++] = logical_part_id - 1; if (logical_part_id > 2) { neighbors[num_neighbors++] = logical_part_id - 3; neighbors[num_neighbors++] = logical_part_id - 2; } } else { if (logical_part_id + 3 < num_parts) neighbors[num_neighbors++] = logical_part_id + 3; if (logical_part_id > 1) { neighbors[num_neighbors++] = logical_part_id - 1; neighbors[num_neighbors++] = logical_part_id - 2; } } } /**\brief Test querying of part neighbors * * Test: * - iMeshP_getNumPartNbors * - iMeshP_getNumPartNborsArr * - iMeshP_getPartNbors * - iMeshP_getPartNborsArr */ int test_get_neighbors( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr, rank; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); std::vector<iMeshP_Part> local_parts; map.part_id_from_rank( rank, local_parts ); // get handles for local parts std::vector<iMeshP_PartHandle> handles(local_parts.size()); iMeshP_PartHandle* ptr = &handles[0]; int junk1 = handles.size(), junk2 = 0; iMeshP_getPartHandlesFromPartsIdsArr( imesh, prtn, &local_parts[0], local_parts.size(), &ptr, &junk1, &junk2, &ierr ); PCHECK; assert( ptr == &handles[0] ); assert( junk2 == (int)handles.size() ); // get logical ids for local parts std::vector<int> logical_ids; map.local_id_from_rank( rank, logical_ids ); // get neighbors for each local part std::vector< std::vector<iMeshP_Part> > neighbors( logical_ids.size() ); for (size_t i = 0;i < logical_ids.size(); ++i) { int logical_neighbors[5], num_neighbors; get_part_neighbors( logical_ids[i], map.num_parts(), logical_neighbors, num_neighbors ); neighbors[i].resize( num_neighbors ); for (int j = 0; j < num_neighbors; ++j) neighbors[i][j] = map.part_id_from_local_id( logical_neighbors[j] ); std::sort( neighbors[i].begin(), neighbors[i].end() ); } // test iMeshP_getNumPartNbors std::vector< iMeshP_Part > invalid, failed; for (size_t i = 0; i < local_parts.size(); ++i) { int count; iMeshP_getNumPartNbors( imesh, prtn, handles[i], iBase_VERTEX, &count, &ierr ); if (ierr) failed.push_back( local_parts[i] ); else if (count != (int)neighbors[i].size()) invalid.push_back( local_parts[i] ); } if (!failed.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getNumPartNbors failed for " << failed.size() << " parts." << std::endl; ierr = iBase_FAILURE; PCHECK; } if (!invalid.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getNumPartNbors was incorrect for " << invalid.size() << " parts." << std::endl; ierr = iBase_FAILURE; PCHECK; } // test iMeshP_getPartNbors ierr = 0; for (size_t i = 0; i < local_parts.size(); ++i) { int count, junk = 0, another_count; iMeshP_Part* list = 0; iMeshP_getPartNbors( imesh, prtn, handles[i], iBase_VERTEX, &another_count, &list, &junk, &count, &ierr ); assert( count == another_count ); if (ierr) failed.push_back( local_parts[i] ); else { std::sort( list, list+count ); std::vector<iMeshP_Part> cpy( list, list+count ); if (cpy != neighbors[i]) invalid.push_back( local_parts[i] ); free(list); } } if (!failed.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getPartNbors failed for " << failed.size() << " parts." << std::endl; ierr = iBase_FAILURE; } if (!invalid.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getPartNbors was incorrect for " << invalid.size() << " parts." << std::endl; ierr = iBase_FAILURE; } PCHECK; // test iMeshP_getNumPartNborsArr std::vector<int> count_vect( handles.size() ); int* count_arr = &count_vect[0]; junk1 = handles.size(); iMeshP_getNumPartNborsArr( imesh, prtn, &handles[0], handles.size(), iBase_VERTEX, &count_arr, &junk1, &junk2, &ierr ); PCHECK; assert( count_arr = &count_vect[0] ); assert( junk2 == (int)handles.size() ); for (size_t i = 0; i < local_parts.size(); ++i) { if (count_arr[i] != (int)neighbors[i].size()) invalid.push_back( local_parts[i] ); } if (!invalid.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getNumPartNborsArr was incorrect for " << invalid.size() << " parts." << std::endl; ierr = iBase_FAILURE; } PCHECK; // test iMeshP_getPartNborsArr iMeshP_Part* nbor_arr = 0; junk1 = handles.size(), junk2 = 0; int junk3 = 0, nbor_size; iMeshP_getPartNborsArr( imesh, prtn, &handles[0], handles.size(), iBase_VERTEX, &count_arr, &junk1, &junk2, &nbor_arr, &junk3, &nbor_size, &ierr ); PCHECK; assert( count_arr = &count_vect[0] ); assert( junk2 == (int)handles.size() ); std::vector<iMeshP_Part> all_nbors( nbor_arr, nbor_arr + nbor_size ); free( nbor_arr ); std::vector<iMeshP_Part>::iterator j = all_nbors.begin(); bool bad_length = false; for (size_t i = 0; i < local_parts.size(); ++i) { if (all_nbors.end() - j > count_arr[i]) { bad_length = true; break; } if (count_arr[i] != (int)neighbors[i].size()) { invalid.push_back( local_parts[i] ); } else { std::vector<iMeshP_Part>::iterator e = j + count_arr[i]; std::sort( j, e ); if (!std::equal( j, e, neighbors[i].begin() )) invalid.push_back( local_parts[i] ); } } if (bad_length) { std::cerr << "Processor " << rank << ": iMeshP_getPartNborsArr had inconsistent result array lengths." << std::endl; ierr = iBase_FAILURE; } if (!invalid.empty()) { std::cerr << "Processor " << rank << ": iMeshP_getPartNborsArr was incorrect for " << invalid.size() << " parts." << std::endl; ierr = iBase_FAILURE; } PCHECK; return 0; } // Determine the expected vertices on the interface between two parts. // Returns no vertices for non-adjacient parts and fails if both parts // are the same. // See create_mesh(..) for the assumed mesh. static int interface_verts( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, iMeshP_PartHandle local_part, iMeshP_Part other_part, const PartMap& map, std::vector<iBase_EntityHandle> &vtx_handles ) { int ierr, rank; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); iMeshP_Part local_id; iMeshP_getPartIdFromPartHandle( imesh, prtn, local_part, &local_id, &ierr ); CHKERR; const int local_logical = map.local_id_from_part_id( local_id ); const int other_logical = map.local_id_from_part_id( other_part ); // get grid of local vertices iBase_EntityHandle verts[3][3]; const double xbase = (local_id / 2) * 2; const double ybase = (local_id % 2) * 2; // get quads in partition iBase_EntityHandle quads[4], *ptr = quads; int junk1 = 4, junk2; iMesh_getEntities( imesh, local_part, iBase_FACE, iMesh_QUADRILATERAL, &ptr, &junk1, &junk2, &ierr ); CHKERR; assert( ptr == quads ); assert( junk1 == 4 ); assert( junk2 == 4 ); // get vertices in quads iBase_EntityHandle conn[16]; int offsets[5], *off_ptr = offsets, junk3 = 5, junk4; ptr = conn; junk1 = 16; iMesh_getEntArrAdj( imesh, quads, 4, iBase_VERTEX, &ptr, &junk1, &junk2, &off_ptr, &junk3, &junk4, &ierr ); CHKERR; assert( ptr == conn ); assert( junk1 == 16 ); assert( junk2 == 16 ); assert( off_ptr == offsets ); assert( junk3 == 5 ); assert( junk4 == 5 ); // make unique vertex list std::sort( conn, conn + 16 ); const int num_vtx = std::unique( conn, conn+16 ) - conn; assert(9 == num_vtx); // get vertex coords std::vector<double> coords(27); ierr = get_coords( imesh, conn, 9, &coords[0] ); CHKERR; // use vertex coords to determine logical position for (int i = 0; i < num_vtx; ++i) { int x = (int)round(coords[3*i ] - xbase); int y = (int)round(coords[3*i+1] - ybase); if (x < 0 || x > 2 || y < 0 || y > 2) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " Invalid vertex coordinate: (" << coords[3*i] << ", " << coords[3*i+1] << ", " << coords[3*i+2] << ")" << std::endl << " For logical partition " << local_id << std::endl; return iBase_FAILURE; } verts[x][y] = conn[i]; } if (local_logical % 2) { switch (other_logical - local_logical) { case 0: return iBase_FAILURE; case 1: // upper right vtx_handles.resize(1); vtx_handles[0] = verts[2][0]; break; case 2: // right vtx_handles.resize(3); std::copy( verts[2], verts[2]+3, vtx_handles.begin() ); break; case -1: // above vtx_handles.resize(3); vtx_handles[0] = verts[0][0]; vtx_handles[1] = verts[1][0]; vtx_handles[2] = verts[2][0]; break; case -2: // left vtx_handles.resize(3); std::copy( verts[0], verts[0]+3, vtx_handles.begin() ); break; case -3: // upper left vtx_handles.resize(1); vtx_handles[0] = verts[0][0]; break; default: vtx_handles.clear(); break; } } else { switch (other_logical - local_logical) { case 0: return iBase_FAILURE; case 1: // below vtx_handles.resize(3); vtx_handles[0] = verts[0][2]; vtx_handles[1] = verts[1][2]; vtx_handles[2] = verts[2][2]; break; case 2: // right vtx_handles.resize(3); std::copy( verts[2], verts[2]+3, vtx_handles.begin() ); break; case 3: // lower right vtx_handles.resize(1); vtx_handles[0] = verts[2][2]; break; case -1: // lower left vtx_handles.resize(1); vtx_handles[0] = verts[0][2]; break; case -2: // left vtx_handles.resize(3); std::copy( verts[0], verts[0]+3, vtx_handles.begin() ); break; default: vtx_handles.clear(); break; } } return iBase_SUCCESS; } /**\brief Test querying of part boundary entities * * Test: * - iMeshP_getNumPartBdryEnts * - iMeshP_getPartBdryEnts */ int test_get_part_boundary( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr, rank; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // get local part handles and part ids, and global part id list std::vector<iMeshP_PartHandle> local_handles; std::vector<iMeshP_Part> local_ids; std::vector<iMeshP_Part> all_parts = map.get_parts(); std::map< iMeshP_PartHandle, std::vector<iBase_EntityHandle> > part_bdry; ierr = get_local_parts( imesh, prtn, local_handles, &local_ids ); CHKERR; // for each combination of local part with any other part, // check for valid function values. std::vector< std::pair<iMeshP_Part,iMeshP_Part> > num_failed, num_error, list_failed, list_error, error; for (size_t i = 0; i < local_handles.size(); ++i) { iMeshP_PartHandle local_handle = local_handles[i]; iMeshP_Part local_id = local_ids[i]; for (std::vector<iMeshP_Part>::iterator j = all_parts.begin(); j != all_parts.end(); ++j) { iMeshP_Part other_id = *j; if (other_id == local_id) continue; std::pair<iMeshP_Part,iMeshP_Part> part_pair; part_pair.first = local_id; part_pair.second = other_id; // get expected values std::vector<iBase_EntityHandle> shared_verts; ierr = interface_verts( imesh, prtn, local_handle, other_id, map, shared_verts ); if (ierr != iBase_SUCCESS) { error.push_back( part_pair ); continue; } std::sort( shared_verts.begin(), shared_verts.end() ); // test iMeshP_getNumPartBdryEnts int count; iMeshP_getNumPartBdryEnts( imesh, prtn, local_handle, iBase_VERTEX, iMesh_POINT, other_id, &count, &ierr ); if (iBase_SUCCESS != ierr) num_error.push_back( part_pair ); else if (count != (int)shared_verts.size()) num_failed.push_back( part_pair ); // test iMeshP_getPartBdryEnts iBase_EntityHandle* ptr = 0; int junk = 0; iMeshP_getPartBdryEnts( imesh, prtn, local_handle, iBase_VERTEX, iMesh_POINT, other_id, &ptr, &junk, &count, &ierr ); if (iBase_SUCCESS != ierr) list_error.push_back( part_pair ); else { std::copy( ptr, ptr + count, std::back_inserter( part_bdry[local_handles[i]] ) ); std::sort( ptr, ptr + count ); if ((int)shared_verts.size() != count || !std::equal( shared_verts.begin(), shared_verts.end(), ptr )) list_failed.push_back( part_pair ); free(ptr); } } } if (!error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " Internal error for " << error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!num_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getNumPartBdryEnts return error for " << num_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!list_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getPartBdryEnts return error for " << list_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!num_failed.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getNumPartBdryEnts return incorrect results for " << num_failed.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!list_failed.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getPartBdryEnts return incorrect results for " << list_failed.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (iBase_SUCCESS != ierr) return ierr; // test with iMeshP_ALL_PARTS for (size_t i = 0; i < local_handles.size(); ++i) { std::vector<iBase_EntityHandle>& exp_bdry = part_bdry[local_handles[i]]; std::sort( exp_bdry.begin(), exp_bdry.end() ); exp_bdry.erase( std::unique( exp_bdry.begin(), exp_bdry.end() ), exp_bdry.end() ); std::pair<iMeshP_Part,iMeshP_Part> part_pair; part_pair.first = local_ids[i]; part_pair.second = iMeshP_ALL_PARTS; int num = 0; iMeshP_getNumPartBdryEnts( imesh, prtn, local_handles[i], iBase_VERTEX, iMesh_POINT, iMeshP_ALL_PARTS, &num, &ierr ); if (ierr) num_error.push_back( part_pair ); else if (num != (int)exp_bdry.size()) num_failed.push_back( part_pair ); iBase_EntityHandle* bdry = 0; int junk = num = 0; iMeshP_getPartBdryEnts( imesh, prtn, local_handles[i], iBase_VERTEX, iMesh_POINT, iMeshP_ALL_PARTS, &bdry, &junk, &num, &ierr ); if (ierr) list_error.push_back( part_pair ); else { std::sort( bdry, bdry+num ); if (num != (int)exp_bdry.size() || !std::equal( bdry, bdry+num, exp_bdry.begin() )) list_failed.push_back( part_pair ); free(bdry); } } if (!num_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getNumPartBdryEnts return error for " << num_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!list_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getPartBdryEnts return error for " << list_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!num_failed.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getNumPartBdryEnts return incorrect results for " << num_failed.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!list_failed.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_getPartBdryEnts return incorrect results for " << list_failed.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } return ierr; } /**\brief Test querying of part boundary entities * * Test: * - iMeshP_initPartBdryEntIter * - iMeshP_initPartBdryEntArrIter */ int test_part_boundary_iter( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr, rank, has_data; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // get local part handles and part ids, and global part id list std::vector<iMeshP_PartHandle> local_handles; std::vector<iMeshP_Part> local_ids; std::vector<iMeshP_Part> all_parts = map.get_parts(); ierr = get_local_parts( imesh, prtn, local_handles, &local_ids ); CHKERR; std::vector< std::pair<iMeshP_Part,iMeshP_Part> > single_failed, single_error, single_step_error, array_failed, array_error, array_step_error; for (size_t i = 0; i < local_handles.size(); ++i) { iMeshP_PartHandle local_handle = local_handles[i]; iMeshP_Part local_id = local_ids[i]; for (std::vector<iMeshP_Part>::iterator j = all_parts.begin(); j != all_parts.end(); ++j) { iMeshP_Part other_id = *j; if (other_id == local_id) continue; std::pair<iMeshP_Part,iMeshP_Part> part_pair; part_pair.first = local_id; part_pair.second = other_id; // get expected values std::vector<iBase_EntityHandle> shared_verts; ierr = interface_verts( imesh, prtn, local_handle, other_id, map, shared_verts ); if (ierr != iBase_SUCCESS || 0 == shared_verts.size()) continue; std::sort( shared_verts.begin(), shared_verts.end() ); // test single entity iterator iBase_EntityIterator siter; iMeshP_initPartBdryEntIter( imesh, prtn, local_handle, iBase_VERTEX, iMesh_POINT, other_id, &siter, &ierr ); if (ierr != iBase_SUCCESS) { single_error.push_back( part_pair ); } else { std::vector<iBase_EntityHandle> results; for (;;) { iBase_EntityHandle handle; iMesh_getNextEntIter( imesh, siter, &handle, &has_data, &ierr ); if (ierr != iBase_SUCCESS) { single_step_error.push_back( part_pair ); break; } if (!has_data) break; results.push_back(handle); } std::sort( results.begin(), results.end() ); if (results.size() != shared_verts.size() || !std::equal( results.begin(), results.end(), shared_verts.begin())) single_failed.push_back( part_pair ); } iMesh_endEntIter( imesh, siter, &ierr ); // test array iterator iBase_EntityArrIterator aiter; iMeshP_initPartBdryEntArrIter( imesh, prtn, local_handle, iBase_VERTEX, iMesh_POINT, shared_verts.size(), other_id, &aiter, &ierr ); if (ierr != iBase_SUCCESS) { array_error.push_back( part_pair ); continue; } iBase_EntityHandle results[5], *ptr = results; int junk = 5, count; iMesh_getNextEntArrIter( imesh, aiter, &ptr, &junk, &count, &has_data, &ierr ); if (ierr != iBase_SUCCESS || !has_data) { array_step_error.push_back( part_pair ); continue; } assert(count <= 5); assert(ptr == results); std::sort(ptr, ptr + count); if (count != (int)shared_verts.size() || !std::equal( shared_verts.begin(), shared_verts.end(), results )) array_failed.push_back( part_pair ); } } if (!single_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_initPartBdryEntIter return error for " << single_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!single_step_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMesh_getNextEntIter return error for " << single_step_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!single_failed.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_initPartBdryEntIter iterator iterated over invalid entities for " << single_failed.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!array_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_initPartBdryEntArrIter return error for " << array_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!array_step_error.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMesh_getNextEntArrIter return error for " << array_step_error.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } if (!array_failed.empty()) { std::cerr << "Processor " << rank << ": Error at " __FILE__ ":" << __LINE__ << std::endl << " iMeshP_initPartBdryEntArrIter iterator iterated over invalid entities for " << array_failed.size() << " part pairs." << std::endl; ierr = iBase_FAILURE; } return ierr; } /**\brief Test adjacent entity query * * Test: * - iMeshP_getAdjEntities */ int test_get_adjacencies( iMesh_Instance /* imesh */, iMeshP_PartitionHandle /* prtn */, const PartMap& ) { return iBase_SUCCESS; } /**\brief Test entity iterators * * Test: * - iMeshP_initEntIter * - iMeshP_initEntArrIter */ int test_entity_iterator( iMesh_Instance /*imesh */, iMeshP_PartitionHandle /*prtn*/, const PartMap& ) { return iBase_SUCCESS; } /**\brief Test entity owner queries * * Test: * - iMeshP_getEntOwnerPart * - iMeshP_getEntOwnerPartArr * - iMeshP_isEntOwner * - iMeshP_isEntOwnerArr */ int test_entity_owner( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& /* map */ ) { int ierr, rank, size; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); // get local part handles and part ids std::vector<iMeshP_PartHandle> local_handles; std::vector<iMeshP_Part> local_ids; ierr = get_local_parts( imesh, prtn, local_handles, &local_ids ); PCHECK; // test iMeshP_getEntOwnerPart for quads in each part std::vector<iBase_EntityHandle> all_quads; std::vector<iMeshP_Part> quad_owners; int invalid_count = 0; for (size_t i = 0; i < local_handles.size(); ++i) { std::vector<iBase_EntityHandle> quads; ierr = get_entities( imesh, local_handles[0], iBase_FACE, iMesh_QUADRILATERAL, quads ); if (ierr) break; for (size_t j = 0; j < quads.size(); ++j) { all_quads.push_back( quads[j] ); quad_owners.push_back( local_ids[i] ); iMeshP_Part owner; iMeshP_getEntOwnerPart( imesh, prtn, quads[j], &owner, &ierr ); if (iBase_SUCCESS != ierr) break; if (owner != local_ids[i]) ++invalid_count; } if (iBase_SUCCESS != ierr) break; } PCHECK; ASSERT(0 == invalid_count); // test iMeshP_getEntOwnerPartArr for quads in each part invalid_count = 0; for (size_t i = 0; i < local_handles.size(); ++i) { std::vector<iBase_EntityHandle> quads; ierr = get_entities( imesh, local_handles[0], iBase_FACE, iMesh_QUADRILATERAL, quads ); if (ierr) break; std::vector<iMeshP_Part> owners(quads.size()), expected(quads.size(),local_ids[i]); int junk = owners.size(), count; iMeshP_Part* ptr = &owners[0]; iMeshP_getEntOwnerPartArr( imesh, prtn, &quads[0], quads.size(), &ptr, &junk, &count, &ierr ); if (ierr) break; assert( ptr == &owners[0] ); assert( junk == (int)owners.size() ); assert( count == (int)quads.size() ); if (owners != expected) ++invalid_count; } PCHECK; ASSERT(0 == invalid_count); // get all vertices iBase_EntityHandle* vtx_arr = 0; int junk1 = 0, num_vtx; int *junk2 = 0, junk3 = 0, junk4; iMesh_getEntArrAdj( imesh, &all_quads[0], all_quads.size(), iBase_VERTEX, &vtx_arr, &junk1, &num_vtx, &junk2, &junk3, &junk4, &ierr ); PCHECK; free(junk2); std::sort( vtx_arr, vtx_arr + num_vtx ); num_vtx = std::unique( vtx_arr, vtx_arr + num_vtx ) - vtx_arr; std::vector<iBase_EntityHandle> all_verts( vtx_arr, vtx_arr + num_vtx ); free(vtx_arr); // check consistency between iMeshP_getEntOwnerPart and iMeshP_getEntOwnerPartArr // for all vertices std::vector<iMeshP_Part> vert_owners( all_verts.size() ); junk1 = vert_owners.size(); iMeshP_Part* junk5 = &vert_owners[0]; iMeshP_getEntOwnerPartArr( imesh, prtn, &all_verts[0], all_verts.size(), &junk5, &junk1, &junk3, &ierr ); PCHECK; assert( junk5 == &vert_owners[0] ); assert( junk1 == (int)vert_owners.size() ); assert( junk3 == (int)all_verts.size() ); invalid_count = 0; for (size_t i = 0; i < all_verts.size(); ++i) { iMeshP_Part owner; iMeshP_getEntOwnerPart( imesh, prtn, all_verts[i], &owner, &ierr ); if (iBase_SUCCESS != ierr || owner != vert_owners[i]) ++invalid_count; } ASSERT(0 == invalid_count); // get lists for all entities std::vector<iBase_EntityHandle> all_entities(all_verts); std::copy( all_quads.begin(), all_quads.end(), std::back_inserter(all_entities) ); std::vector<iMeshP_Part> all_owners( vert_owners ); std::copy( quad_owners.begin(), quad_owners.end(), std::back_inserter(all_owners) ); // check consistency of iMeshP_isEntOwner for all entities invalid_count = 0; ierr = iBase_SUCCESS; for (size_t i = 0; i < local_handles.size(); ++i) { for (size_t j = 0; ierr == iBase_SUCCESS && j < all_entities.size(); ++j) { int is_owner; iMeshP_isEntOwner( imesh, prtn, local_handles[i], all_entities[j], &is_owner, &ierr ); if (ierr != iBase_SUCCESS) break; if (!is_owner == (local_ids[i] == all_owners[j])) ++invalid_count; } } PCHECK; ASSERT(0 == invalid_count); // check consistency of iMeshP_isEntOwnerArr for all entities for (size_t i = 0; i < local_handles.size(); ++i) { std::vector<int> is_owner_list(all_entities.size()); junk1 = is_owner_list.size(); int* junk6 = &is_owner_list[0]; iMeshP_isEntOwnerArr( imesh, prtn, local_handles[i], &all_entities[0], all_entities.size(), &junk6, &junk1, &junk3, &ierr ); if (iBase_SUCCESS != ierr) break; assert( junk6 == &is_owner_list[0] ); assert( junk1 == (int)is_owner_list.size() ); assert( junk3 == (int)all_entities.size() ); invalid_count = 0; for (size_t j = 0; j < all_entities.size(); ++j) { if (!(is_owner_list[j]) == (local_ids[0] == all_owners[j])) ++invalid_count; } } PCHECK; ASSERT(0 == invalid_count); // check globally consistent owners for all vertices // first communicate total number of vertex entries to be sent to root proc int local_count = all_verts.size(), global_count = 0; ierr = MPI_Reduce( &local_count, &global_count, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD ); CHKERR; // for each vertex, store { (x << 2) | y, owning part id } std::vector<int> vtxdata( 2 * all_verts.size() ); std::vector<double> coords( 3 * all_verts.size() ); ierr = get_coords( imesh, &all_verts[0], all_verts.size(), &coords[0] ); CHKERR; for (size_t i = 0; i < all_verts.size(); ++i) { int x = (int)round(coords[3*i ]); int y = (int)round(coords[3*i+1]); vtxdata[2*i ] = (x << 2) | y; vtxdata[2*i+1] = vert_owners[i]; } // collect all data on root procesor std::vector<int> all_data( 2*global_count ); std::vector<int> displ(size), counts(size); if (1 == size) { std::copy(vtxdata.begin(), vtxdata.end(), all_data.begin()); counts[0] = vtxdata.size(); displ[0] = 0; } else { ierr = MPI_Gatherv( &vtxdata[0], vtxdata.size(), MPI_INT, &all_data[0], &counts[0], &displ[0], MPI_INT, 0, MPI_COMM_WORLD ); CHKERR; } if (rank == 0) { // map from vertex tag to indices into data std::multimap<int,int> data_map; for (int i = 0; i < global_count; ++i) { std::pair<int,int> p; p.first = all_data[2*i]; p.second = i; data_map.insert( p ); } // check consistent data for each vtx std::multimap<int,int>::const_iterator a, b; for (a = data_map.begin(); a != data_map.end(); a = b) { for (b = a; b != data_map.end() && a->first == b->first; ++b) { int idx1 = a->second; int idx2 = b->second; if (all_data[2*idx1+1] == all_data[2*idx2+1]) continue; ierr = iBase_FAILURE; int proc1 = std::lower_bound(displ.begin(), displ.end(),2*idx1) - displ.begin(); if (displ[proc1] != 2*idx1) ++proc1; int proc2 = std::lower_bound(displ.begin(), displ.end(),2*idx2) - displ.begin(); if (displ[proc2] != 2*idx2) ++proc2; std::cerr << "Error at " __FILE__ ":" << __LINE__ << " : " << std::endl << " For vertex at (" << (a->first >> 2) << ", " << (a->first & 3) << ") :" << std::endl << " Processor " << proc1 << " has " << all_data[2*idx1+1] << " as the owning part" << std::endl << " Processor " << proc2 << " has " << all_data[2*idx2+1] << " as the owning part" << std::endl; } } } return ierr; } static int get_part_boundary_verts( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map, iMeshP_PartHandle part, std::vector<iBase_EntityHandle>& boundary ) { int ierr, logical_id; ierr = map.part_from_coords( imesh, part, logical_id ); CHKERR; int neighbors[5], num_neighbors; get_part_neighbors( logical_id, map.get_parts().size(), neighbors, num_neighbors ); for (int j = 0; j < num_neighbors; ++j) { std::vector<iBase_EntityHandle> iface; ierr = interface_verts( imesh, prtn, part, neighbors[j], map, iface ); CHKERR; std::copy( iface.begin(), iface.end(), std::back_inserter(boundary) ); } std::sort( boundary.begin(), boundary.end() ); boundary.erase( std::unique( boundary.begin(), boundary.end() ), boundary.end() ); return iBase_SUCCESS; } /**\brief Test entity status * * Test: * - iMeshP_getEntStatus * - iMeshP_getEntStatusArr */ int test_entity_status( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr, rank, size; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); // get local part handles std::vector<iMeshP_PartHandle> parts; ierr = get_local_parts( imesh, prtn, parts ); PCHECK; // for each part int num_quad_ent_incorrect = 0, num_quad_ent_error = 0; int num_quad_arr_incorrect = 0, num_quad_arr_error = 0; int num_vert_ent_incorrect = 0, num_vert_ent_error = 0; int num_vert_arr_incorrect = 0, num_vert_arr_error = 0; for (size_t i = 0; i < parts.size(); ++i) { const iMeshP_PartHandle part = parts[i]; // get quads and vertices std::vector<iBase_EntityHandle> quads, verts; ierr = get_part_quads_and_verts( imesh, part, quads, verts ); if (ierr) break; // check quad status (no ghosting yet) for (size_t j = 0; j < quads.size(); ++j) { int status; iMeshP_getEntStatus( imesh, prtn, part, quads[j], &status, &ierr ); if (ierr != iBase_SUCCESS) { ++num_quad_ent_error; ierr = iBase_SUCCESS; continue; } if (status != iMeshP_INTERNAL) ++num_quad_ent_incorrect; } // check quad status using iMeshP_getEntStatusArr std::vector<int> stat_list(quads.size()); int* junk1 = &stat_list[0]; int junk2 = stat_list.size(), count; iMeshP_getEntStatusArr( imesh, prtn, part, &quads[0], quads.size(), &junk1, &junk2, &count, &ierr ); if (ierr != iBase_SUCCESS) { ++num_quad_arr_error; ierr = iBase_SUCCESS; continue; } assert( junk1 == &stat_list[0] ); assert( junk2 == (int)stat_list.size() ); assert( count == (int)quads.size() ); for (size_t j = 0; j < quads.size(); ++j) if (stat_list[j] != iMeshP_INTERNAL) ++num_quad_arr_incorrect; // figure out which vertices are on the boundary std::vector<iBase_EntityHandle> boundary; ierr = get_part_boundary_verts(imesh, prtn, map, part, boundary); if (ierr) break; std::sort( boundary.begin(), boundary.end() ); // check vertex status (no ghosting yet) for (size_t j = 0; j < verts.size(); ++j) { int status; iMeshP_getEntStatus( imesh, prtn, part, verts[j], &status, &ierr ); if (ierr != iBase_SUCCESS) { ++num_vert_ent_error; ierr = iBase_SUCCESS; continue; } bool on_boundary = std::binary_search( boundary.begin(), boundary.end(), verts[j] ); if (status != (on_boundary ? iMeshP_BOUNDARY : iMeshP_INTERNAL)) ++num_vert_ent_incorrect; } // check vert status using iMeshP_getEntStatusArr stat_list.resize(verts.size()); junk1 = &stat_list[0]; junk2 = stat_list.size(); iMeshP_getEntStatusArr( imesh, prtn, part, &verts[0], verts.size(), &junk1, &junk2, &count, &ierr ); if (ierr != iBase_SUCCESS) { ++num_vert_arr_error; ierr = iBase_SUCCESS; continue; } assert( junk1 == &stat_list[0] ); assert( junk2 == (int)stat_list.size() ); assert( count == (int)verts.size() ); for (size_t j = 0; j < verts.size(); ++j) { bool on_boundary = std::binary_search( boundary.begin(), boundary.end(), verts[j] ); if (stat_list[j] != (on_boundary ? iMeshP_BOUNDARY : iMeshP_INTERNAL)) ++num_vert_arr_incorrect; } } PCHECK; // check if loop interrupted by any internal errors ASSERT( 0 == num_quad_ent_error ); ASSERT( 0 == num_quad_arr_error ); ASSERT( 0 == num_vert_ent_error ); ASSERT( 0 == num_vert_arr_error ); ASSERT( 0 == num_quad_ent_incorrect ); ASSERT( 0 == num_quad_arr_incorrect ); ASSERT( 0 == num_vert_ent_incorrect ); ASSERT( 0 == num_vert_arr_incorrect ); return iBase_SUCCESS; } /**\brief Test information about entity copies for interface entities * * Test: * - iMeshP_getNumCopies * - iMeshP_getCopyParts */ int test_entity_copy_parts( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr, rank, size; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); // get local part handles std::vector<iMeshP_PartHandle> parts; ierr = get_local_parts( imesh, prtn, parts ); PCHECK; ASSERT( !parts.empty() ); // select a singe part to test const iMeshP_PartHandle part = parts[0]; int logical_id; ierr = map.part_from_coords( imesh, part, logical_id ); CHKERR; const iMeshP_Part part_id = map.part_id_from_local_id( logical_id ); // get vertices in part std::vector<iBase_EntityHandle> quads, verts; ierr = get_part_quads_and_verts( imesh, part, quads, verts ); PCHECK; // get neighbors int neighbors[5], num_neighbors; get_part_neighbors( logical_id, map.get_parts().size(), neighbors, num_neighbors ); // build map of sharing data for each vertex std::map< iBase_EntityHandle, std::vector<iMeshP_Part> > vert_sharing; for (int j = 0; j < num_neighbors; ++j) { std::vector<iBase_EntityHandle> iface; ierr = interface_verts( imesh, prtn, part, neighbors[j], map, iface ); CHKERR; for (size_t k = 0; k < iface.size(); ++k) vert_sharing[iface[k]].push_back( map.part_id_from_local_id( neighbors[j] ) ); } // test getNumCopies for each vertex std::map< iBase_EntityHandle, std::vector<iMeshP_Part> >::iterator i; int num_failed = 0, num_incorrect = 0; for (i = vert_sharing.begin(); i != vert_sharing.end(); ++i) { int count; iBase_EntityHandle vtx = i->first; iMeshP_getNumCopies( imesh, prtn, vtx, &count, &ierr ); if (ierr) ++num_failed; else if ((unsigned)count != i->second.size()+1) // add one for the part we queried from ++num_incorrect; } ASSERT( 0 == num_failed ); ASSERT( 0 == num_incorrect ); // get getCopyParts for each vertex num_failed = num_incorrect = 0; for (i = vert_sharing.begin(); i != vert_sharing.end(); ++i) { iMeshP_Part* list = 0; int junk = 0, count; iMeshP_getCopyParts( imesh, prtn, i->first, &list, &junk, &count, &ierr ); if (iBase_SUCCESS != ierr) { ++num_failed; continue; } if ((unsigned)count != i->second.size()+1) { // add one for the part we queried from ++num_incorrect; free(list); continue; } std::vector<iMeshP_Part> expected( i->second ); expected.push_back( part_id ); std::sort( list, list+count ); std::sort( expected.begin(), expected.end() ); bool eq = std::equal( list, list+count, expected.begin() ); free( list ); if (!eq) ++num_incorrect; } ASSERT( 0 == num_failed ); ASSERT( 0 == num_incorrect ); return iBase_SUCCESS; } // store remote handle data for a vertex struct VtxCopyData { std::vector<iMeshP_Part> parts; std::vector<iBase_EntityHandle> handles; }; /**\brief Test information about entity copies for interface entities * * Test: * - iMeshP_getCopies * - iMeshP_getCopyOnPart * - iMeshP_getOwnerCopy */ int test_entity_copies( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& /* map */ ) { int ierr, rank, size; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); // generate a unique ID for each vertex using the coordinates. // see create_mesh(..): each vertex has integer coordinates (x,y,0) // with x in [0,inf] and y in [0,4] // then to an Allgatherv to exchange handles for each processor // cast everything to iBase_EntityHandle so we can pack it all in one communication MPI_Datatype tmp_type; if (sizeof(iBase_EntityHandle) == sizeof(unsigned)) tmp_type = MPI_UNSIGNED; else if (sizeof(iBase_EntityHandle) == sizeof(unsigned long)) tmp_type = MPI_UNSIGNED_LONG; else return iBase_FAILURE; const MPI_Datatype type = tmp_type; // make it const // get local part handles std::vector<iMeshP_PartHandle> parts; ierr = get_local_parts( imesh, prtn, parts ); PCHECK; std::vector<iMeshP_Part> part_ids(parts.size()); iMeshP_Part* junk1 = &part_ids[0]; int junk2 = part_ids.size(), junk3; iMeshP_getPartIdsFromPartHandlesArr( imesh, prtn, &parts[0], parts.size(), &junk1, &junk2, &junk3, &ierr ); PCHECK; assert( junk1 == &part_ids[0] ); assert( junk2 == (int)part_ids.size() ); assert( junk3 == (int)parts.size() ); // build list of {vtx_id, part_id, handle} tuples to send // also build list of local vertex handles std::vector<iBase_EntityHandle> local_data, local_vertices; for (size_t i = 0; i < parts.size(); ++i) { // get vertices std::vector<iBase_EntityHandle> quads, verts; ierr = get_part_quads_and_verts( imesh, parts[i], quads, verts ); if (ierr) break; // add all vertices to local_data for (size_t j = 0; j < verts.size(); ++j) { int tag; ierr = vertex_tag( imesh, verts[j], tag ); if (ierr) break; long tmp_h = tag; local_data.push_back((iBase_EntityHandle)tmp_h); tmp_h = part_ids[i]; local_data.push_back((iBase_EntityHandle)tmp_h); local_data.push_back( verts[j] ); } if (ierr) break; std::copy( verts.begin(), verts.end(), std::back_inserter(local_vertices) ); } // build list of local vertices std::sort( local_vertices.begin(), local_vertices.end() ); local_vertices.erase( std::unique( local_vertices.begin(), local_vertices.end() ), local_vertices.end() ); std::vector<int> local_vtx_tags(local_vertices.size()); CHKERR; for (size_t i = 0; i < local_vertices.size(); ++i) { ierr = vertex_tag( imesh, local_vertices[i], local_vtx_tags[i] ); if (ierr) break; } CHKERR; // communicate data std::vector<int> gcounts(size), gdisp(size); int local_data_size = local_data.size(); ierr = MPI_Allgather( &local_data_size, 1, MPI_INT, &gcounts[0], 1, MPI_INT, MPI_COMM_WORLD ); CHKERR; gdisp[0] = 0; for (int i = 1; i < size; ++i) gdisp[i] = gdisp[i-1]+gcounts[i-1]; std::vector<iBase_EntityHandle> global_data( gdisp[size-1]+gcounts[size-1] ); ierr = MPI_Allgatherv( &local_data[0], local_data_size, type, &global_data[0], &gcounts[0], &gdisp[0], type, MPI_COMM_WORLD ); CHKERR; // arrange global data in a more useful way std::map<int,VtxCopyData> vtx_sharing; assert( global_data.size() % 3 == 0 ); for (size_t i = 0; i < global_data.size(); i += 3) { int tag = (int)(size_t)global_data[i ]; iMeshP_Part part = (iMeshP_Part)(size_t)global_data[i+1]; iBase_EntityHandle handle = global_data[i+2]; vtx_sharing[tag].parts.push_back( part ); vtx_sharing[tag].handles.push_back( handle ); } // test iMeshP_getCopies for each local vertex int num_error = 0, num_incorrect = 0, junk4; for (size_t i = 0; i < local_vertices.size(); ++i) { int num_copies = -1; //iMeshP_Part* part_ids = 0; iMeshP_Part* ptr_part_ids = 0; // Use ptr_part_ids to avoid shadowing std::vector<iMeshP_Part> part_ids iBase_EntityHandle* copies = 0; junk2 = junk3 = junk4 = 0; iMeshP_getCopies( imesh, prtn, local_vertices[i], &ptr_part_ids, &junk2, &num_copies, &copies, &junk3, &junk4, &ierr ); if (iBase_SUCCESS != ierr) { ++num_error; continue; } assert( junk4 == num_copies ); VtxCopyData& expected = vtx_sharing[local_vtx_tags[i]]; if (num_copies != (int)expected.parts.size()) ++num_incorrect; else for (size_t j = 0; j < expected.parts.size(); ++j) { int idx = std::find( ptr_part_ids, ptr_part_ids + num_copies, expected.parts[j] ) - ptr_part_ids; if (idx == num_copies || copies[idx] != expected.handles[j]) { ++num_incorrect; break; } } free(ptr_part_ids); free(copies); } ASSERT( 0 == num_error ); ASSERT( 0 == num_incorrect ); // test iMeshP_getCopyOnPart for each local vertex num_error = num_incorrect = 0; for (size_t i = 0; i < local_vertices.size(); ++i) { VtxCopyData& expected = vtx_sharing[local_vtx_tags[i]]; for (size_t j = 0; j < expected.parts.size(); ++j) { iBase_EntityHandle copy; iMeshP_getCopyOnPart( imesh, prtn, local_vertices[i], expected.parts[j], &copy, &ierr ); if (iBase_SUCCESS != ierr) ++num_error; else if (expected.handles[j] != copy) ++num_incorrect; } } ASSERT( 0 == num_error ); ASSERT( 0 == num_incorrect ); // test iMeshP_getOwnerCopy for each local vertex num_error = num_incorrect = 0; for (size_t i = 0; i < local_vertices.size(); ++i) { VtxCopyData& expected = vtx_sharing[local_vtx_tags[i]]; iMeshP_Part owner_id = 0; iMeshP_getEntOwnerPart( imesh, prtn, local_vertices[i], &owner_id, &ierr ); if (iBase_SUCCESS != ierr) continue; // not testing getEntOwnerPart here size_t idx = std::find( expected.parts.begin(), expected.parts.end(), owner_id ) - expected.parts.begin(); if (idx == expected.parts.size()) continue; // not testing getEntOwnerPart here iMeshP_Part owner_id_2 = 0; iBase_EntityHandle copy = 0; iMeshP_getOwnerCopy( imesh, prtn, local_vertices[i], &owner_id_2, &copy, &ierr ); if (iBase_SUCCESS != ierr) ++num_error; else if (owner_id_2 != owner_id && copy != expected.handles[idx]) ++num_incorrect; } ASSERT( 0 == num_error ); ASSERT( 0 == num_incorrect ); return iBase_SUCCESS; } int get_num_adj_quads( iMesh_Instance imesh, iBase_EntityHandle vtx, int& num ) { iBase_EntityHandle* list = 0; int ierr, junk = 0; iMesh_getEntAdj( imesh, vtx, iBase_FACE, &list, &junk, &num, &ierr ); if (iBase_SUCCESS == ierr) free(list); return ierr; } int get_adj( iMesh_Instance imesh, iBase_EntityHandle ent, int type, std::vector<iBase_EntityHandle>& adj ) { iBase_EntityHandle* list = 0; int ierr, num, junk = 0; iMesh_getEntAdj( imesh, ent, type, &list, &junk, &num, &ierr ); if (iBase_SUCCESS == ierr) { std::copy( list, list+num, std::back_inserter(adj) ); free( list ); } return ierr; } // assume regular quad mesh int get_boundary_vertices( iMesh_Instance imesh, std::vector<iBase_EntityHandle>& bdry ) { int ierr, n; iBase_EntitySetHandle root; iMesh_getRootSet( imesh, &root, &ierr ); CHKERR; std::vector<iBase_EntityHandle> all_verts; ierr = get_entities( imesh, root, iBase_VERTEX, iMesh_POINT, all_verts ); CHKERR; bdry.clear(); for (size_t i = 0; i < all_verts.size(); ++i) { ierr = get_num_adj_quads( imesh, all_verts[i], n ); CHKERR; if (n != 4) bdry.push_back( all_verts[i] ); } return iBase_SUCCESS; } int check_one_layer( iMesh_Instance imesh, iBase_EntityHandle vtx, const std::vector<iBase_EntityHandle>& sorted_vertices ) { int ierr; if (std::binary_search( sorted_vertices.begin(), sorted_vertices.end(), vtx )) return iBase_SUCCESS; std::vector<iBase_EntityHandle> quads, verts; ierr = get_adj( imesh, vtx, iBase_FACE, quads ); CHKERR; for (size_t i = 0; i < quads.size(); ++i) { verts.clear(); ierr = get_adj( imesh, quads[i], iBase_VERTEX, verts ); CHKERR; for (size_t j = 0; j < verts.size(); ++j) { if (std::binary_search( sorted_vertices.begin(), sorted_vertices.end(), verts[j] )) return iBase_SUCCESS; } } return iBase_FAILURE; } // get number of adjacent quads to each vertex, both on the local // processor and in the entire mesh int get_num_adj_all( iMesh_Instance imesh, const std::vector<iBase_EntityHandle>& verts, std::vector<int>& num_local_adj, std::vector<int>& num_all_adj ) { int ierr, size; MPI_Comm_size( MPI_COMM_WORLD, &size ); std::vector<int> vtx_tags(verts.size()); num_local_adj.resize( verts.size() ); for (size_t i = 0; i < verts.size(); ++i) { ierr = get_num_adj_quads( imesh, verts[i], num_local_adj[i] ); CHKERR; ierr = vertex_tag( imesh, verts[i], vtx_tags[i] ); CHKERR; } std::vector<int> counts(size), displ(size); int num_vtx = verts.size(); ierr = MPI_Allgather( &num_vtx, 1, MPI_INT, &counts[0], 1, MPI_INT, MPI_COMM_WORLD ); CHKERR; displ[0] = 0; for (int i = 1; i < size; ++i) displ[i] = displ[i-1]+counts[i-1]; int total = displ[size-1]+counts[size-1]; std::vector<int> all_tags(total), all_adj_counts(total); ierr = MPI_Allgatherv( &vtx_tags[0], vtx_tags.size(), MPI_INT, &all_tags[0], &counts[0], &displ[0], MPI_INT, MPI_COMM_WORLD ); CHKERR; ierr = MPI_Allgatherv( &num_local_adj[0], num_local_adj.size(), MPI_INT, &all_adj_counts[0], &counts[0], &displ[0], MPI_INT, MPI_COMM_WORLD ); CHKERR; num_all_adj.clear(); num_all_adj.resize(total,0); for (int i = 0; i < total; ++i) { std::vector<int>::iterator it = std::find( vtx_tags.begin(), vtx_tags.end(), all_tags[i] ); if (it == vtx_tags.end()) continue; int idx = it - vtx_tags.begin(); num_all_adj[idx] += all_adj_counts[i]; } return iBase_SUCCESS; } /**\brief Test creation of ghost entities * * Test: * - iMeshP_createGhostEntsAll */ int test_create_ghost_ents( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& /* map */) { int ierr; // get boundary vertices std::vector<iBase_EntityHandle> bdry; ierr = get_boundary_vertices( imesh, bdry ); PCHECK; // get counts of adjacent entities std::vector<int> num_local_adj, num_global_adj; ierr = get_num_adj_all( imesh, bdry, num_local_adj, num_global_adj ); PCHECK; // create one layer of ghost entities iMeshP_createGhostEntsAll( imesh, prtn, iBase_FACE, iBase_VERTEX, 1, 0, &ierr ); PCHECK; // check that each vertex has the correct number of adjacent entities int num_incorrect = 0; for (size_t i = 0; i < bdry.size(); ++i) { int n; ierr = get_num_adj_quads( imesh, bdry[i], n ); if (iBase_SUCCESS != ierr || num_global_adj[i] != n) ++num_incorrect; } ASSERT( 0 == num_incorrect ); // get new the new boundary std::vector<iBase_EntityHandle> new_bdry; ierr = get_boundary_vertices( imesh, new_bdry ); PCHECK; // check that each vertex on the new boundary is separated by // at most one layer from the old boundary std::sort( bdry.begin(), bdry.end() ); num_incorrect = 0; for (size_t i = 0; i < new_bdry.size(); ++i) { ierr = check_one_layer( imesh, new_bdry[i], bdry ); if (ierr) ++num_incorrect; } ASSERT( 0 == num_incorrect ); // make another layer of ghost entiites bdry.swap( new_bdry ); new_bdry.clear(); ierr = get_num_adj_all( imesh, bdry, num_local_adj, num_global_adj ); PCHECK; iMeshP_createGhostEntsAll( imesh, prtn, iBase_FACE, iBase_VERTEX, 2, 0, &ierr ); PCHECK; // check that each vertex has the correct number of adjacent entities num_incorrect = 0; for (size_t i = 0; i < bdry.size(); ++i) { int n; ierr = get_num_adj_quads( imesh, bdry[i], n ); if (iBase_SUCCESS != ierr || num_global_adj[i] != n) ++num_incorrect; } // check that each vertex on the new boundary is separated by // at most one layer from the old boundary std::sort( bdry.begin(), bdry.end() ); num_incorrect = 0; for (size_t i = 0; i < new_bdry.size(); ++i) { ierr = check_one_layer( imesh, new_bdry[i], bdry ); if (ierr) ++num_incorrect; } ASSERT( 0 == num_incorrect ); return iBase_SUCCESS; } /**\brief Test exchange entities * * Test: * - iMeshP_exchEntArrToPartsAll */ int test_exchange_ents( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map ) { int ierr, rank, size; int num_err = 0; iMeshP_RequestHandle request; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); std::vector<iBase_EntityHandle> all_elems; std::vector<iMeshP_Part> all_ids; std::vector<iBase_EntityHandle> quads; // get local part handles and part ids std::vector<iMeshP_PartHandle> local_handles; std::vector<iMeshP_Part> local_ids; ierr = get_local_parts( imesh, prtn, local_handles, &local_ids ); PCHECK; // get loacal quads before exchange quads.clear(); ierr = get_entities( imesh, local_handles[0], iBase_FACE, iMesh_QUADRILATERAL, quads ); CHKERR; int n_quads = quads.size(); // send all elements in local processor to all other processors for (size_t i = 0; i < map.get_parts().size(); ++i) { if (map.get_parts()[i] == (unsigned int) rank) continue; // skip own rank for (int j = 0; j < n_quads; j++) { all_elems.push_back(quads[j]); all_ids.push_back(map.get_parts()[i]); } } // exchange entities iMeshP_exchEntArrToPartsAll(imesh, prtn, &all_elems[0], all_elems.size(), &all_ids[0], 0, 0, &request, &ierr); if (iBase_SUCCESS != ierr) ++num_err; // get local quads after exchange quads.clear(); ierr = get_entities( imesh, local_handles[0], iBase_FACE, iMesh_QUADRILATERAL, quads ); CHKERR; // # of elements should be # of quads * # of processors ASSERT(quads.size() == (unsigned int) n_quads*size); ASSERT(0 == num_err); return iBase_SUCCESS; } /**\brief Test commuinication of tag data * * Test: * - iMeshP_pushTags * - iMeshP_pushTagsEnt */ int test_push_tag_data_common( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, int num_ghost_layers ) { const char* src_name = "test_src"; const char* dst_name = "test_dst"; int ierr, rank; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); if (num_ghost_layers) { iMeshP_createGhostEntsAll( imesh, prtn, iBase_FACE, iBase_VERTEX, num_ghost_layers, 0, &ierr ); PCHECK; } iBase_TagHandle src_tag, dst_tag; iMesh_createTag( imesh, src_name, 1, iBase_INTEGER, &src_tag, &ierr, strlen(src_name) ); CHKERR; iMesh_createTag( imesh, dst_name, 1, iBase_INTEGER, &dst_tag, &ierr, strlen(dst_name) ); CHKERR; iBase_EntitySetHandle root; iMesh_getRootSet( imesh, &root, &ierr ); CHKERR; std::vector<iBase_EntityHandle> verts; ierr = get_entities( imesh, root, iBase_VERTEX, iMesh_POINT, verts ); CHKERR; // test iMeshP_pushTags // each processor writes its rank on all vertices // after push, each vertex should be tagged with the rank of its owner std::vector<int> tag_vals( verts.size(), rank ); iMesh_setIntArrData( imesh, &verts[0], verts.size(), src_tag, &tag_vals[0], tag_vals.size(), &ierr ); CHKERR; iMeshP_pushTags( imesh, prtn, src_tag, dst_tag, iBase_VERTEX, iMesh_POINT, &ierr ); PCHECK; tag_vals.clear(); tag_vals.resize( verts.size(), -1 ); iBase_TagHandle id_tag; iMesh_getTagHandle( imesh, "GLOBAL_ID", &id_tag, &ierr, strlen("GLOBAL_ID") ); std::vector<int> ids(verts.size()); int* junk1 = &ids[0], junk2 = ids.size(), junk3; iMesh_getIntArrData( imesh, &verts[0], verts.size(), id_tag, &junk1, &junk2, &junk3, &ierr ); PCHECK; int errcount = 0; for (size_t i = 0; i < verts.size(); ++i) { iMesh_getIntData( imesh, verts[i], dst_tag, &tag_vals[i], &ierr ); if (ierr != iBase_SUCCESS) { std::cerr << "Rank " << rank << " : getIntData failed for vertex " << ids[i] << std::endl; std::cerr.flush(); ++errcount; } } ASSERT(0 == errcount); // int *junk1 = &tag_vals[0], junk2 = tag_vals.size(), junk3; // iMesh_getIntArrData( imesh, &verts[0], verts.size(), dst_tag, &junk1, &junk2, &junk3, &ierr ); // PCHECK; // assert( junk1 == &tag_vals[0] ); // assert( junk2 == (int)tag_vals.size() ); // assert( junk3 == (int)verts.size() ); std::vector<int> expected( verts.size() ); std::vector<iMeshP_Part> parts( verts.size() ); iMeshP_Part* junk4 = &parts[0]; junk2 = parts.size(); iMeshP_getEntOwnerPartArr( imesh, prtn, &verts[0], verts.size(), &junk4, &junk2, &junk3, &ierr ); PCHECK; assert(junk4 == &parts[0]); assert(junk2 == (int)parts.size()); assert(junk3 == (int)verts.size()); junk1 = &expected[0]; junk2 = expected.size(); iMeshP_getRankOfPartArr( imesh, prtn, &parts[0], parts.size(), &junk1, &junk2, &junk3, &ierr ); PCHECK; assert(junk1 == &expected[0]); assert(junk2 == (int)expected.size()); assert(junk3 == (int)parts.size()); ASSERT( tag_vals == expected ); // test iMeshP_pushTagsEnt // write -1 on all vertices // For each vertex owned by this processor and shared with more than // two others, write the rank of the owning processor. tag_vals.clear(); tag_vals.resize( verts.size(), -1 ); iMesh_setIntArrData( imesh, &verts[0], verts.size(), src_tag, &tag_vals[0], tag_vals.size(), &ierr ); PCHECK; tag_vals.resize( verts.size(), -1 ); iMesh_setIntArrData( imesh, &verts[0], verts.size(), dst_tag, &tag_vals[0], tag_vals.size(), &ierr ); PCHECK; std::vector<iBase_EntityHandle> some; for (size_t i = 0; i < verts.size(); ++i) { int num; iMeshP_getNumCopies( imesh, prtn, verts[i], &num, &ierr ); if (iBase_SUCCESS != ierr) break; if (num > 2) some.push_back( verts[i] ); else expected[i] = -1; } tag_vals.clear(); tag_vals.resize( some.size(), rank ); iMesh_setIntArrData( imesh, &some[0], some.size(), src_tag, &tag_vals[0], tag_vals.size(), &ierr ); PCHECK; iMeshP_pushTagsEnt( imesh, prtn, src_tag, dst_tag, &some[0], some.size(), &ierr ); PCHECK; tag_vals.clear(); tag_vals.resize( verts.size(), -1 ); junk1 = &tag_vals[0]; junk2 = tag_vals.size(); iMesh_getIntArrData( imesh, &verts[0], verts.size(), dst_tag, &junk1, &junk2, &junk3, &ierr ); CHKERR; assert( junk1 == &tag_vals[0] ); assert( junk2 == (int)tag_vals.size() ); assert( junk3 == (int)verts.size() ); ASSERT( tag_vals == expected ); return iBase_SUCCESS; } /**\brief Test commuinication of tag data * * Test: * - iMeshP_pushTags * - iMeshP_pushTagsEnt */ int test_push_tag_data_iface( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& ) { return test_push_tag_data_common( imesh, prtn, 0 ); } /**\brief Test commuinication of tag data * * Test: * - iMeshP_pushTags * - iMeshP_pushTagsEnt */ int test_push_tag_data_ghost( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& ) { return test_push_tag_data_common( imesh, prtn, 1 ); } /************************************************************************** PartMap class **************************************************************************/ int PartMap::build_map( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, int num_expected_parts ) { int ierr, rank, size; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Comm_size( MPI_COMM_WORLD, &size ); // get local parts std::vector<iMeshP_PartHandle> local_parts; std::vector<iMeshP_Part> imesh_ids; ierr = get_local_parts( imesh, prtn, local_parts, &imesh_ids ); CHKERR; // get logical ids for local parts std::vector<int> local_ids(local_parts.size()); for (size_t i = 0; i < local_parts.size(); ++i) { ierr = part_from_coords( imesh, local_parts[i], local_ids[i] ); CHKERR; } // get total number of parts int num_global = 0, num_local = local_parts.size(); ierr = MPI_Allreduce( &num_local, &num_global, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD ); CHKERR; if (num_global != num_expected_parts) { std::cerr << "Invalid/unexpected global part count at " __FILE__ ":" << __LINE__ << " (proc " << rank << "): " << std::endl << " Expected: " << num_expected_parts << std::endl << " Actual: " << num_global << std::endl; return 1; } // get counts and displacements for Allgatherv calls std::vector<int> dspls(size), counts(size); ierr = MPI_Allgather( &num_local, 1, MPI_INT, &counts[0], 1, MPI_INT, MPI_COMM_WORLD ); CHKERR; dspls[0] = 0; for (int i = 1; i < size; ++i) dspls[i] = dspls[i-1] + counts[i-1]; // gather iMeshP_Part list from each processor std::vector<unsigned> global_part_ids(num_expected_parts); assert(sizeof(iMeshP_Part) == sizeof(int)); ierr = MPI_Allgatherv( &imesh_ids[0], num_local, MPI_UNSIGNED, &global_part_ids[0], &counts[0], &dspls[0], MPI_UNSIGNED, MPI_COMM_WORLD ); CHKERR; // gather local ids from each processor std::vector<int> global_id_list(num_expected_parts); ierr = MPI_Allgatherv( &local_ids[0], num_local, MPI_INT, &global_id_list[0], &counts[0], &dspls[0], MPI_INT, MPI_COMM_WORLD ); CHKERR; // build owner list std::vector<int> global_owners(num_expected_parts); for (int i = 0; i < size; ++i) for (int j = 0; j < counts[i]; ++j) global_owners[dspls[i]+j] = i; // populate member lists sortedPartList = global_part_ids; std::sort( sortedPartList.begin(), sortedPartList.end() ); partLocalIds.resize( num_expected_parts ); partRanks.resize( num_expected_parts ); for (int i = 0; i < num_expected_parts; ++i) { int idx = std::lower_bound( sortedPartList.begin(), sortedPartList.end(), global_part_ids[i] ) - sortedPartList.begin(); partLocalIds[idx] = global_id_list[i]; partRanks[idx] = global_owners[i]; } // do some consistency checking if (std::unique( sortedPartList.begin(), sortedPartList.end() ) != sortedPartList.end()) { if (rank == 0) { std::cerr << "ERROR: Duplicate iMeshP_Part values detected at " __FILE__ ":" << __LINE__ << std::endl; } return 1; } // build revesre local id map and check for duplicates localIdReverseMap.clear(); localIdReverseMap.resize(num_expected_parts, -1); for (int i = 0; i < num_expected_parts; ++i) { int idx = partLocalIds[i]; if (localIdReverseMap[idx] != -1) { if (rank == 0) { std::cerr << "ERROR: Part mesh has been duplicated in multiple parts." << std::endl << " Detected at " __FILE__ ":" << __LINE__ << std::endl << " See PartMap::part_from_coords" << std::endl; } return 1; } if (idx >= num_expected_parts) { if (rank == 0) { std::cerr << "ERROR: Part mesh invalid/incorrect mesh." << std::endl << " Detected at " __FILE__ ":" << __LINE__ << std::endl << " See PartMap::part_from_coords" << std::endl; } return 1; } localIdReverseMap[idx] = i; } return 0; } void PartMap::part_id_from_rank( int rank, std::vector<iMeshP_Part>& parts ) const { for (size_t i = 0; i < sortedPartList.size(); ++i) if (partRanks[i] == rank) parts.push_back( sortedPartList[i] ); } void PartMap::local_id_from_rank( int rank, std::vector<int>& ids ) const { for (size_t i = 0; i < sortedPartList.size(); ++i) if (partRanks[i] == rank) ids.push_back( partLocalIds[i] ); } int PartMap::part_from_coords( iMesh_Instance imesh, iMeshP_PartHandle part, int& id ) { int ierr, rank; MPI_Comm_rank( MPI_COMM_WORLD, &rank ); // get elements const int num_elem = 4; iBase_EntityHandle array[num_elem]; iBase_EntityHandle* ptr = array; int junk1 = num_elem, n = -1; iMesh_getEntities( imesh, part, iBase_FACE, iMesh_QUADRILATERAL, &ptr, &junk1, &n, &ierr ); CHKERR; assert( ptr == array ); assert( junk1 == num_elem ); if (n != num_elem) { std::cerr << "Internal error at " __FILE__ ":" << __LINE__ << " (proc " << rank << "): Expected all parts to have " << num_elem << " elements. Found one with " << n << std::endl; return 1; } // get vertices iBase_EntityHandle adj_array[4*num_elem]; int junk2, junk3, offset_array[5]; ptr = adj_array; junk1 = sizeof(adj_array)/sizeof(adj_array[0]); junk2 = sizeof(offset_array)/sizeof(offset_array[0]); int* ptr2 = offset_array; iMesh_getEntArrAdj( imesh, array, num_elem, iBase_VERTEX, &ptr, &junk1, &n, &ptr2, &junk2, &junk3, &ierr ); CHKERR; assert( ptr == adj_array ); assert( ptr2 == offset_array ); assert( junk1 == sizeof(adj_array)/sizeof(adj_array[0]) ); assert( junk2 == sizeof(offset_array)/sizeof(offset_array[0]) ); assert( n == 4*num_elem ); assert( offset_array[0] == 0 ); for (int i = 1; i < junk3; ++i) assert( offset_array[i] - offset_array[i-1] == 4 ); // find center vertex iBase_EntityHandle vtx; bool all_match; for (int i = 0; i < 4; ++i) { vtx = adj_array[i]; all_match = true; for (int j = 1; j < 4; ++j) { iBase_EntityHandle* mvtx = adj_array + 4*j; int k; for (k = 0; k < 4; ++k) if (mvtx[k] == vtx) break; if (k == 4) all_match = false; } if (all_match) break; } assert(all_match); // get center vertex coordinates double x, y, z; iMesh_getVtxCoord( imesh, vtx, &x, &y, &z, &ierr ); CHKERR; assert( 0.0 == z ); const int xi = ((int)round(x) - 1)/2; const int yi = ((int)round(y) - 1)/2; assert (xi >= 0); assert (yi >= 0); assert( fabs(x - 2*xi - 1) < 1e-12 ); assert( fabs(y - 2*yi - 1) < 1e-12 ); id = 2*xi + yi; return 0; }
33.617697
144
0.614936
[ "mesh", "vector" ]
a4b8f315ef14a83560be4a4a3f2c92aedd090922
5,183
cc
C++
source/lib/hardware/parsing/Samples.cc
wuan/bo-tracker
27fae661bd19f48b370084c5fa2a1deb897fdc24
[ "MIT" ]
null
null
null
source/lib/hardware/parsing/Samples.cc
wuan/bo-tracker
27fae661bd19f48b370084c5fa2a1deb897fdc24
[ "MIT" ]
1
2015-03-04T21:01:54.000Z
2015-03-04T21:02:47.000Z
source/lib/hardware/parsing/Samples.cc
wuan/bo-tracker
27fae661bd19f48b370084c5fa2a1deb897fdc24
[ "MIT" ]
null
null
null
#include "data/Format.h" #include "hardware/parsing/Samples.h" #include "exception/Base.h" namespace blitzortung { namespace hardware { namespace parsing { Samples::Samples(const std::vector<std::string>& fields, const hardware::gps::Base& gps) : Base(), waveform_(), rawData_(), bitsPerSample_(0), logger_("hardware.parsing.Samples") { if (gps.isValid()) { // the counter value is always at the second position counter_ = parseHex(fields[1]); pt::ptime eventtime = gps.getTime(counter_); if (eventtime != pt::not_a_date_time) { if (fields[0] == "BLSIG") { if (fields.size() > 3) { if (fields[2].size() == 2 && fields[3].size() ==2) { // BLSIG type 1 setWaveform(FORMAT_8_2_1, eventtime, pt::nanoseconds(0), fields[2] + fields[3]); } else if (fields[2].size() == 3 && fields[3].size() ==3) { // BLSIG type 2 setWaveform(FORMAT_12_2_1, eventtime, pt::nanoseconds(0), std::move(fields[2] + fields[3]), 12); } else { logger_.warnStream() << "Samples() BLSIG field size mismatch 2: '" << fields[2] << "', 3: '" << fields[3] << "'"; } } else { logger_.warnStream() << "Samples() BLSIG total number of fields mismatch: " << fields.size(); } } else if (fields[0] == "BLSEQ") { if (fields[2].size() == 256) { // BLSIG type 2 setWaveform(FORMAT_8_2_64, eventtime, pt::nanoseconds(2900), std::move(fields[2])); } else { logger_.warnStream() << "Samples() BLSEQ field 2 size mismatch: " << fields[2].size() << " vs. 256"; } } else if (fields[0] == "BD") { if (fields[2].size() == 256) { // BD type setWaveform(FORMAT_8_2_64, eventtime, pt::nanoseconds(2800), std::move(fields[2])); } else { logger_.warnStream() << "Samples() BD field 2 size mismatch: " << fields[2].size() << " vs. 256"; } } else if (fields[0] == "BM") { if (fields[2].size() == 256) { // BM type setWaveform(FORMAT_8_1_128, eventtime, pt::nanoseconds(2800), std::move(fields[2])); } else { logger_.warnStream() << "Samples() BM field 2 size mismatch: " << fields[2].size() << " vs. 256"; } } else if (fields[0] == "L") { if (fields[2].size() == 1024) { // L type setWaveform(FORMAT_8_2_256, eventtime, pt::nanoseconds(1950), std::move(fields[2])); } else { logger_.warnStream() << "Samples() BD field 2 size mismatch: " << fields[2].size() << " vs. 256"; } } else { logger_.warnStream() << "Samples() unknown sample type '" << fields[0] << "'"; } } else { logger_.warnStream() << "Samples() invalid event time"; } if (! valid_) { waveform_.reset(); std::string line; for (std::vector<std::string>::const_iterator field = fields.begin(); field != fields.end(); ++field) line += *field + " "; logger_.warnStream() << "Samples() could not parse '" << line << "'"; } } } Samples::Samples(const data::Format& format, const pt::ptime& timestamp, const unsigned short samplePeriod, const std::string& data) : Base(), waveform_(), rawData_(), bitsPerSample_(0), logger_("hardware.parsing.Samples") { setWaveform(format, timestamp, std::move(pt::nanoseconds(samplePeriod)), std::move(data)); } void Samples::setWaveform(const data::Format& format, const pt::ptime& eventtime, const pt::time_duration&& sampleDt, const std::string&& rawData, unsigned char numberOfBitsPerSample) { if (numberOfBitsPerSample == 0) { numberOfBitsPerSample = format.getNumberOfBytesPerSample() * 8; } std::ostringstream oss; oss << (int)format.getNumberOfChannels() << " " << format.getNumberOfSamples() << " " << (int)numberOfBitsPerSample << " " << rawData; rawData_ = oss.str(); // parse lighning event information if (format.isValid()) { int numberOfEvents = rawData.size() >> 2; waveform_ = format.createWaveform(eventtime, sampleDt); unsigned short hexCharsPerSample = (numberOfBitsPerSample + 3 ) / 4; unsigned short numberOfChannels = format.getNumberOfChannels(); int offset = -(1 << (numberOfBitsPerSample - 1)); if (logger_.isDebugEnabled()) logger_.debugStream() << "#ch " << numberOfChannels << ", #chars/sample " << hexCharsPerSample << " zeroOffset " << offset; int index = 0; for (int sample=0; sample < numberOfEvents; sample++) { for (int channel=0; channel < numberOfChannels; channel++) { std::string hexString = rawData.substr(index, hexCharsPerSample); waveform_->setInt(int(offset + parseHex(hexString)), sample, channel); index += hexCharsPerSample; } } valid_ = true; } else { logger_.warnStream() << "invalid format " << format; } } data::Waveform::AP Samples::getWaveform() { return std::move(waveform_); } const std::string& Samples::getRawData() const { return rawData_; } const data::Format Samples::FORMAT_8_2_1(1,2,1); const data::Format Samples::FORMAT_12_2_1(2,2,1); const data::Format Samples::FORMAT_8_2_64(1,2,64); const data::Format Samples::FORMAT_8_1_128(1,1,128); const data::Format Samples::FORMAT_8_2_256(1,2,256); } } }
34.785235
191
0.616438
[ "vector" ]
a4be145b7be563f7348bef617020b42286a13940
2,125
cc
C++
tensorflow/compiler/plugin/poplar/driver/tools/popef_util.cc
chenzhengda/tensorflow
8debb698097670458b5f21d728bc6f734a7b5a53
[ "Apache-2.0" ]
74
2020-07-06T17:11:39.000Z
2022-01-28T06:31:28.000Z
tensorflow/compiler/plugin/poplar/driver/tools/popef_util.cc
chenzhengda/tensorflow
8debb698097670458b5f21d728bc6f734a7b5a53
[ "Apache-2.0" ]
9
2020-10-13T23:25:29.000Z
2022-02-10T06:54:48.000Z
tensorflow/compiler/plugin/poplar/driver/tools/popef_util.cc
chenzhengda/tensorflow
8debb698097670458b5f21d728bc6f734a7b5a53
[ "Apache-2.0" ]
12
2020-07-08T07:27:17.000Z
2021-12-27T08:54:27.000Z
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "tensorflow/compiler/plugin/poplar/driver/tools/popef_util.h" #include "tensorflow/compiler/xla/util.h" namespace xla { namespace poplarplugin { Status PopEFExceptionToTensorflowStatus(const std::string& origin, const std::exception& e) { const std::string prefix = "[PopEF]" + origin + ": %s"; return InternalError(prefix.c_str(), e.what()); } void ToPopEFShape(const xla::Shape& shape, std::vector<int64_t>& popef_shape) { for (size_t i = 0; i < shape.dimensions_size(); i++) { popef_shape.push_back(shape.dimensions(i)); } } StatusOr<popef::DataType> ToPopEFDataType(xla::PrimitiveType type) { switch (type) { case xla::F32: return popef::DataType::F32; case xla::F16: return popef::DataType::F16; case xla::S32: return popef::DataType::S32; case xla::U32: return popef::DataType::U32; case xla::S8: return popef::DataType::S8; case xla::U8: return popef::DataType::U8; case xla::S16: return popef::DataType::S16; case xla::U16: return popef::DataType::U16; case xla::F64: return popef::DataType::F64; case xla::S64: return popef::DataType::S64; case xla::U64: return popef::DataType::U64; } return tensorflow::errors::Internal( "[PopEF][ToMetadata]: ", "Unsupported PrimitiveType ", std::to_string(type)); } } // namespace poplarplugin } // namespace xla
32.19697
80
0.656941
[ "shape", "vector" ]
a4cd9fd4998f2ec2a6ad44663f10d1797a0160d3
768
cpp
C++
tamplate/readLine.cpp
Marveliu/learn-cpp
e1f121fb1d5d7decc5712817a3f4751f43fea1b8
[ "Apache-2.0" ]
null
null
null
tamplate/readLine.cpp
Marveliu/learn-cpp
e1f121fb1d5d7decc5712817a3f4751f43fea1b8
[ "Apache-2.0" ]
null
null
null
tamplate/readLine.cpp
Marveliu/learn-cpp
e1f121fb1d5d7decc5712817a3f4751f43fea1b8
[ "Apache-2.0" ]
null
null
null
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <cstring> #include <cstdio> using namespace std; // strtok的用法: // 第一步:初始化 // strtok("this is a demo"," "); // 第二步:得到其它的子字符串 // strtok(NULL," "); // 每执行一次第二步就可以得到一个子字符串,直到返回NULL,表示查找结束。 template <class T> class Array { public: vector<T> data; }; int main() { double a = 1234.34; string cv = to_string(a); cout << cv << endl; cout << stoi(cv) << endl; string line; int id = 1; while (getline(cin, line)) { char *p = strtok(const_cast<char *>(line.c_str()), ", "); Array<double> a; while (p != NULL) { a.data.push_back(stod(p)); p = strtok(NULL, ", "); } } return 0; }
16.695652
65
0.545573
[ "vector" ]
a4d5b094f290612d8687f70ad9f7a7c9c5c2490a
57,416
cpp
C++
sourceCode/various/userSettings.cpp
mdecourse/CoppeliaSimLib
934e65b4b6ea5a07d08919ae35c50fd3ae960ef2
[ "RSA-MD" ]
null
null
null
sourceCode/various/userSettings.cpp
mdecourse/CoppeliaSimLib
934e65b4b6ea5a07d08919ae35c50fd3ae960ef2
[ "RSA-MD" ]
null
null
null
sourceCode/various/userSettings.cpp
mdecourse/CoppeliaSimLib
934e65b4b6ea5a07d08919ae35c50fd3ae960ef2
[ "RSA-MD" ]
null
null
null
#include "confReaderAndWriter.h" #include "simInternal.h" #include "userSettings.h" #include "global.h" #include "threadPool_old.h" #include "tt.h" #include "easyLock.h" #include "vVarious.h" #include "app.h" #include "simFlavor.h" #ifdef SIM_WITH_GUI #include "vDialog.h" #endif #define USER_SETTINGS_FILENAME "usrset.txt" #define _USR_ANTIALIASING "antialiasing" #define _USR_DISPLAY_WORLD_REF "displayWorldRef" #define _USR_USE_GLFINISH "useGlFinish" #define _USR_USE_GLFINISH_VISION_SENSORS "useGlFinish_visionSensors" #define _USR_OGL_COMPATIBILITY_TWEAK_1 "oglCompatibilityTweak1" #define _USR_STEREO_DIST "stereoDist" #define _USR_VSYNC "vsync" #define _USR_DEBUG_OPENGL "debugOpenGl" #define _USR_DISPLAY_BOUNDING_BOXES "displayBoundingBoxeWhenObjectSelected" #define _USR_REMOVE_IDENTICAL_VERTICES "removeIdenticalVertices" #define _USR_IDENTICAL_VERTICES_TOLERANCE "identicalVerticesTolerance" #define _USR_REMOVE_IDENTICAL_TRIANGLES "removeIdenticalTriangles" #define _USR_TRIANGLE_WINDING_CHECK "triangleWindingCheck" #define _USR_PROCESSOR_CORE_AFFINITY "processorCoreAffinity" #define _USR_DYNAMIC_ACTIVITY_RANGE "dynamicActivityRange" #define _USR_FREE_SERVER_PORT_START "freeServerPortStart" #define _USR_FREE_SERVER_PORT_RANGE "freeServerPortRange" #define _USR_GUI_FONT_SIZE_WIN "guiFontSize_Win" #define _USR_GUI_FONT_SIZE_MAC "guiFontSize_Mac" #define _USR_GUI_FONT_SIZE_LINUX "guiFontSize_Linux" #define _USR_TRANSLATION_STEP_SIZE "objectTranslationStepSize" #define _USR_ROTATION_STEP_SIZE "objectRotationStepSize" #define _USR_COMPRESS_FILES "compressFiles" #define _USR_TRIANGLE_COUNT_IN_OBB "triCountInOBB" #define _USR_APPROXIMATED_NORMALS "saveApproxNormals" #define _USR_PACK_INDICES "packIndices" #define _USR_UNDO_REDO_ENABLED "undoRedoEnabled" #define _USR_UNDO_REDO_PARTIAL_WITH_CAMERAS "undoRedoOnlyPartialWithCameras" #define _USR_UNDO_REDO_LEVEL_COUNT "undoRedoLevelCount" #define _USR_RUN_CUSTOMIZATION_SCRIPTS "runCustomizationScripts" #define _USR_TEST1 "test1" #define _USR_ORDER_HIERARCHY_ALPHABETICALLY "orderHierarchyAlphabetically" #define _USR_MAC_CHILD_DIALOG_TYPE "macChildDialogType" #define _USR_DESKTOP_RECORDING_INDEX "desktopRecordingIndex" #define _USR_DESKTOP_RECORDING_WIDTH "desktopRecordingWidth" #define _USR_EXTERNAL_SCRIPT_EDITOR "externalScriptEditor" #define _USR_XML_EXPORT_SPLIT_SIZE "xmlExportSplitSize" #define _USR_XML_EXPORT_KNOWN_FORMATS "xmlExportKnownFormats" #define _USR_IDLE_FPS "idleFps" #define _USR_UNDO_REDO_MAX_BUFFER_SIZE "undoRedoMaxBufferSize" #define _USR_ALWAYS_SHOW_CONSOLE "alwaysShowConsole" #define _USR_VERBOSITY "verbosity" #define _USR_STATUSBAR_VERBOSITY "statusbarVerbosity" #define _USR_DIALOG_VERBOSITY "dialogVerbosity" #define _USR_LOG_FILTER "logFilter" #define _USR_UNDECORATED_STATUSBAR_MSGS "undecoratedStatusbarMessages" #define _USR_CONSOLE_MSGS_TO_FILE "consoleMsgsToFile" #define _USR_FORCE_BUG_FIX_REL_30002 "forceBugFix_rel30002" #define _USR_STATUSBAR_INITIALLY_VISIBLE "statusbarInitiallyVisible" #define _USR_MODELBROWSER_INITIALLY_VISIBLE "modelBrowserInitiallyVisible" #define _USR_SCENEHIERARCHY_INITIALLY_VISIBLE "sceneHierarchyInitiallyVisible" #define _USR_SCENEHIERARCHY_HIDDEN_DURING_SIMULATION "sceneHierarchyHiddenDuringSimulation" #define _USR_AUTO_SAVE_DELAY "autoSaveDelay" #define _USR_BULLET_SERIALIZATION_BUFFER "bulletSerializationBuffer" #define _USR_TIME_FOR_UNDO_REDO_TOO_LONG_WARNING "timeInMsForUndoRedoTooLongWarning" #define _USR_MIDDLE_MOUSE_BUTTON_SWITCHES_MODES "middleMouseButtonSwitchesModes" #define _USR_NAVIGATION_BACKWARD_COMPATIBILITY_MODE "navigationBackwardCompatibility" #define _USR_COLOR_ADJUST_BACK_COMPATIBILITY "colorAdjust_backCompatibility" #define _USR_SPECIFIC_GPU_TWEAK "specificGpuTweak" #define _USR_USE_ALTERNATE_SERIAL_PORT_ROUTINES "useAlternateSerialPortRoutines" #define _USR_DISABLED_OPENGL_BASED_CUSTOM_UI "disableOpenGlBasedCustomUi" #define _USR_SHOW_old_DLGS "showOldDlgs" #define _USR_ENABLE_OLD_RENDERABLE "enableOldRenderableBehaviour" #define _USR_BUGFIX1 "bugFix1" #define _USR_COMPATIBILITYFIX1 "compatibilityFix1" #define _USR_SUPPORT_old_THREADED_SCRIPTS "keepOldThreadedScripts" #define _USR_SUPPORT_old_API_NOTATION "supportOldApiNotation" #define _USR_ENABLE_old_MIRROR_OBJECTS "enableOldMirrorObjects" #define _USR_ALLOW_old_EDU_RELEASE "allowOldEduRelease" #define _USR_THREADED_SCRIPTS_GRACE_TIME "threadedScriptsStoppingGraceTime" #define _USR_ABORT_SCRIPT_EXECUTION_BUTTON "abortScriptExecutionButton" #define _USR_DARK_MODE "darkMode" #define _USR_RENDERING_SURFACE_VERTICAL_SHIFT "renderingSurfaceVShift" #define _USR_RENDERING_SURFACE_VERTICAL_RESIZE "renderingSurfaceVResize" #define _USR_ADDITIONAL_LUA_PATH "additionalLuaPath" #define _USR_DIRECTORY_FOR_SCENES "defaultDirectoryForScenes" #define _USR_DIRECTORY_FOR_MODELS "defaultDirectoryForModels" #define _USR_DIRECTORY_FOR_CAD "defaultDirectoryForCadFiles" #define _USR_DIRECTORY_FOR_MISC "defaultDirectoryForMiscFiles" #define _USR_OFFSCREEN_CONTEXT_TYPE "offscreenContextType" #define _USR_FBO_TYPE "fboType" #define _USR_FORCE_FBO_VIA_EXT "forceFboViaExt" #define _USR_VBO_OPERATION "vboOperation" #define _USR_VBO_PERSISTENCE_IN_MS "vboPersistenceInMs" #define _USR_DESIRED_OPENGL_MAJOR "desiredOpenGlMajor" #define _USR_DESIRED_OPENGL_MINOR "desiredOpenGlMinor" #define _USR_HIGH_RES_DISPLAY "highResDisplay" #define _USR_NO_EDGES_WHEN_MOUSE_DOWN "noEdgesWhenMouseDownInCameraView" #define _USR_NO_TEXTURES_WHEN_MOUSE_DOWN "noTexturesWhenMouseDownInCameraView" #define _USR_NO_CUSTOM_UIS_WHEN_MOUSE_DOWN "noCustomUisWhenMouseDownInCameraView" #define _USR_HIERARCHY_REFRESH_CNT "hierarchyRefreshCnt" #define _USR_THREADED_CHILD_SCRIPT_COLOR_BACKGROUND "threadedChildScriptColor_background" #define _USR_THREADED_CHILD_SCRIPT_COLOR_SELECTION "threadedChildScriptColor_selection" #define _USR_THREADED_CHILD_SCRIPT_COLOR_COMMENT "threadedChildScriptColor_comment" #define _USR_THREADED_CHILD_SCRIPT_COLOR_NUMBER "threadedChildScriptColor_number" #define _USR_THREADED_CHILD_SCRIPT_COLOR_STRING "threadedChildScriptColor_string" #define _USR_THREADED_CHILD_SCRIPT_COLOR_CHARACTER "threadedChildScriptColor_character" #define _USR_THREADED_CHILD_SCRIPT_COLOR_OPERATOR "threadedChildScriptColor_operator" #define _USR_THREADED_CHILD_SCRIPT_COLOR_PREPROCESSOR "threadedChildScriptColor_preprocessor" #define _USR_THREADED_CHILD_SCRIPT_COLOR_IDENTIFIER "threadedChildScriptColor_identifier" #define _USR_THREADED_CHILD_SCRIPT_COLOR_WORD "threadedChildScriptColor_word" #define _USR_THREADED_CHILD_SCRIPT_COLOR_WORD2 "threadedChildScriptColor_word2" #define _USR_THREADED_CHILD_SCRIPT_COLOR_WORD3 "threadedChildScriptColor_word3" #define _USR_THREADED_CHILD_SCRIPT_COLOR_WORD4 "threadedChildScriptColor_word4" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_BACKGROUND "nonThreadedChildScriptColor_background" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_SELECTION "nonThreadedChildScriptColor_selection" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_COMMENT "nonThreadedChildScriptColor_comment" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_NUMBER "nonThreadedChildScriptColor_number" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_STRING "nonThreadedChildScriptColor_string" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_CHARACTER "nonThreadedChildScriptColor_character" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_OPERATOR "nonThreadedChildScriptColor_operator" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_PREPROCESSOR "nonThreadedChildScriptColor_preprocessor" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_IDENTIFIER "nonThreadedChildScriptColor_identifier" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD "nonThreadedChildScriptColor_word" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD2 "nonThreadedChildScriptColor_word2" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD3 "nonThreadedChildScriptColor_word3" #define _USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD4 "nonThreadedChildScriptColor_word4" #define _USR_MAIN_SCRIPT_COLOR_BACKGROUND "mainScriptColor_background" #define _USR_MAIN_SCRIPT_COLOR_SELECTION "mainScriptColor_selection" #define _USR_MAIN_SCRIPT_COLOR_COMMENT "mainScriptColor_comment" #define _USR_MAIN_SCRIPT_COLOR_NUMBER "mainScriptColor_number" #define _USR_MAIN_SCRIPT_COLOR_STRING "mainScriptColor_string" #define _USR_MAIN_SCRIPT_COLOR_CHARACTER "mainScriptColor_character" #define _USR_MAIN_SCRIPT_COLOR_OPERATOR "mainScriptColor_operator" #define _USR_MAIN_SCRIPT_COLOR_PREPROCESSOR "mainScriptColor_preprocessor" #define _USR_MAIN_SCRIPT_COLOR_IDENTIFIER "mainScriptColor_identifier" #define _USR_MAIN_SCRIPT_COLOR_WORD "mainScriptColor_word" #define _USR_MAIN_SCRIPT_COLOR_WORD2 "mainScriptColor_word2" #define _USR_MAIN_SCRIPT_COLOR_WORD3 "mainScriptColor_word3" #define _USR_MAIN_SCRIPT_COLOR_WORD4 "mainScriptColor_word4" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_BACKGROUND "customizationScriptColor_background" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_SELECTION "customizationScriptColor_selection" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_COMMENT "customizationScriptColor_comment" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_NUMBER "customizationScriptColor_number" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_STRING "customizationScriptColor_string" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_CHARACTER "customizationScriptColor_character" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_OPERATOR "customizationScriptColor_operator" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_PREPROCESSOR "customizationScriptColor_preprocessor" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_IDENTIFIER "customizationScriptColor_identifier" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_WORD "customizationScriptColor_word" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_WORD2 "customizationScriptColor_word2" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_WORD3 "customizationScriptColor_word3" #define _USR_CUSTOMIZATION_SCRIPT_COLOR_WORD4 "customizationScriptColor_word4" #define _USR_VISION_SENSORS_USE_GUI_WINDOWED "visionSensorsUseGuiThread_windowed" #define _USR_VISION_SENSORS_USE_GUI_HEADLESS "visionSensorsUseGuiThread_headless" #define _USR_FILE_DIALOGS_NATIVE "fileDialogs" #define _USR_MOUSE_WHEEL_ZOOM_FACTOR "mouseWheelZoomFactor" #define _USR_DO_NOT_WRITE_PERSISTENT_DATA "doNotWritePersistentData" #define _USR_DO_NOT_SHOW_CRASH_RECOVERY_MESSAGE "doNotShowCrashRecoveryMessage" #define _USR_DO_NOT_SHOW_UPDATE_CHECK_MESSAGE "doNotShowUpdateCheckMessage" #define _USR_DO_NOT_SHOW_PROGRESS_BARS "doNotShowProgressBars" #define _USR_DO_NOT_SHOW_ACKNOWLEDGMENT_MESSAGES "doNotShowAcknowledgmentMessages" #define _USR_DO_NOT_SHOW_VIDEO_COMPRESSION_LIBRARY_LOAD_ERROR "doNotShowVideoCompressionLibraryLoadError" #define _USR_SUPPRESS_STARTUP_DIALOG "suppressStartupDialogs" #define _USR_SUPPRESS_XML_OVERWRITE_MSG "suppressXmlOverwriteMsg" #define _USR_SCRIPT_EDITOR_FONT "scriptEditorFont" #define _USR_SCRIPT_EDITOR_FONT_SIZE "scriptEditorFontSize" #define _USR_SCRIPT_EDITOR_BOLDFONT "scriptEditorBoldFont" #define _USR_CONNECTION_ADDRESS "conParam1" #define _USR_CONNECTION_PORT "conParam2" #define _USR_FLOAT_LICENSE_ENABLED "floatingLicenseEnabled" #define _USR_FLOAT_LICENSE_SERVER_ADDRESS "floatingLicenseServer" #define _USR_FLOAT_LICENSE_SERVER_PORT "floatingLicensePort" #define _USR_KEEP_DONGLE_OPEN "keepDongleOpen" #define _USR_XR_TEST "xrTest" CUserSettings::CUserSettings() { // Debugging section: // ***************************** alwaysShowConsole=false; _overrideConsoleVerbosity="default"; _overrideStatusbarVerbosity="default"; _overrideDialogVerbosity="default"; _consoleLogFilter=""; undecoratedStatusbarMessages=false; // Rendering section: // ***************************** _idleFps=8; desiredOpenGlMajor=-1; // default desiredOpenGlMinor=-1; // default offscreenContextType=-1; // default type fboType=-1; // default type forceFboViaExt=false; // default vboOperation=-1; // default vboPersistenceInMs=5000; // default oglCompatibilityTweak1=false; visionSensorsUseGuiThread_windowed=-1; // default visionSensorsUseGuiThread_headless=-1; // default useGlFinish=false; useGlFinish_visionSensors=false; vsync=0; debugOpenGl=false; stereoDist=0.0f; // default, no stereo! // Visual section: // ***************************** darkMode=false; renderingSurfaceVShift=0; renderingSurfaceVResize=0; scriptEditorFont=""; // default scriptEditorFontSize=-1; // default scriptEditorBoldFont=false; displayWorldReference=true; antiAliasing=false; displayBoundingBoxeWhenObjectSelected=true; guiFontSize_Win=13; // 11-14 ok guiFontSize_Mac=-1; // 10-13 ok guiFontSize_Linux=13; // 11-14 ok, default is quite large statusbarInitiallyVisible=CSimFlavor::getBoolVal(10); modelBrowserInitiallyVisible=true; sceneHierarchyInitiallyVisible=true; sceneHierarchyHiddenDuringSimulation=false; highResDisplay=-1; noEdgesWhenMouseDownInCameraView=false; noTexturesWhenMouseDownInCameraView=false; noCustomUisWhenMouseDownInCameraView=true; hierarchyRefreshCnt=3; _setIntVector3(threadedChildScriptColor_background,180,190,190); _setIntVector3(threadedChildScriptColor_selection,128,128,255); _setIntVector3(threadedChildScriptColor_comment,0,140,0); _setIntVector3(threadedChildScriptColor_number,220,0,220); _setIntVector3(threadedChildScriptColor_string,255,255,0); _setIntVector3(threadedChildScriptColor_character,255,255,0); _setIntVector3(threadedChildScriptColor_operator,0,0,0); _setIntVector3(threadedChildScriptColor_preprocessor,0,128,128); _setIntVector3(threadedChildScriptColor_identifier,64,64,64); _setIntVector3(threadedChildScriptColor_word,0,0,255); _setIntVector3(threadedChildScriptColor_word2,152,0,0); _setIntVector3(threadedChildScriptColor_word3,220,80,20); _setIntVector3(threadedChildScriptColor_word4,152,64,0); _setIntVector3(nonThreadedChildScriptColor_background,190,190,190); _setIntVector3(nonThreadedChildScriptColor_selection,128,128,255); _setIntVector3(nonThreadedChildScriptColor_comment,0,140,0); _setIntVector3(nonThreadedChildScriptColor_number,220,0,220); _setIntVector3(nonThreadedChildScriptColor_string,255,255,0); _setIntVector3(nonThreadedChildScriptColor_character,255,255,0); _setIntVector3(nonThreadedChildScriptColor_operator,0,0,0); _setIntVector3(nonThreadedChildScriptColor_preprocessor,0,128,128); _setIntVector3(nonThreadedChildScriptColor_identifier,64,64,64); _setIntVector3(nonThreadedChildScriptColor_word,0,0,255); _setIntVector3(nonThreadedChildScriptColor_word2,152,0,0); _setIntVector3(nonThreadedChildScriptColor_word3,220,80,20); _setIntVector3(nonThreadedChildScriptColor_word4,152,64,0); _setIntVector3(mainScriptColor_background,190,175,175); _setIntVector3(mainScriptColor_selection,128,128,255); _setIntVector3(mainScriptColor_comment,0,140,0); _setIntVector3(mainScriptColor_number,220,0,220); _setIntVector3(mainScriptColor_string,255,255,0); _setIntVector3(mainScriptColor_character,255,255,0); _setIntVector3(mainScriptColor_operator,0,0,0); _setIntVector3(mainScriptColor_preprocessor,0,128,128); _setIntVector3(mainScriptColor_identifier,64,64,64); _setIntVector3(mainScriptColor_word,0,0,255); _setIntVector3(mainScriptColor_word2,152,0,0); _setIntVector3(mainScriptColor_word3,220,80,20); _setIntVector3(mainScriptColor_word4,152,64,0); _setIntVector3(customizationScriptColor_background,150,150,150); _setIntVector3(customizationScriptColor_selection,128,128,255); _setIntVector3(customizationScriptColor_comment,0,120,0); _setIntVector3(customizationScriptColor_number,220,0,220); _setIntVector3(customizationScriptColor_string,205,205,0); _setIntVector3(customizationScriptColor_character,205,205,0); _setIntVector3(customizationScriptColor_operator,0,0,0); _setIntVector3(customizationScriptColor_preprocessor,0,128,128); _setIntVector3(customizationScriptColor_identifier,70,70,70); _setIntVector3(customizationScriptColor_word,0,0,255); _setIntVector3(customizationScriptColor_word2,152,0,0); _setIntVector3(customizationScriptColor_word3,220,80,20); _setIntVector3(customizationScriptColor_word4,152,64,0); // Directories section: // ***************************** defaultDirectoryForScenes=""; defaultDirectoryForModels=""; defaultDirectoryForCadFiles=""; defaultDirectoryForMiscFiles=""; // Serialization section: // ***************************** autoSaveDelay=2; // 2 minutes for an auto-save by default. set to 0 for no auto-save doNotWritePersistentData=false; compressFiles=true; saveApproxNormals=true; packIndices=true; fileDialogs=-1; // default bulletSerializationBuffer=10000000; // Undo/redo section: // ***************************** _undoRedoEnabled=true; _undoRedoOnlyPartialWithCameras=true; undoRedoLevelCount=16; undoRedoMaxBufferSize=80000000; timeInMsForUndoRedoTooLongWarning=200; // Messaging section: // ***************************** doNotShowCrashRecoveryMessage=false; doNotShowUpdateCheckMessage=false; doNotShowProgressBars=false; doNotShowAcknowledgmentMessages=false; doNotShowVideoCompressionLibraryLoadError=false; suppressStartupDialogs=false; suppressXmlOverwriteMsg=false; // Compatibility section: // ***************************** middleMouseButtonSwitchesModes=false; // set to false on 28/9/2014 navigationBackwardCompatibility=false; colorAdjust_backCompatibility=1.0f; // default specificGpuTweak=false; // default useAlternateSerialPortRoutines=false; disableOpenGlBasedCustomUi=false; showOldDlgs=false; enableOldRenderableBehaviour=false; keepOldThreadedScripts=false; _supportOldApiNotation=true; enableOldMirrorObjects=false; allowOldEduRelease=-1; threadedScriptsStoppingGraceTime=0; bugFix1=1000; compatibilityFix1=false; // Various section: // ***************************** mouseWheelZoomFactor=1.0f; // default dynamicActivityRange=1000.0f; _translationStepSize=0.025f; _rotationStepSize=5.0f*degToRad_f; freeServerPortStart=20000; _nextfreeServerPortToUse=freeServerPortStart; freeServerPortRange=2000; _abortScriptExecutionButton=3; triCountInOBB=8; // gave best results in 2009/07/21 identicalVerticesCheck=true; identicalVerticesTolerance=0.0001f; identicalTrianglesCheck=true; identicalTrianglesWindingCheck=true; runCustomizationScripts=true; test1=false; orderHierarchyAlphabetically=false; macChildDialogType=-1; // default additionalLuaPath=""; desktopRecordingIndex=0; desktopRecordingWidth=-1; externalScriptEditor=""; xmlExportSplitSize=0; xmlExportKnownFormats=true; forceBugFix_rel30002=false; floatingLicenseEnabled=false; floatingLicenseServer="127.0.0.1"; floatingLicensePort=20249; keepDongleOpen=false; xrTest=0; loadUserSettings(); } CUserSettings::~CUserSettings() { } void CUserSettings::setTranslationStepSize(float s) { float sc=1.0f; if ((s>=0.0075f)&&(s<0.075f)) sc=10.0f; if (s>=0.075f) sc=100.0f; if (s<0.0015f*sc) s=0.001f*sc; else { if (s<0.00375f*sc) { if (sc<2.0f) s=0.002f*sc; else s=0.0025f*sc; } else s=0.005f*sc; } _translationStepSize=s; } float CUserSettings::getTranslationStepSize() { return(_translationStepSize); } void CUserSettings::setRotationStepSize(float s) { if (s<1.5f*degToRad_f) s=1.0f*degToRad_f; else { if (s<3.5f*degToRad_f) s=2.0f*degToRad_f; else { if (s<7.5f*degToRad_f) s=5.0f*degToRad_f; else { if (s<12.5f*degToRad_f) s=10.0f*degToRad_f; else { if (s<22.5f*degToRad_f) s=15.0f*degToRad_f; else { if (s<37.5f*degToRad_f) s=30.0f*degToRad_f; else s=45.0f*degToRad_f; } } } } } _rotationStepSize=s; } float CUserSettings::getRotationStepSize() { return(_rotationStepSize); } void CUserSettings::setUndoRedoEnabled(bool isEnabled) { _undoRedoEnabled=isEnabled; if (App::currentWorld->undoBufferContainer!=nullptr) App::currentWorld->undoBufferContainer->emptySceneProcedure(); } bool CUserSettings::getUndoRedoEnabled() { return(_undoRedoEnabled); } bool CUserSettings::getUndoRedoOnlyPartialWithCameras() { return(_undoRedoOnlyPartialWithCameras); } int CUserSettings::getIdleFps() { return(_idleFps); } void CUserSettings::setIdleFps(int fps) { _idleFps=tt::getLimitedInt(0,25,fps); } int CUserSettings::getAbortScriptExecutionTiming() { if (!CSimFlavor::getBoolVal(11)) return(0); return(_abortScriptExecutionButton); } int CUserSettings::getNextFreeServerPortToUse() { return(_nextfreeServerPortToUse); } void CUserSettings::setNextFreeServerPortToUse(int p) { _nextfreeServerPortToUse=p; } bool CUserSettings::getSupportOldApiNotation() { static int support=0; if (support==0) { for (int i=0;i<9;i++) { std::string s(App::getApplicationArgument(i)); if (s.compare("NO_old_API_SUPPORT")==0) { support=-1; break; } } if (support==0) support=1; } return(_supportOldApiNotation&&(support==1)); } void CUserSettings::_setIntVector3(int v[3],int a,int b,int c) { v[0]=a; v[1]=b; v[2]=c; } void CUserSettings::saveUserSettings() { CConfReaderAndWriter c; c.addRandomLine("// Debugging"); c.addRandomLine("// ================================================="); c.addBoolean(_USR_ALWAYS_SHOW_CONSOLE,alwaysShowConsole,""); c.addString(_USR_VERBOSITY,_overrideConsoleVerbosity,"to override console verbosity setting, use any of: default (do not override), none, errors, warnings, loadinfos, scripterrors, scriptwarnings, msgs, infos, debug, trace, tracelua or traceall"); c.addString(_USR_STATUSBAR_VERBOSITY,_overrideStatusbarVerbosity,"to override statusbar verbosity setting, use any of: default (do not override), none, errors, warnings, loadinfos, scripterrors, scriptwarnings, msgs, infos, debug, trace, tracelua or traceall"); c.addString(_USR_LOG_FILTER,_consoleLogFilter,"leave empty for no filter. Filter format: txta1&txta2&...&txtaN|txtb1&txtb2&...&txtbN|..."); c.addString(_USR_DIALOG_VERBOSITY,_overrideDialogVerbosity,"to override dialog verbosity setting, use any of: default (do not override), none, errors, warnings, questions or infos"); c.addBoolean(_USR_UNDECORATED_STATUSBAR_MSGS,undecoratedStatusbarMessages,""); c.addBoolean(_USR_CONSOLE_MSGS_TO_FILE,App::getConsoleMsgToFile(),"if true, console messages are sent to debugLog.txt"); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Rendering"); c.addRandomLine("// ================================================="); c.addInteger(_USR_IDLE_FPS,_idleFps,""); c.addInteger(_USR_DESIRED_OPENGL_MAJOR,desiredOpenGlMajor,"recommended to keep -1."); c.addInteger(_USR_DESIRED_OPENGL_MINOR,desiredOpenGlMinor,"recommended to keep -1."); c.addInteger(_USR_OFFSCREEN_CONTEXT_TYPE,offscreenContextType,"recommended to keep -1 (-1=default, 0=Qt offscreen, 1=QGLWidget/QOpenGLWidget visible, 2=QGLWidget/QOpenGLWidget invisible)."); c.addInteger(_USR_FBO_TYPE,fboType,"recommended to keep -1 (-1=default, 0=native, 1=QOpenGLFramebufferObject)."); c.addBoolean(_USR_FORCE_FBO_VIA_EXT,forceFboViaExt,"recommended to keep false."); c.addInteger(_USR_VBO_OPERATION,vboOperation,"recommended to keep -1 (-1=default, 0=always off, 1=on when available)."); c.addInteger(_USR_VBO_PERSISTENCE_IN_MS,vboPersistenceInMs,"recommended to keep 5000."); c.addBoolean(_USR_OGL_COMPATIBILITY_TWEAK_1,oglCompatibilityTweak1,"recommended to keep false since it causes small memory leaks."); c.addInteger(_USR_VISION_SENSORS_USE_GUI_WINDOWED,visionSensorsUseGuiThread_windowed,"recommended to keep -1 (-1=default, 0=GUI when not otherwise possible, 1=always GUI)."); c.addInteger(_USR_VISION_SENSORS_USE_GUI_HEADLESS,visionSensorsUseGuiThread_headless,"recommended to keep -1 (-1=default, 0=GUI when not otherwise possible, 1=always GUI)."); c.addBoolean(_USR_USE_GLFINISH,useGlFinish,"recommended to keep false. Graphic card dependent."); c.addBoolean(_USR_USE_GLFINISH_VISION_SENSORS,useGlFinish_visionSensors,"recommended to keep false. Graphic card dependent."); c.addInteger(_USR_VSYNC,vsync,"recommended to keep at 0. Graphic card dependent."); c.addBoolean(_USR_DEBUG_OPENGL,debugOpenGl,""); c.addFloat(_USR_STEREO_DIST,stereoDist,"0=no stereo, otherwise the intra occular distance (0.0635 for the human eyes)."); c.addInteger(_USR_HIGH_RES_DISPLAY,highResDisplay,"-1=none, 2=enabled, 1=special."); c.addBoolean(_USR_NO_EDGES_WHEN_MOUSE_DOWN,noEdgesWhenMouseDownInCameraView,"if true, rendering is faster during mouse/view interaction"); c.addBoolean(_USR_NO_TEXTURES_WHEN_MOUSE_DOWN,noTexturesWhenMouseDownInCameraView,"if true, rendering is faster during mouse/view interaction"); c.addBoolean(_USR_NO_CUSTOM_UIS_WHEN_MOUSE_DOWN,noCustomUisWhenMouseDownInCameraView,"if true, rendering is faster during mouse/view interaction"); c.addInteger(_USR_HIERARCHY_REFRESH_CNT,hierarchyRefreshCnt,""); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Visual"); c.addRandomLine("// ================================================="); c.addBoolean(_USR_DARK_MODE,darkMode,""); c.addInteger(_USR_RENDERING_SURFACE_VERTICAL_SHIFT,renderingSurfaceVShift,""); c.addInteger(_USR_RENDERING_SURFACE_VERTICAL_RESIZE,renderingSurfaceVResize,""); c.addBoolean(_USR_DISPLAY_WORLD_REF,displayWorldReference,""); c.addBoolean(_USR_ANTIALIASING,antiAliasing,""); c.addBoolean(_USR_DISPLAY_BOUNDING_BOXES,displayBoundingBoxeWhenObjectSelected,""); c.addInteger(_USR_GUI_FONT_SIZE_WIN,guiFontSize_Win,"-1=default"); c.addInteger(_USR_GUI_FONT_SIZE_MAC,guiFontSize_Mac,"-1=default"); c.addInteger(_USR_GUI_FONT_SIZE_LINUX,guiFontSize_Linux,"-1=default"); c.addBoolean(_USR_STATUSBAR_INITIALLY_VISIBLE,statusbarInitiallyVisible,""); c.addBoolean(_USR_MODELBROWSER_INITIALLY_VISIBLE,modelBrowserInitiallyVisible,""); c.addBoolean(_USR_SCENEHIERARCHY_INITIALLY_VISIBLE,sceneHierarchyInitiallyVisible,""); c.addBoolean(_USR_SCENEHIERARCHY_HIDDEN_DURING_SIMULATION,sceneHierarchyHiddenDuringSimulation,""); c.addString(_USR_SCRIPT_EDITOR_FONT,scriptEditorFont,"empty=default."); c.addBoolean(_USR_SCRIPT_EDITOR_BOLDFONT,scriptEditorBoldFont,""); c.addInteger(_USR_SCRIPT_EDITOR_FONT_SIZE,scriptEditorFontSize,"-1=default."); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_BACKGROUND,mainScriptColor_background,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_SELECTION,mainScriptColor_selection,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_COMMENT,mainScriptColor_comment,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_NUMBER,mainScriptColor_number,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_STRING,mainScriptColor_string,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_CHARACTER,mainScriptColor_character,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_OPERATOR,mainScriptColor_operator,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_PREPROCESSOR,mainScriptColor_preprocessor,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_IDENTIFIER,mainScriptColor_identifier,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD,mainScriptColor_word,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD2,mainScriptColor_word2,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD3,mainScriptColor_word3,""); c.addIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD4,mainScriptColor_word4,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_BACKGROUND,nonThreadedChildScriptColor_background,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_SELECTION,nonThreadedChildScriptColor_selection,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_COMMENT,nonThreadedChildScriptColor_comment,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_NUMBER,nonThreadedChildScriptColor_number,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_STRING,nonThreadedChildScriptColor_string,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_CHARACTER,nonThreadedChildScriptColor_character,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_OPERATOR,nonThreadedChildScriptColor_operator,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_PREPROCESSOR,nonThreadedChildScriptColor_preprocessor,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_IDENTIFIER,nonThreadedChildScriptColor_identifier,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD,nonThreadedChildScriptColor_word,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD2,nonThreadedChildScriptColor_word2,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD3,nonThreadedChildScriptColor_word3,""); c.addIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD4,nonThreadedChildScriptColor_word4,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_BACKGROUND,threadedChildScriptColor_background,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_SELECTION,threadedChildScriptColor_selection,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_COMMENT,threadedChildScriptColor_comment,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_NUMBER,threadedChildScriptColor_number,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_STRING,threadedChildScriptColor_string,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_CHARACTER,threadedChildScriptColor_character,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_OPERATOR,threadedChildScriptColor_operator,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_PREPROCESSOR,threadedChildScriptColor_preprocessor,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_IDENTIFIER,threadedChildScriptColor_identifier,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD,threadedChildScriptColor_word,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD2,threadedChildScriptColor_word2,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD3,threadedChildScriptColor_word3,""); c.addIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD4,threadedChildScriptColor_word4,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_BACKGROUND,customizationScriptColor_background,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_SELECTION,customizationScriptColor_selection,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_COMMENT,customizationScriptColor_comment,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_NUMBER,customizationScriptColor_number,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_STRING,customizationScriptColor_string,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_CHARACTER,customizationScriptColor_character,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_OPERATOR,customizationScriptColor_operator,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_PREPROCESSOR,customizationScriptColor_preprocessor,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_IDENTIFIER,customizationScriptColor_identifier,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD,customizationScriptColor_word,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD2,customizationScriptColor_word2,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD3,customizationScriptColor_word3,""); c.addIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD4,customizationScriptColor_word4,""); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Directories"); c.addRandomLine("// ================================================="); c.addString(_USR_DIRECTORY_FOR_SCENES,defaultDirectoryForScenes,"absolute path, e.g. d:/myScenes (or leave empty for default path)"); c.addString(_USR_DIRECTORY_FOR_MODELS,defaultDirectoryForModels,"absolute path, e.g. d:/myModels (or leave empty for default path)"); c.addString(_USR_DIRECTORY_FOR_CAD,defaultDirectoryForCadFiles,"absolute path, e.g. d:/myCadFiles (or leave empty for default path)"); c.addString(_USR_DIRECTORY_FOR_MISC,defaultDirectoryForMiscFiles,"absolute path, e.g. d:/myMiscFiles (or leave empty for default path)"); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Serialization"); c.addRandomLine("// ================================================="); c.addInteger(_USR_AUTO_SAVE_DELAY,autoSaveDelay,"in minutes. 0 to disable."); c.addBoolean(_USR_DO_NOT_WRITE_PERSISTENT_DATA,doNotWritePersistentData,""); c.addBoolean(_USR_COMPRESS_FILES,compressFiles,""); c.addBoolean(_USR_APPROXIMATED_NORMALS,saveApproxNormals,""); c.addBoolean(_USR_PACK_INDICES,packIndices,""); c.addInteger(_USR_FILE_DIALOGS_NATIVE,fileDialogs,"recommended to keep -1 (-1=default, 0=native dialogs, 1=Qt dialogs)."); c.addInteger(_USR_BULLET_SERIALIZATION_BUFFER,bulletSerializationBuffer,""); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Undo/Redo"); c.addRandomLine("// ================================================="); c.addBoolean(_USR_UNDO_REDO_ENABLED,_undoRedoEnabled,""); c.addBoolean(_USR_UNDO_REDO_PARTIAL_WITH_CAMERAS,_undoRedoOnlyPartialWithCameras,""); c.addInteger(_USR_UNDO_REDO_LEVEL_COUNT,undoRedoLevelCount,""); c.addInteger(_USR_UNDO_REDO_MAX_BUFFER_SIZE,undoRedoMaxBufferSize,""); c.addInteger(_USR_TIME_FOR_UNDO_REDO_TOO_LONG_WARNING,timeInMsForUndoRedoTooLongWarning,""); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Messaging"); c.addRandomLine("// ================================================="); c.addBoolean(_USR_DO_NOT_SHOW_CRASH_RECOVERY_MESSAGE,doNotShowCrashRecoveryMessage,""); c.addBoolean(_USR_DO_NOT_SHOW_UPDATE_CHECK_MESSAGE,doNotShowUpdateCheckMessage,""); c.addBoolean(_USR_DO_NOT_SHOW_PROGRESS_BARS,doNotShowProgressBars,""); c.addBoolean(_USR_DO_NOT_SHOW_ACKNOWLEDGMENT_MESSAGES,doNotShowAcknowledgmentMessages,""); c.addBoolean(_USR_DO_NOT_SHOW_VIDEO_COMPRESSION_LIBRARY_LOAD_ERROR,doNotShowVideoCompressionLibraryLoadError,""); c.addBoolean(_USR_SUPPRESS_STARTUP_DIALOG,suppressStartupDialogs,""); c.addBoolean(_USR_SUPPRESS_XML_OVERWRITE_MSG,suppressXmlOverwriteMsg,""); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Compatibility"); c.addRandomLine("// ================================================="); c.addBoolean(_USR_MIDDLE_MOUSE_BUTTON_SWITCHES_MODES,middleMouseButtonSwitchesModes,"has only an effect if navigationBackwardCompatibility is true."); c.addBoolean(_USR_NAVIGATION_BACKWARD_COMPATIBILITY_MODE,navigationBackwardCompatibility,"recommended to keep false."); c.addFloat(_USR_COLOR_ADJUST_BACK_COMPATIBILITY,colorAdjust_backCompatibility,"recommended to keep 1.0"); c.addBoolean(_USR_SPECIFIC_GPU_TWEAK,specificGpuTweak,""); c.addBoolean(_USR_USE_ALTERNATE_SERIAL_PORT_ROUTINES,useAlternateSerialPortRoutines,""); c.addBoolean(_USR_DISABLED_OPENGL_BASED_CUSTOM_UI,disableOpenGlBasedCustomUi,""); c.addBoolean(_USR_SHOW_old_DLGS,showOldDlgs,""); c.addBoolean(_USR_ENABLE_OLD_RENDERABLE,enableOldRenderableBehaviour,""); c.addBoolean(_USR_SUPPORT_old_THREADED_SCRIPTS,keepOldThreadedScripts,""); c.addBoolean(_USR_ENABLE_old_MIRROR_OBJECTS,enableOldMirrorObjects,""); c.addInteger(_USR_THREADED_SCRIPTS_GRACE_TIME,threadedScriptsStoppingGraceTime,""); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Various"); c.addRandomLine("// ================================================="); c.addFloat(_USR_MOUSE_WHEEL_ZOOM_FACTOR,mouseWheelZoomFactor,""); c.addFloat(_USR_DYNAMIC_ACTIVITY_RANGE,dynamicActivityRange,""); c.addFloat(_USR_TRANSLATION_STEP_SIZE,_translationStepSize,""); c.addFloat(_USR_ROTATION_STEP_SIZE,_rotationStepSize*radToDeg_f,""); c.addInteger(_USR_PROCESSOR_CORE_AFFINITY,CThreadPool_old::getProcessorCoreAffinity(),"recommended to keep 0 (-1:os default, 0:all threads on same core, m: affinity mask (bit1=core1, bit2=core2, etc.))"); c.addInteger(_USR_FREE_SERVER_PORT_START,freeServerPortStart,""); c.addInteger(_USR_FREE_SERVER_PORT_RANGE,freeServerPortRange,""); c.addInteger(_USR_ABORT_SCRIPT_EXECUTION_BUTTON,_abortScriptExecutionButton,"in seconds. Zero to disable."); c.addInteger(_USR_TRIANGLE_COUNT_IN_OBB,triCountInOBB,""); c.addBoolean(_USR_REMOVE_IDENTICAL_VERTICES,identicalVerticesCheck,""); c.addFloat(_USR_IDENTICAL_VERTICES_TOLERANCE,identicalVerticesTolerance,""); c.addBoolean(_USR_REMOVE_IDENTICAL_TRIANGLES,identicalTrianglesCheck,""); c.addBoolean(_USR_TRIANGLE_WINDING_CHECK,identicalTrianglesWindingCheck,""); c.addBoolean(_USR_RUN_CUSTOMIZATION_SCRIPTS,runCustomizationScripts,""); c.addBoolean(_USR_TEST1,test1,"recommended to keep false."); c.addBoolean(_USR_ORDER_HIERARCHY_ALPHABETICALLY,orderHierarchyAlphabetically,""); c.addInteger(_USR_MAC_CHILD_DIALOG_TYPE,macChildDialogType,"-1=default."); c.addString(_USR_ADDITIONAL_LUA_PATH,additionalLuaPath,"e.g. d:/myLuaRoutines"); c.addInteger(_USR_DESKTOP_RECORDING_INDEX,desktopRecordingIndex,""); c.addInteger(_USR_DESKTOP_RECORDING_WIDTH,desktopRecordingWidth,"-1=default."); c.addString(_USR_EXTERNAL_SCRIPT_EDITOR,externalScriptEditor,""); c.addInteger(_USR_XML_EXPORT_SPLIT_SIZE,xmlExportSplitSize,"0=generate a single file."); c.addBoolean(_USR_XML_EXPORT_KNOWN_FORMATS,xmlExportKnownFormats,"true=if several files are generated, mesh and image files are saved under known formats."); c.addRandomLine(""); c.addRandomLine(""); c.addRandomLine("// Floating license / dongle license"); c.addRandomLine("// ================================================="); c.addBoolean(_USR_FLOAT_LICENSE_ENABLED,floatingLicenseEnabled,""); c.addString(_USR_FLOAT_LICENSE_SERVER_ADDRESS,floatingLicenseServer,""); c.addInteger(_USR_FLOAT_LICENSE_SERVER_PORT,floatingLicensePort,""); c.addBoolean(_USR_KEEP_DONGLE_OPEN,keepDongleOpen,""); // c.addInteger(_USR_XR_TEST,xrTest,""); std::string filenameAndPath(VVarious::getModulePath()+"/"+SIM_SYSTEM_DIRECTORY_NAME+"/"+USER_SETTINGS_FILENAME); c.writeConfiguration(filenameAndPath.c_str()); } bool CUserSettings::getBooleanFromFileDirectly(const char* varName,bool& varValue) { // static function bool result=false; CConfReaderAndWriter c; std::string filenameAndPath(VVarious::getModulePath()+"/"+SIM_SYSTEM_DIRECTORY_NAME+"/"+USER_SETTINGS_FILENAME); // The CFolderSystem object might not yet be set-up if (c.readConfiguration(filenameAndPath.c_str())) result=c.getBoolean(varName,varValue); return(result); } bool CUserSettings::getIntegerFromFileDirectly(const char* varName,int& varValue) { // static function bool result=false; CConfReaderAndWriter c; std::string filenameAndPath(VVarious::getModulePath()+"/"+SIM_SYSTEM_DIRECTORY_NAME+"/"+USER_SETTINGS_FILENAME); // The CFolderSystem object might not yet be set-up if (c.readConfiguration(filenameAndPath.c_str())) result=c.getInteger(varName,varValue); return(result); } bool CUserSettings::getFloatFromFileDirectly(const char* varName,float& varValue) { // static function bool result=false; CConfReaderAndWriter c; std::string filenameAndPath(VVarious::getModulePath()+"/"+SIM_SYSTEM_DIRECTORY_NAME+"/"+USER_SETTINGS_FILENAME); // The CFolderSystem object might not yet be set-up if (c.readConfiguration(filenameAndPath.c_str())) result=c.getFloat(varName,varValue); return(result); } bool CUserSettings::getStringFromFileDirectly(const char* varName,std::string& varValue) { // static function bool result=false; CConfReaderAndWriter c; std::string filenameAndPath(VVarious::getModulePath()+"/"+SIM_SYSTEM_DIRECTORY_NAME+"/"+USER_SETTINGS_FILENAME); // The CFolderSystem object might not yet be set-up if (c.readConfiguration(filenameAndPath.c_str())) result=c.getString(varName,varValue); return(result); } void CUserSettings::loadUserSettings() { CConfReaderAndWriter c; // The CFolderSystem object might not yet be set-up std::string filenameAndPath(VVarious::getModulePath()+"/"+SIM_SYSTEM_DIRECTORY_NAME+"/"+USER_SETTINGS_FILENAME); // Following call might fail. if (!c.readConfiguration(filenameAndPath.c_str())) saveUserSettings(); // Debugging section: // ***************************** c.getBoolean(_USR_ALWAYS_SHOW_CONSOLE,alwaysShowConsole); c.getString(_USR_VERBOSITY,_overrideConsoleVerbosity); if (_overrideConsoleVerbosity.compare("default")!=0) { int l=App::getVerbosityLevelFromString(_overrideConsoleVerbosity.c_str()); if (l>=sim_verbosity_none) { App::setConsoleVerbosity(l); App::logMsg(sim_verbosity_warnings,"console verbosity overridden to '%s' via system/usrset.txt.",_overrideConsoleVerbosity.c_str()); } else App::logMsg(sim_verbosity_errors,"unrecognized verbosity value in system/usrset.txt: %s.",_overrideConsoleVerbosity.c_str()); } c.getString(_USR_STATUSBAR_VERBOSITY,_overrideStatusbarVerbosity); if (_overrideStatusbarVerbosity.compare("default")!=0) { int l=App::getVerbosityLevelFromString(_overrideStatusbarVerbosity.c_str()); if (l>=sim_verbosity_none) { App::setStatusbarVerbosity(l); App::logMsg(sim_verbosity_warnings,"statusbar verbosity overridden to '%s' via system/usrset.txt.",_overrideStatusbarVerbosity.c_str()); } else App::logMsg(sim_verbosity_errors,"unrecognized verbosity value in system/usrset.txt: %s.",_overrideStatusbarVerbosity.c_str()); } c.getString(_USR_LOG_FILTER,_consoleLogFilter); App::setConsoleLogFilter(_consoleLogFilter.c_str()); c.getString(_USR_DIALOG_VERBOSITY,_overrideDialogVerbosity); if (_overrideDialogVerbosity.compare("default")!=0) { int l=App::getVerbosityLevelFromString(_overrideDialogVerbosity.c_str()); if (l>=sim_verbosity_none) { App::setDlgVerbosity(l); App::logMsg(sim_verbosity_warnings,"dialog verbosity overridden to '%s' via system/usrset.txt.",_overrideDialogVerbosity.c_str()); } else App::logMsg(sim_verbosity_errors,"unrecognized verbosity value in system/usrset.txt: %s.",_overrideDialogVerbosity.c_str()); } c.getBoolean(_USR_UNDECORATED_STATUSBAR_MSGS,undecoratedStatusbarMessages); bool dummyBool=false; if (c.getBoolean(_USR_CONSOLE_MSGS_TO_FILE,dummyBool)) App::setConsoleMsgToFile(dummyBool); // Rendering section: // ***************************** c.getInteger(_USR_IDLE_FPS,_idleFps); setIdleFps(_idleFps); c.getInteger(_USR_DESIRED_OPENGL_MAJOR,desiredOpenGlMajor); c.getInteger(_USR_DESIRED_OPENGL_MINOR,desiredOpenGlMinor); c.getInteger(_USR_OFFSCREEN_CONTEXT_TYPE,offscreenContextType); c.getInteger(_USR_FBO_TYPE,fboType); c.getBoolean(_USR_FORCE_FBO_VIA_EXT,forceFboViaExt); c.getInteger(_USR_VBO_OPERATION,vboOperation); c.getInteger(_USR_VBO_PERSISTENCE_IN_MS,vboPersistenceInMs); c.getBoolean(_USR_OGL_COMPATIBILITY_TWEAK_1,oglCompatibilityTweak1); c.getInteger(_USR_VISION_SENSORS_USE_GUI_WINDOWED,visionSensorsUseGuiThread_windowed); c.getInteger(_USR_VISION_SENSORS_USE_GUI_HEADLESS,visionSensorsUseGuiThread_headless); c.getBoolean(_USR_USE_GLFINISH,useGlFinish); c.getBoolean(_USR_USE_GLFINISH_VISION_SENSORS,useGlFinish_visionSensors); c.getInteger(_USR_VSYNC,vsync); c.getBoolean(_USR_DEBUG_OPENGL,debugOpenGl); c.getFloat(_USR_STEREO_DIST,stereoDist); c.getInteger(_USR_HIGH_RES_DISPLAY,highResDisplay); c.getBoolean(_USR_NO_EDGES_WHEN_MOUSE_DOWN,noEdgesWhenMouseDownInCameraView); c.getBoolean(_USR_NO_TEXTURES_WHEN_MOUSE_DOWN,noTexturesWhenMouseDownInCameraView); c.getBoolean(_USR_NO_CUSTOM_UIS_WHEN_MOUSE_DOWN,noCustomUisWhenMouseDownInCameraView); c.getInteger(_USR_HIERARCHY_REFRESH_CNT,hierarchyRefreshCnt); // Visual section: // ***************************** c.getBoolean(_USR_DARK_MODE,darkMode); c.getInteger(_USR_RENDERING_SURFACE_VERTICAL_SHIFT,renderingSurfaceVShift); c.getInteger(_USR_RENDERING_SURFACE_VERTICAL_RESIZE,renderingSurfaceVResize); c.getBoolean(_USR_DISPLAY_WORLD_REF,displayWorldReference); c.getBoolean(_USR_ANTIALIASING,antiAliasing); c.getBoolean(_USR_DISPLAY_BOUNDING_BOXES,displayBoundingBoxeWhenObjectSelected); c.getInteger(_USR_GUI_FONT_SIZE_WIN,guiFontSize_Win); c.getInteger(_USR_GUI_FONT_SIZE_MAC,guiFontSize_Mac); c.getInteger(_USR_GUI_FONT_SIZE_LINUX,guiFontSize_Linux); c.getBoolean(_USR_STATUSBAR_INITIALLY_VISIBLE,statusbarInitiallyVisible); c.getBoolean(_USR_MODELBROWSER_INITIALLY_VISIBLE,modelBrowserInitiallyVisible); #ifdef SIM_WITH_GUI //OLDMODELBROWSER COglSurface::_browserEnabled=modelBrowserInitiallyVisible; App::setBrowserEnabled(modelBrowserInitiallyVisible); #endif c.getBoolean(_USR_SCENEHIERARCHY_INITIALLY_VISIBLE,sceneHierarchyInitiallyVisible); #ifdef SIM_WITH_GUI COglSurface::_hierarchyEnabled=sceneHierarchyInitiallyVisible; #endif c.getBoolean(_USR_SCENEHIERARCHY_HIDDEN_DURING_SIMULATION,sceneHierarchyHiddenDuringSimulation); c.getString(_USR_SCRIPT_EDITOR_FONT,scriptEditorFont); c.getBoolean(_USR_SCRIPT_EDITOR_BOLDFONT,scriptEditorBoldFont); c.getInteger(_USR_SCRIPT_EDITOR_FONT_SIZE,scriptEditorFontSize); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_BACKGROUND,mainScriptColor_background); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_SELECTION,mainScriptColor_selection); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_COMMENT,mainScriptColor_comment); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_NUMBER,mainScriptColor_number); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_STRING,mainScriptColor_string); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_CHARACTER,mainScriptColor_character); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_OPERATOR,mainScriptColor_operator); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_PREPROCESSOR,mainScriptColor_preprocessor); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_IDENTIFIER,mainScriptColor_identifier); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD,mainScriptColor_word); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD2,mainScriptColor_word2); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD3,mainScriptColor_word3); c.getIntVector3(_USR_MAIN_SCRIPT_COLOR_WORD4,mainScriptColor_word4); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_BACKGROUND,nonThreadedChildScriptColor_background); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_SELECTION,nonThreadedChildScriptColor_selection); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_COMMENT,nonThreadedChildScriptColor_comment); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_NUMBER,nonThreadedChildScriptColor_number); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_STRING,nonThreadedChildScriptColor_string); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_CHARACTER,nonThreadedChildScriptColor_character); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_OPERATOR,nonThreadedChildScriptColor_operator); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_PREPROCESSOR,nonThreadedChildScriptColor_preprocessor); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_IDENTIFIER,nonThreadedChildScriptColor_identifier); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD,nonThreadedChildScriptColor_word); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD2,nonThreadedChildScriptColor_word2); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD3,nonThreadedChildScriptColor_word3); c.getIntVector3(_USR_NON_THREADED_CHILD_SCRIPT_COLOR_WORD4,nonThreadedChildScriptColor_word4); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_BACKGROUND,threadedChildScriptColor_background); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_SELECTION,threadedChildScriptColor_selection); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_COMMENT,threadedChildScriptColor_comment); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_NUMBER,threadedChildScriptColor_number); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_STRING,threadedChildScriptColor_string); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_CHARACTER,threadedChildScriptColor_character); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_OPERATOR,threadedChildScriptColor_operator); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_PREPROCESSOR,threadedChildScriptColor_preprocessor); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_IDENTIFIER,threadedChildScriptColor_identifier); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD,threadedChildScriptColor_word); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD2,threadedChildScriptColor_word2); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD3,threadedChildScriptColor_word3); c.getIntVector3(_USR_THREADED_CHILD_SCRIPT_COLOR_WORD4,threadedChildScriptColor_word4); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_BACKGROUND,customizationScriptColor_background); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_SELECTION,customizationScriptColor_selection); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_COMMENT,customizationScriptColor_comment); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_NUMBER,customizationScriptColor_number); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_STRING,customizationScriptColor_string); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_CHARACTER,customizationScriptColor_character); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_OPERATOR,customizationScriptColor_operator); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_PREPROCESSOR,customizationScriptColor_preprocessor); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_IDENTIFIER,customizationScriptColor_identifier); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD,customizationScriptColor_word); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD2,customizationScriptColor_word2); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD3,customizationScriptColor_word3); c.getIntVector3(_USR_CUSTOMIZATION_SCRIPT_COLOR_WORD4,customizationScriptColor_word4); // Directories section: // ***************************** c.getString(_USR_DIRECTORY_FOR_SCENES,defaultDirectoryForScenes); c.getString(_USR_DIRECTORY_FOR_MODELS,defaultDirectoryForModels); c.getString(_USR_DIRECTORY_FOR_CAD,defaultDirectoryForCadFiles); c.getString(_USR_DIRECTORY_FOR_MISC,defaultDirectoryForMiscFiles); // Serialization section: // ***************************** c.getInteger(_USR_AUTO_SAVE_DELAY,autoSaveDelay); c.getBoolean(_USR_DO_NOT_WRITE_PERSISTENT_DATA,doNotWritePersistentData); c.getBoolean(_USR_COMPRESS_FILES,compressFiles); c.getBoolean(_USR_APPROXIMATED_NORMALS,saveApproxNormals); c.getBoolean(_USR_PACK_INDICES,packIndices); c.getInteger(_USR_FILE_DIALOGS_NATIVE,fileDialogs); c.getInteger(_USR_BULLET_SERIALIZATION_BUFFER,bulletSerializationBuffer); // Undo/redo section: // ***************************** c.getBoolean(_USR_UNDO_REDO_ENABLED,_undoRedoEnabled); c.getBoolean(_USR_UNDO_REDO_PARTIAL_WITH_CAMERAS,_undoRedoOnlyPartialWithCameras); c.getInteger(_USR_UNDO_REDO_LEVEL_COUNT,undoRedoLevelCount); undoRedoLevelCount=tt::getLimitedInt(3,50,undoRedoLevelCount); c.getInteger(_USR_UNDO_REDO_MAX_BUFFER_SIZE,undoRedoMaxBufferSize); undoRedoMaxBufferSize=tt::getLimitedInt(2000000,800000000,undoRedoMaxBufferSize); c.getInteger(_USR_TIME_FOR_UNDO_REDO_TOO_LONG_WARNING,timeInMsForUndoRedoTooLongWarning); // Messaging section: // ***************************** c.getBoolean(_USR_DO_NOT_SHOW_CRASH_RECOVERY_MESSAGE,doNotShowCrashRecoveryMessage); c.getBoolean(_USR_DO_NOT_SHOW_UPDATE_CHECK_MESSAGE,doNotShowUpdateCheckMessage); c.getBoolean(_USR_DO_NOT_SHOW_PROGRESS_BARS,doNotShowProgressBars); c.getBoolean(_USR_DO_NOT_SHOW_ACKNOWLEDGMENT_MESSAGES,doNotShowAcknowledgmentMessages); c.getBoolean(_USR_DO_NOT_SHOW_VIDEO_COMPRESSION_LIBRARY_LOAD_ERROR,doNotShowVideoCompressionLibraryLoadError); c.getBoolean(_USR_SUPPRESS_STARTUP_DIALOG,suppressStartupDialogs); c.getBoolean(_USR_SUPPRESS_XML_OVERWRITE_MSG,suppressXmlOverwriteMsg); // Compatibility section: // ***************************** c.getBoolean(_USR_MIDDLE_MOUSE_BUTTON_SWITCHES_MODES,middleMouseButtonSwitchesModes); c.getBoolean(_USR_NAVIGATION_BACKWARD_COMPATIBILITY_MODE,navigationBackwardCompatibility); c.getFloat(_USR_COLOR_ADJUST_BACK_COMPATIBILITY,colorAdjust_backCompatibility); c.getBoolean(_USR_SPECIFIC_GPU_TWEAK,specificGpuTweak); c.getBoolean(_USR_USE_ALTERNATE_SERIAL_PORT_ROUTINES,useAlternateSerialPortRoutines); c.getBoolean(_USR_DISABLED_OPENGL_BASED_CUSTOM_UI,disableOpenGlBasedCustomUi); c.getBoolean(_USR_SHOW_old_DLGS,showOldDlgs); c.getBoolean(_USR_ENABLE_OLD_RENDERABLE,enableOldRenderableBehaviour); c.getBoolean(_USR_SUPPORT_old_THREADED_SCRIPTS,keepOldThreadedScripts); c.getBoolean(_USR_SUPPORT_old_API_NOTATION,_supportOldApiNotation); c.getBoolean(_USR_ENABLE_old_MIRROR_OBJECTS,enableOldMirrorObjects); c.getInteger(_USR_ALLOW_old_EDU_RELEASE,allowOldEduRelease); c.getInteger(_USR_THREADED_SCRIPTS_GRACE_TIME,threadedScriptsStoppingGraceTime); c.getInteger(_USR_BUGFIX1,bugFix1); c.getBoolean(_USR_COMPATIBILITYFIX1,compatibilityFix1); // Various section: // ***************************** c.getFloat(_USR_MOUSE_WHEEL_ZOOM_FACTOR,mouseWheelZoomFactor); c.getFloat(_USR_DYNAMIC_ACTIVITY_RANGE,dynamicActivityRange); if (c.getFloat(_USR_TRANSLATION_STEP_SIZE,_translationStepSize)) setTranslationStepSize(_translationStepSize); if (c.getFloat(_USR_ROTATION_STEP_SIZE,_rotationStepSize)) setRotationStepSize(_rotationStepSize*degToRad_f); int processorCoreAffinity=0; if (c.getInteger(_USR_PROCESSOR_CORE_AFFINITY,processorCoreAffinity)) CThreadPool_old::setProcessorCoreAffinity(processorCoreAffinity); c.getInteger(_USR_FREE_SERVER_PORT_START,freeServerPortStart); _nextfreeServerPortToUse=freeServerPortStart; c.getInteger(_USR_FREE_SERVER_PORT_RANGE,freeServerPortRange); c.getInteger(_USR_ABORT_SCRIPT_EXECUTION_BUTTON,_abortScriptExecutionButton); c.getInteger(_USR_TRIANGLE_COUNT_IN_OBB,triCountInOBB); c.getBoolean(_USR_REMOVE_IDENTICAL_VERTICES,identicalVerticesCheck); c.getFloat(_USR_IDENTICAL_VERTICES_TOLERANCE,identicalVerticesTolerance); c.getBoolean(_USR_REMOVE_IDENTICAL_TRIANGLES,identicalTrianglesCheck); c.getBoolean(_USR_TRIANGLE_WINDING_CHECK,identicalTrianglesWindingCheck); c.getBoolean(_USR_RUN_CUSTOMIZATION_SCRIPTS,runCustomizationScripts); c.getBoolean(_USR_TEST1,test1); c.getBoolean(_USR_ORDER_HIERARCHY_ALPHABETICALLY,orderHierarchyAlphabetically); c.getInteger(_USR_MAC_CHILD_DIALOG_TYPE,macChildDialogType); #ifdef SIM_WITH_GUI #ifdef MAC_SIM if (macChildDialogType<=0) { // Qt::Tool VDialog::dialogStyle=QT_MODELESS_DLG_STYLE; } else { // Qt::Dialog VDialog::dialogStyle=Qt::Dialog; } #else VDialog::dialogStyle=QT_MODELESS_DLG_STYLE; #endif #endif c.getString(_USR_ADDITIONAL_LUA_PATH,additionalLuaPath); c.getInteger(_USR_DESKTOP_RECORDING_INDEX,desktopRecordingIndex); c.getInteger(_USR_DESKTOP_RECORDING_WIDTH,desktopRecordingWidth); c.getBoolean(_USR_FORCE_BUG_FIX_REL_30002,forceBugFix_rel30002); c.getString(_USR_EXTERNAL_SCRIPT_EDITOR,externalScriptEditor); c.getInteger(_USR_XML_EXPORT_SPLIT_SIZE,xmlExportSplitSize); c.getBoolean(_USR_XML_EXPORT_KNOWN_FORMATS,xmlExportKnownFormats); // Floating license / dongle license section: // ***************************** c.getBoolean(_USR_FLOAT_LICENSE_ENABLED,floatingLicenseEnabled); c.getString(_USR_FLOAT_LICENSE_SERVER_ADDRESS,floatingLicenseServer); c.getInteger(_USR_FLOAT_LICENSE_SERVER_PORT,floatingLicensePort); c.getBoolean(_USR_KEEP_DONGLE_OPEN,keepDongleOpen); c.getInteger(_USR_XR_TEST,xrTest); }
51.540395
265
0.797356
[ "mesh", "object" ]
a4e417a34f5ca99075cee8d528de00bdcfca52f5
2,435
cpp
C++
count-and-say_test.cpp
babu-thomas/interviewbit-solutions
21125bf30b2d94b6f03310a4917679f216f55af3
[ "MIT" ]
16
2018-12-04T16:23:07.000Z
2021-09-21T06:32:04.000Z
count-and-say_test.cpp
babu-thomas/interviewbit-solutions
21125bf30b2d94b6f03310a4917679f216f55af3
[ "MIT" ]
1
2019-08-21T16:20:03.000Z
2019-08-21T16:21:41.000Z
count-and-say_test.cpp
babu-thomas/interviewbit-solutions
21125bf30b2d94b6f03310a4917679f216f55af3
[ "MIT" ]
23
2019-06-21T12:09:57.000Z
2021-09-22T18:03:28.000Z
#include<bits/stdc++.h> using namespace std; #define DEBUG(x) do { std::cout << #x << ": " << x << " "; } while (0) #define DEBUGL(x) do { std::cout << #x << ": " << x << "\n"; } while (0) template<typename T> void print_vector(vector<T> a) { for(auto& i: a) { cout << i << " "; } cout << "\n"; } template<typename T> void print_matrix_2d(vector<vector<T>> a) { int r = 0; for(auto& i: a) { cout << r << ": "; for(auto& j: i) { cout << j << " "; } r++; cout << "\n"; } cout << "\n"; } // Time - O(N * S), Space - O(S) // where N = the term number, S = number of digits in largest term string solve(int A) { if(A == 1) { return "1"; } string prev = "1"; string result; for(int term = 2; term <= A; term++) { int n = prev.size(); char digit = prev[0]; int count = 0; for(int i = 0; i < n; i++) { if(prev[i] == digit) { count++; } else { result.push_back(count + '0'); result.push_back(digit); digit = prev[i]; count = 1; } } // Push the count of last digit as loop terminates before last contiguous sequence ends result.push_back(count + '0'); result.push_back(digit); // DEBUGL(result); prev = result; result.clear(); } return prev; } string generate_term(const string& s) { int n = s.size(); int count = 0; string result; for(int i = 0; i < n; i++) { count++; // If contiguous sequence of same characters ends here or if string ends here if(s[i] != s[i + 1] || i + 1 == n) { result.push_back(count + '0'); result.push_back(s[i]); count = 0; } } return result; } // Time - O(N * S), Space - O(S) // where N = the term number, S = number of digits in largest term string solve_short(int A) { // A is the term number if(A == 1) { return "1"; } // First term string result = "1"; for(int i = 2; i <= A; i++) { result = generate_term(result); } return result; } int main() { // ios::sync_with_stdio(0); // cin.tie(0); int num = 4; cout << solve(num) << "\n"; cout << solve_short(num) << "\n"; return 0; }
20.635593
95
0.459548
[ "vector" ]
a4efe269ab3c38fab3d6f0870228aa2c9168ad3b
7,766
hpp
C++
include/codegen/include/Zenject/FactoryArgumentsToChoiceBinder_1.hpp
Futuremappermydud/Naluluna-Modifier-Quest
bfda34370764b275d90324b3879f1a429a10a873
[ "MIT" ]
1
2021-11-12T09:29:31.000Z
2021-11-12T09:29:31.000Z
include/codegen/include/Zenject/FactoryArgumentsToChoiceBinder_1.hpp
Futuremappermydud/Naluluna-Modifier-Quest
bfda34370764b275d90324b3879f1a429a10a873
[ "MIT" ]
null
null
null
include/codegen/include/Zenject/FactoryArgumentsToChoiceBinder_1.hpp
Futuremappermydud/Naluluna-Modifier-Quest
bfda34370764b275d90324b3879f1a429a10a873
[ "MIT" ]
2
2021-10-03T02:14:20.000Z
2021-11-12T09:29:36.000Z
// Autogenerated from CppHeaderCreator on 7/27/2020 3:10:42 PM // Created by Sc2ad // ========================================================================= #pragma once #pragma pack(push, 8) // Begin includes #include "utils/typedefs.h" // Including type: Zenject.FactoryToChoiceBinder`1 #include "Zenject/FactoryToChoiceBinder_1.hpp" #include "utils/il2cpp-utils.hpp" // Completed includes // Begin forward declares // Forward declaring namespace: System::Collections::Generic namespace System::Collections::Generic { // Forward declaring type: IEnumerable`1<T> template<typename T> class IEnumerable_1; } // Forward declaring namespace: Zenject namespace Zenject { // Forward declaring type: DiContainer class DiContainer; // Forward declaring type: BindInfo class BindInfo; // Forward declaring type: FactoryBindInfo class FactoryBindInfo; } // Completed forward declares // Type namespace: Zenject namespace Zenject { // Autogenerated type: Zenject.FactoryArgumentsToChoiceBinder`1 template<typename TContract> class FactoryArgumentsToChoiceBinder_1 : public Zenject::FactoryToChoiceBinder_1<TContract> { public: // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(T param) // Offset: 0x13D7898 template<class T> Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(T param) { return CRASH_UNLESS(il2cpp_utils::RunGenericMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", {il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<T>::get()}, param)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(TParam1 param1, TParam2 param2) // Offset: 0x13D783C template<class TParam1, class TParam2> Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(TParam1 param1, TParam2 param2) { return CRASH_UNLESS(il2cpp_utils::RunGenericMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", {il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam1>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam2>::get()}, param1, param2)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3) // Offset: 0x13D77DC template<class TParam1, class TParam2, class TParam3> Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3) { return CRASH_UNLESS(il2cpp_utils::RunGenericMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", {il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam1>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam2>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam3>::get()}, param1, param2, param3)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) // Offset: 0x13D7778 template<class TParam1, class TParam2, class TParam3, class TParam4> Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4) { return CRASH_UNLESS(il2cpp_utils::RunGenericMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", {il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam1>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam2>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam3>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam4>::get()}, param1, param2, param3, param4)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) // Offset: 0x13D7710 template<class TParam1, class TParam2, class TParam3, class TParam4, class TParam5> Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5) { return CRASH_UNLESS(il2cpp_utils::RunGenericMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", {il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam1>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam2>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam3>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam4>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam5>::get()}, param1, param2, param3, param4, param5)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) // Offset: 0x13D76A4 template<class TParam1, class TParam2, class TParam3, class TParam4, class TParam5, class TParam6> Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(TParam1 param1, TParam2 param2, TParam3 param3, TParam4 param4, TParam5 param5, TParam6 param6) { return CRASH_UNLESS(il2cpp_utils::RunGenericMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", {il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam1>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam2>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam3>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam4>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam5>::get(), il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<TParam6>::get()}, param1, param2, param3, param4, param5, param6)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArguments(System.Object[] args) // Offset: 0x117CED8 Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArguments(::Array<::Il2CppObject*>* args) { return CRASH_UNLESS(il2cpp_utils::RunMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArguments", args)); } // public Zenject.FactoryToChoiceBinder`1<TContract> WithFactoryArgumentsExplicit(System.Collections.Generic.IEnumerable`1<Zenject.TypeValuePair> extraArgs) // Offset: 0x117CF24 Zenject::FactoryToChoiceBinder_1<TContract>* WithFactoryArgumentsExplicit(System::Collections::Generic::IEnumerable_1<Zenject::TypeValuePair>* extraArgs) { return CRASH_UNLESS(il2cpp_utils::RunMethod<Zenject::FactoryToChoiceBinder_1<TContract>*>(this, "WithFactoryArgumentsExplicit", extraArgs)); } // public System.Void .ctor(Zenject.DiContainer bindContainer, Zenject.BindInfo bindInfo, Zenject.FactoryBindInfo factoryBindInfo) // Offset: 0x117CEB4 // Implemented from: Zenject.FactoryToChoiceBinder`1 // Base method: System.Void FactoryToChoiceBinder`1::.ctor(Zenject.DiContainer bindContainer, Zenject.BindInfo bindInfo, Zenject.FactoryBindInfo factoryBindInfo) // Base method: System.Void FactoryFromBinder`1::.ctor(Zenject.DiContainer bindContainer, Zenject.BindInfo bindInfo, Zenject.FactoryBindInfo factoryBindInfo) static FactoryArgumentsToChoiceBinder_1<TContract>* New_ctor(Zenject::DiContainer* bindContainer, Zenject::BindInfo* bindInfo, Zenject::FactoryBindInfo* factoryBindInfo) { return (FactoryArgumentsToChoiceBinder_1<TContract>*)CRASH_UNLESS(il2cpp_utils::New(il2cpp_utils::il2cpp_type_check::il2cpp_no_arg_class<FactoryArgumentsToChoiceBinder_1<TContract>*>::get(), bindContainer, bindInfo, factoryBindInfo)); } }; // Zenject.FactoryArgumentsToChoiceBinder`1 } DEFINE_IL2CPP_ARG_TYPE_GENERIC_CLASS(Zenject::FactoryArgumentsToChoiceBinder_1, "Zenject", "FactoryArgumentsToChoiceBinder`1"); #pragma pack(pop)
83.505376
604
0.787793
[ "object" ]
a4fe3dafad7cf5470de1945cabca3351ed7bdd40
1,258
cpp
C++
src/nodes/resampler/resampler.cpp
dequis/in-formant
129b9b399c75cdbd834b68f04dabcb1d406af250
[ "Apache-2.0" ]
null
null
null
src/nodes/resampler/resampler.cpp
dequis/in-formant
129b9b399c75cdbd834b68f04dabcb1d406af250
[ "Apache-2.0" ]
null
null
null
src/nodes/resampler/resampler.cpp
dequis/in-formant
129b9b399c75cdbd834b68f04dabcb1d406af250
[ "Apache-2.0" ]
null
null
null
#include "resampler.h" #include <memory> #include <cstring> #include <iostream> using namespace Nodes; Resampler::Resampler(int initialInSampleRate, int outSampleRate) : Node(NodeDescriptor { .inputCount = 1, .inputs = &kNodeIoTypeAudioTime, .outputCount = 1, .outputs = &kNodeIoTypeAudioTime, }), mResampler(initialInSampleRate, outSampleRate) { } void Resampler::setOutputSampleRate(int outSampleRate) { mResampler.setOutputRate(outSampleRate); } int Resampler::getRequiredInputLength(int outLength) { return mResampler.getRequiredInLength(outLength); } void Resampler::process(const NodeIO *inputs[], NodeIO *outputs[]) { auto in = inputs[0]->as<IO::AudioTime>(); auto out = outputs[0]->as<IO::AudioTime>(); if (mResampler.getInputRate() != in->getSampleRate()) { mResampler.setInputRate(in->getSampleRate()); } int inLength = in->getLength(); std::vector<double> invec(in->getConstData(), in->getConstData() + inLength); auto outVec = mResampler.process(invec.data(), inLength); out->setSampleRate(mResampler.getOutputRate()); out->setLength(outVec.size()); std::copy(outVec.begin(), outVec.end(), out->getData()); }
25.16
81
0.670906
[ "vector" ]
a4fe62be8d29f10beb8d620bcd946de7a66befe8
2,943
cxx
C++
ds/adsi/router/cprov.cxx
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
ds/adsi/router/cprov.cxx
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
ds/adsi/router/cprov.cxx
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
//--------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1992 - 1995 // // File: cprovcf.cxx // // Contents: Windows NT 3.5 Provider Object Class Factory Code // // CADsProviderCF::CreateInstance // // History: 01-30-95 krishnag Created. // //---------------------------------------------------------------------------- #include "oleds.hxx" #pragma hdrstop // Class CADsProvider CADsProvider::CADsProvider() { } HRESULT CADsProvider::Create(CADsProvider FAR * FAR * ppProvider) { CADsProvider FAR * pProvider = NULL; HRESULT hr = S_OK; //Create the Provider Object pProvider = new CADsProvider(); if (pProvider == NULL) { RRETURN(ResultFromScode(E_OUTOFMEMORY)); } if (FAILED(hr)) { delete pProvider; RRETURN(hr); } *ppProvider = pProvider; RRETURN(hr); } CADsProvider::~CADsProvider( ) { ENLIST_TRACKING(CADsProvider); } STDMETHODIMP CADsProvider::QueryInterface(REFIID iid, LPVOID FAR* ppv) { if (IsEqualIID(iid, IID_IUnknown)) { *ppv = this; } else if (IsEqualIID(iid, IID_IParseDisplayName)) { *ppv = (IParseDisplayName FAR *) this; } else { *ppv = NULL; return E_NOINTERFACE; } AddRef(); return NOERROR; } STDMETHODIMP CADsProvider::ParseDisplayName(IBindCtx* pbc, WCHAR* szDisplayName, ULONG* pchEaten, IMoniker** ppmk) { HRESULT hr; *ppmk = NULL; if (pchEaten != NULL){ *pchEaten = 0; } hr = ResolvePathName( pbc, szDisplayName, pchEaten, ppmk ); RRETURN(hr); } HRESULT CADsProvider::ResolvePathName(IBindCtx* pbc, WCHAR* szDisplayName, ULONG* pchEaten, IMoniker** ppmk ) { HRESULT hr = S_OK; LPUNKNOWN pUnknown = NULL; if (!pchEaten) { BAIL_IF_ERROR(hr = E_INVALIDARG); } *pchEaten = 0; // // The ADs: Path would only work if it contains the exact // text L"ADs:" or L"ADs://" for backward compatibility. // if ((_wcsicmp(szDisplayName,L"ADs:") != 0) && (_wcsicmp(szDisplayName, L"ADs://") != 0 )) { hr = E_ADS_BAD_PATHNAME; BAIL_IF_ERROR(hr); } hr = CADsNamespaces::CreateNamespaces( L"", L"ADs:", ADS_OBJECT_BOUND, IID_IUnknown, (void **)&pUnknown ); BAIL_IF_ERROR(hr); hr = CreatePointerMoniker(pUnknown, ppmk); BAIL_IF_ERROR(hr); *pchEaten += wcslen(szDisplayName); cleanup: if (pUnknown) { pUnknown->Release(); } RRETURN (hr); }
20.296552
102
0.506286
[ "object" ]
35019d104fc24d8003bf3ece7b430d9e5eaf2b74
26,183
cpp
C++
src/mailews/src/MailEwsMsgProtocol.cpp
stonewell/exchange-ews-thunderbird
7b8cc41621ff29deb4145ad905344fecd60ccb0c
[ "MIT" ]
17
2016-02-24T15:13:04.000Z
2022-03-31T22:07:20.000Z
src/mailews/src/MailEwsMsgProtocol.cpp
stonewell/exchange-ews-thunderbird
7b8cc41621ff29deb4145ad905344fecd60ccb0c
[ "MIT" ]
3
2016-02-24T20:05:09.000Z
2017-04-18T04:23:56.000Z
src/mailews/src/MailEwsMsgProtocol.cpp
stonewell/exchange-ews-thunderbird
7b8cc41621ff29deb4145ad905344fecd60ccb0c
[ "MIT" ]
8
2018-06-01T08:32:35.000Z
2021-07-01T01:22:20.000Z
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_LOGGING #ifndef FORCE_PR_LOG // sorry, this has to be before the pre-compiled header #define FORCE_PR_LOG 1 /* Allow logging in the release build */ #endif #endif #include "msgCore.h" #include "MailEwsMsgProtocol.h" #include "nscore.h" #include "nsIOutputStream.h" #include "nsIMsgDatabase.h" #include "nsIMsgHdr.h" #include "MsgLineStreamBuffer.h" #include "nsMsgDBCID.h" #include "nsIMsgMailNewsUrl.h" #include "nsICopyMsgStreamListener.h" #include "nsMsgMessageFlags.h" #include "prtime.h" #include "prlog.h" #include "prerror.h" #include "prprf.h" #include "nspr.h" PRLogModuleInfo *MAILEWS; #include "nsIFileStreams.h" #include "nsIStreamTransportService.h" #include "nsIStreamConverterService.h" #include "nsIIOService.h" #include "nsNetUtil.h" #include "MsgUtils.h" #include "nsIMsgWindow.h" #include "nsIMimeHeaders.h" #include "nsIMsgPluggableStore.h" #include "nsISeekableStream.h" #include "nsIMsgMdnGenerator.h" #include "MailEwsLog.h" /* the output_buffer_size must be larger than the largest possible line * 2000 seems good for news * * jwz: I increased this to 4k since it must be big enough to hold the * entire button-bar HTML, and with the new "mailto" format, that can * contain arbitrarily long header fields like "references". * * fortezza: proxy auth is huge, buffer increased to 8k (sigh). */ #define OUTPUT_BUFFER_SIZE (4096*2) MailEwsMsgProtocol::MailEwsMsgProtocol(nsIURI * aURI) : MsgProtocolBase(aURI) { m_lineStreamBuffer =nullptr; // initialize the pr log if it hasn't been initialiezed already if (!MAILEWS) MAILEWS = PR_NewLogModule("MAILEWS"); } MailEwsMsgProtocol::~MailEwsMsgProtocol() { // free our local state delete m_lineStreamBuffer; } nsresult MailEwsMsgProtocol::OpenMultipleMsgTransport(uint64_t offset, int32_t size) { nsresult rv; nsCOMPtr<nsIStreamTransportService> serv = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); // XXX 64-bit rv = serv->CreateInputTransport(m_multipleMsgMoveCopyStream, int64_t(offset), int64_t(size), false, getter_AddRefs(m_transport)); return rv; } nsresult MailEwsMsgProtocol::OpenFileSocketForReuse(nsIURI * aURL, uint64_t aStartPosition, int32_t aReadCount) { NS_ENSURE_ARG_POINTER(aURL); nsresult rv = NS_OK; m_readCount = aReadCount; nsCOMPtr <nsIFile> file; rv = GetFileFromURL(aURL, getter_AddRefs(file)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr<nsIFileInputStream> fileStream = do_CreateInstance(NS_LOCALFILEINPUTSTREAM_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); m_multipleMsgMoveCopyStream = do_QueryInterface(fileStream, &rv); NS_ENSURE_SUCCESS(rv, rv); fileStream->Init(file, PR_RDONLY, 0664, false); //just have to read the messages rv = OpenMultipleMsgTransport(aStartPosition, aReadCount); m_socketIsOpen = false; return rv; } nsresult MailEwsMsgProtocol::Initialize(nsIURI * aURL) { NS_PRECONDITION(aURL, "invalid URL passed into MAILEWS Protocol"); nsresult rv = NS_OK; if (aURL) { rv = aURL->QueryInterface(NS_GET_IID(nsIMailboxUrl), (void **) getter_AddRefs(m_runningUrl)); if (NS_SUCCEEDED(rv) && m_runningUrl) { nsCOMPtr <nsIMsgWindow> window; rv = m_runningUrl->GetMailboxAction(&m_mailboxAction); // clear stopped flag on msg window, because we care. nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_runningUrl); if (mailnewsUrl) { mailnewsUrl->GetMsgWindow(getter_AddRefs(window)); if (window) window->SetStopped(false); } // if (m_mailboxAction == nsIMailboxUrl::ActionParseMailbox) // { // // Set the length of the file equal to the max progress // nsCOMPtr<nsIFile> file; // GetFileFromURL(aURL, getter_AddRefs(file)); // if (file) // { // int64_t fileSize = 0; // file->GetFileSize(&fileSize); // mailnewsUrl->SetMaxProgress(fileSize); // } // rv = OpenFileSocket(aURL, 0, -1 /* read in all the bytes in the file */); // } // else // { // we need to specify a byte range to read in so we read in JUST the message we want. rv = SetupMessageExtraction(); if (NS_FAILED(rv)) return rv; uint32_t aMsgSize = 0; rv = m_runningUrl->GetMessageSize(&aMsgSize); NS_ASSERTION(NS_SUCCEEDED(rv), "oops....i messed something up"); SetContentLength(aMsgSize); mailnewsUrl->SetMaxProgress(aMsgSize); if (RunningMultipleMsgUrl()) { rv = OpenFileSocketForReuse(aURL, m_msgOffset, aMsgSize); // if we're running multiple msg url, we clear the event sink because the multiple // msg urls will handle setting the progress. mProgressEventSink = nullptr; } else { nsCOMPtr<nsIMsgIncomingServer> server; nsCOMPtr<nsIMsgDBHdr> msgHdr; nsCOMPtr<nsIMsgFolder> folder; nsCOMPtr<nsIMsgMessageUrl> msgUrl = do_QueryInterface(m_runningUrl, &rv); NS_ENSURE_SUCCESS(rv,rv); rv = msgUrl->GetMessageHeader(getter_AddRefs(msgHdr)); if (msgHdr) { msgHdr->GetFolder(getter_AddRefs(folder)); if (folder) folder->GetServer(getter_AddRefs(server)); } if (server) { nsCOMPtr<nsIMsgPluggableStore> msgStore; rv = server->GetMsgStore(getter_AddRefs(msgStore)); NS_ENSURE_SUCCESS(rv, rv); if (NS_SUCCEEDED(rv) && msgHdr) { nsCOMPtr<nsIInputStream> stream; int64_t offset = 0; bool reusable = false; rv = folder->GetMsgInputStream(msgHdr, &reusable, getter_AddRefs(stream)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr<nsISeekableStream> seekableStream(do_QueryInterface(stream, &rv)); NS_ENSURE_SUCCESS(rv, rv); seekableStream->Tell(&offset); // create input stream transport nsCOMPtr<nsIStreamTransportService> sts = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; m_readCount = aMsgSize; rv = sts->CreateInputTransport(stream, offset, int64_t(aMsgSize), true, getter_AddRefs(m_transport)); m_socketIsOpen = false; } } else // must be a .eml file rv = OpenFileSocket(aURL, 0, aMsgSize); } NS_ASSERTION(NS_SUCCEEDED(rv), "oops....i messed something up"); // } } } m_lineStreamBuffer = new MsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, true); m_nextState = MAILBOX_READ_MESSAGE; m_initialState = MAILBOX_READ_MESSAGE; mCurrentProgress = 0; // do we really need both? m_tempMessageFile = m_tempMsgFile; return rv; } ///////////////////////////////////////////////////////////////////////////////////////////// // we suppport the nsIStreamListener interface //////////////////////////////////////////////////////////////////////////////////////////// NS_IMETHODIMP MailEwsMsgProtocol::OnStartRequest(nsIRequest *request, nsISupports *ctxt) { // extract the appropriate event sinks from the url and initialize them in our protocol data // the URL should be queried for a nsINewsURL. If it doesn't support a news URL interface then // we have an error. if (m_nextState == MAILBOX_READ_FOLDER && m_mailboxParser) { // we need to inform our mailbox parser that it's time to start... m_mailboxParser->OnStartRequest(request, ctxt); } return MsgProtocolBase::OnStartRequest(request, ctxt); } bool MailEwsMsgProtocol::RunningMultipleMsgUrl() { if (m_mailboxAction == nsIMailboxUrl::ActionCopyMessage || m_mailboxAction == nsIMailboxUrl::ActionMoveMessage) { uint32_t numMoveCopyMsgs; nsresult rv = m_runningUrl->GetNumMoveCopyMsgs(&numMoveCopyMsgs); if (NS_SUCCEEDED(rv) && numMoveCopyMsgs > 1) return true; } return false; } // stop binding is a "notification" informing us that the stream associated with aURL is going away. NS_IMETHODIMP MailEwsMsgProtocol::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult aStatus) { nsresult rv; if (m_nextState == MAILBOX_READ_FOLDER && m_mailboxParser) { // we need to inform our mailbox parser that there is no more incoming data... m_mailboxParser->OnStopRequest(request, ctxt, aStatus); } else if (m_nextState == MAILBOX_READ_MESSAGE) { DoneReadingMessage(); } // I'm not getting cancel status - maybe the load group still has the status. bool stopped = false; if (m_runningUrl) { nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_runningUrl); if (mailnewsUrl) { nsCOMPtr <nsIMsgWindow> window; mailnewsUrl->GetMsgWindow(getter_AddRefs(window)); if (window) window->GetStopped(&stopped); } if (!stopped && NS_SUCCEEDED(aStatus) && (m_mailboxAction == nsIMailboxUrl::ActionCopyMessage || m_mailboxAction == nsIMailboxUrl::ActionMoveMessage)) { uint32_t numMoveCopyMsgs; uint32_t curMoveCopyMsgIndex; rv = m_runningUrl->GetNumMoveCopyMsgs(&numMoveCopyMsgs); if (NS_SUCCEEDED(rv) && numMoveCopyMsgs > 0) { m_runningUrl->GetCurMoveCopyMsgIndex(&curMoveCopyMsgIndex); if (++curMoveCopyMsgIndex < numMoveCopyMsgs) { if (!mSuppressListenerNotifications && m_channelListener) { nsCOMPtr<nsICopyMessageStreamListener> listener = do_QueryInterface(m_channelListener, &rv); if (listener) { listener->EndCopy(ctxt, aStatus); listener->StartMessage(); // start next message. } } m_runningUrl->SetCurMoveCopyMsgIndex(curMoveCopyMsgIndex); nsCOMPtr <nsIMsgDBHdr> nextMsg; rv = m_runningUrl->GetMoveCopyMsgHdrForIndex(curMoveCopyMsgIndex, getter_AddRefs(nextMsg)); if (NS_SUCCEEDED(rv) && nextMsg) { uint32_t msgSize = 0; nsCOMPtr <nsIMsgFolder> msgFolder; nextMsg->GetFolder(getter_AddRefs(msgFolder)); NS_ASSERTION(msgFolder, "couldn't get folder for next msg in multiple msg local copy"); if (msgFolder) { nsCString uri; msgFolder->GetUriForMsg(nextMsg, uri); nsCOMPtr<nsIMsgMessageUrl> msgUrl = do_QueryInterface(m_runningUrl); if (msgUrl) { msgUrl->SetOriginalSpec(uri.get()); msgUrl->SetUri(uri.get()); uint64_t msgOffset; nextMsg->GetMessageOffset(&msgOffset); nextMsg->GetMessageSize(&msgSize); // now we have to seek to the right position in the file and // basically re-initialize the transport with the correct message size. // then, we have to make sure the url keeps running somehow. nsCOMPtr<nsISupports> urlSupports = do_QueryInterface(m_runningUrl); // // put us in a state where we are always notified of incoming data // m_transport = 0; // open new stream transport m_inputStream = 0; m_outputStream = 0; rv = OpenMultipleMsgTransport(msgOffset, msgSize); if (NS_SUCCEEDED(rv)) { if (!m_inputStream) rv = m_transport->OpenInputStream(0, 0, 0, getter_AddRefs(m_inputStream)); if (NS_SUCCEEDED(rv)) { nsCOMPtr<nsIInputStreamPump> pump; rv = NS_NewInputStreamPump(getter_AddRefs(pump), m_inputStream); if (NS_SUCCEEDED(rv)) { rv = pump->AsyncRead(this, urlSupports); if (NS_SUCCEEDED(rv)) m_request = pump; } } } NS_ASSERTION(NS_SUCCEEDED(rv), "AsyncRead failed"); if (m_loadGroup) m_loadGroup->RemoveRequest(static_cast<nsIRequest *>(this), nullptr, aStatus); m_socketIsOpen = true; // mark the channel as open return aStatus; } } } } else { } } } } // and we want to mark ourselves for deletion or some how inform our protocol manager that we are // available for another url if there is one. // mscott --> maybe we should set our state to done because we don't run multiple urls in a mailbox // protocol connection.... m_nextState = MAILBOX_DONE; // the following is for smoke test purposes. QA is looking at this "Mailbox Done" string which // is printed out to the console and determining if the mail app loaded up correctly...obviously // this solution is not very good so we should look at something better, but don't remove this // line before talking to me (mscott) and mailnews QA.... PR_LOG(MAILEWS, PR_LOG_ALWAYS, ("Mailews Done\n")); // when on stop binding is called, we as the protocol are done...let's close down the connection // releasing all of our interfaces. It's important to remember that this on stop binding call // is coming from netlib so they are never going to ping us again with on data available. This means // we'll never be going through the Process loop... if (m_multipleMsgMoveCopyStream) { m_multipleMsgMoveCopyStream->Close(); m_multipleMsgMoveCopyStream = nullptr; } MsgProtocolBase::OnStopRequest(request, ctxt, aStatus); return CloseSocket(); } ///////////////////////////////////////////////////////////////////////////////////////////// // End of nsIStreamListenerSupport ////////////////////////////////////////////////////////////////////////////////////////////// nsresult MailEwsMsgProtocol::DoneReadingMessage() { nsresult rv = NS_OK; // and close the article file if it was open.... if (m_mailboxAction == nsIMailboxUrl::ActionSaveMessageToDisk && m_msgFileOutputStream) rv = m_msgFileOutputStream->Close(); return rv; } nsresult MailEwsMsgProtocol::SetupMessageExtraction() { // Determine the number of bytes we are going to need to read out of the // mailbox url.... nsCOMPtr<nsIMsgDBHdr> msgHdr; nsresult rv = NS_OK; NS_ASSERTION(m_runningUrl, "Not running a url"); if (m_runningUrl) { uint32_t messageSize = 0; m_runningUrl->GetMessageSize(&messageSize); if (!messageSize) { nsCOMPtr<nsIMsgMessageUrl> msgUrl = do_QueryInterface(m_runningUrl, &rv); NS_ENSURE_SUCCESS(rv,rv); rv = msgUrl->GetMessageHeader(getter_AddRefs(msgHdr)); if (NS_SUCCEEDED(rv) && msgHdr) { msgHdr->GetMessageSize(&messageSize); m_runningUrl->SetMessageSize(messageSize); msgHdr->GetMessageOffset(&m_msgOffset); } else NS_ASSERTION(false, "couldn't get message header"); } } return rv; } ///////////////////////////////////////////////////////////////////////////////////////////// // Begin protocol state machine functions... ////////////////////////////////////////////////////////////////////////////////////////////// nsresult MailEwsMsgProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) { nsresult rv = NS_OK; // if we were already initialized with a consumer, use it... nsCOMPtr<nsIStreamListener> consumer = do_QueryInterface(aConsumer); if (consumer) m_channelListener = consumer; if (aURL) { m_runningUrl = do_QueryInterface(aURL); if (m_runningUrl) { // find out from the url what action we are supposed to perform... rv = m_runningUrl->GetMailboxAction(&m_mailboxAction); bool convertData = false; // need to check if we're fetching an rfc822 part in order to // quote a message. if (m_mailboxAction == nsIMailboxUrl::ActionFetchMessage) { nsCOMPtr<nsIMsgMailNewsUrl> msgUrl = do_QueryInterface(m_runningUrl, &rv); NS_ENSURE_SUCCESS(rv,rv); nsAutoCString queryStr; rv = msgUrl->GetQuery(queryStr); NS_ENSURE_SUCCESS(rv,rv); // check if this is a filter plugin requesting the message. // in that case, set up a text converter convertData = (queryStr.Find("header=filter") != -1 || queryStr.Find("header=attach") != -1); } else if (m_mailboxAction == nsIMailboxUrl::ActionFetchPart) { // when fetching a part, we need to insert a converter into the listener chain order to // force just the part out of the message. Our channel listener is the consumer we'll // pass in to AsyncConvertData. convertData = true; consumer = m_channelListener; } mailews_logger << "************************Convert Data" << convertData << std::endl; if (convertData) { nsCOMPtr<nsIStreamConverterService> streamConverter = do_GetService("@mozilla.org/streamConverters;1", &rv); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr <nsIStreamListener> conversionListener; nsCOMPtr<nsIChannel> channel; QueryInterface(NS_GET_IID(nsIChannel), getter_AddRefs(channel)); rv = streamConverter->AsyncConvertData("message/rfc822", "*/*", consumer, channel, getter_AddRefs(m_channelListener)); } if (NS_SUCCEEDED(rv)) { switch (m_mailboxAction) { case nsIMailboxUrl::ActionParseMailbox: // extract the mailbox parser.. rv = m_runningUrl->GetMailboxParser(getter_AddRefs(m_mailboxParser)); m_nextState = MAILBOX_READ_FOLDER; break; case nsIMailboxUrl::ActionSaveMessageToDisk: // ohhh, display message already writes a msg to disk (as part of a hack) // so we can piggy back off of that!! We just need to change m_tempMessageFile // to be the name of our save message to disk file. Since save message to disk // urls are run without a docshell to display the msg into, we won't be trying // to display the message after we write it to disk... { nsCOMPtr<nsIMsgMessageUrl> messageUrl = do_QueryInterface(m_runningUrl, &rv); if (NS_SUCCEEDED(rv)) { messageUrl->GetMessageFile(getter_AddRefs(m_tempMessageFile)); rv = mailews::MsgNewBufferedFileOutputStream(getter_AddRefs(m_msgFileOutputStream), m_tempMessageFile, -1, 00600); NS_ENSURE_SUCCESS(rv, rv); bool addDummyEnvelope = false; messageUrl->GetAddDummyEnvelope(&addDummyEnvelope); if (addDummyEnvelope) SetFlag(MAILBOX_MSG_PARSE_FIRST_LINE); else ClearFlag(MAILBOX_MSG_PARSE_FIRST_LINE); } } m_nextState = MAILBOX_READ_MESSAGE; break; case nsIMailboxUrl::ActionCopyMessage: case nsIMailboxUrl::ActionMoveMessage: case nsIMailboxUrl::ActionFetchMessage: ClearFlag(MAILBOX_MSG_PARSE_FIRST_LINE); m_nextState = MAILBOX_READ_MESSAGE; break; case nsIMailboxUrl::ActionFetchPart: m_nextState = MAILBOX_READ_MESSAGE; break; default: break; } } rv = MsgProtocolBase::LoadUrl(aURL, m_channelListener); } // if we received an MAILBOX url... } // if we received a url! return rv; } int32_t MailEwsMsgProtocol::ReadFolderResponse(nsIInputStream * inputStream, uint64_t sourceOffset, uint32_t length) { // okay we are doing a folder read in 8K chunks of a mail folder.... // this is almost too easy....we can just forward the data in this stream on to our // folder parser object!!! nsresult rv = NS_OK; mCurrentProgress += length; if (m_mailboxParser) { nsCOMPtr <nsIURI> url = do_QueryInterface(m_runningUrl); rv = m_mailboxParser->OnDataAvailable(nullptr, url, inputStream, sourceOffset, length); // let the parser deal with it... } if (NS_FAILED(rv)) { m_nextState = MAILBOX_ERROR_DONE; // drop out of the loop.... return -1; } // now wait for the next 8K chunk to come in..... SetFlag(MAILBOX_PAUSE_FOR_READ); // leave our state alone so when the next chunk of the mailbox comes in we jump to this state // and repeat....how does this process end? Well when the file is done being read in, core net lib // will issue an ::OnStopRequest to us...we'll use that as our sign to drop out of this state and to // close the protocol instance... return 0; } int32_t MailEwsMsgProtocol::ReadMessageResponse(nsIInputStream * inputStream, uint64_t sourceOffset, uint32_t length) { char *line = nullptr; uint32_t status = 0; nsresult rv = NS_OK; mCurrentProgress += length; // if we are doing a move or a copy, forward the data onto the copy handler... // if we want to display the message then parse the incoming data... if (m_channelListener) { // just forward the data we read in to the listener... rv = m_channelListener->OnDataAvailable(this, m_channelContext, inputStream, sourceOffset, length); } else { bool pauseForMoreData = false; bool canonicalLineEnding = false; nsCOMPtr<nsIMsgMessageUrl> msgurl = do_QueryInterface(m_runningUrl); if (msgurl) msgurl->GetCanonicalLineEnding(&canonicalLineEnding); while ((line = m_lineStreamBuffer->ReadNextLine(inputStream, status, pauseForMoreData)) && !pauseForMoreData) { /* When we're sending this line to a converter (ie, it's a message/rfc822) use the local line termination convention, not CRLF. This makes text articles get saved with the local line terminators. Since SMTP and NNTP mandate the use of CRLF, it is expected that the local system will convert that to the local line terminator as it is read. */ // mscott - the firstline hack is aimed at making sure we don't write // out the dummy header when we are trying to display the message. // The dummy header is the From line with the date tag on it. if (m_msgFileOutputStream) { uint32_t count = 0; rv = m_msgFileOutputStream->Write(line, PL_strlen(line), &count); if (NS_FAILED(rv)) break; if (canonicalLineEnding) rv = m_msgFileOutputStream->Write(CRLF, 2, &count); else rv = m_msgFileOutputStream->Write(MSG_LINEBREAK, MSG_LINEBREAK_LEN, &count); if (NS_FAILED(rv)) break; } PR_Free(line); } PR_Free(line); } SetFlag(MAILBOX_PAUSE_FOR_READ); // wait for more data to become available... if (mProgressEventSink && m_runningUrl) { int64_t maxProgress; nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl(do_QueryInterface(m_runningUrl)); mailnewsUrl->GetMaxProgress(&maxProgress); mProgressEventSink->OnProgress(this, m_channelContext, mCurrentProgress, maxProgress); } if (NS_FAILED(rv)) return -1; return 0; } /* * returns negative if the transfer is finished or error'd out * * returns zero or more if the transfer needs to be continued. */ nsresult MailEwsMsgProtocol::ProcessProtocolState(nsIURI * url, nsIInputStream * inputStream, uint64_t offset, uint32_t length) { nsresult rv = NS_OK; int32_t status = 0; ClearFlag(MAILBOX_PAUSE_FOR_READ); /* already paused; reset */ while(!TestFlag(MAILBOX_PAUSE_FOR_READ)) { switch(m_nextState) { case MAILBOX_READ_MESSAGE: if (inputStream == nullptr) SetFlag(MAILBOX_PAUSE_FOR_READ); else status = ReadMessageResponse(inputStream, offset, length); break; case MAILBOX_READ_FOLDER: if (inputStream == nullptr) SetFlag(MAILBOX_PAUSE_FOR_READ); // wait for file socket to read in the next chunk... else status = ReadFolderResponse(inputStream, offset, length); break; case MAILBOX_DONE: case MAILBOX_ERROR_DONE: { nsCOMPtr <nsIMsgMailNewsUrl> anotherUrl = do_QueryInterface(m_runningUrl); rv = m_nextState == MAILBOX_DONE ? NS_OK : NS_ERROR_FAILURE; anotherUrl->SetUrlState(false, rv); m_nextState = MAILBOX_FREE; } break; case MAILBOX_FREE: // MAILBOX is a one time use connection so kill it if we get here... CloseSocket(); return rv; /* final end */ default: /* should never happen !!! */ m_nextState = MAILBOX_ERROR_DONE; break; } /* check for errors during load and call error * state if found */ if(status < 0 && m_nextState != MAILBOX_FREE) { m_nextState = MAILBOX_ERROR_DONE; /* don't exit! loop around again and do the free case */ ClearFlag(MAILBOX_PAUSE_FOR_READ); } } /* while(!MAILBOX_PAUSE_FOR_READ) */ return rv; } nsresult MailEwsMsgProtocol::CloseSocket() { // how do you force a release when closing the connection?? MsgProtocolBase::CloseSocket(); m_runningUrl = nullptr; m_mailboxParser = nullptr; return NS_OK; } // vim: ts=2 sw=2
35.287062
154
0.627927
[ "object" ]
350bc9d213ab3042ae3c7b48c4f0a6ea843332f6
2,746
cpp
C++
src/tests/manual_tests/level_set_liquid_solver3_tests.cpp
PavelBlend/fluid-engine-dev
45b4bdbdb4c6d8c0beebc682180469198203b0ef
[ "MIT" ]
1,355
2016-05-08T07:29:22.000Z
2022-03-30T13:59:35.000Z
src/tests/manual_tests/level_set_liquid_solver3_tests.cpp
Taiyuan-Zhang/fluid-engine-dev
45b4bdbdb4c6d8c0beebc682180469198203b0ef
[ "MIT" ]
208
2016-05-25T19:47:27.000Z
2022-01-17T04:18:29.000Z
src/tests/manual_tests/level_set_liquid_solver3_tests.cpp
Taiyuan-Zhang/fluid-engine-dev
45b4bdbdb4c6d8c0beebc682180469198203b0ef
[ "MIT" ]
218
2016-08-23T16:51:10.000Z
2022-03-31T03:55:48.000Z
// Copyright (c) 2018 Doyub Kim // // I am making my contributions/submissions to this project solely in my // personal capacity and am not conveying any rights to any intellectual // property of any third parties. #include <manual_tests.h> #include <jet/array2.h> #include <jet/implicit_surface_set3.h> #include <jet/marching_cubes.h> #include <jet/level_set_liquid_solver3.h> #include <jet/level_set_utils.h> #include <jet/plane3.h> #include <jet/surface_to_implicit3.h> #include <string> using namespace jet; namespace { void saveTriangleMesh( const TriangleMesh3& mesh, const std::string& filename) { std::ofstream file(filename.c_str()); if (file) { mesh.writeObj(&file); file.close(); } } void triangulateAndSave( const ScalarGrid3Ptr& sdf, const std::string& filename) { TriangleMesh3 mesh; int flag = kDirectionAll & ~kDirectionDown; marchingCubes( sdf->constDataAccessor(), sdf->gridSpacing(), sdf->dataOrigin(), &mesh, 0.0, flag); saveTriangleMesh(mesh, filename); } } // namespace JET_TESTS(LevelSetLiquidSolver3); JET_BEGIN_TEST_F(LevelSetLiquidSolver3, SubtleSloshing) { LevelSetLiquidSolver3 solver; auto data = solver.gridSystemData(); double dx = 1.0 / 64.0; data->resize({ 64, 64, 8 }, { dx, dx, dx }, Vector3D()); // Source setting ImplicitSurfaceSet3 surfaceSet; surfaceSet.addExplicitSurface( std::make_shared<Plane3>( Vector3D(0.02, 1, 0).normalized(), Vector3D(0.0, 0.5, 0.0))); auto sdf = solver.signedDistanceField(); sdf->fill([&](const Vector3D& x) { return surfaceSet.signedDistance(x); }); Array2<double> output(64, 64); auto sdfToBinary = [&](size_t i, size_t j) { output(i, j) = 1.0 - smearedHeavisideSdf((*sdf)(i, j, 4) / dx); }; output.forEachIndex(sdfToBinary); char filename[256]; snprintf(filename, sizeof(filename), "data.#grid2,0000.npy"); saveData(output.constAccessor(), filename); snprintf( filename, sizeof(filename), "data.#grid2,0000.obj"); triangulateAndSave(sdf, getFullFilePath(filename)); for (Frame frame(0, 1.0 / 60.0); frame.index < 120; frame.advance()) { solver.update(frame); output.forEachIndex(sdfToBinary); snprintf( filename, sizeof(filename), "data.#grid2,%04d.npy", frame.index); saveData(output.constAccessor(), filename); snprintf( filename, sizeof(filename), "data.#grid2,%04d.obj", frame.index); triangulateAndSave(sdf, getFullFilePath(filename)); } } JET_END_TEST_F
25.90566
74
0.632921
[ "mesh" ]
350d5ca6811d6463b977ca75ae32a2b11edfc21e
3,262
cpp
C++
src/shader.cpp
is3ny/Polycursion
62fdf6b6db13a520aefd57b66bf277975820bcfa
[ "MIT" ]
4
2019-07-06T19:10:26.000Z
2020-07-21T17:28:20.000Z
src/shader.cpp
is3ny/Polycursion
62fdf6b6db13a520aefd57b66bf277975820bcfa
[ "MIT" ]
1
2019-05-12T16:21:25.000Z
2019-05-12T16:21:25.000Z
src/shader.cpp
is3ny/Polycursion
62fdf6b6db13a520aefd57b66bf277975820bcfa
[ "MIT" ]
1
2021-05-14T10:27:44.000Z
2021-05-14T10:27:44.000Z
#include "shader.hpp" #include <iostream> ShaderProgram::ShaderProgram() { id = -1; } ShaderProgram::ShaderProgram(const GLchar *vert_path, const GLchar *frag_path) { loadFromFile(vert_path, frag_path); } int ShaderProgram::loadFromFile(const GLchar *vert_path, const GLchar *frag_path) { auto vert_src = readFile(vert_path); auto frag_src = readFile(frag_path); loadFromSource(vert_src.c_str(), frag_src.c_str()); return 0; } int ShaderProgram::loadFromSource(const GLchar *vert_src, const GLchar *frag_src) { int error = loadVertexFromSource(vert_src); if (error) { return error; } error = loadFragmentFromSource(frag_src); if (error) { return error; } error = link(); if (error) { return error; } return 0; } int ShaderProgram::loadVertexFromSource(const GLchar *vert_src) { vert = glCreateShader(GL_VERTEX_SHADER); glShaderSource(vert, 1, &vert_src, nullptr); glCompileShader(vert); if (!shaderStatus(vert)) { return -1; } return 0; } int ShaderProgram::loadFragmentFromSource(const GLchar *frag_src) { frag = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(frag, 1, &frag_src, nullptr); glCompileShader(frag); if (!shaderStatus(frag)) { return -1; } return 0; } int ShaderProgram::link() { id = glCreateProgram(); glAttachShader(id, vert); glAttachShader(id, frag); glLinkProgram(id); if (!programStatus(id)) { return -1; } //Clean up glDeleteShader(vert); glDeleteShader(frag); return 0; } int ShaderProgram::linkComp(int n, const GLchar * vars[], GLenum mode) { id = glCreateProgram(); glAttachShader(id, vert); std::cout << "Transform Feedback vars:\n"; for (int i = 0; i < n; i++) std::cout << vars[i] << std::endl; glTransformFeedbackVaryings(id, n, vars, mode); glLinkProgram(id); glLinkProgram(id); if (!programStatus(id)) { return -1; } //Clean up glDeleteShader(vert); return 0; } void ShaderProgram::setInt(const GLchar *name, int value) const { glUniform1i(glGetUniformLocation(id, name), value); } void ShaderProgram::setFloat(const GLchar *name, float value) const { glUniform1f(glGetUniformLocation(id, name), value); } void ShaderProgram::setBool(const GLchar *name, bool value) const { glUniform1i(glGetUniformLocation(id, name), static_cast<int>(value)); } // END ----- ShaderProgram void use(ShaderProgram *shp) { if (shp == nullptr) { glUseProgram(0); } else { glUseProgram(shp->id); } } bool shaderStatus(GLuint shader) { GLint success; char log[512]; glGetShaderiv(shader, GL_COMPILE_STATUS, &success); if (!success) { glGetShaderInfoLog(shader, 512, nullptr, log); puts(log); } return success; } bool programStatus(GLuint program) { GLint success; char log[512]; glGetProgramiv(program, GL_LINK_STATUS, &success); if (!success) { glGetProgramInfoLog(program, 512, nullptr, log); puts(log); } return success; } std::string readFile(const GLchar *path) { std::ifstream f(path); std::stringstream sas; sas << f.rdbuf(); return sas.str(); }
22.496552
83
0.650215
[ "transform" ]
35120feb3b96a891456efbb134ac0de1b75ba5f5
1,466
hpp
C++
cufhe/include/Logic.hpp
virtualsecureplatform/Iyokan-L2
75a33562844dd3d85a111b8a61d65907174a9cdb
[ "Apache-2.0" ]
7
2019-12-22T01:21:13.000Z
2021-08-09T15:31:37.000Z
cufhe/include/Logic.hpp
virtualsecureplatform/Iyokan-L2
75a33562844dd3d85a111b8a61d65907174a9cdb
[ "Apache-2.0" ]
4
2019-12-05T10:41:36.000Z
2020-02-06T05:51:31.000Z
cufhe/include/Logic.hpp
virtualsecureplatform/Iyokan-L2
75a33562844dd3d85a111b8a61d65907174a9cdb
[ "Apache-2.0" ]
null
null
null
#ifndef LOGIC_HPP #define LOGIC_HPP #include <vector> #include <queue> #include <iostream> #include <exception> #include <stdexcept> #include <functional> #include <memory> #include "cufhe_gpu.cuh" #include "cufhe.h" class Logic; class compare_f; using pri_queue = std::priority_queue<Logic *, std::vector<Logic *>, compare_f>; class Logic { public: int id; int priority; std::string Type; bool executed; bool executable; int res; cufhe::Ctxt *value; bool cipher = false; std::vector<Logic *> output{}; Logic(int _id, int pri, bool isCipher) { id = _id; priority = pri; executable = false; executed = false; if (isCipher) { cipher = true; value = new cufhe::Ctxt(); cufhe::ConstantZero(*value); cufhe::Synchronize(); } else { cipher = false; res = 0; } } virtual void Prepare() = 0; virtual void Execute(cufhe::Stream stream, bool reset) = 0; virtual void Execute(bool reset) = 0; virtual bool NoticeInputReady() = 0; virtual void AddInput(Logic *logic) = 0; virtual void AddOutput(Logic *logic) = 0; virtual bool Tick() = 0; protected: int InputCount; int ReadyInputCount; std::vector<Logic *> input{}; }; class compare_f { public: bool operator()(Logic *u, Logic *v) { return u->priority < v->priority; } }; #endif
18.098765
80
0.592769
[ "vector" ]
3515cd2f885775245e6949ed884e1d52cde39309
5,884
cpp
C++
QuantLibAddin/qlo/serialization/processor.cpp
txu2014/quantlib
95c7d94906c30d0c3c4e0758a2ebfe2a62b075ec
[ "BSD-3-Clause" ]
null
null
null
QuantLibAddin/qlo/serialization/processor.cpp
txu2014/quantlib
95c7d94906c30d0c3c4e0758a2ebfe2a62b075ec
[ "BSD-3-Clause" ]
null
null
null
QuantLibAddin/qlo/serialization/processor.cpp
txu2014/quantlib
95c7d94906c30d0c3c4e0758a2ebfe2a62b075ec
[ "BSD-3-Clause" ]
1
2022-02-24T04:54:18.000Z
2022-02-24T04:54:18.000Z
/* Copyright (C) 2008 Nazcatech sprl Belgium Copyright (C) 2008 Plamen Neykov This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <quantlib-dev@lists.sf.net>. The license is also available online at <http://quantlib.org/license.shtml>. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ #include <qlo/serialization/processor.hpp> #include <qlo/handle.hpp> #include <qlo/pricingengines.hpp> #include <qlo/leg.hpp> #include <qlo/couponvectors.hpp> #include <qlo/conversions/varianttodate.hpp> #include <qlo/extrapolator.hpp> #include <qlo/baseinstruments.hpp> #include <qlo/index.hpp> namespace QuantLibAddin { std::string InstrumentProcessor::process(const ObjectHandler::SerializationFactory& factory, const boost::shared_ptr<ObjectHandler::ValueObject> &valueObject, bool overwriteExisting) const { ObjectHandler::StrObjectPair object = factory.restoreObject(valueObject, overwriteExisting); boost::shared_ptr<Instrument> instrument = boost::dynamic_pointer_cast<Instrument>(object.second); if (instrument && valueObject->hasProperty("EngineID")) { std::string pricingEngineID = ObjectHandler::convert2<std::string>( valueObject->getProperty("EngineID"), "EngineID"); OH_GET_OBJECT(pricingEngineObjPtr, pricingEngineID, QuantLibAddin::PricingEngine) instrument->setPricingEngine(pricingEngineObjPtr); } return object.first; } std::string RelinkableHandleProcessor::process(const ObjectHandler::SerializationFactory& factory, const boost::shared_ptr<ObjectHandler::ValueObject> &valueObject, bool overwriteExisting) const { ObjectHandler::StrObjectPair link; link.first = boost::get<std::string>(valueObject->getProperty("CurrentLink")); valueObject->setProperty("CurrentLink", std::string("")); ObjectHandler::StrObjectPair object = factory.restoreObject(valueObject, overwriteExisting); link.second = object.second; handles.push_back(link); return object.first; } void RelinkableHandleProcessor::postProcess() const { for(ObjectHandler::HandlesList::iterator i = handles.begin(); i != handles.end(); ++i) { boost::dynamic_pointer_cast<QuantLibAddin::RelinkableHandle>(i->second)->linkTo(i->first); } handles.clear(); } std::string LegProcessor::process(const ObjectHandler::SerializationFactory& factory, const boost::shared_ptr<ObjectHandler::ValueObject> &valueObject, bool overwriteExisting) const { ObjectHandler::StrObjectPair object = factory.restoreObject(valueObject, overwriteExisting); boost::shared_ptr<Leg> inst = boost::dynamic_pointer_cast<Leg>(object.second); if (inst && valueObject->hasProperty("UserLegIDs")) { std::vector<boost::shared_ptr<QuantLibAddin::FloatingRateCouponPricer> > legs2; std::vector<std::string> legs = ObjectHandler::vector::convert2<std::string>(valueObject->getProperty("UserLegIDs"), "UserLegIDs"); for (std::vector<std::string>::const_iterator i = legs.begin(); i!= legs.end(); ++i) { OH_GET_OBJECT(leg, *i, QuantLibAddin::FloatingRateCouponPricer) legs2.push_back(leg); } inst->setCouponPricers(legs2); } return object.first; } std::string IndexProcessor::process(const ObjectHandler::SerializationFactory& factory, const boost::shared_ptr<ObjectHandler::ValueObject> &valueObject, bool overwriteExisting) const { ObjectHandler::StrObjectPair object = factory.restoreObject(valueObject, overwriteExisting); boost::shared_ptr<Index> index = boost::dynamic_pointer_cast<Index>(object.second); if(index) { try { ObjectHandler::property_t dates = valueObject->getProperty("IndexFixingDates"); ObjectHandler::property_t fixings = valueObject->getProperty("IndexFixingRates"); std::vector<QuantLib::Date> vct_dates = ObjectHandler::vector::convert2<QuantLib::Date>(dates, "IndexFixingDates"); std::vector<QuantLib::Rate> vct_fixings = ObjectHandler::vector::convert2<QuantLib::Rate>(fixings, "IndexFixingRates"); index->addFixings(vct_dates, vct_fixings, true, false); } catch(const std::exception& ) {} } return object.first; } std::string ExtrapolatorProcessor::process(const ObjectHandler::SerializationFactory& factory, const boost::shared_ptr<ObjectHandler::ValueObject> &valueObject, bool overwriteExisting) const { ObjectHandler::StrObjectPair object = factory.restoreObject(valueObject, overwriteExisting); boost::shared_ptr<Extrapolator> extrapolator = boost::dynamic_pointer_cast<Extrapolator>(object.second); if (extrapolator && valueObject->hasProperty("UserExtrapolation")) { bool extrapolation = ObjectHandler::convert2<bool>( valueObject->getProperty("UserExtrapolation"), "UserExtrapolation"); extrapolator->enableExtrapolation(extrapolation); } return object.first; } }
44.575758
115
0.67777
[ "object", "vector" ]
3519059df93715b819b2d6af8d88ade830359357
2,658
hpp
C++
include/codegen/include/GlobalNamespace/DelayedPauseTrigger.hpp
Futuremappermydud/Naluluna-Modifier-Quest
bfda34370764b275d90324b3879f1a429a10a873
[ "MIT" ]
1
2021-11-12T09:29:31.000Z
2021-11-12T09:29:31.000Z
include/codegen/include/GlobalNamespace/DelayedPauseTrigger.hpp
Futuremappermydud/Naluluna-Modifier-Quest
bfda34370764b275d90324b3879f1a429a10a873
[ "MIT" ]
null
null
null
include/codegen/include/GlobalNamespace/DelayedPauseTrigger.hpp
Futuremappermydud/Naluluna-Modifier-Quest
bfda34370764b275d90324b3879f1a429a10a873
[ "MIT" ]
2
2021-10-03T02:14:20.000Z
2021-11-12T09:29:36.000Z
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once #pragma pack(push, 8) // Begin includes #include "extern/beatsaber-hook/shared/utils/typedefs.h" // Including type: Zenject.ITickable #include "Zenject/ITickable.hpp" // Including type: IPauseTrigger #include "GlobalNamespace/IPauseTrigger.hpp" // Completed includes // Begin forward declares // Forward declaring namespace: System namespace System { // Forward declaring type: Action class Action; } // Forward declaring namespace: GlobalNamespace namespace GlobalNamespace { // Forward declaring type: VRControllersInputManager class VRControllersInputManager; } // Completed forward declares // Type namespace: namespace GlobalNamespace { // Autogenerated type: DelayedPauseTrigger class DelayedPauseTrigger : public ::Il2CppObject, public Zenject::ITickable, public GlobalNamespace::IPauseTrigger { public: // private System.Action pauseTriggeredEvent // Offset: 0x10 System::Action* pauseTriggeredEvent; // private System.Single _pressDuration // Offset: 0x18 float pressDuration; // private System.Single _timer // Offset: 0x1C float timer; // private System.Boolean _waitingForButtonRelease // Offset: 0x20 bool waitingForButtonRelease; // private VRControllersInputManager _vrControllersInputManager // Offset: 0x28 GlobalNamespace::VRControllersInputManager* vrControllersInputManager; // public System.Void add_pauseTriggeredEvent(System.Action value) // Offset: 0xBE6A8C // Implemented from: IPauseTrigger // Base method: System.Void IPauseTrigger::add_pauseTriggeredEvent(System.Action value) void add_pauseTriggeredEvent(System::Action* value); // public System.Void remove_pauseTriggeredEvent(System.Action value) // Offset: 0xBE6B30 // Implemented from: IPauseTrigger // Base method: System.Void IPauseTrigger::remove_pauseTriggeredEvent(System.Action value) void remove_pauseTriggeredEvent(System::Action* value); // public System.Void Tick() // Offset: 0xBE6BD4 // Implemented from: Zenject.ITickable // Base method: System.Void ITickable::Tick() void Tick(); // public System.Void .ctor() // Offset: 0xBE6C64 // Implemented from: System.Object // Base method: System.Void Object::.ctor() static DelayedPauseTrigger* New_ctor(); }; // DelayedPauseTrigger } #include "extern/beatsaber-hook/shared/utils/il2cpp-type-check.hpp" DEFINE_IL2CPP_ARG_TYPE(GlobalNamespace::DelayedPauseTrigger*, "", "DelayedPauseTrigger"); #pragma pack(pop)
37.971429
119
0.729872
[ "object" ]
352043786f8318a944ac5d2b1d39a4c06d20548d
1,544
cpp
C++
Hashing/Maths and hashing/Fraction/fraction_to_decimal.cpp
biqar/interviewbit
c2146ccb863689a71a8a153441cecfd83637a6cd
[ "MIT" ]
2
2020-06-02T18:38:05.000Z
2020-07-20T06:29:39.000Z
Hashing/Maths and hashing/Fraction/fraction_to_decimal.cpp
biqar/interviewbit
c2146ccb863689a71a8a153441cecfd83637a6cd
[ "MIT" ]
null
null
null
Hashing/Maths and hashing/Fraction/fraction_to_decimal.cpp
biqar/interviewbit
c2146ccb863689a71a8a153441cecfd83637a6cd
[ "MIT" ]
null
null
null
// // Created by Islam, Abdullah Al Raqibul on 5/27/20. // long long int _abs(long long int a) { return a < 0 ? -a : a; } string num_to_string(long long int a) { ostringstream convert; convert << a; return convert.str(); } string Solution::fractionToDecimal(int numerator, int denominator) { // Do not write main() function. // Do not read input, instead use the arguments to the function. // Do not print the output, instead return values as specified // Still have a doubt. Checkout www.interviewbit.com/pages/sample_codes/ for more details if(numerator == 0 || denominator == 0) return "0"; bool minus = false; map<long long int, int> mod; vector<long long int> res; int i, j, k; int pos = -1; string ret = ""; long long int a, b, m; if((numerator<0 && denominator>0) || (numerator>0 && denominator<0)) minus = true; a = _abs(numerator); b = _abs(denominator); i = 0; while(true) { res.push_back(a / b); m = a % b; if(!m) break; if(mod.find(m) != mod.end()) { pos = mod[m]; break; } mod[m] = i; i += 1; a = m * 10; } k = res.size(); if(k == 1) { ret = num_to_string(res[0]); } else { ret = num_to_string(res[0]) + "."; for(i=1; i<k; i+=1) { if(pos+1 == i) ret += "("; ret += num_to_string(res[i]); } if(pos != -1) ret += ")"; } return minus == true ? "-" + ret : ret; }
23.753846
93
0.521373
[ "vector" ]
353f80052dd151d934bff17af329b7880e85ccd8
10,774
cpp
C++
src/bin/compute_weighted_add.cpp
mehmetoguzderin/vk-zero
7308e9ad8f6cf92b5d0edfedfa693e23c9d9e996
[ "CC0-1.0" ]
1
2021-04-10T06:28:50.000Z
2021-04-10T06:28:50.000Z
src/bin/compute_weighted_add.cpp
mehmetoguzderin/vk-zero
7308e9ad8f6cf92b5d0edfedfa693e23c9d9e996
[ "CC0-1.0" ]
6
2021-04-10T19:35:10.000Z
2021-04-26T13:35:46.000Z
src/bin/compute_weighted_add.cpp
mehmetoguzderin/vk-zero
7308e9ad8f6cf92b5d0edfedfa693e23c9d9e996
[ "CC0-1.0" ]
null
null
null
#include "compute_weighted_add.h" int main(int argc, char *argv[]) { if (auto error = initialize()) { return -1; } auto create_name = "compute_weighted_add"; SDL_Window *window; vkb::Instance instance; VkSurfaceKHR surface; if (auto error = create_window_instance_surface(create_name, window, instance, surface)) { return -1; } vkb::PhysicalDevice physical_device; vkb::Device device; VmaAllocator allocator; if (auto error = create_device_allocator(instance, surface, physical_device, device, allocator)) { return -1; } VkQueue graphics_queue, compute_queue; uint32_t graphics_queue_index, compute_queue_index; if (auto error = get_graphics_compute_queue( device, graphics_queue, graphics_queue_index, compute_queue, compute_queue_index)) { return -1; } VkCommandPool graphics_command_pool; if (auto error = create_command_pool(device, graphics_queue_index, graphics_command_pool)) { return -1; } VkCommandPool compute_command_pool; if (auto error = create_command_pool(device, compute_queue_index, compute_command_pool)) { return -1; } VkDescriptorPool descriptor_pool; if (auto error = create_descriptor_pool(device, descriptor_pool)) { return -1; } uint64_t length = 16384; VkBuffer buffer_storage_a; VmaAllocation allocation_storage_a; VmaAllocationInfo allocation_info_storage_a; if (auto error = compute_weighted_add::create_buffer_storage( allocator, length * ELEMENT_SIZE, buffer_storage_a, allocation_storage_a, allocation_info_storage_a)) { return -1; } auto pointer_a = (float4 *)allocation_info_storage_a.pMappedData; VkBuffer buffer_storage_b; VmaAllocation allocation_storage_b; VmaAllocationInfo allocation_info_storage_b; if (auto error = compute_weighted_add::create_buffer_storage( allocator, length * ELEMENT_SIZE, buffer_storage_b, allocation_storage_b, allocation_info_storage_b)) { return -1; } auto pointer_b = (float4 *)allocation_info_storage_b.pMappedData; pointer_b[4094] = vec4(.5f); VkBuffer buffer_storage_c; VmaAllocation allocation_storage_c; VmaAllocationInfo allocation_info_storage_c; if (auto error = compute_weighted_add::create_buffer_storage( allocator, length * ELEMENT_SIZE, buffer_storage_c, allocation_storage_c, allocation_info_storage_c)) { return -1; } auto pointer_c = (float4 *)allocation_info_storage_c.pMappedData; VkBuffer buffer_storage_d; VmaAllocation allocation_storage_d; VmaAllocationInfo allocation_info_storage_d; if (auto error = compute_weighted_add::create_buffer_storage( allocator, length * ELEMENT_SIZE, buffer_storage_d, allocation_storage_d, allocation_info_storage_d)) { return -1; } auto pointer_d = (float4 *)allocation_info_storage_d.pMappedData; ComputeWeightedAddConstants constants{ .weights = vec4(1.f, 1.f, 1.f, 1.f), .length = uvec2(length / ELEMENT_WIDTH, length % ELEMENT_WIDTH)}; if (constants.length.y > 0) { constants.length.x += 1; } VkBuffer buffer_uniform; VmaAllocation allocation_uniform; VmaAllocationInfo allocation_info_uniform; if (auto error = create_buffer_uniform(allocator, sizeof(constants), buffer_uniform, allocation_uniform, allocation_info_uniform)) { return -1; } memcpy(allocation_info_uniform.pMappedData, &constants, sizeof(constants)); VkDescriptorSetLayout set_layout; VkPipelineLayout pipeline_layout; if (auto error = compute_weighted_add::create_set_pipeline_layout( device, set_layout, pipeline_layout)) { return -1; } uint3 local_size = uvec3(16, 32, 1); auto module_name = "compute_weighted_add.hpp"; VkShaderModule shader_module; if (auto error = create_shader_module(device, module_name, shader_module)) { return -1; } auto entry_name = "compute_weighted_add_kernel"; VkPipeline pipeline; if (auto error = create_pipeline(device, pipeline_layout, shader_module, local_size, entry_name, pipeline)) { return -1; } vkb::Swapchain swapchain; std::vector<VkImage> images; std::vector<VkImageView> image_views; std::vector<VkFence> signal_fences; std::vector<VkSemaphore> wait_semaphores, signal_semaphores; std::vector<VkFence> wait_fences; std::vector<VkFramebuffer> framebuffers; VkRenderPass render_pass; if (auto error = create_swapchain_semaphores_fences_render_pass_framebuffers( device, swapchain, images, image_views, signal_fences, wait_semaphores, signal_semaphores, render_pass, framebuffers)) { return -1; } std::vector<VkDescriptorSet> descriptor_sets; if (auto error = compute_weighted_add::allocate_descriptor_sets( device, buffer_storage_a, allocation_info_storage_a, buffer_storage_b, allocation_info_storage_b, buffer_storage_c, allocation_info_storage_c, buffer_storage_d, allocation_info_storage_d, buffer_uniform, allocation_info_uniform, swapchain, image_views, set_layout, descriptor_pool, descriptor_sets)) { return -1; } std::vector<VkCommandBuffer> graphics_command_buffers; if (auto error = allocate_command_buffers( window, device, graphics_queue_index, graphics_command_pool, swapchain, graphics_command_buffers)) { return -1; } std::vector<VkCommandBuffer> compute_command_buffers; if (auto error = allocate_command_buffers( window, device, compute_queue_index, compute_command_pool, swapchain, compute_command_buffers)) { return -1; } uint32_t image_index = 0; if (vkWaitForFences(device.device, 1, &signal_fences[image_index], VK_TRUE, UINT64_MAX) != VK_SUCCESS) { return -1; } if (vkResetFences(device.device, 1, &signal_fences[image_index]) != VK_SUCCESS) { return -1; } if (vkResetCommandBuffer(compute_command_buffers[image_index], VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT) != VK_SUCCESS) { return -1; } VkCommandBufferBeginInfo begin_info = { .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, .flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT}; if (vkBeginCommandBuffer(compute_command_buffers[image_index], &begin_info) != VK_SUCCESS) { return -1; } vkCmdBindPipeline(compute_command_buffers[image_index], VK_PIPELINE_BIND_POINT_COMPUTE, pipeline); vkCmdBindDescriptorSets(compute_command_buffers[image_index], VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_layout, 0, 1, &descriptor_sets[image_index], 0, nullptr); vkCmdDispatch(compute_command_buffers[image_index], length / (local_size.x * local_size.y) + 1, 1, 1); if (vkEndCommandBuffer(compute_command_buffers[image_index]) != VK_SUCCESS) { return -1; } VkPipelineStageFlags wait_stages[] = {VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT}; VkSubmitInfo submit_info = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .waitSemaphoreCount = 0, .pWaitSemaphores = nullptr, .pWaitDstStageMask = wait_stages, .commandBufferCount = 1, .pCommandBuffers = &compute_command_buffers[image_index], .signalSemaphoreCount = 0, .pSignalSemaphores = nullptr}; if (vkQueueSubmit(compute_queue, 1, &submit_info, signal_fences[image_index]) != VK_SUCCESS) { return -1; } vkDeviceWaitIdle(device.device); auto &element = pointer_a[4094]; std::cout << element.x << " " << element.y << " " << element.z << " " << element.w << "\n"; vkFreeCommandBuffers(device.device, compute_command_pool, compute_command_buffers.size(), compute_command_buffers.data()); vkFreeCommandBuffers(device.device, graphics_command_pool, graphics_command_buffers.size(), graphics_command_buffers.data()); vkFreeDescriptorSets(device.device, descriptor_pool, descriptor_sets.size(), descriptor_sets.data()); for (auto &framebuffer : framebuffers) { vkDestroyFramebuffer(device.device, framebuffer, nullptr); } vkDestroyRenderPass(device.device, render_pass, nullptr); for (auto &semaphore : signal_semaphores) { vkDestroySemaphore(device.device, semaphore, nullptr); } for (auto &semaphore : wait_semaphores) { vkDestroySemaphore(device.device, semaphore, nullptr); } for (auto &fence : signal_fences) { vkDestroyFence(device.device, fence, nullptr); } swapchain.destroy_image_views(image_views); vkb::destroy_swapchain(swapchain); vkDestroyPipeline(device.device, pipeline, nullptr); vkDestroyShaderModule(device.device, shader_module, nullptr); vkDestroyPipelineLayout(device.device, pipeline_layout, nullptr); vkDestroyDescriptorSetLayout(device.device, set_layout, nullptr); vmaDestroyBuffer(allocator, buffer_uniform, allocation_uniform); vmaDestroyBuffer(allocator, buffer_storage_d, allocation_storage_d); vmaDestroyBuffer(allocator, buffer_storage_c, allocation_storage_c); vmaDestroyBuffer(allocator, buffer_storage_b, allocation_storage_b); vmaDestroyBuffer(allocator, buffer_storage_a, allocation_storage_a); vkDestroyDescriptorPool(device.device, descriptor_pool, nullptr); vkDestroyCommandPool(device.device, compute_command_pool, nullptr); vkDestroyCommandPool(device.device, graphics_command_pool, nullptr); vmaDestroyAllocator(allocator); vkb::destroy_device(device); vkDestroySurfaceKHR(instance.instance, surface, nullptr); vkb::destroy_instance(instance); SDL_DestroyWindow(window); SDL_Quit(); return 0; }
44.155738
80
0.6602
[ "vector" ]
3543d6e79171311264dc1b6c88ccbf18e0db9323
8,914
cpp
C++
Game/playerclass.cpp
Buhyy/PSiO
0ccb380288c6a9f80d7c8089844a5f780f5498c2
[ "MIT" ]
null
null
null
Game/playerclass.cpp
Buhyy/PSiO
0ccb380288c6a9f80d7c8089844a5f780f5498c2
[ "MIT" ]
null
null
null
Game/playerclass.cpp
Buhyy/PSiO
0ccb380288c6a9f80d7c8089844a5f780f5498c2
[ "MIT" ]
null
null
null
#include "playerclass.h" PlayerClass::PlayerClass() { if (!Texture.loadFromFile("Patatek.png")) { std::cout << "Could not load texture" << std::endl; } if (!Texture1.loadFromFile("Patatek2.png")) { std::cout << "Could not load texture" << std::endl; } this->setTexture(Texture); Time_=0; dir_x_=0; dir_y_=0; bound_x_left_=32; bound_x_right_=32*31; bound_y_top_=32; bound_y_bottm_=32*21; floor_check_=true; std::fstream odczyt("stats.txt", std::ios::in); if(odczyt.good()) { if(odczyt.is_open()) { std::string help; std::string all=""; odczyt>>help; all+=help + " "; std::cout<<help<<std::endl; odczyt>>help; all+=help + " "; std::cout<<help<<std::endl; odczyt>>help; all+=help + " "; std::cout<<help<<std::endl; odczyt>>help; all+=help; std::cout<<help<<std::endl; std::stringstream stream(all); stream>>health_max_>>dmg_>>speed_>>armour_; health_=health_max_; } odczyt.close(); } else { std::fstream zapis("stats.txt", std::ios::out); health_max_=100; health_=health_max_; armour_=10; speed_=200; dmg_=200; if(zapis.is_open()) zapis<<health_max_<<std::endl<<dmg_<<std::endl<<speed_<<std::endl<<armour_; zapis.close(); } jumps_=2; } void PlayerClass::setDir_x(float D_x) { dir_x_=D_x; } void PlayerClass::setDir_y(float D_y) { dir_y_=D_y; } float PlayerClass::getDix_x() { return dir_x_; } void PlayerClass::setObstacleColisions( std::vector<sf::FloatRect> obstacle_colisions) { ObstacleColisions_=obstacle_colisions; } void PlayerClass::jump(const sf::Time &elapsed) { Time_+=elapsed.asSeconds(); if(Time_<0.3) { this->move(0,(float)-400*elapsed.asSeconds()); weapon_eq.move(0,(float)-400*elapsed.asSeconds()); } else { if(jumps_!=0) { jumps_--; } if(jumps_==0) { floor_check_=false; } Time_=0; dir_y_=0; } } void PlayerClass::animate(const sf::Time &elapsed){ sf::FloatRect rectangle_bounds = this->getGlobalBounds(); float time = elapsed.asSeconds(); this->move((float)200*dir_x_*time,0); weapon_eq.move((float)200*dir_x_*time,0); // poruszanie po y if(dir_y_==1) { if(rectangle_bounds.top+rectangle_bounds.height>bound_y_bottm_) { this->move(0,(float)-400*dir_y_*time); weapon_eq.move(0,(float)-400*dir_y_*time); dir_y_=0; // floor_check_=false; } for(auto &obstacle : ObstacleColisions_) { if(rectangle_bounds.top+rectangle_bounds.height>obstacle.top && rectangle_bounds.top+rectangle_bounds.height<obstacle.top+obstacle.height &&(rectangle_bounds.left<obstacle.left||rectangle_bounds.left<obstacle.left+obstacle.width) &&(rectangle_bounds.left+rectangle_bounds.width>obstacle.left+obstacle.width||rectangle_bounds.left+rectangle_bounds.width>obstacle.left)) { this->move(0,(float)-400*dir_y_*time); weapon_eq.move(0,(float)-400*dir_y_*time); dir_y_=0; // floor_check_=false; } } } if(dir_y_==-1) { if(floor_check_)this->jump(elapsed); if(rectangle_bounds.top<bound_y_top_) { this->move(0,(float)-600*dir_y_*time); weapon_eq.move(0,(float)-600*dir_y_*time); dir_y_=0; Time_=0; } for(auto &obstacle : ObstacleColisions_) { if(rectangle_bounds.top<obstacle.top+obstacle.height && rectangle_bounds.top>obstacle.top &&(rectangle_bounds.left<obstacle.left||rectangle_bounds.left<obstacle.left+obstacle.width) &&(rectangle_bounds.left+rectangle_bounds.width>obstacle.left+obstacle.width||rectangle_bounds.left+rectangle_bounds.width>obstacle.left)) { this->move(0,(float)-600*dir_y_*time); weapon_eq.move(0,(float)-600*dir_y_*time); dir_y_=0; Time_=0; } } } //poruszanie po x if(dir_x_==1) { weapon_place_r(); this->setTexture(Texture); if(rectangle_bounds.left+rectangle_bounds.width>bound_x_right_) { this->move((float)-speed_*dir_x_*time,0); weapon_eq.move((float)-speed_*dir_x_*time,0); dir_x_=0; } for(auto &obstacle : ObstacleColisions_) { if(rectangle_bounds.left+rectangle_bounds.width>obstacle.left && rectangle_bounds.left+rectangle_bounds.width<obstacle.left+obstacle.width &&(rectangle_bounds.top<obstacle.top||rectangle_bounds.top<obstacle.top+obstacle.height) &&(rectangle_bounds.top+rectangle_bounds.height>obstacle.top+obstacle.height||rectangle_bounds.top+rectangle_bounds.height>obstacle.top)) { this->move((float)-speed_*dir_x_*time,0); weapon_eq.move((float)-speed_*dir_x_*time,0); dir_x_=0; } } } if(dir_x_==-1) { weapon_place_l(); this->setTexture(Texture1); if(rectangle_bounds.left<bound_x_left_) { this->move((float)-speed_*dir_x_*time,0); weapon_eq.move((float)-speed_*dir_x_*time,0); dir_x_=0; } for(auto &obstacle : ObstacleColisions_) { if(rectangle_bounds.left<obstacle.left+obstacle.width && rectangle_bounds.left>obstacle.left &&(rectangle_bounds.top<obstacle.top||rectangle_bounds.top<obstacle.top+obstacle.height) &&(rectangle_bounds.top+rectangle_bounds.height>obstacle.top+obstacle.height||rectangle_bounds.top+rectangle_bounds.height>obstacle.top)) { this->move((float)-speed_*dir_x_*time,0); weapon_eq.move((float)-speed_*dir_x_*time,0); dir_x_=0; } } } }; void PlayerClass::gravity(const sf::Time &elapsed) { float time = elapsed.asSeconds(); sf::FloatRect rectangle_bounds = this->getGlobalBounds(); if(rectangle_bounds.top+rectangle_bounds.height+100*time>(float)32*21) { this->setPosition(this->getGlobalBounds().left,(float)32*21-this->getGlobalBounds().height); weapon_eq.setPosition(weapon_eq.getGlobalBounds().left,this->getGlobalBounds().top-10); floor_check_=true; jumps_=2; this->setDir_y(0); } else { this->move(0,(float)100*time); weapon_eq.move(0,(float)100*time); } for(auto &obstacle : ObstacleColisions_) { if(rectangle_bounds.top+rectangle_bounds.height+100*time>obstacle.top && rectangle_bounds.top+rectangle_bounds.height+100*time<obstacle.top+obstacle.height&&(rectangle_bounds.left<obstacle.left||rectangle_bounds.left<obstacle.left+obstacle.width)&&(rectangle_bounds.left+rectangle_bounds.width>obstacle.left+obstacle.width||rectangle_bounds.left+rectangle_bounds.width>obstacle.left)) { this->setPosition(this->getGlobalBounds().left,obstacle.top-this->getGlobalBounds().height); weapon_eq.setPosition(weapon_eq.getGlobalBounds().left,this->getGlobalBounds().top-10); floor_check_=true; jumps_=2; this->setDir_y(0); } } } int PlayerClass::health() { return health_; }; int PlayerClass::health_max() { return health_max_; } void PlayerClass::addHp(int bonus) { health_+=bonus; health_max_+=bonus; } int PlayerClass::dmg() { return dmg_; }; void PlayerClass::adddmg(int bonus) { dmg_+=bonus; } int PlayerClass::speed() { return speed_; }; void PlayerClass::addspeed(int bonus) { speed_+=bonus; } int PlayerClass::armour() { return armour_; }; void PlayerClass::addarmour(int bonus) { armour_+=bonus; } void PlayerClass::heal(int bonus) { if(health_+bonus>=health_max_) { health_=health_max_; } else { health_+=bonus; } } void PlayerClass::weapon_place_r() { this->weapon_eq.setPosition(this->getGlobalBounds().width+this->getGlobalBounds().left-5,this->getGlobalBounds().top-10); } void PlayerClass::weapon_place_l() { this->weapon_eq.setPosition(this->getGlobalBounds().left-10,this->getGlobalBounds().top-10); } void PlayerClass::get_hurt(int ammount) { health_-=ammount; }
29.419142
400
0.591205
[ "vector" ]
3544d27d1555e570e3e401975719e0d0f3de8dc9
492
cpp
C++
Leetcode/118. Pascal's Triangle.cpp
Aqiry/Competitive-coding
e4a091a4f79d62319fa95d15631606404853a33e
[ "MIT" ]
null
null
null
Leetcode/118. Pascal's Triangle.cpp
Aqiry/Competitive-coding
e4a091a4f79d62319fa95d15631606404853a33e
[ "MIT" ]
1
2021-11-12T16:31:25.000Z
2021-11-12T16:31:25.000Z
Leetcode/118. Pascal's Triangle.cpp
Aqiry/Competitive-coding
e4a091a4f79d62319fa95d15631606404853a33e
[ "MIT" ]
1
2021-11-12T16:30:02.000Z
2021-11-12T16:30:02.000Z
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> res; res.push_back({1}); for(int i = 1 ; i < numRows ; i++) { vector<int> nums; nums.push_back(1); for(int j = 0 ; j < i - 1 ; j++) { nums.push_back(res[i-1][j] + res[i-1][j+1]); } nums.push_back(1); res.push_back(nums); } return res; } };
23.428571
60
0.414634
[ "vector" ]
354c4c0817fe72af5b7c269ee1ec583678370198
1,816
cxx
C++
source/examples/Example/D.cxx
smcolash/mitochondrion
820bcecf981b6efd934784bd76c423b7bded5ad0
[ "MIT" ]
null
null
null
source/examples/Example/D.cxx
smcolash/mitochondrion
820bcecf981b6efd934784bd76c423b7bded5ad0
[ "MIT" ]
null
null
null
source/examples/Example/D.cxx
smcolash/mitochondrion
820bcecf981b6efd934784bd76c423b7bded5ad0
[ "MIT" ]
null
null
null
// // include system headers // #include <sstream> // // include application headers // #include "D.h" #include "mito/UserEvents.h" #include "mito/Constants.h" // // initial transition code // int D::tInitial (Event *event) { // // done with the event // return (FALSE); } // // transition code for generic event receive // int D::tRequest (Event *event) { // // done with the event // return (FALSE); } // // constructor creates and initializes object behavior // D::D () { // // name the derived Actor type // type (__FUNCTION__); name (__FUNCTION__); // // create the interface ports // port_a = new Port (this, "a"); port_b = new Port (this, "b"); port_c = new Port (this, "c"); port_d = new Port (this, "d"); // // create the states // State *sTop = new State ("top"); State *sS1 = new State ("S1"); // // connect the states // sTop->compose (sS1); // // create transition and entry/exit behavior // sTop->initial (sS1, "tInitial", (METHOD) &D::tInitial); sS1->transition (eRequest, "eRequest", port_a, sS1, "tRequest", (METHOD) &D::tRequest); sS1->transition (eRequest, "eRequest", port_b, sS1, "tRequest", (METHOD) &D::tRequest); sS1->transition (eRequest, "eRequest", port_c, sS1, "tRequest", (METHOD) &D::tRequest); sS1->transition (eRequest, "eRequest", port_d, sS1, "tRequest", (METHOD) &D::tRequest); // // activate the state machine for use // behavior (sTop); // // ready for use in the model // return; } // // destructor deletes any derived-class-specific data // D::~D () { delete port_a; delete port_b; delete port_c; delete port_d; }
18.16
56
0.564978
[ "object", "model" ]
35543569a8b7603b14ab521e88236536cbd95802
1,205
cpp
C++
Player.cpp
weldisalves/Trabalho-Final
1a2161ee05a3d2bd4fb6644d918b7730105fe490
[ "Apache-2.0" ]
null
null
null
Player.cpp
weldisalves/Trabalho-Final
1a2161ee05a3d2bd4fb6644d918b7730105fe490
[ "Apache-2.0" ]
null
null
null
Player.cpp
weldisalves/Trabalho-Final
1a2161ee05a3d2bd4fb6644d918b7730105fe490
[ "Apache-2.0" ]
null
null
null
#include <iostream> #include <math.h> #include <vector> #include "globals.h" #include "Player.h" #include "Elemento.h" #include "Retangulo.h" Player::Player(){ this->x=0; this->y=0; retangulo.setX(-10); retangulo.setY(-10); retangulo.setWidth(20); retangulo.setHeight(20); } Player::~Player(){ } void Player::draw(){ glPushMatrix(); glTranslatef(this->x,this->y,0); glRotatef(this->theta,0,0,1); float x,w,y,h; x = retangulo.getX(); y = retangulo.getY(); w = retangulo.getWidth(); h = retangulo.getHeight(); glPushMatrix(); glBegin(GL_POLYGON); glVertex3f(x,y,0); glVertex3f(x+w,y,0); glVertex3f(x+w,y+h,0); glVertex3f(x,y+h,0); glEnd(); glColor3f(1,0,0); glBegin(GL_POLYGON); glVertex3f(0,2,0); glVertex3f(0,-2,0); glVertex3f(20,-2,0); glVertex3f(20,2,0); glEnd(); glPopMatrix(); glPushMatrix(); glColor3f(0,1,1); glBegin(GL_POLYGON); for(int i=0;i<100;i++){ glVertex3f(10*cos(2*M_PI*i/100),10*sin(2*M_PI*i/100),1); } glEnd(); glPopMatrix(); glPopMatrix(); } Retangulo Player::getRetangulo(){ return this->retangulo; }
18.828125
61
0.585892
[ "vector" ]
3556e90bf4180200c00fcd2264d1901aa01b9ed0
3,322
cpp
C++
Final/Dataset/B2016_Z3_Z6/student2526.cpp
Team-PyRated/PyRated
1df171c8a5a98977b7a96ee298a288314d1b1b96
[ "MIT" ]
null
null
null
Final/Dataset/B2016_Z3_Z6/student2526.cpp
Team-PyRated/PyRated
1df171c8a5a98977b7a96ee298a288314d1b1b96
[ "MIT" ]
null
null
null
Final/Dataset/B2016_Z3_Z6/student2526.cpp
Team-PyRated/PyRated
1df171c8a5a98977b7a96ee298a288314d1b1b96
[ "MIT" ]
null
null
null
/B2016/2017: Zadaća 3, Zadatak 4 #include <iostream> #include <vector> #include <string> #include <stdexcept> #include <set> #include <memory> struct Dijete{ std::string ime; std::shared_ptr<Dijete> sljedeci; }; bool slovo(char c){if(c>='A'&&c<='Z'||c>='a'&&c<='z'||c>='0'&&c<='9') return true; return false;} std::vector<std::set<std::string>> Razvrstavanje(std::vector<std::string> imena,int br){ if(br>imena.size()||br<1) throw std::logic_error("Razvrstavanje nemoguce"); int vel=imena.size(),brojac=0,z=0; std::vector<std::set<std::string>>final(br); bool prva=false; std::shared_ptr<Dijete> p,back; for(int i=0;i<imena.size();i++){ try{ std::shared_ptr<Dijete> tmp(new Dijete); (*tmp.get()).ime=imena[i]; if(!prva){ p=tmp;prva=true; } else{ (*(back).get()).sljedeci=tmp; } back=tmp; } catch(...){ throw; } } (*back.get()).sljedeci=p; std::shared_ptr<Dijete> tmp=p; int lol=imena.size(); while(true){ int vel1; if(br==0) break; if(vel%br!=0){ vel1=vel/br +1; vel-=vel1; } else{ vel1=vel/br; vel-=vel1; } br--; tmp=p; for(int i=0;i<vel1;i++){ int brojacitpomjeranja=0; while(brojacitpomjeranja!=brojac){ tmp=(*tmp.get()).sljedeci; brojacitpomjeranja++; } final[z].insert((*tmp.get()).ime); brojac=0; for(int i=0;i<(*tmp.get()).ime.size();i++) if(slovo((*tmp.get()).ime[i])) brojac++; brojac--; if(brojac<0) brojac=0; std::shared_ptr<Dijete> p2=tmp; while(1){ if((*p2.get()).sljedeci==tmp){ lol--; if(lol==0){ p2.get()->sljedeci=nullptr; p2=nullptr; break; } (*p2.get()).sljedeci=(*tmp.get()).sljedeci; tmp=(*p2.get()).sljedeci; p=tmp; break; } p2=(*p2.get()).sljedeci; } } z++; } return final; } int main () { std::cout<<"Unesite broj djece: "; int n; std::cin>>n; std::cout<<"Unesite imena djece: "<<std::endl; std::vector<std::string> imena(n); std::cin.ignore(1000,'\n'); std::cin.clear(); for(int i=0;i<n;i++) std::getline(std::cin,imena[i]); std::cout<<"Unesite broj timova: "; int br; std::cin>>br; try{ auto kek=Razvrstavanje(imena,br); for(int i=0;i<kek.size();i++){ auto it=kek[i].begin(); int brojac=0; std::cout<<"Tim "<<i+1<<": "; while(brojac!=kek[i].size()-1){std::cout<<*it++<<", "; brojac++;} std::cout<<*it<<std::endl; } }catch(std::logic_error e){ std::cout<<"Izuzetak: "<<e.what(); } catch(std::bad_alloc){ // std::cout<<"Nedovoljno memorije"; return 0; } return 0; }
29.39823
96
0.440698
[ "vector" ]
3564d77d68cee5cce4dfc34362ffce53145759b5
74,863
cpp
C++
private/src/model/IasRoutingZoneWorkerThread.cpp
juimonen/SmartXbar
033f521a5dba5bce5e097df9c98af5b2cc2636dd
[ "BSD-3-Clause" ]
5
2018-11-05T07:37:58.000Z
2022-03-04T06:40:09.000Z
private/src/model/IasRoutingZoneWorkerThread.cpp
juimonen/SmartXbar
033f521a5dba5bce5e097df9c98af5b2cc2636dd
[ "BSD-3-Clause" ]
null
null
null
private/src/model/IasRoutingZoneWorkerThread.cpp
juimonen/SmartXbar
033f521a5dba5bce5e097df9c98af5b2cc2636dd
[ "BSD-3-Clause" ]
7
2018-12-04T07:32:19.000Z
2021-02-17T11:28:28.000Z
/* * Copyright (C) 2018 Intel Corporation.All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /** * @file IasRoutingZoneWorkerThread.cpp * @date 2015 * @brief */ #include <string> #include <cmath> #include <boost/algorithm/string/replace.hpp> #include "avbaudiomodules/internal/audio/common/helper/IasThread.hpp" #include "avbaudiomodules/internal/audio/common/IasAudioLogging.hpp" #include "avbaudiomodules/internal/audio/common/audiobuffer/IasAudioRingBuffer.hpp" #include "avbaudiomodules/internal/audio/common/helper/IasCopyAudioAreaBuffers.hpp" #include "alsahandler/IasAlsaHandler.hpp" #include "smartx/IasSmartXClient.hpp" #include "switchmatrix/IasSwitchMatrix.hpp" #include "smartx/IasConfigFile.hpp" #include "audio/smartx/IasEventProvider.hpp" #include "audio/smartx/IasSetupEvent.hpp" #include "avbaudiomodules/internal/audio/common/IasDataProbe.hpp" #include "avbaudiomodules/internal/audio/common/IasDataProbeHelper.hpp" #include "model/IasPipeline.hpp" #include "model/IasAudioSinkDevice.hpp" #include "model/IasRoutingZoneWorkerThread.hpp" #include "model/IasAudioPort.hpp" #include "smartx/IasThreadNames.hpp" #include "avbaudiomodules/internal/audio/common/audiobuffer/IasAudioRingBufferMirror.hpp" #include "avbaudiomodules/internal/audio/common/audiobuffer/IasAudioRingBufferFactory.hpp" namespace IasAudio { static const std::string cClassName = "IasRoutingZoneWorkerThread::"; static const std::string cRunnerClassName = "IasRunnerThread::"; #define LOG_PREFIX cClassName + __func__ + "(" + std::to_string(__LINE__) + "):" #define LOG_RUNNER_PREFIX cRunnerClassName + __func__ + "(" + std::to_string(__LINE__) + "):" #define LOG_ZONE "zone=" + mParams->name + ":" #define LOG_RUNNER_NAME "runner thread, parent=" + mParentZoneName + ":PSM=" + std::to_string(mPeriodSizeMultiple) + ":" IasRunnerThread::IasRunnerThread(uint32_t periodSizeMultiple, std::string parentZoneName) :mThreadShouldBeRunning(false) ,mLog(IasAudioLogging::registerDltContext("RNT", "Runner Thread")) ,mCondition() ,mMutexDerivedZones() ,mDerivedZoneParamsMap() ,mPeriodSizeMultiple(periodSizeMultiple) ,mPeriodCount(0) ,mThread(nullptr) ,mIsProcessing(false) ,mParentZoneName(parentZoneName) { mThread = new IasThread(this, std::string("runner thread") + mParentZoneName); IAS_ASSERT(mThread != nullptr); } IasRunnerThread::~IasRunnerThread() { stop(); delete mThread; } IasAudioCommonResult IasRunnerThread::beforeRun() { return eIasResultOk; } IasRunnerThread::IasResult IasRunnerThread::start() { //Guaranteed by constructor. IAS_ASSERT(mThread != nullptr); mThreadShouldBeRunning = true; IasThreadResult startResult = mThread->start(true); if ((startResult != IasThreadResult::eIasThreadOk) && (startResult != IasThreadResult::eIasThreadAlreadyStarted)) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Failed to start the thread.", startResult); return IasAudio::IasRunnerThread::IasResult::eIasFailed; } if (startResult == IasThreadResult::eIasThreadAlreadyStarted) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Runner thread: ", startResult); } return IasAudio::IasRunnerThread::IasResult::eIasOk; } IasRunnerThread::IasResult IasRunnerThread::stop() { //Guaranteed by constructor. IAS_ASSERT(mThread != nullptr); IasThreadResult stopResult = mThread->stop(); if ((stopResult != IasThreadResult::eIasThreadOk) && stopResult != IasThreadResult::eIasThreadNotRunning) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Failed to stop the thread.", stopResult); return IasAudio::IasRunnerThread::IasResult::eIasFailed; } return IasRunnerThread::IasResult::eIasOk; } IasAudioCommonResult IasRunnerThread::shutDown() { //Guaranteed by constructor. IAS_ASSERT(mThread != nullptr); DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Shutting down thread"); mThreadShouldBeRunning = false; wake(); // returning success will cause IasThread to join threads return eIasResultOk; } IasAudioCommonResult IasRunnerThread::afterRun() { return eIasResultOk; } IasRunnerThread::IasResult IasRunnerThread::addZone(IasDerivedZoneParamsPair derivedZone) { IAS_ASSERT(derivedZone.first != nullptr); // already checked std::lock_guard<std::mutex> lk(this->mMutexDerivedZones); mDerivedZoneParamsMap.insert(derivedZone); DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Adding zone"); return IasRunnerThread::IasResult::eIasOk; } void IasRunnerThread::deleteZone(IasRoutingZoneWorkerThreadPtr derivedZoneWorkerThread) { if (derivedZoneWorkerThread != nullptr) { IasDerivedZoneParamsMap::iterator mapIt; mapIt = mDerivedZoneParamsMap.find(derivedZoneWorkerThread); if (mapIt != mDerivedZoneParamsMap.end()) { std::lock_guard<std::mutex> lk(mMutexDerivedZones); mDerivedZoneParamsMap.erase(mapIt); } } else { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Invalid worker thread == nullptr"); } } bool IasRunnerThread::hasZone(IasRoutingZoneWorkerThreadPtr worker) { IasDerivedZoneParamsMap::iterator mapIt; mapIt = mDerivedZoneParamsMap.find(worker); if (mapIt != mDerivedZoneParamsMap.end()) { return true; } return false; } bool IasRunnerThread::isEmpty() { return mDerivedZoneParamsMap.empty(); } uint32_t IasRunnerThread::addPeriod(uint32_t periodCount) { // This mutex ensures derived zones don't get added/removed when we // iterate over map and update them. std::lock_guard<std::mutex> lk(mMutexDerivedZones); mPeriodCount += periodCount; for (IasDerivedZoneParamsMap::iterator mapIt = mDerivedZoneParamsMap.begin(); mapIt != mDerivedZoneParamsMap.end(); mapIt++) { IasRoutingZoneWorkerThreadPtr derivedZoneTransferThread = mapIt->first; IasDerivedZoneParams* derivedZoneParams = &(mapIt->second); if (derivedZoneTransferThread->isActive()) { derivedZoneParams->countPeriods += periodCount; } } return mPeriodCount; } bool IasRunnerThread::isAnyActive() const { // This mutex ensures derived zones don't get added/removed when we // iterate over map and update them. std::lock_guard<std::mutex> lk(mMutexDerivedZones); for (IasDerivedZoneParamsMap::const_iterator mapIt = mDerivedZoneParamsMap.cbegin(); mapIt != mDerivedZoneParamsMap.cend(); mapIt++) { IasRoutingZoneWorkerThreadPtr derivedZoneTransferThread = mapIt->first; if (derivedZoneTransferThread->isActive()) { return true; } } return false; } IasAudioCommonResult IasRunnerThread::run() { std::unique_lock<std::mutex> lk(mMutexDerivedZones); IasThreadNames::getInstance()->setThreadName(IasThreadNames::eIasRealTime, std::string("Runner thread for periodSizeMultiple ") + std::to_string(mPeriodSizeMultiple)); IasConfigFile::configureThreadSchedulingParameters(mLog, eIasPriorityOneLess); DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Starting thread"); while (mThreadShouldBeRunning) { while (mPeriodCount < mPeriodSizeMultiple) { // This can spuriously wake, so need to check if have enough period count // to process. mCondition.wait(lk); if (!mThreadShouldBeRunning) { return eIasResultOk; } } if (mPeriodCount >= mPeriodSizeMultiple) { mPeriodCount = 0; } mIsProcessing = true; // At this point there should be enough samples to handle each zone for (IasDerivedZoneParamsMap::iterator mapIt = mDerivedZoneParamsMap.begin(); mapIt != mDerivedZoneParamsMap.end(); mapIt++) { IasRoutingZoneWorkerThreadPtr derivedZoneTransferThread = mapIt->first; IasDerivedZoneParams* derivedZoneParams = &(mapIt->second); if (derivedZoneTransferThread->isActive()) { if (derivedZoneParams->countPeriods >= derivedZoneParams->periodSizeMultiple) { derivedZoneParams->countPeriods = 0; } std::string derivedZoneName = "(name=\"" + derivedZoneTransferThread->mParams->name + "\"):"; DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Executing IasRoutingZoneWorkerThread::transferPeriod method of derived zone", derivedZoneName); IasRoutingZoneWorkerThread::IasResult result; result = mapIt->first->transferPeriod(); if (result != IasRoutingZoneWorkerThread::IasResult::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "Error during IasRoutingZoneWorkerThread::transferPeriod method of derived zone", derivedZoneName, toString(result)); mIsProcessing = false; return eIasResultFailed; } } } mIsProcessing = false; } DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_RUNNER_PREFIX, LOG_RUNNER_NAME, "End runner thread"); return eIasResultOk; } void IasRunnerThread::wake() { // It can share and verify mutex mMutexDerivedZone, if mutex is locked, // it means processing is still happening and may require logging mCondition.notify_one(); } bool IasRunnerThread::isProcessing() const { return mIsProcessing; } uint32_t IasRunnerThread::getPeriodSizeMultiple() const { return mPeriodSizeMultiple; } IasRoutingZoneWorkerThread::IasRoutingZoneWorkerThread(IasRoutingZoneParamsPtr params) :mLog(IasAudioLogging::registerDltContext("RZN", "Routing Zone")) ,mParams(params) ,mSinkDevice(nullptr) ,mSinkDeviceRingBuffer(nullptr) ,mPeriodSize(0) ,mSinkDeviceDataFormat(eIasFormatUndef) ,mSinkDeviceNumChannels(0) ,mThread(nullptr) ,mThreadIsRunning(false) ,mSwitchMatrix(nullptr) ,mEventProvider(nullptr) ,mDataProbe(nullptr) ,mProbingActive(false) ,mIsDerivedZone(false) ,mDerivedZoneCallCount(0) ,mPipeline(nullptr) ,mCurrentState(eIasInActive) ,mDiagnosticsFileName("") ,mBasePipeline(nullptr) ,mLogCnt(0) ,mPeriodTime(0) ,mLogInterval(0) ,mTimeoutCnt(0) ,mLogOkCnt(0) { IAS_ASSERT(params != nullptr) mEventProvider = IasEventProvider::getInstance(); IAS_ASSERT(mEventProvider != nullptr); } IasRoutingZoneWorkerThread::~IasRoutingZoneWorkerThread() { DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_PREFIX, LOG_ZONE); stop(); mDataProbe = nullptr; delete mThread; std::lock_guard<std::mutex> lk(mMutexConversionBuffers); IasAudioRingBufferFactory* ringBufferFactory = IasAudioRingBufferFactory::getInstance(); for (auto &it : mConversionBufferParamsMap) { const IasRoutingZoneWorkerThread::IasConversionBufferParams tmpParams = it.second; ringBufferFactory->destroyRingBuffer(tmpParams.ringBuffer); } mConversionBufferParamsMap.clear(); unlinkAudioSinkDevice(); deletePipeline(); deleteBasePipeline(); mSwitchMatrix = nullptr; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::init() { IAS_ASSERT(mParams != nullptr); DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Initialization of Routing Zone Worker Thread."); std::lock_guard<std::mutex> lk(mMutexConversionBuffers); mConversionBufferParamsMap.clear(); if (mThread == nullptr) { mThread = new IasThread(this, mParams->name); IAS_ASSERT(mThread != nullptr); } return eIasOk; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::linkAudioSinkDevice(IasAudioSinkDevicePtr sinkDevice) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Inside linkAudioSinkDevice()"); IAS_ASSERT(sinkDevice != nullptr); // already checked in IasSetupImpl::link(IasRoutingZonePtr, IasAudioSinkDevicePtr) // Verify that the period size of the sink device is valid. if (sinkDevice->getPeriodSize() == 0) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, period size of sink device must not be 0"); return eIasFailed; } // If a pipeline has been linked to the routing zone, verify that the period size and the sample rate // of the sink device match to the corresponding parameters of the pipeline. if (mPipeline != nullptr) { IasPipelineParamsPtr pipelineParameters = mPipeline->getParameters(); IAS_ASSERT(pipelineParameters != nullptr); // already checked in constructor of IasPipeline if (sinkDevice->getPeriodSize() != pipelineParameters->periodSize) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, periodSizes do not match: sink device:", sinkDevice->getPeriodSize(), "pipeline:", pipelineParameters->periodSize); return eIasFailed; } if (sinkDevice->getSampleRate() != pipelineParameters->samplerate) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, sample rates do not match: sink device:", sinkDevice->getSampleRate(), "pipeline:", pipelineParameters->samplerate); return eIasFailed; } } mSinkDevice = sinkDevice; mPeriodSize = mSinkDevice->getPeriodSize(); mSinkDevice->enableEventQueue(true); mPeriodTime = mPeriodSize * 1000 / sinkDevice->getSampleRate(); if (mPeriodTime == 0) { mPeriodTime = 1; //to avoid floating point exception in next step } mLogInterval = 1000 / mPeriodTime; std::string diagnosticsFileNameTest = "IasRoutingZoneWorkerThread_createDiagnostics"; std::string diagnosticsFileNameTrunk = "/tmp/IasRoutingZoneWorkerThread_Diagnostics"; // Check whether there is a file whose name matches with diagnosticsFileNameTest. DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Checking whether file", diagnosticsFileNameTest, "exists."); std::ifstream testStream; testStream.open(diagnosticsFileNameTest); if (testStream.fail()) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Routing zone diagnostics won't be created, since file", diagnosticsFileNameTest, "does not exist."); } else { testStream.close(); DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Saving Diagnostics"); // Open the file for saving the routing zone diagnostics. const IasAudioDeviceParamsPtr sinkDeviceParams = sinkDevice->getDeviceParams(); IAS_ASSERT(sinkDeviceParams != nullptr); mDiagnosticsFileName = diagnosticsFileNameTrunk + "_" + sinkDeviceParams->name + ".txt"; // Replace characters that are not supported by NTFS, // since we want to analyze the diagnostics file on a Windows PC. boost::algorithm::replace_all(mDiagnosticsFileName, ":", "_"); DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Writing routing zone diagnostics to file:", mDiagnosticsFileName); mDiagnosticsStream.open(mDiagnosticsFileName); if (mDiagnosticsStream.fail()) { DLT_LOG_CXX(*mLog, DLT_LOG_WARN, LOG_PREFIX, LOG_ZONE, "Error while opening routing zone diagnostics file:", mDiagnosticsFileName); } } DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Exiting linkAudioSinkDevice Successfully"); return eIasOk; } void IasRoutingZoneWorkerThread::unlinkAudioSinkDevice() { if (mSinkDevice != nullptr) { mSinkDevice->enableEventQueue(false); mSinkDevice.reset(); } } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::addDerivedZoneWorkerThread(IasRoutingZoneWorkerThreadPtr derivedZoneWorkerThread) { if (derivedZoneWorkerThread == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, parameter derivedZoneWorkerThread == nullptr"); return eIasInvalidParam; } IasAudioSinkDevicePtr derivedZoneSinkDevice = derivedZoneWorkerThread->getSinkDevice(); if (derivedZoneSinkDevice == nullptr) { /** * @log link(IasRoutingZonePtr, IasAudioSinkDevicePtr) method of IasISetup interface was not called before. */ DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, derived zone does not have a sink device"); return eIasFailed; } IAS_ASSERT(derivedZoneSinkDevice->getDeviceParams() != nullptr); if (mPeriodSize == 0) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, period size of base zone must not be 0 (maybe due to missing linkage to sink)"); return eIasFailed; } // Calculate the factor between the derived zone period size and the base zone period size. uint64_t derivedZonePeriodSize = static_cast<uint64_t>(derivedZoneSinkDevice->getPeriodSize()); uint64_t derivedZoneSampleRate = static_cast<uint64_t>(derivedZoneSinkDevice->getSampleRate()); uint64_t baseZonePeriodSize = static_cast<uint64_t>(mPeriodSize); uint64_t baseZoneSampleRate = static_cast<uint64_t>(mSinkDevice->getSampleRate()); uint64_t periodSizeMultiple = ((derivedZonePeriodSize * baseZoneSampleRate) / (derivedZoneSampleRate * baseZonePeriodSize)); // Check that periodSizeMultiple is really an integer. if (derivedZonePeriodSize * baseZoneSampleRate != derivedZoneSampleRate * baseZonePeriodSize * periodSizeMultiple) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, derived zone period time (", static_cast<float>(1000 * derivedZonePeriodSize) / static_cast<float>(derivedZoneSampleRate), "ms ) is not a multiple of the base zone period time (", static_cast<float>(1000 * baseZonePeriodSize) / static_cast<float>(baseZoneSampleRate), "ms )"); return eIasFailed; } DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Zone", derivedZoneWorkerThread->mParams->name, "becomes a derived zone now with periodSizeMultiple of ", periodSizeMultiple); // Prepare the scheduling parameters for the derived zone and insert it into the map. IasDerivedZoneParams derivedZoneParams; derivedZoneParams.periodSize = static_cast<uint32_t>(derivedZonePeriodSize); derivedZoneParams.periodSizeMultiple = static_cast<uint32_t>(periodSizeMultiple); derivedZoneParams.countPeriods = 0; derivedZoneParams.runnerEnabled = false; IasConfigFile::IasOptionState runnerThreadState = IasConfigFile::getInstance()->getRunnerThreadState(derivedZoneWorkerThread->mParams->name); if ((runnerThreadState == IasConfigFile::eIasEnabled) && (periodSizeMultiple != 1)) { derivedZoneParams.runnerEnabled = true; DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Runner thread enabled for derived routing zone", derivedZoneWorkerThread->mParams->name); } IasDerivedZoneParamsPair tmp = std::make_pair(derivedZoneWorkerThread, derivedZoneParams); // Zones with periodSizeMultiple are handled in parent thread. if (derivedZoneParams.runnerEnabled == true) { bool found = false; for (IasRunnerThreadParamsMap::iterator mapIt = mRunnersParamsMap.begin(); mapIt != mRunnersParamsMap.end(); mapIt++) { if (mapIt->second.periodSizeMultiple == periodSizeMultiple) { mapIt->first->addZone(tmp); found = true; break; } } if (!found) { // There was no runner thread found for given periodSizeMultiple. // This will create one and connect it with the derived zone. IasRoutingZoneRunnerThreadPtr runnerThread = std::make_shared<IasRunnerThread>(derivedZoneParams.periodSizeMultiple, mParams->name); IasRunnerThreadParamsPair runnerPair = std::make_pair(runnerThread, derivedZoneParams); mRunnersParamsMap.insert(runnerPair); runnerThread->addZone(tmp); } } mDerivedZoneParamsMap.insert(tmp); // To avoid that the routing zones are driven by conflicting clocks, the // sink device of the derived zone has to operate in non-blocking mode. // This has to be done for ALSA handlers only, because SmartXClients // do not have a corresponding function. if (derivedZoneSinkDevice->isAlsaHandler()) { IasAlsaHandlerPtr alsaHandler = nullptr; derivedZoneSinkDevice->getConcreteDevice(&alsaHandler); IAS_ASSERT(alsaHandler != nullptr); // already tested by IasAudioDevice::isAlsaHandler() IasAlsaHandler::IasResult ahResult = alsaHandler->setNonBlockMode(true); if (ahResult != IasAlsaHandler::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error in IasAlsaHandler::setNonBlockMode:", toString(ahResult)); return eIasFailed; } } return eIasOk; } void IasRoutingZoneWorkerThread::deleteDerivedZoneWorkerThread(IasRoutingZoneWorkerThreadPtr derivedZoneWorkerThread) { if (derivedZoneWorkerThread != nullptr) { // Remove worker thread from runner for (IasRunnerThreadParamsMap::iterator mapIt = mRunnersParamsMap.begin(); mapIt != mRunnersParamsMap.end(); mapIt++) { IasRoutingZoneRunnerThreadPtr runner = mapIt->first; if (runner->hasZone(derivedZoneWorkerThread)) { std::lock_guard<std::mutex> lk(mMutexDerivedZones); // This could potentially just delete worker thread from all runner threads, // it will be a no-op in runner threads which do not contain it. runner->deleteZone(derivedZoneWorkerThread); // If it was last zone for this runner thread, remove it if (runner->isEmpty()) { mRunnersParamsMap.erase(mapIt); } // No need to check other runner threads, zone should only be in one. break; } } IasDerivedZoneParamsMap::iterator mapIt; mapIt = mDerivedZoneParamsMap.find(derivedZoneWorkerThread); if (mapIt != mDerivedZoneParamsMap.end()) { std::lock_guard<std::mutex> lk(mMutexDerivedZones); mDerivedZoneParamsMap.erase(mapIt); } } else { // nullptr worker thread cannot be present, it is checked for in addDerivedZoneWorkerThread DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Invalid worker thread == nullptr"); } } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::prepareStates() { // Check for mSinkDevice. This function and the real-time thread function depends on it. if (mSinkDevice == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Missing link to sink device (mSinkDevice == nullptr)"); return eIasFailed; } IasAudioDeviceParamsPtr sinkDeviceParams = mSinkDevice->getDeviceParams(); if (sinkDeviceParams == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: sink device parameters have not been set"); return eIasFailed; } mPeriodSize = sinkDeviceParams->periodSize; // Get the handle to the ring buffer of the sink device. // The ring buffer is provided either by the AlsaHandler or by the smartXClient. if (mSinkDevice->isAlsaHandler()) { IasAlsaHandlerPtr alsaHandler; mSinkDevice->getConcreteDevice(&alsaHandler); IAS_ASSERT(alsaHandler != nullptr); // already tested by IasAudioDevice::isAlsaHandler() // Start the ALSA handler in playback direction. IasAlsaHandler::IasResult result = alsaHandler->start(); if (result != IasAlsaHandler::eIasOk) { /** * @log A more detailed description of the error is provided by the method IasAlsaHandler::eIasInvalidParam. */ DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAlsaHandler::start:", toString(result)); return eIasFailed; } result = alsaHandler->getRingBuffer(&mSinkDeviceRingBuffer); if (result != IasAlsaHandler::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAlsaHandler::getRingBuffer:", toString(result)); return eIasFailed; } if (mSinkDeviceRingBuffer == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAlsaHandler::getRingBuffer: mSinkDeviceRingBuffer is null, result = ", toString(result)); return eIasFailed; } } else if (mSinkDevice->isSmartXClient()) { IasSmartXClientPtr smartXClient = nullptr; mSinkDevice->getConcreteDevice(&smartXClient); IAS_ASSERT(smartXClient != nullptr); // already tested by IasAudioDevice::isSmartXClient() IasSmartXClient::IasResult result = smartXClient->getRingBuffer(&mSinkDeviceRingBuffer); if (result != IasSmartXClient::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasSmartXClient::getRingBuffer:", toString(result)); return eIasFailed; } } else { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: sink device", sinkDeviceParams->name, "is neither alsaHandler nor smartXClient!"); return eIasFailed; } IAS_ASSERT(mSinkDeviceRingBuffer != nullptr); // already checked in IasAudioDevice::isAlsaHandler() / IasSmartXClient::getRingBuffer() IasAudioRingBufferResult rbResult = mSinkDeviceRingBuffer->getDataFormat(&mSinkDeviceDataFormat); if (rbResult != IasAudioRingBufferResult::eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::getDataFormat:", toString(rbResult)); return eIasFailed; } mSinkDeviceNumChannels = mSinkDeviceRingBuffer->getNumChannels(); if(mSinkDeviceNumChannels == 0) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::getNumChannels, ringbuffer returned 0 channels"); return eIasFailed; } std::lock_guard<std::mutex> lk(mMutexConversionBuffers); if (mConversionBufferParamsMap.begin() == mConversionBufferParamsMap.end()) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: routing zone does not include any conversion buffers"); return eIasFailed; } // Loop over all conversion buffers, i.e., loop over all routingZoneInputPorts for (IasConversionBufferParamsMap::const_iterator mapIt = mConversionBufferParamsMap.begin(); mapIt != mConversionBufferParamsMap.end(); mapIt++) { const IasAudioPortPtr& routingZoneInputPort = mapIt->first; const IasConversionBufferParams& conversionBufferParams = mapIt->second; const IasAudioRingBuffer* conversionBuffer = conversionBufferParams.ringBuffer; const IasAudioPortPtr& sinkDeviceInputPort = conversionBufferParams.sinkDeviceInputPort; IasAudioRingBufferResult cbResult; IasAudioCommonDataFormat conversionBufferDataFormat; cbResult = conversionBuffer->getDataFormat(&conversionBufferDataFormat); if (cbResult != eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::getDataFormat method of the conversion buffer:", toString(cbResult)); return eIasFailed; } IasAudioArea *conversionBufferAreas = nullptr; uint32_t conversionBufferNumChannels = 0; cbResult = conversionBuffer->getAreas(&conversionBufferAreas); if (cbResult != eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::getAreas method of the conversion buffer:", toString(cbResult)); return eIasFailed; } conversionBufferNumChannels = conversionBuffer->getNumChannels(); if (conversionBufferNumChannels == 0) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::getNumChannels method of the conversion buffer: buffer returned 0 channels"); } // Check if this conversionBuffer (routing zone input port) is connected to a sink device input port // and verify that both ports have the same number of channels. if (sinkDeviceInputPort != nullptr) { IasAudioPortCopyInformation sinkDeviceInputPortCopyInfo; IasAudioPort::IasResult portResult = sinkDeviceInputPort->getCopyInformation(&sinkDeviceInputPortCopyInfo); if (portResult != IasAudioPort::eIasOk) { return eIasFailed; } uint32_t sinkDeviceInputPortNumChannels = sinkDeviceInputPortCopyInfo.numChannels; if (conversionBufferNumChannels != sinkDeviceInputPortNumChannels) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: number of channels do not match: routingZoneInputPort", routingZoneInputPort->getParameters()->name, "has", conversionBufferNumChannels, "channels, sinkDeviceInputPort", sinkDeviceInputPort->getParameters()->name, "has", sinkDeviceInputPortNumChannels, "channels"); } } else { // Generate a warning (not an error) if the conversionBuffer is not connected. DLT_LOG_CXX(*mLog, DLT_LOG_WARN, LOG_PREFIX, LOG_ZONE, "routingZoneInputPort", mapIt->first->getParameters()->name, "is not connected to any sink device input ports"); } } return eIasOk; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::addConversionBuffer(const IasAudioPortPtr audioPort, IasAudioRingBuffer* conversionBuffer) { IAS_ASSERT(audioPort != nullptr); IAS_ASSERT(conversionBuffer != nullptr); // Verify that the mConversionBufferParamsMap does not already contain this conversion buffer. for (const IasConversionBufferParamsPair& it :mConversionBufferParamsMap) { const IasConversionBufferParams tmpParams = it.second; if (tmpParams.ringBuffer == conversionBuffer) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot add conversion buffer; conversion buffer has already been added"); return eIasFailed; } } if (mConversionBufferParamsMap.find(audioPort) != mConversionBufferParamsMap.end()) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot add conversion buffer; audio port has already been added"); return eIasFailed; } IasConversionBufferParams tmpParams; tmpParams.ringBuffer = conversionBuffer; // Add the new conversion buffer to the mConversionBufferParamsMap IasConversionBufferParamsPair tmp = std::make_pair(audioPort, tmpParams); mConversionBufferParamsMap.insert(tmp); return eIasOk; } void IasRoutingZoneWorkerThread::deleteConversionBuffer(const IasAudioPortPtr audioPort) { IAS_ASSERT(audioPort != nullptr); std::lock_guard<std::mutex> lk(mMutexConversionBuffers); mConversionBufferParamsMap.erase(audioPort); } IasAudioRingBuffer* IasRoutingZoneWorkerThread::getConversionBuffer(const IasAudioPortPtr audioPort) { IAS_ASSERT(audioPort != nullptr); // Try to find audioPort in mConversionBufferParamsMap. Return nullptr, if it does not exist. IasConversionBufferParamsMap::const_iterator it = mConversionBufferParamsMap.find(audioPort); if (it == mConversionBufferParamsMap.end()) { return nullptr; } // Extract the pointer to the ring buffer and return. IasConversionBufferParams tmpParams = it->second; return tmpParams.ringBuffer; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::linkAudioPorts(IasAudioPortPtr zoneInputPort, IasAudioPortPtr sinkDeviceInputPort) { IAS_ASSERT(zoneInputPort != nullptr); // Already checked in IasSetupImpl IAS_ASSERT(sinkDeviceInputPort != nullptr); // Already checked in IasSetupImpl // Verify that the zoneInputPort has been added to the routing zone before. if (mConversionBufferParamsMap.find(zoneInputPort) == mConversionBufferParamsMap.end()) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot link zoneInputPort", zoneInputPort->getParameters()->name, "to sinkDeviceInputPort, because zoneInputPort has not been added to the routing zone before."); return eIasFailed; } // Verify that the sinkDeviceInputPort is not already linked with another zoneInputPort. for (const IasConversionBufferParamsPair& it :mConversionBufferParamsMap) { const IasConversionBufferParams tmpParams = it.second; if (tmpParams.sinkDeviceInputPort == sinkDeviceInputPort) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot link zoneInputPort to sinkDeviceInputPort", sinkDeviceInputPort->getParameters()->name, "because sinkDeviceInputPort is already linked with another zoneInputPort"); return eIasFailed; } } // Verify that the sinkDeviceInputPort belongs to the sink device that has been linked to this routing zone. const IasAudioDevice::IasAudioPortSetPtr sinkDeviceAudioPortSet = mSinkDevice->getAudioPortSet(); if (sinkDeviceAudioPortSet->find(sinkDeviceInputPort) == sinkDeviceAudioPortSet->end()) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot link zoneInputPort to sinkDeviceInputPort", sinkDeviceInputPort->getParameters()->name, "because sinkDeviceInputPort does not belong to the sink device that is connected to the routing zone"); return eIasFailed; } // Add the sinkDeviceInputPort to the mConversionBufferParamsMap for the specified zoneInputPort. mConversionBufferParamsMap[zoneInputPort].sinkDeviceInputPort = sinkDeviceInputPort; return eIasOk; } void IasRoutingZoneWorkerThread::unlinkAudioPorts(IasAudioPortPtr zoneInputPort, IasAudioPortPtr) { IAS_ASSERT(zoneInputPort != nullptr); // Already checked in IasSetupImpl // Verify that the zoneInputPort has been added to the routing zone before. if (mConversionBufferParamsMap.find(zoneInputPort) == mConversionBufferParamsMap.end()) { return; } mConversionBufferParamsMap[zoneInputPort].sinkDeviceInputPort = nullptr; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::addPipeline(IasPipelinePtr pipeline) { IAS_ASSERT(pipeline != nullptr); // already checked in IasSetupImpl::addPipeline // Check whether routing zone already owns a different pipeline. if ((mPipeline != nullptr) && (mPipeline != pipeline)) { IasPipelineParamsPtr newPipelineParams = pipeline->getParameters(); IasPipelineParamsPtr existingPipelineParams = mPipeline->getParameters(); IAS_ASSERT(newPipelineParams != nullptr); // already checked in constructor of IasPipeline IAS_ASSERT(existingPipelineParams != nullptr); // already checked in constructor of IasPipeline DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot add pipeline", newPipelineParams->name, "since the routing zone already owns pipeline", existingPipelineParams->name); return eIasFailed; } // If a sink device has been added to the routing zone, verify that the period size and the sample rate // of the pipeline match to the corresponding parameters of the sink device. if (mSinkDevice != nullptr) { IasPipelineParamsPtr pipelineParams = pipeline->getParameters(); IAS_ASSERT(pipelineParams != nullptr); // already checked in constructor of IasPipeline if (mSinkDevice->getPeriodSize() != pipelineParams->periodSize) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, periodSizes do not match: sink device:", mSinkDevice->getPeriodSize(), "pipeline:", pipelineParams->periodSize); return eIasFailed; } if (mSinkDevice->getSampleRate() != pipelineParams->samplerate) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, sample rates do not match: sink device:", mSinkDevice->getSampleRate(), "pipeline:", pipelineParams->samplerate); return eIasFailed; } } mPipeline = pipeline; return eIasOk; } void IasRoutingZoneWorkerThread::getLinkedSinkPort(IasAudioPortPtr zoneInputPort, IasAudioPortPtr *sinkDeviceInputPort) { IAS_ASSERT(zoneInputPort != nullptr); // Already checked in IasSetupImpl if (mConversionBufferParamsMap[zoneInputPort].sinkDeviceInputPort != nullptr) { *sinkDeviceInputPort = mConversionBufferParamsMap[zoneInputPort].sinkDeviceInputPort; } else { *sinkDeviceInputPort = nullptr; //not linked to a sink device } } void IasRoutingZoneWorkerThread::deletePipeline() { mMutexPipeline.lock(); // avoid that the pipeline is currently executed mPipeline.reset(); mMutexPipeline.unlock(); } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::addBasePipeline(IasPipelinePtr pipeline) { IAS_ASSERT(pipeline != nullptr); // already checked in // Check whether routing zone already owns a different pipeline. if ((mBasePipeline != nullptr) && (mBasePipeline != pipeline)) { IasPipelineParamsPtr newPipelineParams = pipeline->getParameters(); IasPipelineParamsPtr existingPipelineParams = mBasePipeline->getParameters(); IAS_ASSERT(newPipelineParams != nullptr); // already checked in constructor of IasPipeline IAS_ASSERT(existingPipelineParams != nullptr); // already checked in constructor of IasPipeline DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: cannot add base pipeline", newPipelineParams->name, "since the routing zone already owns base pipeline", existingPipelineParams->name); return eIasFailed; } // If a sink device has been added to the routing zone, verify that the period size and the sample rate // of the base pipeline match to the corresponding parameters of the sink device. if (mSinkDevice != nullptr) { IasPipelineParamsPtr pipelineParams = pipeline->getParameters(); IAS_ASSERT(pipelineParams != nullptr); // already checked in constructor of IasPipeline if (mSinkDevice->getPeriodSize() != pipelineParams->periodSize) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, periodSizes do not match: sink device:", mSinkDevice->getPeriodSize(), "base pipeline:", pipelineParams->periodSize); return eIasFailed; } if (mSinkDevice->getSampleRate() != pipelineParams->samplerate) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error, sample rates do not match: sink device:", mSinkDevice->getSampleRate(), "base pipeline:", pipelineParams->samplerate); return eIasFailed; } } mBasePipeline = pipeline; return eIasOk; } void IasRoutingZoneWorkerThread::deleteBasePipeline() { mMutexPipeline.lock(); // avoid that the pipeline is currently executed mBasePipeline.reset(); mMutexPipeline.unlock(); } /** * @brief Private function: transfer one period of PCM frames from the routing zone to the linked audio sink device. */ IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::transferPeriod() { IAS_ASSERT(mSinkDevice != nullptr); // already checked in prepareStates() IAS_ASSERT(mSinkDeviceRingBuffer != nullptr); // already checked in prepareStates() IAS_ASSERT(mSinkDevice != nullptr); // already checked in prepareStates() std::lock_guard<std::timed_mutex> transferLock(mMutexTransferInProgress); // Check here again if we are in active state and if we are not active exit immediately // This check is required after the mutex is locked here, because there is a potential race condition // with the check being done outside of this method if (mCurrentState != eIasActive) { return eIasOk; } // Check if we got an event from the linked sink device IasAudioDevice::IasEventType eventType = IasAudioDevice::IasEventType::eIasNoEvent; IasAudioDevice::IasEventType lastEvent = IasAudioDevice::IasEventType::eIasNoEvent; while ((eventType = mSinkDevice->getNextEventType()) != IasAudioDevice::IasEventType::eIasNoEvent) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, "Got event", toString(eventType), "from sink", mSinkDevice->getName()); lastEvent = eventType; if (eventType == IasAudioDevice::IasEventType::eIasStop) { // In case of an stop event, we will reset all buffers and all states to initial state to restart synchronization if (isActive()) { changeState(eIasInactivate, false); for (auto &entry : mConversionBufferParamsMap) { mSwitchMatrix->lockJob(entry.first); } mSinkDeviceRingBuffer->resetFromReader(); clearConversionBuffers(); changeState(eIasPrepare); } } } if (lastEvent == IasAudioDevice::IasEventType::eIasStop) { return eIasOk; } // Check the probing queue for any outstanding probing actions IasProbingQueueEntry probingQueueEntry; while(mProbingQueue.try_pop(probingQueueEntry)) { IasDataProbe::IasResult probeRes = IasDataProbeHelper::processQueueEntry(probingQueueEntry, &mDataProbe, &mProbingActive, mSinkDevice->getNumPeriods()*mPeriodSize); if (probeRes != IasDataProbe::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, "error during ", toString(probingQueueEntry.action)," :", toString(probeRes)); } } // Setup a vector of boolean flags, which indicates for each channel of the sink device // whether this channel has received valid PCM samples from one of the routing zone input ports. const IasAudioDeviceParamsPtr sinkDeviceParams = mSinkDevice->getDeviceParams(); IAS_ASSERT(sinkDeviceParams != nullptr); // already checked in constructor of IasAudioDevice. const uint32_t cNumChannelsSinkDevice = sinkDeviceParams->numChannels; bool isChannelServiced[cNumChannelsSinkDevice]; for (uint32_t channel = 0; channel < cNumChannelsSinkDevice; channel++) { isChannelServiced[channel] = false; } IasAudioRingBufferResult result; // Call the updateAvailable method of the associated sink device // and identify the number of frames that are available. uint32_t sinkDeviceNumFramesAvailable = 0; result = mSinkDeviceRingBuffer->updateAvailable(IasRingBufferAccess::eIasRingBufferAccessWrite, &sinkDeviceNumFramesAvailable); if (result == IasAudioRingBufferResult::eIasRingBuffTimeOut) { if (mTimeoutCnt > mLogInterval || mTimeoutCnt == 0) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Timeout during IasAudioRingBuffer::updateAvailable. Trying to continue."); mTimeoutCnt = 0; } mTimeoutCnt++; sinkDeviceNumFramesAvailable = 0; } else if (result != IasAudioRingBufferResult::eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::updateAvailable:", toString(result)); if ((result == eIasRingBuffAlsaXrunError) || (result == eIasRingBuffAlsaSuspendError) || (result == eIasRingBuffAlsaError)) { // Create event IasSetupEventPtr event = mEventProvider->createSetupEvent(); event->setEventType(IasSetupEvent::eIasUnrecoverableSinkDeviceError); event->setSinkDevice(mSinkDevice); mEventProvider->send(event); } return eIasFailed; } else { mTimeoutCnt = 0; DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_PREFIX, LOG_ZONE, "space available in sink device:",sinkDeviceNumFramesAvailable,"period size is:",mPeriodSize); } // If this is a base zone: trigger switchmatrix here to have all data ready in conversion buffers. if (!mIsDerivedZone) { mSwitchMatrix->trigger(); } if (sinkDeviceNumFramesAvailable < mPeriodSize) { // The sink device ring buffer is full. This can happen in a derived zone with an ALSA capture plugin as sink device, when // the application is not able to read from the capture device for whatever reason (scheduling issue, tired of reading samples, etc.). // In this case we simply zero out the samples in the ring buffer but keep the buffer filled. This will lead to the situation, that // the samples cannot be copied to the sink device ring buffer and will be discarded. However, when the application sometime later // starts reading again from the ring buffer it will first get the zeroed out periods and afterwards the correct samples. If we would // not zero out the samples here, we would pass already outdated samples to the application, which is not intended. mSinkDeviceRingBuffer->zeroOut(); if (mLogCnt > mLogInterval || mLogCnt == 0) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Only", sinkDeviceNumFramesAvailable, "frames free space available, but", mPeriodSize, "required. Zeroed out sink device buffer."); mLogCnt = 0; } mLogCnt++; mLogOkCnt = 0; } else { mLogOkCnt++; if (mLogOkCnt > 10) { // Only if the buffer fill level is ok for at least 10 times, then we can reset the mLogCnt. This avoids flooding the log when the buffer fill level toggles // between ok and not ok too often. mLogCnt = 0; mLogOkCnt = 0; } } // Decide whether the sink device provides enough space so that we can write // a period of PCM frames into the ring buffer of the sink. If the sink does // not provide enough space, we will discard the samples from the conversion // buffers. This could happen, if the routing zone is a derived zone that // writes into an ALSA handler using the non-blocking mode. bool writeToSinkDevice = (sinkDeviceNumFramesAvailable >= mPeriodSize); uint32_t sinkDeviceOffset = 0; uint32_t sinkDeviceNumFrames = mPeriodSize; IasAudio::IasAudioArea* sinkDeviceAreas = nullptr; if (writeToSinkDevice) { result = mSinkDeviceRingBuffer->beginAccess(eIasRingBufferAccessWrite, &sinkDeviceAreas, &sinkDeviceOffset, &sinkDeviceNumFrames); // Since we always write blocks of mPeriodSize PCM frames to the sink device, the number // of contiguous frames in the sink device must never be smaller than mPeriodSize, // as long as (sinkDeviceNumFramesAvailable >= mPeriodSize), which we have checked above. IAS_ASSERT(sinkDeviceNumFrames >= mPeriodSize); if (result != IasAudioRingBufferResult::eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::beginAccess:", toString(result)); if (result == eIasRingBuffAlsaError) { // Create event IasSetupEventPtr event = mEventProvider->createSetupEvent(); event->setEventType(IasSetupEvent::eIasUnrecoverableSinkDeviceError); event->setSinkDevice(mSinkDevice); mEventProvider->send(event); } return eIasFailed; } } // Loop over all conversion buffers, i.e., loop over all routingZoneInputPorts std::lock_guard<std::mutex> lk(mMutexConversionBuffers); for (IasConversionBufferParamsMap::iterator mapIt = mConversionBufferParamsMap.begin(); mapIt != mConversionBufferParamsMap.end(); mapIt++) { const IasAudioPortPtr& routingZoneInputPort = mapIt->first; IasConversionBufferParams& conversionBufferParams = mapIt->second; IasAudioRingBuffer* conversionBuffer = conversionBufferParams.ringBuffer; IasStreamingState& streamingState = conversionBufferParams.streamingState; IasAudioPortPtr& sinkDeviceInputPort = conversionBufferParams.sinkDeviceInputPort; uint32_t sinkDeviceInputPortNumChannels = 0; uint32_t sinkDeviceInputPortIndex = 0; // If the routing zone input port is connected to the sink device input port, setup copy information. bool isLinkedToSinkDeviceInputPort = (sinkDeviceInputPort != nullptr); if (isLinkedToSinkDeviceInputPort) { IasAudioPortCopyInformation sinkDeviceInputPortCopyInfo; IasAudioPort::IasResult portResult = sinkDeviceInputPort->getCopyInformation(&sinkDeviceInputPortCopyInfo); IAS_ASSERT(portResult == IasAudioPort::eIasOk); (void)portResult; sinkDeviceInputPortNumChannels = sinkDeviceInputPortCopyInfo.numChannels; sinkDeviceInputPortIndex = sinkDeviceInputPortCopyInfo.index; } IasAudioCommonDataFormat conversionBufferDataFormat; result = conversionBuffer->getDataFormat(&conversionBufferDataFormat); IAS_ASSERT(result == eIasRingBuffOk); // already checked in prepareStates() IasAudioArea *conversionBufferAreas = nullptr; uint32_t conversionBufferNumChannels = 0; result = conversionBuffer->getAreas(&conversionBufferAreas); IAS_ASSERT(result == eIasRingBuffOk); // already checked in prepareStates() conversionBufferNumChannels = conversionBuffer->getNumChannels(); IAS_ASSERT(conversionBufferNumChannels != 0); // already checked in prepareStates() // Transfer the PCM frames from the conversion buffer to the sink device. // We might need several chunks, if conversion buffer provides the PCM frames // not contiguously. This is implemented by the while loop. This could happen // if the routing zone is a derived zone whose periodSize is larger than the // period size of the switchmatrix. uint32_t numFramesTransferred = 0; while (numFramesTransferred < sinkDeviceNumFrames) { uint32_t numFramesToTransfer = sinkDeviceNumFrames - numFramesTransferred; uint32_t conversionBufferNumSamplesAvail = 0; result = conversionBuffer->updateAvailable(eIasRingBufferAccessRead, &conversionBufferNumSamplesAvail); if (result != eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::updateAvailable method of the conversion buffer:", toString(result)); return eIasFailed; } // State machine for the streaming states: bufferEmpty, bufferPartlyFromEmpty, bufferFull, partlyFromFull. IasStreamingState streamingStatePrevious = streamingState; if (conversionBufferNumSamplesAvail == 0) { streamingState = eIasStreamingStateBufferEmpty; } else if (conversionBufferNumSamplesAvail >= numFramesToTransfer) { streamingState = eIasStreamingStateBufferFull; } else if (streamingState == eIasStreamingStateBufferEmpty) { streamingState = eIasStreamingStateBufferPartlyFromEmpty; } else if (streamingState == eIasStreamingStateBufferFull) { streamingState = eIasStreamingStateBufferPartlyFromFull; } // Print out the new status of the state machine, if it has changed. if (streamingState != streamingStatePrevious) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Changing to state", toString(streamingState), "conversionBufferNumSamplesAvail=", conversionBufferNumSamplesAvail, "numFramesToTransfer=", numFramesToTransfer); } // Ask the conversion buffer for the number of contiguous frames available. uint32_t conversionBufferOffset = 0; uint32_t conversionBufferNumFrames = numFramesToTransfer; result = conversionBuffer->beginAccess(eIasRingBufferAccessRead, &conversionBufferAreas, &conversionBufferOffset, &conversionBufferNumFrames); IAS_ASSERT(numFramesToTransfer >= conversionBufferNumFrames); if (result != eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::beginAccess method of the conversion buffer:", toString(result)); return eIasFailed; } // Determine how many frames we will read from the conversion buffer // and how many frames we will write into the sink device. uint32_t numFramesToRead; uint32_t numFramesToWrite; if ((streamingState == eIasStreamingStateBufferEmpty) || (streamingState == eIasStreamingStateBufferPartlyFromEmpty)) { // Don't read from the conversion buffer. Instead, write zeros to the sink device. numFramesToRead = 0; numFramesToWrite = numFramesToTransfer; } else { // Copy from the conversion buffer to the sink device. numFramesToRead = conversionBufferNumFrames; numFramesToWrite = conversionBufferNumFrames; } // If the routing zone owns a pipeline, provide the PCM data from the current port to the pipeline. // The pipeline decides internally whether it needs the PCM frames from this routingZoneInputPort. // The actual pipeline processing will be done later (on a basis of a complete period). mMutexPipeline.lock(); // avoid that the pipeline is erased if (mPipeline != nullptr) { uint32_t numFramesRemaining; IasPipeline::IasResult pipelineResult = mPipeline->provideInputData(routingZoneInputPort, conversionBufferOffset, numFramesToRead, numFramesToWrite, &numFramesRemaining); (void)numFramesRemaining; IAS_ASSERT(pipelineResult == IasPipeline::eIasOk); (void)pipelineResult; } mMutexPipeline.unlock(); // If there is a direct link for this audio port, copy the data directly. if (writeToSinkDevice && isLinkedToSinkDeviceInputPort) { // Copy from conversion buffer into input buffer of ALSA handler. copyAudioAreaBuffers(sinkDeviceAreas, mSinkDeviceDataFormat, sinkDeviceOffset + numFramesTransferred, sinkDeviceInputPortNumChannels, sinkDeviceInputPortIndex, numFramesToWrite, conversionBufferAreas, conversionBufferDataFormat, conversionBufferOffset, conversionBufferNumChannels, 0, numFramesToRead); // Mark the affected channels as already serviced. for (uint32_t channel = 0; channel < sinkDeviceInputPortNumChannels; channel++) { IAS_ASSERT(channel+sinkDeviceInputPortIndex < cNumChannelsSinkDevice); isChannelServiced[channel+sinkDeviceInputPortIndex] = true; } } result = conversionBuffer->endAccess(eIasRingBufferAccessRead, conversionBufferOffset, numFramesToRead); if (result != eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::endAccess method of the conversion buffer:", toString(result)); return eIasFailed; } numFramesTransferred += numFramesToWrite; } // Now we have transferred sinkDeviceNumFrames PCM frames from one conversion buffer. } // Now we have serviced all conversion buffers. if (writeToSinkDevice) { // Iterate over all channels of the sink device and write zeros to all channels // that have not been serviced by the direct link before. for (uint32_t channel = 0; channel < cNumChannelsSinkDevice; channel++) { if (!(isChannelServiced[channel])) { zeroAudioAreaBuffers(sinkDeviceAreas, mSinkDeviceDataFormat, sinkDeviceOffset, 1, channel, sinkDeviceNumFrames); } } // If the routing zone owns a pipeline, execute the pipeline and write the processed PCM frames to the sink device. // The pipeline decides internally which audio ports (or which audio channels) need to be processed. mMutexPipeline.lock(); // avoid that the pipeline is erased if (mBasePipeline != nullptr) { // If there is a base pipeline, we simply retrieve all channels already processed for that sink mBasePipeline->retrieveOutputData(mSinkDevice, sinkDeviceAreas, mSinkDeviceDataFormat, sinkDeviceNumFrames, sinkDeviceOffset); } if (mPipeline != nullptr) { mPipeline->process(); mPipeline->retrieveOutputData(mSinkDevice, sinkDeviceAreas, mSinkDeviceDataFormat, sinkDeviceNumFrames, sinkDeviceOffset); } mMutexPipeline.unlock(); // Execute the data probing. if (mDataProbe) { IasDataProbe::IasResult probeRes = mDataProbe->process(sinkDeviceAreas, sinkDeviceOffset, sinkDeviceNumFrames); if(probeRes != IasDataProbe::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, "delete probe"); mProbingActive.store(false); mDataProbe = nullptr; } } // Call the endAccess method of the linked sink device. DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_PREFIX, LOG_ZONE, "Calling IasAudioRingBuffer::endAccess with sinkDeviceNumFrames=", sinkDeviceNumFrames); result = mSinkDeviceRingBuffer->endAccess(eIasRingBufferAccessWrite, sinkDeviceOffset, sinkDeviceNumFrames); if (result != IasAudioRingBufferResult::eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasAudioRingBuffer::endAccess:", toString(result)); if (result == eIasRingBuffAlsaError) { // Create event IasSetupEventPtr event = mEventProvider->createSetupEvent(); event->setEventType(IasSetupEvent::eIasUnrecoverableSinkDeviceError); event->setSinkDevice(mSinkDevice); mEventProvider->send(event); } return eIasFailed; } if (mDiagnosticsStream.is_open()) { // Get timestamp information and write routing zone diagnostics into the diagnostics stream. // If the routing zone writes into a realBuffer, the timestamp refers to the moment of the write access. IasAudioTimestamp audioTimestampSinkDeviceBuffer; result = mSinkDeviceRingBuffer->getTimestamp(eIasRingBufferAccessWrite, &audioTimestampSinkDeviceBuffer); IAS_ASSERT(result == IasAudioRingBufferResult::eIasRingBuffOk); mDiagnosticsStream << audioTimestampSinkDeviceBuffer.timestamp << ", " << audioTimestampSinkDeviceBuffer.numTransmittedFrames << std::endl; } } return eIasOk; } void IasRoutingZoneWorkerThread::clearConversionBuffers() { for (auto &entry : mConversionBufferParamsMap) { auto &convParams = entry.second; convParams.ringBuffer->resetFromReader(); convParams.streamingState = eIasStreamingStateBufferEmpty; DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Cleared conversion buffer of port", entry.first->getParameters()->name); } } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::start() { if (mThread == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error due to non-initialized component"); return eIasNotInitialized; } // Check that mSwitchMatrix has been initialized, since the run() method depends on it. if (mSwitchMatrix == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error: Switch Matrix Worker Thread has not been set (mSwitchMatrixWorkerThread == nullptr)"); return eIasFailed; } // Set the streaming state of all conversion buffers to empty. std::lock_guard<std::mutex> lk(mMutexConversionBuffers); for (IasConversionBufferParamsMap::iterator mapIt = mConversionBufferParamsMap.begin(); mapIt != mConversionBufferParamsMap.end(); mapIt++) { IasConversionBufferParams& conversionBufferParams = mapIt->second; conversionBufferParams.streamingState = eIasStreamingStateBufferEmpty; } mThreadIsRunning = true; mThread->start(true); for (auto &thread : mRunnersParamsMap) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Starting runner thread for derived zone with countPeriods = ", thread.second.countPeriods); IasRunnerThread::IasResult res = thread.first->start(); if (res != IasRunnerThread::IasResult::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Failed to start runner thread, result = ", toString(res)); return eIasFailed; } } return eIasOk; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::stop() { if (mThread == nullptr) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error due to non-initialized component (mThread == nullptr)"); return eIasNotInitialized; } for (auto &thread : mRunnersParamsMap) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Stopping runner thread for derived zone with countPeriods = ", thread.second.countPeriods); if (thread.first->isAnyActive()) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "cannot stop runner thread since at least one derived RZ active"); continue; } IasRunnerThread::IasResult res = thread.first->stop(); if (res != IasRunnerThread::IasResult::eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Failed to stop runner thread, result = ", toString(res)); return eIasFailed; } } mThread->stop(); // A derived RZ may have it processing handled by a runner thread, prevent transfering period // before stopping the ALSA handler. changeState(eIasInactivate); if ((mSinkDevice != nullptr) && (mSinkDevice->isAlsaHandler())) { IasAlsaHandlerPtr alsaHandler; mSinkDevice->getConcreteDevice(&alsaHandler); IAS_ASSERT(alsaHandler != nullptr); // already tested by IasAudioDevice::isAlsaHandler() // Stop the ALSA handler alsaHandler->stop(); } return eIasOk; } IasAudioCommonResult IasRoutingZoneWorkerThread::beforeRun() { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE); return eIasResultOk; } void IasRoutingZoneWorkerThread::changeState(IasAction action, bool lock /* = true */) { if (mCurrentState == eIasInActive) { if (action == eIasPrepare) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Change state from inactive to active pending"); if (mIsDerivedZone == true) { prefillSinkBuffer(); } mCurrentState = eIasActivePending; } } else if (mCurrentState == eIasActivePending) { if (action == eIasActivate) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Change state from active pending to active"); mCurrentState = eIasActive; } else if (action == eIasInactivate) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Change state from active pending to inactive"); mCurrentState = eIasInActive; } } else if (mCurrentState == eIasActive) { if (action == eIasInactivate) { // We have to check if a transfer is currently in progress. This is simply done by using // the mMutexTransferinProgress, which is locked while the transfer is active. // We use a timed mutex here in order not to block here forever. // However, if this method is called from inside the method where the mutex was locked, this will lead to a deadlock. // This is avoided by passing in the parameter lock = false. bool lockStatus = false; if (lock == true) { lockStatus = mMutexTransferInProgress.try_lock_for(std::chrono::milliseconds(100)); DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Change state from active to inactive, lockStatus=", lockStatus); } else { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Change state from active to inactive"); } mCurrentState = eIasInActive; if (lockStatus == true) { // Unlock is only allowed after we successfully locked the mutex a few lines above. mMutexTransferInProgress.unlock(); } } } } void IasRoutingZoneWorkerThread::activatePendingWorker() { for (auto &entry : mDerivedZoneParamsMap) { IasRoutingZoneWorkerThreadPtr derivedZoneWorkerThread = entry.first; if (derivedZoneWorkerThread->isActivePending()) { // Trigger the derived zone now by setting the countPeriods counter to the period size multiple // This ensures a synchronized start up. entry.second.countPeriods = entry.second.periodSizeMultiple; if (derivedZoneWorkerThread->isSinkServiced()) { derivedZoneWorkerThread->changeState(IasRoutingZoneWorkerThread::eIasActivate); } } } } IasAudioCommonResult IasRoutingZoneWorkerThread::run() { IAS_ASSERT(mSwitchMatrix != nullptr); // already checked in start() method. IasThreadNames::getInstance()->setThreadName(IasThreadNames::eIasRealTime, "Routing Zone worker thread for Routing Zone " + mParams->name); IasConfigFile::configureThreadSchedulingParameters(mLog); while (mThreadIsRunning == true) { if(mDerivedZoneCallCount == 0) { //unlock all switch matrix jobs mSwitchMatrix->unlockJobs(); // synchronized activation of the pending worker threads activatePendingWorker(); } // Execute the transferPeriod method of the base zone; this transfers all // PCM frames from the conversion buffer to the sink device. IasRoutingZoneWorkerThread::IasResult result = transferPeriod(); if (result != eIasOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error during IasRoutingZoneWorkerThread::transferPeriod method of base zone:", toString(result)); return eIasResultFailed; } mDerivedZoneCallCount = 0; // Loop over all derived routing zones. // Process all derived zones, but these with periodSizeMultiple == 1, as those should // not have their own thread, but rather be processed in this one. for (IasRunnerThreadParamsMap::iterator mapIt = mRunnersParamsMap.begin(); mapIt != mRunnersParamsMap.end(); mapIt++) { IasRoutingZoneRunnerThreadPtr derivedZoneRunnerThread = mapIt->first; if (derivedZoneRunnerThread->isAnyActive()) { uint32_t periodCount = derivedZoneRunnerThread->addPeriod(1); if (periodCount >= mapIt->second.periodSizeMultiple) { if (derivedZoneRunnerThread->isProcessing()) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Runner thread for periodSizeMultiple:", derivedZoneRunnerThread->getPeriodSizeMultiple(), " is still not done processing when new periods arrived"); } derivedZoneRunnerThread->wake(); // mDerivedZoneCallCount only cares about whether there was a zone called or not mDerivedZoneCallCount++; } } } // Process all zones, for which we have no runner thread enabled, in this thread for (IasDerivedZoneParamsMap::iterator zoneMapIt = mDerivedZoneParamsMap.begin(); zoneMapIt != mDerivedZoneParamsMap.end(); zoneMapIt++) { IasDerivedZoneParams* derivedZoneParams = &(zoneMapIt->second); if (zoneMapIt->first->isActive() && zoneMapIt->second.runnerEnabled == false) { derivedZoneParams->countPeriods++; if (derivedZoneParams->countPeriods >= derivedZoneParams->periodSizeMultiple) { derivedZoneParams->countPeriods = 0; zoneMapIt->first->transferPeriod(); } } } } return eIasResultOk; } IasAudioCommonResult IasRoutingZoneWorkerThread::shutDown() { mThreadIsRunning = false; return eIasResultOk; } IasAudioCommonResult IasRoutingZoneWorkerThread::afterRun() { return eIasResultOk; } IasRoutingZoneWorkerThread::IasResult IasRoutingZoneWorkerThread::startProbing(const std::string &namePrefix, bool inject, uint32_t numSeconds, uint32_t startIndex, uint32_t numChannels) { IasProbingQueueEntry entry; entry.params.name = namePrefix; entry.params.duration = numSeconds; entry.params.isInject = inject; entry.params.numChannels = numChannels; entry.params.startIndex = startIndex; entry.params.sampleRate = mSinkDevice->getSampleRate(); entry.params.dataFormat = mSinkDeviceDataFormat; entry.action = eIasProbingStart; bool isProbingActive = mProbingActive.load(std::memory_order_relaxed); if(isProbingActive) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, "Probing already active"); return eIasFailed; } mProbingQueue.push(entry); DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, "Name=", namePrefix, "duration=", numSeconds, "isInject=", inject, "numChannels=", numChannels, "startIndex=", startIndex, "sampleRate=", entry.params.sampleRate, "dataFormat=", toString(entry.params.dataFormat)); return eIasOk; } void IasRoutingZoneWorkerThread::stopProbing() { IasProbingQueueEntry entry; entry.action = eIasProbingStop; mProbingQueue.push(entry); } bool IasRoutingZoneWorkerThread::isSinkServiced() const { IAS_ASSERT(mSinkDeviceRingBuffer != nullptr); IAS_ASSERT(mSinkDevice != nullptr); uint32_t avail = 0; IasAudioRingBufferResult rbres = mSinkDeviceRingBuffer->updateAvailable(eIasRingBufferAccessWrite, &avail); IAS_ASSERT(rbres == eIasRingBuffOk); (void)rbres; uint32_t periodSize = mSinkDevice->getPeriodSize(); uint32_t bufferSize = mSinkDevice->getNumPeriods() * periodSize; uint32_t targetValue = 0; if (mSinkDevice->isAlsaHandler()) { if (mSinkDevice->getDeviceParams()->clockType == IasClockType::eIasClockReceivedAsync) { // In case we have an ASRC activated in the sink, we need to start filling the ASRC buffer right away. // Setting the targetValue to 0 directly sets the sink to serviced and activates the processing. targetValue = 0; } else { // In this case we prefilled the buffer with bufferSize - periodSize zeros. If one period was consumed from // the buffer, then the sink device is serviced. targetValue = 2*periodSize; } } else { // In this case we prefilled the buffer with one periodSize zeros. If there is less than one period of samples in // the buffer or respectively more space than bufferSize - periodSize + 1, then the sink device is serviced. // The + 1 is required because we check for >= and not only >. targetValue = bufferSize - periodSize + 1; } if (avail >= targetValue) { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Sink device", mSinkDevice->getName(), "was serviced now. avail =", avail, "periodSize=", periodSize); return true; } else { DLT_LOG_CXX(*mLog, DLT_LOG_VERBOSE, LOG_PREFIX, LOG_ZONE, "Sink device", mSinkDevice->getName(), "was not serviced yet. avail =", avail, "periodSize=", periodSize); return false; } } void IasRoutingZoneWorkerThread::prefillSinkBuffer() { if (mSinkDeviceRingBuffer != nullptr) { IAS_ASSERT(mSinkDevice != nullptr); uint32_t periodSize = mSinkDevice->getPeriodSize(); uint32_t bufferSize = mSinkDevice->getNumPeriods() * periodSize; IasAudioArea *areas = nullptr; uint32_t offset = 0; uint32_t framesToBeFilled = 0; if (mSinkDevice->isAlsaHandler()) { // In case of an ALSA handler prefill the sink device ALSA buffer with one period size less than the buffer size. // The additional empty period size space is used to compensate for scheduling jitter framesToBeFilled = bufferSize - periodSize; } else { // In case of a SmartXbar plugin we are providing the data for an ALSA capture device. Therefor it is engough to fill only with one // period size. This prevents the application to read more than one period in a loop at full speed, like e.g. arecord would do. framesToBeFilled = periodSize; } uint32_t frames = framesToBeFilled; IasAudioRingBufferResult rbres = mSinkDeviceRingBuffer->beginAccess(eIasRingBufferAccessWrite, &areas, &offset, &frames); if (rbres == eIasRingBuffOk) { IAS_ASSERT(areas != nullptr); if (frames != framesToBeFilled) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Only", frames, "samples can be filled with zero instead of", framesToBeFilled); } zeroAudioAreaBuffers(areas, mSinkDeviceDataFormat, offset, mSinkDeviceNumChannels, 0, frames); rbres = mSinkDeviceRingBuffer->endAccess(eIasRingBufferAccessWrite, offset, frames); if (rbres != eIasRingBuffOk) { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error while trying to end access for sink ringbuffer"); } else { DLT_LOG_CXX(*mLog, DLT_LOG_INFO, LOG_PREFIX, LOG_ZONE, "Prefilled sink device ringbuffer with", frames, "zeros"); const IasAudioRingBufferMirror *mirror = mSinkDeviceRingBuffer->getMirror(); if (mirror != nullptr) { mirror->startDevice(); } } } else { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Error while trying to access sink ringbuffer"); } } else { DLT_LOG_CXX(*mLog, DLT_LOG_ERROR, LOG_PREFIX, LOG_ZONE, "Sink device ringbuffer not initialized yet"); } } bool IasRoutingZoneWorkerThread::hasPipeline(IasPipelinePtr pipeline) const { return (pipeline == mPipeline); } /* * Function to get a IasRoutingZoneWorkerThread::IasResult as string. */ #define STRING_RETURN_CASE(name) case name: return std::string(#name); break #define DEFAULT_STRING(name) default: return std::string(name) std::string toString(const IasRoutingZoneWorkerThread::IasResult& type) { switch(type) { STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasOk); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasInvalidParam); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasInitFailed); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasNotInitialized); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasFailed); DEFAULT_STRING("Invalid IasRoutingZoneWorkerThread::IasResult => " + std::to_string(type)); } } std::string toString(const IasRoutingZoneWorkerThread::IasStreamingState& streamingState) { switch(streamingState) { STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasStreamingStateBufferEmpty); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasStreamingStateBufferPartlyFromEmpty); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasStreamingStateBufferFull); STRING_RETURN_CASE(IasRoutingZoneWorkerThread::eIasStreamingStateBufferPartlyFromFull); DEFAULT_STRING("Invalid IasRoutingZoneWorkerThread::IasStreamingState => " + std::to_string(streamingState)); } } std::string toString(const IasRunnerThread::IasResult& type) { switch(type) { STRING_RETURN_CASE(IasRunnerThread::eIasOk); STRING_RETURN_CASE(IasRunnerThread::eIasInvalidParam); STRING_RETURN_CASE(IasRunnerThread::eIasInitFailed); STRING_RETURN_CASE(IasRunnerThread::eIasNotInitialized); STRING_RETURN_CASE(IasRunnerThread::eIasFailed); DEFAULT_STRING("Invalid IasRunnerThread::IasResult => " + std::to_string(type)); } } } //namespace IasAudio
40.554171
224
0.72065
[ "vector", "model" ]
8316fedbf0cab3117c77c7c10274dd534d41d135
1,704
cpp
C++
codejam/09/1C/C.cpp
tuket/challenges
456979020c78dfcae2f8681245000bb64a6aaf38
[ "Unlicense" ]
null
null
null
codejam/09/1C/C.cpp
tuket/challenges
456979020c78dfcae2f8681245000bb64a6aaf38
[ "Unlicense" ]
null
null
null
codejam/09/1C/C.cpp
tuket/challenges
456979020c78dfcae2f8681245000bb64a6aaf38
[ "Unlicense" ]
null
null
null
#include <iostream> #include <set> #include <vector> #include <array> #include <algorithm> using namespace std; struct P { int i, j; bool operator<(const P& o)const { int dif = j-i; int odif = o.j-o.i; return !( dif < odif ? true : dif > odif ? false : i < o.i ? true : i > o.i ? false : j < o.j); } }; int main() { int nn; cin >> nn; for(int kk=1; kk<=nn; kk++) { int n, p; cin >> n >> p; vector<int> pp(p); for(int& x : pp) { cin >> x; x--; } sort(pp.begin(), pp.end()); vector<P> intervals; { int beg = pp[0]; for(int i=1; i<pp.size(); i++) { int cur = pp[i]; int prev = pp[i-1]; if(cur > prev+1) { intervals.push_back({beg, prev}); beg = cur; } } intervals.push_back({beg, pp.back()}); } sort(intervals.begin(), intervals.end()); int res = 0; while(p && intervals.size()) { P ij = intervals.back(); int i = ij.i; int j = ij.j; intervals.pop_back(); if(i <= j) { if(i < j) { res += j-i; P a {i, (i+j)/2-1}; P b {(i+j)/2+1, j}; intervals.push_back(b); intervals.push_back(a); } p--; } } cout << "Case #" << kk << ": " << res << endl; } }
22.421053
54
0.342723
[ "vector" ]
83197255535fed084fa15c63515aed92c6eb2ffe
306
cpp
C++
leetcodeContest/216周/1662检查两个字符串数组是否相等.cpp
fireairforce/leetCode-Record
8eab0d58d44e081d908810824d601ef8f14c979f
[ "MIT" ]
74
2019-08-29T13:34:15.000Z
2022-02-17T09:39:53.000Z
leetcodeContest/216周/1662检查两个字符串数组是否相等.cpp
fireairforce/leetCode-Record
8eab0d58d44e081d908810824d601ef8f14c979f
[ "MIT" ]
43
2020-02-18T12:55:36.000Z
2020-03-10T08:41:05.000Z
leetcodeContest/216周/1662检查两个字符串数组是否相等.cpp
fireairforce/leetCode-Record
8eab0d58d44e081d908810824d601ef8f14c979f
[ "MIT" ]
15
2019-06-14T13:55:44.000Z
2021-08-20T08:26:50.000Z
class Solution { public: bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) { string a,b; for (int i = 0;i<word1.size();i++) { a+=word1[i]; } for (int i = 0;i<word2.size();i++) { b+=word2[i]; } return a == b; } };
23.538462
77
0.473856
[ "vector" ]
8327122dd10b3853c1ced7f6e9574f730e90c857
8,483
cxx
C++
main/xmloff/source/chart/SchXMLLegendContext.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
679
2015-01-06T06:34:58.000Z
2022-03-30T01:06:03.000Z
main/xmloff/source/chart/SchXMLLegendContext.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
102
2017-11-07T08:51:31.000Z
2022-03-17T12:13:49.000Z
main/xmloff/source/chart/SchXMLLegendContext.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
331
2015-01-06T11:40:55.000Z
2022-03-14T04:07:51.000Z
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "SchXMLLegendContext.hxx" #include "SchXMLEnumConverter.hxx" #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmlement.hxx> #include <xmloff/prstylei.hxx> #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> #include <tools/debug.hxx> #include <com/sun/star/chart/ChartLegendPosition.hpp> #include <com/sun/star/chart/ChartLegendExpansion.hpp> #include <com/sun/star/drawing/FillStyle.hpp> using namespace ::xmloff::token; using namespace com::sun::star; using rtl::OUString; using com::sun::star::uno::Reference; //---------------------------------------- namespace { enum LegendAttributeTokens { XML_TOK_LEGEND_POSITION, XML_TOK_LEGEND_X, XML_TOK_LEGEND_Y, XML_TOK_LEGEND_STYLE_NAME, XML_TOK_LEGEND_EXPANSION, XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO, XML_TOK_LEGEND_WIDTH, XML_TOK_LEGEND_WIDTH_EXT, XML_TOK_LEGEND_HEIGHT, XML_TOK_LEGEND_HEIGHT_EXT }; SvXMLTokenMapEntry aLegendAttributeTokenMap[] = { { XML_NAMESPACE_CHART, XML_LEGEND_POSITION, XML_TOK_LEGEND_POSITION }, { XML_NAMESPACE_SVG, XML_X, XML_TOK_LEGEND_X }, { XML_NAMESPACE_SVG, XML_Y, XML_TOK_LEGEND_Y }, { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_LEGEND_STYLE_NAME }, { XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, XML_TOK_LEGEND_EXPANSION }, { XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION_ASPECT_RATIO, XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO }, { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_LEGEND_WIDTH }, { XML_NAMESPACE_CHART_EXT, XML_WIDTH, XML_TOK_LEGEND_WIDTH_EXT }, { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_LEGEND_HEIGHT }, { XML_NAMESPACE_CHART_EXT, XML_HEIGHT, XML_TOK_LEGEND_HEIGHT_EXT }, XML_TOKEN_MAP_END }; class LegendAttributeTokenMap : public SvXMLTokenMap { public: LegendAttributeTokenMap(): SvXMLTokenMap( aLegendAttributeTokenMap ) {} virtual ~LegendAttributeTokenMap() {} }; //a LegendAttributeTokenMap Singleton struct theLegendAttributeTokenMap : public rtl::Static< LegendAttributeTokenMap, theLegendAttributeTokenMap > {}; }//end anonymous namespace //---------------------------------------- SchXMLLegendContext::SchXMLLegendContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const rtl::OUString& rLocalName ) : SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ), mrImportHelper( rImpHelper ) { } void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument(); if( !xDoc.is() ) return; // turn on legend uno::Reference< beans::XPropertySet > xDocProp( xDoc, uno::UNO_QUERY ); if( xDocProp.is() ) { try { xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), uno::makeAny( sal_True ) ); } catch( beans::UnknownPropertyException ) { DBG_ERROR( "Property HasLegend not found" ); } } uno::Reference< drawing::XShape > xLegendShape( xDoc->getLegend(), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xLegendProps( xLegendShape, uno::UNO_QUERY ); if( !xLegendShape.is() || !xLegendProps.is() ) { DBG_ERROR( "legend could not be created" ); return; } // parse attributes sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; const SvXMLTokenMap& rAttrTokenMap = theLegendAttributeTokenMap::get(); awt::Point aLegendPos; bool bHasXPosition=false; bool bHasYPosition=false; awt::Size aLegendSize; bool bHasWidth=false; bool bHasHeight=false; chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH; bool bHasExpansion=false; rtl::OUString sAutoStyleName; uno::Any aAny; for( sal_Int16 i = 0; i < nAttrCount; i++ ) { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); rtl::OUString aLocalName; rtl::OUString aValue = xAttrList->getValueByIndex( i ); sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); switch( rAttrTokenMap.Get( nPrefix, aLocalName )) { case XML_TOK_LEGEND_POSITION: { try { if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) ) xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny ); } catch( beans::UnknownPropertyException ) { DBG_ERROR( "Property Alignment (legend) not found" ); } } break; case XML_TOK_LEGEND_X: GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.X, aValue ); bHasXPosition = true; break; case XML_TOK_LEGEND_Y: GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.Y, aValue ); bHasYPosition = true; break; case XML_TOK_LEGEND_STYLE_NAME: sAutoStyleName = aValue; break; case XML_TOK_LEGEND_EXPANSION: SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ); bHasExpansion = (aAny>>=nLegendExpansion); break; case XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO: break; case XML_TOK_LEGEND_WIDTH: case XML_TOK_LEGEND_WIDTH_EXT: GetImport().GetMM100UnitConverter().convertMeasure( aLegendSize.Width, aValue ); bHasWidth = true; break; case XML_TOK_LEGEND_HEIGHT: case XML_TOK_LEGEND_HEIGHT_EXT: GetImport().GetMM100UnitConverter().convertMeasure( aLegendSize.Height, aValue ); bHasHeight = true; break; default: break; } } if( bHasXPosition && bHasYPosition ) xLegendShape->setPosition( aLegendPos ); if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM ) xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Expansion" ), uno::makeAny(nLegendExpansion) ); else if( bHasHeight && bHasWidth ) xLegendShape->setSize( aLegendSize ); // the fill style has the default "none" in XML, but "solid" in the model. xLegendProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), uno::makeAny( drawing::FillStyle_NONE )); // set auto-styles for Legend const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext(); if( pStylesCtxt ) { const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext( mrImportHelper.GetChartFamilyID(), sAutoStyleName ); if( pStyle && pStyle->ISA( XMLPropStyleContext )) (( XMLPropStyleContext* )pStyle )->FillPropertySet( xLegendProps ); } } SchXMLLegendContext::~SchXMLLegendContext() { }
37.535398
142
0.642108
[ "model", "solid" ]
832738e34a105555645a3922f708403fe2ba593a
1,583
hpp
C++
inc/jLogStd.hpp
gnarrf95/libjaycpp
a835d7e61aa2de8e070fe73005a5b09a3a0df6fa
[ "MIT" ]
1
2021-02-16T14:23:50.000Z
2021-02-16T14:23:50.000Z
inc/jLogStd.hpp
gnarrf95/libjaycpp
a835d7e61aa2de8e070fe73005a5b09a3a0df6fa
[ "MIT" ]
null
null
null
inc/jLogStd.hpp
gnarrf95/libjaycpp
a835d7e61aa2de8e070fe73005a5b09a3a0df6fa
[ "MIT" ]
null
null
null
/** * @file jLogStd.hpp * @author Manuel Nadji (https://github.com/gnarrf95) * * @brief An implementation of jLog, that uses iostream for output. * * Logs directly to the terminal output. * * @date 2021-02-16 * @copyright Copyright (c) 2020 by Manuel Nadji * */ #ifndef INCLUDE_JLOGSTD_HPP #define INCLUDE_JLOGSTD_HPP #include <jLog.hpp> namespace jCPP { /** * @brief Derived class of jLog. * */ class jLogStd : public jLog { public: /** * @brief Construct a new jLogStd object. * */ jLogStd(); /** * @brief Destroy the jLogStd object. * */ ~jLogStd(); /** * @brief Log simple message to output. * * @param log_type Type of log message. * @param msg Message to display. */ void log(logType_t log_type, const char *msg); /** * @brief Log message with source code information to output. * * @param log_type Type of message. * @param file File in which log was called. * @param function Function in which log was called. * @param line Line number on which log was called. * @param msg Message to display. */ void log_sc(logType_t log_type, const char *file, const char *function, const int line, const char *msg); }; } #endif /* INCLUDE_JLOGSTD_HPP */
25.532258
117
0.515477
[ "object" ]
833ff1473c21acda0246dcbf4373155c9d3886c7
4,263
cpp
C++
atcoder/cf16/i/I.cpp
metaflow/contests
5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2
[ "MIT" ]
1
2019-05-12T23:41:00.000Z
2019-05-12T23:41:00.000Z
atcoder/cf16/i/I.cpp
metaflow/contests
5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2
[ "MIT" ]
null
null
null
atcoder/cf16/i/I.cpp
metaflow/contests
5e9ffcb72c3e7da54b5e0818b1afa59f5778ffa2
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> #if defined(LOCAL) #include "prettyprint.h" #endif using namespace std; using vi = vector<int>; using vvi = vector<vi>; using ii = pair<int,int>; using vii = vector<ii>; using l = long long; using vl = vector<l>; using vvl = vector<vl>; using ll = pair<l,l>; using vll = vector<ll>; using vvll = vector<vll>; using lu = unsigned long long; using vb = vector<bool>; using vvb = vector<vb>; using vd = vector<double>; using vvd = vector<vd>; const int INF = numeric_limits<int>::max(); const double EPS = 1e-10; static constexpr auto PI = acos(-1); const l e0=1, e3=1000, e5=100000, e6=10*e5, e7=10*e6, e8=10*e7, e9=10*e8; const char lf = '\n'; #define all(x) begin(x), end(x) #define F(a,b,c) for (l a = l(b); a < l(c); a++) #define B(a,b,c) for (l a = l(b); a > l(c); a--) #if defined(LOCAL) const bool enable_log = true; #else const bool enable_log = false; #endif struct VoidStream { void operator&(std::ostream&) { } }; #define LOG !(enable_log) ? (void) 0 : VoidStream() & cerr l sign(l n) { if (n < 0) return -1; if (n == 0) return 0; return 1; } // conruent modulo, works for negative l cong(l x, l mod) { return (x % mod + mod) % mod; } // (a * b) % mod, safe for l near max l mult_mod(l a, l b, l mod) { l x = 0; while (b) { if (b % 2) x = (x + a) % mod; a = (a * 2) % mod; b /= 2; } return x; } // (base^power) % mod, safe for l near max l pow_mod(l base, l power, l mod) { l r = 1; while (power) { if (power % 2) r = mult_mod(r, base, mod); base = mult_mod(base, base, mod); power /= 2; } return r; } l divup(l a, l b) { // ceil div return (a + b - 1) / b; } // return gcd(a, b) and set x, y: a * x + b * y = gcd(a, b) l extended_euclid(l a, l b, l& x, l& y) { if (b == 0) { x = 1; y = 0; return a; } l d = extended_euclid(b, a % b, x, y); l t = y; y = x - (a / b) * y; x = t; return d; } // return b: a * b = 1 (mod n) l inverse_mod(l a, l n) { l x, y; l d = extended_euclid(a, n, x, y); if (d != 1) return 0; return cong(x, n); } // single combintions k from n l nCr(l n, l k, l mod) { l a = 1; for (l i = n; i > n - k; i--) a = mult_mod(a, i, mod); l b = 1; F(i, 1, k + 1) b = mult_mod(b, i, mod); b = inverse_mod(b, mod); return mult_mod(a, b, mod); } // precompute all combinations up to (n n) vvl combinations(l n, l mod) { vvl c(n + 1, vl(n + 1)); F(i, 0, n) { c[i][0] = 1; F(j, 1, i + 1) { c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod; } } return c; } void f(vb& active, vl& xx, vl& yy, vl& angles) { l n = active.size(); l a = n - 1; while (not active[a]) a--; l b = a, c = a, d = 0; while (not active[d]) d++; while (not (a != b and b != c and angles[b] + angles[c] == 0)) { a = b; b = c; c = d; d = (d + 1) % n; while (not active[d]) d = (d + 1) % n; if (d < c) break; } if (angles[b] + angles[c] == 0) { active[b] = false; active[c] = false; f(active, xx, yy, angles); l m = 0; F(i, 0, n) { xx[i] = xx[i] << 1; m = max(m, xx[i]); } F(i, 0, n) { yy[i] = yy[i] << 1; m = max(m, yy[i]); } l dx = sign(xx[d] - xx[a]); l dy = sign(yy[d] - yy[a]); xx[b] = xx[a] + dx; yy[b] = yy[a] + dy; swap(dx, dy); if (angles[b] == 1) {dx = -dx;} else {dy = -dy;} xx[c] = xx[b] + dx; yy[c] = yy[b] + dy; xx[d] += dx; yy[d] += dy; if (m > e8) { map<l,l> mx, my; for (auto i : xx) mx[i] = i; l t = 0; for (auto& kv : mx) kv.second = t++; for (auto& x : xx) x = mx[x]; for (auto i : yy) my[i] = i; t = 0; for (auto& kv : my) kv.second = t++; for (auto& y : yy) y = my[y]; } } else { assert(a < b); xx[a] = 0; yy[a] = 0; xx[b] = 1; yy[b] = 0; xx[c] = 1; yy[c] = 1; xx[d] = 0; yy[d] = 1; } } int main() { ios_base::sync_with_stdio(false); cin.tie(0); l n; while (cin >> n) { vl angles(n); F(i, 0, n) { l x; cin >> x; angles[i] = (x == 90) ? 1 : -1; } l t = accumulate(all(angles), 0); if (t == 4) { vb active(n, true); vl xx(n), yy(n); f(active, xx, yy, angles); F(i, 0, n) cout << xx[i] << ' ' << yy[i] << lf; } else { cout << -1 << lf; } } }
23.815642
73
0.483228
[ "vector" ]
83440b868cc83203cee2ce3268bae0b14964eafc
30,386
cpp
C++
hackathon/affine_transform/main_affinetransform.cpp
zzhmark/vaa3d_tools
3ca418add85a59ac7e805d55a600b78330d7e53d
[ "MIT" ]
1
2021-12-27T19:14:03.000Z
2021-12-27T19:14:03.000Z
hackathon/affine_transform/main_affinetransform.cpp
zzhmark/vaa3d_tools
3ca418add85a59ac7e805d55a600b78330d7e53d
[ "MIT" ]
1
2016-12-03T05:33:13.000Z
2016-12-03T05:33:13.000Z
hackathon/affine_transform/main_affinetransform.cpp
zzhmark/vaa3d_tools
3ca418add85a59ac7e805d55a600b78330d7e53d
[ "MIT" ]
null
null
null
//main_affinetransform.cpp //affine transfer the image based on the given point sets // by Lei Qu //2010-03-17 #include <QtGui> #include <stdio.h> #include <unistd.h> extern char *optarg; extern int optind, opterr; #include <vector> using namespace std; #define WANT_STREAM #include "../../v3d_main/jba/newmat11/newmatap.h" #include "../../v3d_main/jba/newmat11/newmatio.h" #include "../../v3d_main/basic_c_fun/stackutil.h" #include "../../v3d_main/basic_c_fun/basic_surf_objs.h" #include "../../v3d_main/basic_c_fun/basic_memory.cpp"//note: should not include .h file, since they are template functions #include "../../v3d_main/jba/c++/convert_type2uint8.h" class Coord3D_PCM { public: double x,y,z; Coord3D_PCM(double x0,double y0,double z0) {x=x0;y=y0;z=z0;} Coord3D_PCM() {x=y=z=0;} }; void printHelp(); //convert input image from 16bit to 8bit and rescale to [0~255] bool q_imgconvertscale_16bit_2_8bit(unsigned char *&p_img,const long *sz_img); //centrilize and scale the point set bool q_normalize_points_2D(const vector<Coord3D_PCM> vec_input,vector<Coord3D_PCM> &vec_output,Matrix &x3x3_normalize); bool q_normalize_points_3D(const vector<Coord3D_PCM> vec_input,vector<Coord3D_PCM> &vec_output,Matrix &x4x4_normalize); //compute the affine matraix //B=T*A bool q_affine_compute_affinmatrix_2D(const vector<Coord3D_PCM> &arr_A,const vector<Coord3D_PCM> &arr_B,Matrix &x3x3_affinematrix); bool q_affine_compute_affinmatrix_3D(const vector<Coord3D_PCM> &arr_A,const vector<Coord3D_PCM> &arr_B,Matrix &x4x4_affinematrix); int main(int argc, char *argv[]) { if(argc<=1) { printHelp(); return 0; } //------------------------------------------------------------------------------------------------------------------------------------ //read arguments // QString qs_filename_marker_tar ="/Volumes/MyBook/Wayne/clones/brain_003.tif.marker"; // QString qs_filename_marker_sub ="/Volumes/MyBook/Wayne/clones/brain_001.tif.marker"; // QString qs_filename_img_sub ="/Volumes/MyBook/Wayne/clones/brain_001.tif"; // QString qs_filename_img_sub2tar ="sub2tar.tif"; // int n_how2affine =0; // long sz_img_output[4] ={957,957,149,3};//whzc QString qs_filename_marker_tar =NULL; QString qs_filename_marker_sub =NULL; QString qs_filename_img_sub =NULL; QString qs_filename_img_sub2tar =NULL; int n_how2affine =0;//0:estimate affine only based on the XY information of pointset, 1: based on the XYZ information long sz_img_output[4] ={0,0,0,0};//whzc int c; static char optstring[]="ht:s:S:o:f:W:H:Z:"; opterr=0; while((c=getopt(argc,argv,optstring))!=-1) { switch (c) { case 'h': printHelp (); return 0; break; case 't': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -t.\n"); return 1; } qs_filename_marker_tar.append(optarg); break; case 's': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -s.\n"); return 1; } qs_filename_marker_sub.append(optarg); break; case 'S': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -S.\n"); return 1; } qs_filename_img_sub.append(optarg); break; case 'o': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -o.\n"); return 1; } qs_filename_img_sub2tar.append(optarg); break; case 'f': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -f.\n"); return 1; } n_how2affine=atoi(optarg); break; case 'W': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -W.\n"); return 1; } sz_img_output[0]=atoi(optarg); break; case 'H': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -H.\n"); return 1; } sz_img_output[1]=atoi(optarg); break; case 'Z': if (strcmp (optarg, "(null)") == 0 || optarg[0] == '-') { fprintf (stderr, "Found illegal or NULL parameter for the option -Z.\n"); return 1; } sz_img_output[2]=atoi(optarg); break; case '?': fprintf (stderr, "Unknown option `-%c' or incomplete argument lists.\n", optopt); return 1; break; } } printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); printf(">>Image affine transformation:\n"); printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); printf(">>input parameters:\n"); printf(">> input target marker/swc: %s\n",qPrintable(qs_filename_marker_tar)); printf(">> input subject markerswc: %s\n",qPrintable(qs_filename_marker_sub)); printf(">> input subject image: %s\n",qPrintable(qs_filename_img_sub)); printf(">> input how2affine: %d\n",n_how2affine); printf(">>-------------------------\n"); printf(">>output parameters:\n"); printf(">> output sub2tar image: %s\n",qPrintable(qs_filename_img_sub2tar)); printf(">> output image size: [%d,%d,%d]\n",sz_img_output[0],sz_img_output[1],sz_img_output[2]); printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); //------------------------------------------------------------------------------------------------------------------------------------ printf("1. Read target and subject marker/swc files. \n"); QList<ImageMarker> ql_marker_tar,ql_marker_sub; vector<Coord3D_PCM> vec_tar,vec_sub; NeuronTree ql_swc_tar,ql_swc_sub; if(qs_filename_marker_tar.endsWith(".marker") && qs_filename_marker_sub.endsWith(".marker")) { ql_marker_tar=readMarker_file(qs_filename_marker_tar); ql_marker_sub=readMarker_file(qs_filename_marker_sub); printf("\t>>read %d markers from [%s]\n",ql_marker_tar.size(),qPrintable(qs_filename_marker_tar)); printf("\t>>read %d markers from [%s]\n",ql_marker_sub.size(),qPrintable(qs_filename_marker_sub)); for(long i=0;i<ql_marker_tar.size();i++) { vec_tar.push_back(Coord3D_PCM(ql_marker_tar[i].x,ql_marker_tar[i].y,ql_marker_tar[i].z)); } for(long i=0;i<ql_marker_sub.size();i++) { vec_sub.push_back(Coord3D_PCM(ql_marker_sub[i].x,ql_marker_sub[i].y,ql_marker_sub[i].z)); } } else if(qs_filename_marker_tar.endsWith(".swc") && qs_filename_marker_sub.endsWith(".swc")) { ql_swc_tar=readSWC_file(qs_filename_marker_tar); ql_swc_sub=readSWC_file(qs_filename_marker_sub); printf("\t>>read %d markers from [%s]\n",ql_swc_tar.listNeuron.size(),qPrintable(qs_filename_marker_tar)); printf("\t>>read %d markers from [%s]\n",ql_swc_sub.listNeuron.size(),qPrintable(qs_filename_marker_sub)); for(long i=0;i<ql_swc_tar.listNeuron.size();i++) { vec_tar.push_back(Coord3D_PCM(ql_swc_tar.listNeuron.at(i).x,ql_swc_tar.listNeuron.at(i).y,ql_swc_tar.listNeuron.at(i).z)); } for(long i=0;i<ql_swc_sub.listNeuron.size();i++) { vec_sub.push_back(Coord3D_PCM(ql_swc_sub.listNeuron.at(i).x,ql_swc_sub.listNeuron.at(i).y,ql_swc_sub.listNeuron.at(i).z)); } } else { printf("ERROR: at least one marker file is invalid.\n"); return false; } //reorganize the markers to the format needed by q_affine_compute_affinmatrix_2D() //------------------------------------------------------------------------------------------------------------------------------------ printf("2. estimate the affine matrix. \n"); //2D: estimate the affine matrix only based on the xy coordinate of the pointset Matrix x3x3_affinematrix; Matrix x4x4_affinematrix; if(n_how2affine==0) { if(!q_affine_compute_affinmatrix_2D(vec_tar,vec_sub,x3x3_affinematrix)) { printf("ERROR: q_affine_compute_affinmatrix_2D() return false.\n"); return false; } } //3D: estimate the affine matrix only based on the xyz coordinate of the pointset else if(n_how2affine==1) { if(!q_affine_compute_affinmatrix_3D(vec_tar,vec_sub,x4x4_affinematrix)) { printf("ERROR: q_affine_compute_affinmatrix_2D() return false.\n"); return false; } } //------------------------------------------------------------------------------------------------------------------------------------ printf("3. Read subject image. \n"); unsigned char *p_img_sub=0; long *sz_img_sub=0; int datatype_sub=0; if(!loadImage((char *)qPrintable(qs_filename_img_sub),p_img_sub,sz_img_sub,datatype_sub)) { printf("ERROR: loadImage() return false in loading [%s].\n", qPrintable(qs_filename_img_sub)); return false; } printf("\t>>read image file [%s] complete.\n",qPrintable(qs_filename_img_sub)); printf("\t\timage size: [w=%ld, h=%ld, z=%ld, c=%ld]\n",sz_img_sub[0],sz_img_sub[1],sz_img_sub[2],sz_img_sub[3]); printf("\t\tdatatype: %d\n",datatype_sub); //if image is 16bit, convert to 8bit if(datatype_sub==2) { printf("\t>>convert image from 16bits to 8bits\n"); if(!q_imgconvertscale_16bit_2_8bit(p_img_sub,sz_img_sub)) { printf("ERROR: q_imgconvertscale_16bit_2_8bit() return false.\n"); if(p_img_sub) {delete []p_img_sub; p_img_sub=0;} if(sz_img_sub) {delete []sz_img_sub; sz_img_sub=0;} return false; } } else if(datatype_sub>2) { printf("ERROR: datatype>2 !.\n"); if(p_img_sub) {delete []p_img_sub; p_img_sub=0;} if(sz_img_sub) {delete []sz_img_sub; sz_img_sub=0;} return false; } //------------------------------------------------------------------------------------------------------------------------------------ printf("4. Affine transform the subject image to target. \n"); //assign output/warp image size if(sz_img_output[0]==0) sz_img_output[0]=sz_img_sub[0]; if(sz_img_output[1]==0) sz_img_output[1]=sz_img_sub[1]; if(sz_img_output[2]==0) sz_img_output[2]=sz_img_sub[2]; sz_img_output[3]=sz_img_sub[3]; //allocate memory unsigned char *p_img_sub2tar=0; p_img_sub2tar=new unsigned char[sz_img_output[0]*sz_img_output[1]*sz_img_output[2]*sz_img_output[3]]; if(!p_img_sub2tar) { printf("ERROR: Fail to allocate memory for p_img_sub2tar.\n"); if(p_img_sub) {delete []p_img_sub; p_img_sub=0;} if(sz_img_sub) {delete []sz_img_sub; sz_img_sub=0;} return false; } unsigned char ****p_img_sub_4d=0,****p_img_sub2tar_4d=0; if(!new4dpointer(p_img_sub_4d,sz_img_sub[0],sz_img_sub[1],sz_img_sub[2],sz_img_sub[3],p_img_sub) || !new4dpointer(p_img_sub2tar_4d,sz_img_output[0],sz_img_output[1],sz_img_output[2],sz_img_output[3],p_img_sub2tar)) { printf("ERROR: Fail to allocate memory for the 4d pointer of image.\n"); if(p_img_sub) {delete []p_img_sub; p_img_sub=0;} if(p_img_sub2tar) {delete []p_img_sub2tar; p_img_sub2tar=0;} if(p_img_sub_4d) {delete4dpointer(p_img_sub_4d,sz_img_sub[0],sz_img_sub[1],sz_img_sub[2],sz_img_sub[3]);} if(p_img_sub2tar_4d) {delete4dpointer(p_img_sub2tar_4d,sz_img_output[0],sz_img_output[1],sz_img_output[2],sz_img_output[3]);} if(sz_img_sub) {delete []sz_img_sub; sz_img_sub=0;} return false; } //affine transform the subject image to target (inverse projection + linear interpolation) if(n_how2affine==0) //2D { Matrix x_pt_sub2tar_homo(3,1),x_pt_sub_homo(3,1); for(long x=0;x<sz_img_output[0];x++) for(long y=0;y<sz_img_output[1];y++) { //compute the inverse projected coordinate in subject image x_pt_sub2tar_homo(1,1)=x; x_pt_sub2tar_homo(2,1)=y; x_pt_sub2tar_homo(3,1)=1.0; x_pt_sub_homo=x3x3_affinematrix*x_pt_sub2tar_homo; //------------------------------------------------------------------ //linear interpolate for(long z=0;z<sz_img_output[2];z++) { //coordinate in subject image double cur_pos[3];//x,y,z cur_pos[0]=x_pt_sub_homo(1,1); cur_pos[1]=x_pt_sub_homo(2,1); cur_pos[2]=z; //if interpolate pixel is out of subject image region, set to 0 if(cur_pos[0]<0 || cur_pos[0]>sz_img_sub[0]-1 || cur_pos[1]<0 || cur_pos[1]>sz_img_sub[1]-1 || cur_pos[2]<0 || cur_pos[2]>sz_img_sub[2]-1) { p_img_sub2tar_4d[0][z][y][x]=0.0; continue; } //find 8 neighor pixels boundary long x_s,x_b,y_s,y_b,z_s,z_b; x_s=floor(cur_pos[0]); x_b=ceil(cur_pos[0]); y_s=floor(cur_pos[1]); y_b=ceil(cur_pos[1]); z_s=floor(cur_pos[2]); z_b=ceil(cur_pos[2]); //compute weight for left and right, top and bottom -- 4 neighbor pixel's weight in a slice double l_w,r_w,t_w,b_w; l_w=1.0-(cur_pos[0]-x_s); r_w=1.0-l_w; t_w=1.0-(cur_pos[1]-y_s); b_w=1.0-t_w; //compute weight for higer slice and lower slice double u_w,d_w; u_w=1.0-(cur_pos[2]-z_s); d_w=1.0-u_w; //linear interpolate each channel for(long c=0;c<sz_img_output[3];c++) { //linear interpolate in higher slice [t_w*(l_w*lt+r_w*rt)+b_w*(l_w*lb+r_w*rb)] double higher_slice; higher_slice=t_w*(l_w*p_img_sub_4d[c][z_s][y_s][x_s]+r_w*p_img_sub_4d[c][z_s][y_s][x_b])+ b_w*(l_w*p_img_sub_4d[c][z_s][y_b][x_s]+r_w*p_img_sub_4d[c][z_s][y_b][x_b]); //linear interpolate in lower slice [t_w*(l_w*lt+r_w*rt)+b_w*(l_w*lb+r_w*rb)] double lower_slice; lower_slice =t_w*(l_w*p_img_sub_4d[c][z_b][y_s][x_s]+r_w*p_img_sub_4d[c][z_b][y_s][x_b])+ b_w*(l_w*p_img_sub_4d[c][z_b][y_b][x_s]+r_w*p_img_sub_4d[c][z_b][y_b][x_b]); //linear interpolate the current position [u_w*higher_slice+d_w*lower_slice] p_img_sub2tar_4d[c][z][y][x]=u_w*higher_slice+d_w*lower_slice; } } } } else if(n_how2affine==1) //3D { Matrix x_pt_sub2tar_homo(4,1),x_pt_sub_homo(4,1); for(long x=0;x<sz_img_output[0];x++) for(long y=0;y<sz_img_output[1];y++) for(long z=0;z<sz_img_output[2];z++) { //compute the inverse projected coordinate in subject image x_pt_sub2tar_homo(1,1)=x; x_pt_sub2tar_homo(2,1)=y; x_pt_sub2tar_homo(3,1)=z; x_pt_sub2tar_homo(4,1)=1.0; x_pt_sub_homo=x4x4_affinematrix*x_pt_sub2tar_homo; //------------------------------------------------------------------ //linear interpolate //coordinate in subject image double cur_pos[3];//x,y,z cur_pos[0]=x_pt_sub_homo(1,1); cur_pos[1]=x_pt_sub_homo(2,1); cur_pos[2]=x_pt_sub_homo(3,1); //if interpolate pixel is out of subject image region, set to -inf if(cur_pos[0]<0 || cur_pos[0]>sz_img_sub[0]-1 || cur_pos[1]<0 || cur_pos[1]>sz_img_sub[1]-1 || cur_pos[2]<0 || cur_pos[2]>sz_img_sub[2]-1) { p_img_sub2tar_4d[0][z][y][x]=0.0; continue; } //find 8 neighor pixels boundary long x_s,x_b,y_s,y_b,z_s,z_b; x_s=floor(cur_pos[0]); x_b=ceil(cur_pos[0]); y_s=floor(cur_pos[1]); y_b=ceil(cur_pos[1]); z_s=floor(cur_pos[2]); z_b=ceil(cur_pos[2]); //compute weight for left and right, top and bottom -- 4 neighbor pixel's weight in a slice double l_w,r_w,t_w,b_w; l_w=1.0-(cur_pos[0]-x_s); r_w=1.0-l_w; t_w=1.0-(cur_pos[1]-y_s); b_w=1.0-t_w; //compute weight for higer slice and lower slice double u_w,d_w; u_w=1.0-(cur_pos[2]-z_s); d_w=1.0-u_w; //linear interpolate each channel for(long c=0;c<sz_img_output[3];c++) { //linear interpolate in higher slice [t_w*(l_w*lt+r_w*rt)+b_w*(l_w*lb+r_w*rb)] double higher_slice; higher_slice=t_w*(l_w*p_img_sub_4d[c][z_s][y_s][x_s]+r_w*p_img_sub_4d[c][z_s][y_s][x_b])+ b_w*(l_w*p_img_sub_4d[c][z_s][y_b][x_s]+r_w*p_img_sub_4d[c][z_s][y_b][x_b]); //linear interpolate in lower slice [t_w*(l_w*lt+r_w*rt)+b_w*(l_w*lb+r_w*rb)] double lower_slice; lower_slice =t_w*(l_w*p_img_sub_4d[c][z_b][y_s][x_s]+r_w*p_img_sub_4d[c][z_b][y_s][x_b])+ b_w*(l_w*p_img_sub_4d[c][z_b][y_b][x_s]+r_w*p_img_sub_4d[c][z_b][y_b][x_b]); //linear interpolate the current position [u_w*higher_slice+d_w*lower_slice] p_img_sub2tar_4d[c][z][y][x]=u_w*higher_slice+d_w*lower_slice; } } } //------------------------------------------------------------------------------------------------------------------------------------ printf("5. Save results. \n"); saveImage(qPrintable(qs_filename_img_sub2tar),p_img_sub2tar,sz_img_output,1); //------------------------------------------------------------------------------------------------------------------------------------ printf("6. free memory. \n"); if(p_img_sub_4d) {delete4dpointer(p_img_sub_4d,sz_img_sub[0],sz_img_sub[1],sz_img_sub[2],sz_img_sub[3]);} if(p_img_sub2tar_4d) {delete4dpointer(p_img_sub2tar_4d,sz_img_output[0],sz_img_output[1],sz_img_output[2],sz_img_output[3]);} if(p_img_sub) {delete []p_img_sub; p_img_sub=0;} if(p_img_sub2tar) {delete []p_img_sub2tar; p_img_sub2tar=0;} if(sz_img_sub) {delete []sz_img_sub; sz_img_sub=0;} return true; } //Printing Help of Usage of this Program void printHelp() { //pirnt help messages printf("\nUsage: main_affinetranform -t <markerFilename_target> -s <markerFilename_subject> -S <imageFilename_sub> -o <imageFilename_sub2tar>\n"); printf("\t -t <markerFilename_target> input target marker file full name.\n"); printf("\t -s <markerFilename_subject> input subject marker file full name.\n"); printf("\t -S <imageFilename_sub> input subject image file full name.\n"); printf("\t -o <imageFilename_sub2tar> output sub2tar warped image file full name.\n"); printf("\t -f <how2estimate_affine> assign what information is used to estimate affine transform\n"); printf("\t 0: only use XY information of pointset to estimate the affine transform\n"); printf("\t all Z planes share the same transformation\n"); printf("\t 1: use XYZ information of pointset to estimate the affine transform\n"); printf("\t [-W] <outputimg_width> assign the width of output image (default same as subject image size)\n"); printf("\t [-H] <outputimg_height> assign the height of output image (default same as subject image size)\n"); printf("\t [-Z] <outputimg_z> assign the z of output image (default same as subject image size)\n"); printf("\n"); printf("\t [-h] print this message.\n"); return; } //convert input image from 16bit to 8bit and rescale to [0~255] bool q_imgconvertscale_16bit_2_8bit(unsigned char *&p_img,const long *sz_img) { long l_npixels=sz_img[0]*sz_img[1]*sz_img[2]*sz_img[3]; unsigned char * img_subject_tmp=0; img_subject_tmp=new unsigned char[l_npixels]; if(!img_subject_tmp) { printf("ERROR: Fail to allocate memory for convert 16bit data to 8 bit. Do nothing. \n"); return false; } double min,max; if(!rescale_to_0_255_and_copy((unsigned short int *)p_img, l_npixels, min, max, img_subject_tmp)) { printf("ERROR: rescale_to_0_255_and_copy() return false.\n"); if(img_subject_tmp) {delete []img_subject_tmp; img_subject_tmp=0;} return false; } delete []p_img; p_img=img_subject_tmp; return true; } //centrilize and scale the point set // xn = T*x; // x: every column represent a point [2/3*N] bool q_normalize_points_2D(const vector<Coord3D_PCM> vec_input,vector<Coord3D_PCM> &vec_output,Matrix &x3x3_normalize) { //check parameters if(vec_input.size()<=0) { fprintf(stderr,"ERROR: Input array is null! \n"); return false; } if(!vec_output.empty()) vec_output.clear(); vec_output=vec_input; if(x3x3_normalize.nrows()!=3 || x3x3_normalize.ncols()!=3) { x3x3_normalize.ReSize(3,3); } //compute the centriod of input point set Coord3D_PCM cord_centroid; int n_point=vec_input.size(); for(int i=0;i<n_point;i++) { cord_centroid.x+=vec_input[i].x; cord_centroid.y+=vec_input[i].y; } cord_centroid.x/=n_point; cord_centroid.y/=n_point; //center the point set for(int i=0;i<n_point;i++) { vec_output[i].x-=cord_centroid.x; vec_output[i].y-=cord_centroid.y; } //compute the average distance of every point to the origin double d_point2o=0,d_point2o_avg=0; for(int i=0;i<n_point;i++) { d_point2o=sqrt(vec_output[i].x*vec_output[i].x+vec_output[i].y*vec_output[i].y); d_point2o_avg+=d_point2o; } d_point2o_avg/=n_point; //compute the scale factor double d_scale_factor=1.0/d_point2o_avg; //scale the point set for(int i=0;i<n_point;i++) { vec_output[i].x*=d_scale_factor; vec_output[i].y*=d_scale_factor; } //compute the transformation matrix // 1 row x3x3_normalize(1,1)=d_scale_factor; x3x3_normalize(1,2)=0; x3x3_normalize(1,3)=-d_scale_factor*cord_centroid.x; // 2 row x3x3_normalize(2,1)=0; x3x3_normalize(2,2)=d_scale_factor; x3x3_normalize(2,3)=-d_scale_factor*cord_centroid.y; // 3 row x3x3_normalize(3,1)=0; x3x3_normalize(3,2)=0; x3x3_normalize(3,3)=1; return true; } bool q_normalize_points_3D(const vector<Coord3D_PCM> vec_input,vector<Coord3D_PCM> &vec_output,Matrix &x4x4_normalize) { //check parameters if(vec_input.size()<=0) { fprintf(stderr,"ERROR: Input array is null! \n"); return false; } if(!vec_output.empty()) vec_output.clear(); vec_output=vec_input; if(x4x4_normalize.nrows()!=4 || x4x4_normalize.ncols()!=4) { x4x4_normalize.ReSize(4,4); } //compute the centriod of input point set Coord3D_PCM cord_centroid; int n_point=vec_input.size(); for(int i=0;i<n_point;i++) { cord_centroid.x+=vec_input[i].x; cord_centroid.y+=vec_input[i].y; cord_centroid.z+=vec_input[i].z; } cord_centroid.x/=n_point; cord_centroid.y/=n_point; cord_centroid.z/=n_point; //center the point set for(int i=0;i<n_point;i++) { vec_output[i].x-=cord_centroid.x; vec_output[i].y-=cord_centroid.y; vec_output[i].z-=cord_centroid.z; } //compute the average distance of every point to the origin double d_point2o=0,d_point2o_avg=0; for(int i=0;i<n_point;i++) { d_point2o=sqrt(vec_output[i].x*vec_output[i].x+vec_output[i].y*vec_output[i].y+vec_output[i].z*vec_output[i].z); d_point2o_avg+=d_point2o; } d_point2o_avg/=n_point; //compute the scale factor double d_scale_factor=1.0/d_point2o_avg; //scale the point set for(int i=0;i<n_point;i++) { vec_output[i].x*=d_scale_factor; vec_output[i].y*=d_scale_factor; vec_output[i].z*=d_scale_factor; } //compute the transformation matrix // 1 row x4x4_normalize(1,1)=d_scale_factor; x4x4_normalize(1,2)=0; x4x4_normalize(1,3)=0; x4x4_normalize(1,4)=-d_scale_factor*cord_centroid.x; // 2 row x4x4_normalize(2,1)=0; x4x4_normalize(2,2)=d_scale_factor; x4x4_normalize(2,3)=0; x4x4_normalize(2,4)=-d_scale_factor*cord_centroid.y; // 3 row x4x4_normalize(3,1)=0; x4x4_normalize(3,2)=0; x4x4_normalize(3,3)=d_scale_factor; x4x4_normalize(3,4)=-d_scale_factor*cord_centroid.z; // 4 row x4x4_normalize(4,1)=0; x4x4_normalize(4,2)=0; x4x4_normalize(4,3)=0; x4x4_normalize(4,4)=1; return true; } //compute the affine matraix // B=T*A bool q_affine_compute_affinmatrix_2D(const vector<Coord3D_PCM> &vec_A,const vector<Coord3D_PCM> &vec_B,Matrix &x3x3_affinematrix) { //check parameters if(vec_A.size()<3 || vec_A.size()!=vec_B.size()) { fprintf(stderr,"ERROR: Invalid input parameters! \n"); return false; } if(x3x3_affinematrix.nrows()!=3 || x3x3_affinematrix.ncols()!=3) { x3x3_affinematrix.ReSize(3,3); } //normalize point set vector<Coord3D_PCM> vec_A_norm,vec_B_norm; Matrix x3x3_normalize_A(4,4),x3x3_normalize_B(4,4); vec_A_norm=vec_A; vec_B_norm=vec_B; q_normalize_points_2D(vec_A,vec_A_norm,x3x3_normalize_A); q_normalize_points_2D(vec_B,vec_B_norm,x3x3_normalize_B); // fill matrix A // // | h1, h2, h3 | |x1| |x2| // | h4, h5, h6 | * |y1|=|y2| <=> // | 0 , 0, 1 | |1 | |1 | // // |x1, y1, 1, 0, 0, 0, -x2 | // | 0, 0, 0, x1, y1, 1, -y2 | * |h1,h2,h3,h4,h5,h6,h7|=0 // int n_point=vec_A.size(); Matrix A(2*n_point,7); int row=1; for(int i=0;i<n_point;i++) { A(row,1)=vec_A_norm[i].x; A(row,2)=vec_A_norm[i].y; A(row,3)=1.0; A(row,4)=0.0; A(row,5)=0.0; A(row,6)=0.0; A(row,7)=-vec_B_norm[i].x; A(row+1,1)=0.0; A(row+1,2)=0.0; A(row+1,3)=0.0; A(row+1,4)=vec_A_norm[i].x; A(row+1,5)=vec_A_norm[i].y; A(row+1,6)=1.0; A(row+1,7)=-vec_B_norm[i].y; row+=2; } //compute T --> bug? SVD in newmat need row>=col? DiagonalMatrix D; Matrix U,V; SVD(A,D,U,V); //A = U * D * V.t() Matrix h=V.column(7); //A*h=0 if(D(6,6)==0) //degenerate case { x3x3_affinematrix=0.0; //check with A.is_zero() printf("Degenerate singular values in SVD! \n"); // return false; } //de-homo for(int i=1;i<=7;i++) { h(i,1) /= h(7,1); } //reshape h:7*1 to 3*3 matrix x3x3_affinematrix(1,1)=h(1,1); x3x3_affinematrix(1,2)=h(2,1); x3x3_affinematrix(1,3)=h(3,1); x3x3_affinematrix(2,1)=h(4,1); x3x3_affinematrix(2,2)=h(5,1); x3x3_affinematrix(2,3)=h(6,1); x3x3_affinematrix(3,1)=0.0; x3x3_affinematrix(3,2)=0.0; x3x3_affinematrix(3,3)=1.0; //denormalize x3x3_affinematrix=x3x3_normalize_B.i()*x3x3_affinematrix*x3x3_normalize_A; return true; } bool q_affine_compute_affinmatrix_3D(const vector<Coord3D_PCM> &vec_A,const vector<Coord3D_PCM> &vec_B,Matrix &x4x4_affinematrix) { //check parameters if(vec_A.size()<4 || vec_A.size()!=vec_B.size()) { fprintf(stderr,"ERROR: Invalid input parameters! \n"); return false; } if(x4x4_affinematrix.nrows()!=4 || x4x4_affinematrix.ncols()!=4) { x4x4_affinematrix.ReSize(4,4); } //normalize point set vector<Coord3D_PCM> vec_A_norm,vec_B_norm; Matrix x4x4_normalize_A(4,4),x4x4_normalize_B(4,4); vec_A_norm=vec_A; vec_B_norm=vec_B; q_normalize_points_3D(vec_A,vec_A_norm,x4x4_normalize_A); q_normalize_points_3D(vec_B,vec_B_norm,x4x4_normalize_B); //fill matrix A // // | h1, h2, h3, h4 | |x1| |x2| // | h5, h6, h7, h8 | * |y1|=|y2| <=> // | h9, h10,h11,h12| |z1| |z2| // | 0 , 0, 0, 1 | |1 | |1 | // // |x1, y1, z1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -x2 | // | 0, 0, 0, 0, x1, y1, z1, 1, 0, 0, 0, 0, -y2 | * |h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13|=0 // | 0, 0, 0, 0, 0, 0, 0, 0, 0, x1, y1, z1, 1, -z2 | int n_point=vec_A.size(); Matrix A(3*n_point,13); int row=1; for(int i=0;i<n_point;i++) { A(row,1)=vec_A_norm[i].x; A(row,2)=vec_A_norm[i].y; A(row,3)=vec_A_norm[i].z; A(row,4)=1.0; A(row,5)=0.0; A(row,6)=0.0; A(row,7)=0.0; A(row,8)=0.0; A(row,9)=0.0; A(row,10)=0.0; A(row,11)=0.0; A(row,12)=0.0; A(row,13)=-vec_B_norm[i].x; A(row+1,1)=0.0; A(row+1,2)=0.0; A(row+1,3)=0.0; A(row+1,4)=0.0; A(row+1,5)=vec_A_norm[i].x; A(row+1,6)=vec_A_norm[i].y; A(row+1,7)=vec_A_norm[i].z; A(row+1,8)=1.0; A(row+1,9)=0.0; A(row+1,10)=0.0; A(row+1,11)=0.0; A(row+1,12)=0.0; A(row+1,13)=-vec_B_norm[i].y; A(row+2,1)=0.0; A(row+2,2)=0.0; A(row+2,3)=0.0; A(row+2,4)=0.0; A(row+2,5)=0.0; A(row+2,6)=0.0; A(row+2,7)=0.0; A(row+2,8)=0.0; A(row+2,9)=vec_A_norm[i].x; A(row+2,10)=vec_A_norm[i].y;A(row+2,11)=vec_A_norm[i].z;A(row+2,12)=1.0; A(row+2,13)=-vec_B_norm[i].z; row+=3; } //compute T --> bug? SVD in newmat need row>=col? DiagonalMatrix D; Matrix U,V; SVD(A,D,U,V); //A = U * D * V.t() Matrix h=V.column(13); //A*h=0 if(D(12,12)==0) //degenerate case { x4x4_affinematrix=0.0; //check with A.is_zero() printf("Degenerate singular values in SVD! \n"); // return false; } //de-homo for(int i=1;i<=13;i++) { h(i,1) /= h(13,1); } //reshape h:13*1 to 4*4 matrix x4x4_affinematrix(1,1)=h(1,1); x4x4_affinematrix(1,2)=h(2,1); x4x4_affinematrix(1,3)=h(3,1); x4x4_affinematrix(1,4)=h(4,1); x4x4_affinematrix(2,1)=h(5,1); x4x4_affinematrix(2,2)=h(6,1); x4x4_affinematrix(2,3)=h(7,1); x4x4_affinematrix(2,4)=h(8,1); x4x4_affinematrix(3,1)=h(9,1); x4x4_affinematrix(3,2)=h(10,1); x4x4_affinematrix(3,3)=h(11,1); x4x4_affinematrix(3,4)=h(12,1); x4x4_affinematrix(4,1)=0.0; x4x4_affinematrix(4,2)=0.0; x4x4_affinematrix(4,3)=0.0; x4x4_affinematrix(4,4)=1.0; //denormalize x4x4_affinematrix=x4x4_normalize_B.i()*x4x4_affinematrix*x4x4_normalize_A; return true; } // //project tar2sub use affine matrix // vector<Coord3D_PCM> vec_tar_invp; // Matrix x_vec_tar_invp(3,vec_tar.size()), x_vec_tar_homo(3,vec_tar.size()); // vec_tar_invp.assign(vec_tar.size(),Coord3D_PCM()); // for(long i=0;i<vec_tar.size();i++) // { // x_vec_tar_homo(1,i+1)=vec_tar[i].x; // x_vec_tar_homo(2,i+1)=vec_tar[i].y; // x_vec_tar_homo(3,i+1)=1.0; // } // x_vec_tar_invp=x3x3_affinematrix*x_vec_tar_homo; // for(long i=0;i<vec_tar.size();i++) // { // vec_tar_invp[i].x=x_vec_tar_invp(1,i+1); // vec_tar_invp[i].y=x_vec_tar_invp(2,i+1); // } // //rereorganize matched marker pairs back to LandmarkList // QList<ImageMarker> ql_marker_invp(ql_marker_tar); // for(long i=0;i<vec_tar_invp.size();i++) // { // ql_marker_invp[i].x=vec_tar_invp[i].x; // ql_marker_invp[i].y=vec_tar_invp[i].y; // } // wirteMarker_file("tar.marker",ql_marker_tar); // wirteMarker_file("sub.marker",ql_marker_sub); // wirteMarker_file("tar2sub.marker",ql_marker_invp); // //inverse project sub2tar use affine matrix // vector<Coord3D_PCM> vec_sub2tar; // Matrix x_vec_sub2tar_homo(4,vec_sub.size()), x_vec_sub_homo(4,vec_sub.size()); // vec_sub2tar.assign(vec_sub.size(),Coord3D_PCM()); // for(long i=0;i<vec_sub.size();i++) // { // x_vec_sub_homo(1,i+1)=vec_sub[i].x; // x_vec_sub_homo(2,i+1)=vec_sub[i].y; //// x_vec_sub_homo(3,i+1)=vec_sub[i].z; // x_vec_sub_homo(3,i+1)=0; // x_vec_sub_homo(4,i+1)=1.0; // } // x_vec_sub2tar_homo=x4x4_affinematrix.i()*x_vec_sub_homo; // for(long i=0;i<vec_sub.size();i++) // { // vec_sub2tar[i].x=x_vec_sub2tar_homo(1,i+1); // vec_sub2tar[i].y=x_vec_sub2tar_homo(2,i+1); // vec_sub2tar[i].z=x_vec_sub2tar_homo(3,i+1); // } // //rereorganize matched marker pairs back to LandmarkList // QList<ImageMarker> ql_marker_sub2tar(ql_marker_tar); // for(long i=0;i<vec_sub2tar.size();i++) // { // ql_marker_sub2tar[i].x=vec_sub2tar[i].x; // ql_marker_sub2tar[i].y=vec_sub2tar[i].y; // ql_marker_sub2tar[i].z=vec_sub2tar[i].z; // printf("%.2f,%.2f,%.2f\n",ql_marker_sub2tar[i].x,ql_marker_sub2tar[i].y,ql_marker_sub2tar[i].z); // } // wirteMarker_file("sub2tar.marker",ql_marker_sub2tar);
35.917258
147
0.643553
[ "vector", "transform", "3d" ]
834a87170d685a9d959e06b2c498d2185585a092
18,325
hh
C++
RAVL2/Core/IO/FileFormat.hh
isuhao/ravl2
317e0ae1cb51e320b877c3bad6a362447b5e52ec
[ "BSD-Source-Code" ]
null
null
null
RAVL2/Core/IO/FileFormat.hh
isuhao/ravl2
317e0ae1cb51e320b877c3bad6a362447b5e52ec
[ "BSD-Source-Code" ]
null
null
null
RAVL2/Core/IO/FileFormat.hh
isuhao/ravl2
317e0ae1cb51e320b877c3bad6a362447b5e52ec
[ "BSD-Source-Code" ]
null
null
null
// This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVL_FILEFORMAT_HEADER #define RAVL_FILEFORMAT_HEADER 1 ////////////////////////////////////////////////// //! example=exFileFormat.cc //! docentry="Ravl.API.Core.IO.Formats" //! lib=RavlIO //! file="Ravl/Core/IO/FileFormat.hh" //! author="Charles Galambos" //! date="13/08/1998" //! rcsid="$Id: FileFormat.hh 5240 2005-12-06 17:16:50Z plugger $" //! userlevel=Default #include "Ravl/Stream.hh" #include "Ravl/DP/Entity.hh" #include "Ravl/DP/Port.hh" #include "Ravl/DP/Pipes.hh" namespace RavlN { template <class DataT> class DListC; template <class KeyT,class DataT> class HashC; template <class DataT> class FileFormatC; class FileFormatBaseC; class FileFormatDescC; class DPConverterBaseC; /////////////////////////////////// //! userlevel=Develop //: File format implementation. // To add new file formats to the system derive a new class from this one and // provide new Probe(), CreateInput/CreateOutput, and DefaultType functions. Then // create a new handle class for your format and declare it as a global variable. class FileFormatBodyC : public DPEntityBodyC { public: FileFormatBodyC(StringC nformatName = "",StringC nDesc = "None.",bool pubList = true); //: Constructor. // 'nformatName' is the name of the file format being registered. // pubList, Indicates if format should be entered into the public // database. ~FileFormatBodyC(); //: Destructor const StringC &Name() const { return formatName; } //: Name of file format. const StringC &Description() const { return desc; } //: Description of fileformat. virtual const type_info &ProbeLoad(IStreamC &in,const type_info &obj_type) const; //: Is stream in this format ? // This asks the question: Can stream 'in' be loaded into object 'obj_type' ? // typeid(void) == no, otherwise returns the prefered load type. virtual const type_info &ProbeLoad(const StringC &filename,IStreamC &in,const type_info &obj_type) const; //: Is stream in this format ? // This asks the question: Can stream 'in' be loaded into object 'obj_type' ? // If used with a empty filename asks: Can load this type of object ? // typeid(void) == no, otherwise returns the prefered load type. inline const type_info &ProbeLoad(const StringC &filename,const type_info &obj_type) const; //: Is stream in this format ? // This asks the question: Can stream 'in' be loaded into object 'obj_type' ? // If used with a empty filename asks: Can load this type of object ? // typeid(void) == no, otherwise returns the prefered load type. inline const type_info &ProbeLoad(const type_info &obj_type) const; //: Is stream in this format ? // Alias for ProbeLoad("",IStreamC(),obj_type); // typeid(void) == no, otherwise returns the prefered load type. virtual const type_info &ProbeSave(const StringC &filename,const type_info &obj_type,bool forceFormat) const; //: Is Filename in this format ? // This asks the question: Can file 'filename' be saved with object 'obj_type' ? // If used with a empty filename asks: Can save this type of object ? // typeid(void) == no, otherwise returns the prefered save type. inline const type_info &ProbeSave(const type_info &obj_type) const; //: Alias for ProbeSave("",IStreamC(),obj_type); // typeid(void) == no, otherwise returns the prefered save type. virtual DPIPortBaseC CreateInput(const StringC &filename,const type_info &obj_type) const; //: Create a input port for loading from file 'filename'. // Will create an Invalid port if not supported. <p> // The default version of this functions opens the file and passes // the stream to CreateInput(IStreamC ....) virtual DPOPortBaseC CreateOutput(const StringC &filename,const type_info &obj_type) const; //: Create a output port for saving to file 'filename'.. // Will create an Invalid port if not supported. <p> // The default version of this functions opens the file and passes // the stream to CreateOutput(OStreamC ....) virtual DPIPortBaseC CreateInput(IStreamC &in,const type_info &obj_type) const; //: Create a input port for loading from stream 'in'. // Will create an Invalid port if not supported. virtual DPOPortBaseC CreateOutput(OStreamC &out,const type_info &obj_type) const; //: Create a output port for saving to stream 'out'. // Will create an Invalid port if not supported. virtual const type_info &DefaultType() const; //: Get prefered IO type. // This specifies the native class for representing the data in a file. <p> // typeid(void) if none, indicates an indirect driver. virtual IntT Priority() const { return 0; } //: Find the priority of the format. the higher the better. // Default is zero. virtual bool IsStream() const; //: Test if format is a fully streamable. // i.e. check if you can read/write more than object object. // (Default value of this function is true). static bool ReadString(IStreamC &is,StringC &buff,UIntT maxLen = 256); //: read a string form the input. // returns false if the stream contains non text charators or is longer // than the given length. // This will also restore the file read position after the read. static StringC ExtractDevice(const StringC &nm); //: Get the device from the full name. // For use in '@X:' style device formats. static StringC ExtractParams(const StringC &nm); //: Get the device from the full name. // For use in '@X:' style device formats. static StringC Extension(const StringC &afn); //: Return the extension of filename 'afn'. protected: StringC formatName; // File format name. StringC desc; // Description of file format. }; /////////////////////////////////////// //! userlevel=Advanced //: File format base handle. // This class acts as a handle for all Ravl file formats. class FileFormatBaseC : public DPEntityC { public: FileFormatBaseC() : DPEntityC(true) {} //: Default constructor. FileFormatBaseC(bool forLoad,StringC name,const type_info &objtype); //: Save constructor. // Find a file format which supports the requested format from the system // registry. // if not suitable format exists it will create an invalid handle. <p> FileFormatBaseC(bool forLoad,const StringC &filename,StringC formName,const type_info &objtype); //: Load constructor. // Find a file format which supports the requested format from the system // registry. // if not suitable format exists it will create an invalid handle. <p> FileFormatBaseC(IStreamC &in,StringC formName,const type_info &objtype); //: Load constructor. // Find a file format which supports the requested format from the system // registry. // if not suitable format exists it will create an invalid handle. <p> inline const StringC &Name() const; //: Name of file format. inline const StringC &Description() const; //: Description of fileformat. inline const type_info &ProbeLoad(IStreamC &in,const type_info &obj_type) const; //: Is stream in this format ? // This asks the question: Can stream 'in' be loaded into object 'obj_type' ? // Returns a suggested load type. (Which may or mayno match 'obj_type'.), // This will be typeid(void), if failed. inline const type_info &ProbeLoad(const StringC &filename,IStreamC &in,const type_info &obj_type) const; //: Is Filename in this format (for load) ? // This asks the question: Can file 'filename' be loaded with object 'obj_type' ? // If used with a empty filename then in is invalid and it // asks: Can load this type of object ? // Returns a suggested load type. (Which may or mayno match 'obj_type'.), // This will be typeid(void), if failed. inline const type_info &ProbeLoad(const StringC &filename,const type_info &obj_type) const; //: Is Filename in this format (for load) ? // Returns a suggested load type. (Which may or mayno match 'obj_type'.), // This will be typeid(void), if failed. inline const type_info &ProbeSave(const StringC &filename,const type_info &obj_type,bool forceFormat) const; //: Is Filename in this format ? // This asks the question: Can file 'filename' be saved with object 'obj_type' ? // This uses extention to check consistancy. // If used with a empty filename asks: Can save this type of object ? // Returns a suggested load type. (Which may or mayno match 'obj_type'.), // This will be typeid(void), if failed. inline const type_info &ProbeLoad(const type_info &obj_type) const; //: Is Filename in this format (for load) ? // Alias for ProbeLoad("",IStreamC(),obj_type); // Returns a suggested load type. (Which may or mayno match 'obj_type'.), // This will be typeid(void), if failed. inline const type_info &ProbeSave(const type_info &obj_type) const; //: Is Filename in this format ? // Alias for ProbeSave("",obj_type); inline DPIPortBaseC CreateInput(const StringC &filename,const type_info &obj_type) const; //: Create a input port for loading. // Will create an Invalid port if not supported. <p> // The default version of this functions opens the file and passes // the stream to CreateInput(IStreamC ....) inline DPOPortBaseC CreateOutput(const StringC &filename,const type_info &obj_type) const; //: Create a output port for saving. // Will create an Invalid port if not supported. <p> // The default version of this functions opens the file and passes // the stream to CreateOutput(OStreamC ....) inline DPIPortBaseC CreateInput(IStreamC &in,const type_info &obj_type) const; //: Create a input port for loading. // Will create an Invalid port if not supported. inline DPOPortBaseC CreateOutput(OStreamC &out,const type_info &obj_type) const; //: Create a output port for saving. // Will create an Invalid port if not supported. inline const type_info &DefaultType() const; //: Get prefered IO type. // typeid(void) if none. inline IntT Priority() const; //: Find the priority of the format. the higher the better. // Default is zero. inline bool IsStream() const; //: Test if format is a fully streamable. // i.e. check if you can read/write more than object object. protected: FileFormatBaseC(FileFormatBodyC &bod) : DPEntityC(bod) {} //: Body constructor. inline FileFormatBodyC &Body() { return static_cast<FileFormatBodyC &>(DPEntityC::Body()); } inline const FileFormatBodyC &Body() const { return static_cast<const FileFormatBodyC &>(DPEntityC::Body()); } friend class FileFormatBodyC; }; ////////////////////////////////////////////////// //! userlevel=Normal //: Templated File format // This class provides access to all file formats which deal with a // particular type. template<class DataT> class FileFormatC : public FileFormatBaseC { public: FileFormatC() {} //: Default constructor. // This creates an invalid handle. FileFormatC(StringC name) : FileFormatBaseC(name,typeid(DataT)) {} //: Construct from format name. // Find a file format which supports the requested format. // if not suitable format exists it will create an invalid handle. <p> // Uses FileFormatBodyC::FindFormat(...). FileFormatC(const StringC &filename,const StringC &formName) : FileFormatBaseC(filename,formName,typeid(DataT)) {} //: Load constructor. // Find a file format which supports the requested format. // if not suitable format exists it will create an invalid handle. <p> // Uses FileFormatBodyC::FindFormat(...). FileFormatC(IStreamC &in,const StringC &formName) : FileFormatBaseC(in,formName,typeid(DataT)) {} //: Load constructor. // Find a file format which supports the requested format. // if not suitable format exists it will create an invalid handle. <p> // Uses FileFormatBodyC::FindFormat(...). FileFormatC(FileFormatBodyC &bod) : FileFormatBaseC(bod) {} //: Body Constructor. inline const type_info &ProbeLoad(IStreamC &in) const; //: Is stream in this format ? // This asks the question: Can stream 'in' be loaded into 'DataT' type ? inline const type_info &ProbeLoad(const StringC &filename,IStreamC &in) const; //: Is Filename in this format ? // This asks the question: Can file 'filename' be loaded with object 'DataT' ? // If used with a empty filename asks: Can load this type of object ? inline const type_info &ProbeSave(const StringC &filename,bool forceFmt = false) const; //: Is Filename in this format ? // This asks the question: Can file 'filename' be saved with object 'DataT' ? // If used with a empty filename asks: Can save this type of object ? inline DPIPortC<DataT> CreateInput(const StringC &filename) const; //: Create a input port for loading. // Will create an Invalid port if not supported. inline DPOPortC<DataT> CreateOutput(const StringC &filename) const; //: Create a output port for saving. // Will create an Invalid port if not supported. inline DPIPortC<DataT> CreateInput(IStreamC &in) const; //: Create a input port for loading. // Will create an Invalid port if not supported. inline DPOPortC<DataT> CreateOutput(OStreamC &out) const; //: Create a output port for saving. // Will create an Invalid port if not supported. }; ////////////////////////////////////////////////// inline const type_info & FileFormatBodyC::ProbeLoad(const type_info &obj_type) const { IStreamC tmp; return ProbeLoad("",tmp,obj_type); } inline const type_info & FileFormatBodyC::ProbeLoad(const StringC &filename,const type_info &obj_type) const { if(filename.IsEmpty()) return ProbeLoad(obj_type); IStreamC in(filename); return ProbeLoad(filename,in,obj_type); } inline const type_info & FileFormatBodyC::ProbeSave(const type_info &obj_type) const { return ProbeSave("",obj_type,true); } ////////////////////////////////////////////////// inline const StringC & FileFormatBaseC::Name() const { return Body().Name(); } inline const StringC & FileFormatBaseC::Description() const { return Body().Description(); } inline const type_info &FileFormatBaseC::ProbeLoad(IStreamC &in,const type_info &obj_type) const { return Body().ProbeLoad(in,obj_type); } inline const type_info &FileFormatBaseC::ProbeLoad(const StringC &filename,IStreamC &in,const type_info &obj_type) const { return Body().ProbeLoad(filename,in,obj_type); } inline const type_info &FileFormatBaseC::ProbeLoad(const StringC &filename,const type_info &obj_type) const { return Body().ProbeLoad(filename,obj_type); } inline const type_info &FileFormatBaseC::ProbeSave(const StringC &filename,const type_info &obj_type,bool forceFormat) const { return Body().ProbeSave(filename,obj_type,forceFormat); } inline const type_info &FileFormatBaseC::ProbeLoad(const type_info &obj_type) const { return Body().ProbeLoad(obj_type); } inline const type_info &FileFormatBaseC::ProbeSave(const type_info &obj_type) const { return Body().ProbeSave(obj_type); } inline DPIPortBaseC FileFormatBaseC::CreateInput(const StringC &filename,const type_info &obj_type) const { return Body().CreateInput(filename,obj_type); } inline DPOPortBaseC FileFormatBaseC::CreateOutput(const StringC &filename,const type_info &obj_type) const { return Body().CreateOutput(filename,obj_type); } inline DPIPortBaseC FileFormatBaseC::CreateInput(IStreamC &in,const type_info &obj_type) const { return Body().CreateInput(in,obj_type); } inline DPOPortBaseC FileFormatBaseC::CreateOutput(OStreamC &out,const type_info &obj_type) const { return Body().CreateOutput(out,obj_type); } inline const type_info &FileFormatBaseC::DefaultType() const { return Body().DefaultType(); } inline IntT FileFormatBaseC::Priority() const { return Body().Priority(); } inline bool FileFormatBaseC::IsStream() const { return Body().IsStream(); } ////////////////////////////////////////////////// template<class DataT> inline const type_info & FileFormatC<DataT>::ProbeLoad(IStreamC &in) const { return FileFormatBaseC::ProbeLoad(in,typeid(DataT)); } template<class DataT> inline const type_info & FileFormatC<DataT>::ProbeLoad(const StringC &fn,IStreamC &in) const { return FileFormatBaseC::ProbeLoad(fn,in,typeid(DataT)); } template<class DataT> inline const type_info & FileFormatC<DataT>::ProbeSave(const StringC &filename,bool forceFormat) const { return FileFormatBaseC::ProbeSave(filename,typeid(DataT),forceFormat); } template<class DataT> inline DPIPortC<DataT> FileFormatC<DataT>::CreateInput(const StringC &filename) const { return FileFormatBaseC::CreateInput(filename,typeid(DataT)); } template<class DataT> inline DPOPortC<DataT> FileFormatC<DataT>::CreateOutput(const StringC &filename) const { return FileFormatBaseC::CreateOutput(filename,typeid(DataT)); } template<class DataT> inline DPIPortC<DataT> FileFormatC<DataT>::CreateInput(IStreamC &in) const { return FileFormatBaseC::CreateInput(in,typeid(DataT)); } template<class DataT> inline DPOPortC<DataT> FileFormatC<DataT>::CreateOutput(OStreamC &out) const { return FileFormatBaseC::CreateOutput(out,typeid(DataT)); } } #endif
38.742072
119
0.681037
[ "object" ]
834e69cd41f012086de3bff50793077dfda0d028
1,307
cpp
C++
src/cells/data.cpp
jim0607/mars
5149422b6d71576f61bb156b6682d2dfd8238543
[ "BSD-2-Clause" ]
1
2020-02-08T07:03:34.000Z
2020-02-08T07:03:34.000Z
src/cells/data.cpp
jim0607/mars
5149422b6d71576f61bb156b6682d2dfd8238543
[ "BSD-2-Clause" ]
null
null
null
src/cells/data.cpp
jim0607/mars
5149422b6d71576f61bb156b6682d2dfd8238543
[ "BSD-2-Clause" ]
null
null
null
//----------------------------------------------------------------------------- // // This source file is part of the MaRS open source package under the // BSD (2-clause) licence (see LICENCE file for details). // // (c) R F L Evans 2015. All rights reserved. // //----------------------------------------------------------------------------- // System headers // Program headers #include "cells.hpp" namespace mars{ //----------------------------------------------------------------------------- // Namespace containing all cell variables //----------------------------------------------------------------------------- namespace cells{ std::vector<vec_t> m; std::vector<vec_t> h; std::vector<double> temperature; std::vector<cell_constants_t> constants; std::vector<cell_neighbour_t> neighbours; } // end of namespace cells } // end of namespace mars // example // void function(std::vector<mars::vec_t>& m, std::vector<mars::cell_constants_t>& constants){ // const int num_cells = m.size(); // for(int cell=0; cell < num_cells; ++cell){ // double mx = m[cell].x; // const double Tc = constants[cell].Tc; // } // }
32.675
175
0.427697
[ "vector" ]
8350786e1f81ddb46ac618caf72c408b25b9bcc1
45,315
hpp
C++
src/netxs/apps/tile.hpp
o-sdn-o/VTM
19f7dd2741c9547bb94e9c38c665f0915638332f
[ "MIT" ]
2
2020-11-24T05:32:41.000Z
2020-11-25T07:52:55.000Z
src/netxs/apps/tile.hpp
monotty/VTM
00641148fabfe27901805e9fe144c16aabb55e83
[ "MIT" ]
null
null
null
src/netxs/apps/tile.hpp
monotty/VTM
00641148fabfe27901805e9fe144c16aabb55e83
[ "MIT" ]
null
null
null
// Copyright (c) NetXS Group. // Licensed under the MIT license. #ifndef NETXS_APP_TILE_HPP #define NETXS_APP_TILE_HPP namespace netxs::events::userland { struct tile { EVENTPACK( tile, netxs::events::userland::root::custom ) { GROUP_XS( ui, input::hids ), // Window manager command pack. SUBSET_XS( ui ) { EVENT_XS( create , input::hids ), EVENT_XS( close , input::hids ), EVENT_XS( toggle , input::hids ), // toggle window size: maximize/restore. EVENT_XS( swap , input::hids ), EVENT_XS( rotate , input::hids ), // change nested objects order. See tilimg manager (ui::fork). EVENT_XS( equalize, input::hids ), EVENT_XS( select , input::hids ), GROUP_XS( split , input::hids ), SUBSET_XS( split ) { EVENT_XS( vt, input::hids ), EVENT_XS( hz, input::hids ), }; // GROUP_XS( preview, input::hids ), // GROUP_XS( release, input::hids ), // GROUP_XS( request, input::hids ), // // SUBSET_XS( preview ) // { // EVENT_XS( create , input::hids ), // EVENT_XS( close , input::hids ), // EVENT_XS( toggle , input::hids ), // toggle window size: maximize/restore. // EVENT_XS( swap , input::hids ), // EVENT_XS( rotate , input::hids ), // change nested objects order. See tilimg manager (ui::fork). // EVENT_XS( equalize, input::hids ), // EVENT_XS( select , input::hids ), // GROUP_XS( split , input::hids ), // // SUBSET_XS( split ) // { // EVENT_XS( vt, input::hids ), // EVENT_XS( hz, input::hids ), // }; // }; // SUBSET_XS( release ) // { // EVENT_XS( create , input::hids ), // EVENT_XS( close , input::hids ), // EVENT_XS( toggle , input::hids ), // toggle window size: maximize/restore. // EVENT_XS( swap , input::hids ), // EVENT_XS( rotate , input::hids ), // change nested objects order. See tilimg manager (ui::fork). // EVENT_XS( equalize, input::hids ), // EVENT_XS( select , input::hids ), // GROUP_XS( split , input::hids ), // // SUBSET_XS( split ) // { // EVENT_XS( vt, input::hids ), // EVENT_XS( hz, input::hids ), // }; // }; // SUBSET_XS( request ) // { // EVENT_XS( create , input::hids ), // EVENT_XS( close , input::hids ), // EVENT_XS( toggle , input::hids ), // toggle window size: maximize/restore. // EVENT_XS( swap , input::hids ), // EVENT_XS( rotate , input::hids ), // change nested objects order. See tilimg manager (ui::fork). // EVENT_XS( equalize, input::hids ), // EVENT_XS( select , input::hids ), // GROUP_XS( split , input::hids ), // // SUBSET_XS( split ) // { // EVENT_XS( vt, input::hids ), // EVENT_XS( hz, input::hids ), // }; // }; }; }; }; } // tile: Tiling window manager. namespace netxs::app::tile { using events = netxs::events::userland::tile; namespace { auto bcast_forward = [](auto& boss) { boss.SUBMIT(tier::release, e2::form::upon::vtree::attached, parent) { auto parent_memo = std::make_shared<subs>(); parent->SUBMIT_T(tier::anycast, app::tile::events::ui::any, *parent_memo, gear) { auto gear_test = decltype(e2::form::state::keybd::find)::type{ gear.id, 0 }; boss.SIGNAL(tier::anycast, e2::form::state::keybd::find, gear_test); if (gear_test.second) { if (auto parent = boss.parent()) if (auto deed = parent->bell::template protos<tier::anycast>()) //todo "template" keyword is required by FreeBSD clang 11.0.1 { switch (deed) { case app::tile::events::ui::create.id: gear.force_group_focus = true; boss.template riseup<tier::release>(e2::form::proceed::createby, gear); gear.force_group_focus = faux; break; case app::tile::events::ui::close.id: boss.template riseup<tier::release>(e2::form::quit, boss.This()); break; case app::tile::events::ui::toggle.id: if (boss.base::kind() == 0) // Only apps can be maximized. if (gear.countdown > 0) { gear.countdown--; // Removing multifocus - The only one can be maximized if several are selected. gear.force_group_focus = faux; gear.kb_focus_taken = faux; boss.SIGNAL(tier::release, hids::events::upevent::kboffer, gear); boss.template riseup<tier::release>(e2::form::maximize, gear); //todo parent_memo is reset by the empty slot here (pop_back), undefined behavior from here } break; case app::tile::events::ui::swap.id: boss.template riseup<tier::release>(app::tile::events::ui::swap, gear); break; case app::tile::events::ui::rotate.id: boss.template riseup<tier::release>(app::tile::events::ui::rotate, gear); break; case app::tile::events::ui::equalize.id: boss.template riseup<tier::release>(app::tile::events::ui::equalize, gear); break; case app::tile::events::ui::split::vt.id: boss.template riseup<tier::release>(app::tile::events::ui::split::vt, gear); break; case app::tile::events::ui::split::hz.id: boss.template riseup<tier::release>(app::tile::events::ui::split::hz, gear); break; } } } }; boss.SUBMIT_T_BYVAL(tier::release, e2::form::upon::vtree::detached, *parent_memo, parent) { parent_memo.reset(); }; }; }; auto mouse_actions = [](auto& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::dblclick::left, gear) { boss.base::template riseup<tier::release>(e2::form::maximize, gear); gear.dismiss(); }; boss.SUBMIT(tier::release, hids::events::mouse::button::click::leftright, gear) { boss.base::template riseup<tier::release>(e2::form::quit, boss.This()); gear.dismiss(); }; boss.SUBMIT(tier::release, hids::events::mouse::button::click::middle, gear) { boss.base::template riseup<tier::release>(e2::form::quit, boss.This()); gear.dismiss(); }; }; auto box_with_title = [](view title, auto branch) { branch->SIGNAL(tier::anycast, e2::form::prop::menusize, 1); return ui::fork::ctor(axis::Y) ->plugin<pro::title>("", true, faux, true) ->plugin<pro::limit>(twod{ 10,-1 }, twod{ -1,-1 }) ->isroot(true) ->active() ->invoke([&](auto& boss) { bcast_forward(boss); mouse_actions(boss); }) //->branch(slot::_1, ui::post_fx<cell::shaders::contrast>::ctor()) //todo apple clang doesn't get it ->branch(slot::_1, ui::post_fx::ctor() ->upload(title) ->invoke([&](auto& boss) { auto shadow = ptr::shadow(boss.This()); boss.SUBMIT_BYVAL(tier::release, e2::form::upon::vtree::attached, parent) { parent->SUBMIT_BYVAL(tier::preview, e2::form::prop::header, newtext) { if (auto ptr = shadow.lock()) ptr->upload(newtext); }; parent->SUBMIT_BYVAL(tier::request, e2::form::prop::header, curtext) { if (auto ptr = shadow.lock()) curtext = ptr->get_source(); }; }; })) ->branch(slot::_2, branch); }; auto pass_focus = [](auto& gear_id_list, auto& item_ptr) { if (item_ptr) { for (auto gear_id : gear_id_list) { if (auto gate_ptr = bell::getref(gear_id)) { gate_ptr->SIGNAL(tier::preview, e2::form::proceed::focus, item_ptr); } } } }; auto built_node = [](auto tag, auto s1, auto s2, auto w) { auto node = tag == 'h' ? ui::fork::ctor(axis::X, w == -1 ? 2 : w, s1, s2) : ui::fork::ctor(axis::Y, w == -1 ? 1 : w, s1, s2); node->isroot(faux, 1) // Set object kind to 1 to be different from others. See empty_slot::select. ->template plugin<pro::limit>(dot_00) ->invoke([&](auto& boss) { mouse_actions(boss); boss.SUBMIT(tier::release, app::tile::events::ui::swap , gear) { boss.swap(); }; boss.SUBMIT(tier::release, app::tile::events::ui::rotate , gear) { boss.rotate(); }; boss.SUBMIT(tier::release, app::tile::events::ui::equalize, gear) { boss.config(1, 1); }; }); auto grip = node->attach(slot::_I, ui::mock::ctor() ->isroot(true) ->template plugin<pro::mover>() ->template plugin<pro::focus>() //->template plugin<pro::shade<cell::shaders::xlight>>() //todo apple clang doesn't get it ->template plugin<pro::shade>() ->invoke([&](auto& boss) { boss.keybd.accept(true); bcast_forward(boss); //todo implement keydb support }) ->active()); return node; }; auto place_holder = []() { return ui::park::ctor() ->isroot(true, 2) ->colors(blacklt, app::shared::term_menu_bg) ->plugin<pro::limit>(dot_00, -dot_11) ->plugin<pro::focus>() ->invoke([&](auto& boss) { boss.keybd.accept(true); bcast_forward(boss); mouse_actions(boss); boss.SUBMIT(tier::release, hids::events::mouse::button::click::right, gear) { boss.base::template riseup<tier::release>(e2::form::proceed::createby, gear); gear.dismiss(); }; }) ->branch ( snap::center, snap::center, ui::post::ctor()->upload("Empty Slot", 10) ); }; auto empty_slot = [](auto&& empty_slot) -> sptr<ui::veer> { return ui::veer::ctor() ->invoke([&](auto& boss) { auto shadow = ptr::shadow(boss.This()); boss.SUBMIT(tier::release, e2::form::proceed::swap, item_ptr) { auto count = boss.count(); if (count == 1) // Only empty slot available. { log(" empty_slot swap: defective structure, count=", count); } else if (count == 2) { auto my_item_ptr = boss.pop_back(); if (item_ptr) { boss.attach(item_ptr); } else item_ptr = boss.This(); // Heir to the focus. } else log(" empty_slot swap: defective structure, count=", count); }; boss.SUBMIT(tier::release, e2::form::upon::vtree::attached, parent) { //todo revise, possible parent subscription leaks when reattached auto parent_memo = std::make_shared<subs>(); parent->SUBMIT_T(tier::request, e2::form::proceed::swap, *parent_memo, item_ptr) { if (item_ptr != boss.This()) // It wasn't me. It was the one-armed man. { auto count = boss.count(); if (count == 1) // Only empty slot available. { item_ptr.reset(); } else if (count == 2) { item_ptr = boss.pop_back(); } else log(" empty_slot: defective structure, count=", count); if (auto parent = boss.parent()) { parent->bell::template expire<tier::request>(); } } }; boss.SUBMIT_T_BYVAL(tier::request /*swap specific*/, e2::form::upon::vtree::detached, *parent_memo, parent) { parent_memo.reset(); }; }; boss.SUBMIT(tier::anycast, e2::form::upon::started, root) { if (auto item_ptr = boss.back()) { auto& item = *item_ptr; if (item.base::root()) { item.SIGNAL(tier::anycast, e2::form::upon::started, item_ptr); } } }; boss.SUBMIT(tier::anycast, app::tile::events::ui::select, gear) { auto& item =*boss.back(); if (item.base::kind() != 1) { //todo unify gear.force_group_focus = true; gear.kb_focus_taken = faux; gear.combine_focus = true; item.SIGNAL(tier::release, hids::events::upevent::kboffer, gear); gear.combine_focus = faux; gear.force_group_focus = faux; } else item.SIGNAL(tier::release, hids::events::upevent::kbannul, gear); // Exclude grips. }; boss.SUBMIT_BYVAL(tier::release, e2::form::maximize, gear) { if (auto boss_ptr = shadow.lock()) { auto& boss =*boss_ptr; auto count = boss.count(); if (count > 1) // Preventing the empty slot from maximizing. { //todo revise if (boss.back()->base::kind() == 0) // Preventing the splitter from maximizing. { //todo unify // Pass the focus to the maximized window. gear.force_group_focus = faux; gear.kb_focus_taken = faux; gear.combine_focus = true; boss.back()->SIGNAL(tier::release, hids::events::upevent::kboffer, gear); gear.combine_focus = faux; gear.force_group_focus = faux; auto fullscreen_item = boss.pop_back(); if (fullscreen_item) { // One-time return ticket. auto oneoff = std::make_shared<hook>(); fullscreen_item->SUBMIT_T_BYVAL(tier::release, e2::form::maximize, *oneoff, gear) { if (auto boss_ptr = shadow.lock()) { auto& boss = *boss_ptr; using type = decltype(e2::form::proceed::detach)::type; type fullscreen_item; boss.base::template riseup<tier::release>(e2::form::proceed::detach, fullscreen_item); if (fullscreen_item) { boss.attach(fullscreen_item); boss.base::reflow(); } } oneoff.reset(); }; boss.base::template riseup<tier::release>(e2::form::proceed::attach, fullscreen_item); if (fullscreen_item) // Unsuccessful maximization. Attach it back. { boss.attach(fullscreen_item); } boss.base::reflow(); } } } } }; boss.SUBMIT_BYVAL(tier::release, app::tile::events::ui::split::any, gear) { if (auto boss_ptr = shadow.lock()) { auto& boss = *boss_ptr; if (auto deed = boss.bell::template protos<tier::release>()) { if (auto gate_ptr = bell::getref(gear.id)) { using type = decltype(e2::depth)::type; auto depth = type{}; boss.base::template riseup<tier::request>(e2::depth, depth, true); log(" depth=", depth); if (depth > INHERITANCE_LIMIT) return; auto heading = deed == app::tile::events::ui::split::vt.id; auto newnode = built_node(heading ? 'v':'h', 1, 1, heading ? 1 : 2); auto empty_1 = empty_slot(empty_slot); auto empty_2 = empty_slot(empty_slot); auto curitem = boss.pop_back(); // In order to preserve all foci. gate_ptr->SIGNAL(tier::preview, e2::form::proceed::focus, empty_1); gate_ptr->SIGNAL(tier::preview, e2::form::proceed::unfocus, curitem); if (boss.empty()) { boss.attach(place_holder()); empty_2->pop_back(); } auto slot_1 = newnode->attach(slot::_1, empty_1); auto slot_2 = newnode->attach(slot::_2, empty_2->branch(curitem)); boss.attach(newnode); } } } }; boss.SUBMIT_BYVAL(tier::release, e2::form::quit, nested_item_ptr) { if (nested_item_ptr) { auto& item = *nested_item_ptr; using type = decltype(e2::form::state::keybd::handover)::type; type gear_id_list; item.SIGNAL(tier::anycast, e2::form::state::keybd::handover, gear_id_list); if (auto boss_ptr = shadow.lock()) { auto& boss = *boss_ptr; auto count = boss.count(); if (count > 1) { if (boss.back()->base::kind() == 0) // Only apps can be deleted. { auto item = boss.pop_back(); // Throw away. pass_focus(gear_id_list, boss_ptr); } } else if (count == 1) // Remove empty slot, reorganize. { if (auto parent = boss.base::parent()) { using type = decltype(e2::form::proceed::swap)::type; type item_ptr = boss_ptr; // sptr must be of the same type as the event argument. Casting kills all intermediaries when return. parent->SIGNAL(tier::request, e2::form::proceed::swap, item_ptr); if (item_ptr) { if (item_ptr != boss_ptr) // Parallel slot is not empty. { parent->base::template riseup<tier::release>(e2::form::proceed::swap, item_ptr); pass_focus(gear_id_list, item_ptr); } else // I'm alone. { // Nothing todo. There can be only one! } } else // Both slots are empty. { parent->base::template riseup<tier::release>(e2::form::proceed::swap, item_ptr); pass_focus(gear_id_list, item_ptr); } } } } } }; boss.SUBMIT(tier::release, e2::form::proceed::createby, gear) { static iota insts_count = 0; if (boss.count() == 1) // Create new apps at the empty slots only. { if (gear.meta(hids::ANYCTRL)) { //todo ... } else { if (auto gate_ptr = bell::getref(gear.id)) { auto& gate = *gate_ptr; auto current_default = decltype(e2::data::changed)::type{}; gate.SIGNAL(tier::request, e2::data::changed, current_default); auto config = app::shared::objs_config[current_default]; auto& creator = app::shared::creator(config.type); auto host = creator(config.data); auto app = box_with_title(config.title, host); gear.remove_from_kb_focus(boss.back()); // Take focus from the empty slot. boss.attach(app); //todo unify, demo limits { insts_count++; #ifndef PROD if (insts_count > APPS_MAX_COUNT) { log("tile: inst: max count reached"); auto timeout = tempus::now() + APPS_DEL_TIMEOUT; auto w_frame = ptr::shadow(host); host->SUBMIT_BYVAL(tier::general, e2::tick, timestamp) { if (timestamp > timeout) { log("tile: inst: timebomb"); if (auto host = w_frame.lock()) { host->riseup<tier::release>(e2::form::quit, host); //host->base::detach(); log("tile: inst: frame detached: ", insts_count); } } }; } #endif host->SUBMIT(tier::release, e2::dtor, id) { insts_count--; log("tile: inst: detached: ", insts_count, " id=", id); }; } app->SIGNAL(tier::anycast, e2::form::upon::started, app); //todo unify gear.kb_focus_taken = faux; host->SIGNAL(tier::release, hids::events::upevent::kboffer, gear); } } } }; }) ->branch ( place_holder() ); }; auto add_node = [](auto&& add_node, view& utf8) -> sptr<ui::veer> { auto place = empty_slot(empty_slot); utf::trim_front(utf8, ", "); if (utf8.empty()) return place; auto tag = utf8.front(); if (tag == '\"') { // add term auto cmdline = utf::get_quote(utf8, '\"'); log(" node cmdline=", cmdline); auto& creator = app::shared::creator("Term"); auto host = creator(cmdline); auto inst = box_with_title("Headless TE", host); place->attach(inst); } else if (tag == 'a') { // add app utf8.remove_prefix(1); utf::trim_front(utf8, " "); if (utf8.empty() || utf8.front() != '(') return place; utf8.remove_prefix(1); auto app_id = utf::get_quote(utf8, '\"', ", "); auto app_title = utf::get_quote(utf8, '\"', ", "); auto app_data = utf::get_quote(utf8, '\"', ") "); log(" app_id=", app_id, " app_title=", app_title, " app_data=", app_data); auto& creator = app::shared::creator(app_id); auto host = creator(app_data); auto inst = box_with_title(app_title, host); place->attach(inst); } else if (tag == 'h' || tag == 'v') { // add split utf8.remove_prefix(1); utf::trim_front(utf8, " "); iota s1 = 1; iota s2 = 1; iota w = -1; if (auto param = utf::to_int(utf8)) { s1 = std::abs(param.value()); if (utf8.empty() || utf8.front() != ':') return place; utf8.remove_prefix(1); if (auto param = utf::to_int(utf8)) { s2 = std::abs(param.value()); utf::trim_front(utf8, " "); if (!utf8.empty() && utf8.front() == ':') // Grip width. { utf8.remove_prefix(1); if (auto param = utf::to_int(utf8)) { w = std::abs(param.value()); utf::trim_front(utf8, " "); } } } else return place; } if (utf8.empty() || utf8.front() != '(') return place; utf8.remove_prefix(1); auto node = built_node(tag, s1, s2, w); auto slot1 = node->attach(slot::_1, add_node(add_node, utf8)); auto slot2 = node->attach(slot::_2, add_node(add_node, utf8)); place->attach(node); utf::trim_front(utf8, ") "); } return place; }; auto build = [](view data) -> sptr<base> { view envvar_data; text window_title; auto a = data.find('='); if (a != text::npos) { auto b = data.begin(); auto e = data.end(); auto t = b + a; //auto envvar_name = view{ b, t }; //todo apple clang doesn't get it auto envvar_name = view{ &(*b), (size_t)(t - b) }; log(" envvar_name=", envvar_name); b = t + 1; if (b != e) { //envvar_data = view{ b, e }; //todo apple clang doesn't get it envvar_data = view{ &(*b), (size_t)(e - b) }; log(" envvar_data=", envvar_data); auto menu_name = utf::get_quote(envvar_data, '\"'); window_title = utf::get_quote(envvar_data, '\"', ", "); log(" menu_name=", menu_name); log(" window_title=", window_title); log(" layout_data=", envvar_data); //if (window_title.length()) window_title += '\n'; } } auto object = ui::fork::ctor(axis::Y); #ifndef PROD if (app::shared::tile_count < TILE_MAX_COUNT) { auto c = &app::shared::tile_count; (*c)++; object->SUBMIT_BYVAL(tier::release, e2::dtor, item_id) { (*c)--; log("main: tile manager destoyed"); }; } else { auto& creator = app::shared::creator("Empty"); object->attach(slot::_1, creator("")); app::shared::app_limit(object, "Reached The Limit"); return object; } #endif object->invoke([&](auto& boss) { auto oneoff = std::make_shared<hook>(); auto objs_config_ptr = &app::shared::objs_config; boss.SUBMIT_T_BYVAL(tier::anycast, e2::form::upon::created, *oneoff, gear) { if (auto gate_ptr = bell::getref(gear.id)) { auto& gate = *gate_ptr; auto& objs_config = *objs_config_ptr; auto menu_item_id = decltype(e2::data::changed)::type{}; gate.SIGNAL(tier::request, e2::data::changed, menu_item_id); //todo unify auto config = objs_config[menu_item_id]; if (config.type == "Tile") // Reset the currently selected application to the previous one. { gate.SIGNAL(tier::preview, e2::data::changed, menu_item_id); // Get previous default; gate.SIGNAL(tier::release, e2::data::changed, menu_item_id); // Set current default; } } oneoff.reset(); }; boss.SUBMIT_BYVAL(tier::release, e2::form::upon::vtree::attached, parent) { auto title = ansi::add(window_title);// + utf::debase(data)); log(" attached title=", window_title); parent->base::riseup<tier::preview>(e2::form::prop::header, title); }; }); object->attach(slot::_1, app::shared::custom_menu(true, std::list{ // Green ?Even Red // ┌────┐ ┌────┐ ┌─┬──┐ ┌────┐ ┌─┬──┐ ┌─┬──┐ ┌────┐ // ┌─┐ ┌─┬─┐ ┌─┬─┐ ┌─┬─┐ // │Exec│ ├─┐ │ │ H │ ├ V ─┤ │Swap│ │Fair│ │Shut│ // ├─┤ └─┴─┘ └<┴>┘ └>┴<┘ // └────┘ └─┴──┘ └─┴──┘ └────┘ └─┴──┘ └─┴──┘ └────┘ // └─┘ std::pair<text, std::function<void(ui::pads&)>>{" ┐└ ",// ─┐ ", //" ▀█ ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { gear.countdown = 1; boss.SIGNAL(tier::anycast, app::tile::events::ui::toggle, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " + ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::create, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " ::: ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::select, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " │ ", // " ║ ", - VGA Linux console doesn't support unicode glyphs [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::split::hz, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " ── ", // " ══ ", - VGA Linux console doesn't support unicode glyphs [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::split::vt, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " ┌┘ ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::rotate, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " <-> ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::swap, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " >|< ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::equalize, gear); gear.dismiss(true); }; }}, std::pair<text, std::function<void(ui::pads&)>>{ " × ", [](ui::pads& boss) { boss.SUBMIT(tier::release, hids::events::mouse::button::click::left, gear) { boss.SIGNAL(tier::anycast, app::tile::events::ui::close, gear); gear.dismiss(true); }; }}, })) ->colors(whitelt, app::shared::term_menu_bg) ->plugin<pro::focus>() ->plugin<pro::track>() ->plugin<pro::acryl>() ->invoke([](auto& boss) { boss.keybd.accept(true); }); object->attach(slot::_2, add_node(add_node, envvar_data)) ->invoke([&](auto& boss) { boss.SUBMIT(tier::release, e2::form::proceed::attach, fullscreen_item) { if (fullscreen_item) { boss.attach(fullscreen_item); fullscreen_item.reset(); } }; boss.SUBMIT(tier::release, e2::form::proceed::detach, fullscreen_item) { auto item = boss.pop_back(); if (item) fullscreen_item = item; }; boss.SUBMIT(tier::anycast, app::tile::events::ui::any, gear) { if (auto deed = boss.bell::template protos<tier::anycast>()) //todo "template" keyword is required by FreeBSD clang 11.0.1 { if (boss.count() > 2 && deed != app::tile::events::ui::toggle.id) // Restore the window before any action if maximized. { auto gear_state = gear.state(); auto& item =*boss.back(); if (item.base::root()) // Pass focus to the maximized window. { //todo unify gear.force_group_focus = true; gear.kb_focus_taken = faux; gear.combine_focus = true; item.SIGNAL(tier::release, hids::events::upevent::kboffer, gear); gear.combine_focus = faux; gear.force_group_focus = faux; } gear.countdown = 1; boss.SIGNAL(tier::anycast, app::tile::events::ui::toggle, gear); gear.state(gear_state); } //boss.bell::template signal<tier::anycast>(deed, gear); } }; }); return object; }; } app::shared::initialize builder{ "Tile", build }; } #endif // NETXS_APP_TILE_HPP
52.508691
168
0.347479
[ "object" ]
8354854310a07b203148c28d457b82e8f15f376b
1,835
cpp
C++
src/shendk/files/model/mt5/mt5_node.cpp
Shenmue-Mods/ShenmueDK
feca9c937fe5cf6fb99b11336792f33d9797aca7
[ "MIT" ]
4
2019-05-27T21:15:38.000Z
2021-07-25T10:42:30.000Z
src/shendk/files/model/mt5/mt5_node.cpp
Shenmue-Mods/ShenmueDK
feca9c937fe5cf6fb99b11336792f33d9797aca7
[ "MIT" ]
null
null
null
src/shendk/files/model/mt5/mt5_node.cpp
Shenmue-Mods/ShenmueDK
feca9c937fe5cf6fb99b11336792f33d9797aca7
[ "MIT" ]
null
null
null
#include "shendk/files/model/mt5/mt5_node.h" #include "shendk/files/model/mt5/mt5_mesh.h" #include "shendk/utils/math.h" #include <iostream> namespace shendk { namespace mt5 { MT5Node::MT5Node(Model* model, MT5Node* _parent) : ModelNode(model) { parent = _parent; } MT5Node::MT5Node(Model* model, std::istream& stream, int64_t baseOffset, MT5Node* _parent) : ModelNode(model) { parent = _parent; read(stream, baseOffset); } MT5Node::~MT5Node() {} void MT5Node::read(std::istream& stream , int64_t baseOffset) { stream.read(reinterpret_cast<char*>(&data), sizeof(MT5Node::Data)); id = data.id; position = Vector3f(data.posX, data.posY, data.posZ); scale = Vector3f(data.sclX, data.sclY, data.sclZ); rotation = Vector3f(ushortToDegrees(data.rotX), ushortToDegrees(data.rotY), ushortToDegrees(data.rotZ)); name = std::string(data.name, 4); // read mesh data if (data.meshOffset != 0) { stream.seekg(baseOffset + data.meshOffset, std::ios::beg); mesh = new MT5Mesh(this, stream); } // construct nodes if (data.childNodeOffset != 0) { stream.seekg(baseOffset + data.childNodeOffset, std::ios::beg); child = new MT5Node(model, stream, baseOffset, this); } if (data.nextNodeOffset != 0) { stream.seekg(baseOffset + data.nextNodeOffset, std::ios::beg); nextSibling = new MT5Node(model,stream, baseOffset, dynamic_cast<MT5Node*>(parent)); } } void MT5Node::write(std::ostream& stream) { data.id = id; data.posX = position.x; data.posY = position.y; data.posZ = position.z; data.rotX = degreesToUshort(rotation.x); data.rotY = degreesToUshort(rotation.y); data.rotZ = degreesToUshort(rotation.z); data.sclX = scale.x; data.sclY = scale.y; data.sclZ = scale.z; } } }
26.214286
108
0.659401
[ "mesh", "model" ]
8357008667d98b4e1942a39637f649d8c6b14f4e
15,227
cpp
C++
src/raftserver.cpp
hww1996/ToyRaft
6670e69634c94c952311ab550febe9553b889011
[ "MIT" ]
5
2019-10-26T01:43:40.000Z
2021-02-03T03:12:05.000Z
src/raftserver.cpp
hww1996/ToyRaft
6670e69634c94c952311ab550febe9553b889011
[ "MIT" ]
1
2019-10-06T03:34:38.000Z
2019-10-06T03:34:38.000Z
src/raftserver.cpp
hww1996/ToyRaft
6670e69634c94c952311ab550febe9553b889011
[ "MIT" ]
null
null
null
// // Created by hww1996 on 2019/10/13. // #include <grpc/grpc.h> #include <grpcpp/server.h> #include <grpcpp/server_builder.h> #include <grpcpp/server_context.h> #include <grpcpp/create_channel.h> #include <grpcpp/security/credentials.h> #include <rapidjson/document.h> #include <rapidjson/writer.h> #include <rapidjson/stringbuffer.h> #include "raftserver.h" #include "globalmutex.h" #include "raft.h" #include "raftconnect.h" #include "logger.h" #include "raftsave.h" namespace ToyRaft { std::deque<::ToyRaft::RaftClientMsg> RaftServer::requestBuf; static void makeConfigData(std::unordered_map<int, std::shared_ptr<NodeConfig> > &config, std::string &data) { // 将config变成json,并放到append的log中。 rapidjson::Value ans(rapidjson::kObjectType); rapidjson::Value raftNodes(rapidjson::kArrayType); rapidjson::Document document; rapidjson::Document::AllocatorType &alloc = document.GetAllocator(); for (auto it = config.begin(); config.end() != it; ++it) { rapidjson::Value raftNodeItem(rapidjson::kObjectType); raftNodeItem.AddMember("id", rapidjson::Value().SetInt(it->first), alloc); raftNodeItem.AddMember("innerIP", rapidjson::Value().SetString(it->second->innerIP_.c_str(), it->second->innerIP_.size(), alloc), alloc); raftNodeItem.AddMember("innerPort", rapidjson::Value().SetInt(it->second->innerPort_), alloc); raftNodeItem.AddMember("outerIP", rapidjson::Value().SetString(it->second->outerIP_.c_str(), it->second->outerIP_.size(), alloc), alloc); raftNodeItem.AddMember("outerPort", rapidjson::Value().SetInt(it->second->outerPort_), alloc); raftNodes.PushBack(raftNodeItem, alloc); } ans.AddMember("nodes", raftNodes, alloc); rapidjson::StringBuffer buff; rapidjson::Writer<rapidjson::StringBuffer> writer(buff); ans.Accept(writer); std::string tempJsonString = buff.GetString(); data.assign(tempJsonString); LOGDEBUG("make the json OK."); } static int getStatus(int64_t &leaderId, Status &state, int64_t &commitIndex, bool &canVote) { std::string statusJson; int ret = RaftSave::getInstance()->getMeta(statusJson); if (0 != ret) { return ret; } rapidjson::Document doc; doc.Parse(statusJson.c_str(), statusJson.size()); leaderId = doc["leaderId"].GetInt(); state = Status(doc["status"].GetInt()); commitIndex = doc["commitIndex"].GetInt(); canVote = doc["canVote"].GetBool(); return ret; } ::grpc::Status OuterServiceImpl::serverOutSide(::grpc::ServerContext *context, const ::ToyRaft::RaftClientMsg *request, ::ToyRaft::RaftServerMsg *response) { ::grpc::Status sta = ::grpc::Status::OK; int64_t currentLeaderId = -1; Status state = FOLLOWER; int64_t commitIndex = -1; bool canVote = false; int ret = getStatus(currentLeaderId, state, commitIndex, canVote); if (0 != ret) { response->set_sendbacktype(RaftServerMsg::RETRY); return sta; } switch (request->querytype()) { case ::ToyRaft::RaftClientMsg::APPEND: { switch (state) { case FOLLOWER: { auto nodes = RaftConfig::getNodes(); response->set_sendbacktype(RaftServerMsg::REDIRECT); ServerRedirectMsg sendRedirectMsg; if (-1 == currentLeaderId) { sendRedirectMsg.set_ip(RaftConfig::getOuterIP()); sendRedirectMsg.set_port(RaftConfig::getOuterPort()); } else { sendRedirectMsg.set_ip(nodes[currentLeaderId]->outerIP_); sendRedirectMsg.set_port(nodes[currentLeaderId]->outerPort_); } LOGDEBUG("server ip:%s,port:%d", sendRedirectMsg.ip().c_str(), sendRedirectMsg.port()); std::string sendRedirectMsgBuf; sendRedirectMsg.SerializeToString(&sendRedirectMsgBuf); response->set_serverbuf(sendRedirectMsgBuf.c_str(), sendRedirectMsgBuf.size()); return sta; } break; case CANDIDATE: { response->set_sendbacktype(RaftServerMsg::RETRY); return sta; } break; case LEADER: { LOGDEBUG("push to the requestBuf."); { std::lock_guard<std::mutex> lock(GlobalMutex::requestMutex); RaftServer::requestBuf.push_back(*request); } response->set_sendbacktype(RaftServerMsg::OK); return sta; } break; default: { response->set_sendbacktype(RaftServerMsg::UNKNOWN); return sta; } break; } } break; case ::ToyRaft::RaftClientMsg::QUERY: { ClientQueryMsg clientQueryMsg; clientQueryMsg.ParseFromString(request->clientbuf()); ServerQueryMsg serverQueryMsg; ret = RaftServer::getReadBuffer(serverQueryMsg, clientQueryMsg.startindex(), clientQueryMsg.endindex(), commitIndex); if (0 != ret) { response->set_sendbacktype(RaftServerMsg::RETRY); return sta; } response->set_sendbacktype(RaftServerMsg::OK); std::string serverQueryMsgBuf; serverQueryMsg.SerializeToString(&serverQueryMsgBuf); response->set_serverbuf(serverQueryMsgBuf.c_str(), serverQueryMsgBuf.size()); } break; case ::ToyRaft::RaftClientMsg::MEMBER: { LOGDEBUG("in the member."); switch (state) { case FOLLOWER: { auto nodes = RaftConfig::getNodes(); response->set_sendbacktype(RaftServerMsg::REDIRECT); ServerRedirectMsg sendRedirectMsg; if (-1 == currentLeaderId) { sendRedirectMsg.set_ip(RaftConfig::getOuterIP()); sendRedirectMsg.set_port(RaftConfig::getOuterPort()); } else { sendRedirectMsg.set_ip(nodes[currentLeaderId]->outerIP_); sendRedirectMsg.set_port(nodes[currentLeaderId]->outerPort_); } LOGDEBUG("server ip:%s,port:%d", sendRedirectMsg.ip().c_str(), sendRedirectMsg.port()); std::string sendRedirectMsgBuf; sendRedirectMsg.SerializeToString(&sendRedirectMsgBuf); response->set_serverbuf(sendRedirectMsgBuf.c_str(), sendRedirectMsgBuf.size()); return sta; } break; case CANDIDATE: { response->set_sendbacktype(RaftServerMsg::RETRY); return sta; } break; case LEADER: { ClientMemberChangeMsg clientMemberChangeMsg; clientMemberChangeMsg.ParseFromString(request->clientbuf()); auto configNodes = RaftConfig::getNodes(); auto changeId = clientMemberChangeMsg.id(); switch (clientMemberChangeMsg.memberchangetype()) { case ClientMemberChangeMsg::ADD: { LOGDEBUG("in the add."); if (configNodes.find(changeId) != configNodes.end()) { response->set_sendbacktype(RaftServerMsg::UNKNOWN); return sta; } configNodes[changeId] = std::make_shared<NodeConfig>(changeId, clientMemberChangeMsg.innerip(), clientMemberChangeMsg.innerport(), clientMemberChangeMsg.outerip(), clientMemberChangeMsg.outerport()); } break; case ClientMemberChangeMsg::REMOVE: { LOGDEBUG("in the remove."); if (configNodes.find(changeId) == configNodes.end()) { response->set_sendbacktype(RaftServerMsg::UNKNOWN); return sta; } configNodes.erase(changeId); } break; default: { response->set_sendbacktype(RaftServerMsg::UNKNOWN); return sta; } break; } LOGDEBUG("begin append."); std::string serializeData; makeConfigData(configNodes, serializeData); ToyRaft::ClientAppendMsg clientAppendMsg; clientAppendMsg.add_appendlog()->assign(serializeData.c_str(), serializeData.size()); std::string raftClientMsgBuf; clientAppendMsg.SerializeToString(&raftClientMsgBuf); RaftClientMsg raftClientMsg; raftClientMsg.set_querytype(ToyRaft::RaftClientMsg::MEMBER); raftClientMsg.set_clientbuf(raftClientMsgBuf.c_str(), raftClientMsgBuf.size()); LOGDEBUG("append OK."); { std::lock_guard<std::mutex> lock(GlobalMutex::requestMutex); RaftServer::requestBuf.push_back(raftClientMsg); } response->set_sendbacktype(RaftServerMsg::OK); return sta; } break; default: { response->set_sendbacktype(RaftServerMsg::UNKNOWN); return sta; } break; } } break; case ::ToyRaft::RaftClientMsg::STATUS: { ServerInnerStatusMsg serverInnerStatusMsg; std::string innerStatus; RaftSave::getInstance()->getMeta(innerStatus); serverInnerStatusMsg.set_innerstatus(innerStatus); response->set_sendbacktype(RaftServerMsg::OK); std::string serverInnerStatusMsgBuf; serverInnerStatusMsg.SerializeToString(&serverInnerStatusMsgBuf); response->set_serverbuf(serverInnerStatusMsgBuf.c_str(), serverInnerStatusMsgBuf.size()); } break; default: response->set_sendbacktype(RaftServerMsg::UNKNOWN); break; } return sta; } RaftServer::RaftServer(const std::string &raftConfigPath) { RaftConfig cs(raftConfigPath); RaftNet r; std::thread t(recvFromNet); t.detach(); } int RaftServer::serverForever(bool newJoin) { int ret = 0; Raft raft(!newJoin); while (true) { std::this_thread::sleep_for(std::chrono::seconds(3)); ret = raft.tick(); if (0 != ret) { break; } } return ret; } static void initOuterServer(const std::string &IP, int port) { std::string server_address = IP + ":"; server_address += std::to_string(port); ::ToyRaft::OuterServiceImpl service; ::grpc::ServerBuilder builder; builder.AddListeningPort(server_address, grpc::InsecureServerCredentials()); builder.RegisterService(&service); std::unique_ptr<::grpc::Server> server(builder.BuildAndStart()); server->Wait(); } int RaftServer::recvFromNet() { int ret = 0; initOuterServer(RaftConfig::getOuterIP(), RaftConfig::getOuterPort()); return ret; } int RaftServer::getNetLogs(std::vector<ToyRaft::RaftLog> &netLog) { int ret = 0; while (true) { ClientAppendMsg clientAppendMsg; RaftClientMsg::QueryType queryType; { std::lock_guard<std::mutex> lock(GlobalMutex::requestMutex); LOGDEBUG("requestBuf size:%d", requestBuf.size()); if (requestBuf.empty()) { break; } clientAppendMsg.ParseFromString(requestBuf.front().clientbuf()); queryType = requestBuf.front().querytype(); requestBuf.pop_front(); } auto Logs = clientAppendMsg.appendlog(); LOGDEBUG("log size:%d", requestBuf.size()); for (auto &Log : Logs) { RaftLog raftLog; if (ToyRaft::RaftClientMsg::MEMBER == queryType) { raftLog.set_type(::ToyRaft::RaftLog::MEMBER); } else { raftLog.set_type(::ToyRaft::RaftLog::APPEND); } raftLog.set_buf(Log.c_str(), Log.size()); netLog.push_back(raftLog); } } return ret; } int RaftServer::getReadBuffer(::ToyRaft::ServerQueryMsg &serverQueryMsg, int from, int to, int commit) { int ret = 0; if (from < 0) { return -1; } if (from >= to) { return -2; } if (to > commit + 1) { to = commit + 1; } std::vector<std::string> ans; ret = RaftSave::getInstance()->getData(from, to - from, ans); for (int i = 0; i < ans.size(); i++) { serverQueryMsg.add_appendlog(ans[i].c_str(), ans[i].size()); } serverQueryMsg.set_commitindex(commit); return ret; } } // namespace ToyRaft
44.785294
120
0.495633
[ "vector" ]
835e2e74a33b76902736f1673a30e7019bbf026b
10,617
cpp
C++
Source/Motor2D/Entity.cpp
Needlesslord/PaintWars_by_BrainDeadStudios
578985b1a41ab9f0b8c5dd087ba3bc3d3ffd2edf
[ "MIT" ]
2
2020-03-06T11:32:40.000Z
2020-03-20T12:17:30.000Z
Source/Motor2D/Entity.cpp
Needlesslord/Heathen_Games
578985b1a41ab9f0b8c5dd087ba3bc3d3ffd2edf
[ "MIT" ]
2
2020-03-03T09:56:57.000Z
2020-05-02T15:50:45.000Z
Source/Motor2D/Entity.cpp
Needlesslord/Heathen_Games
578985b1a41ab9f0b8c5dd087ba3bc3d3ffd2edf
[ "MIT" ]
1
2020-03-17T18:50:53.000Z
2020-03-17T18:50:53.000Z
#include "p2Log.h" #include <vector> #include "Entity.h" #include "j1App.h" #include "j1Render.h" #include "j1Collision.h" #include "j1Map.h" #include "j1EntityManager.h" #include "j1Pathfinding.h" #include "j1Player.h" #include "Brofiler/Brofiler.h" Entity::Entity(iPoint tile, int damage, j1Module* listeners, Entity* creator) : currentTile(tile), currLife(maxLife - damage), listener(listener), spawnedBy(creator) { if (this->currLife == 0) this->currLife = this->maxLife; isOnTheMove = false; isAlive = true; spawningProgress = 0; fow_entity = App->fow->CreateFOWEntity(currentTile, true); } Entity::~Entity() { if (entityCollider != nullptr) entityCollider->to_delete = true; } void Entity::Draw(SDL_Texture* sprites) { if (sprites != nullptr) App->render->RenderQueue(1, sprites, pos.x, pos.y, { 0, 0, size.x, size.y }); } void Entity::DebugDrawSelected() { } void Entity::OnCollision(Collider* c1, Collider* c2) { } void Entity::CalculateMovementLogic() { BROFILER_CATEGORY("Calculate Movement Logic--Entities();", Profiler::Color::Red); // If he's at the destination he doesn't have to move so we exit if (destination == currentTile) { isOnTheMove = false; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NONE; return; } /*if (App->pathfinding->IsSpawner(destination)) { for (int i = 0; i < App->pathfinding->FindClosestDestination(destination).size(); i++) { if (App->pathfinding->IsWalkable(App->pathfinding->FindClosestDestination(destination).at(i))) { target = destination; destination = App->pathfinding->FindClosestDestination(destination).at(0); break; } } }*/ int map; map = App->pathfinding->CreatePath(currentTile, destination); currentPath = *App->pathfinding->GetLastPath(); pathIterator = 1; nextTile = currentPath.at(pathIterator); if (map != -1) { isOnTheMove = true; } else { *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NONE; isOnTheMove = false; destination = currentTile; } } void Entity::MovementLogic() { BROFILER_CATEGORY("Movement Logic--Entities();", Profiler::Color::OrangeRed); if (currentTile.x < nextTile.x) { if (currentTile.y < nextTile.y) { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_SOUTH; } else if (currentTile.y > nextTile.y) { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_EAST; } else { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_SOUTH_EAST; } } else if (currentTile.x > nextTile.x) { if (currentTile.y < nextTile.y) { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_WEST; } else if (currentTile.y > nextTile.y) { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NORTH; } else { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NORTH_WEST; } } else if (currentTile.x == nextTile.x) { if (currentTile.y < nextTile.y) { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_SOUTH_WEST; } else if (currentTile.y > nextTile.y) { previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NORTH_EAST; } else { previousOrientation = unitOrientation; isOnTheMove = false; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NONE; } } } void Entity::Move(float dt) { if (App->entities->spacePressed) return; BROFILER_CATEGORY("Move--Entities();", Profiler::Color::PaleVioletRed); fPoint fNextTile = App->map->MapToWorld(nextTile.x, nextTile.y); fPoint nextTilePos; nextTilePos.x = fNextTile.x + App->map->data.tile_width / 2 - size.x / 2; nextTilePos.y = fNextTile.y + App->map->data.tile_height / 2 - size.y; if (unitOrientation == UNIT_ORIENTATION_NONE) { return; } else if (unitOrientation == UNIT_ORIENTATION_NORTH) { pos.y -= speed * dt; if (pos.y < nextTilePos.y) { pos.y = nextTilePos.y; } if (pos.x < nextTilePos.x) { pos.x += speed * dt; if (pos.x > nextTilePos.x) { pos.x = nextTilePos.x; } } else if (pos.x > nextTilePos.x) { pos.x -= speed * dt; if (pos.x < nextTilePos.x) { pos.x = nextTilePos.x; } } } else if (unitOrientation == UNIT_ORIENTATION_NORTH_EAST) { pos.x += speed * dt; pos.y -= speed * dt / 2; if (pos.x > nextTilePos.x) { pos.x = nextTilePos.x; } if (pos.y < nextTilePos.y) { pos.y = nextTilePos.y; } } else if (unitOrientation == UNIT_ORIENTATION_EAST) { pos.x += speed * dt; if (pos.x > nextTilePos.x) { pos.x = nextTilePos.x; } if (pos.y < nextTilePos.y) { pos.y += speed * dt / 2; if (pos.y > nextTilePos.y) { pos.y = nextTilePos.y; } } else if (pos.y > nextTilePos.y) { pos.y -= speed * dt / 2; if (pos.y < nextTilePos.y) { pos.y = nextTilePos.y; } } } else if (unitOrientation == UNIT_ORIENTATION_SOUTH_EAST) { pos.x += speed * dt; pos.y += speed * dt / 2; if (pos.x > nextTilePos.x) { pos.x = nextTilePos.x; } if (pos.y > nextTilePos.y) { pos.y = nextTilePos.y; } } else if (unitOrientation == UNIT_ORIENTATION_SOUTH) { pos.y += speed * dt; if (pos.y > nextTilePos.y) { pos.y = nextTilePos.y; } if (pos.x < nextTilePos.x) { pos.x += speed * dt; if (pos.x > nextTilePos.x) { pos.x = nextTilePos.x; } } else if (pos.x > nextTilePos.x) { pos.x -= speed * dt; if (pos.x < nextTilePos.x) { pos.x = nextTilePos.x; } } } else if (unitOrientation == UNIT_ORIENTATION_SOUTH_WEST) { pos.x -= speed * dt; pos.y += speed * dt / 2; if (pos.x < nextTilePos.x) { pos.x = nextTilePos.x; } if (pos.y > nextTilePos.y) { pos.y = nextTilePos.y; } } else if (unitOrientation == UNIT_ORIENTATION_WEST) { pos.x -= speed * dt; if (pos.x < nextTilePos.x) { pos.x = nextTilePos.x; } if (pos.y < nextTilePos.y) { pos.y += speed * dt / 2; if (pos.y > nextTilePos.y) { pos.y = nextTilePos.y; } } else if (pos.y > nextTilePos.y) { pos.y -= speed * dt / 2; if (pos.y < nextTilePos.y) { pos.y = nextTilePos.y; } } } else if (unitOrientation == UNIT_ORIENTATION_NORTH_WEST) { pos.x -= speed * dt; pos.y -= speed * dt / 2; if (pos.x < nextTilePos.x) { pos.x = nextTilePos.x; } if (pos.y < nextTilePos.y) { pos.y = nextTilePos.y; } } iPoint mapPosition = App->map->WorldToMap(pos.x - App->map->data.tile_width / 2 + GetSize().x / 2, pos.y - App->map->data.tile_height / 2 + GetSize().y); currentTile.x = mapPosition.x + 1; currentTile.y = mapPosition.y; //mapPosition = App->map->WorldToMap(nextTilePos.x - App->map->data.tile_width / 2 + GetSize().x / 2, nextTilePos.y - App->map->data.tile_height / 2 + GetSize().y); //nextTile.x = mapPosition.x + 1; //nextTile.y = mapPosition.y; if (currentTile == nextTile) { if (currentTile != destination) pathIterator++; } if (pathIterator < currentPath.size()) { nextTile = currentPath.at(pathIterator); } fPoint tileWorldPosition = App->map->MapToWorld(currentTile.x, currentTile.y); /*pos.x == tileWorldPosition.x + App->map->data.tile_width / 2 - GetSize().x / 2 && pos.y == tileWorldPosition.y + App->map->data.tile_height / 2 - GetSize().y*/ if (currentTile == destination && pos.x == tileWorldPosition.x + App->map->data.tile_width / 2 - GetSize().x / 2 && pos.y == tileWorldPosition.y + App->map->data.tile_height / 2 - GetSize().y) { isOnTheMove = false; previousOrientation = unitOrientation; *(UNIT_ORIENTATION*)&unitOrientation = UNIT_ORIENTATION_NONE; } } void Entity::SetDestination(iPoint des) { this->destination = des; } void Entity::SpawnEntity(ENTITY_TYPE type) {} void Entity::ExtractPaint(float dt) {} void Entity::ExtractWood(float dt) {} void Entity::ExtractTitanium(float dt) {} void Entity::ExtractMetalScrap(float dt) {} void Entity::Attack(Entity* target, float dt) {} // ------------------------------------------------------------- // Position and size void Entity::SetPos(fPoint pos) { this->pos = pos; } fPoint Entity::GetPos() const { return pos; } iPoint Entity::GetSize() const { return size; } iPoint Entity::GetOffsetSize() const { return offsetSize; } void Entity::SetMaxLife(int life) { maxLife = life; } // Life and damage float Entity::GetMaxLife() const { return maxLife; } void Entity::SetCurrLife(int currLife) { this->currLife = currLife; } float Entity::GetCurrLife() const { return currLife; } void Entity::ApplyDamage(float damage) { currLife -= damage; if (currLife < 0) currLife = 0; } void Entity::ApplyHealth(float health) { if (currLife + health >= maxLife) currLife = maxLife; else currLife += health; } // Collision Collider* Entity::GetEntityCollider() const { return entityCollider; } bool Entity::CreateEntityCollider(fPoint pos, Entity* entity) { BROFILER_CATEGORY("Create Entity Collider--Entities();", Profiler::Color::IndianRed); COLLIDER_TYPE collType = COLLIDER_ALLY_BUILDING; SDL_Rect rect = { pos.x, pos.y, GetSize().x, GetSize().y }; entityCollider = App->col->AddCollider(rect, collType, entity, App->entities); return true; } void Entity::ShowHealthBar() { if (isAlive) { if (GetCurrLife() != GetMaxLife()) { App->render->RenderQueue(1, App->entities->zeroLifeTexture, pos.x, pos.y - 20 - GetSize().y / 4, { 0, 0, GetSize().x, 10 }); } App->render->RenderQueue(1, App->entities->fullLifeTexture, pos.x, pos.y - 20 - GetSize().y / 4, { 0, 0, (int)((currLife / maxLife)*GetSize().x), 10 }); } } void Entity::ShowProgressBar() { if (entityCategory == ENTITY_CATEGORY_STATIC_ENTITY) { App->render->RenderQueue(1, App->entities->zeroProgressTexture, pos.x, pos.y - 20 - GetSize().y / 4, { 0, 0, GetSize().x, 30 }); App->render->RenderQueue(1, App->entities->progressTexture, pos.x, pos.y - 20 - GetSize().y / 4, { 0, 0, (int)((constructionProgress / constructionTime) * GetSize().x), 30 }); } else if (entityCategory == ENTITY_CATEGORY_DYNAMIC_ENTITY) { App->render->RenderQueue(1, App->entities->zeroProgressTexture, spawnedBy->pos.x, spawnedBy->pos.y - 20 - spawnedBy->GetSize().y / 4, { 0, 0, spawnedBy->GetSize().x, 30 }); App->render->RenderQueue(1, App->entities->progressTexture, spawnedBy->pos.x, spawnedBy->pos.y - 20 - spawnedBy->GetSize().y / 4, { 0, 0, (int)((spawningProgress / spawningTime) * spawnedBy->GetSize().x), 30 }); } }
23.080435
213
0.659885
[ "render", "vector" ]
835f59cacddee9b48d820c31933f582f67dd2b20
707
cpp
C++
src/SlicerCore.cpp
louisja1/SlicerCore
29c658c606d52d0fd11f0e1c10db98c4624da1cc
[ "MIT" ]
2
2018-06-26T01:28:48.000Z
2018-06-26T08:04:10.000Z
src/SlicerCore.cpp
louisja1/SlicerCore
29c658c606d52d0fd11f0e1c10db98c4624da1cc
[ "MIT" ]
null
null
null
src/SlicerCore.cpp
louisja1/SlicerCore
29c658c606d52d0fd11f0e1c10db98c4624da1cc
[ "MIT" ]
1
2018-06-26T10:56:15.000Z
2018-06-26T10:56:15.000Z
// // Created by timemachine on 18-6-26. // #include "SlicerCore.h" #include "configManager.h" #include "FilterRender.h" #include <sys/stat.h> #include <unistd.h> #include <set> void SlicerCore::initFolder() { //clear last time //rmdir(); //mkdir //std::cerr << "init: mkdir" << std::endl; //mkdir("~/.slicer",S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); //ConfigManager::idSet = std::set<int64_t>(); } void* SlicerCore::update(uint64_t id, void *data, uint width, uint height) { Config config; config = ConfigManager::loadConfig(id); return FilterRender::render(data, width, height, &config); //filterIt(data, width, height, config); } bool SlicerCore::test() { ConfigManager::test(); }
16.44186
74
0.670438
[ "render" ]
8370eddc95748136dc0526cac72048e5c7bb8cec
4,171
cpp
C++
lib/seldon/lib/Compil/Seldon/Pardiso.cpp
HongyuHe/lsolver
c791bf192308ba6b564cb60cb3991d2e72093cd7
[ "Apache-2.0" ]
7
2021-01-31T23:20:07.000Z
2021-09-09T20:54:15.000Z
lib/seldon/lib/Compil/Seldon/Pardiso.cpp
HongyuHe/lsolver
c791bf192308ba6b564cb60cb3991d2e72093cd7
[ "Apache-2.0" ]
1
2021-06-07T07:52:38.000Z
2021-08-13T20:40:55.000Z
lib/seldon/lib/Compil/Seldon/Pardiso.cpp
HongyuHe/lsolver
c791bf192308ba6b564cb60cb3991d2e72093cd7
[ "Apache-2.0" ]
null
null
null
#include "SeldonFlag.hxx" #include "SeldonSolverHeader.hxx" #include "SeldonSolverInline.hxx" #ifndef SELDON_WITH_COMPILED_LIBRARY #include "computation/interfaces/direct/Pardiso.cxx" #endif namespace Seldon { SELDON_EXTERN template class MatrixPardiso<double>; SELDON_EXTERN template class MatrixPardiso<complex<double> >; SELDON_EXTERN template void MatrixPardiso<double>::FactorizeMatrix(Matrix<double, Symmetric, RowSymSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, RowSymSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<double>::FactorizeMatrix(Matrix<double, Symmetric, ArrayRowSymSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<double>::FactorizeMatrix(Matrix<double, General, RowSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, RowSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<double>::FactorizeMatrix(Matrix<double, General, ArrayRowSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, ArrayRowSparse>&, bool); SELDON_EXTERN template void MatrixPardiso<double>::Solve(Vector<double>&); SELDON_EXTERN template void MatrixPardiso<double>::Solve(const SeldonTranspose&, Vector<double>&); SELDON_EXTERN template void MatrixPardiso<double>::Solve(const SeldonTranspose&, Matrix<double, General, ColMajor>&); SELDON_EXTERN template void MatrixPardiso<complex<double> >::Solve(Vector<complex<double> >&); SELDON_EXTERN template void MatrixPardiso<complex<double> >::Solve(const SeldonTranspose&, Vector<complex<double> >&); SELDON_EXTERN template void MatrixPardiso<complex<double> >::Solve(const SeldonTranspose&, Matrix<complex<double> , General, ColMajor>&); SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, RowSymSparse>&, MatrixPardiso<double>&, bool); SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, RowSymSparse>&, MatrixPardiso<complex<double> >&, bool); SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, ArrayRowSymSparse>&, MatrixPardiso<double>&, bool); SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, MatrixPardiso<complex<double> >&, bool); SELDON_EXTERN template void GetLU(Matrix<double, General, RowSparse>&, MatrixPardiso<double>&, bool); SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, RowSparse>&, MatrixPardiso<complex<double> >&, bool); SELDON_EXTERN template void GetLU(Matrix<double, General, ArrayRowSparse>&, MatrixPardiso<double>&, bool); SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, ArrayRowSparse>&, MatrixPardiso<complex<double> >&, bool); SELDON_EXTERN template void SolveLU(MatrixPardiso<double>&, Vector<double>&); SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPardiso<double>&, Vector<double>&); SELDON_EXTERN template void SolveLU(MatrixPardiso<double>&, Matrix<double, General, ColMajor>&); SELDON_EXTERN template void SolveLU(MatrixPardiso<double>&, Vector<complex<double> >&); SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPardiso<double>&, Vector<complex<double> >&); SELDON_EXTERN template void SolveLU(MatrixPardiso<complex<double> >&, Vector<double>&); SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPardiso<complex<double> >&, Vector<double>&); SELDON_EXTERN template void SolveLU(MatrixPardiso<complex<double> >&, Vector<complex<double> >&); SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPardiso<complex<double> >&, Vector<complex<double> >&); SELDON_EXTERN template void SolveLU(MatrixPardiso<complex<double> >&, Matrix<complex<double> , General, ColMajor>&); SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPardiso<complex<double> >&, Matrix<complex<double> , General, ColMajor>&); }
68.377049
142
0.786142
[ "vector" ]
837c31b7247411a604b3700dd038b1b93fb7e571
1,249
hpp
C++
btcnew/node/daemonconfig.hpp
thebitcoinnew/btcnew-node
59c8e3885ff269befaf3a8f82fe63a0c674cc27b
[ "BSD-2-Clause" ]
null
null
null
btcnew/node/daemonconfig.hpp
thebitcoinnew/btcnew-node
59c8e3885ff269befaf3a8f82fe63a0c674cc27b
[ "BSD-2-Clause" ]
null
null
null
btcnew/node/daemonconfig.hpp
thebitcoinnew/btcnew-node
59c8e3885ff269befaf3a8f82fe63a0c674cc27b
[ "BSD-2-Clause" ]
null
null
null
#pragma once #include <btcnew/lib/errors.hpp> #include <btcnew/node/node_pow_server_config.hpp> #include <btcnew/node/node_rpc_config.hpp> #include <btcnew/node/nodeconfig.hpp> #include <btcnew/node/openclconfig.hpp> #include <vector> namespace btcnew { class jsonconfig; class tomlconfig; class daemon_config { public: daemon_config () = default; daemon_config (boost::filesystem::path const & data_path); btcnew::error deserialize_json (bool &, btcnew::jsonconfig &); btcnew::error serialize_json (btcnew::jsonconfig &); btcnew::error deserialize_toml (btcnew::tomlconfig &); btcnew::error serialize_toml (btcnew::tomlconfig &); bool rpc_enable{ false }; btcnew::node_rpc_config rpc; btcnew::node_config node; bool opencl_enable{ false }; btcnew::opencl_config opencl; btcnew::node_pow_server_config pow_server; boost::filesystem::path data_path; unsigned json_version () const { return 2; } }; btcnew::error read_node_config_toml (boost::filesystem::path const &, btcnew::daemon_config & config_a, std::vector<std::string> const & config_overrides = std::vector<std::string> ()); btcnew::error read_and_update_daemon_config (boost::filesystem::path const &, btcnew::daemon_config & config_a, btcnew::jsonconfig & json_a); }
31.225
185
0.765412
[ "vector" ]
8384fe8e4523b35fc44c7ce3faeff0d85bf118b4
2,022
cpp
C++
aws-cpp-sdk-iotanalytics/source/model/EstimatedResourceSize.cpp
curiousjgeorge/aws-sdk-cpp
09b65deba03cfbef9a1e5d5986aa4de71bc03cd8
[ "Apache-2.0" ]
2
2019-03-11T15:50:55.000Z
2020-02-27T11:40:27.000Z
aws-cpp-sdk-iotanalytics/source/model/EstimatedResourceSize.cpp
curiousjgeorge/aws-sdk-cpp
09b65deba03cfbef9a1e5d5986aa4de71bc03cd8
[ "Apache-2.0" ]
null
null
null
aws-cpp-sdk-iotanalytics/source/model/EstimatedResourceSize.cpp
curiousjgeorge/aws-sdk-cpp
09b65deba03cfbef9a1e5d5986aa4de71bc03cd8
[ "Apache-2.0" ]
1
2019-01-18T13:03:55.000Z
2019-01-18T13:03:55.000Z
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #include <aws/iotanalytics/model/EstimatedResourceSize.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace IoTAnalytics { namespace Model { EstimatedResourceSize::EstimatedResourceSize() : m_estimatedSizeInBytes(0.0), m_estimatedSizeInBytesHasBeenSet(false), m_estimatedOnHasBeenSet(false) { } EstimatedResourceSize::EstimatedResourceSize(JsonView jsonValue) : m_estimatedSizeInBytes(0.0), m_estimatedSizeInBytesHasBeenSet(false), m_estimatedOnHasBeenSet(false) { *this = jsonValue; } EstimatedResourceSize& EstimatedResourceSize::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("estimatedSizeInBytes")) { m_estimatedSizeInBytes = jsonValue.GetDouble("estimatedSizeInBytes"); m_estimatedSizeInBytesHasBeenSet = true; } if(jsonValue.ValueExists("estimatedOn")) { m_estimatedOn = jsonValue.GetDouble("estimatedOn"); m_estimatedOnHasBeenSet = true; } return *this; } JsonValue EstimatedResourceSize::Jsonize() const { JsonValue payload; if(m_estimatedSizeInBytesHasBeenSet) { payload.WithDouble("estimatedSizeInBytes", m_estimatedSizeInBytes); } if(m_estimatedOnHasBeenSet) { payload.WithDouble("estimatedOn", m_estimatedOn.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace IoTAnalytics } // namespace Aws
23.511628
78
0.75816
[ "model" ]
83904cc0521a88d1b64e2408f6c356c0583d8483
11,009
hpp
C++
gtl/box3.hpp
mojocorp/gtl
b8d5c3a50a50d13ac85243d0738e4bfcbd71b778
[ "MIT" ]
3
2017-02-05T12:12:15.000Z
2019-06-15T16:24:57.000Z
gtl/box3.hpp
mojocorp/gtl
b8d5c3a50a50d13ac85243d0738e4bfcbd71b778
[ "MIT" ]
null
null
null
gtl/box3.hpp
mojocorp/gtl
b8d5c3a50a50d13ac85243d0738e4bfcbd71b778
[ "MIT" ]
1
2016-06-25T04:29:53.000Z
2016-06-25T04:29:53.000Z
#pragma once #include <gtl/gtl.hpp> #include <gtl/matrix4.hpp> #include <gtl/plane.hpp> #include <gtl/ray.hpp> #include <gtl/vec3.hpp> namespace gtl { // forward declaration template <typename Type> class plane; template <typename Type> class ray; /*! \class box3 box3.hpp geometry/box3.hpp \brief Axis-Aligned 3D Bounding Box Class.. \ingroup base This box class is used by many other classes. \sa xfbox3 */ template <typename Type> class box3 { public: //! The default constructor makes an empty box. box3() { makeEmpty(); } //! Constructs a box with the given corners. box3(const vec3<Type>& a_min, const vec3<Type>& a_max) : m_min(a_min) , m_max(a_max) { } //! Reset the boundaries of the box with the given corners. void setBounds(const vec3<Type>& a_min, const vec3<Type>& a_max) { m_min = a_min; m_max = a_max; } //! Check if this has been marked as an empty box. \sa makeEmpty(). bool isEmpty() const { return (m_max[0] < m_min[0] || m_max[1] < m_min[1] || m_max[2] < m_min[2]); } //! Marks this as an empty box. \sa isEmpty(). void makeEmpty() { m_min = vec3<Type>::max(); m_max = -vec3<Type>::max(); } //! Returns the lower left corner of the box. \sa getCenter(), getMax(). const vec3<Type>& getMin() const { return m_min; } //! Returns the upper right corner of the box. \sa getMin(). const vec3<Type>& getMax() const { return m_max; } //! Returns width, height and depth of box. vec3<Type> getSize() const { return m_max - m_min; } //! Returns the center point of the box. vec3<Type> getCenter() const { return vec3<Type>((m_max[0] + m_min[0]) * 0.5f, (m_max[1] + m_min[1]) * 0.5f, (m_max[2] + m_min[2]) * 0.5f); } //! Extend the boundaries of the box by the given point. void extendBy(const vec3<Type>& a_point) { if (isEmpty()) { setBounds(a_point, a_point); } else { if (a_point[0] < m_min[0]) m_min[0] = a_point[0]; if (a_point[1] < m_min[1]) m_min[1] = a_point[1]; if (a_point[2] < m_min[2]) m_min[2] = a_point[2]; if (a_point[0] > m_max[0]) m_max[0] = a_point[0]; if (a_point[1] > m_max[1]) m_max[1] = a_point[1]; if (a_point[2] > m_max[2]) m_max[2] = a_point[2]; } } //! Extend the boundaries of the box by the given \a a_box parameter. void extendBy(const box3<Type>& a_box) { if (isEmpty()) { *this = a_box; } else { extendBy(a_box.getMin()); extendBy(a_box.getMax()); } } //! Give the volume of the box (0 for an empty box) Type getVolume() const { if (isEmpty()) return 0.0; return (m_max[0] - m_min[0]) * (m_max[1] - m_min[1]) * (m_max[2] - m_min[2]); } //! Transforms box3 by matrix, enlarging box3 to contain result. void transform(const matrix4<Type>& m) { // a transformed empty box is still empty if (isEmpty()) return; vec3<Type> corners[8]; corners[0] = m_min; corners[1][0] = m_min[0]; corners[1][1] = m_max[1]; corners[1][2] = m_min[2]; corners[2][0] = m_max[0]; corners[2][1] = m_max[1]; corners[2][2] = m_min[2]; corners[3][0] = m_max[0]; corners[3][1] = m_min[1]; corners[3][2] = m_min[2]; corners[4] = m_max; corners[5][0] = m_min[0]; corners[5][1] = m_max[1]; corners[5][2] = m_max[2]; corners[6][0] = m_min[0]; corners[6][1] = m_min[1]; corners[6][2] = m_max[2]; corners[7][0] = m_max[0]; corners[7][1] = m_min[1]; corners[7][2] = m_max[2]; box3<Type> newbox; for (int i = 0; i < 8; ++i) { m.multVecMatrix(corners[i], corners[i]); newbox.extendBy(corners[i]); } setBounds(newbox.m_min, newbox.m_max); } //! Check if \a a_point lies within the boundaries of this box. bool intersect(const vec3<Type>& a_point) const { return !(a_point[0] < m_min[0] || a_point[0] > m_max[0] || a_point[1] < m_min[1] || a_point[1] > m_max[1] || a_point[2] < m_min[2] || a_point[2] > m_max[2]); } //! Check if the given box lies wholly or partly within the boundaries of this box. bool intersect(const box3<Type>& a_box) const { if ((m_max[0] < a_box.m_min[0]) || (m_min[0] > a_box.m_max[0]) || (m_max[1] < a_box.m_min[1]) || (m_min[1] > a_box.m_max[1]) || (m_max[2] < a_box.m_min[2]) || (m_min[2] > a_box.m_max[2])) { return false; } return true; } //! Check if the given ray intersect the box. bool intersect(const ray<Type>& a_ray, Type& tmin, Type& tmax) const { // Amy Williams, Steve Barrus, R. Keith Morley, and Peter Shirley // "An Efficient and Robust ray-Box Intersection Algorithm" // Journal of graphics tools, 10(1):49-54, 2005 if (isEmpty()) return false; const vec3<Type> inv_direction(1 / a_ray.getDirection()[0], 1 / a_ray.getDirection()[1], 1 / a_ray.getDirection()[2]); const vec3<int> sign(inv_direction[0] < 0, inv_direction[1] < 0, inv_direction[2] < 0); tmin = ((sign[0] ? m_max : m_min).x - a_ray.getOrigin().x) * inv_direction.x; tmax = (((1 - sign[0]) ? m_max : m_min).x - a_ray.getOrigin().x) * inv_direction.x; const Type tymin = ((sign[1] ? m_max : m_min).y - a_ray.getOrigin().y) * inv_direction.y; const Type tymax = (((1 - sign[1]) ? m_max : m_min).y - a_ray.getOrigin().y) * inv_direction.y; if ((tmin > tymax) || (tymin > tmax)) return false; if (tymin > tmin) tmin = tymin; if (tymax < tmax) tmax = tymax; const Type tzmin = ((sign[2] ? m_max : m_min).z - a_ray.getOrigin().z) * inv_direction.z; const Type tzmax = (((1 - sign[2]) ? m_max : m_min).z - a_ray.getOrigin().z) * inv_direction.z; if ((tmin > tzmax) || (tzmin > tmax)) return false; if (tzmin > tmin) tmin = tzmin; if (tzmax < tmax) tmax = tzmax; return (tmin >= 0 && tmax >= 1); } //! Check if the given plane intersect the box. bool intersect(const plane<Type>& a_plane) const { // Empty boxes can cause problems. if (isEmpty()) return false; const vec3<Type>& pnorm = a_plane.getNormal(); // Use separating axis theorem to test overlap. const vec3<Type> vmin(pnorm[0] > 0.0 ? m_min[0] : m_max[0], pnorm[1] > 0.0 ? m_min[1] : m_max[1], pnorm[2] > 0.0 ? m_min[2] : m_max[2]); if (a_plane.isInHalfSpace(vmin)) return false; const vec3<Type> vmax(pnorm[0] > 0.0 ? m_max[0] : m_min[0], pnorm[1] > 0.0 ? m_max[1] : m_min[1], pnorm[2] > 0.0 ? m_max[2] : m_min[2]); if (a_plane.isInHalfSpace(vmax)) return true; return false; } //! Check if the given triangle intersect the box. bool intersect(const vec3<Type>& a_p0, const vec3<Type>& a_p1, const vec3<Type>& a_p2) const { // "Fast 3D Triangle-Box Overlap Testing" // Tomas Akenine-Moller // Journal of Graphics Tools // Bullet 1: box3<Type> tribox; tribox.extendBy(a_p0); tribox.extendBy(a_p1); tribox.extendBy(a_p2); if (!this->intersect(tribox)) return false; const vec3<Type> boxcenter = this->getCenter(); // move everything so that the boxcenter is in (0,0,0) const vec3<Type> v[3] = { a_p0 - boxcenter, a_p1 - boxcenter, a_p2 - boxcenter }; // compute triangle edges const vec3<Type> e[3] = { v[1] - v[0], v[2] - v[1], v[0] - v[2] }; // Bullet 2: const vec3<Type> normal = e[0].cross(e[1]); if (!this->intersect(plane<Type>(normal, a_p0))) return false; // Bullet 3: const vec3<Type> boxhalfsize = this->getSize() * 0.5f; const Type f[3][3] = { { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } }; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { const vec3<Type> a = e[i].cross(f[j]); const float p0 = a.dot(v[0]); const float p1 = a.dot(v[1]); const float p2 = a.dot(v[2]); const float min = min3(p0, p1, p2); const float max = max3(p0, p1, p2); float radius = std::abs(a[0]) * boxhalfsize[0] + std::abs(a[1]) * boxhalfsize[1] + std::abs(a[2]) * boxhalfsize[2]; if (min > radius || max < -radius) return false; } } return true; } //! Check \a b1 and \a b2 for equality. friend bool operator==(const box3<Type>& b1, const box3<Type>& b2) { return b1.getMin() == b2.getMin() && b1.getMax() == b2.getMax(); } //! Check \a b1 and \a b2 for inequality. friend bool operator!=(const box3<Type>& b1, const box3<Type>& b2) { return !(b1 == b2); } private: vec3<Type> m_min; vec3<Type> m_max; }; typedef box3<int> box3i; typedef box3<float> box3f; typedef box3<double> box3d; } // namespace gtl
33.769939
201
0.46244
[ "geometry", "transform", "3d" ]
83939549e7b8521ab040d89503ac6a351f4a2a39
4,658
cc
C++
subt_ros/src/SetRateRelay.cc
jfkeller/subt_explorer_canary1_sensor_config_1
1f0419130b79f48c66e83c084e704e521782a95a
[ "ECL-2.0", "Apache-2.0" ]
173
2020-04-09T18:39:39.000Z
2022-03-15T06:15:07.000Z
subt_ros/src/SetRateRelay.cc
jfkeller/subt_explorer_canary1_sensor_config_1
1f0419130b79f48c66e83c084e704e521782a95a
[ "ECL-2.0", "Apache-2.0" ]
538
2020-04-09T18:34:04.000Z
2022-02-20T09:53:17.000Z
subt_ros/src/SetRateRelay.cc
jfkeller/subt_explorer_canary1_sensor_config_1
1f0419130b79f48c66e83c084e704e521782a95a
[ "ECL-2.0", "Apache-2.0" ]
89
2020-04-14T20:46:48.000Z
2022-03-14T16:45:30.000Z
/* * Copyright (C) 2019 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include <ros/ros.h> #include <ignition/msgs/double.pb.h> #include <subt_msgs/SetRate.h> #include <ignition/common/Util.hh> #include <ignition/transport/Node.hh> /// \brief This is a Ign-ROS relay for set_rate service for cameras /// (added in https://github.com/ignitionrobotics/ign-sensors/pull/95). /// /// ROS parameters: /// - ~service string Full name of the Ignition set_rate service. /// - ~timeout uint Timeout for calling the service (in ms). Default is 1000. /// /// Advertised ROS services: /// - ~${service} (subt_msgs/SetRate) Set rate of the connected camera to the given /// value. The ROS service is named the same as /// the Ignition service it is relayed to. class SetRateRelay { /// \brief Constructor public: SetRateRelay(); /// \brief Destructor public: ~SetRateRelay() = default; /// \brief ROS service callback triggered when the service is called. /// \param[in] _req The message containing the desired publishing rate for /// a camera. /// \param[out] _res The response message. public: bool OnSetRateCall(subt_msgs::SetRate::Request &_req, subt_msgs::SetRate::Response &_res); /// \brief Ignition Transport node. public: ignition::transport::Node node; /// \brief The ROS node handler used for private communications. public: ros::NodeHandle pnh; /// \brief ROS service to receive a call to set camera rate. public: ros::ServiceServer setRateService; /// \brief Name of the set_rate service in both Ignition Transport and ROS. public: std::string serviceName; }; ////////////////////////////////////////////////// SetRateRelay::SetRateRelay() : pnh("~") { if (!this->pnh.getParam("service", this->serviceName)) { ROS_ERROR("Cannot operate without parameter '~service' set to the path to the Ignition " "Transport service set_rate for the camera."); ros::shutdown(); return; } std::string topicStats; ignition::common::env("IGN_TRANSPORT_TOPIC_STATISTICS", topicStats, true); std::vector<std::string> services; bool firstLoop {true}; bool waitedAtLeastOnce = false; while (ros::ok() && std::find(services.begin(), services.end(), this->serviceName) == services.end()) { if (firstLoop) { firstLoop = false; } else { std::string topicStatsWarning; if (topicStats == "1" && waitedAtLeastOnce) { topicStatsWarning = " IGN_TRANSPORT_TOPIC_STATISTICS is set to 1. Make sure all parts of the simulator " "run with this setting, otherwise the parts with different values of this variable " "would not be able to communicate with each other."; } ROS_WARN_STREAM_DELAYED_THROTTLE(60.0, "Waiting for ignition service " << this->serviceName << " to appear." << topicStatsWarning); ros::WallDuration(1, 0).sleep(); waitedAtLeastOnce = true; } this->node.ServiceList(services); } if (!ros::ok()) return; if (waitedAtLeastOnce) ROS_INFO_STREAM("Ignition Service " << this->serviceName << " found."); this->setRateService = this->pnh.advertiseService( this->serviceName, &SetRateRelay::OnSetRateCall, this); ROS_INFO_STREAM("Started set_rate relay from Ign service " << this->serviceName << " to ROS service " << this->setRateService.getService()); } ///////////////////////////////////////////////// bool SetRateRelay::OnSetRateCall(subt_msgs::SetRate::Request &_req, subt_msgs::SetRate::Response &_res) { ignition::msgs::Double req; req.set_data(_req.rate); ROS_DEBUG_STREAM("Relaying " << this->setRateService.getService() << ": " << _req); // Pass the request onto ignition transport return this->node.Request(this->serviceName, req); } ////////////////////////////////////////////////// int main(int argc, char * argv[]) { ros::init(argc, argv, "subt_set_rate_relay"); SetRateRelay relay; ros::spin(); return 0; }
33.035461
112
0.649206
[ "vector" ]
8b585e01f67804dc2b5f94a593e2a46d67af953a
3,204
cpp
C++
tests/test_audio_processor.cpp
CyberSinh/chromaprint
3dbc9adeec86f1bafc7a05969766562b9217deac
[ "MIT" ]
582
2016-06-14T14:49:36.000Z
2022-03-27T16:17:57.000Z
tests/test_audio_processor.cpp
CyberSinh/chromaprint
3dbc9adeec86f1bafc7a05969766562b9217deac
[ "MIT" ]
72
2016-07-28T14:27:55.000Z
2022-03-19T18:32:44.000Z
tests/test_audio_processor.cpp
CyberSinh/chromaprint
3dbc9adeec86f1bafc7a05969766562b9217deac
[ "MIT" ]
102
2016-08-21T17:36:10.000Z
2022-02-13T15:35:44.000Z
#include <gtest/gtest.h> #include <algorithm> #include <vector> #include <fstream> #include "test_utils.h" #include "audio_processor.h" #include "audio_buffer.h" #include "utils.h" using namespace chromaprint; TEST(AudioProcessor, Accessors) { std::vector<short> data = LoadAudioFile("data/test_mono_44100.raw"); AudioBuffer buffer; AudioBuffer buffer2; AudioProcessor processor(44100, &buffer); EXPECT_EQ(44100, processor.target_sample_rate()); EXPECT_EQ(&buffer, processor.consumer()); processor.set_target_sample_rate(11025); EXPECT_EQ(11025, processor.target_sample_rate()); processor.set_consumer(&buffer2); EXPECT_EQ(&buffer2, processor.consumer()); } TEST(AudioProcessor, PassThrough) { std::vector<short> data = LoadAudioFile("data/test_mono_44100.raw"); AudioBuffer buffer; AudioProcessor processor(44100, &buffer); processor.Reset(44100, 1); processor.Consume(data.data(), data.size()); processor.Flush(); ASSERT_EQ(data.size(), buffer.data().size()); for (size_t i = 0; i < data.size(); i++) { ASSERT_EQ(data[i], buffer.data()[i]) << "Signals differ at index " << i; } } TEST(AudioProcessor, StereoToMono) { std::vector<short> data1 = LoadAudioFile("data/test_stereo_44100.raw"); std::vector<short> data2 = LoadAudioFile("data/test_mono_44100.raw"); AudioBuffer buffer; AudioProcessor processor(44100, &buffer); processor.Reset(44100, 2); processor.Consume(data1.data(), data1.size()); processor.Flush(); ASSERT_EQ(data2.size(), buffer.data().size()); for (size_t i = 0; i < data2.size(); i++) { ASSERT_EQ(data2[i], buffer.data()[i]) << "Signals differ at index " << i; } } TEST(AudioProcessor, ResampleMono) { std::vector<short> data1 = LoadAudioFile("data/test_mono_44100.raw"); std::vector<short> data2 = LoadAudioFile("data/test_mono_11025.raw"); AudioBuffer buffer; AudioProcessor processor(11025, &buffer); processor.Reset(44100, 1); processor.Consume(data1.data(), data1.size()); processor.Flush(); ASSERT_EQ(data2.size(), buffer.data().size()); for (size_t i = 0; i < data2.size(); i++) { ASSERT_EQ(data2[i], buffer.data()[i]) << "Signals differ at index " << i; } } TEST(AudioProcessor, ResampleMonoNonInteger) { std::vector<short> data1 = LoadAudioFile("data/test_mono_44100.raw"); std::vector<short> data2 = LoadAudioFile("data/test_mono_8000.raw"); AudioBuffer buffer; AudioProcessor processor(8000, &buffer); processor.Reset(44100, 1); processor.Consume(data1.data(), data1.size()); processor.Flush(); ASSERT_EQ(data2.size(), buffer.data().size()); for (size_t i = 0; i < data2.size(); i++) { ASSERT_NEAR(data2[i], buffer.data()[i], 3) << "Signals differ at index " << i; } } TEST(AudioProcessor, StereoToMonoAndResample) { std::vector<short> data1 = LoadAudioFile("data/test_stereo_44100.raw"); std::vector<short> data2 = LoadAudioFile("data/test_mono_11025.raw"); AudioBuffer buffer; AudioProcessor processor(11025, &buffer); processor.Reset(44100, 2); processor.Consume(data1.data(), data1.size()); processor.Flush(); ASSERT_EQ(data2.size(), buffer.data().size()); for (size_t i = 0; i < data2.size(); i++) { ASSERT_EQ(data2[i], buffer.data()[i]) << "Signals differ at index " << i; } }
28.353982
80
0.71005
[ "vector" ]
8b58e75c9c5b4fd4779e32e5a0bd9102b68f75cc
12,342
cpp
C++
src/src/map_renderer.cpp
N4G170/pathfind_ui
63ef3536a8efa407e4de04737c70034fc17c7b40
[ "MIT" ]
null
null
null
src/src/map_renderer.cpp
N4G170/pathfind_ui
63ef3536a8efa407e4de04737c70034fc17c7b40
[ "MIT" ]
null
null
null
src/src/map_renderer.cpp
N4G170/pathfind_ui
63ef3536a8efa407e4de04737c70034fc17c7b40
[ "MIT" ]
null
null
null
#include "map_renderer.hpp" #include <utility> #include <stdexcept> #include "message_writer.hpp" //<f> Constructors & operator= MapRenderer::MapRenderer(SDL_Renderer* renderer, ControlFlags* control_flags): m_renderer{renderer}, m_control_flags{control_flags} { LoadGridCells(); } MapRenderer::~MapRenderer() noexcept { } MapRenderer::MapRenderer(const MapRenderer& other) { } MapRenderer::MapRenderer(MapRenderer&& other) noexcept { } MapRenderer& MapRenderer::operator=(const MapRenderer& other) { if(this != &other)//not same ref { auto tmp(other); *this = std::move(tmp); } return *this; } MapRenderer& MapRenderer::operator=(MapRenderer&& other) noexcept { if(this != &other)//not same ref { //move here } return *this; } //</f> /Constructors & operator= //<f> Getters/Setters void MapRenderer::ResizeVector(int size) { std::lock_guard<std::mutex> lock(render_mutex); m_grid_ui.resize(size); for(int i = 0; i < size; i++) m_grid_ui[i] = DrawData{false, false, 0}; } void MapRenderer::SetStartNode(int index) { std::lock_guard<std::mutex> lock(render_mutex); m_grid_ui[index].start_or_target = 1; } void MapRenderer::SetTargetNode(int index) { std::lock_guard<std::mutex> lock(render_mutex); m_grid_ui[index].start_or_target = 2; } void MapRenderer::SetVisited(int index) { std::lock_guard<std::mutex> lock(render_mutex); m_grid_ui[index].visited = true; } void MapRenderer::SetToCheck(int index) { std::lock_guard<std::mutex> lock(render_mutex); m_grid_ui[index].to_check = true; } //</f> /Getters/Setters //<f> Methods void MapRenderer::SetMapData(MapData* data) { std::lock_guard<std::mutex> lock(render_mutex); m_map_data = data; } void MapRenderer::CreateMap() { if(m_map_data == nullptr) return; std::lock_guard<std::mutex> lock(render_mutex); //configure cell size m_cell_size = std::min(40, std::max(1, m_grid_size / std::max(m_map_data->map_width, m_map_data->map_height))); MessageWriter::Instance()->WriteLineToConsole("Map " +m_map_data->name + " expecting: " + std::to_string(m_map_data->benchmarks[m_map_data->selected_bechmark_index].expected_min_path_cost)); //create the map texture only once CreateMapTexture(); m_destination_rect.w = m_cell_size * m_map_data->map_width; m_destination_rect.h = m_cell_size * m_map_data->map_height; //try to centre map inits area m_destination_rect.x = 1050 / 2 - m_destination_rect.w / 2; m_destination_rect.y = 1050 / 2 - m_destination_rect.h / 2; } void MapRenderer::RenderMap() { std::lock_guard<std::mutex> lock(render_mutex); SDL_RenderCopy(m_renderer, m_image_pointers.map_texture.get(), NULL, &m_destination_rect); } void MapRenderer::RenderPath() { std::lock_guard<std::mutex> lock(render_mutex); DrawMap(); if(!m_control_flags->running && m_map_data != nullptr && m_map_data->path_buffer.size() > 0) { DrawPath(); } } void MapRenderer::RenderGrid() { std::lock_guard<std::mutex> lock(render_mutex); SDL_RenderCopy(m_renderer, m_image_pointers.grid_texture.get(), NULL, &m_destination_rect); } void MapRenderer::ClearPath() { std::lock_guard<std::mutex> lock(render_mutex); m_grid_ui.clear(); } //</f> /Methods /** * \brief Blits a continuous line of nodes of the same type on a surface that will be used to render the nodes * \brief This method avoids the rendering of individual nodes, its some sort of batch rendering */ void MapRenderer::RenderBlock(SDL_Rect& destination_rect, DrawData& data, SDL_Surface* nodes_surface) { if(data.visited) SDL_BlitScaled(m_image_pointers.checked_surface.get(), nullptr, nodes_surface, &destination_rect); else if(data.to_check) SDL_BlitScaled(m_image_pointers.to_check_surface.get(), nullptr, nodes_surface, &destination_rect); if(data.start_or_target == 1)//startshort_path SDL_BlitScaled(m_image_pointers.start_surface.get(), nullptr, nodes_surface, &destination_rect); else if(data.start_or_target == 2)//target SDL_BlitScaled(m_image_pointers.target_surface.get(), nullptr, nodes_surface, &destination_rect); } /** * \brief Draws the checked nodes and the nodes to be checked, as well as the start and target nodes */ void MapRenderer::DrawMap() { if(m_grid_ui.size() <= 0 || m_map_data == nullptr) return; auto map_width{m_map_data->map_width}; auto map_height{m_map_data->map_height}; SDL_Surface* nodes_surface = SDL_CreateRGBSurface(0, map_width * m_cell_size, map_height * m_cell_size,32,0,0,0,0); SDL_Rect destination_rect; for( int i = 0; i < map_height; ++i)//each line { DrawData first_of_sequence = m_grid_ui[i*map_width];//j is 0 int sequence_length = 0; int start_x = 0; int start_y = i; for(int j = 0; j < map_width; j++)//each column { int index = i*map_width+j; if(m_grid_ui[index] == first_of_sequence)//cell is to be painted with the same elements { sequence_length++; if(j == map_width - 1)//is the last element of the line { destination_rect.x = m_cell_size * start_x; destination_rect.y = m_cell_size * start_y; destination_rect.w = m_cell_size * sequence_length; destination_rect.h = m_cell_size; RenderBlock(destination_rect, first_of_sequence, nodes_surface); } } else//break sequence { destination_rect.x = m_cell_size * start_x; destination_rect.y = m_cell_size * start_y; destination_rect.w = m_cell_size * sequence_length; destination_rect.h = m_cell_size; RenderBlock(destination_rect, first_of_sequence, nodes_surface); //start new block first_of_sequence = m_grid_ui[index]; sequence_length = 1;//we already have a node start_x = j; if(j == map_width - 1)//is the last element of the line { destination_rect.x = m_cell_size * start_x; destination_rect.y = m_cell_size * start_y; destination_rect.w = m_cell_size * sequence_length; destination_rect.h = m_cell_size; RenderBlock(destination_rect, first_of_sequence, nodes_surface); } } }//for width }//for height //render image SDL_SetColorKey( nodes_surface, SDL_TRUE, SDL_MapRGB( nodes_surface->format, 0x00, 0x00, 0x00 ) );//remove the brack from the unused area m_image_pointers.nodes_texture.reset( SDL_CreateTextureFromSurface(m_renderer, nodes_surface) ); SDL_RenderCopy( m_renderer, m_image_pointers.nodes_texture.get(), nullptr, &m_destination_rect ); SDL_FreeSurface(nodes_surface); } /** * \brief Draw the shortest path found by the serach algorithm */ void MapRenderer::DrawPath() { auto map_width{m_map_data->map_width}; auto map_height{m_map_data->map_height}; int* path{m_map_data->path_buffer.data()}; auto node_count{m_map_data->path_buffer.size()}; SDL_Surface* path_surface = SDL_CreateRGBSurface(0, map_width * m_cell_size, map_height * m_cell_size,32,0,0,0,0);//create empty surface SDL_Rect destination_rect; for(int i = 1; i < node_count; i++) { destination_rect.x = m_cell_size * GetCoordinateX(path[i], map_width); destination_rect.y = m_cell_size * GetCoordinateY(path[i], map_width); destination_rect.w = m_cell_size; destination_rect.h = m_cell_size; SDL_BlitScaled(m_image_pointers.short_path_surface.get(), nullptr, path_surface, &destination_rect); } //render image SDL_SetColorKey( path_surface, SDL_TRUE, SDL_MapRGB( path_surface->format, 0x00, 0x00, 0x00 ) );//remove the brack from the unused area m_image_pointers.path_texture.reset( SDL_CreateTextureFromSurface(m_renderer, path_surface) ); SDL_RenderCopy( m_renderer, m_image_pointers.path_texture.get(), nullptr, &m_destination_rect ); SDL_FreeSurface(path_surface); } /** * \brief Creates a texture with the map walls and passable areas. Only one is created when the serach algorithm is called. */ void MapRenderer::CreateMapTexture() { auto map_width{m_map_data->map_width}; auto map_height{m_map_data->map_height}; SDL_Surface* map_surface = SDL_CreateRGBSurface(0, map_width * m_cell_size, map_height * m_cell_size,32,0,0,0,0);//create empty surface SDL_Surface* grid_surface = SDL_CreateRGBSurface(0, map_width * m_cell_size, map_height * m_cell_size,32,0,0,0,0);//create empty surface SDL_Rect destination_rect; for(int i=0; i < map_height; i++) { for(int j=0; j<map_width; j++) { destination_rect.x = j * m_cell_size; destination_rect.y = i * m_cell_size; destination_rect.w = m_cell_size; destination_rect.h = m_cell_size; if(m_map_data->map[i * map_width + j] == 1) SDL_BlitScaled(m_image_pointers.path_surface.get(), nullptr, map_surface, &destination_rect); else SDL_BlitScaled(m_image_pointers.wall_surface.get(), nullptr, map_surface, &destination_rect); SDL_BlitScaled(m_image_pointers.frame_surface.get(), nullptr, grid_surface, &destination_rect); } } m_image_pointers.map_texture.reset( SDL_CreateTextureFromSurface( m_renderer, map_surface ) ); //remove inner white from frame SDL_SetColorKey( grid_surface, SDL_TRUE, SDL_MapRGB( grid_surface->format, 0xFF, 0xFF, 0xFF ) ); m_image_pointers.grid_texture.reset( SDL_CreateTextureFromSurface( m_renderer, grid_surface ) ); //release tmp surfaces SDL_FreeSurface(map_surface); SDL_FreeSurface(grid_surface); } void MapRenderer::LoadGridCells() { SDL_Surface* wall = IMG_Load( (path_img+"wall.png").c_str() ); SDL_Surface* path = IMG_Load( (path_img+"path.png").c_str() ); SDL_Surface* start = IMG_Load( (path_img+"start.png").c_str() ); SDL_Surface* target = IMG_Load( (path_img+"target.png").c_str() ); SDL_Surface* to_check = IMG_Load( (path_img+"to_check.png").c_str() ); SDL_Surface* checked = IMG_Load( (path_img+"checked.png").c_str() ); SDL_Surface* short_path = IMG_Load( (path_img+"short_path.png").c_str() ); SDL_Surface* frame = IMG_Load( (path_img+"frame.png").c_str() ); if(wall == nullptr || path == nullptr || start == nullptr || target == nullptr || to_check == nullptr || checked == nullptr || short_path == nullptr || frame == nullptr) throw std::runtime_error("Failed to load image pointers"); //save surfaces m_image_pointers.wall_surface.reset( wall ); m_image_pointers.path_surface.reset( path ); m_image_pointers.frame_surface.reset( frame ); m_image_pointers.to_check_surface.reset( to_check ); m_image_pointers.checked_surface.reset( checked ); m_image_pointers.short_path_surface.reset( short_path ); m_image_pointers.start_surface.reset( start ); m_image_pointers.target_surface.reset( target ); //create textures m_image_pointers.wall.reset(SDL_CreateTextureFromSurface( m_renderer, wall )); m_image_pointers.path.reset(SDL_CreateTextureFromSurface( m_renderer, path )); m_image_pointers.start.reset(SDL_CreateTextureFromSurface( m_renderer, start )); m_image_pointers.target.reset(SDL_CreateTextureFromSurface( m_renderer, target )); m_image_pointers.to_check.reset(SDL_CreateTextureFromSurface( m_renderer, to_check )); m_image_pointers.checked.reset(SDL_CreateTextureFromSurface( m_renderer, checked )); m_image_pointers.short_path.reset(SDL_CreateTextureFromSurface( m_renderer, short_path )); if(m_image_pointers.wall == nullptr || m_image_pointers.path == nullptr || m_image_pointers.start == nullptr || m_image_pointers.target == nullptr || m_image_pointers.to_check == nullptr || m_image_pointers.checked == nullptr || m_image_pointers.short_path == nullptr) throw std::runtime_error("Failed to load image pointers"); }
35.67052
153
0.684654
[ "render" ]
8b622608a7c04a34e1ec18645f5a61108e484c88
8,301
cpp
C++
api/structs/Structures/Tree.cpp
Higgcz/Gina
309c968f11cb4295b93a99860732b4c2f04df14f
[ "MIT" ]
2
2016-09-03T15:02:23.000Z
2020-02-18T16:50:47.000Z
api/structs/Structures/Tree.cpp
Higgcz/Gina
309c968f11cb4295b93a99860732b4c2f04df14f
[ "MIT" ]
null
null
null
api/structs/Structures/Tree.cpp
Higgcz/Gina
309c968f11cb4295b93a99860732b4c2f04df14f
[ "MIT" ]
null
null
null
// // Tree.cpp // Gina // // Created by Vojtech Micka on 06.01.14. // Copyright (c) 2014 Vojtech Micka. All rights reserved. // #include <iomanip> #include <math.h> #include "Tree.h" using namespace std; using namespace Gina::Structures; void Node::setLeft ( Node *left ) { if ( left != NULL ) left->parent = this; this->left = left; } void Node::setRight ( Node *right ) { if ( right != NULL ) right->parent = this; this->right = right; } void Node::setChild ( Node *n ) { if ( n == NULL ) return; if ( this->key > n->key ) { setLeft (n); } else { setRight (n); } } bool Node::hasLeft () const { return left != NULL; } bool Node::hasRight () const { return right != NULL; } Node* Node::nextForKey ( int k ) const { return k > this->key ? this->right : this->left; } Node* Node::clearRelations () { this->left = NULL; this->right = NULL; this->parent = NULL; return this; } Node* Node::copyData ( Node *node ) { this->key = node->key; this->value = node->value; return this; } void Node::print () const { printf ( "Node [ %3d ]\t=\t%d\n", this->key, this->value ); } Node* Tree::insertNode ( int key, int value ) { Node* n = new Node ( key, value ); insertNode ( n ); return n; } void Tree::insertNode ( Node *node ) { // Find the node where to put the new key Node* n = root, * parent = NULL; if ( n == NULL ) { root = node; return; } while ( n != NULL ) { parent = n; n = *n > *node ? n->left : n->right; } if ( *parent == *node ) { parent->copyData ( node ); return; } parent->setChild ( node ); n_count++; } Node* Tree::deleteKey ( int key ) { Node* delNode = searchKey ( key ); if ( delNode == NULL ) return NULL; return deleteNode ( delNode ); } Node* Tree::deleteNode ( Node *nodeToDelete ) { Node *nodeToReplace = NULL, *child = NULL; // Test if Node has only one or none children if ( !nodeToDelete->hasLeft () || !nodeToDelete->hasRight ()) { nodeToReplace = nodeToDelete; } else { nodeToReplace = maxForNode ( nodeToDelete->left ); } // Find the child of node to replace if ( nodeToReplace->hasLeft ()) { child = nodeToReplace->left; } else { child = nodeToReplace->right; } if ( child != NULL ) { child->parent = nodeToReplace->parent; } if ( nodeToReplace->parent == NULL ) { root = nodeToReplace; } else if ( nodeToReplace == nodeToReplace->parent->left ) { nodeToReplace->parent->left = child; } else { nodeToReplace->parent->right = child; } // Copy data instead of delete if ( nodeToReplace != nodeToDelete ) { nodeToDelete->copyData ( nodeToReplace ); } n_count--; return nodeToReplace; } Node* Tree::searchKey ( int key ) const { Node* n = root; while ( n != NULL && n->key != key ) { n = n->key > key ? n->left : n->right; } return n; } Node* Tree::minEl () const { return minForNode ( root ); } Node* Tree::maxEl () const { return maxForNode ( root ); } // Private Tree methods Node* Tree::minForNode ( Node *n ) const { if ( n->left == NULL ) return n; return minForNode ( n->left ); } Node* Tree::maxForNode ( Node *n ) const { if ( n->right == NULL ) return n; return maxForNode ( n->right ); } void Tree::printLinear ( Node* focusNode ) const { if ( focusNode != NULL ) { printLinear ( focusNode->left ); focusNode->print (); printLinear ( focusNode->right ); } } void Tree::printLinear () const { if ( root != NULL ) { printLinear ( root->left ); root->print (); printLinear ( root->right ); } } void Tree::print () const { printPretty ( root, 1, 1, cout ); } void Tree::print ( Node* focusNode, int indent ) const { printPretty ( focusNode, 1, indent, cout ); } /////////////////////////////////////////////////////////////////////////////////////// // Prety print /////////////////////////////////////////////////////////////////////////////////////// int Tree::maxHeight(Node *p) const { if (!p) return 0; int leftHeight = maxHeight(p->left); int rightHeight = maxHeight(p->right); return (leftHeight > rightHeight) ? leftHeight + 1: rightHeight + 1; } // Print the arm branches (eg, / \ ) on a line void Tree::printBranches(int branchLen, int nodeSpaceLen, int startLen, int nodesInThisLevel, const deque<Node*>& nodesQueue, ostream& out) const { deque<Node*>::const_iterator iter = nodesQueue.begin(); for (int i = 0; i < nodesInThisLevel / 2; i++) { out << ((i == 0) ? setw(startLen-1) : setw(nodeSpaceLen-2)) << "" << ((*iter++) ? "/" : " "); out << setw(2*branchLen+2) << "" << ((*iter++) ? "\\" : " "); } out << endl; } // Print the branches and node (eg, ___10___ ) void Tree::printNodes(int branchLen, int nodeSpaceLen, int startLen, int nodesInThisLevel, const deque<Node*>& nodesQueue, ostream& out) const { deque<Node*>::const_iterator iter = nodesQueue.begin(); for (int i = 0; i < nodesInThisLevel; i++, iter++) { out << ((i == 0) ? setw(startLen) : setw(nodeSpaceLen)) << "" << ((*iter && (*iter)->left) ? setfill('_') : setfill(' ')); if ((*iter) != NULL) { out << setw(branchLen+2) << (*iter)->value; } else { out << setw(branchLen+2) << ""; } out << ((*iter && (*iter)->right) ? setfill('_') : setfill(' ')) << setw(branchLen) << "" << setfill(' '); } out << endl; } // Print the leaves only (just for the bottom row) void Tree::printLeaves(int indentSpace, int level, int nodesInThisLevel, const deque<Node*>& nodesQueue, ostream& out) const { deque<Node*>::const_iterator iter = nodesQueue.begin(); for (int i = 0; i < nodesInThisLevel; i++, iter++) { if ((*iter) != NULL) { out << ((i == 0) ? setw(indentSpace+2) : setw(2*level+2)) << (*iter)->value; } else { out << ((i == 0) ? setw(indentSpace+2) : setw(2*level+2)) << ""; } } out << endl; } // Pretty formatting of a binary tree to the output stream // @ param // level Control how wide you want the tree to sparse (eg, level 1 has the minimum space between nodes, while level 2 has a larger space between nodes) // indentSpace Change this to add some indent space to the left (eg, indentSpace of 0 means the lowest level of the left node will stick to the left margin) void Tree::printPretty ( Node *root, int level, int indentSpace, ostream& out ) const { int h = maxHeight(root); int nodesInThisLevel = 1; int branchLen = 2*((int)pow(2.0,h)-1) - (3-level)*(int)pow(2.0,h-1); // eq of the length of branch for each node of each level int nodeSpaceLen = 2 + (level+1)*(int)pow(2.0,h); // distance between left neighbor node's right arm and right neighbor node's left arm int startLen = branchLen + (3-level) + indentSpace; // starting space to the first node to print of each level (for the left most node of each level only) deque<Node*> nodesQueue; nodesQueue.push_back(root); for (int r = 1; r < h; r++) { printBranches(branchLen, nodeSpaceLen, startLen, nodesInThisLevel, nodesQueue, out); branchLen = branchLen/2 - 1; nodeSpaceLen = nodeSpaceLen/2 + 1; startLen = branchLen + (3-level) + indentSpace; printNodes(branchLen, nodeSpaceLen, startLen, nodesInThisLevel, nodesQueue, out); for (int i = 0; i < nodesInThisLevel; i++) { Node *currNode = nodesQueue.front(); nodesQueue.pop_front(); if (currNode) { nodesQueue.push_back(currNode->left); nodesQueue.push_back(currNode->right); } else { nodesQueue.push_back(NULL); nodesQueue.push_back(NULL); } } nodesInThisLevel *= 2; } printBranches(branchLen, nodeSpaceLen, startLen, nodesInThisLevel, nodesQueue, out); printLeaves(indentSpace, level, nodesInThisLevel, nodesQueue, out); }
26.951299
159
0.562703
[ "3d" ]
8b664d29baedfefc0c62cc32a21b1fb54e3b210d
1,969
cc
C++
raner/event_loop_thread_pool.cc
williammuji/raner
133565c3c5e6b637213f2bccb57b7e99a809d7d0
[ "FSFAP" ]
1
2019-01-04T01:41:56.000Z
2019-01-04T01:41:56.000Z
raner/event_loop_thread_pool.cc
williammuji/raner
133565c3c5e6b637213f2bccb57b7e99a809d7d0
[ "FSFAP" ]
null
null
null
raner/event_loop_thread_pool.cc
williammuji/raner
133565c3c5e6b637213f2bccb57b7e99a809d7d0
[ "FSFAP" ]
1
2019-01-04T02:11:14.000Z
2019-01-04T02:11:14.000Z
// Copyright (c) 2018 Williammuji Wong. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "raner/event_loop_thread_pool.h" #include "raner/event_loop.h" #include "raner/event_loop_thread.h" #include <assert.h> #include <stdio.h> namespace raner { EventLoopThreadPool::EventLoopThreadPool(EventLoop* base_loop, std::string_view name_arg) : base_loop_(base_loop), name_(name_arg), started_(false), num_threads_(0), next_(0) {} EventLoopThreadPool::~EventLoopThreadPool() { // Don't delete loop, it's stack variable } void EventLoopThreadPool::Start(const ThreadInitCallback& cb) { assert(!started_); base_loop_->AssertInLoopThread(); started_ = true; for (int i = 0; i < num_threads_; ++i) { char buf[name_.size() + 32]; snprintf(buf, sizeof(buf), "%s%d", name_.c_str(), i); EventLoopThread* t = new EventLoopThread(cb, buf); threads_.push_back(std::unique_ptr<EventLoopThread>(t)); loops_.push_back(t->StartLoop()); } if (num_threads_ == 0 && cb) { cb(base_loop_); } } EventLoop* EventLoopThreadPool::GetNextLoop() { base_loop_->AssertInLoopThread(); assert(started_); EventLoop* loop = base_loop_; if (!loops_.empty()) { // round-robin loop = loops_[next_]; ++next_; if (static_cast<size_t>(next_) >= loops_.size()) { next_ = 0; } } return loop; } EventLoop* EventLoopThreadPool::GetLoopForHash(size_t hashCode) { base_loop_->AssertInLoopThread(); EventLoop* loop = base_loop_; if (!loops_.empty()) { loop = loops_[hashCode % loops_.size()]; } return loop; } std::vector<EventLoop*> EventLoopThreadPool::GetAllLoops() { base_loop_->AssertInLoopThread(); assert(started_); if (loops_.empty()) { return std::vector<EventLoop*>(1, base_loop_); } else { return loops_; } } } // namespace raner
24.012195
73
0.662265
[ "vector" ]
8b6c709a5c9be00059b732bd93aaebcb5cf69d20
13,078
hpp
C++
Test/TestCommon/TestPriorityQueue.hpp
SpaceGameEngine/SpaceGameEngine
cc7bbadbc3ed9577d1d6c9b4470d2c4926ed5ef8
[ "Apache-2.0" ]
3
2019-11-25T04:08:44.000Z
2020-08-13T09:53:43.000Z
Test/TestCommon/TestPriorityQueue.hpp
SpaceGameEngine/SpaceGameEngine
cc7bbadbc3ed9577d1d6c9b4470d2c4926ed5ef8
[ "Apache-2.0" ]
3
2019-07-11T09:20:43.000Z
2021-01-17T10:21:22.000Z
Test/TestCommon/TestPriorityQueue.hpp
SpaceGameEngine/SpaceGameEngine
cc7bbadbc3ed9577d1d6c9b4470d2c4926ed5ef8
[ "Apache-2.0" ]
null
null
null
/* Copyright 2021 creatorlxd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #pragma once #include <random> #include "gtest/gtest.h" #include "Container/PriorityQueue.hpp" using namespace SpaceGameEngine; struct test_priority_queue_object { std::function<void(test_priority_queue_object&)> rel_func; test_priority_queue_object() : val(0), rel_func([](test_priority_queue_object&) {}) { } test_priority_queue_object(int v) : val(v), rel_func([](test_priority_queue_object&) {}) { } test_priority_queue_object(int v, const std::function<void(test_priority_queue_object&)>& func) : val(v), rel_func(func) { } test_priority_queue_object(const test_priority_queue_object& o) noexcept : val(o.val), rel_func(o.rel_func) { } test_priority_queue_object(test_priority_queue_object&& o) noexcept : val(o.val), rel_func(std::move(o.rel_func)) { o.rel_func = [](test_priority_queue_object&) {}; } ~test_priority_queue_object() { rel_func(*this); } int val; test_priority_queue_object& operator=(const test_priority_queue_object& o) { val = o.val; rel_func = o.rel_func; return *this; } test_priority_queue_object& operator=(test_priority_queue_object&& o) { val = o.val; rel_func = std::move(o.rel_func); o.rel_func = [](test_priority_queue_object&) {}; return *this; } bool operator<(const test_priority_queue_object& o) const { return val < o.val; } bool operator==(const test_priority_queue_object& o) const { return val == o.val; } bool operator!=(const test_priority_queue_object& o) const { return val != o.val; } }; TEST(PriorityQueue, InstanceTest) { PriorityQueue<int> pq1; PriorityQueue<int, Less<int>, StdAllocator> pq2({1, 2, 3}); const PriorityQueue<int, Greater<int>, DefaultAllocator> pq3(10, 1); ASSERT_EQ(pq1.GetSize(), 0); ASSERT_EQ(pq2.GetSize(), 3); ASSERT_EQ(pq3.GetSize(), 10); Vector<int, StdAllocator>& l2 = pq2.GetImplement(); ASSERT_EQ(l2.GetSize(), 3); ASSERT_EQ(*l2.GetBegin(), 1); ASSERT_EQ(*(l2.GetBegin() + 1), 2); ASSERT_EQ(*(l2.GetBegin() + 2), 3); const Vector<int>& v3 = pq3.GetImplement(); ASSERT_EQ(v3.GetSize(), 10); for (int i = 0; i < 10; ++i) ASSERT_EQ(v3[i], 1); } TEST(PriorityQueue, PushAndPopTest) { const int test_size = 1000; const int test_up_bound = 100; int val_cnt[test_up_bound]; int val_pool[test_size]; memset(val_cnt, 0, sizeof(val_cnt)); memset(val_pool, 0, sizeof(val_pool)); std::random_device rd; for (int i = 0; i < test_size; ++i) val_pool[i] = rd() % test_up_bound; PriorityQueue<int, Less<int>> pq1; ASSERT_EQ(pq1.GetSize(), 0); for (int i = 0; i < test_size; ++i) pq1.Push(val_pool[i]); ASSERT_EQ(pq1.GetSize(), test_size); int buf = pq1.GetTop(); for (int i = 0; i < test_size; ++i) { ASSERT_LE(buf, pq1.GetTop()); val_cnt[pq1.GetTop()] += 1; pq1.Pop(); ASSERT_EQ(pq1.GetSize(), test_size - 1 - i); } ASSERT_EQ(pq1.GetSize(), 0); PriorityQueue<int, Greater<int>> pq2; ASSERT_EQ(pq2.GetSize(), 0); for (int i = 0; i < test_size; ++i) pq2.Push(val_pool[i]); ASSERT_EQ(pq2.GetSize(), test_size); buf = pq2.GetTop(); for (int i = 0; i < test_size; ++i) { ASSERT_GE(buf, pq2.GetTop()); val_cnt[pq2.GetTop()] -= 1; pq2.Pop(); ASSERT_EQ(pq2.GetSize(), test_size - 1 - i); } ASSERT_EQ(pq2.GetSize(), 0); for (int i = 0; i < test_up_bound; ++i) ASSERT_EQ(val_cnt[i], 0); } TEST(PriorityQueue, CopyConstructionTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object>* ppq = new PriorityQueue<test_priority_queue_object>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object>* ppq2 = new PriorityQueue<test_priority_queue_object>(*ppq); ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq->GetTop().val, i); ppq->Pop(); ASSERT_EQ(ppq->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 2); } } TEST(PriorityQueue, MoveConstructionTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object>* ppq = new PriorityQueue<test_priority_queue_object>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object>* ppq2 = new PriorityQueue<test_priority_queue_object>(std::move(*ppq)); ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 1); } } TEST(PriorityQueue, CopyAssignmentTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object>* ppq = new PriorityQueue<test_priority_queue_object>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object>* ppq2 = new PriorityQueue<test_priority_queue_object>(); ASSERT_EQ(ppq2->GetSize(), 0); *ppq2 = *ppq; ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq->GetTop().val, i); ppq->Pop(); ASSERT_EQ(ppq->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 2); } } TEST(PriorityQueue, MoveAssignmentTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object>* ppq = new PriorityQueue<test_priority_queue_object>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object>* ppq2 = new PriorityQueue<test_priority_queue_object>(); ASSERT_EQ(ppq2->GetSize(), 0); *ppq2 = std::move(*ppq); ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 1); } } TEST(PriorityQueue, AnotherAllocatorCopyConstructionTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>* ppq = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>* ppq2 = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>(*ppq); ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq->GetTop().val, i); ppq->Pop(); ASSERT_EQ(ppq->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 2); } } TEST(PriorityQueue, AnotherAllocatorMoveConstructionTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>* ppq = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>* ppq2 = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>(std::move(*ppq)); ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 1); } } TEST(PriorityQueue, AnotherAllocatorCopyAssignmentTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>* ppq = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>* ppq2 = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>(); ASSERT_EQ(ppq2->GetSize(), 0); *ppq2 = *ppq; ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq->GetTop().val, i); ppq->Pop(); ASSERT_EQ(ppq->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 2); } } TEST(PriorityQueue, AnotherAllocatorMoveAssignmentTest) { const int test_size = 1000; int val_pool[test_size]; memset(val_pool, 0, sizeof(val_pool)); auto val_rel_func = [&](test_priority_queue_object& o) { val_pool[o.val] += 1; }; PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>* ppq = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, StdAllocator>(); for (int i = 0; i < test_size; ++i) { ppq->Push(test_priority_queue_object(i, val_rel_func)); ASSERT_EQ(ppq->GetTop().val, 0); } ASSERT_EQ(ppq->GetSize(), test_size); PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>* ppq2 = new PriorityQueue<test_priority_queue_object, Less<test_priority_queue_object>, MemoryManagerAllocator>(); ASSERT_EQ(ppq2->GetSize(), 0); *ppq2 = std::move(*ppq); ASSERT_EQ(ppq2->GetSize(), test_size); for (int i = 0; i < test_size; ++i) { ASSERT_EQ(ppq2->GetTop().val, i); ppq2->Pop(); ASSERT_EQ(ppq2->GetSize(), test_size - 1 - i); } ASSERT_EQ(ppq2->GetSize(), 0); delete ppq; delete ppq2; for (int i = 0; i < test_size; ++i) { ASSERT_EQ(val_pool[i], 1); } }
25.542969
230
0.696054
[ "vector" ]
8b73b746ba61ab85fd56d91b7d100da00a529812
9,960
cpp
C++
src/SingleHullKinematics.cpp
jodavaho/kinship
ec3418a1d51dfe8258b1f74c222f70cbb4f1d9ee
[ "MIT" ]
null
null
null
src/SingleHullKinematics.cpp
jodavaho/kinship
ec3418a1d51dfe8258b1f74c222f70cbb4f1d9ee
[ "MIT" ]
null
null
null
src/SingleHullKinematics.cpp
jodavaho/kinship
ec3418a1d51dfe8258b1f74c222f70cbb4f1d9ee
[ "MIT" ]
null
null
null
#include <Kinematics/SingleHullKinematics.h> using namespace cv; using namespace RSN; //#define __DEBUG SingleHullKinematics::SingleHullKinematics(){ cc.Kprop=0.0; } SingleHullKinematics::SingleHullKinematics(SingleHullConstants cc){ this->cc=cc; } SingleHullKinematics::~SingleHullKinematics(){ } void SingleHullKinematics::ekfPredictSimple(float thrust, float angle, float t, Mat&pose, Mat& cv){ Mat_<float> p = pose.rowRange(0,3); Mat_<float> dp = pose.rowRange(3,6); float thd = p(2)+dp(2)*t/2; float cd = cos(thd); float sd = sin(thd); float ca = cos(angle); float sa = sin(angle); updatePose(thrust,angle,t,pose); Mat_<float> V=Mat::zeros(6,2,CV_32F); V(3,0)=ca/cc.Mx; V(3,1)=-sa*thrust/cc.Mx;// - 2*sa*cc.Kprop; V(4,0)=sa/cc.My; V(4,1)=ca*thrust/cc.My; V(5,0)=cc.dp*sa/cc.Ir; V(5,1)=cc.dp*ca*thrust/cc.Ir; Mat_<float> G=Mat::eye(6,6,CV_32F); G(0,2)= -dp(0)*sd*t - dp(1)*cd*t; G(0,3)= cd*t; G(1,2)= dp(0)*cd*t - dp(1)*sd*t; G(1,3)= sd*t; // G(0,4)= sd*t; // G(0,5)=-t*t*.5*(sd*dp(0)+cd*dp(1)); // G(1,4)= cd*t; // G(1,5)=t*t*.5*(cd*dp(0)-sd*dp(1)); // G(2,5)=t; G(3,3)=-cc.Kx*t; G(4,4)=-cc.Ky*t; G(5,5)=-cc.Kr*t; Mat_<float> M=Mat::zeros(2,2,CV_32F); M(0,0)= cc.s_th*(thrust!=0? cc.mn_th:0); M(1,1)= cc.s_an; Mat R=V*M*V.t(); Mat r2 = G*cv*G.t()+R+Mat::eye(6,6,CV_32F)*.3; //salt it a little. r2.copyTo(cv); return; } void SingleHullKinematics::ekfPredictActual(float thrust, float angle, float t, Mat&pose, Mat&cv){ // printf("/?4 %0.3f\n",pow); Mat_<float> p = pose.rowRange(0,3); Mat_<float> dp = pose.rowRange(3,6); //orientation of the vector that points to the new location float thAct = p(2)+dp(2)*t/2+atan2(dp(1),dp(0)); float cAct = cos(thAct); float sAct = sin(thAct); float xp = dp(0); float yp = dp(1); float ca = cos(angle); float sa = sin(angle); updatePose(thrust,angle,t,pose); // float thrust = pow; // thrust = (std::abs(pow)<.01?0:pow/std::abs(pow))*t; float absVel = norm(dp.rowRange(0,2)); // absVel = std::abs(absVel)>.01?thrust:0; // absVel = std::abs(absVel)>.01?absVel/std::abs(absVel):0; float SC = absVel==0? 0:t/absVel; #ifdef __DEBUG printf("EKF Predict:\n"); dumpMatrix(pose); #endif Mat_<float> V=Mat::zeros(6,2,CV_32F); V(3,0)=ca/cc.Mx; V(3,1)=-sa*.1/cc.Mx;// - 2*sa*cc.Kprop; V(4,0)=sa/cc.My; V(4,1)=ca*.1/cc.My; V(5,0)=cc.dp*sa/cc.Ir; V(5,1)=cc.dp*ca*.1/cc.Ir; Mat_<float> G=Mat::eye(6,6,CV_32F); //dfx/dth G(0,2)= -t*sAct*absVel; //dfx/dxp G(0,3)= SC*(xp*cAct+yp*sAct); //dfx/dyp G(0,4)= SC*(yp*cAct-xp*sAct); //dfx/domega G(0,5)= -(t*t)/2 * absVel * sAct; //dfy/dth G(1,2)= cAct*absVel*t; //dfy/xp G(1,3)= SC*(xp*sAct-yp*cAct); //dfy/yp G(1,4)= SC*(xp*cAct+yp*sAct); //dfy/domega G(1,5)=(t*t)/2 * absVel * cAct; //df(theta)/domega G(2,5)=t; //velocity jacobians: G(3,3)=1-cc.Kx*t; G(4,4)=1-cc.Ky*t; G(5,5)=1-cc.Kr*t; //hmmm... G(3,3)=0; G(4,4)=0; G(5,5)=0; Mat_<float> M=Mat::zeros(2,2,CV_32F); M(0,0)= std::pow(thrust,2)*cc.s_th;//cc.s_th*(std::abs(thrust)==0?cc.mn_th:thrust); M(1,1)= cc.s_an; Mat R=V*M*V.t(); Mat salt = Mat::eye(6,6,CV_32F)*t; Mat r2 = G*cv*G.t()+R+salt; #ifdef __DEBUG printf("Matricies: (G,cv,R,salt, and result)\n"); dumpMatrix(G); dumpMatrix(cv); dumpMatrix(R); dumpMatrix(r2); #endif r2.copyTo(cv); return; } //Public passthrough void SingleHullKinematics::ekfPredict(float thrust, float angle, float t, SingleHullState& state){ ekfPredict(thrust,angle,t,state.state,state.cov); } //Public void SingleHullKinematics::ekfPredict(float thrust, float angle, float t, Mat&pose, Mat& cv){ ekfPredictActual(thrust,angle,t,pose,cv); } void SingleHullKinematics::compassMeasurement(float degrees,float sig_degrees, SingleHullState& state){ //compass measures heading directly, and ignores drift. Mat_<float> X = state.state; Mat_<float> Q = state.cov; float mx = X(2); mx = normalizeAngle(mx); float mz = compassToXAngleRad(degrees); float cx = Q(2,2); float cz = std::abs(degToRad(sig_degrees)); //carefully measure residualation. float residual = normalizeAngle(diff(mz,mx,-M_PI,M_PI)); #ifdef __DEBUG printf("Compass: X:%0.3f, Z:%0.3f, residual:%0.3f\n",mx,mz,residual); printf("Compass -- X+res: %0.3f, Z:%0.3f\n",normalizeAngle(mx+residual),normalizeAngle(mz)); assert(std::abs(normalizeAngle(mx+residual))-std::abs(normalizeAngle(mz))<.001); #endif float k = cx/(cx+cz); X(2) = mx + k*(residual); X(2) = normalizeAngle(X(2)); Q(2,2) = (1-k)*(cx); #ifdef __DEBUG printf("Compass: (Z,cov(Z),hx,z,x_final)\n"); printf("\tZ:%0.3f (cz:%0.3f) --> z_rad:%0.3f\n",degrees,cz,mz); printf("\tX:%0.3f (cx:%0.3f) --> z-x:%0.3f\n",mx,cx,residual); printf("\t =%0.3f (+/- %0.3f)\n",X(2),Q(2,2)); #endif } /** * This only requires the struct, you do not have to pre process the GPS packet at all. */ void SingleHullKinematics::localGPSMeasure(GPS_Measurement Z, SingleHullState&X){ #ifdef __DEBUG printf("GPS Measurement: (Z,cov(Z)\n"); dumpMatrix(Z.position); dumpMatrix(Z.cov); printf("GPS speed: %0.3f,%0.3f\n",Z.speed,Z.err_speed); printf("GPS track: %0.3f,%0.3f\n",Z.track,Z.err_track); #endif //operate only on position and heading information. The GPS cannot provide information //about any other part of the state, not even velocity vectors, sadly. Mat_<float> x = X.state.rowRange(0,3); Mat_<float> q = Mat(X.cov,Range(0,3),Range(0,3)); Mat_<float> QQ = X.cov; //calculate h(X) Mat_<float> hX = Mat::zeros(x.rows,1,X.state.type()); hX(0) = x(0); hX(1) = x(1); hX(2) = normalizeAngle(x(2) + atan2(x(4),x(3))); //gps measures drift + heading //prepare measurement vector Mat_<float> z = Mat::zeros(3,1,CV_32F); z(0) = Z.position.at<float>(0); z(1) = Z.position.at<float>(1); z(2) = compassToXAngleRad(Z.track); //measurement covariance: Mat_<float> r = Mat::zeros(3,3,CV_32F); r(2,2) = std::abs(degToRad(Z.err_track)); Mat_<float> rr = r; Z.cov.copyTo(rr); //copy into upper 2x2 of r. r(0,0)=Z.cov.at<float>(0,0); r(0,1)=Z.cov.at<float>(0,1); r(1,0)=Z.cov.at<float>(1,0); r(1,1)=Z.cov.at<float>(1,1); //measurement jacobian Mat_<float> H = Mat::eye(3,3,CV_32F); //should be H(2,3) and H(2,4) terms.. but they are smallish. order of 1/x^2 #ifdef __DEBUG printf("GPS premeasure: (x,hx,H,q,z,r)\n"); dumpMatrix(x); dumpMatrix(hX); dumpMatrix(H); dumpMatrix(q); dumpMatrix(z); dumpMatrix(r); #endif ekfMeasurement(x,hX,H,q,z,r); #ifdef __DEBUG printf("GPS post measure: (x,hx,H,q,z,r)\n"); dumpMatrix(x); dumpMatrix(hX); dumpMatrix(H); dumpMatrix(q); dumpMatrix(z); dumpMatrix(r); #endif X.state.at<float>(0)=x(0); X.state.at<float>(1)=x(1); X.state.at<float>(2)=x(2); QQ(0,0)=q(0,0); QQ(0,1)=q(0,1); QQ(0,2)=q(0,2); QQ(1,0)=q(1,0); QQ(1,1)=q(1,1); QQ(1,2)=q(1,2); QQ(2,0)=q(2,0); QQ(2,1)=q(2,1); QQ(2,2)=q(2,2); } void SingleHullKinematics::ekfMeasurement(Mat&X, Mat&hOfX, Mat H, Mat&Q, Mat&Z, Mat&R){ Mat_<float>XP = X; Mat I=Mat::eye(hOfX.rows,hOfX.rows,hOfX.type()); assert(hOfX.size==Z.size); assert(Q.size==R.size); assert(H.size==Q.size); Mat_<float> z = Z-hOfX; //all ok, except: z(2) = normalizeAngle(diff(Z.at<float>(2),hOfX.at<float>(2),-M_PI,M_PI)); //...because we must be careful of angles. #ifdef __DEBUG printf("residual:\n"); dumpMatrix(z); #endif Mat S =H*Q*H.t()+R; Mat Sp=S.clone(); invert(S,Sp); Mat K=Q*H.t()*Sp; #ifdef __DEBUG printf("ekf Measure: Z,Q,K,K*(Z-hX)\n"); dumpMatrix(Z); dumpMatrix(Q); dumpMatrix(K); dumpMatrix(K*z); #endif XP = XP + K*(z); XP(2) = normalizeAngle(XP(2)); Q = (I-K*H)*Q; } void SingleHullKinematics::setConstants(SingleHullConstants c){ cc=c; } SingleHullConstants SingleHullKinematics::getConstants(){ return cc; } void SingleHullKinematics::getAccVectors(float thrust, float angle, Mat pose, Mat out_acc){ Mat_<float> out = out_acc; Mat_<float> p = pose; Mat_<float> K = Mat::zeros(3,6,CV_32F); Mat_<float> U = Mat::zeros(2,1,CV_32F); U(0)=thrust; U(1)=angle; K(0,3)=-cc.Kx*std::abs(p(3)); K(1,4)=-cc.Ky*std::abs(p(4)); K(2,5)=-cc.Kr*std::abs(p(5)); Mat_<float> M = Mat::zeros(3,2,CV_32F); M(0,0)=cos(angle)/cc.Mx; M(0,1) = 0.0; M(1,0)=sin(angle)/cc.My; M(1,1) = 0.0; M(2,0)=-sin(angle)*cc.dp/cc.Ir; M(2,1) = 0.0; Mat_<float> frict = K*p; Mat_<float> acc = M*U; out_acc = frict + acc; #ifdef __DEBUG printf("Acc Terms (K,p,M,U,acc)::\n"); dumpMatrix(K); dumpMatrix(p); dumpMatrix(M); dumpMatrix(U); dumpMatrix(out_acc); #endif } void enforceConstraints(Mat pose){ Mat_<float> t= pose; assert(t(3)<7.0 && t(3)>-7.0); assert(t(4)<7.0 && t(4)>-7.0); assert(t(5)<5.0 && t(5)>-5.0); assert(t(2)>=-M_PI&&t(2)<=M_PI); } // x+ = g(x-, u-, dt); void SingleHullKinematics::updatePose(float thrust, float angle, float time, Mat&pose){ // assert(thrust<=1.0 && thrust >= -1.0); // assert(angle>=-M_PI && angle<=M_PI); assert(time<10.0); //pose == position Mat_<float> p = pose.rowRange(0,3); //dp/dt * t Mat_<float> dptimest = Mat(3,1,CV_32F); //dp/dt == velocity Mat_<float> dpdt = pose.rowRange(3,6); //ddp/ddt == acceleration Mat_<float> acc = Mat::zeros(3,1,CV_32F); float thin = atan2(dpdt(1),dpdt(0)); float thd = p(2)+dpdt(2)*time/2+thin; //direct path length poses == ||dP/dt|| * t float dd = norm(Mat(dpdt,Range(0,2))) * time; //chord length float chl=0.0; //angle change float dang = dpdt(2)*time; if (dang==0){ chl=dd; }else if (dang<=M_PI && dang>=-M_PI){ //2 * sin(angle/2) * (Rad = arc dist / arc angle) = chord length. chl = 2*sin(dang/2)*(dd/dang); } getAccVectors(thrust,angle,pose,acc); // dumpMatrix(ddpddt); dptimest(0) = cos(thd)*chl; dptimest(1) = sin(thd)*chl; dptimest(2) = dpdt(2)*time; // dpt(0)= cos(thd)*dp(0)*time-sin(thd)*dp(1)*time; // dpt(1)= sin(thd)*dp(0)*time+cos(thd)*dp(1)*time; // dpt(2)=dp(2)*time; //update position in global frame p=p+dptimest; p(2) = normalizeAngle(p(2)); //update velocities in local frame. dpdt = dpdt + acc*time; // enforceConstraints(pose); // warnConstraints(pose); }
24.53202
103
0.632329
[ "vector" ]
8b8b3d55d7baddf5042455dfb1f923e197258160
2,924
cpp
C++
Project/OgreTutorialFramework_2014/src/Badger/Wheel.cpp
storm20200/UniversitySecondYearBadger
197562f18f1d078289479b9f00f7bee7f7b91db0
[ "Unlicense" ]
null
null
null
Project/OgreTutorialFramework_2014/src/Badger/Wheel.cpp
storm20200/UniversitySecondYearBadger
197562f18f1d078289479b9f00f7bee7f7b91db0
[ "Unlicense" ]
null
null
null
Project/OgreTutorialFramework_2014/src/Badger/Wheel.cpp
storm20200/UniversitySecondYearBadger
197562f18f1d078289479b9f00f7bee7f7b91db0
[ "Unlicense" ]
null
null
null
#include "Wheel.h" // STL headers. #include <exception> #include <iostream> #pragma region Constructors and destructor Badger::Wheel::Wheel (Wheel&& move) { *this = std::move (move); } Badger::Wheel& Badger::Wheel::operator= (Wheel&& move) { if (this != &move) { // IActor. m_node = std::move (move.m_node); // Badger::IRotatableComponent. m_turnSpeed = std::move (move.m_turnSpeed); m_targetTurn = std::move (move.m_targetTurn); // Badger::Wheel. m_diameter = std::move (move.m_diameter); m_revolveModifier = std::move (move.m_revolveModifier); } return *this; } Badger::Wheel::~Wheel() { } #pragma endregion #pragma region Getters and setters void Badger::Wheel::reset() { // We don't reset the position or orientation because we just can't know how the wheels should be placed. m_node->setScale ({ 1.f, 1.f, 1.f }); m_targetTurn = 0.f; m_node->yaw (Ogre::Radian (0.f)); } #pragma endregion #pragma region Actor functionality bool Badger::Wheel::initialise (OgreApplication* const ogre, Ogre::SceneNode* root, const Ogre::String& name) { try { // Pre-condition: We have a valid OgreApplication and SceneNode pointer. if (!ogre || !root) { throw std::invalid_argument ("Badger::Wheel::initialise(), required parameter 'ogre' or 'root' is a nullptr."); } // Initialise the entity. const auto entity = constructEntity (ogre, "Wheel.mesh", "blue"); // Construct the node. m_node = constructNode (root, name, entity); // Reset the tracker. reset(); // We're done, yay! return true; } catch (const std::exception& error) { std::cerr << "An exception was caught in Badger::Wheel::initialise(): " << error.what() << std::endl; } catch (...) { std::cerr << "An unknown error occurred in Badger::Wheel::initialise()." << std::endl; } return false; } void Badger::Wheel::updateSimulation (const float deltaTime) { // Rotate the wheels sideways. rotateComponent (Ogre::Vector3::UNIT_Y, Ogre::Node::TS_PARENT, deltaTime); } #pragma endregion #pragma region Simulation void Badger::Wheel::revolve (const float distance) { // Obtain the necessary constants for calculate the correct rotation. const float fullRevolution { Ogre::Math::TWO_PI }, pi { Ogre::Math::PI }; // Calculate how much to revolve the wheel by. const float circumference { m_diameter * pi }, toRotate { fullRevolution * (distance / circumference) * m_revolveModifier }; // Rotate the wheel. const auto rotation = Ogre::Quaternion (Ogre::Radian (toRotate), Ogre::Vector3::UNIT_Y); m_node->rotate (rotation, Ogre::Node::TS_LOCAL); } #pragma endregion
23.206349
123
0.615253
[ "mesh" ]
8b90e36a9e1a0cb785e88deb478f8d9173cf9f27
947
cc
C++
2018/04/part_1/main.cc
maitesin/advent
a08e3f2c9b7868cba364579270efc3719692ca1b
[ "BSD-2-Clause" ]
1
2017-12-06T15:36:15.000Z
2017-12-06T15:36:15.000Z
2018/04/part_1/main.cc
maitesin/advent
a08e3f2c9b7868cba364579270efc3719692ca1b
[ "BSD-2-Clause" ]
null
null
null
2018/04/part_1/main.cc
maitesin/advent
a08e3f2c9b7868cba364579270efc3719692ca1b
[ "BSD-2-Clause" ]
null
null
null
#include <iostream> #include <fstream> #include <vector> #include <algorithm> struct log { std::uint8_t year, month, day, hour, minute; std::string info; void print() { std::cout << year << "-" << month << "-" << day << " " << hour << ":" << minute << "->" << info << std::endl; } }; std::vector<log> read_file(std::string filename) { std::ifstream file(filename); std::vector<log> entries; std::string tmp; while (!file.eof()) { std::getline(file, tmp); std::cout << tmp << std::endl; } return entries; } int main(int argc, char *argv[]) { if (argc != 2) { std::cerr << "Bad number of parameters" << std::endl; std::cerr << "Usage: " << argv[0] << " <filename>" << std::endl; return EXIT_FAILURE; } auto entries = read_file(argv[1]); for (auto && entry : entries) { entry.print(); } return EXIT_SUCCESS; }
21.522727
72
0.525871
[ "vector" ]
8b9b3004cdfbeab122a93fb481e6b6538701cdec
17,483
cpp
C++
unit/component/unittest_transform.cpp
tschaffter/apl-core-library
3a05342ba0fa2432c320476795c13e8cd990e8ee
[ "Apache-2.0" ]
null
null
null
unit/component/unittest_transform.cpp
tschaffter/apl-core-library
3a05342ba0fa2432c320476795c13e8cd990e8ee
[ "Apache-2.0" ]
1
2022-01-13T02:14:40.000Z
2022-01-13T03:35:16.000Z
unit/component/unittest_transform.cpp
tschaffter/apl-core-library
3a05342ba0fa2432c320476795c13e8cd990e8ee
[ "Apache-2.0" ]
null
null
null
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #include "rapidjson/document.h" #include "gtest/gtest.h" #include <cmath> #include "apl/engine/evaluate.h" #include "apl/engine/builder.h" #include "../testeventloop.h" using namespace apl; class ComponentTransformTest : public DocumentWrapper {}; template<class T> std::shared_ptr<T> as(const ComponentPtr &component) { return std::static_pointer_cast<T>(component); } static const char *CHILD_IN_PARENT = R"apl({ "type": "APL", "version": "1.4", "mainTemplate": { "items": { "type": "Container", "width": 400, "height": 400, "items": [ { "type": "TouchWrapper", "id": "TouchWrapper", "position": "absolute", "left": 40, "top": 50, "width": "100", "height": "100", "item": { "type": "Frame", "id": "Frame", "width": "100%", "height": "100%" } } ] } } } )apl"; TEST_F(ComponentTransformTest, ChildInParent) { loadDocument(CHILD_IN_PARENT); auto touchWrapper = as<CoreComponent>(component->findComponentById("TouchWrapper")); auto frame = as<CoreComponent>(component->findComponentById("Frame")); ASSERT_TRUE(touchWrapper); ASSERT_TRUE(frame); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D::translate(-40, -50), touchWrapper->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D::translate(-40, -50), frame->getGlobalToLocalTransform()); } static const char *TRANSFORMATIONS = R"apl({ "type": "APL", "version": "1.4", "mainTemplate": { "items": { "type": "Container", "width": 400, "height": 400, "items": [ { "type": "TouchWrapper", "id": "TouchWrapper", "position": "absolute", "left": 40, "top": 50, "width": "100", "height": "100", "transform": [ {"scale": 0.5} ], "item": { "type": "Frame", "id": "Frame", "width": "100%", "height": "100%", "transform": [ {"translateX": 25} ] } } ] } } } )apl"; TEST_F(ComponentTransformTest, Transformations) { loadDocument(TRANSFORMATIONS); auto touchWrapper = as<CoreComponent>(component->findComponentById("TouchWrapper")); auto frame = as<CoreComponent>(component->findComponentById("Frame")); ASSERT_TRUE(touchWrapper); ASSERT_TRUE(frame); ASSERT_EQ(Transform2D({2,0, 0, 2, -130, -150}), touchWrapper->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D({2,0, 0, 2, -155, -150}), frame->getGlobalToLocalTransform()); } TEST_F(ComponentTransformTest, ToLocalPoint) { loadDocument(TRANSFORMATIONS); auto touchWrapper = as<CoreComponent>(component->findComponentById("TouchWrapper")); auto frame = as<CoreComponent>(component->findComponentById("Frame")); ASSERT_TRUE(touchWrapper); ASSERT_TRUE(frame); ASSERT_EQ(Transform2D({2,0, 0, 2, -130, -150}), touchWrapper->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D({2,0, 0, 2, -155, -150}), frame->getGlobalToLocalTransform()); ASSERT_EQ(Point(-130, -150), touchWrapper->toLocalPoint({0,0})); ASSERT_EQ(Point(-110, -130), touchWrapper->toLocalPoint({10,10})); ASSERT_EQ(Point(-155, -150), frame->toLocalPoint({0,0})); ASSERT_EQ(Point(-135, -130), frame->toLocalPoint({10,10})); ASSERT_TRUE(TransformComponent(root, "Frame", "scale", 0)); auto singularPoint = frame->toLocalPoint({0, 0}); ASSERT_TRUE(std::isnan(singularPoint.getX())); ASSERT_TRUE(std::isnan(singularPoint.getY())); } static const char *SCROLL_VIEW = R"apl({ "type": "APL", "version": "1.4", "mainTemplate": { "parameters": [], "item": { "type": "ScrollView", "width": "100vw", "height": "100vh", "items": { "type": "Container", "items": { "type": "Frame", "width": 200, "height": 200 }, "data": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] } } } } )apl"; TEST_F(ComponentTransformTest, ScrollView) { loadDocument(SCROLL_VIEW); auto container = as<CoreComponent>(component->getChildAt(0)); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D(), container->getGlobalToLocalTransform()); for (auto i = 0 ; i < container->getChildCount() ; i++) { auto child = as<CoreComponent>(container->getChildAt(i)); ASSERT_EQ(Transform2D::translateY(-200 * i), child->getGlobalToLocalTransform()); } component->update(kUpdateScrollPosition, 300); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D::translateY(300), container->getGlobalToLocalTransform()); for (auto i = 0 ; i < container->getChildCount() ; i++) { auto child = as<CoreComponent>(container->getChildAt(i)); ASSERT_EQ(Transform2D::translateY(-200 * i + 300), child->getGlobalToLocalTransform()); } } static const char *VERTICAL_SEQUENCE = R"apl({ "type": "APL", "version": "1.4", "mainTemplate": { "parameters": [], "item": { "type": "Sequence", "scrollDirection": "vertical", "width": 200, "height": 500, "items": { "type": "Frame", "width": 200, "height": 200 }, "data": [ 1, 2, 3, 4, 5 ] } } } )apl"; TEST_F(ComponentTransformTest, VerticalSequence) { loadDocument(VERTICAL_SEQUENCE); advanceTime(10); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); for (auto i = 0 ; i < component->getChildCount() ; i++) { auto child = as<CoreComponent>(component->getChildAt(i)); ASSERT_EQ(Transform2D::translateY(-200 * i), child->getGlobalToLocalTransform()); } component->update(kUpdateScrollPosition, 300); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); for (auto i = 0 ; i < component->getChildCount() ; i++) { auto child = as<CoreComponent>(component->getChildAt(i)); ASSERT_EQ(Transform2D::translateY(-200 * i + 300), child->getGlobalToLocalTransform()); } } static const char *HORIZONTAL_SEQUENCE = R"apl({ "type": "APL", "version": "1.4", "mainTemplate": { "parameters": [], "item": { "type": "Sequence", "scrollDirection": "horizontal", "width": 500, "height": 200, "items": { "type": "Frame", "width": 200, "height": 200 }, "data": [ 1, 2, 3, 4, 5 ] } } } )apl"; TEST_F(ComponentTransformTest, HorizontalSequence) { loadDocument(HORIZONTAL_SEQUENCE); advanceTime(10); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); for (auto i = 0 ; i < component->getChildCount() ; i++) { auto child = as<CoreComponent>(component->getChildAt(i)); ASSERT_EQ(Transform2D::translateX(-200 * i), child->getGlobalToLocalTransform()); } component->update(kUpdateScrollPosition, 300); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); for (auto i = 0 ; i < component->getChildCount() ; i++) { auto child = as<CoreComponent>(component->getChildAt(i)); ASSERT_EQ(Transform2D::translateX(-200 * i + 300), child->getGlobalToLocalTransform()); } } static const char *STALENESS_PROPAGATION = R"apl({ "type": "APL", "version": "1.4", "layouts": { "Subcontainer": { "parameters": [ "containerIndex" ], "item": { "type": "Container", "width": 200, "height": 300, "items": { "type": "Text", "text": "${data}", "height": "50" }, "data": [ "item ${containerIndex}.1", "item ${containerIndex}.2", "item ${containerIndex}.3", "item ${containerIndex}.4", "item ${containerIndex}.5" ] } } }, "mainTemplate": { "parameters": [], "item": { "type": "Sequence", "id": "top", "scrollDirection": "vertical", "width": 200, "height": 500, "items": [ { "type": "Subcontainer", "containerIndex": "1" }, { "type": "Subcontainer", "containerIndex": "2" }, { "type": "Subcontainer", "containerIndex": "3" } ] } } } )apl"; TEST_F(ComponentTransformTest, StalenessPropagation) { loadDocument(STALENESS_PROPAGATION); advanceTime(10); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); ASSERT_EQ(3, component->getChildCount()); for (auto i = 0 ; i < component->getChildCount(); i++) { auto subcontainer = component->getCoreChildAt(i); ASSERT_EQ(Transform2D::translateY(-300 * i), subcontainer->getGlobalToLocalTransform()); ASSERT_EQ(5, subcontainer->getChildCount()); for (auto j = 0; j < subcontainer->getChildCount(); j++) { auto text = subcontainer->getCoreChildAt(j); ASSERT_EQ(Transform2D::translateY(-300 * i - 50 * j), text->getGlobalToLocalTransform()); } } component->update(kUpdateScrollPosition, 400); ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); ASSERT_EQ(3, component->getChildCount()); for (auto i = 0 ; i < component->getChildCount(); i++) { auto subcontainer = component->getCoreChildAt(i); ASSERT_EQ(Transform2D::translateY(-300 * i + 400), subcontainer->getGlobalToLocalTransform()); ASSERT_EQ(5, subcontainer->getChildCount()); for (auto j = 0; j < subcontainer->getChildCount(); j++) { auto text = subcontainer->getCoreChildAt(j); ASSERT_EQ(Transform2D::translateY(-300 * i + 400 - 50 * j), text->getGlobalToLocalTransform()); } } ASSERT_TRUE(TransformComponent(root, "top", "translateX", 100)); ASSERT_EQ(Transform2D::translateX(-100), component->getGlobalToLocalTransform()); ASSERT_EQ(3, component->getChildCount()); for (auto i = 0 ; i < component->getChildCount(); i++) { auto subcontainer = component->getCoreChildAt(i); ASSERT_EQ(Transform2D::translate(-100, -300 * i + 400), subcontainer->getGlobalToLocalTransform()); ASSERT_EQ(5, subcontainer->getChildCount()); for (auto j = 0; j < subcontainer->getChildCount(); j++) { auto text = subcontainer->getCoreChildAt(j); ASSERT_EQ(Transform2D::translate(-100, -300 * i + 400 - 50 * j), text->getGlobalToLocalTransform()); } } } static const char *SCROLL_VIEW_WITH_PAGER = R"apl( { "type": "APL", "version": "1.7", "theme": "dark", "styles": { "base": { "values": [ { "backgroundColor": "red" }, { "when": "${state.pressed}", "backgroundColor": "blue" } ] } }, "mainTemplate": { "items": { "type": "ScrollView", "width": 300, "height": 600, "item": { "type": "Container", "direction": "column", "alignItems": "center", "data": [ 1, 2, 3, 4, 5 ], "item": { "type": "Pager", "width": 300, "height": 200, "id": "pager${data}", "item": { "type": "TouchWrapper", "paddingTop": 25, "paddingBottom": 25, "id": "touch${data}", "onPress": { "type": "SetValue", "componentId": "frame${data}", "property": "backgroundColor", "value": "green" }, "item": { "type": "Frame", "id": "frame${data}", "style": "base", "width": "100%", "height": "100%" } } } } } } } )apl"; TEST_F(ComponentTransformTest, ScrollViewWithPager) { loadDocument(SCROLL_VIEW_WITH_PAGER); // The ScrollView is 600 tall and has a 1000 tall child Container auto container = as<CoreComponent>(component->getChildAt(0)); ASSERT_TRUE(expectBounds(component, 0, 0, 600, 300)); ASSERT_TRUE(expectBounds(container, 0, 0, 1000, 300)); // The parent components have a no-op transform because they're at (0, 0) ASSERT_EQ(Transform2D(), component->getGlobalToLocalTransform()); ASSERT_EQ(Transform2D(), container->getGlobalToLocalTransform()); // Assert expected initial state of all the children for (auto i = 0 ; i < container->getChildCount() ; i++) { // Each pager is cumulatively offset by its height (200) auto pager = as<CoreComponent>(container->getChildAt(i)); ASSERT_EQ("pager" + std::to_string(i + 1), pager->getId()); ASSERT_EQ(Transform2D::translateY(-200 * i), pager->getGlobalToLocalTransform()); // The TouchWrapper has the same transform as the pager auto touch = as<CoreComponent>(pager->getChildAt(0)); ASSERT_EQ("touch" + std::to_string(i + 1), touch->getId()); ASSERT_EQ(pager->getGlobalToLocalTransform(), touch->getGlobalToLocalTransform()); // The Frame's transform is offset by the parent's padding auto frame = as<CoreComponent>(touch->getChildAt(0)); ASSERT_EQ("frame" + std::to_string(i + 1), frame->getId()); ASSERT_EQ(touch->getGlobalToLocalTransform() * Transform2D::translateY(-25), frame->getGlobalToLocalTransform()); // And the Frames are all initially red ASSERT_EQ(Object(Color(Color::RED)), frame->getCalculated(kPropertyBackgroundColor)); } // The point (100, 500) is within the bounds of the third TouchWrapper auto touch3 = as<CoreComponent>(context->findComponentById("touch3")); ASSERT_TRUE(touch3->containsLocalPosition(touch3->toLocalPoint(Point(100, 500)))); // Scroll down 400 by grabbing (100, 500) ASSERT_EQ(Point(), component->scrollPosition()); ASSERT_TRUE(HandlePointerEvent(root, PointerEventType::kPointerDown, Point(100, 500), false)); advanceTime(200); ASSERT_TRUE(HandlePointerEvent(root, PointerEventType::kPointerMove, Point(100, 100), true)); advanceTime(200); ASSERT_TRUE(HandlePointerEvent(root, PointerEventType::kPointerUp, Point(100, 100), true)); advanceTime(200); ASSERT_EQ(Point(0, 400), component->scrollPosition()); // Now the point (100, 100) is within the bounds of the third TouchWrapper ASSERT_TRUE(touch3->containsLocalPosition(touch3->toLocalPoint(Point(100, 100)))); // Tap the third touch wrapper ASSERT_TRUE(HandlePointerEvent(root, PointerEventType::kPointerDown, Point(100, 100), false)); ASSERT_TRUE(HandlePointerEvent(root, PointerEventType::kPointerUp, Point(100, 100), true)); advanceTime(200); // Look at all the frames auto frame1 = as<CoreComponent>(context->findComponentById("frame1")); auto frame2 = as<CoreComponent>(context->findComponentById("frame2")); auto frame3 = as<CoreComponent>(context->findComponentById("frame3")); auto frame4 = as<CoreComponent>(context->findComponentById("frame4")); auto frame5 = as<CoreComponent>(context->findComponentById("frame5")); // The third frame has turned to green ASSERT_EQ(Object(Color(Color::RED)), frame1->getCalculated(kPropertyBackgroundColor)); ASSERT_EQ(Object(Color(Color::RED)), frame2->getCalculated(kPropertyBackgroundColor)); ASSERT_EQ(Object(Color(Color::GREEN)), frame3->getCalculated(kPropertyBackgroundColor)); ASSERT_EQ(Object(Color(Color::RED)), frame4->getCalculated(kPropertyBackgroundColor)); ASSERT_EQ(Object(Color(Color::RED)), frame5->getCalculated(kPropertyBackgroundColor)); }
31.387792
121
0.567466
[ "object", "transform" ]
8ba01e47cee5cb9350dd986aeafbdd49be155cba
4,163
cpp
C++
src/profiler/leaf_node_time.cpp
J-Y2020/CARMI
17c18dc5d615fdcf2d9e3086f9cc476a721a4d9b
[ "MIT" ]
null
null
null
src/profiler/leaf_node_time.cpp
J-Y2020/CARMI
17c18dc5d615fdcf2d9e3086f9cc476a721a4d9b
[ "MIT" ]
null
null
null
src/profiler/leaf_node_time.cpp
J-Y2020/CARMI
17c18dc5d615fdcf2d9e3086f9cc476a721a4d9b
[ "MIT" ]
null
null
null
/** * @file leaf_node_time.cpp * @author Jiaoyi * @brief * @version 0.1 * @date 2021-09-18 * * @copyright Copyright (c) 2021 * */ #include <algorithm> #include <ctime> #include <iostream> #include <random> #include <utility> #include <vector> #include "../include/carmi.h" #include "../include/construct/minor_function.h" #include "../include/dataManager/datapoint.h" #include "../include/func/inlineFunction.h" #include "../include/nodes/leafNode/array_type.h" const int kSize = 110; const float kSecondToNanosecond = 1000000000.0; const int kModelNumber = 100000000; const int block = 512; const int end = kModelNumber / block; std::vector<std::pair<double, double>> dataset(kSize); std::vector<LeafSlots<double, double>> entireData; std::vector<int> idx(end); template <typename TYPE> double GetNodePredictTime(CARMI<double, double> carmi) { std::vector<TYPE> node(kModelNumber); for (int i = 0; i < end; i++) { int neededLeafNum = carmi.GetActualSize(kSize); carmi.StoreData(neededLeafNum, 0, kSize, dataset, &node[i * block]); } std::vector<int> keys(kSize); for (int i = 0; i < kSize; i++) { keys[i] = i; } unsigned seed = std::clock(); std::default_random_engine engine(seed); shuffle(idx.begin(), idx.end(), engine); shuffle(keys.begin(), keys.end(), engine); int tmpIdx, type, key; int currunion, find_idx; std::clock_t s, e; double tmp, tmp1 = 0; s = std::clock(); for (int i = 0; i < end; i++) { tmpIdx = idx[i]; key = keys[i % kSize]; int left = node[tmpIdx].m_left; currunion = node[tmpIdx].Predict(key); find_idx += left + currunion; } e = std::clock(); tmp = (e - s) / static_cast<double>(CLOCKS_PER_SEC); std::cout << "size:" << sizeof(node[0]) << "\n"; s = std::clock(); for (int i = 0; i < end; i++) { tmpIdx = idx[i]; key = keys[i % kSize]; find_idx += node[tmpIdx].m_left + node[tmpIdx].slotkeys[3]; } e = std::clock(); tmp1 = (e - s) / static_cast<double>(CLOCKS_PER_SEC); std::cout << "find idx:" << find_idx << std::endl; return (tmp - tmp1) * kSecondToNanosecond / end; } double GetBlockSearchTime(CARMI<double, double> carmi) { std::vector<LeafSlots<double, double>> tmpSlots(carmi.kMaxSlotNum, LeafSlots<double, double>()); for (int i = 0; i < carmi.kMaxSlotNum; i++) { for (int j = 0; j < i + 1; j++) { tmpSlots[i].slots[j] = {i, i * 10}; } } unsigned seed = std::clock(); std::default_random_engine engine(seed); for (int i = 0; i < kModelNumber; i++) { entireData.push_back(tmpSlots[i % carmi.kMaxSlotNum]); } std::vector<int> keys(carmi.kMaxSlotNum); for (int i = 0; i < carmi.kMaxSlotNum; i++) { keys[i] = i; } shuffle(idx.begin(), idx.end(), engine); shuffle(keys.begin(), keys.end(), engine); int tmpIdx, type, key; int currunion, find_idx, res; std::clock_t s, e; double tmp, tmp1 = 0; s = std::clock(); for (int i = 0; i < end; i++) { tmpIdx = idx[i]; key = keys[i % carmi.kMaxSlotNum]; res += carmi.SlotsUnionSearch(entireData[tmpIdx], key); } e = std::clock(); tmp = (e - s) / static_cast<double>(CLOCKS_PER_SEC); s = std::clock(); for (int i = 0; i < end; i++) { tmpIdx = idx[i]; key = keys[i % carmi.kMaxSlotNum]; find_idx += entireData[tmpIdx].slots[0].first + entireData[tmpIdx].slots[4].first + entireData[tmpIdx].slots[8].first + entireData[tmpIdx].slots[12].first; } e = std::clock(); tmp1 = (e - s) / static_cast<double>(CLOCKS_PER_SEC); std::cout << "find idx:" << find_idx << std::endl; return (tmp - tmp1) * kSecondToNanosecond / end; } int main() { for (int i = 0; i < kSize; i++) { dataset[i] = {i, i * 10}; } for (int i = 0; i < end; i++) { idx[i] = i * block; } CARMI<double, double> carmi; double cf = 0, block = 0; float times = 1.0; for (int i = 0; i < times; i++) { cf += GetNodePredictTime<ArrayType<double>>(carmi); block += GetBlockSearchTime(carmi); } std::cout << "cf average time:" << cf / times << std::endl; std::cout << "block average time:" << block / times << std::endl; }
29.316901
79
0.606294
[ "vector" ]
8ba396f0595f26afe4fccb395f413324c112362e
3,127
cpp
C++
tools/graphite.cpp
dillonl/graphite
798b4961f8eeebc0a633ecca5b26e27453dfe487
[ "MIT" ]
27
2015-09-17T08:35:51.000Z
2021-04-07T02:37:37.000Z
tools/graphite.cpp
dillonl/gwiz
798b4961f8eeebc0a633ecca5b26e27453dfe487
[ "MIT" ]
6
2015-12-30T21:43:56.000Z
2018-12-13T22:52:29.000Z
tools/graphite.cpp
dillonl/graphite
798b4961f8eeebc0a633ecca5b26e27453dfe487
[ "MIT" ]
7
2015-12-30T21:33:49.000Z
2019-11-25T10:16:01.000Z
#include "core/util/Utility.h" #include "core/util/Params.h" #include "core/region/Region.h" #include "core/reference/FastaReference.h" #include "core/vcf/VCFReader.h" #include "core/vcf/VCFWriter.h" #include "core/alignment/AlignmentReader.h" #include "core/graph/GraphProcessor.h" #include <string> #include <iostream> #include <stdlib.h> int main(int argc, char** argv) { // get all param properties graphite::Params params; params.parseGSSW(argc, argv); if (params.showHelp() || !params.validateRequired()) { params.printHelp(); return 0; } auto alignmentPaths = params.getAlignmentPaths(); auto fastaPath = params.getFastaPath(); auto vcfPaths = params.getInVCFPaths(); auto outputDirectory = params.getOutputDirectory(); auto paramRegionPtr = params.getRegion(); auto matchValue = params.getMatchValue(); auto misMatchValue = params.getMisMatchValue(); auto gapOpenValue = params.getGapOpenValue(); auto gapExtensionValue = params.getGapExtensionValue(); auto includeDuplicates = params.getIncludeDuplicates(); auto outputVisualizationFiles = params.outputVisualizationFiles(); auto mappingQuality = params.getMappingQualityFilter(); auto readSampleLimit = params.getReadSampleNumber(); auto overwriteSampleName = params.getOverwrittenSampleName(); auto threadCount = params.getThreadCount(); auto saveSupportingReadInfo = params.saveSupportingReadInformation(); // create reference reader auto fastaReferencePtr = std::make_shared< graphite::FastaReference >(fastaPath); // track samples from alignment files std::vector< graphite::Sample::SharedPtr > alignmentSamplePtrs; // create alignment readers std::vector< graphite::AlignmentReader::SharedPtr > alignmentReaderPtrs; for (auto alignmentPath : alignmentPaths) { auto alignmentReaderPtr = std::make_shared< graphite::AlignmentReader >(alignmentPath, fastaPath); if (overwriteSampleName.length() == 0) { for (auto iter : alignmentReaderPtr->getSamplePtrs()) { alignmentSamplePtrs.emplace_back(iter.second); } } else { auto samplePtr = std::make_shared< graphite::Sample >(overwriteSampleName, "1", alignmentPath); alignmentSamplePtrs.emplace_back(samplePtr); alignmentReaderPtr->overwriteSample(samplePtr); } alignmentReaderPtrs.emplace_back(alignmentReaderPtr); } // create VCF readers // create VCF writers std::vector< graphite::VCFReader::SharedPtr > vcfReaderPtrs; for (auto vcfPath : vcfPaths) { auto vcfWriterPtr = std::make_shared< graphite::VCFWriter >(vcfPath, alignmentSamplePtrs, outputDirectory, saveSupportingReadInfo); auto vcfReaderPtr = std::make_shared< graphite::VCFReader >(vcfPath, alignmentSamplePtrs, paramRegionPtr, vcfWriterPtr); vcfReaderPtrs.emplace_back(vcfReaderPtr); } // create graph processor // call process on processor auto graphProcessorPtr = std::make_shared< graphite::GraphProcessor >(fastaReferencePtr, alignmentReaderPtrs, vcfReaderPtrs, matchValue, misMatchValue, gapOpenValue, gapExtensionValue, outputVisualizationFiles, mappingQuality, readSampleLimit, threadCount); graphProcessorPtr->processVariants(); return 0; }
36.788235
258
0.774864
[ "vector" ]
8bb0eddbad7d6eb3c3fec20c7ad06d5bacba59c8
1,350
hpp
C++
23/coprocessor.hpp
ComicSansMS/AdventOfCode2017
238460dd82dae182d78b8460578b7f615cf99fd0
[ "Unlicense" ]
null
null
null
23/coprocessor.hpp
ComicSansMS/AdventOfCode2017
238460dd82dae182d78b8460578b7f615cf99fd0
[ "Unlicense" ]
null
null
null
23/coprocessor.hpp
ComicSansMS/AdventOfCode2017
238460dd82dae182d78b8460578b7f615cf99fd0
[ "Unlicense" ]
null
null
null
#ifndef ADVENT_OF_CODE_23_COPROCESSOR_HPP_INCLUDE_GUARD #define ADVENT_OF_CODE_23_COPROCESSOR_HPP_INCLUDE_GUARD #include <array> #include <cstdint> #include <string_view> #include <variant> #include <vector> struct Register { char r; }; struct Number { int64_t n; }; using Value = std::variant<Register, Number>; struct Set { Register dest; Value value; }; struct Sub { Register dest; Value value; }; struct Mul { Register dest; Value value; }; struct Jnz { Value condition; Value offset; }; using Instruction = std::variant<Set, Sub, Mul, Jnz>; using Program = std::vector<Instruction>; Program parseInput(std::string_view input); struct CoprocessorVm { std::array<int64_t, 8> registers = {}; std::int64_t pc = 0; std::int64_t mul_count = 0; }; int64_t getRegister(CoprocessorVm const& vm, Register r); int64_t getValue(CoprocessorVm const& vm, Value v); int64_t executeInstruction(CoprocessorVm& vm, Set const& i); int64_t executeInstruction(CoprocessorVm& vm, Sub const& i); int64_t executeInstruction(CoprocessorVm& vm, Mul const& i); int64_t executeInstruction(CoprocessorVm& vm, Jnz const& i); int64_t executeInstruction(CoprocessorVm& vm, Instruction const& i); int64_t executeProgram(CoprocessorVm& vm, Program const& program); std::vector<char> sieve(int limit); #endif
19.852941
68
0.731111
[ "vector" ]
8bba64d976c57ea0edda4e7caf8cc1ab7222c8ca
3,036
cc
C++
source/utils/detect.cc
dayHRResearch/VideoCover
ccbf31df89563779b3fd006ee878ca8ab337a2a6
[ "Apache-2.0" ]
2
2019-07-16T08:08:23.000Z
2019-07-22T14:50:27.000Z
source/utils/detect.cc
dayHRResearch/VideoCover
ccbf31df89563779b3fd006ee878ca8ab337a2a6
[ "Apache-2.0" ]
null
null
null
source/utils/detect.cc
dayHRResearch/VideoCover
ccbf31df89563779b3fd006ee878ca8ab337a2a6
[ "Apache-2.0" ]
null
null
null
/** * Copyright 2019 DayHR Authors. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============================================================================== */ #include "../../include/detech.h" using namespace std; using namespace cv; vector<Rect> detectFaces(Mat gray) { CascadeClassifier facesCascade; vector<Rect> faces; facesCascade.load( "/usr/local/share/opencv4/haarcascades/" "haarcascade_frontalface_default.xml"); facesCascade.detectMultiScale(gray, faces, 1.1, 2, 0 | CASCADE_SCALE_IMAGE, Size(30, 30)); return faces; } vector<Rect> detectSmile(Mat faces) { CascadeClassifier smileCascade; vector<Rect> smiles; smileCascade.load( "/usr/local/share/opencv4/haarcascades/haarcascade_smile.xml"); smileCascade.detectMultiScale(faces, smiles, 1.1, 2, 0 | CASCADE_SCALE_IMAGE, Size(30, 30)); return smiles; } void detectDrawEyes(Mat img, Mat img_gray) { vector<Rect> faces = detectFaces(img_gray); for (size_t i = 0; i < faces.size(); i++) { Mat faceROI = img_gray(faces[i]); CascadeClassifier eyes_cascade; eyes_cascade.load( "/usr/local/share/opencv4/haarcascades/haarcascade_eye.xml"); vector<Rect> eyes; eyes_cascade.detectMultiScale(faceROI, eyes, 1.1, 2, 0 | CASCADE_SCALE_IMAGE, Size(30, 30)); for (size_t j = 0; j < eyes.size(); j++) { Point eyes_center(faces[i].x + eyes[j].x + eyes[j].width / 2, faces[i].y + eyes[j].y + eyes[j].height / 2); int r = cvRound((eyes[j].width + eyes[j].height) * 0.25); circle(img, eyes_center, r, Scalar(255, 0, 0), 1, 8, 0); } } namedWindow("detect and draw eyes"); imshow("detect and draw eyes", img); } void saveFaces(Mat img, Mat img_gray) { vector<Rect> faces = detectFaces(img_gray); for (size_t i = 0; i < faces.size(); i++) { stringstream buffer; buffer << i; string saveName = "smile" + buffer.str() + ".png"; Rect roi = faces[i]; imwrite(saveName, img(roi)); } } void drawFaces(Mat img, vector<Rect> faces) { namedWindow("draw faces"); for (size_t i = 0; i < faces.size(); i++) { // 先确定人脸矩形中心坐标,再根据该坐标画椭圆 Point center(faces[i].x + faces[i].width / 2, faces[i].y + faces[i].height / 2); ellipse(img, center, Size(faces[i].width / 2, faces[i].height / 1.5), 0, 0, 360, Scalar(0, 255, 0), 2, 8, 0); } imshow("draw faces", img); }
36.142857
81
0.618577
[ "vector" ]
8bbdc57248fdf7329d2d1932fc7f3cb1533466eb
47,704
cpp
C++
src/lua/LuaFile.cpp
fmidev/smartmet-library-grid-content
303483967a1248002369893cf43b4ca03f8385d9
[ "MIT" ]
null
null
null
src/lua/LuaFile.cpp
fmidev/smartmet-library-grid-content
303483967a1248002369893cf43b4ca03f8385d9
[ "MIT" ]
null
null
null
src/lua/LuaFile.cpp
fmidev/smartmet-library-grid-content
303483967a1248002369893cf43b4ca03f8385d9
[ "MIT" ]
null
null
null
#include "LuaFile.h" #include <grid-files/common/GeneralFunctions.h> #include <macgyver/StringConversion.h> namespace SmartMet { namespace Lua { extern "C" { #include <lua.h> #include <lauxlib.h> #include <lualib.h> } LuaFile::LuaFile() { try { for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { mLuaState[t] = nullptr; mStateKey[t] = 0; } mLastModified = 0; mStateKeyCounter = 0; } catch (...) { throw Fmi::Exception(BCP, "Constructor failed!", nullptr); } } LuaFile::LuaFile(const std::string& filename) { try { mFilename = filename; for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { mLuaState[t] = nullptr; mStateKey[t] = 0; } mLastModified = 0; mStateKeyCounter = 0; } catch (...) { throw Fmi::Exception(BCP, "Constructor failed!", nullptr); } } LuaFile::LuaFile(const LuaFile& luaFile) { try { mFilename = luaFile.mFilename; mFunctions = luaFile.mFunctions; for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { mLuaState[t] = nullptr; mStateKey[t] = 0; } mLastModified = luaFile.mLastModified; mStateKeyCounter = 0; } catch (...) { throw Fmi::Exception(BCP, "Copy constructor failed!", nullptr); } } LuaFile::~LuaFile() { try { for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { if (mLuaState[t] != nullptr) lua_close((lua_State*)mLuaState[t]); } } catch (...) { Fmi::Exception exception(BCP,"Destructor failed",nullptr); exception.printError(); } } void LuaFile::init() { try { AutoWriteLock lock(&mModificationLock); loadFile(); mFunctions.clear(); for (int t=1; t<10; t++) loadFunctionList(t); } catch (...) { throw Fmi::Exception(BCP, "Initialization failed!", nullptr); } } void LuaFile::init(const std::string& filename) { try { mFilename = filename; init(); } catch (...) { throw Fmi::Exception(BCP, "Initialization failed!", nullptr); } } void* LuaFile::getLuaState(ulonglong& key) { try { AutoWriteLock lock(&mStateModificationLock); while (true) { for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { if (mStateKey[t] == 0) { mStateKeyCounter++; key = mStateKeyCounter; mStateKey[t] = key; return mLuaState[t]; } } time_usleep(0,100); } } catch (...) { throw Fmi::Exception(BCP, "Initialization failed!", nullptr); } } void LuaFile::releaseLuaState(ulonglong key) { try { for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { if (mStateKey[t] == key) { mStateKey[t] = 0; return; } } } catch (...) { throw Fmi::Exception(BCP, "Initialization failed!", nullptr); } } bool LuaFile::checkUpdates() { try { time_t tt = getFileModificationTime(mFilename.c_str()); if (tt == mLastModified || (tt+3) >= time(nullptr)) return false; AutoWriteLock lock(&mModificationLock); if (tt != mLastModified && (tt+3) < time(nullptr)) { AutoWriteLock lock(&mStateModificationLock); // Waiting until all states are free. bool ind = false; while (!ind) { uint count = 0; for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { if (mStateKey[t] == 0) count++; } if (count == NUM_OF_LUA_HANDLES) ind = true; else time_usleep(0,100); } for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { if (mLuaState[t] != nullptr) { lua_close((lua_State*)mLuaState[t]); mLuaState[t] = nullptr; } } loadFile(); mFunctions.clear(); for (int t=1; t<10; t++) loadFunctionList(t); return true; } return false; } catch (...) { throw Fmi::Exception(BCP, "Update check failed!", nullptr); } } uint LuaFile::getFunction(const std::string& functionName,std::string& function) { try { AutoReadLock lock(&mModificationLock); auto a = mFunctions.find(toLowerString(functionName)); if (a != mFunctions.end()) { function = a->second.mFunctionName; return a->second.mType; } return 0; } catch (...) { throw Fmi::Exception(BCP, "LUA function searching failed!", nullptr); } } float LuaFile::executeFunctionCall1(const std::string& function,std::vector<float>& parameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 1) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen = parameters.size(); lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushstring(mLuaState,a->mFunctionName.c_str()); lua_pushinteger(L,pLen); lua_newtable(L); for (int i = 0; i < pLen; i++) { lua_pushnumber(L,parameters[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 2, 2, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); std::string message(cstr, len); lua_pop(L, 1); /* pop returned value */ float value = lua_tonumber(L,-1); lua_pop(L, 1); /* pop returned value */ if (message != "OK") { Fmi::Exception exception(BCP, "LUA function call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("Error Message",message.c_str()); throw exception; } return value; } return 0; } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } double LuaFile::executeFunctionCall1(const std::string& function,std::vector<double>& parameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 1) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen = parameters.size(); lua_getglobal(L,a->second.mFunctionName.c_str()); lua_pushinteger(L,pLen); lua_newtable(L); for (int i = 0; i < pLen; i++) { lua_pushnumber(L,parameters[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 2, 2, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); std::string message(cstr, len); lua_pop(L, 1); /* pop returned value */ double value = lua_tonumber(L,-1); lua_pop(L, 1); /* pop returned value */ if (message != "OK") { Fmi::Exception exception(BCP, "LUA function call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("Error Message",message.c_str()); throw exception; } return value; } return 0; } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::executeFunctionCall4(const std::string& function,uint columns,uint rows,std::vector<float>& inParameters1,std::vector<float>& inParameters2,std::vector<float>& angles,std::vector<float>& outParameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 4) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen1 = inParameters1.size(); int pLen2 = inParameters2.size(); int aLen = angles.size(); if (pLen1 != pLen2) { Fmi::Exception exception(BCP, "Input parameters should have the same number of values!"); exception.addParameter("NumOfValues(inParameters1)",Fmi::to_string(pLen1)); exception.addParameter("NumOfValues(inParameters2)",Fmi::to_string(pLen2)); throw exception; } if (pLen1 != aLen) { Fmi::Exception exception(BCP, "There should be as many angles as grid values!"); exception.addParameter("NumOfValues",Fmi::to_string(pLen1)); exception.addParameter("NumOfAngles",Fmi::to_string(aLen)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters1[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters2[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < aLen; i++) { lua_pushnumber(L,angles[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 5, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(pLen1); for (int t=1; t<=pLen1; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); float a = lua_tonumber(L, -1); outParameters.emplace_back(a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::executeFunctionCall4(const std::string& function,uint columns,uint rows,std::vector<double>& inParameters1,std::vector<double>& inParameters2,std::vector<float>& angles,std::vector<double>& outParameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 4) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen1 = inParameters1.size(); int pLen2 = inParameters2.size(); int aLen = angles.size(); if (pLen1 != pLen2) { Fmi::Exception exception(BCP, "Input parameters should have the same number of values!"); exception.addParameter("NumOfValues(inParameters1)",Fmi::to_string(pLen1)); exception.addParameter("NumOfValues(inParameters2)",Fmi::to_string(pLen2)); throw exception; } if (pLen1 != aLen) { Fmi::Exception exception(BCP, "There should be as many angles as grid values!"); exception.addParameter("NumOfValues",Fmi::to_string(pLen1)); exception.addParameter("NumOfAngles",Fmi::to_string(aLen)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters1[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters2[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < aLen; i++) { lua_pushnumber(L,angles[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 5, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(pLen1); for (int t=1; t<=pLen1; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); double a = lua_tonumber(L, -1); outParameters.emplace_back(a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } std::string LuaFile::executeFunctionCall5(const std::string& function,const std::string& language,std::vector<float>& parameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 5) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen = parameters.size(); lua_getglobal(L,a->second.mFunctionName.c_str()); lua_pushstring(L,language.c_str()); lua_pushinteger(L,pLen); lua_newtable(L); for (int i = 0; i < pLen; i++) { lua_pushnumber(L,parameters[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 3, 2, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); std::string message(cstr, len); lua_pop(L, 1); /* pop returned value */ const char* vstr = lua_tolstring(L, -1, &len); std::string value(vstr, len); lua_pop(L, 1); /* pop returned value */ if (message != "OK") { Fmi::Exception exception(BCP, "LUA function call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("Error Message",message.c_str()); throw exception; } return value; } return std::string(""); } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } std::string LuaFile::executeFunctionCall5(const std::string& function,const std::string& language,std::vector<double>& parameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 5) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen = parameters.size(); lua_getglobal(L,a->second.mFunctionName.c_str()); lua_pushstring(L,language.c_str()); lua_pushinteger(L,pLen); lua_newtable(L); for (int i = 0; i < pLen; i++) { lua_pushnumber(L,parameters[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 3, 2, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); std::string message(cstr, len); lua_pop(L, 1); /* pop returned value */ const char* vstr = lua_tolstring(L, -1, &len); std::string value(vstr, len); lua_pop(L, 1); /* pop returned value */ if (message != "OK") { Fmi::Exception exception(BCP, "LUA function call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("Error Message",message.c_str()); throw exception; } return value; } return std::string(""); } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } std::string LuaFile::executeFunctionCall6(const std::string& function,std::vector<std::string>& params) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 6) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushstring(mLuaState,a->mFunctionName.c_str()); //lua_pushinteger(L,pLen); int len = params.size(); lua_pushinteger(L,len); lua_newtable(L); for (int i = 0; i < len; i++) { lua_pushstring(L,params[i].c_str()); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 2, 1, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); std::string value(cstr, len); lua_pop(L, 1); /* pop returned value */ return value; } return std::string(""); } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } std::string LuaFile::executeFunctionCall6( const std::string& function, const std::string& producerName, const std::string& parameterName, T::ParamKeyType parameterKeyType, const std::string& parameterKey, short parameterLevelId, int parameterLevel, short forecastType, short forecastNumber, short interpolationMethod) { try { std::vector<std::string> params; params.emplace_back(producerName); params.emplace_back(parameterName); params.emplace_back(Fmi::to_string(parameterKeyType)); params.emplace_back(parameterKey); params.emplace_back(Fmi::to_string(parameterLevelId)); params.emplace_back(Fmi::to_string(parameterLevel)); params.emplace_back(Fmi::to_string(forecastType)); params.emplace_back(Fmi::to_string(forecastNumber)); params.emplace_back(Fmi::to_string(interpolationMethod)); return executeFunctionCall6(function,params); #if 0 LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 7) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushstring(mLuaState,a->mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushstring(L,producerName.c_str()); lua_pushstring(L,parameterName.c_str()); lua_pushinteger(L,parameterKeyType); lua_pushstring(L,parameterKey.c_str()); lua_pushinteger(L,parameterLevelIdType); lua_pushinteger(L,parameterLevelId); lua_pushinteger(L,parameterLevel); lua_pushinteger(L,forecastType); lua_pushinteger(L,forecastNumber); lua_pushinteger(L,interpolationMethod); int res = lua_pcall(L, 10, 1, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); std::string value(cstr, len); lua_pop(L, 1); /* pop returned value */ return value; } #endif } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } #if 0 void LuaFile::executeFunctionCall7(const std::string& function,uint columns,uint rows,std::vector<float>& inParameters1,std::vector<float>& inParameters2,std::vector<float>& inParameters3,std::vector<float>& outParameters) { try { LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 7) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen1 = inParameters1.size(); int pLen2 = inParameters2.size(); int pLen3 = inParameters3.size(); if (pLen1 != pLen2 || pLen1 != pLen3) { Fmi::Exception exception(BCP, "Input parameters should have the same number of values!"); exception.addParameter("NumOfValues(inParameters1)",Fmi::to_string(pLen1)); exception.addParameter("NumOfValues(inParameters2)",Fmi::to_string(pLen2)); exception.addParameter("NumOfValues(inParameters3)",Fmi::to_string(pLen3)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters1[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters2[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters3[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 5, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(pLen1); for (int t=1; t<=pLen1; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); float a = lua_tonumber(L, -1); outParameters.emplace_back(a); //printf("%d => %f\n",t,a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::executeFunctionCall7(const std::string& function,uint columns,uint rows,std::vector<double>& inParameters1,std::vector<double>& inParameters2,std::vector<double>& inParameters3,std::vector<double>& outParameters) { try { LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 7) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen1 = inParameters1.size(); int pLen2 = inParameters2.size(); int pLen3 = inParameters3.size(); if (pLen1 != pLen2 || pLen1 != pLen3) { Fmi::Exception exception(BCP, "Input parameters should have the same number of values!"); exception.addParameter("NumOfValues(inParameters1)",Fmi::to_string(pLen1)); exception.addParameter("NumOfValues(inParameters2)",Fmi::to_string(pLen2)); exception.addParameter("NumOfValues(inParameters3)",Fmi::to_string(pLen3)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters1[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters2[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters3[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 5, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(pLen1); for (int t=1; t<=pLen1; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); float a = lua_tonumber(L, -1); outParameters.emplace_back(a); //printf("%d => %f\n",t,a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::executeFunctionCall8(const std::string& function,uint columns,uint rows,std::vector<float>& inParameters1,std::vector<float>& inParameters2,std::vector<float>& inParameters3,std::vector<float>& inParameters4,std::vector<float>& outParameters) { try { LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 8) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen1 = inParameters1.size(); int pLen2 = inParameters2.size(); int pLen3 = inParameters3.size(); int pLen4 = inParameters4.size(); if (pLen1 != pLen2 || pLen1 != pLen3 || pLen1 != pLen4) { Fmi::Exception exception(BCP, "Input parameters should have the same number of values!"); exception.addParameter("NumOfValues(inParameters1)",Fmi::to_string(pLen1)); exception.addParameter("NumOfValues(inParameters2)",Fmi::to_string(pLen2)); exception.addParameter("NumOfValues(inParameters3)",Fmi::to_string(pLen3)); exception.addParameter("NumOfValues(inParameters4)",Fmi::to_string(pLen4)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters1[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters2[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters3[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters4[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 6, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(pLen1); for (int t=1; t<=pLen1; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); float a = lua_tonumber(L, -1); outParameters.emplace_back(a); //printf("%d => %f\n",t,a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::executeFunctionCall8(const std::string& function,uint columns,uint rows,std::vector<double>& inParameters1,std::vector<double>& inParameters2,std::vector<double>& inParameters3,std::vector<double>& inParameters4,std::vector<double>& outParameters) { try { LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 8) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } int pLen1 = inParameters1.size(); int pLen2 = inParameters2.size(); int pLen3 = inParameters3.size(); int pLen4 = inParameters4.size(); if (pLen1 != pLen2 || pLen1 != pLen3 || pLen1 != pLen4) { Fmi::Exception exception(BCP, "Input parameters should have the same number of values!"); exception.addParameter("NumOfValues(inParameters1)",Fmi::to_string(pLen1)); exception.addParameter("NumOfValues(inParameters2)",Fmi::to_string(pLen2)); exception.addParameter("NumOfValues(inParameters3)",Fmi::to_string(pLen3)); exception.addParameter("NumOfValues(inParameters4)",Fmi::to_string(pLen4)); throw exception; } lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters1[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters2[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters3[i]); lua_rawseti(L,-2,i + 1); } lua_newtable(L); for (int i = 0; i < pLen1; i++) { lua_pushnumber(L,inParameters4[i]); lua_rawseti(L,-2,i + 1); } int res = lua_pcall(L, 6, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(pLen1); for (int t=1; t<=pLen1; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); float a = lua_tonumber(L, -1); outParameters.emplace_back(a); //printf("%d => %f\n",t,a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } #endif void LuaFile::executeFunctionCall9(const std::string& function,uint columns,uint rows,std::vector<std::vector<float>>& inParameters,const std::vector<double>& extParameters,std::vector<float>& outParameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 9) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } uint sz = inParameters.size(); uint gridSize = columns*rows; lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_pushinteger(L,sz); lua_newtable(L); uint c = 0; for (uint i = 0; i < gridSize; i++) { for (uint t=0; t<sz; t++) { if (i < inParameters[t].size()) lua_pushnumber(L,inParameters[t][i]); else lua_pushnumber(L,ParamValueMissing); lua_rawseti(L,-2,c + 1); c++; } } lua_newtable(L); uint esz = extParameters.size(); for (uint t=0; t<esz; t++) { lua_pushnumber(L,extParameters[t]); lua_rawseti(L,-2,t + 1); } int res = lua_pcall(L, 5, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(gridSize); for (uint t=1; t<=gridSize; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); float a = lua_tonumber(L, -1); outParameters.emplace_back(a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::executeFunctionCall9(const std::string& function,uint columns,uint rows,std::vector<std::vector<double>>& inParameters,const std::vector<double>& extParameters,std::vector<double>& outParameters) { try { AutoReadLock lock(&mModificationLock); LuaHandle luaHandle(this); lua_State *L = (lua_State*)luaHandle.getState(); auto a = mFunctions.find(toLowerString(function)); if (a == mFunctions.end()) { Fmi::Exception exception(BCP, "Unknown function!"); exception.addParameter("Function",function); throw exception; } if (a->second.mType != 9) { Fmi::Exception exception(BCP, "Invalid function type!"); exception.addDetail("You should probably use different 'executeFunction' with this LUA function."); exception.addDetail("That's because the current LUA function does not support the same parameters"); exception.addDetail("or the return values that this 'executeFunction' is using."); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA Function Type",Fmi::to_string(a->second.mType)); throw exception; } uint sz = inParameters.size(); uint gridSize = columns*rows; lua_getglobal(L,a->second.mFunctionName.c_str()); //lua_pushinteger(L,pLen); lua_pushinteger(L,columns); lua_pushinteger(L,rows); lua_pushinteger(L,sz); lua_newtable(L); uint c = 0; for (uint i = 0; i < gridSize; i++) { for (uint t=0; t<sz; t++) { if (i < inParameters[t].size()) lua_pushnumber(L,inParameters[t][i]); else lua_pushnumber(L,ParamValueMissing); lua_rawseti(L,-2,c + 1); c++; } } lua_newtable(L); uint esz = extParameters.size(); for (uint t=0; t<esz; t++) { lua_pushnumber(L,extParameters[t]); lua_rawseti(L,-2,t + 1); } int res = lua_pcall(L, 5, LUA_MULTRET, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("LUA File",mFilename); exception.addParameter("LUA Function",function); exception.addParameter("LUA message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { outParameters.reserve(gridSize); for (uint t=1; t<=gridSize; t++) { lua_pushnumber(L,t); lua_gettable(L, -2); double a = lua_tonumber(L, -1); outParameters.emplace_back(a); lua_pop(L, 1); } lua_pop(L, 1); // pop table from the stack } } catch (...) { throw Fmi::Exception(BCP, "LUA function execution failed!", nullptr); } } void LuaFile::print(std::ostream& stream,uint level,uint optionFlags) { try { AutoReadLock lock(&mModificationLock); stream << space(level) << "LuaFile\n"; stream << space(level) << "- mFilename = " << mFilename << "\n"; for (auto it = mFunctions.begin(); it != mFunctions.end(); ++it) it->second.print(stream,level+2,optionFlags); } catch (...) { throw Fmi::Exception(BCP, "Operation failed!", nullptr); } } void LuaFile::loadFile() { try { for (uint t=0; t<NUM_OF_LUA_HANDLES; t++) { if (mLuaState[t] != nullptr) { lua_close((lua_State*)mLuaState[t]); mLuaState[t] = nullptr; } mLuaState[t] = luaL_newstate(); luaL_openlibs((lua_State*)mLuaState[t]); if (luaL_dofile((lua_State*)mLuaState[t],mFilename.c_str()) != 0) { Fmi::Exception exception(BCP, "Cannot load a LUA file!"); exception.addParameter("Filename",mFilename); exception.addParameter("Lua message",lua_tostring((lua_State*)mLuaState[t], -1)); lua_pop((lua_State*)mLuaState[t], 1); throw exception; } } mLastModified = getFileModificationTime(mFilename.c_str()); } catch (...) { throw Fmi::Exception(BCP, "File loading failed!", nullptr); } } void LuaFile::loadFunctionList(uint type) { try { lua_State *L =(lua_State*)mLuaState[0]; lua_getglobal(L,"getFunctionNames"); lua_pushinteger(L,type); int res = lua_pcall(L, 1, 1, 0); if (res != 0) { // LUA ERROR Fmi::Exception exception(BCP, "LUA call returns an error!"); exception.addParameter("Lua message",lua_tostring(L, -1)); lua_pop(L, 1); throw exception; } else { size_t len = 0; const char* cstr = lua_tolstring(L, -1, &len); char buf[100]; uint c = 0; for (size_t t = 0; t<= len; t++) { if (cstr[t] != '\0' && cstr[t] != ',' && c < 100) { buf[c] = cstr[t]; c++; } else { buf[c] = '\0'; if (c > 0) { mFunctions.insert(std::pair<std::string,LuaFunction>(toLowerString(std::string(buf)),LuaFunction(buf,type))); } c = 0; } } lua_pop(L, 1); /* pop returned value */ } } catch (...) { throw Fmi::Exception(BCP, "LUA function list loading failed!", nullptr); } } } // namespace Lua } // namespace SmartMet
26.769921
261
0.620556
[ "vector" ]
8bc3d9df905e565e5a8c806eed761156ffb21140
1,935
cpp
C++
2020-2021/opencv/qr/cv.cpp
pantadeusz/examples-ai
7316191b592eeb95c5873ee6836ccb6ca5b776a5
[ "MIT" ]
1
2020-10-20T13:27:16.000Z
2020-10-20T13:27:16.000Z
2020-2021/opencv/qr/cv.cpp
pantadeusz/examples-ai
7316191b592eeb95c5873ee6836ccb6ca5b776a5
[ "MIT" ]
null
null
null
2020-2021/opencv/qr/cv.cpp
pantadeusz/examples-ai
7316191b592eeb95c5873ee6836ccb6ca5b776a5
[ "MIT" ]
2
2019-06-07T10:54:01.000Z
2020-12-01T12:58:44.000Z
#include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <thread> #include <future> // g++ `pkg-config --cflags opencv4` cv.cpp `pkg-config --libs opencv4` using namespace std; using namespace cv; pair<string, vector<Point2d>> processMat(Mat frame) { string ret; vector<Point2d> pts; static QRCodeDetector qrdetector; if (qrdetector.detect(frame, pts)) { ret = qrdetector.decode(frame, pts); // cout << "found at " << pts << endl; } return {ret, pts}; } int main() { VideoCapture camera(0); vector<future<pair<string, vector<Point2d>>>> tasks; vector<Point2f> points; int pointsTTL = 0; while (waitKey(1) != 27) { Mat frame, frameFlipped; camera >> frame; if (tasks.size() == 0) { tasks.push_back(async(std::launch::async, processMat, frame)); } else if (tasks.back().valid()) { auto [v, pts0] = tasks.back().get(); vector<Point2f> pts; tasks.pop_back(); if (pts0.size() == 4) { for (auto p : pts0) pts.push_back(p); if (contourArea(pts, false) > 0.0025 * (frame.rows * frame.cols)) { cout << v << endl; points = pts; pointsTTL = 10; Mat dstMat(Size(400, 400), CV_8UC3); vector<Point2f> src = {{0, 0}, {dstMat.cols, 0}, {dstMat.cols, dstMat.rows}, {0, dstMat.rows}}; vector<Point2f> dst; for (auto p : points) dst.push_back(Point2f(p.x, p.y)); auto wrap_mtx = getPerspectiveTransform(dst, src); warpPerspective(frame, dstMat, wrap_mtx, Size(dstMat.cols, dstMat.rows)); imshow("RESULT", dstMat); } } } if (points.size() > 0) { for (int i = 0; i < 4; i++) line(frame, points.at(i), points.at((i + 1) % 4), Scalar(255, i * 63, 255)); } if (pointsTTL-- <= 0) { pointsTTL = 0; points.clear(); } flip(frame, frameFlipped, 1); imshow("frameFlipped", frameFlipped); } return 0; }
21.988636
100
0.614987
[ "vector" ]
8bd9334dfa4a42387b1bfe8dae6b66b384d722fb
52,594
cxx
C++
RAW/dateStream/dateStream.cxx
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
52
2016-12-11T13:04:01.000Z
2022-03-11T11:49:35.000Z
RAW/dateStream/dateStream.cxx
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
1,388
2016-11-01T10:27:36.000Z
2022-03-30T15:26:09.000Z
RAW/dateStream/dateStream.cxx
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
275
2016-06-21T20:24:05.000Z
2022-03-31T13:06:19.000Z
/* dateStream.c ============ Utility to simulate a DATE raw data stream using a given set of raw data files and a configuration file. Revision history: V01.00 4/05/2004 RD Created V01.01 25/10/2005 RD Support added for timestamp V01.02 4/04/2006 RD Support for CDH V01.03 24/05/2006 RD Added "Direct disk access" option V01.04 15/10/2010 RD Added possibility to set the run number */ #define VID "1.04" #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <assert.h> #include <ctype.h> #include <time.h> #include <cassert> #include "event.h" #define DESCRIPTION "DATE raw data stream simulator" #ifdef AIX static #endif char fileHandlerIdent[]= "@(#)""" __FILE__ """: """ DESCRIPTION \ """ """ VID """ """ \ """ compiled """ __DATE__ """ """ __TIME__; #define DBG_BASE if ( debug > 0 ) #define DBG_DETAILED if ( debug > 1 ) #define DBG_VERBOSE if ( debug > 2 ) #ifndef TRUE # define TRUE (0 == 0) #endif #ifndef FALSE # define FALSE (0 == 1) #endif const char *myName; int debug; FILE *outF; typedef enum { unknown, ldc, gdc } workingAsType; typedef enum { collider, fixedTarget } workingModeType; workingAsType workingAs; workingModeType workingMode; struct ldcDescriptorStruct { eventLdcIdType id; struct ldcDescriptorStruct *next; } *ldcsHead, *ldcsTail; void *eventsHead, *eventsTail; struct gdcEventDescriptorStruct { struct ldcEventDescriptorStruct *head; struct ldcEventDescriptorStruct *tail; struct gdcEventDescriptorStruct *next; struct eventHeaderStruct header; int loaded; unsigned long32 detPattern; eventTimestampSecType timestamp; } *currGdc; struct ldcEventDescriptorStruct { struct equipmentEventDescriptorStruct *head; struct equipmentEventDescriptorStruct *tail; struct ldcEventDescriptorStruct *next; eventLdcIdType id; struct eventHeaderStruct header; int loaded; unsigned long32 detPattern; eventTimestampSecType timestamp; } *currLdc; struct equipmentEventDescriptorStruct { struct equipmentEventDescriptorStruct *next; equipmentIdType id; struct payloadDescriptorStruct *payload; struct equipmentHeaderStruct header; } *currEvent; struct payloadDescriptorStruct { struct payloadDescriptorStruct *next; char *fileName; int fileSize; int size; void *data; } *payloadsHead, *payloadsTail; int lineNmb; eventGdcIdType currGdcId; unsigned long32 currDetPattern; eventTimestampSecType currTimestamp; eventLdcIdType currLdcId; equipmentIdType currEquipmentId; int currRunNb; int numOfLdcs; int numOfEvents; int createSorEor; int handleCDH; eventIdType oneEventDelta; eventIdType currEventId; int gotAliceTrigger; int bufferData; struct commonDataHeaderStruct *cdhRef = NULL; void dumpPayload( const struct payloadDescriptorStruct *p ) { char *c; int i; int printable; if ( p->data != NULL ) { for ( i = 0, c = (char *)p->data, printable = TRUE; printable && i != p->size; c++, i++ ) printable = isascii( *c ); if ( printable ) { printf( " \"" ); for ( i = 0, c = (char *)p->data; i != p->size; c++, i++ ) { if ( *c == '\n' ) printf( "\"\n \"" ); else putchar( *c ); } if ( *c != '\n' ) printf( "\"\n" ); } else { long32 *v; for ( i = 0, v = (long32 *)p->data; i+4 <= p->size; v++, i += 4 ) { if ( i % (4*8) == 0 ) { if ( i != 0 ) printf( "\n" ); printf( " " ); } printf( "%08x ", *v ); } if ( i < p->size ) { int j = 0; printf( "\n " ); while ( i != p->size ) { printf( "%02x ", *((char *)p->data + p->size - j - 1) & 0xff ); j++; i++; } } } printf( "\n" ); } } /* End of dumpPayload */ void dumpEvents() { assert( workingAs == ldc || workingAs == gdc ); if ( eventsHead != NULL ) { printf( "Events:\n" ); if ( workingAs == gdc ) { struct gdcEventDescriptorStruct *gdc; for ( gdc = (struct gdcEventDescriptorStruct *)eventsHead; gdc != NULL; gdc = gdc->next ) { struct ldcEventDescriptorStruct *ldc; printf( " GDC (%p)\n", (void*)gdc ); for ( ldc = gdc->head; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; printf( " LDC (%p): %d\n", (void*)ldc, ldc->id ); for ( eq = ldc->head; eq != NULL; eq = eq->next ) { printf( " EQUIPMENT (%p): %d PAYLOAD (%p):", (void*)eq, eq->id, (void*)eq->payload ); fflush( stdout ); printf( "\"%s\" (%d bytes)\n", eq->payload->fileName, eq->payload->size ); dumpPayload( eq->payload ); } } } } if ( workingAs == ldc ) { struct ldcEventDescriptorStruct *ldc; for ( ldc = (struct ldcEventDescriptorStruct *)eventsHead; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; printf( " LDC\n" ); for ( eq = ldc->head; eq != NULL; eq = eq->next ) { printf( " EQUIPMENT (%p): %d PAYLOAD (%p):", (void*)eq, eq->id, (void*)eq->payload ); fflush( stdout ); printf( "\"%s\" (%d bytes)\n", eq->payload->fileName, eq->payload->size ); dumpPayload( eq->payload ); } } } } else { printf( "Events: EMPTY\n" ); } } /* End of dumpEvents */ void getLine( char *line, const int maxSize ) { int read; int c; for ( read = 0; !feof( stdin ) && !ferror( stdin ) && read != maxSize; read++ ) { if ( (line[read] = getchar()) == '\n' ) break; } if ( ferror( stdin ) ) { fprintf( stderr, "%s: failed to read configuration input errno:%d ", myName, errno ); perror( "" ); exit( 1 ); } if ( feof( stdin ) ) read--; if ( read == maxSize && line[read] != '\n' ) { fprintf( stderr, "%s: Input line # %d too long (%d chars max)\n", myName, lineNmb, maxSize-1 ); exit( 1 ); } line[ read ] = 0; DBG_VERBOSE { if ( !( read == 0 && feof( stdin ) ) ) { printf( "%d) [%3d] \"%s\"", lineNmb, read, line ); } } for ( c = 0; c != read; c++ ) { if ( line[c] == '#' ) { line[c] = 0; break; } } DBG_VERBOSE { if ( read != c ) { printf( " => \"%s\"", line ); } if ( feof( stdin ) ) printf( "<<< EOF >>>" ); if ( ferror( stdin ) ) printf( "<<< FERROR >>>" ); printf( "\n" ); } } /* End of getLine */ void handleLdc( eventLdcIdType ldcId ) { struct ldcDescriptorStruct *ldc; if ( ldcsHead != NULL ) { for ( ldc = ldcsHead; ldc != NULL; ldc = ldc->next ) { if ( ldc->id == ldcId ) { return; } } } if ( (ldc = (struct ldcDescriptorStruct *)malloc( sizeof( *ldc ) )) == NULL ) { fprintf( stderr, "%s: Failed to malloc for %d bytes (struct ldcDescriptorStruct)\n", myName, (int)sizeof( *ldc ) ); exit( 1 ); } ldc->id = ldcId; ldc->next = NULL; if ( ldcsHead == NULL ) { ldcsHead = ldcsTail = ldc; } else { ldcsTail->next = ldc; ldcsTail = ldc; } numOfLdcs++; } /* End of handleLdc */ void createNewEvent() { assert( workingAs == ldc || workingAs == gdc ); if ( workingAs == ldc ) { struct ldcEventDescriptorStruct *p; if ( (p = (struct ldcEventDescriptorStruct *)malloc( sizeof( *p ) )) == NULL ) { fprintf( stderr, "%s: failed to malloc for %d bytes (createNewEvent: struct ldcEventDescriptorStruct)", myName, (int)sizeof( *p ) ); perror( "" ); exit( 1 ); } p->loaded = FALSE; p->head = p->tail = NULL; p->next = NULL; currLdc = p; if ( eventsHead == NULL ) { eventsHead = eventsTail = p; } else { struct ldcEventDescriptorStruct *q = (struct ldcEventDescriptorStruct *)eventsTail; q->next = p; eventsTail = p; } p->id = currLdcId; p->detPattern = currDetPattern; p->timestamp = currTimestamp; } else if ( workingAs == gdc ) { struct gdcEventDescriptorStruct *p; if ( (p = (struct gdcEventDescriptorStruct *)malloc( sizeof( *p ) )) == NULL ) { fprintf( stderr, "%s: failed to malloc for %d bytes (createNewEvent: struct gdcEventDescriptorStruct)", myName, (int)sizeof( *p ) ); perror( "" ); exit( 1 ); } p->loaded = FALSE; p->next = NULL; p->head = p->tail = NULL; currGdc = p; if ( eventsHead == NULL ) { eventsHead = eventsTail = p; } else { struct gdcEventDescriptorStruct *q = (struct gdcEventDescriptorStruct *)eventsTail; q->next = p; eventsTail = p; } p->detPattern = currDetPattern; p->timestamp = currTimestamp; } } /* End of createNewEvent */ void createNewLdcEvent() { struct gdcEventDescriptorStruct *gdcDesc; struct ldcEventDescriptorStruct *p; if ( (p = (struct ldcEventDescriptorStruct *)malloc( sizeof( *p ) )) == NULL ) { fprintf( stderr, "%s: failed to malloc for %d bytes (createNewLdcEvent: struct ldcEventDescriptorStruct)", myName, (int)sizeof( *p ) ); perror( "" ); exit( 1 ); } p->id = currLdcId; p->detPattern = currDetPattern; p->timestamp = currTimestamp; p->head = p->tail = NULL; p->next = NULL; gdcDesc = (struct gdcEventDescriptorStruct *)eventsTail; if ( gdcDesc->head == NULL ) { gdcDesc->head = gdcDesc->tail = p; } else { gdcDesc->tail->next = p; gdcDesc->tail = p; } currLdc = p; } /* End of createNewLdcEvent */ void loadBuffer( struct payloadDescriptorStruct * const payload ) { FILE *f; int bytesRead; if ( (f = fopen( payload->fileName, "r" )) == NULL ) { fprintf( stderr, "%s: line:%d payload file \"%s\" not found or not readable, errno:%d. ", myName, lineNmb, payload->fileName, errno ); perror( "System-dependent error " ); exit( 1 ); } if ( (payload->data = malloc( payload->size )) == NULL ) { fprintf( stderr, "%s: line:%d Failed to malloc for payload file \"%s\" size:%d errno:%d ", myName, lineNmb, payload->fileName, payload->size, errno ); perror( "System-dependent status " ); exit( 1 ); } if ( (bytesRead = fread( payload->data, payload->fileSize, 1, f )) != 1 ) { fprintf( stderr, "%s: line:%d Failed to read payload file \"%s\" size:%d requested:1 got:%d feof:%s ferror:%s errno:%d ", myName, lineNmb, payload->fileName, payload->size, bytesRead, feof(f) ? "TRUE" : "false", ferror(f) ? "TRUE" : "false", errno ); perror( "System-dependent status " ); exit( 1 ); } fclose(f); if ( payload->size != payload->fileSize ) { memset( (char *)payload->data + payload->fileSize, 0, payload->size - payload->fileSize ); } } /* End of loadBuffer */ void unloadBuffer( struct payloadDescriptorStruct * const payload ) { if ( payload->data != NULL ) { free( payload->data ); payload->data = NULL; } } /* End of unloadBuffer */ void unloadAllBuffers() { struct payloadDescriptorStruct *payload; for ( payload = payloadsHead; payload != NULL; payload = payload->next ) { unloadBuffer( payload ); } } /* End of unloadAllBuffers */ void loadPayload( const char *fileName ) { struct payloadDescriptorStruct *payload; for ( payload = payloadsHead; payload != NULL; payload = payload->next ) { if ( strcmp( fileName, payload->fileName ) == 0 ) break; } if ( payload == NULL ) { FILE *f; if ( (payload = (struct payloadDescriptorStruct *)malloc( sizeof( *payload ) )) == NULL ) { fprintf( stderr, "%s: failed to malloc for %d bytes (loadPayload/payloadDescriptorStruct)\n", myName, (int)sizeof( *payload ) ); exit( 1 ); } if ( (payload->fileName = strdup( fileName )) == NULL ) { fprintf( stderr, "%s: failed to duplicate string \"%s\" (loadPaload/fileName)\n", myName, fileName ); exit( 1 ); } if ( (f = fopen( fileName, "r" )) == NULL ) { fprintf( stderr, "%s: line:%d payload file \"%s\" not found or not readable, errno:%d. ", myName, lineNmb, fileName, errno ); perror( "System-dependent error " ); exit( 1 ); } if ( fseek( f, 0L, SEEK_END ) != 0 ) { fprintf( stderr, "%s: line:%d Failed to seek payload file \"%s\" errno:%d ", myName, lineNmb, fileName, errno ); perror( "System-dependent error " ); exit( 1 ); } if ( (payload->size = ftell( f )) <= 0 ) { fprintf( stderr, "%s: line:%d Failed to get file \"%s\" size size:%d errno:%d ", myName, lineNmb, fileName, payload->size, errno ); perror( "System-dependent status " ); exit( 1 ); } payload->fileSize = payload->size; while ( (payload->size & 3) != 0 ) payload->size++; fclose( f ); if ( bufferData ) { loadBuffer( payload ); } else { payload->data = NULL; } payload->next = NULL; if ( payloadsHead == NULL ) { payloadsHead = payloadsTail = payload; } else { payloadsTail->next = payload; payloadsTail = payload; } DBG_VERBOSE { int b, n; printf( "%d) Payload \"%s\" loaded at %p\n", lineNmb, fileName, (void*)payload ); if ( bufferData ) { if ( handleCDH && strncmp(fileName,"TRG_",4) != 0 ) { struct commonDataHeaderStruct *cdh = (struct commonDataHeaderStruct *)payload->data; printf( " CDH: blockLenght:%d=0x%08x ", cdh->cdhBlockLength, cdh->cdhBlockLength ); if ( cdh->cdhBlockLength < sizeof( *cdh ) ) { printf( "TOO SMALL (minimum:%ld=0x%08lx)\n", (unsigned long)sizeof( *cdh ), (unsigned long)sizeof( *cdh ) ); } else { printf( "version:%d=0x%x ", cdh->cdhVersion, cdh->cdhVersion ); if ( cdh->cdhVersion != CDH_VERSION ) { printf( "EXPECTED:%d=%x (decoding may be inaccurate) ", CDH_VERSION, CDH_VERSION ); } } printf( "L1TriggerMessage:0x%x", cdh->cdhL1TriggerMessage ); if ( cdh->cdhL1TriggerMessage != 0 ) { for ( b = 0, n = 0; b != 10; b++ ) { if ( (cdh->cdhL1TriggerMessage & (1<<b)) != 0 ) { if ( n++ != 0 )printf( "+" ); switch (b) { case 0: printf( "L1SwC" ); break; case 1: printf( "ESR" ); break; case 2: printf( "RoC1" ); break; case 3: printf( "RoC2" ); break; case 4: printf( "RoC3" ); break; case 5: printf( "RoC4" ); break; case 6: printf( "ClT" ); break; default: printf( "spare %d", b+14 ); } } } printf( ">" ); } printf( " " ); if ( cdh->cdhMBZ0 != 0 ) printf( "MBZ0:0x%x ", cdh->cdhMBZ0 ); printf( "\n" ); printf( " " ); printf( "EventId2(orbit):%d=0x%x ", cdh->cdhEventId2, cdh->cdhEventId2 ); printf( "EventId1(bunchCrossing):%d=0x%x ", cdh->cdhEventId1, cdh->cdhEventId1 ); printf( "\n" ); printf( " " ); if ( cdh->cdhMBZ1 != 0 ) printf( "MBZ1:0x%x ", cdh->cdhMBZ1 ); printf( "BlockAttributes:0x%x", cdh->cdhBlockAttributes ); if ( cdh->cdhBlockAttributes != 0 ) { printf( "=<" ); for ( b = 0, n = 0; b != 8; b++ ) { if ( (cdh->cdhBlockAttributes & (1<<b)) != 0 ) { if ( n++ != 0 ) printf( "+" ); printf( "%d", b ); } } printf( ">" ); } printf( " " ); printf( "ParticipatingSubDetectors:0x%x ", cdh->cdhParticipatingSubDetectors ); printf( "\n" ); printf( " " ); printf( "Status/Error:0x%x", cdh->cdhStatusErrorBits ); if ( cdh->cdhStatusErrorBits != 0 ) { printf( "=<" ); for ( b = 0,n = 0; b != 16; b++ ) { if ( (cdh->cdhStatusErrorBits & (1<<b)) != 0 ) { if ( n++ != 0 ) printf( "+" ); switch (b) { case 0: printf( "TriggerOverLapError" ); break; case 1: printf( "TriggerMissingError" ); break; case 2: printf( "DataParityError" ); break; case 3: printf( "ControlParityError" ); break; case 4: printf( "TriggerInformationUnavailable" ); break; case 5: printf( "FEEError" ); break; case 6: printf( "HLTDecision" ); break; case 7: printf( "HLTPayload" ); break; case 8: printf( "DDGPayload" ); break; default: printf( "spare %d", b ); } } } printf( ">" ); } printf( " " ); printf( "MiniEventId(bunchCrossing):%d=0x%x ", cdh->cdhMiniEventId, cdh->cdhMiniEventId ); printf( "\n" ); printf( " " ); printf( "Trigger classes: 0x(%05x-%08x)", cdh->cdhTriggerClassesHigh, cdh->cdhTriggerClassesLow ); if ( cdh->cdhTriggerClassesHigh != 0 || cdh->cdhTriggerClassesLow != 0 ) { printf( "=<" ); for ( b=0, n=0; b != 32; b++ ) { if ( (cdh->cdhTriggerClassesLow & (1<<b)) != 0 ) { if ( n++ != 0 ) printf( "+" ); printf( "%d", b ); } } for ( b=0; b != 18; b++ ) { if ( (cdh->cdhTriggerClassesHigh & (1<<b)) != 0 ) { if ( n++ != 0 ) printf( "+" ); printf( "%d", b+32 ); } } printf( ">" ); } printf( "\n" ); printf( " " ); printf( "ROI:0x(%08x-%01x)", cdh->cdhRoiHigh, cdh->cdhRoiLow ); if ( cdh->cdhRoiHigh != 0 || cdh->cdhRoiLow != 0 ) { printf( "=<" ); for ( b=0, n=0; b != 5; b++ ) { if ( (cdh->cdhRoiLow & (1<<b)) != 0 ) { if ( n++ != 0 ) printf( "+" ); printf( "%d", b ); } } for ( b=0; b != 32; b++ ) { if ( (cdh->cdhRoiHigh & (1<<b)) != 0 ) { if ( n++ != 0 ) printf( "+" ); printf( "%d", b+4 ); } } printf( ">" ); } printf( "\n" ); } } } } else { DBG_VERBOSE printf( "%d) Payload \"%s\" already loaded at %p\n", lineNmb, fileName, (void*)payload ); } currEvent->payload = payload; } /* End of loadPayload */ void parseEquipment( char * const line ) { struct equipmentEventDescriptorStruct *equipment; int payloadFound = FALSE; char *p; char *keyword; if ( (equipment = (struct equipmentEventDescriptorStruct *)malloc( sizeof( *equipment ) )) == NULL ) { fprintf( stderr, "%s: filed to malloc for %d bytes (parseEquipment/equipmentEventDescriptorStruct) errno:%d ", myName, (int)sizeof( *equipment ), errno ); perror( "" ); exit( 1 ); } currEvent = equipment; p = line; while ( (keyword = strtok_r( p, " \t", &p )) != NULL ) { DBG_VERBOSE printf( "%d) Equipment - Keyword:\"%s\"\n", lineNmb, keyword ); if ( strcasecmp( "id", keyword ) == 0 ) { char *idNum; if ( (idNum = strtok_r( p, " \t", &p )) == NULL ) { fprintf( stderr, "%s: line:%d EQUIPMENT declaration, ID needed", myName, lineNmb ); exit( 1 ); } if ( sscanf( idNum, "%d", &currEquipmentId ) != 1 ) { fprintf( stderr, "%s: line:%d EQUIPMENT declaration, numeric ID needed (%s)", myName, lineNmb, idNum ); exit( 1 ); } DBG_VERBOSE printf( "%d) EQUIPMENT - ID:%d\n", lineNmb, currEquipmentId ); } else if ( strncasecmp( "pay", keyword, 3 ) == 0 ) { char *fileName; if ( (fileName = strtok_r( p, " \t", &p )) == NULL ) { fprintf( stderr, "%s line:%d Payload without filename found\n", myName, lineNmb ); exit( 1 ); } DBG_VERBOSE printf( "%d) Equipment - Payload:\"%s\"\n", lineNmb, fileName ); if ( payloadFound ) { fprintf( stderr, "%s line:%d Payload with multiple filenames found\n", myName, lineNmb ); exit( 1 ); } loadPayload( fileName ); payloadFound = TRUE; } else { fprintf( stderr, "%s: line:%d Equipment declaration, unknown keyword \"%s\"\n", myName, lineNmb, keyword ); exit( 1 ); } } if ( !payloadFound ) { fprintf( stderr, "%s: line:%d Equipment without payload found\n", myName, lineNmb ); exit( 1 ); } equipment->id = currEquipmentId; equipment->next = NULL; if ( currLdc->head == NULL ) { currLdc->head = currLdc->tail = equipment; } else { currLdc->tail->next = equipment; currLdc->tail = equipment; } } /* End of parseEquipment */ void parseGdc( char * const line ) { char *p; char *keyword; p = line; while ( (keyword = strtok_r( p, " \t", &p )) != NULL ) { if ( strcasecmp( "id", keyword ) == 0 ) { char *idNum; if ( (idNum = strtok_r( p, " \t", &p )) == NULL ) { fprintf( stderr, "%s: line:%d GDC declaration, ID needed", myName, lineNmb ); exit( 1 ); } int inCurrGdcId; if ( sscanf( idNum, "%d", &inCurrGdcId ) != 1 ) { fprintf( stderr, "%s: line:%d GDC declaration, numeric ID needed (%s)", myName, lineNmb, idNum ); exit( 1 ); } currGdcId = (eventGdcIdType)inCurrGdcId; DBG_VERBOSE printf( "%d) GDC - ID:%d\n", lineNmb, currGdcId ); } else if ( strcasecmp( "DetectorPattern", keyword ) == 0 ) { char *detPattern; if ( (detPattern = strtok_r( p, " \t", &p )) == NULL ) { fprintf( stderr, "%s: line:%d GDC declaration, DetectorPattern needed", myName, lineNmb ); exit( 1 ); } if ( sscanf( detPattern, "%u", &currDetPattern ) != 1 ) { fprintf( stderr, "%s: line:%d GDC declaration, numeric DetectorPattern needed (%s)", myName, lineNmb, detPattern ); exit( 1 ); } DBG_VERBOSE printf( "%d) GDC - DetectorPattern:%u\n", lineNmb, currDetPattern ); } else if ( strcasecmp( "Timestamp", keyword ) == 0 ) { char *timestamp; if ( (timestamp = strtok_r( p, " \t", &p )) == NULL ) { fprintf( stderr, "%s: line:%d GDC declaration, Timestamp needed", myName, lineNmb ); exit( 1 ); } if ( sscanf( timestamp, "%u", &currTimestamp ) != 1 ) { fprintf( stderr, "%s: line:%d GDC declaration, numeric Timestamp needed (%s)", myName, lineNmb, timestamp ); exit( 1 ); } DBG_VERBOSE printf( "%d) GDC - Timestamp:%u\n", lineNmb, currTimestamp ); } else { fprintf( stderr, "%s: line:%d GDC declaration, unknown keyword \"%s\"\n", myName, lineNmb, keyword ); exit( 1 ); } } } /* End of parseGdc */ void parseLdc( char * const line ) { char *p; char *keyword; p = line; while ( (keyword = strtok_r( p, " \t", &p )) != NULL ) { if ( strcasecmp( "id", keyword ) == 0 ) { char *idNum; if ( (idNum = strtok_r( p, " \t", &p )) == NULL ) { fprintf( stderr, "%s: line:%d LDC declaration, ID needed", myName, lineNmb ); exit( 1 ); } int inCurrLdcId; if ( sscanf( idNum, "%d", &inCurrLdcId ) != 1 ) { fprintf( stderr, "%s: line:%d LDC declaration, numeric ID needed (%s)", myName, lineNmb, idNum ); exit( 1 ); } currLdcId = (eventLdcIdType)inCurrLdcId; DBG_VERBOSE printf( "%d) LDC - ID:%d\n", lineNmb, currLdcId ); } else { fprintf( stderr, "%s: line:%d LDC declaration, unknown keyword \"%s\"\n", myName, lineNmb, keyword ); exit( 1 ); } } } /* End of parseLdc */ void parseRules() { char line[ 1025 ]; currLdcId = HOST_ID_MIN; currGdcId = HOST_ID_MIN; currDetPattern = 0; currTimestamp = 0; for ( lineNmb = 1; !feof( stdin ); lineNmb++ ) { getLine( line, sizeof(line) ); if ( strlen(line) != 0 ) { char *p; char *keyword; if ( (keyword = strtok_r( line, " \t", &p )) != NULL ) { DBG_VERBOSE printf( "%d) Keyword:\"%s\"\n", lineNmb, keyword ); if ( strcasecmp( "gdc", keyword ) == 0 ) { if ( workingAs != gdc && workingAs != unknown ) { fprintf( stderr, "%s: line:%d GDC found when working in non-GDC mode (e.g. as a LDC)\n", myName, lineNmb ); exit( 1 ); } workingAs = gdc; parseGdc( p ); createNewEvent(); currLdcId = HOST_ID_MIN; currLdc = NULL; currEquipmentId = 0; } else if ( strcasecmp( "ldc", keyword ) == 0 ) { if ( workingAs != gdc && workingAs != ldc && workingAs != unknown ) { fprintf( stderr, "%s: line:%d LDC found when working in non-LDC/GDC mode\n", myName, lineNmb ); exit( 1 ); } if ( workingAs == unknown ) workingAs = ldc; parseLdc( p ); if ( workingAs == ldc ) { createNewEvent(); currEquipmentId = 0; } else { createNewLdcEvent(); handleLdc( currLdcId ); currLdcId++; } currEvent = NULL; } else if ( strncasecmp( "equ", keyword, 3 ) == 0 ) { if ( workingAs == unknown || (workingAs == ldc && currLdc == NULL ) || (workingAs == gdc && currGdc == NULL ) ) { fprintf( stderr, "%s: line:%d Unexpected EQUIPMENT declaration (LDC or GDC needed first)\n", myName, lineNmb ); exit( 1 ); } parseEquipment( p ); currEquipmentId++; } else { fprintf( stderr, "%s: line:%d Parse error in \"%s\" unknown keyword\n", myName, lineNmb, keyword ); exit( 1 ); } } } } while ( !feof( stdin ) ) {} lineNmb -= 2; DBG_VERBOSE { printf( "End of parse: %d line%s found\n", lineNmb, lineNmb != 1 ? "s" : "" ); printf( "Working as %s\n", workingAs == gdc ? "GDC" : workingAs == ldc ? "LDC" : "UNKNOWN" ); if ( workingAs == gdc ) { struct ldcDescriptorStruct *ldc; printf( "LDCs (%d):", numOfLdcs ); for ( ldc = ldcsHead; ldc != NULL; ldc = ldc->next ) { printf( " %d", ldc->id ); } printf( "\n" ); } dumpEvents(); } if ( workingAs == ldc ) { assert( ldcsHead == ldcsTail ); assert( ldcsTail == NULL ); } if ( workingAs == gdc ) { struct ldcDescriptorStruct *ldc; assert( ldcsHead != NULL ); assert( ldcsTail != NULL ); assert( ldcsTail->next == NULL ); for ( ldc = ldcsHead; ldc->next != NULL; ldc = ldc->next ) {} assert ( ldc == ldcsTail ); } if ( workingAs == unknown ) { DBG_VERBOSE printf( "Empty configuration: nothing to do!\n" ); exit( 0 ); } assert( (eventsHead == NULL && eventsTail == NULL) || (eventsHead != NULL && eventsTail != NULL) ); } /* End of parseRules */ void initEvent( struct eventHeaderStruct * const ev ) { memset( ev, 0, sizeof( *ev ) ); ev->eventMagic = EVENT_MAGIC_NUMBER; ev->eventHeadSize = EVENT_HEAD_BASE_SIZE; ev->eventVersion = EVENT_CURRENT_VERSION; ev->eventRunNb = currRunNb; ZERO_EVENT_ID( ev->eventId ); ZERO_TRIGGER_PATTERN( ev->eventTriggerPattern ); ZERO_DETECTOR_PATTERN( ev->eventDetectorPattern ); RESET_ATTRIBUTES( ev->eventTypeAttribute ); if ( workingMode == collider ) SET_SYSTEM_ATTRIBUTE( ev->eventTypeAttribute, ATTR_ORBIT_BC ); ev->eventLdcId = VOID_ID; ev->eventGdcId = VOID_ID; } /* End of initEvent */ int Swap(int x) { // Swap the endianess of the integer value 'x' return (((x & 0x000000ffU) << 24) | ((x & 0x0000ff00U) << 8) | ((x & 0x00ff0000U) >> 8) | ((x & 0xff000000U) >> 24)); } void outputEvent( const void * const ev, const int size ) { int done; DBG_VERBOSE { const long32 * const v = (long32 *)ev; printf( "Writing %d bytes @ %p (%d)\n", size, ev, *v ); } // .............................Test endianess.............................. int temp = 1; char* ptemp = (char*) &temp; if (ptemp[0]!=1) { // Mac platform: ptemp != 1.............................................................................. int bufSize= size; if (bufSize > (int) sizeof(eventHeaderStruct)) { bufSize = sizeof(eventHeaderStruct); } char* evTemp = (char*) malloc (bufSize); memcpy(evTemp, ev, bufSize); if ((bufSize % sizeof(int)) != 0) { fprintf( stderr, "%s: size of the input buffer ev is not multiple of 4 (size = %d)\n", myName, bufSize); exit( 1 ); } else { // Invert header to evTemp..................................................... int* buf = (int*) evTemp; for (int i=0; i < (int) (bufSize / sizeof(int)); i++, buf++) { int value = Swap(*buf); memcpy(evTemp + (i * sizeof(int)), &value, sizeof(int)); } // Write inverted header to file............................................... if ((done = fwrite( evTemp, bufSize, 1, outF )) != 1 ) { fprintf( stderr, "%s: failed to write inverted header. event size:%d bytes, errno:%d (%s)\n", myName, size, errno, strerror( errno ) ); exit( 1 ); } if (size > bufSize) { // Still theraw-data payload to write (but not inverted, since it is inverted eariler)............. if ((done = fwrite( (char*)ev + bufSize, size - bufSize, 1, outF )) != 1 ) { fprintf( stderr, "%s: failed to write additional event size:%d bytes, errno:%d (%s)\n", myName, size, errno, strerror( errno ) ); exit( 1 ); } } } free(evTemp); } else { // Intel platform: ptemp == 1............................................................................ if ((done = fwrite( ev, size, 1, outF )) != 1 ) { fprintf( stderr, "%s: failed to write event size:%d bytes, errno:%d (%s)\n", myName, size, errno, strerror( errno ) ); exit( 1 ); } } } /* End of outputEvent */ void createSorAndEor( const int sor ) { unsigned char event[ 1000 ]; struct eventHeaderStruct *ev; struct eventHeaderStruct sev; assert( workingAs == ldc || workingAs == gdc ); if ( !createSorEor ) return; ev = (struct eventHeaderStruct *)event; initEvent( ev ); ev->eventSize = sizeof( event ); ev->eventType = sor ? START_OF_RUN : END_OF_RUN; if ( workingMode == fixedTarget ) LOAD_RAW_EVENT_ID( ev->eventId, 0, 0, 0 ); else LOAD_EVENT_ID( ev->eventId, 0, 0, 0 ); SET_SYSTEM_ATTRIBUTE( ev->eventTypeAttribute, ATTR_P_START ); if ( workingAs == ldc ) { currLdc = (struct ldcEventDescriptorStruct *)eventsHead; } if ( workingAs == gdc ) { initEvent( &sev ); sev.eventGdcId = currGdcId; ev->eventGdcId = currGdcId; currGdc = (struct gdcEventDescriptorStruct *)eventsHead; currLdc = currGdc->head; } ev->eventLdcId = currLdc->id; if ( workingAs == ldc ) { outputEvent( ev, ev->eventSize ); } if ( workingAs == gdc ) { struct ldcDescriptorStruct *ldc; sev.eventSize = sizeof( sev ) + numOfLdcs * ev->eventSize; sev.eventType = sor ? START_OF_RUN : END_OF_RUN ; COPY_EVENT_ID( ev->eventId, sev.eventId ); COPY_SYSTEM_ATTRIBUTES( ev->eventTypeAttribute, sev.eventTypeAttribute ); SET_SYSTEM_ATTRIBUTE( sev.eventTypeAttribute, ATTR_SUPER_EVENT ); outputEvent( &sev, sizeof( sev ) ); ev->eventGdcId = currGdcId; for ( ldc = ldcsHead; ldc != NULL; ldc = ldc->next ) { ev->eventLdcId = ldc->id; outputEvent( ev, ev->eventSize ); } } ADD_EVENT_ID( ev->eventId, oneEventDelta ); ev->eventSize = ev->eventSize / 2; ev->eventType = sor ? START_OF_RUN_FILES : END_OF_RUN_FILES; CLEAR_SYSTEM_ATTRIBUTE( ev->eventTypeAttribute, ATTR_P_START ); if ( workingAs == ldc ) { outputEvent( ev, ev->eventSize ); } if ( workingAs == gdc ) { struct ldcDescriptorStruct *ldc; sev.eventSize = ev->eventSize; sev.eventType = sor ? START_OF_RUN_FILES : END_OF_RUN_FILES; COPY_EVENT_ID( ev->eventId, sev.eventId ); COPY_SYSTEM_ATTRIBUTES( ev->eventTypeAttribute, sev.eventTypeAttribute ); CLEAR_SYSTEM_ATTRIBUTE( sev.eventTypeAttribute, ATTR_SUPER_EVENT ); outputEvent( &sev, sizeof( sev ) ); outputEvent( ev, ev->eventSize - sizeof( sev ) ); sev.eventSize = sizeof( sev ) + ev->eventSize; sev.eventType = sor ? START_OF_RUN_FILES : END_OF_RUN_FILES; COPY_EVENT_ID( ev->eventId, sev.eventId ); COPY_SYSTEM_ATTRIBUTES( ev->eventTypeAttribute, sev.eventTypeAttribute ); SET_SYSTEM_ATTRIBUTE( sev.eventTypeAttribute, ATTR_SUPER_EVENT ); ev->eventGdcId = currGdcId; for ( ldc = ldcsHead; ldc != NULL; ldc = ldc->next ) { outputEvent( &sev, sizeof( sev ) ); ev->eventLdcId = ldc->id; outputEvent( ev, ev->eventSize ); } } ADD_EVENT_ID( ev->eventId, oneEventDelta ); ev->eventSize = sizeof( *ev ); ev->eventType = sor ? START_OF_RUN : END_OF_RUN; SET_SYSTEM_ATTRIBUTE( ev->eventTypeAttribute, ATTR_P_END ); if ( workingAs == ldc ) { outputEvent( ev, ev->eventSize ); } if ( workingAs == gdc ) { struct ldcDescriptorStruct *ldc; sev.eventSize = sizeof( sev ) + numOfLdcs * ev->eventSize; sev.eventType = sor ? START_OF_RUN : END_OF_RUN; COPY_EVENT_ID( ev->eventId, sev.eventId ); COPY_SYSTEM_ATTRIBUTES( ev->eventTypeAttribute, sev.eventTypeAttribute ); SET_SYSTEM_ATTRIBUTE( sev.eventTypeAttribute, ATTR_SUPER_EVENT ); outputEvent( &sev, sizeof( sev ) ); for ( ldc = ldcsHead; ldc != NULL; ldc = ldc->next ) { ev->eventLdcId = ldc->id; outputEvent( ev, ev->eventSize ); } } } /* End of createSorEor */ void createSor() { createSorAndEor( TRUE ); } /* End of createSor */ void createEor() { createSorAndEor( FALSE ); } /* End of createEor */ void loadCdh( struct commonDataHeaderStruct * const cdh, eventIdType * const eventId, equipmentIdType id ) { if ( !handleCDH ) return; // CTP raw-data does not contain CDH if ( id == 4352) return; if ( gotAliceTrigger ) { cdh->cdhEventId1 = EVENT_ID_GET_BUNCH_CROSSING( *eventId ); cdh->cdhEventId2 = EVENT_ID_GET_ORBIT( *eventId ); } else { cdh->cdhEventId1 = 0; cdh->cdhEventId2 = EVENT_ID_GET_NB_IN_RUN( *eventId ); } cdh->cdhMiniEventId = cdh->cdhEventId1; } void decodeCDH( struct ldcEventDescriptorStruct * const ldc, const struct payloadDescriptorStruct * const payloadDesc, equipmentIdType id ); void createEvent( void ) { assert( workingAs == ldc || workingAs == gdc ); /* Step 1: load all buffers (if needed) and compose the GDC/LDC headers */ if ( workingAs == gdc ) { struct ldcEventDescriptorStruct *ldc; for( ldc = currGdc->head; ldc != NULL; ldc = ldc->next ) { COPY_EVENT_ID( currEventId, ldc->header.eventId ); } COPY_EVENT_ID( currEventId, currGdc->header.eventId ); for( ldc = currGdc->head; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; int n; for ( eq = ldc->head; eq != NULL; eq = eq->next ) { if ( !bufferData ) { loadBuffer( eq->payload ); decodeCDH( ldc, eq->payload, eq->id ); } loadCdh( (struct commonDataHeaderStruct*)eq->payload->data, &currEventId, eq->id); } if ( !currGdc->loaded ) { for ( n = 0; n != EVENT_TRIGGER_PATTERN_WORDS; n++ ) currGdc->header.eventTriggerPattern[n] |= ldc->header.eventTriggerPattern[n]; for ( n = 0; n != EVENT_DETECTOR_PATTERN_WORDS; n++ ) currGdc->header.eventDetectorPattern[n] |= ldc->header.eventDetectorPattern[n]; for ( n = 0; n != ALL_ATTRIBUTE_WORDS; n++ ) currGdc->header.eventTypeAttribute[n] |= ldc->header.eventTypeAttribute[n]; currGdc->loaded = TRUE; } } cdhRef = NULL; } else if ( workingAs == ldc ) { struct equipmentEventDescriptorStruct *eq; COPY_EVENT_ID( currEventId, currLdc->header.eventId ); for ( eq = currLdc->head; eq != NULL; eq = eq->next ) { if ( !bufferData ) { loadBuffer( eq->payload ); decodeCDH( currLdc, eq->payload, eq->id ); } loadCdh( (struct commonDataHeaderStruct*)eq->payload->data, &currEventId, eq->id); currLdc->loaded = TRUE; } cdhRef = NULL; } ADD_EVENT_ID( currEventId, oneEventDelta ); /* Step 2: output the event */ if ( workingAs == gdc ) { struct ldcEventDescriptorStruct *ldc; outputEvent( &currGdc->header, sizeof( currGdc->header ) ); for( ldc = currGdc->head; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; outputEvent( &ldc->header, sizeof( ldc->header ) ); for ( eq = ldc->head; eq != NULL; eq = eq->next ) { outputEvent( &eq->header, sizeof( eq->header ) ); outputEvent( eq->payload->data, eq->payload->size ); if ( !bufferData ) unloadBuffer( eq->payload ); } } if ( (currGdc = currGdc->next) == NULL ) currGdc = (struct gdcEventDescriptorStruct *)eventsHead; } else if ( workingAs == ldc ) { struct equipmentEventDescriptorStruct *eq; outputEvent( &currLdc->header, sizeof( currLdc->header ) ); for ( eq = currLdc->head; eq != NULL; eq = eq->next ) { outputEvent( &eq->header, sizeof( eq->header ) ); outputEvent( eq->payload->data, eq->payload->size ); if ( !bufferData ) unloadBuffer( eq->payload ); } if ( (currLdc = currLdc->next) == NULL ) currLdc = (struct ldcEventDescriptorStruct *)eventsHead; } } /* End of createEvent */ void createEvents() { int eventNum = 0; currGdc = (struct gdcEventDescriptorStruct *)eventsHead; currLdc = (struct ldcEventDescriptorStruct *)eventsHead; currEvent = NULL; createSor(); for ( eventNum = 0; eventNum != numOfEvents && numOfEvents != 0; eventNum++ ) { createEvent(); } createEor(); } /* End of createEvents */ int usage() { fprintf( stderr, "Usage: %s [-?][-d][-i definitionFile][-o outputFile][-# numOfEvents][-s][-F|-C]\n\ -? This text\n\ -v Print version ID and exit\n\ -d Enable debug (repeat for more verbosity)\n\ -i definitionFile File with the description of the events to create (default: stdin)\n\ -o outputFile File used to store events (default: stdout)\n\ -# numOfEvents Number of events to generate (default: 1 event)\n\ -s Do not generate SOR/EOR files (valid only for GDCs)\n\ -F/-C Working in Fixed Target (F) or Collider (C) mode\n\ -c Handles CDH\n\ -D Direct disc access (no buffering)\n", myName ); return 1; } /* End of usage */ void parseArgs( int argc, char **argv ) { int arg = 1; int inFileName = -1; int outFileName = -1; myName = argv[0] ; while ( arg < argc ) { if ( strcmp( "-?", argv[ arg ] ) == 0 ) { usage(); exit( 0 ); } if ( strcmp( "-i", argv[ arg ] ) == 0 ) { if ( ++arg == argc ) exit( usage() ); inFileName = arg; if ( freopen( argv[arg], "r", stdin ) == NULL ){ fprintf( stderr, "%s: failed to open input definition \"%s\" errno:%d ", myName, argv[arg], errno ); perror( "" ); exit( 1 ); } } else if ( strcmp( "-v", argv[ arg ] ) == 0 ) { printf( "%s\n", fileHandlerIdent ); exit( 0 ); } else if ( strcmp( "-o", argv[ arg ] ) == 0 ) { if ( ++arg == argc ) exit( usage() ); outFileName = arg; } else if ( strcmp( "-#", argv[ arg ] ) == 0 ) { int n; if ( ++arg == argc ) exit( usage() ); if ( sscanf( argv[ arg ], "%d", &n ) != 1 ) exit( usage() ); if ( n < 0 ) exit( usage() ); numOfEvents = n; } else if ( strcmp( "-s", argv[ arg ] ) == 0 ) { createSorEor = FALSE; } else if ( strcmp( "-F", argv[ arg ] ) == 0 ) { workingMode = fixedTarget; } else if ( strcmp( "-C", argv[ arg ] ) == 0 ) { workingMode = collider; } else if ( strcmp( "-d", argv[ arg ] ) == 0 ) { debug++; } else if ( strcmp( "-c", argv[ arg ] ) == 0 ) { handleCDH = TRUE; } else if ( strcmp( "-D", argv[ arg ] ) == 0 ) { bufferData = FALSE; } else if ( strcmp( "-run", argv[ arg ] ) == 0 ) { int runnumber; if ( ++arg == argc ) exit( usage() ); if ( sscanf( argv[ arg ], "%d", &runnumber ) != 1 ) exit( usage() ); if ( runnumber < 0 ) exit( usage() ); currRunNb = runnumber; } else { fprintf( stderr, "%s: Unknown switch \"%s\"\n", myName, argv[argc] ); exit( usage() ); } arg++; } if ( workingMode == fixedTarget ) LOAD_RAW_EVENT_ID( oneEventDelta, 1, 0, 1 ); else LOAD_EVENT_ID( oneEventDelta, 0, 0, 1 ); ZERO_EVENT_ID( currEventId ); DBG_VERBOSE { printf( "Configuration:\n" ); printf( " Debug level: %d\n", debug ); printf( " Configuration: %s\n", inFileName == -1 ? "stdin" : argv[ inFileName ] ); printf( " Output: %s\n", outFileName == -1 ? "stdout" : argv[ outFileName ] ); printf( " Working mode: %s\n", workingMode == fixedTarget ? "fixed target" : "collider" ); printf( " Number of events: %d\n", numOfEvents ); printf( " %s SOR/EOR files\n", createSorEor ? "Create" : "Do not create" ); printf( " CDH handling: %s\n", handleCDH ? "enabled" : "disabled" ); printf( " data buffering: %s\n", bufferData ? "enabled" : "DISABLED" ); } if ( outFileName == -1 ) { DBG_BASE printf( "No more trace information from this point...\n" ); debug = 0; outF = stdout; } else { if ( ( outF = fopen( argv[ outFileName ], "w" ) ) == NULL ) { fprintf( stderr, "%s: failed to open output file \"%s\" for writing, errno:%d (%s)\n", myName, argv[ outFileName ], errno, strerror( errno ) ); exit( 1 ); } DBG_DETAILED printf( "Output file \"%s\" opened OK for writing\n", argv[ outFileName ] ); } } /* End of parseArgs */ void initEquipment( struct equipmentHeaderStruct * const eq ) { memset( eq, 0, sizeof( *eq ) ); RESET_ATTRIBUTES( eq->equipmentTypeAttribute ); eq->equipmentBasicElementSize = 4; } /* End of initEquipment */ void decodeCDH( struct ldcEventDescriptorStruct * const ldc, const struct payloadDescriptorStruct * const payloadDesc, equipmentIdType id ) { if ( handleCDH && id != 4352 ) { struct commonDataHeaderStruct *cdh; static int softwareTriggerIndicator = FALSE; int attr; int trig; if ( payloadDesc->size < CDH_SIZE ) { fprintf( stderr, "%s: payload too small got:%d CDH:%d\n", myName, payloadDesc->size, CDH_SIZE ); exit( 1 ); } if ( (cdh = (struct commonDataHeaderStruct *)payloadDesc->data) != NULL ) { if ( cdh->cdhVersion != CDH_VERSION ) { fprintf( stderr, "%s: CDH version mismatch expected:%d got:%d\n", myName, CDH_VERSION, cdh->cdhVersion ); exit( 1 ); } if ( cdhRef == NULL ) { cdhRef = cdh; #define CDH_TRIGGER_INFORMATION_UNAVAILABLE_MASK (1<<CDH_TRIGGER_INFORMATION_UNAVAILABLE_BIT) gotAliceTrigger = (cdhRef->cdhStatusErrorBits & CDH_TRIGGER_INFORMATION_UNAVAILABLE_MASK) == 0; if ( gotAliceTrigger && workingMode == fixedTarget ) { fprintf( stderr, "%s: ALICE trigger and fixed target mode are not compatible.\n\ Either work in Collider mode or set the trigger unavailable status bit in the CDH.\n", myName ); exit( 1 ); } if ( gotAliceTrigger ) { if ( (cdh->cdhL1TriggerMessage & 0x40) != 0 ) { fprintf( stderr, "%s: CDH is a calibration trigger (unsupported) L1TriggerMessage:0x%x\n", myName, cdh->cdhL1TriggerMessage ); exit( 1 ); } if ( (cdh->cdhL1TriggerMessage & 0x01) != 0 ) { softwareTriggerIndicator = TRUE; } if ( softwareTriggerIndicator ) { switch ((cdh->cdhL1TriggerMessage >> 2) & 0xF) { case 0xC: case 0xB: case 0xA: case 0x9: break; case 0xD: /* L1SwC bit = on, Clt bit = off, RoC[4..1] = 0xD --> SYNC */ case 0xF: /* L1SwC bit = on, Clt bit = off, RoC[4..1] = 0xF --> END_OF_DATA */ case 0xE: /* L1SwC bit = on, Clt bit = off, RoC[4..1] = 0xE0 --> START_OF_DATA */ case 0x8: /* L1SwC bit = on, Clt bit = off, RoC[4] = 1, but not 0xE or 0xF --> SYSTEM_SOFTWARE_TRIGGER_EVENT */ default: /* L1SwC bit = on, Clt bit = off, RoC[4] = 0 --> DETECTOR_SOFTWARE_TRIGGER_EVENT */ fprintf( stderr, "%s: CDH trigger SOD/EOD/SST/DST/SYNC (unsupported) \ L1TriggerMessage:0x%x ALICETrigger:%s\n", myName, cdh->cdhL1TriggerMessage, gotAliceTrigger ? "yes" : "no" ); exit( 1 ); } } } } else { if ( (cdh->cdhStatusErrorBits & CDH_TRIGGER_INFORMATION_UNAVAILABLE_MASK) != (cdhRef->cdhStatusErrorBits & CDH_TRIGGER_INFORMATION_UNAVAILABLE_MASK) ) { fprintf( stderr, "%s: CDH coherency check failed. \ Trigger information reference:%savailable current:%savailable\n", myName, (cdhRef->cdhStatusErrorBits & CDH_TRIGGER_INFORMATION_UNAVAILABLE_MASK) == 0 ? "UN" : "", (cdh->cdhStatusErrorBits & CDH_TRIGGER_INFORMATION_UNAVAILABLE_MASK) == 0 ? "UN" : "" ); exit( 1 ); } if ( gotAliceTrigger ) { if ( cdhRef->cdhL1TriggerMessage != cdh->cdhL1TriggerMessage ) { fprintf( stderr, "%s: CDH coherency check failed. \ L1 trigger message reference:0x%x current:0x%x\n", myName, cdhRef->cdhL1TriggerMessage, cdh->cdhL1TriggerMessage ); exit( 1 ); } if ( cdh->cdhParticipatingSubDetectors != cdhRef->cdhParticipatingSubDetectors ) { fprintf( stderr, "%s: CDH coherency check failed. \ ParticipatingSubDetectors reference:0x%x current:0x%x\n", myName, cdhRef->cdhParticipatingSubDetectors, cdh->cdhParticipatingSubDetectors ); exit( 1 ); } if ( cdh->cdhTriggerClassesLow != cdhRef->cdhTriggerClassesLow || cdh->cdhTriggerClassesHigh != cdhRef->cdhTriggerClassesHigh ) { fprintf( stderr, "%s: CDH coherency check failed. \ TriggerClassesHigh/Low reference:0x%x-%x current:0x%x-%x\n", myName, cdhRef->cdhTriggerClassesHigh, cdhRef->cdhTriggerClassesLow, cdh ->cdhTriggerClassesHigh, cdh ->cdhTriggerClassesLow ); exit( 1 ); } if ( cdh->cdhBlockLength != 0xffffffff ) { if ( (unsigned)payloadDesc->size != cdh->cdhBlockLength ) { fprintf( stderr, "%s: CDH coherency check failed. \ Payload size:%d (0x%08x) CDH block length:%d (0x%08x)\n", myName, payloadDesc->size, payloadDesc->size, cdh->cdhBlockLength, cdh->cdhBlockLength ); exit( 1 ); } } if ( cdh->cdhRoiLow != cdhRef->cdhRoiLow || cdh->cdhRoiHigh != cdhRef->cdhRoiHigh ) { fprintf( stderr, "%s: CDH coherency check failed. \ RoiHigh/Low reference:0x%x-%x current:0x%x-%x\n", myName, cdhRef->cdhRoiHigh, cdhRef->cdhRoiLow, cdh ->cdhRoiHigh, cdh ->cdhRoiLow ); exit( 1 ); } } if ( cdh->cdhMBZ0 != 0 || cdh->cdhMBZ1 != 0 || cdh->cdhMBZ4 != 0 ) { fprintf( stderr, "%s: CDH check failed. MBZ0:0x%x MBZ1:0x%x MBZ4:0x%x\n", myName, cdh->cdhMBZ0, cdh->cdhMBZ1, cdh->cdhMBZ4 ); exit( 1 ); } } for ( attr = 0; attr != 8; attr++ ) { if ( (cdh->cdhBlockAttributes & (1<<attr)) != 0 ) { SET_USER_ATTRIBUTE( ldc->header.eventTypeAttribute, attr ); } } for ( trig = 0; trig != 32; trig++ ) { if ( (cdh->cdhTriggerClassesLow & (1<<trig)) != 0 ) { SET_TRIGGER_IN_PATTERN( ldc->header.eventTriggerPattern, trig ); } } for ( trig = 0; trig != 18; trig++ ) { if ( (cdh->cdhTriggerClassesMiddleLow & (1<<trig)) != 0 ) { SET_TRIGGER_IN_PATTERN( ldc->header.eventTriggerPattern, 32+trig ); } } for ( trig = 0; trig != 32; trig++ ) { if ( (cdh->cdhTriggerClassesMiddleHigh & (1<<trig)) != 0 ) { SET_TRIGGER_IN_PATTERN( ldc->header.eventTriggerPattern, 18+32+trig ); } } for ( trig = 0; trig != 18; trig++ ) { if ( (cdh->cdhTriggerClassesHigh & (1<<trig)) != 0 ) { SET_TRIGGER_IN_PATTERN( ldc->header.eventTriggerPattern, 32+18+32+trig ); } } if ( gotAliceTrigger ) VALIDATE_TRIGGER_PATTERN( ldc->header.eventTriggerPattern ); } } } /* End of decodeCDH */ void initEvents() { assert( workingAs == ldc || workingAs == gdc ); if ( workingAs == gdc ) { struct gdcEventDescriptorStruct *gdc; for ( gdc = (struct gdcEventDescriptorStruct *)eventsHead; gdc != NULL; gdc = gdc->next ) { struct ldcEventDescriptorStruct *ldc; initEvent( &gdc->header ); gdc->header.eventSize = gdc->header.eventHeadSize; gdc->header.eventType = PHYSICS_EVENT; SET_SYSTEM_ATTRIBUTE( gdc->header.eventTypeAttribute, ATTR_SUPER_EVENT ); gdc->header.eventGdcId = currGdcId; COPY_DETECTOR_PATTERN(&gdc->detPattern, gdc->header.eventDetectorPattern); gdc->header.eventTimestamp = gdc->timestamp; for ( ldc = gdc->head; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; initEvent( &ldc->header ); ldc->header.eventSize = ldc->header.eventHeadSize; ldc->header.eventType = PHYSICS_EVENT; ldc->header.eventGdcId = currGdcId; COPY_DETECTOR_PATTERN(&ldc->detPattern, ldc->header.eventDetectorPattern); ldc->header.eventTimestamp = ldc->timestamp; ldc->header.eventLdcId = ldc->id; for ( eq = ldc->head; eq != NULL; eq = eq->next ) { initEquipment( &eq->header ); eq->header.equipmentId = eq->id; if ( workingMode == collider ) SET_SYSTEM_ATTRIBUTE( eq->header.equipmentTypeAttribute, ATTR_ORBIT_BC ); eq->header.equipmentSize = eq->payload->size + sizeof( eq->header ); ldc->header.eventSize += eq->header.equipmentSize; decodeCDH( ldc, eq->payload, eq->id ); OR_ALL_ATTRIBUTES( eq->header.equipmentTypeAttribute, ldc->header.eventTypeAttribute ); OR_ALL_ATTRIBUTES( eq->header.equipmentTypeAttribute, gdc->header.eventTypeAttribute ); } gdc->header.eventSize += ldc->header.eventSize; } cdhRef = NULL; } DBG_VERBOSE { printf( "Headers:\n" ); for ( gdc = (struct gdcEventDescriptorStruct *)eventsHead; gdc != NULL; gdc = gdc->next ) { struct ldcEventDescriptorStruct *ldc; printf( " GDC:%d size:%d vers:%08x\n", currGdcId, gdc->header.eventSize, gdc->header.eventVersion); for ( ldc = gdc->head; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; printf( " LDC:%d size:%d vers:%08x\n", ldc->id, ldc->header.eventSize, ldc->header.eventVersion ); for ( eq = ldc->head; eq != NULL; eq = eq->next ) { printf( " EQ:%d size:%d %spayload:%d\n", eq->id, eq->header.equipmentSize, eq->header.equipmentSize - sizeof( struct equipmentHeaderStruct ) == (unsigned)eq->payload->size ? "" : "-ERROR", eq->payload->size ); } } } } } else if ( workingAs == ldc ) { struct ldcEventDescriptorStruct *ldc; for ( ldc = (struct ldcEventDescriptorStruct *)eventsHead; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; initEvent( &ldc->header ); ldc->header.eventSize = ldc->header.eventHeadSize; ldc->header.eventType = PHYSICS_EVENT; ldc->header.eventGdcId = VOID_ID; ldc->header.eventLdcId = ldc->id; for ( eq = ldc->head; eq != NULL; eq = eq->next ) { initEquipment( &eq->header ); eq->header.equipmentId = eq->id; if ( workingMode == collider ) SET_SYSTEM_ATTRIBUTE( eq->header.equipmentTypeAttribute, ATTR_ORBIT_BC ); eq->header.equipmentSize = eq->payload->size + sizeof( eq->header ); ldc->header.eventSize += eq->header.equipmentSize; decodeCDH( ldc, eq->payload, eq->id ); OR_ALL_ATTRIBUTES( eq->header.equipmentTypeAttribute, ldc->header.eventTypeAttribute ); } cdhRef = NULL; } DBG_VERBOSE { printf( "Headers:\n" ); for ( ldc = (struct ldcEventDescriptorStruct *)eventsHead; ldc != NULL; ldc = ldc->next ) { struct equipmentEventDescriptorStruct *eq; printf( " LDC:%d size:%d vers:%08x\n", ldc->id, ldc->header.eventSize, ldc->header.eventVersion ); for ( eq = ldc->head; eq != NULL; eq = eq->next ) { printf( " EQ:%d size:%d %spayload:%d\n", eq->id, eq->header.equipmentSize, eq->header.equipmentSize - sizeof( struct equipmentHeaderStruct ) == (unsigned)eq->payload->size ? "" : "-ERROR", eq->payload->size ); } } } } } /* End of initEvents */ void initVars() { debug = 0; workingAs = unknown; workingMode = fixedTarget; ldcsHead = ldcsTail = NULL; eventsHead = eventsTail = NULL; currGdc = NULL; currLdc = NULL; currEvent = NULL; payloadsHead = payloadsTail = NULL; currRunNb = -1; numOfLdcs = 0; numOfEvents = 1; createSorEor = TRUE; handleCDH = FALSE; gotAliceTrigger = TRUE; bufferData=TRUE; } /* End of initVars */ int main( int argc, char **argv ) { initVars(); parseArgs( argc, argv ); parseRules(); initEvents(); createEvents(); return 0; } /* End of main */
29.5638
152
0.574628
[ "3d" ]
8be2a49c94ade1e8b601cf2a192ccb4ea43e8bf5
1,324
cpp
C++
leetcode/924. Minimize Malware Spread/s3.cpp
zhuohuwu0603/leetcode_cpp_lzl124631x
6a579328810ef4651de00fde0505934d3028d9c7
[ "Fair" ]
787
2017-05-12T05:19:57.000Z
2022-03-30T12:19:52.000Z
leetcode/924. Minimize Malware Spread/s3.cpp
aerlokesh494/LeetCode
0f2cbb28d5a9825b51a8d3b3a0ae0c30d7ff155f
[ "Fair" ]
8
2020-03-16T05:55:38.000Z
2022-03-09T17:19:17.000Z
leetcode/924. Minimize Malware Spread/s3.cpp
aerlokesh494/LeetCode
0f2cbb28d5a9825b51a8d3b3a0ae0c30d7ff155f
[ "Fair" ]
247
2017-04-30T15:07:50.000Z
2022-03-30T09:58:57.000Z
// OJ: https://leetcode.com/problems/minimize-malware-spread/ // Author: github.com/lzl124631x // Time: O(N^2) // Space: O(N) class Solution { void dfs(vector<vector<int>> &graph, int start, int c, vector<int> &color) { color[start] = c; for (int i = 0; i < graph.size(); ++i) { if (graph[start][i] && !color[i]) dfs(graph, i, c, color); } } public: int minMalwareSpread(vector<vector<int>>& graph, vector<int>& initial) { unordered_set<int> init(initial.begin(), initial.end()); sort(initial.begin(), initial.end()); int N = graph.size(), c = 0, ans = initial[0], maxSize = 0; vector<int> color(N); for (int n : initial) { if (color[n]) continue; dfs(graph, n, ++c, color); } for (int i = 1; i <= c; ++i) { int cnt = 0, mal = INT_MAX, malCnt = 0; for (int j = 0; j < N; ++j) { if (color[j] == i) { cnt++; if (init.count(j)) { mal = min(mal, j); ++malCnt; } } } if (malCnt == 1 && cnt > maxSize) { maxSize = cnt; ans = mal; } } return ans; } };
33.1
80
0.429758
[ "vector" ]
8be617e031c296a8e4e2b586c1f9b38df25d99e4
473
hpp
C++
libs/render/include/hamon/render/comparison_func.hpp
shibainuudon/HamonEngine
508a69b0cf589ccb2e5d403ce9e78ff2b85cc058
[ "MIT" ]
null
null
null
libs/render/include/hamon/render/comparison_func.hpp
shibainuudon/HamonEngine
508a69b0cf589ccb2e5d403ce9e78ff2b85cc058
[ "MIT" ]
21
2022-03-02T13:11:59.000Z
2022-03-30T15:12:41.000Z
libs/render/include/hamon/render/comparison_func.hpp
shibainuudon/HamonEngine
508a69b0cf589ccb2e5d403ce9e78ff2b85cc058
[ "MIT" ]
null
null
null
/** * @file comparison_func.hpp * * @brief ComparisonFunc */ #ifndef HAMON_RENDER_COMPARISON_FUNC_HPP #define HAMON_RENDER_COMPARISON_FUNC_HPP #include <cstdint> namespace hamon { inline namespace render { enum class ComparisonFunc : std::uint32_t { Never, Less, Equal, LessEqual, Greater, NotEqual, GreaterEqual, Always, }; } // inline namespace render } // namespace hamon #endif // HAMON_RENDER_COMPARISON_FUNC_HPP
13.514286
43
0.693446
[ "render" ]
8becd4ab66a59f099e59cdca66b150f41ad6fc98
2,470
cpp
C++
hackerearth/marks_time.cpp
abhis2007/Algorithms-1
7637209c5aa52c1afd8be1884d018673d26f5c1f
[ "MIT" ]
26
2019-04-05T07:10:15.000Z
2022-01-08T02:35:19.000Z
hackerearth/marks_time.cpp
abhis2007/Algorithms-1
7637209c5aa52c1afd8be1884d018673d26f5c1f
[ "MIT" ]
2
2019-04-25T15:47:54.000Z
2019-09-03T06:46:05.000Z
hackerearth/marks_time.cpp
abhis2007/Algorithms-1
7637209c5aa52c1afd8be1884d018673d26f5c1f
[ "MIT" ]
8
2019-04-05T08:58:50.000Z
2020-07-03T01:53:58.000Z
/* nuttela Code Arena Player */ #pragma Gpref optimize("O3") //#pragma Gpref optimize("Ofast") //#pragma Gpref target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //#pragma Gpref optimize("unroll-loops") #include <bits/stdc++.h> #define int long long #define ld long double #define ull unsigned long long #define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define TC int t; cin >> t; while(t--) #define FR(i,j,k) for(int i=j; i<k; i++) #define FRI(i,j,k,l) for(int i=j; i<k; i+=l) #define BFR(i,j,k) for(int i=j; i>=k; --i) #define BFRI(i,j,k,l) for(int i=j; i>=k; i-=l) #define pb push_back #define mp make_pair #define vi vector<int> #define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] " #define pi pair<int,int> #define F first #define S second using namespace std; const int MOD = (int)1e9+7; const int N = 1e5+1; const int M = 32; int modmul(int a,int b){int res=0;a%=MOD;while(b){if(b&1)res=(res+a)%MOD;a=(a<<1)%MOD;b>>=1;}return res;} int power(int x,unsigned int y){int res=1;x=x%MOD;while(y>0){if(y&1)res=(res*x)%MOD;y=y>>1;x=(x*x)%MOD;}return res;} int modexpo(int a,int b){int res=1;a%=MOD;while(b>0){if(b%2==1)res=(res*a)%MOD;a=(a*a)%MOD;b/=2;}return res%MOD;} int nCr(int n,int r){int res=1;if(r>n>>1)r=n-r;FR(i,0,r){res=(res*(n-i))%MOD;res=(res*modexpo(i+1,MOD-2))%MOD;}return res;} clock_t time_c=clock(); void nuttela() { time_c = clock()-time_c; cerr<< " Time : "<<(float)(time_c)/CLOCKS_PER_SEC<<"\n"; } bool is(int n) { if(n==0) return false; return (ceil(log2(n)) == floor(log2(n))); } int phi(int n) { int result = n; for (int i = 2; i * i <= n; i++) { if(n % i == 0) { while(n % i == 0) n /= i; result -= result / i; } } if(n > 1) result -= result / n; return result; } int32_t main(){ //Online JUDGE starts #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); freopen("error.txt", "w", stderr); #endif //Online JUDGE ends32 IOS; //pre(); //TC{ //CODE BEGINS int n, q; cin >> n >> q; vi time(n), marks(n), f; multimap <int,int, greater<int>> value; FR(i,0,n) cin >> time[i]; FR(i,0,n) cin >> marks[i]; FR(i,0,n) value.insert({marks[i],time[i]}); for(auto &x:value)f.pb(x.S); FR(i,1,n)f[i] += f[i-1]; while(q--){ int k; cin >> k; cout << f[k-1]; cout << '\n'; } //} nuttela(); return 0; }
24.215686
123
0.578543
[ "vector" ]
bddb1e0ea0d9d526049954954b0c6af95fb2f9b9
2,165
cpp
C++
src/Particle/ParticleModule/ModuleMovement.cpp
Jino42/stf
f10ddaf4eb0a7ba94e6f9bb7d6b2191ca3a0b3db
[ "Unlicense" ]
null
null
null
src/Particle/ParticleModule/ModuleMovement.cpp
Jino42/stf
f10ddaf4eb0a7ba94e6f9bb7d6b2191ca3a0b3db
[ "Unlicense" ]
null
null
null
src/Particle/ParticleModule/ModuleMovement.cpp
Jino42/stf
f10ddaf4eb0a7ba94e6f9bb7d6b2191ca3a0b3db
[ "Unlicense" ]
null
null
null
#include "ModuleMovement.hpp" #include "Particle/PaticleEmitter/AParticleEmitter.hpp" #include <iostream> #include <Engine/ModelEngine/MainGraphicExtendModel.hpp> #include "Particle/ParticleData.hpp" #include "Particle/ParticleSystem.hpp" #include "Cl/ClProgram.hpp" #include "OpenCGL_Tools.hpp" #include "Engine/Random.hpp" #include "cl_type.hpp" #include "Cl/ClKernel.hpp" ModuleMovement::ModuleMovement(AParticleEmitter &emitter) : AParticleModule(emitter), gpuBufferParticles_Movement_(ClContext::Get().context, CL_MEM_WRITE_ONLY, nbParticleMax_ * sizeof(ParticleDataMovement)) { ClProgram::Get().addProgram(pathKernel_ / "Movement.cl"); kernelUpdate_.setKernel(emitter_, "movement"); kernelUpdate_.setArgsGPUBuffers(eParticleBuffer::kData); kernelSpawn_.setKernel(emitter_, "spawnMovementRandom"); kernelSpawn_.setArgsGPUBuffers(eParticleBuffer::kData | eParticleBuffer::kSpawned); } void ModuleMovement::init() { if (debug_) printf("%s\n", __FUNCTION_NAME__); } void ModuleMovement::update(float deltaTime) { if (!isActive_) return; if (debug_) printf("%s\n", __FUNCTION_NAME__); glm::vec3 attractorPosition = MainGraphicExtendModel::Get().attractorPoint; kernelUpdate_.beginAndSetUpdatedArgs(gpuBufferParticles_Movement_, glmVec3toClFloat3(MainGraphicExtendModel::Get().attractorPoint)); OpenCGL::RunKernelWithMem(queue_.getQueue(), kernelUpdate_, emitter_.getParticleOCGL_BufferData().mem, cl::NullRange, cl::NDRange(nbParticleMax_)); } void ModuleMovement::spawn(unsigned int nbToSpawn, unsigned int at) { if (debug_) printf("%s\n", __FUNCTION_NAME__); kernelSpawn_.beginAndSetUpdatedArgs(gpuBufferParticles_Movement_, Random::Get().getRandomSeed()); std::vector<cl::Memory> cl_vbos; cl_vbos.push_back(emitter_.getParticleOCGL_BufferData().mem); OpenCGL::RunKernelWithMem(queue_.getQueue(), kernelSpawn_, cl_vbos, cl::NullRange, cl::NDRange(nbToSpawn)); } void ModuleMovement::reload() { if (debug_) printf("%s\n", __FUNCTION_NAME__); gpuBufferParticles_Movement_ = cl::Buffer(ClContext::Get().context, CL_MEM_WRITE_ONLY, nbParticleMax_ * sizeof(ParticleDataMovement)); init(); }
33.307692
151
0.777367
[ "vector" ]
bde59813e4345d20271b4baf667250e4bd631b7b
1,473
cpp
C++
shift/platform/private/shift/platform/linux/network.cpp
cspanier/shift
5b3b9be310155fbc57d165d06259b723a5728828
[ "Apache-2.0" ]
2
2018-11-28T18:14:08.000Z
2020-08-06T07:44:36.000Z
shift/platform/private/shift/platform/linux/network.cpp
cspanier/shift
5b3b9be310155fbc57d165d06259b723a5728828
[ "Apache-2.0" ]
4
2018-11-06T21:01:05.000Z
2019-02-19T07:52:52.000Z
shift/platform/private/shift/platform/linux/network.cpp
cspanier/shift
5b3b9be310155fbc57d165d06259b723a5728828
[ "Apache-2.0" ]
null
null
null
#include "shift/platform/network.hpp" #include <arpa/inet.h> #include <sys/socket.h> #include <array> #include <memory> #include <cstdio> #include <cstdlib> #include <netdb.h> #include <ifaddrs.h> #include <unistd.h> #include <linux/if_link.h> namespace shift::platform { std::vector<boost::asio::ip::address> network_interfaces() { std::vector<boost::asio::ip::address> result; std::unique_ptr<ifaddrs, void (*)(ifaddrs*)> interfaces(nullptr, &freeifaddrs); { ifaddrs* p = nullptr; if (getifaddrs(&p) == -1) return result; interfaces.reset(p); } std::array<char, NI_MAXHOST> interfaceBuffer; for (auto* interface = interfaces.get(); interface != nullptr; interface = interface->ifa_next) { if ((interface->ifa_addr == nullptr) || (interface->ifa_ifu.ifu_broadaddr == nullptr)) continue; auto family = interface->ifa_addr->sa_family; if (family == AF_INET || family == AF_INET6) { if (getnameinfo(interface->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), interfaceBuffer.data(), interfaceBuffer.size(), nullptr, 0, NI_NUMERICHOST) == 0) { result.push_back( boost::asio::ip::address::from_string(interfaceBuffer.data())); } } } return result; } }
27.277778
78
0.5852
[ "vector" ]
bdec9b2790926197985bc96d2d450306529b10ea
244
cpp
C++
Ch03/Exercises/primer3.18.cpp
Sunrisepeak/gitskills
5f7eba38f114c011e2d1b73bb2be97ba2834c3a4
[ "Apache-2.0" ]
null
null
null
Ch03/Exercises/primer3.18.cpp
Sunrisepeak/gitskills
5f7eba38f114c011e2d1b73bb2be97ba2834c3a4
[ "Apache-2.0" ]
null
null
null
Ch03/Exercises/primer3.18.cpp
Sunrisepeak/gitskills
5f7eba38f114c011e2d1b73bb2be97ba2834c3a4
[ "Apache-2.0" ]
null
null
null
#include<iostream> #include<vector> using std::vector; using std::cout; int main() { vector<int> ivec; // ivec[0] = 42; //segmentation fault ivec.push_back(42); //use push_back function to vector element of add cout << ivec[0]; return 0; }
18.769231
70
0.692623
[ "vector" ]
bdfb130cbe0d355ae5d1ea45f30823e0842e74d4
936,525
cpp
C++
FindSecret/Classes/Native/Bulk_UnityEngine.UI_1.cpp
GodIsWord/NewFindSecret
4f98f316d29936380f9665d6a6d89962d9ee5478
[ "MIT" ]
null
null
null
FindSecret/Classes/Native/Bulk_UnityEngine.UI_1.cpp
GodIsWord/NewFindSecret
4f98f316d29936380f9665d6a6d89962d9ee5478
[ "MIT" ]
null
null
null
FindSecret/Classes/Native/Bulk_UnityEngine.UI_1.cpp
GodIsWord/NewFindSecret
4f98f316d29936380f9665d6a6d89962d9ee5478
[ "MIT" ]
null
null
null
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" #include "mscorlib_System_Array3549286319.h" #include "UnityEngine_UI_UnityEngine_UI_LayoutUtility2745813735.h" #include "UnityEngine_UnityEngine_RectTransform3704657025.h" #include "mscorlib_System_Single1397266774.h" #include "mscorlib_System_Int322950945753.h" #include "mscorlib_System_Object3080106164.h" #include "mscorlib_System_IntPtr840150181.h" #include "System_Core_System_Func_2_gen235587086.h" #include "mscorlib_System_Void1185182177.h" #include "UnityEngine_UnityEngine_Object631007953.h" #include "mscorlib_System_RuntimeTypeHandle3027515415.h" #include "mscorlib_System_Type2483944760.h" #include "mscorlib_System_Collections_Generic_List_1_gen3395709193.h" #include "mscorlib_System_Boolean97287965.h" #include "UnityEngine_UnityEngine_Component1923634451.h" #include "UnityEngine_UnityEngine_Behaviour1437897464.h" #include "UnityEngine_UI_UnityEngine_UI_Mask1803652131.h" #include "UnityEngine_UI_UnityEngine_EventSystems_UIBehaviou3495933518.h" #include "UnityEngine_UI_UnityEngine_UI_Graphic1660335611.h" #include "UnityEngine_UnityEngine_CanvasRenderer2598313366.h" #include "UnityEngine_UnityEngine_Material340375123.h" #include "UnityEngine_UnityEngine_Vector22156229523.h" #include "UnityEngine_UnityEngine_Camera4157153871.h" #include "UnityEngine_UnityEngine_Transform3600365921.h" #include "UnityEngine_UnityEngine_Rendering_StencilOp3446174106.h" #include "UnityEngine_UnityEngine_Rendering_CompareFunction2171731108.h" #include "UnityEngine_UnityEngine_Rendering_ColorWriteMask4282245599.h" #include "mscorlib_System_String1847450689.h" #include "UnityEngine_UnityEngine_GameObject1113636619.h" #include "UnityEngine_UI_UnityEngine_UI_MaskableGraphic3839221559.h" #include "UnityEngine_UI_UnityEngine_UI_MaskableGraphic_Cull3661388177.h" #include "UnityEngine_UnityEngine_Vector33722313464.h" #include "UnityEngine_UnityEngine_Rect2360479859.h" #include "UnityEngine_UnityEngine_Events_UnityEvent_1_gen978947469.h" #include "UnityEngine_UnityEngine_Canvas3310196443.h" #include "UnityEngine_UI_UnityEngine_UI_RectMask2D3474889437.h" #include "UnityEngine_UI_UnityEngine_UI_MaskUtilities4151184739.h" #include "mscorlib_System_Collections_Generic_List_1_gen487303889.h" #include "mscorlib_System_Collections_Generic_List_1_gen3275726873.h" #include "mscorlib_System_Collections_Generic_List_1_gen651996883.h" #include "UnityEngine_UI_UnityEngine_UI_Misc1447421763.h" #include "UnityEngine_UI_UnityEngine_UI_Navigation3049316579.h" #include "UnityEngine_UI_UnityEngine_UI_Navigation_Mode1066900953.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable3250028441.h" #include "UnityEngine_UI_UnityEngine_UI_Outline2536100125.h" #include "UnityEngine_UI_UnityEngine_UI_Shadow773074319.h" #include "UnityEngine_UI_UnityEngine_UI_VertexHelper2453304189.h" #include "UnityEngine_UnityEngine_Color2555686324.h" #include "UnityEngine_UnityEngine_Color322600501292.h" #include "mscorlib_System_Collections_Generic_List_1_gen1234605051.h" #include "UnityEngine_UI_UnityEngine_UI_PositionAsUV13991086357.h" #include "UnityEngine_UI_UnityEngine_UI_BaseMeshEffect2440176439.h" #include "UnityEngine_UnityEngine_UIVertex4057497605.h" #include "UnityEngine_UI_UnityEngine_UI_RawImage3182918964.h" #include "UnityEngine_UnityEngine_Texture3661962703.h" #include "UnityEngine_UnityEngine_Texture2D3840446185.h" #include "UnityEngine_UnityEngine_Vector43319028937.h" #include "UnityEngine_UI_UnityEngine_UI_RectangularVertexClip626611136.h" #include "System_Core_System_Collections_Generic_HashSet_1_g4099546121.h" #include "System_Core_System_Collections_Generic_HashSet_1_E1509756096.h" #include "System_Core_System_Collections_Generic_HashSet_1_E3350232909.h" #include "UnityEngine_UI_UnityEngine_UI_ReflectionMethodsCac2103211062.h" #include "mscorlib_System_Reflection_MethodInfo1877626248.h" #include "UnityEngine_UI_UnityEngine_UI_ReflectionMethodsCach701940803.h" #include "UnityEngine_UI_UnityEngine_UI_ReflectionMethodsCac1884415901.h" #include "UnityEngine_UI_UnityEngine_UI_ReflectionMethodsCach768590915.h" #include "UnityEngine_UI_UnityEngine_UI_ReflectionMethodsCac3913627115.h" #include "mscorlib_System_Delegate1188392813.h" #include "UnityEngine_UnityEngine_Ray3785851493.h" #include "UnityEngine_UnityEngine_RaycastHit2D2279581989.h" #include "mscorlib_System_AsyncCallback3962456242.h" #include "UnityEngine_UnityEngine_RaycastHit1056001966.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar1494447233.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_Direction3470714353.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_ScrollEvent149898510.h" #include "UnityEngine_UI_UnityEngine_UI_CanvasUpdate2572322932.h" #include "UnityEngine_UnityEngine_DrivenRectTransformTracker2562230146.h" #include "UnityEngine_UnityEngine_Events_UnityEvent_1_gen2278926278.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_Axis1697763317.h" #include "UnityEngine_UnityEngine_DrivenTransformProperties3813433528.h" #include "UnityEngine_UI_UnityEngine_EventSystems_PointerEve3807901092.h" #include "UnityEngine_UI_UnityEngine_EventSystems_PointerEve3704011348.h" #include "UnityEngine_UnityEngine_Coroutine3829159415.h" #include "UnityEngine_UnityEngine_MonoBehaviour3962482529.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_U3CClickRe3442648935.h" #include "UnityEngine_UI_UnityEngine_EventSystems_AxisEventD2331243652.h" #include "UnityEngine_UI_UnityEngine_EventSystems_MoveDirect1216237838.h" #include "mscorlib_System_UInt322560061978.h" #include "UnityEngine_UnityEngine_WaitForEndOfFrame1314943911.h" #include "mscorlib_System_NotSupportedException1314879016.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect4137855814.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_MovementT4072922106.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_ScrollRect343079324.h" #include "UnityEngine_UnityEngine_Events_UnityAction_1_gen1982102915.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_ScrollbarV705693775.h" #include "UnityEngine_UnityEngine_Bounds2266837910.h" #include "UnityEngine_UnityEngine_Events_UnityEvent_1_gen3037889027.h" #include "UnityEngine_UnityEngine_Matrix4x41817901843.h" #include "UnityEngine_UI_UnityEngine_UI_ColorBlock2139031574.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable_Transitio1769908631.h" #include "UnityEngine_UI_UnityEngine_UI_AnimationTriggers2532145056.h" #include "mscorlib_System_Collections_Generic_List_1_gen1260619206.h" #include "mscorlib_System_Collections_Generic_List_1_gen427135887.h" #include "UnityEngine_UI_UnityEngine_UI_SpriteState1362986479.h" #include "UnityEngine_UI_UnityEngine_EventSystems_BaseEventD3903027533.h" #include "UnityEngine_UI_UnityEngine_EventSystems_EventSyste1003666588.h" #include "UnityEngine_UI_UnityEngine_UI_Image2670269651.h" #include "UnityEngine_UnityEngine_Animator434523843.h" #include "UnityEngine_UnityEngine_CanvasGroup4083511760.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable_Selection2656606514.h" #include "UnityEngine_UnityEngine_Sprite280657092.h" #include "UnityEngine_UnityEngine_Quaternion2301928331.h" #include "UnityEngine_UI_UnityEngine_UI_SetPropertyUtility3359423571.h" #include "mscorlib_System_Byte1134296376.h" #include "UnityEngine_UI_UnityEngine_UI_Slider3903728902.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_Direction337909235.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_SliderEvent3180273144.h" #include "UnityEngine_UI_UnityEngine_UI_Image_Type1152881528.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_Axis809944411.h" #include "UnityEngine_UI_UnityEngine_UI_StencilMaterial3850132571.h" #include "UnityEngine_UnityEngine_HideFlags4250555765.h" #include "UnityEngine_UI_UnityEngine_UI_StencilMaterial_MatE2957107092.h" #include "mscorlib_System_Collections_Generic_List_1_gen134214538.h" #include "UnityEngine_UI_UnityEngine_UI_Text1901882714.h" #include "UnityEngine_UI_UnityEngine_UI_FontData746620069.h" #include "UnityEngine_UnityEngine_TextGenerator3211863866.h" #include "UnityEngine_UnityEngine_Font1956802104.h" #include "UnityEngine_UnityEngine_TextAnchor2035777396.h" #include "UnityEngine_UnityEngine_HorizontalWrapMode2172737147.h" #include "UnityEngine_UnityEngine_VerticalWrapMode2936607737.h" #include "UnityEngine_UnityEngine_FontStyle82229486.h" #include "UnityEngine_UnityEngine_TextGenerationSettings1351628751.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle2735377061.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle_ToggleTransit3587297765.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle_ToggleEvent1873685584.h" #include "UnityEngine_UI_UnityEngine_UI_ToggleGroup123837990.h" #include "mscorlib_System_Collections_Generic_List_1_gen4207451803.h" #include "mscorlib_System_ArgumentException132251570.h" #include "mscorlib_System_Predicate_1_gen3560671185.h" #include "System_Core_System_Func_2_gen3446800538.h" #include "mscorlib_System_Collections_Generic_List_1_gen899420910.h" #include "mscorlib_System_Collections_Generic_List_1_gen4072576034.h" #include "mscorlib_System_Collections_Generic_List_1_gen3628304265.h" #include "mscorlib_System_Collections_Generic_List_1_gen496136383.h" #include "mscorlib_System_Collections_Generic_List_1_gen128053199.h" #include "UnityEngine_UnityEngine_Mesh3648964284.h" #include "UnityEngine_UI_UnityEngine_UI_VerticalLayoutGroup923838031.h" #include "UnityEngine_UI_UnityEngine_UI_HorizontalOrVerticalL729725570.h" #include "UnityEngine_UI_UnityEngine_UI_LayoutGroup2436138090.h" // UnityEngine.RectTransform struct RectTransform_t3704657025; // System.Func`2<UnityEngine.UI.ILayoutElement,System.Single> struct Func_2_t235587086; // System.Object struct Il2CppObject; // System.Func`2<System.Object,System.Single> struct Func_2_t764290984; // UnityEngine.UI.ILayoutElement struct ILayoutElement_t4082016710; // UnityEngine.Object struct Object_t631007953; // System.Collections.Generic.List`1<UnityEngine.Component> struct List_1_t3395709193; // System.Collections.Generic.List`1<System.Object> struct List_1_t257213610; // System.Type struct Type_t; // UnityEngine.Component struct Component_t1923634451; // UnityEngine.Behaviour struct Behaviour_t1437897464; // UnityEngine.UI.Mask struct Mask_t1803652131; // UnityEngine.EventSystems.UIBehaviour struct UIBehaviour_t3495933518; // UnityEngine.UI.Graphic struct Graphic_t1660335611; // UnityEngine.CanvasRenderer struct CanvasRenderer_t2598313366; // UnityEngine.Material struct Material_t340375123; // UnityEngine.Camera struct Camera_t4157153871; // UnityEngine.Transform struct Transform_t3600365921; // UnityEngine.GameObject struct GameObject_t1113636619; // UnityEngine.UI.MaskableGraphic struct MaskableGraphic_t3839221559; // UnityEngine.UI.MaskableGraphic/CullStateChangedEvent struct CullStateChangedEvent_t3661388177; // UnityEngine.Events.UnityEvent`1<System.Boolean> struct UnityEvent_1_t978947469; // UnityEngine.Vector3[] struct Vector3U5BU5D_t1718750761; // UnityEngine.Canvas struct Canvas_t3310196443; // UnityEngine.UI.RectMask2D struct RectMask2D_t3474889437; // UnityEngine.UI.IClippable struct IClippable_t1239629351; // UnityEngine.UI.MaskUtilities struct MaskUtilities_t4151184739; // System.Collections.Generic.List`1<UnityEngine.Canvas> struct List_1_t487303889; // System.Collections.Generic.List`1<UnityEngine.UI.Mask> struct List_1_t3275726873; // System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D> struct List_1_t651996883; // UnityEngine.UI.Selectable struct Selectable_t3250028441; // UnityEngine.UI.Outline struct Outline_t2536100125; // UnityEngine.UI.Shadow struct Shadow_t773074319; // UnityEngine.UI.VertexHelper struct VertexHelper_t2453304189; // System.Collections.Generic.List`1<UnityEngine.UIVertex> struct List_1_t1234605051; // UnityEngine.UI.PositionAsUV1 struct PositionAsUV1_t3991086357; // UnityEngine.UI.BaseMeshEffect struct BaseMeshEffect_t2440176439; // UnityEngine.UI.RawImage struct RawImage_t3182918964; // UnityEngine.Texture struct Texture_t3661962703; // UnityEngine.UI.RectangularVertexClipper struct RectangularVertexClipper_t626611136; // System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable> struct HashSet_1_t4099546121; // System.Collections.Generic.HashSet`1<System.Object> struct HashSet_1_t1645055638; // UnityEngine.UI.IClipper struct IClipper_t1224123152; // UnityEngine.UI.ReflectionMethodsCache struct ReflectionMethodsCache_t2103211062; // System.Reflection.MethodInfo struct MethodInfo_t; // System.String struct String_t; // System.Type[] struct TypeU5BU5D_t3940880105; // System.Delegate struct Delegate_t1188392813; // UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback struct GetRayIntersectionAllCallback_t3913627115; // UnityEngine.RaycastHit2D[] struct RaycastHit2DU5BU5D_t4286651560; // System.IAsyncResult struct IAsyncResult_t767004451; // System.AsyncCallback struct AsyncCallback_t3962456242; // UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback struct Raycast2DCallback_t768590915; // UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback struct Raycast3DCallback_t701940803; // UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback struct RaycastAllCallback_t1884415901; // UnityEngine.RaycastHit[] struct RaycastHitU5BU5D_t1690781147; // UnityEngine.UI.Scrollbar struct Scrollbar_t1494447233; // UnityEngine.UI.Scrollbar/ScrollEvent struct ScrollEvent_t149898510; // UnityEngine.Events.UnityEvent`1<System.Single> struct UnityEvent_1_t2278926278; // UnityEngine.EventSystems.PointerEventData struct PointerEventData_t3807901092; // System.Collections.IEnumerator struct IEnumerator_t1853284238; // UnityEngine.MonoBehaviour struct MonoBehaviour_t3962482529; // UnityEngine.Coroutine struct Coroutine_t3829159415; // UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0 struct U3CClickRepeatU3Ec__Iterator0_t3442648935; // UnityEngine.EventSystems.AxisEventData struct AxisEventData_t2331243652; // UnityEngine.WaitForEndOfFrame struct WaitForEndOfFrame_t1314943911; // System.NotSupportedException struct NotSupportedException_t1314879016; // UnityEngine.UI.ScrollRect struct ScrollRect_t4137855814; // UnityEngine.UI.ScrollRect/ScrollRectEvent struct ScrollRectEvent_t343079324; // UnityEngine.Events.UnityAction`1<System.Single> struct UnityAction_1_t1982102915; // UnityEngine.UI.ICanvasElement struct ICanvasElement_t2121898866; // UnityEngine.Events.UnityEvent`1<UnityEngine.Vector2> struct UnityEvent_1_t3037889027; // UnityEngine.UI.AnimationTriggers struct AnimationTriggers_t2532145056; // System.Collections.Generic.List`1<UnityEngine.CanvasGroup> struct List_1_t1260619206; // System.Collections.Generic.List`1<UnityEngine.UI.Selectable> struct List_1_t427135887; // UnityEngine.EventSystems.EventSystem struct EventSystem_t1003666588; // UnityEngine.EventSystems.BaseEventData struct BaseEventData_t3903027533; // UnityEngine.UI.Image struct Image_t2670269651; // UnityEngine.Animator struct Animator_t434523843; // UnityEngine.CanvasGroup struct CanvasGroup_t4083511760; // UnityEngine.Sprite struct Sprite_t280657092; // UnityEngine.UI.Slider struct Slider_t3903728902; // UnityEngine.UI.Slider/SliderEvent struct SliderEvent_t3180273144; // System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry> struct List_1_t134214538; // UnityEngine.UI.StencilMaterial/MatEntry struct MatEntry_t2957107092; // System.Object[] struct ObjectU5BU5D_t2843939325; // UnityEngine.UI.Text struct Text_t1901882714; // UnityEngine.UI.FontData struct FontData_t746620069; // UnityEngine.TextGenerator struct TextGenerator_t3211863866; // UnityEngine.Font struct Font_t1956802104; // System.Collections.Generic.IList`1<UnityEngine.UIVertex> struct IList_1_t1577850092; // UnityEngine.UIVertex[] struct UIVertexU5BU5D_t1981460040; // UnityEngine.UI.Toggle struct Toggle_t2735377061; // UnityEngine.UI.Toggle/ToggleEvent struct ToggleEvent_t1873685584; // UnityEngine.UI.ToggleGroup struct ToggleGroup_t123837990; // System.Collections.Generic.List`1<UnityEngine.UI.Toggle> struct List_1_t4207451803; // System.ArgumentException struct ArgumentException_t132251570; // System.Predicate`1<UnityEngine.UI.Toggle> struct Predicate_1_t3560671185; // System.Predicate`1<System.Object> struct Predicate_1_t3905400288; // System.Collections.Generic.IEnumerable`1<UnityEngine.UI.Toggle> struct IEnumerable_1_t1715229950; // System.Func`2<UnityEngine.UI.Toggle,System.Boolean> struct Func_2_t3446800538; // System.Func`2<System.Object,System.Boolean> struct Func_2_t3759279471; // System.Collections.Generic.IEnumerable`1<System.Object> struct IEnumerable_1_t2059959053; // System.Collections.Generic.List`1<UnityEngine.Vector3> struct List_1_t899420910; // System.Collections.Generic.List`1<UnityEngine.Color32> struct List_1_t4072576034; // System.Collections.Generic.List`1<UnityEngine.Vector2> struct List_1_t3628304265; // System.Collections.Generic.List`1<UnityEngine.Vector4> struct List_1_t496136383; // System.Collections.Generic.List`1<System.Int32> struct List_1_t128053199; // UnityEngine.Mesh struct Mesh_t3648964284; // System.Collections.Generic.IEnumerable`1<UnityEngine.Vector3> struct IEnumerable_1_t2702166353; // UnityEngine.Color32[] struct Color32U5BU5D_t3850468773; // System.Collections.Generic.IEnumerable`1<UnityEngine.Color32> struct IEnumerable_1_t1580354181; // UnityEngine.Vector2[] struct Vector2U5BU5D_t1457185986; // System.Collections.Generic.IEnumerable`1<UnityEngine.Vector2> struct IEnumerable_1_t1136082412; // UnityEngine.Vector4[] struct Vector4U5BU5D_t934056436; // System.Collections.Generic.IEnumerable`1<UnityEngine.Vector4> struct IEnumerable_1_t2298881826; // System.Int32[] struct Int32U5BU5D_t385246372; // System.Collections.Generic.IEnumerable`1<System.Int32> struct IEnumerable_1_t1930798642; // UnityEngine.UI.VerticalLayoutGroup struct VerticalLayoutGroup_t923838031; // UnityEngine.UI.HorizontalOrVerticalLayoutGroup struct HorizontalOrVerticalLayoutGroup_t729725570; // UnityEngine.UI.LayoutGroup struct LayoutGroup_t2436138090; extern Il2CppClass* LayoutUtility_t2745813735_il2cpp_TypeInfo_var; extern Il2CppClass* Func_2_t235587086_il2cpp_TypeInfo_var; extern const MethodInfo* LayoutUtility_U3CGetMinWidthU3Em__0_m398152306_MethodInfo_var; extern const MethodInfo* Func_2__ctor_m4101054726_MethodInfo_var; extern const uint32_t LayoutUtility_GetMinWidth_m3612214871_MetadataUsageId; extern Il2CppClass* Mathf_t3464937446_il2cpp_TypeInfo_var; extern const MethodInfo* LayoutUtility_U3CGetPreferredWidthU3Em__1_m74273510_MethodInfo_var; extern const MethodInfo* LayoutUtility_U3CGetPreferredWidthU3Em__2_m1610950633_MethodInfo_var; extern const uint32_t LayoutUtility_GetPreferredWidth_m3678713536_MetadataUsageId; extern const MethodInfo* LayoutUtility_U3CGetFlexibleWidthU3Em__3_m1091238571_MethodInfo_var; extern const uint32_t LayoutUtility_GetFlexibleWidth_m22831835_MetadataUsageId; extern const MethodInfo* LayoutUtility_U3CGetMinHeightU3Em__4_m2382889764_MethodInfo_var; extern const uint32_t LayoutUtility_GetMinHeight_m4082139234_MetadataUsageId; extern const MethodInfo* LayoutUtility_U3CGetPreferredHeightU3Em__5_m407820296_MethodInfo_var; extern const MethodInfo* LayoutUtility_U3CGetPreferredHeightU3Em__6_m3049688934_MethodInfo_var; extern const uint32_t LayoutUtility_GetPreferredHeight_m954532477_MetadataUsageId; extern const MethodInfo* LayoutUtility_U3CGetFlexibleHeightU3Em__7_m2991026842_MethodInfo_var; extern const uint32_t LayoutUtility_GetFlexibleHeight_m84018936_MetadataUsageId; extern const Il2CppType* ILayoutElement_t4082016710_0_0_0_var; extern Il2CppClass* Object_t631007953_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t2953223642_il2cpp_TypeInfo_var; extern Il2CppClass* Type_t_il2cpp_TypeInfo_var; extern Il2CppClass* ILayoutElement_t4082016710_il2cpp_TypeInfo_var; extern Il2CppClass* Behaviour_t1437897464_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m2062177143_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m3306164819_MethodInfo_var; extern const MethodInfo* Func_2_Invoke_m488571475_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1294235957_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3920209327_MethodInfo_var; extern const uint32_t LayoutUtility_GetLayoutProperty_m714717302_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetMinWidthU3Em__0_m398152306_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetPreferredWidthU3Em__1_m74273510_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetPreferredWidthU3Em__2_m1610950633_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetFlexibleWidthU3Em__3_m1091238571_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetMinHeightU3Em__4_m2382889764_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetPreferredHeightU3Em__5_m407820296_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetPreferredHeightU3Em__6_m3049688934_MetadataUsageId; extern const uint32_t LayoutUtility_U3CGetFlexibleHeightU3Em__7_m2991026842_MetadataUsageId; extern const MethodInfo* Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var; extern const uint32_t Mask_get_rectTransform_m440704215_MetadataUsageId; extern const uint32_t Mask_set_showMaskGraphic_m1344750035_MetadataUsageId; extern const MethodInfo* Component_GetComponent_TisGraphic_t1660335611_m1118939870_MethodInfo_var; extern const uint32_t Mask_get_graphic_m2572620787_MetadataUsageId; extern const uint32_t Mask_MaskEnabled_m2980554430_MetadataUsageId; extern const uint32_t Mask_OnEnable_m2186824439_MetadataUsageId; extern Il2CppClass* StencilMaterial_t3850132571_il2cpp_TypeInfo_var; extern const uint32_t Mask_OnDisable_m1270951829_MetadataUsageId; extern Il2CppClass* RectTransformUtility_t1743242446_il2cpp_TypeInfo_var; extern const uint32_t Mask_IsRaycastLocationValid_m3572890775_MetadataUsageId; extern Il2CppClass* Debug_t3317548046_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral2763503942; extern const uint32_t Mask_GetModifiedMaterial_m2692272647_MetadataUsageId; extern Il2CppClass* CullStateChangedEvent_t3661388177_il2cpp_TypeInfo_var; extern Il2CppClass* Vector3U5BU5D_t1718750761_il2cpp_TypeInfo_var; extern Il2CppClass* Graphic_t1660335611_il2cpp_TypeInfo_var; extern const uint32_t MaskableGraphic__ctor_m3705055375_MetadataUsageId; extern const MethodInfo* Component_GetComponent_TisMask_t1803652131_m643495272_MethodInfo_var; extern const uint32_t MaskableGraphic_GetModifiedMaterial_m2758867980_MetadataUsageId; extern const MethodInfo* UnityEvent_1_Invoke_m933614109_MethodInfo_var; extern const uint32_t MaskableGraphic_UpdateCull_m2805101913_MetadataUsageId; extern const uint32_t MaskableGraphic_OnEnable_m846302383_MetadataUsageId; extern const uint32_t MaskableGraphic_OnDisable_m1757789159_MetadataUsageId; extern const uint32_t MaskableGraphic_get_rootCanvasRect_m3492154629_MetadataUsageId; extern const uint32_t MaskableGraphic_UpdateClipParent_m2605828397_MetadataUsageId; extern const MethodInfo* UnityEvent_1__ctor_m3777630589_MethodInfo_var; extern const uint32_t CullStateChangedEvent__ctor_m4089558259_MetadataUsageId; extern Il2CppClass* IClippable_t1239629351_il2cpp_TypeInfo_var; extern const MethodInfo* Component_GetComponentsInChildren_TisComponent_t1923634451_m1156099783_MethodInfo_var; extern const uint32_t MaskUtilities_Notify2DMaskStateChanged_m1613167679_MetadataUsageId; extern Il2CppClass* IMaskable_t433386433_il2cpp_TypeInfo_var; extern const uint32_t MaskUtilities_NotifyStencilStateChanged_m3969722420_MetadataUsageId; extern Il2CppClass* ListPool_1_t44818338_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m3146528893_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1187285853_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1106558045_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m1295952082_MethodInfo_var; extern const uint32_t MaskUtilities_FindRootSortOverrideCanvas_m1053047732_MetadataUsageId; extern Il2CppClass* ListPool_1_t2833241322_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m1500154352_MethodInfo_var; extern const MethodInfo* Component_GetComponents_TisMask_t1803652131_m1975602924_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1662916923_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m2576555402_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m2936487515_MethodInfo_var; extern const uint32_t MaskUtilities_GetStencilDepth_m402474137_MetadataUsageId; extern const uint32_t MaskUtilities_IsDescendantOrSelf_m2247511982_MetadataUsageId; extern Il2CppClass* ListPool_1_t209511332_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m4207191750_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInParent_TisRectMask2D_t3474889437_m3154118616_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1529060501_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m3759222515_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3079893175_MethodInfo_var; extern const uint32_t MaskUtilities_GetRectMaskForClippable_m2464520669_MetadataUsageId; extern const MethodInfo* List_1_Clear_m168400987_MethodInfo_var; extern const MethodInfo* List_1_Add_m3779394834_MethodInfo_var; extern const uint32_t MaskUtilities_GetRectMasksForClip_m532898711_MetadataUsageId; extern Il2CppClass* GameObject_t1113636619_il2cpp_TypeInfo_var; extern const uint32_t Misc_Destroy_m3285455208_MetadataUsageId; extern const uint32_t Misc_DestroyImmediate_m3534039591_MetadataUsageId; extern Il2CppClass* Navigation_t3049316579_il2cpp_TypeInfo_var; extern const uint32_t Navigation_get_defaultNavigation_m2181582095_MetadataUsageId; extern const uint32_t Navigation_Equals_m317484440_MetadataUsageId; extern Il2CppClass* ListPool_1_t792119500_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m738675669_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m401353472_MethodInfo_var; extern const MethodInfo* List_1_get_Capacity_m3666274724_MethodInfo_var; extern const MethodInfo* List_1_set_Capacity_m2777925136_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m1246825787_MethodInfo_var; extern const uint32_t Outline_ModifyMesh_m226991704_MetadataUsageId; extern Il2CppClass* UIVertex_t4057497605_il2cpp_TypeInfo_var; extern const uint32_t PositionAsUV1_ModifyMesh_m4231919476_MetadataUsageId; extern const uint32_t RawImage_get_mainTexture_m2396337033_MetadataUsageId; extern const uint32_t RawImage_set_texture_m415027901_MetadataUsageId; extern const uint32_t RawImage_SetNativeSize_m4254640819_MetadataUsageId; extern const uint32_t RawImage_OnPopulateMesh_m1115858855_MetadataUsageId; extern const uint32_t RectangularVertexClipper__ctor_m3444028362_MetadataUsageId; extern Il2CppClass* Rect_t2360479859_il2cpp_TypeInfo_var; extern const MethodInfo* Component_GetComponent_TisTransform_t3600365921_m1200784320_MethodInfo_var; extern const uint32_t RectangularVertexClipper_GetCanvasRect_m2796440817_MetadataUsageId; extern Il2CppClass* RectangularVertexClipper_t626611136_il2cpp_TypeInfo_var; extern Il2CppClass* HashSet_1_t4099546121_il2cpp_TypeInfo_var; extern Il2CppClass* List_1_t651996883_il2cpp_TypeInfo_var; extern const MethodInfo* HashSet_1__ctor_m3016903461_MethodInfo_var; extern const MethodInfo* List_1__ctor_m3694722480_MethodInfo_var; extern const uint32_t RectMask2D__ctor_m1497447338_MetadataUsageId; extern const MethodInfo* GameObject_GetComponentsInParent_TisCanvas_t3310196443_m249132757_MethodInfo_var; extern const uint32_t RectMask2D_get_canvasRect_m4284298055_MetadataUsageId; extern const uint32_t RectMask2D_get_rectTransform_m921006921_MetadataUsageId; extern const MethodInfo* HashSet_1_Clear_m1535948485_MethodInfo_var; extern const uint32_t RectMask2D_OnDisable_m809267607_MetadataUsageId; extern const uint32_t RectMask2D_IsRaycastLocationValid_m1652308696_MetadataUsageId; extern Il2CppClass* MaskableGraphic_t3839221559_il2cpp_TypeInfo_var; extern const MethodInfo* HashSet_1_GetEnumerator_m569006269_MethodInfo_var; extern const MethodInfo* Enumerator_get_Current_m1834618397_MethodInfo_var; extern const MethodInfo* Enumerator_MoveNext_m1554493645_MethodInfo_var; extern const MethodInfo* Enumerator_Dispose_m2380611706_MethodInfo_var; extern const uint32_t RectMask2D_PerformClipping_m199628230_MetadataUsageId; extern const MethodInfo* HashSet_1_Contains_m3128925042_MethodInfo_var; extern const MethodInfo* HashSet_1_Add_m3226509647_MethodInfo_var; extern const uint32_t RectMask2D_AddClippable_m373784024_MetadataUsageId; extern const MethodInfo* HashSet_1_Remove_m1860968099_MethodInfo_var; extern const uint32_t RectMask2D_RemoveClippable_m773604960_MetadataUsageId; extern const Il2CppType* Physics_t2310948930_0_0_0_var; extern const Il2CppType* Ray_t3785851493_0_0_0_var; extern const Il2CppType* RaycastHit_t1056001966_0_0_0_var; extern const Il2CppType* Single_t1397266774_0_0_0_var; extern const Il2CppType* Int32_t2950945753_0_0_0_var; extern const Il2CppType* Raycast3DCallback_t701940803_0_0_0_var; extern const Il2CppType* Physics2D_t1528932956_0_0_0_var; extern const Il2CppType* Vector2_t2156229523_0_0_0_var; extern const Il2CppType* Raycast2DCallback_t768590915_0_0_0_var; extern const Il2CppType* RaycastAllCallback_t1884415901_0_0_0_var; extern const Il2CppType* GetRayIntersectionAllCallback_t3913627115_0_0_0_var; extern Il2CppClass* TypeU5BU5D_t3940880105_il2cpp_TypeInfo_var; extern Il2CppClass* Raycast3DCallback_t701940803_il2cpp_TypeInfo_var; extern Il2CppClass* Raycast2DCallback_t768590915_il2cpp_TypeInfo_var; extern Il2CppClass* RaycastAllCallback_t1884415901_il2cpp_TypeInfo_var; extern Il2CppClass* GetRayIntersectionAllCallback_t3913627115_il2cpp_TypeInfo_var; extern Il2CppCodeGenString* _stringLiteral618070602; extern Il2CppCodeGenString* _stringLiteral2652151739; extern Il2CppCodeGenString* _stringLiteral2818997478; extern const uint32_t ReflectionMethodsCache__ctor_m3826472948_MetadataUsageId; extern Il2CppClass* ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var; extern const uint32_t ReflectionMethodsCache_get_Singleton_m787098794_MetadataUsageId; extern const uint32_t ReflectionMethodsCache__cctor_m3883666113_MetadataUsageId; extern Il2CppClass* Ray_t3785851493_il2cpp_TypeInfo_var; extern Il2CppClass* Single_t1397266774_il2cpp_TypeInfo_var; extern Il2CppClass* Int32_t2950945753_il2cpp_TypeInfo_var; extern const uint32_t GetRayIntersectionAllCallback_BeginInvoke_m567311550_MetadataUsageId; extern Il2CppClass* Vector2_t2156229523_il2cpp_TypeInfo_var; extern const uint32_t Raycast2DCallback_BeginInvoke_m2365382882_MetadataUsageId; extern Il2CppClass* RaycastHit_t1056001966_il2cpp_TypeInfo_var; extern const uint32_t Raycast3DCallback_BeginInvoke_m3732133089_MetadataUsageId; extern const uint32_t RaycastAllCallback_BeginInvoke_m3934710463_MetadataUsageId; extern Il2CppClass* ScrollEvent_t149898510_il2cpp_TypeInfo_var; extern Il2CppClass* Selectable_t3250028441_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar__ctor_m1852189877_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854_MethodInfo_var; extern const uint32_t Scrollbar_set_handleRect_m1170237786_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisDirection_t3470714353_m1506329685_MethodInfo_var; extern const uint32_t Scrollbar_set_direction_m473480640_MetadataUsageId; extern const uint32_t Scrollbar_get_value_m760470106_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785_MethodInfo_var; extern const uint32_t Scrollbar_set_size_m4256339911_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisInt32_t2950945753_m1101767463_MethodInfo_var; extern const uint32_t Scrollbar_set_numberOfSteps_m3603299569_MetadataUsageId; extern const uint32_t Scrollbar_UpdateCachedReferences_m552296126_MetadataUsageId; extern const MethodInfo* UnityEvent_1_Invoke_m3400677460_MethodInfo_var; extern const uint32_t Scrollbar_Set_m607000118_MetadataUsageId; extern const uint32_t Scrollbar_UpdateVisuals_m2492252165_MetadataUsageId; extern const uint32_t Scrollbar_UpdateDrag_m1999008351_MetadataUsageId; extern const uint32_t Scrollbar_OnBeginDrag_m2883737878_MetadataUsageId; extern const uint32_t Scrollbar_OnDrag_m4289602768_MetadataUsageId; extern Il2CppClass* U3CClickRepeatU3Ec__Iterator0_t3442648935_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_ClickRepeat_m568850785_MetadataUsageId; extern const uint32_t Scrollbar_OnMove_m884487036_MetadataUsageId; extern Il2CppClass* RectTransform_t3704657025_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_SetDirection_m1664029967_MetadataUsageId; extern Il2CppClass* WaitForEndOfFrame_t1314943911_il2cpp_TypeInfo_var; extern const uint32_t U3CClickRepeatU3Ec__Iterator0_MoveNext_m2800364313_MetadataUsageId; extern Il2CppClass* NotSupportedException_t1314879016_il2cpp_TypeInfo_var; extern const uint32_t U3CClickRepeatU3Ec__Iterator0_Reset_m1121315703_MetadataUsageId; extern const MethodInfo* UnityEvent_1__ctor_m2218582587_MethodInfo_var; extern const uint32_t ScrollEvent__ctor_m342565857_MetadataUsageId; extern Il2CppClass* ScrollRectEvent_t343079324_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect__ctor_m4109385501_MetadataUsageId; extern Il2CppClass* UnityAction_1_t1982102915_il2cpp_TypeInfo_var; extern const MethodInfo* ScrollRect_SetHorizontalNormalizedPosition_m3159121919_MethodInfo_var; extern const MethodInfo* UnityAction_1__ctor_m336053009_MethodInfo_var; extern const MethodInfo* UnityEvent_1_RemoveListener_m4190968495_MethodInfo_var; extern const MethodInfo* UnityEvent_1_AddListener_m3008008915_MethodInfo_var; extern const uint32_t ScrollRect_set_horizontalScrollbar_m1905585067_MetadataUsageId; extern const MethodInfo* ScrollRect_SetVerticalNormalizedPosition_m3389719750_MethodInfo_var; extern const uint32_t ScrollRect_set_verticalScrollbar_m3559087251_MetadataUsageId; extern const uint32_t ScrollRect_get_viewRect_m791243225_MetadataUsageId; extern const uint32_t ScrollRect_get_rectTransform_m2442061719_MetadataUsageId; extern const uint32_t ScrollRect_UpdateCachedData_m2213916985_MetadataUsageId; extern Il2CppClass* CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_OnEnable_m3130111531_MetadataUsageId; extern Il2CppClass* LayoutRebuilder_t541313304_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_OnDisable_m4255705644_MetadataUsageId; extern const uint32_t ScrollRect_IsActive_m2043120237_MetadataUsageId; extern const uint32_t ScrollRect_EnsureLayoutHasRebuilt_m3415112783_MetadataUsageId; extern const uint32_t ScrollRect_OnScroll_m3861066534_MetadataUsageId; extern const uint32_t ScrollRect_OnBeginDrag_m1222709073_MetadataUsageId; extern const uint32_t ScrollRect_OnDrag_m688583138_MetadataUsageId; extern const MethodInfo* UnityEvent_1_Invoke_m3432495026_MethodInfo_var; extern const uint32_t ScrollRect_LateUpdate_m1215231183_MetadataUsageId; extern const uint32_t ScrollRect_UpdatePrevData_m4009119607_MetadataUsageId; extern const uint32_t ScrollRect_UpdateScrollbars_m4146077522_MetadataUsageId; extern const uint32_t ScrollRect_SetNormalizedPosition_m3260907438_MetadataUsageId; extern const uint32_t ScrollRect_RubberDelta_m3597626447_MetadataUsageId; extern const uint32_t ScrollRect_SetLayoutHorizontal_m3078869633_MetadataUsageId; extern const uint32_t ScrollRect_UpdateOneScrollbarVisibility_m1785426292_MetadataUsageId; extern const uint32_t ScrollRect_UpdateScrollbarLayout_m4070037264_MetadataUsageId; extern const uint32_t ScrollRect_UpdateBounds_m359586673_MetadataUsageId; extern Il2CppClass* Bounds_t2266837910_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_GetBounds_m449872505_MetadataUsageId; extern const uint32_t ScrollRect_SetDirty_m214267968_MetadataUsageId; extern const uint32_t ScrollRect_SetDirtyCaching_m4155312386_MetadataUsageId; extern const MethodInfo* UnityEvent_1__ctor_m3675246889_MethodInfo_var; extern const uint32_t ScrollRectEvent__ctor_m1107027632_MetadataUsageId; extern Il2CppClass* AnimationTriggers_t2532145056_il2cpp_TypeInfo_var; extern Il2CppClass* List_1_t1260619206_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m1125674364_MethodInfo_var; extern const uint32_t Selectable__ctor_m58942866_MetadataUsageId; extern const uint32_t Selectable_get_allSelectables_m868218263_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisNavigation_t3049316579_m1469939781_MethodInfo_var; extern const uint32_t Selectable_set_navigation_m1617209861_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisTransition_t1769908631_m4087672457_MethodInfo_var; extern const uint32_t Selectable_set_transition_m3395256326_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisColorBlock_t2139031574_m1748367426_MethodInfo_var; extern const uint32_t Selectable_set_colors_m1384394609_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisSpriteState_t1362986479_m665096788_MethodInfo_var; extern const uint32_t Selectable_set_spriteState_m1127684063_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetClass_TisAnimationTriggers_t2532145056_m1077330060_MethodInfo_var; extern const uint32_t Selectable_set_animationTriggers_m2970345687_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetClass_TisGraphic_t1660335611_m2615282015_MethodInfo_var; extern const uint32_t Selectable_set_targetGraphic_m1003546643_MetadataUsageId; extern Il2CppClass* EventSystem_t1003666588_il2cpp_TypeInfo_var; extern const MethodInfo* SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708_MethodInfo_var; extern const uint32_t Selectable_set_interactable_m3105888815_MetadataUsageId; extern Il2CppClass* Image_t2670269651_il2cpp_TypeInfo_var; extern const uint32_t Selectable_get_image_m1928917691_MetadataUsageId; extern const MethodInfo* Component_GetComponent_TisAnimator_t434523843_m2351447238_MethodInfo_var; extern const uint32_t Selectable_get_animator_m2899312855_MetadataUsageId; extern const uint32_t Selectable_Awake_m2577497063_MetadataUsageId; extern const MethodInfo* Component_GetComponents_TisCanvasGroup_t4083511760_m1242628373_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1176857673_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1565416845_MethodInfo_var; extern const uint32_t Selectable_OnCanvasGroupChanged_m472903475_MetadataUsageId; extern const MethodInfo* List_1_Add_m2184749397_MethodInfo_var; extern const uint32_t Selectable_OnEnable_m3110490294_MetadataUsageId; extern const MethodInfo* List_1_Remove_m2170822742_MethodInfo_var; extern const uint32_t Selectable_OnDisable_m3225138518_MetadataUsageId; extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern const uint32_t Selectable_DoStateTransition_m1885133206_MetadataUsageId; extern const MethodInfo* List_1_get_Item_m2170948632_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m124153205_MethodInfo_var; extern const uint32_t Selectable_FindSelectable_m2348614027_MetadataUsageId; extern const uint32_t Selectable_GetPointOnRectEdge_m2129691872_MetadataUsageId; extern const uint32_t Selectable_Navigate_m2538999742_MetadataUsageId; extern const uint32_t Selectable_StartColorTween_m3618813981_MetadataUsageId; extern const uint32_t Selectable_DoSpriteSwap_m3258918083_MetadataUsageId; extern const uint32_t Selectable_TriggerAnimation_m2878474_MetadataUsageId; extern Il2CppClass* PointerEventData_t3807901092_il2cpp_TypeInfo_var; extern const uint32_t Selectable_IsHighlighted_m1215066233_MetadataUsageId; extern const uint32_t Selectable_OnPointerDown_m1086067264_MetadataUsageId; extern const uint32_t Selectable_Select_m1465131241_MetadataUsageId; extern Il2CppClass* List_1_t427135887_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m2565882233_MethodInfo_var; extern const uint32_t Selectable__cctor_m1838624427_MetadataUsageId; extern const uint32_t Shadow_set_effectColor_m3910676693_MetadataUsageId; extern const uint32_t Shadow_set_effectDistance_m2763324811_MetadataUsageId; extern const uint32_t Shadow_set_useGraphicAlpha_m2224202025_MetadataUsageId; extern const MethodInfo* List_1_get_Item_m457221236_MethodInfo_var; extern const MethodInfo* List_1_Add_m2586421604_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m2057272351_MethodInfo_var; extern const uint32_t Shadow_ApplyShadowZeroAlloc_m1225757410_MetadataUsageId; extern const uint32_t Shadow_ModifyMesh_m1374575027_MetadataUsageId; extern Il2CppClass* SliderEvent_t3180273144_il2cpp_TypeInfo_var; extern const uint32_t Slider__ctor_m873361617_MetadataUsageId; extern const uint32_t Slider_set_fillRect_m2656251767_MetadataUsageId; extern const uint32_t Slider_set_handleRect_m1101657556_MetadataUsageId; extern const MethodInfo* SetPropertyUtility_SetStruct_TisDirection_t337909235_m916002679_MethodInfo_var; extern const uint32_t Slider_set_direction_m3354648663_MetadataUsageId; extern const uint32_t Slider_set_minValue_m3431883418_MetadataUsageId; extern const uint32_t Slider_set_maxValue_m2251404465_MetadataUsageId; extern const uint32_t Slider_set_wholeNumbers_m1108091651_MetadataUsageId; extern const uint32_t Slider_get_value_m739683640_MetadataUsageId; extern const uint32_t Slider_get_normalizedValue_m4221259752_MetadataUsageId; extern const uint32_t Slider_set_normalizedValue_m480470123_MetadataUsageId; extern const uint32_t Slider_OnDidApplyAnimationProperties_m4192788494_MetadataUsageId; extern const MethodInfo* Component_GetComponent_TisImage_t2670269651_m980647750_MethodInfo_var; extern const uint32_t Slider_UpdateCachedReferences_m3259451627_MetadataUsageId; extern const uint32_t Slider_ClampValue_m3482112413_MetadataUsageId; extern const uint32_t Slider_Set_m1476104429_MetadataUsageId; extern const uint32_t Slider_UpdateVisuals_m3662961057_MetadataUsageId; extern const uint32_t Slider_UpdateDrag_m1102107039_MetadataUsageId; extern const uint32_t Slider_OnPointerDown_m3052086073_MetadataUsageId; extern const uint32_t Slider_OnMove_m2670177017_MetadataUsageId; extern const uint32_t Slider_SetDirection_m2450124012_MetadataUsageId; extern const uint32_t SliderEvent__ctor_m3149452941_MetadataUsageId; extern const uint32_t SpriteState_Equals_m2696426421_MetadataUsageId; extern const uint32_t StencilMaterial_Add_m3901322229_MetadataUsageId; extern Il2CppClass* MatEntry_t2957107092_il2cpp_TypeInfo_var; extern Il2CppClass* Material_t340375123_il2cpp_TypeInfo_var; extern Il2CppClass* ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var; extern Il2CppClass* StencilOp_t3446174106_il2cpp_TypeInfo_var; extern Il2CppClass* CompareFunction_t2171731108_il2cpp_TypeInfo_var; extern Il2CppClass* ColorWriteMask_t4282245599_il2cpp_TypeInfo_var; extern Il2CppClass* Boolean_t97287965_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Item_m4066072586_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m2805001068_MethodInfo_var; extern const MethodInfo* List_1_Add_m873450360_MethodInfo_var; extern Il2CppCodeGenString* _stringLiteral2737864128; extern Il2CppCodeGenString* _stringLiteral1720664615; extern Il2CppCodeGenString* _stringLiteral3948229601; extern Il2CppCodeGenString* _stringLiteral1070534145; extern Il2CppCodeGenString* _stringLiteral4290488009; extern Il2CppCodeGenString* _stringLiteral2160052589; extern Il2CppCodeGenString* _stringLiteral2740099062; extern Il2CppCodeGenString* _stringLiteral3822943443; extern Il2CppCodeGenString* _stringLiteral1645601577; extern Il2CppCodeGenString* _stringLiteral2127068351; extern Il2CppCodeGenString* _stringLiteral198911440; extern Il2CppCodeGenString* _stringLiteral873708475; extern Il2CppCodeGenString* _stringLiteral4246182081; extern Il2CppCodeGenString* _stringLiteral468076268; extern Il2CppCodeGenString* _stringLiteral2207929026; extern Il2CppCodeGenString* _stringLiteral726441801; extern const uint32_t StencilMaterial_Add_m2195405072_MetadataUsageId; extern const MethodInfo* List_1_RemoveAt_m294572737_MethodInfo_var; extern const uint32_t StencilMaterial_Remove_m1301487727_MetadataUsageId; extern const MethodInfo* List_1_Clear_m434664315_MethodInfo_var; extern const uint32_t StencilMaterial_ClearAll_m3197262106_MetadataUsageId; extern Il2CppClass* List_1_t134214538_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m242441510_MethodInfo_var; extern const uint32_t StencilMaterial__cctor_m2003858807_MetadataUsageId; extern Il2CppClass* UIVertexU5BU5D_t1981460040_il2cpp_TypeInfo_var; extern const uint32_t Text__ctor_m1150387577_MetadataUsageId; extern Il2CppClass* TextGenerator_t3211863866_il2cpp_TypeInfo_var; extern const uint32_t Text_get_cachedTextGenerator_m2506989875_MetadataUsageId; extern const uint32_t Text_get_cachedTextGeneratorForLayout_m116487342_MetadataUsageId; extern const uint32_t Text_get_mainTexture_m3501892889_MetadataUsageId; extern const uint32_t Text_FontTextureChanged_m495427969_MetadataUsageId; extern Il2CppClass* FontUpdateTracker_t1839077620_il2cpp_TypeInfo_var; extern const uint32_t Text_set_font_m2192091651_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral757602046; extern const uint32_t Text_set_text_m3481657721_MetadataUsageId; extern const uint32_t Text_get_pixelsPerUnit_m4041777403_MetadataUsageId; extern const uint32_t Text_OnEnable_m616205807_MetadataUsageId; extern const uint32_t Text_OnDisable_m1806889406_MetadataUsageId; extern const uint32_t Text_UpdateGeometry_m3634850647_MetadataUsageId; extern const MethodInfo* Resources_GetBuiltinResource_TisFont_t1956802104_m2738776830_MethodInfo_var; extern Il2CppCodeGenString* _stringLiteral2974894664; extern const uint32_t Text_AssignDefaultFont_m3151310334_MetadataUsageId; extern Il2CppClass* TextGenerationSettings_t1351628751_il2cpp_TypeInfo_var; extern const uint32_t Text_GetGenerationSettings_m1390856115_MetadataUsageId; extern Il2CppClass* ICollection_1_t2590682543_il2cpp_TypeInfo_var; extern Il2CppClass* IList_1_t1577850092_il2cpp_TypeInfo_var; extern const uint32_t Text_OnPopulateMesh_m1525268284_MetadataUsageId; extern Il2CppClass* Text_t1901882714_il2cpp_TypeInfo_var; extern const uint32_t Text__cctor_m81191306_MetadataUsageId; extern Il2CppClass* ToggleEvent_t1873685584_il2cpp_TypeInfo_var; extern const uint32_t Toggle__ctor_m768708970_MetadataUsageId; extern const uint32_t Toggle_OnDidApplyAnimationProperties_m3540525118_MetadataUsageId; extern const uint32_t Toggle_SetToggleGroup_m1839040161_MetadataUsageId; extern const uint32_t Toggle_Set_m262975082_MetadataUsageId; extern const uint32_t Toggle_PlayEffect_m1836683914_MetadataUsageId; extern const uint32_t ToggleEvent__ctor_m834619998_MetadataUsageId; extern Il2CppClass* List_1_t4207451803_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m2588665925_MethodInfo_var; extern const uint32_t ToggleGroup__ctor_m3308114662_MetadataUsageId; extern Il2CppClass* ArgumentException_t132251570_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_Contains_m3066673312_MethodInfo_var; extern Il2CppCodeGenString* _stringLiteral503068089; extern const uint32_t ToggleGroup_ValidateToggleIsInGroup_m3201190739_MetadataUsageId; extern const MethodInfo* List_1_get_Item_m2702804483_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m3208757669_MethodInfo_var; extern const uint32_t ToggleGroup_NotifyToggleOn_m1290826648_MetadataUsageId; extern const MethodInfo* List_1_Remove_m3511411763_MethodInfo_var; extern const uint32_t ToggleGroup_UnregisterToggle_m2846655738_MetadataUsageId; extern const MethodInfo* List_1_Add_m2727533441_MethodInfo_var; extern const uint32_t ToggleGroup_RegisterToggle_m2988917171_MetadataUsageId; extern Il2CppClass* ToggleGroup_t123837990_il2cpp_TypeInfo_var; extern Il2CppClass* Predicate_1_t3560671185_il2cpp_TypeInfo_var; extern const MethodInfo* ToggleGroup_U3CAnyTogglesOnU3Em__0_m3170735810_MethodInfo_var; extern const MethodInfo* Predicate_1__ctor_m3952340036_MethodInfo_var; extern const MethodInfo* List_1_Find_m101937419_MethodInfo_var; extern const uint32_t ToggleGroup_AnyTogglesOn_m1117012929_MetadataUsageId; extern Il2CppClass* Func_2_t3446800538_il2cpp_TypeInfo_var; extern const MethodInfo* ToggleGroup_U3CActiveTogglesU3Em__1_m1947537119_MethodInfo_var; extern const MethodInfo* Func_2__ctor_m16758224_MethodInfo_var; extern const MethodInfo* Enumerable_Where_TisToggle_t2735377061_m3965946053_MethodInfo_var; extern const uint32_t ToggleGroup_ActiveToggles_m3179342002_MetadataUsageId; extern const uint32_t ToggleGroup_SetAllTogglesOff_m4184050071_MetadataUsageId; extern Il2CppClass* ListPool_1_t456935359_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3630090483_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3185818714_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t53650832_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3980534944_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m3176649063_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m2875520964_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m3176650548_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m3176656818_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m2031605680_MethodInfo_var; extern const uint32_t VertexHelper__ctor_m2987334858_MetadataUsageId; extern const MethodInfo* List_1_AddRange_m1173251377_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m3935442072_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m705206751_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m2686762046_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m3513848896_MethodInfo_var; extern const uint32_t VertexHelper__ctor_m2318594751_MetadataUsageId; extern const MethodInfo* List_1_Clear_m3097985365_MethodInfo_var; extern const MethodInfo* List_1_Clear_m3048681609_MethodInfo_var; extern const MethodInfo* List_1_Clear_m2188935509_MethodInfo_var; extern const MethodInfo* List_1_Clear_m4187652437_MethodInfo_var; extern const MethodInfo* List_1_Clear_m2917552199_MethodInfo_var; extern const uint32_t VertexHelper_Clear_m627349662_MetadataUsageId; extern const MethodInfo* List_1_get_Count_m576380744_MethodInfo_var; extern const uint32_t VertexHelper_get_currentVertCount_m124779331_MetadataUsageId; extern const MethodInfo* List_1_get_Count_m361000296_MethodInfo_var; extern const uint32_t VertexHelper_get_currentIndexCount_m2916736969_MetadataUsageId; extern const MethodInfo* List_1_get_Item_m200663048_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m3890325344_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1378751541_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m783205072_MethodInfo_var; extern const uint32_t VertexHelper_PopulateUIVertex_m3870699345_MetadataUsageId; extern const MethodInfo* List_1_set_Item_m658432263_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m4249175531_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m35836043_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m1118509050_MethodInfo_var; extern const uint32_t VertexHelper_SetUIVertex_m3094993826_MetadataUsageId; extern Il2CppCodeGenString* _stringLiteral1503155443; extern const uint32_t VertexHelper_FillMesh_m1654068917_MetadataUsageId; extern const MethodInfo* ListPool_1_Release_m4113115349_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m2857821093_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m591299672_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m1363449253_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m188599205_MethodInfo_var; extern const uint32_t VertexHelper_Dispose_m1187645830_MetadataUsageId; extern const MethodInfo* List_1_Add_m4259514621_MethodInfo_var; extern const MethodInfo* List_1_Add_m3372602044_MethodInfo_var; extern const MethodInfo* List_1_Add_m4259515774_MethodInfo_var; extern const MethodInfo* List_1_Add_m4259509372_MethodInfo_var; extern const uint32_t VertexHelper_AddVert_m189858127_MetadataUsageId; extern Il2CppClass* VertexHelper_t2453304189_il2cpp_TypeInfo_var; extern const uint32_t VertexHelper_AddVert_m3837581305_MetadataUsageId; extern const MethodInfo* List_1_Add_m4025721294_MethodInfo_var; extern const uint32_t VertexHelper_AddTriangle_m3677720024_MetadataUsageId; extern const uint32_t VertexHelper_AddUIVertexStream_m1733605881_MetadataUsageId; extern const uint32_t VertexHelper__cctor_m2017593797_MetadataUsageId; // UnityEngine.Vector3[] struct Vector3U5BU5D_t1718750761 : public Il2CppArray { public: ALIGN_FIELD (8) Vector3_t3722313464 m_Items[1]; public: inline Vector3_t3722313464 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Vector3_t3722313464 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Vector3_t3722313464 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Vector3_t3722313464 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Vector3_t3722313464 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Vector3_t3722313464 value) { m_Items[index] = value; } }; // System.Type[] struct TypeU5BU5D_t3940880105 : public Il2CppArray { public: ALIGN_FIELD (8) Type_t * m_Items[1]; public: inline Type_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Type_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Type_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Type_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Type_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Type_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // UnityEngine.RaycastHit2D[] struct RaycastHit2DU5BU5D_t4286651560 : public Il2CppArray { public: ALIGN_FIELD (8) RaycastHit2D_t2279581989 m_Items[1]; public: inline RaycastHit2D_t2279581989 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline RaycastHit2D_t2279581989 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, RaycastHit2D_t2279581989 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline RaycastHit2D_t2279581989 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline RaycastHit2D_t2279581989 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, RaycastHit2D_t2279581989 value) { m_Items[index] = value; } }; // UnityEngine.RaycastHit[] struct RaycastHitU5BU5D_t1690781147 : public Il2CppArray { public: ALIGN_FIELD (8) RaycastHit_t1056001966 m_Items[1]; public: inline RaycastHit_t1056001966 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline RaycastHit_t1056001966 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, RaycastHit_t1056001966 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline RaycastHit_t1056001966 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline RaycastHit_t1056001966 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, RaycastHit_t1056001966 value) { m_Items[index] = value; } }; // System.Object[] struct ObjectU5BU5D_t2843939325 : public Il2CppArray { public: ALIGN_FIELD (8) Il2CppObject * m_Items[1]; public: inline Il2CppObject * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Il2CppObject ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Il2CppObject * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Il2CppObject * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Il2CppObject ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Il2CppObject * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // UnityEngine.UIVertex[] struct UIVertexU5BU5D_t1981460040 : public Il2CppArray { public: ALIGN_FIELD (8) UIVertex_t4057497605 m_Items[1]; public: inline UIVertex_t4057497605 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline UIVertex_t4057497605 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, UIVertex_t4057497605 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline UIVertex_t4057497605 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline UIVertex_t4057497605 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, UIVertex_t4057497605 value) { m_Items[index] = value; } }; // UnityEngine.Color32[] struct Color32U5BU5D_t3850468773 : public Il2CppArray { public: ALIGN_FIELD (8) Color32_t2600501292 m_Items[1]; public: inline Color32_t2600501292 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Color32_t2600501292 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Color32_t2600501292 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Color32_t2600501292 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Color32_t2600501292 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Color32_t2600501292 value) { m_Items[index] = value; } }; // UnityEngine.Vector2[] struct Vector2U5BU5D_t1457185986 : public Il2CppArray { public: ALIGN_FIELD (8) Vector2_t2156229523 m_Items[1]; public: inline Vector2_t2156229523 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Vector2_t2156229523 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Vector2_t2156229523 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Vector2_t2156229523 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Vector2_t2156229523 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Vector2_t2156229523 value) { m_Items[index] = value; } }; // UnityEngine.Vector4[] struct Vector4U5BU5D_t934056436 : public Il2CppArray { public: ALIGN_FIELD (8) Vector4_t3319028937 m_Items[1]; public: inline Vector4_t3319028937 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Vector4_t3319028937 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Vector4_t3319028937 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Vector4_t3319028937 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Vector4_t3319028937 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Vector4_t3319028937 value) { m_Items[index] = value; } }; // System.Int32[] struct Int32U5BU5D_t385246372 : public Il2CppArray { public: ALIGN_FIELD (8) int32_t m_Items[1]; public: inline int32_t GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline int32_t* GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, int32_t value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline int32_t GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline int32_t* GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, int32_t value) { m_Items[index] = value; } }; // System.Void System.Func`2<System.Object,System.Single>::.ctor(System.Object,System.IntPtr) extern "C" void Func_2__ctor_m1150804732_gshared (Func_2_t764290984 * __this, Il2CppObject * p0, IntPtr_t p1, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<System.Object>::Get() extern "C" List_1_t257213610 * ListPool_1_Get_m1670010485_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // !0 System.Collections.Generic.List`1<System.Object>::get_Item(System.Int32) extern "C" Il2CppObject * List_1_get_Item_m2287542950_gshared (List_1_t257213610 * __this, int32_t p0, const MethodInfo* method); // !1 System.Func`2<System.Object,System.Single>::Invoke(!0) extern "C" float Func_2_Invoke_m3516477887_gshared (Func_2_t764290984 * __this, Il2CppObject * p0, const MethodInfo* method); // System.Int32 System.Collections.Generic.List`1<System.Object>::get_Count() extern "C" int32_t List_1_get_Count_m2934127733_gshared (List_1_t257213610 * __this, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<System.Object>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m957266927_gshared (Il2CppObject * __this /* static, unused */, List_1_t257213610 * p0, const MethodInfo* method); // !!0 UnityEngine.Component::GetComponent<System.Object>() extern "C" Il2CppObject * Component_GetComponent_TisIl2CppObject_m2735705429_gshared (Component_t1923634451 * __this, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<System.Boolean>::Invoke(!0) extern "C" void UnityEvent_1_Invoke_m933614109_gshared (UnityEvent_1_t978947469 * __this, bool p0, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<System.Boolean>::.ctor() extern "C" void UnityEvent_1__ctor_m3777630589_gshared (UnityEvent_1_t978947469 * __this, const MethodInfo* method); // System.Void UnityEngine.Component::GetComponentsInChildren<System.Object>(System.Collections.Generic.List`1<!!0>) extern "C" void Component_GetComponentsInChildren_TisIl2CppObject_m35549932_gshared (Component_t1923634451 * __this, List_1_t257213610 * p0, const MethodInfo* method); // System.Void UnityEngine.Component::GetComponentsInParent<System.Object>(System.Boolean,System.Collections.Generic.List`1<!!0>) extern "C" void Component_GetComponentsInParent_TisIl2CppObject_m3603136339_gshared (Component_t1923634451 * __this, bool p0, List_1_t257213610 * p1, const MethodInfo* method); // System.Void UnityEngine.Component::GetComponents<System.Object>(System.Collections.Generic.List`1<!!0>) extern "C" void Component_GetComponents_TisIl2CppObject_m2416546752_gshared (Component_t1923634451 * __this, List_1_t257213610 * p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Object>::Clear() extern "C" void List_1_Clear_m3697625829_gshared (List_1_t257213610 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Object>::Add(!0) extern "C" void List_1_Add_m3338814081_gshared (List_1_t257213610 * __this, Il2CppObject * p0, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.UIVertex>::Get() extern "C" List_1_t1234605051 * ListPool_1_Get_m738675669_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // System.Int32 System.Collections.Generic.List`1<UnityEngine.UIVertex>::get_Count() extern "C" int32_t List_1_get_Count_m401353472_gshared (List_1_t1234605051 * __this, const MethodInfo* method); // System.Int32 System.Collections.Generic.List`1<UnityEngine.UIVertex>::get_Capacity() extern "C" int32_t List_1_get_Capacity_m3666274724_gshared (List_1_t1234605051 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::set_Capacity(System.Int32) extern "C" void List_1_set_Capacity_m2777925136_gshared (List_1_t1234605051 * __this, int32_t p0, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<UnityEngine.UIVertex>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m1246825787_gshared (Il2CppObject * __this /* static, unused */, List_1_t1234605051 * p0, const MethodInfo* method); // System.Void System.Collections.Generic.HashSet`1<System.Object>::.ctor() extern "C" void HashSet_1__ctor_m4231804131_gshared (HashSet_1_t1645055638 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Object>::.ctor() extern "C" void List_1__ctor_m2321703786_gshared (List_1_t257213610 * __this, const MethodInfo* method); // System.Void UnityEngine.GameObject::GetComponentsInParent<System.Object>(System.Boolean,System.Collections.Generic.List`1<!!0>) extern "C" void GameObject_GetComponentsInParent_TisIl2CppObject_m947018401_gshared (GameObject_t1113636619 * __this, bool p0, List_1_t257213610 * p1, const MethodInfo* method); // System.Void System.Collections.Generic.HashSet`1<System.Object>::Clear() extern "C" void HashSet_1_Clear_m507835370_gshared (HashSet_1_t1645055638 * __this, const MethodInfo* method); // System.Collections.Generic.HashSet`1/Enumerator<!0> System.Collections.Generic.HashSet`1<System.Object>::GetEnumerator() extern "C" Enumerator_t3350232909 HashSet_1_GetEnumerator_m3346268098_gshared (HashSet_1_t1645055638 * __this, const MethodInfo* method); // !0 System.Collections.Generic.HashSet`1/Enumerator<System.Object>::get_Current() extern "C" Il2CppObject * Enumerator_get_Current_m4213278602_gshared (Enumerator_t3350232909 * __this, const MethodInfo* method); // System.Boolean System.Collections.Generic.HashSet`1/Enumerator<System.Object>::MoveNext() extern "C" bool Enumerator_MoveNext_m3714175425_gshared (Enumerator_t3350232909 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.HashSet`1/Enumerator<System.Object>::Dispose() extern "C" void Enumerator_Dispose_m1204547613_gshared (Enumerator_t3350232909 * __this, const MethodInfo* method); // System.Boolean System.Collections.Generic.HashSet`1<System.Object>::Contains(!0) extern "C" bool HashSet_1_Contains_m3173358704_gshared (HashSet_1_t1645055638 * __this, Il2CppObject * p0, const MethodInfo* method); // System.Boolean System.Collections.Generic.HashSet`1<System.Object>::Add(!0) extern "C" bool HashSet_1_Add_m1971460364_gshared (HashSet_1_t1645055638 * __this, Il2CppObject * p0, const MethodInfo* method); // System.Boolean System.Collections.Generic.HashSet`1<System.Object>::Remove(!0) extern "C" bool HashSet_1_Remove_m709044238_gshared (HashSet_1_t1645055638 * __this, Il2CppObject * p0, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<System.Object>(T&,T) extern "C" bool SetPropertyUtility_SetClass_TisIl2CppObject_m1505455193_gshared (Il2CppObject * __this /* static, unused */, Il2CppObject ** ___currentValue0, Il2CppObject * ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Scrollbar/Direction>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisDirection_t3470714353_m1506329685_gshared (Il2CppObject * __this /* static, unused */, int32_t* ___currentValue0, int32_t ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Single>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785_gshared (Il2CppObject * __this /* static, unused */, float* ___currentValue0, float ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Int32>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisInt32_t2950945753_m1101767463_gshared (Il2CppObject * __this /* static, unused */, int32_t* ___currentValue0, int32_t ___newValue1, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::Invoke(!0) extern "C" void UnityEvent_1_Invoke_m3400677460_gshared (UnityEvent_1_t2278926278 * __this, float p0, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::.ctor() extern "C" void UnityEvent_1__ctor_m2218582587_gshared (UnityEvent_1_t2278926278 * __this, const MethodInfo* method); // System.Void UnityEngine.Events.UnityAction`1<System.Single>::.ctor(System.Object,System.IntPtr) extern "C" void UnityAction_1__ctor_m336053009_gshared (UnityAction_1_t1982102915 * __this, Il2CppObject * p0, IntPtr_t p1, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::RemoveListener(UnityEngine.Events.UnityAction`1<!0>) extern "C" void UnityEvent_1_RemoveListener_m4190968495_gshared (UnityEvent_1_t2278926278 * __this, UnityAction_1_t1982102915 * p0, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::AddListener(UnityEngine.Events.UnityAction`1<!0>) extern "C" void UnityEvent_1_AddListener_m3008008915_gshared (UnityEvent_1_t2278926278 * __this, UnityAction_1_t1982102915 * p0, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<UnityEngine.Vector2>::Invoke(!0) extern "C" void UnityEvent_1_Invoke_m3432495026_gshared (UnityEvent_1_t3037889027 * __this, Vector2_t2156229523 p0, const MethodInfo* method); // System.Void UnityEngine.Events.UnityEvent`1<UnityEngine.Vector2>::.ctor() extern "C" void UnityEvent_1__ctor_m3675246889_gshared (UnityEvent_1_t3037889027 * __this, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Navigation>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisNavigation_t3049316579_m1469939781_gshared (Il2CppObject * __this /* static, unused */, Navigation_t3049316579 * ___currentValue0, Navigation_t3049316579 ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Selectable/Transition>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisTransition_t1769908631_m4087672457_gshared (Il2CppObject * __this /* static, unused */, int32_t* ___currentValue0, int32_t ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.ColorBlock>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisColorBlock_t2139031574_m1748367426_gshared (Il2CppObject * __this /* static, unused */, ColorBlock_t2139031574 * ___currentValue0, ColorBlock_t2139031574 ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.SpriteState>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisSpriteState_t1362986479_m665096788_gshared (Il2CppObject * __this /* static, unused */, SpriteState_t1362986479 * ___currentValue0, SpriteState_t1362986479 ___newValue1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Boolean>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708_gshared (Il2CppObject * __this /* static, unused */, bool* ___currentValue0, bool ___newValue1, const MethodInfo* method); // System.Boolean System.Collections.Generic.List`1<System.Object>::Remove(!0) extern "C" bool List_1_Remove_m1416767016_gshared (List_1_t257213610 * __this, Il2CppObject * p0, const MethodInfo* method); // !0 System.Collections.Generic.List`1<UnityEngine.UIVertex>::get_Item(System.Int32) extern "C" UIVertex_t4057497605 List_1_get_Item_m457221236_gshared (List_1_t1234605051 * __this, int32_t p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::Add(!0) extern "C" void List_1_Add_m2586421604_gshared (List_1_t1234605051 * __this, UIVertex_t4057497605 p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::set_Item(System.Int32,!0) extern "C" void List_1_set_Item_m2057272351_gshared (List_1_t1234605051 * __this, int32_t p0, UIVertex_t4057497605 p1, const MethodInfo* method); // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Slider/Direction>(T&,T) extern "C" bool SetPropertyUtility_SetStruct_TisDirection_t337909235_m916002679_gshared (Il2CppObject * __this /* static, unused */, int32_t* ___currentValue0, int32_t ___newValue1, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Object>::RemoveAt(System.Int32) extern "C" void List_1_RemoveAt_m2730968292_gshared (List_1_t257213610 * __this, int32_t p0, const MethodInfo* method); // !!0 UnityEngine.Resources::GetBuiltinResource<System.Object>(System.String) extern "C" Il2CppObject * Resources_GetBuiltinResource_TisIl2CppObject_m3352626831_gshared (Il2CppObject * __this /* static, unused */, String_t* p0, const MethodInfo* method); // System.Boolean System.Collections.Generic.List`1<System.Object>::Contains(!0) extern "C" bool List_1_Contains_m2654125393_gshared (List_1_t257213610 * __this, Il2CppObject * p0, const MethodInfo* method); // System.Void System.Predicate`1<System.Object>::.ctor(System.Object,System.IntPtr) extern "C" void Predicate_1__ctor_m327447107_gshared (Predicate_1_t3905400288 * __this, Il2CppObject * p0, IntPtr_t p1, const MethodInfo* method); // !0 System.Collections.Generic.List`1<System.Object>::Find(System.Predicate`1<!0>) extern "C" Il2CppObject * List_1_Find_m2048854920_gshared (List_1_t257213610 * __this, Predicate_1_t3905400288 * p0, const MethodInfo* method); // System.Void System.Func`2<System.Object,System.Boolean>::.ctor(System.Object,System.IntPtr) extern "C" void Func_2__ctor_m3104565095_gshared (Func_2_t3759279471 * __this, Il2CppObject * p0, IntPtr_t p1, const MethodInfo* method); // System.Collections.Generic.IEnumerable`1<!!0> System.Linq.Enumerable::Where<System.Object>(System.Collections.Generic.IEnumerable`1<!!0>,System.Func`2<!!0,System.Boolean>) extern "C" Il2CppObject* Enumerable_Where_TisIl2CppObject_m2166527282_gshared (Il2CppObject * __this /* static, unused */, Il2CppObject* p0, Func_2_t3759279471 * p1, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Vector3>::Get() extern "C" List_1_t899420910 * ListPool_1_Get_m3176649063_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Color32>::Get() extern "C" List_1_t4072576034 * ListPool_1_Get_m2875520964_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Vector2>::Get() extern "C" List_1_t3628304265 * ListPool_1_Get_m3176650548_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Vector4>::Get() extern "C" List_1_t496136383 * ListPool_1_Get_m3176656818_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<System.Int32>::Get() extern "C" List_1_t128053199 * ListPool_1_Get_m2031605680_gshared (Il2CppObject * __this /* static, unused */, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) extern "C" void List_1_AddRange_m1173251377_gshared (List_1_t899420910 * __this, Il2CppObject* p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) extern "C" void List_1_AddRange_m3935442072_gshared (List_1_t4072576034 * __this, Il2CppObject* p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) extern "C" void List_1_AddRange_m705206751_gshared (List_1_t3628304265 * __this, Il2CppObject* p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) extern "C" void List_1_AddRange_m2686762046_gshared (List_1_t496136383 * __this, Il2CppObject* p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Int32>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) extern "C" void List_1_AddRange_m3513848896_gshared (List_1_t128053199 * __this, Il2CppObject* p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::Clear() extern "C" void List_1_Clear_m3097985365_gshared (List_1_t899420910 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::Clear() extern "C" void List_1_Clear_m3048681609_gshared (List_1_t4072576034 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::Clear() extern "C" void List_1_Clear_m2188935509_gshared (List_1_t3628304265 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::Clear() extern "C" void List_1_Clear_m4187652437_gshared (List_1_t496136383 * __this, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Int32>::Clear() extern "C" void List_1_Clear_m2917552199_gshared (List_1_t128053199 * __this, const MethodInfo* method); // System.Int32 System.Collections.Generic.List`1<UnityEngine.Vector3>::get_Count() extern "C" int32_t List_1_get_Count_m576380744_gshared (List_1_t899420910 * __this, const MethodInfo* method); // System.Int32 System.Collections.Generic.List`1<System.Int32>::get_Count() extern "C" int32_t List_1_get_Count_m361000296_gshared (List_1_t128053199 * __this, const MethodInfo* method); // !0 System.Collections.Generic.List`1<UnityEngine.Vector3>::get_Item(System.Int32) extern "C" Vector3_t3722313464 List_1_get_Item_m200663048_gshared (List_1_t899420910 * __this, int32_t p0, const MethodInfo* method); // !0 System.Collections.Generic.List`1<UnityEngine.Color32>::get_Item(System.Int32) extern "C" Color32_t2600501292 List_1_get_Item_m3890325344_gshared (List_1_t4072576034 * __this, int32_t p0, const MethodInfo* method); // !0 System.Collections.Generic.List`1<UnityEngine.Vector2>::get_Item(System.Int32) extern "C" Vector2_t2156229523 List_1_get_Item_m1378751541_gshared (List_1_t3628304265 * __this, int32_t p0, const MethodInfo* method); // !0 System.Collections.Generic.List`1<UnityEngine.Vector4>::get_Item(System.Int32) extern "C" Vector4_t3319028937 List_1_get_Item_m783205072_gshared (List_1_t496136383 * __this, int32_t p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::set_Item(System.Int32,!0) extern "C" void List_1_set_Item_m658432263_gshared (List_1_t899420910 * __this, int32_t p0, Vector3_t3722313464 p1, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::set_Item(System.Int32,!0) extern "C" void List_1_set_Item_m4249175531_gshared (List_1_t4072576034 * __this, int32_t p0, Color32_t2600501292 p1, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::set_Item(System.Int32,!0) extern "C" void List_1_set_Item_m35836043_gshared (List_1_t3628304265 * __this, int32_t p0, Vector2_t2156229523 p1, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::set_Item(System.Int32,!0) extern "C" void List_1_set_Item_m1118509050_gshared (List_1_t496136383 * __this, int32_t p0, Vector4_t3319028937 p1, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Vector3>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m4113115349_gshared (Il2CppObject * __this /* static, unused */, List_1_t899420910 * p0, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Color32>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m2857821093_gshared (Il2CppObject * __this /* static, unused */, List_1_t4072576034 * p0, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Vector2>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m591299672_gshared (Il2CppObject * __this /* static, unused */, List_1_t3628304265 * p0, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Vector4>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m1363449253_gshared (Il2CppObject * __this /* static, unused */, List_1_t496136383 * p0, const MethodInfo* method); // System.Void UnityEngine.UI.ListPool`1<System.Int32>::Release(System.Collections.Generic.List`1<T>) extern "C" void ListPool_1_Release_m188599205_gshared (Il2CppObject * __this /* static, unused */, List_1_t128053199 * p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::Add(!0) extern "C" void List_1_Add_m4259514621_gshared (List_1_t899420910 * __this, Vector3_t3722313464 p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::Add(!0) extern "C" void List_1_Add_m3372602044_gshared (List_1_t4072576034 * __this, Color32_t2600501292 p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::Add(!0) extern "C" void List_1_Add_m4259515774_gshared (List_1_t3628304265 * __this, Vector2_t2156229523 p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::Add(!0) extern "C" void List_1_Add_m4259509372_gshared (List_1_t496136383 * __this, Vector4_t3319028937 p0, const MethodInfo* method); // System.Void System.Collections.Generic.List`1<System.Int32>::Add(!0) extern "C" void List_1_Add_m4025721294_gshared (List_1_t128053199 * __this, int32_t p0, const MethodInfo* method); // System.Single UnityEngine.UI.LayoutUtility::GetMinWidth(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetMinWidth_m3612214871 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.LayoutUtility::GetMinHeight(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetMinHeight_m4082139234 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.LayoutUtility::GetPreferredWidth(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetPreferredWidth_m3678713536 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.LayoutUtility::GetPreferredHeight(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetPreferredHeight_m954532477 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.LayoutUtility::GetFlexibleWidth(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetFlexibleWidth_m22831835 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.LayoutUtility::GetFlexibleHeight(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetFlexibleHeight_m84018936 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Func`2<UnityEngine.UI.ILayoutElement,System.Single>::.ctor(System.Object,System.IntPtr) #define Func_2__ctor_m4101054726(__this, p0, p1, method) (( void (*) (Func_2_t235587086 *, Il2CppObject *, IntPtr_t, const MethodInfo*))Func_2__ctor_m1150804732_gshared)(__this, p0, p1, method) // System.Single UnityEngine.UI.LayoutUtility::GetLayoutProperty(UnityEngine.RectTransform,System.Func`2<UnityEngine.UI.ILayoutElement,System.Single>,System.Single) extern "C" float LayoutUtility_GetLayoutProperty_m3731360667 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, Func_2_t235587086 * ___property1, float ___defaultValue2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Mathf::Max(System.Single,System.Single) extern "C" float Mathf_Max_m571965535 (Il2CppObject * __this /* static, unused */, float p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.LayoutUtility::GetLayoutProperty(UnityEngine.RectTransform,System.Func`2<UnityEngine.UI.ILayoutElement,System.Single>,System.Single,UnityEngine.UI.ILayoutElement&) extern "C" float LayoutUtility_GetLayoutProperty_m714717302 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, Func_2_t235587086 * ___property1, float ___defaultValue2, Il2CppObject ** ___source3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Object::op_Equality(UnityEngine.Object,UnityEngine.Object) extern "C" bool Object_op_Equality_m1454075600 (Il2CppObject * __this /* static, unused */, Object_t631007953 * p0, Object_t631007953 * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Component>::Get() #define ListPool_1_Get_m2062177143(__this /* static, unused */, method) (( List_1_t3395709193 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m1670010485_gshared)(__this /* static, unused */, method) // System.Type System.Type::GetTypeFromHandle(System.RuntimeTypeHandle) extern "C" Type_t * Type_GetTypeFromHandle_m1620074514 (Il2CppObject * __this /* static, unused */, RuntimeTypeHandle_t3027515415 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Component::GetComponents(System.Type,System.Collections.Generic.List`1<UnityEngine.Component>) extern "C" void Component_GetComponents_m4024149016 (Component_t1923634451 * __this, Type_t * p0, List_1_t3395709193 * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !0 System.Collections.Generic.List`1<UnityEngine.Component>::get_Item(System.Int32) #define List_1_get_Item_m3306164819(__this, p0, method) (( Component_t1923634451 * (*) (List_1_t3395709193 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Boolean UnityEngine.Behaviour::get_isActiveAndEnabled() extern "C" bool Behaviour_get_isActiveAndEnabled_m3013577336 (Behaviour_t1437897464 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !1 System.Func`2<UnityEngine.UI.ILayoutElement,System.Single>::Invoke(!0) #define Func_2_Invoke_m488571475(__this, p0, method) (( float (*) (Func_2_t235587086 *, Il2CppObject *, const MethodInfo*))Func_2_Invoke_m3516477887_gshared)(__this, p0, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.Component>::get_Count() #define List_1_get_Count_m1294235957(__this, method) (( int32_t (*) (List_1_t3395709193 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Component>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m3920209327(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t3395709193 *, const MethodInfo*))ListPool_1_Release_m957266927_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.EventSystems.UIBehaviour::.ctor() extern "C" void UIBehaviour__ctor_m4230637738 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Component::GetComponent<UnityEngine.RectTransform>() #define Component_GetComponent_TisRectTransform_t3704657025_m989540290(__this, method) (( RectTransform_t3704657025 * (*) (Component_t1923634451 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m2735705429_gshared)(__this, method) // UnityEngine.UI.Graphic UnityEngine.UI.Mask::get_graphic() extern "C" Graphic_t1660335611 * Mask_get_graphic_m2572620787 (Mask_t1803652131 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Object::op_Inequality(UnityEngine.Object,UnityEngine.Object) extern "C" bool Object_op_Inequality_m1920811489 (Il2CppObject * __this /* static, unused */, Object_t631007953 * p0, Object_t631007953 * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Graphic>() #define Component_GetComponent_TisGraphic_t1660335611_m1118939870(__this, method) (( Graphic_t1660335611 * (*) (Component_t1923634451 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m2735705429_gshared)(__this, method) // System.Void UnityEngine.EventSystems.UIBehaviour::OnEnable() extern "C" void UIBehaviour_OnEnable_m189051288 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.CanvasRenderer UnityEngine.UI.Graphic::get_canvasRenderer() extern "C" CanvasRenderer_t2598313366 * Graphic_get_canvasRenderer_m315509948 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::set_hasPopInstruction(System.Boolean) extern "C" void CanvasRenderer_set_hasPopInstruction_m4160815714 (CanvasRenderer_t2598313366 * __this, bool p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskUtilities::NotifyStencilStateChanged(UnityEngine.Component) extern "C" void MaskUtilities_NotifyStencilStateChanged_m3969722420 (Il2CppObject * __this /* static, unused */, Component_t1923634451 * ___mask0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.EventSystems.UIBehaviour::OnDisable() extern "C" void UIBehaviour_OnDisable_m1784507360 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::set_popMaterialCount(System.Int32) extern "C" void CanvasRenderer_set_popMaterialCount_m3278092344 (CanvasRenderer_t2598313366 * __this, int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.StencilMaterial::Remove(UnityEngine.Material) extern "C" void StencilMaterial_Remove_m1301487727 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___customMat0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RectTransform UnityEngine.UI.Mask::get_rectTransform() extern "C" RectTransform_t3704657025 * Mask_get_rectTransform_m440704215 (Mask_t1803652131 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.RectTransformUtility::RectangleContainsScreenPoint(UnityEngine.RectTransform,UnityEngine.Vector2,UnityEngine.Camera) extern "C" bool RectTransformUtility_RectangleContainsScreenPoint_m1731210517 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * p0, Vector2_t2156229523 p1, Camera_t4157153871 * p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Transform UnityEngine.Component::get_transform() extern "C" Transform_t3600365921 * Component_get_transform_m2921103810 (Component_t1923634451 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Transform UnityEngine.UI.MaskUtilities::FindRootSortOverrideCanvas(UnityEngine.Transform) extern "C" Transform_t3600365921 * MaskUtilities_FindRootSortOverrideCanvas_m1053047732 (Il2CppObject * __this /* static, unused */, Transform_t3600365921 * ___start0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.UI.MaskUtilities::GetStencilDepth(UnityEngine.Transform,UnityEngine.Transform) extern "C" int32_t MaskUtilities_GetStencilDepth_m402474137 (Il2CppObject * __this /* static, unused */, Transform_t3600365921 * ___transform0, Transform_t3600365921 * ___stopAfter1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.GameObject UnityEngine.Component::get_gameObject() extern "C" GameObject_t1113636619 * Component_get_gameObject_m2648350745 (Component_t1923634451 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Debug::LogError(System.Object,UnityEngine.Object) extern "C" void Debug_LogError_m3356949141 (Il2CppObject * __this /* static, unused */, Il2CppObject * p0, Object_t631007953 * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32,UnityEngine.Rendering.StencilOp,UnityEngine.Rendering.CompareFunction,UnityEngine.Rendering.ColorWriteMask) extern "C" Material_t340375123 * StencilMaterial_Add_m3901322229 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___baseMat0, int32_t ___stencilID1, int32_t ___operation2, int32_t ___compareFunction3, int32_t ___colorWriteMask4, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::SetPopMaterial(UnityEngine.Material,System.Int32) extern "C" void CanvasRenderer_SetPopMaterial_m2102730815 (CanvasRenderer_t2598313366 * __this, Material_t340375123 * p0, int32_t p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32,UnityEngine.Rendering.StencilOp,UnityEngine.Rendering.CompareFunction,UnityEngine.Rendering.ColorWriteMask,System.Int32,System.Int32) extern "C" Material_t340375123 * StencilMaterial_Add_m2195405072 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___baseMat0, int32_t ___stencilID1, int32_t ___operation2, int32_t ___compareFunction3, int32_t ___colorWriteMask4, int32_t ___readMask5, int32_t ___writeMask6, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskableGraphic/CullStateChangedEvent::.ctor() extern "C" void CullStateChangedEvent__ctor_m4089558259 (CullStateChangedEvent_t3661388177 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::.ctor() extern "C" void Graphic__ctor_m2983567630 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.MaskableGraphic::get_maskable() extern "C" bool MaskableGraphic_get_maskable_m1260382606 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Mask>() #define Component_GetComponent_TisMask_t1803652131_m643495272(__this, method) (( Mask_t1803652131 * (*) (Component_t1923634451 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m2735705429_gshared)(__this, method) // UnityEngine.Rect UnityEngine.UI.MaskableGraphic::get_rootCanvasRect() extern "C" Rect_t2360479859 MaskableGraphic_get_rootCanvasRect_m3492154629 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Rect::Overlaps(UnityEngine.Rect,System.Boolean) extern "C" bool Rect_Overlaps_m6060363 (Rect_t2360479859 * __this, Rect_t2360479859 p0, bool p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskableGraphic::UpdateCull(System.Boolean) extern "C" void MaskableGraphic_UpdateCull_m2805101913 (MaskableGraphic_t3839221559 * __this, bool ___cull0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.CanvasRenderer::get_cull() extern "C" bool CanvasRenderer_get_cull_m2277997101 (CanvasRenderer_t2598313366 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::set_cull(System.Boolean) extern "C" void CanvasRenderer_set_cull_m2086579420 (CanvasRenderer_t2598313366 * __this, bool p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityEvent`1<System.Boolean>::Invoke(!0) #define UnityEvent_1_Invoke_m933614109(__this, p0, method) (( void (*) (UnityEvent_1_t978947469 *, bool, const MethodInfo*))UnityEvent_1_Invoke_m933614109_gshared)(__this, p0, method) // System.Void UnityEngine.CanvasRenderer::EnableRectClipping(UnityEngine.Rect) extern "C" void CanvasRenderer_EnableRectClipping_m2541364234 (CanvasRenderer_t2598313366 * __this, Rect_t2360479859 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::DisableRectClipping() extern "C" void CanvasRenderer_DisableRectClipping_m4197748798 (CanvasRenderer_t2598313366 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::OnEnable() extern "C" void Graphic_OnEnable_m3893553015 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskableGraphic::UpdateClipParent() extern "C" void MaskableGraphic_UpdateClipParent_m2605828397 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::OnDisable() extern "C" void Graphic_OnDisable_m1097930217 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::OnTransformParentChanged() extern "C" void Graphic_OnTransformParentChanged_m3266023844 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::OnCanvasHierarchyChanged() extern "C" void Graphic_OnCanvasHierarchyChanged_m3895011287 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RectTransform UnityEngine.UI.Graphic::get_rectTransform() extern "C" RectTransform_t3704657025 * Graphic_get_rectTransform_m1167152468 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransform::GetWorldCorners(UnityEngine.Vector3[]) extern "C" void RectTransform_GetWorldCorners_m2125351209 (RectTransform_t3704657025 * __this, Vector3U5BU5D_t1718750761* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Canvas UnityEngine.UI.Graphic::get_canvas() extern "C" Canvas_t3310196443 * Graphic_get_canvas_m3320066409 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Object::op_Implicit(UnityEngine.Object) extern "C" bool Object_op_Implicit_m487959476 (Il2CppObject * __this /* static, unused */, Object_t631007953 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Canvas UnityEngine.Canvas::get_rootCanvas() extern "C" Canvas_t3310196443 * Canvas_get_rootCanvas_m753521845 (Canvas_t3310196443 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Transform::InverseTransformPoint(UnityEngine.Vector3) extern "C" Vector3_t3722313464 Transform_InverseTransformPoint_m1254110475 (Transform_t3600365921 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Rect::.ctor(System.Single,System.Single,System.Single,System.Single) extern "C" void Rect__ctor_m2635848439 (Rect_t2360479859 * __this, float p0, float p1, float p2, float p3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.RectMask2D UnityEngine.UI.MaskUtilities::GetRectMaskForClippable(UnityEngine.UI.IClippable) extern "C" RectMask2D_t3474889437 * MaskUtilities_GetRectMaskForClippable_m2464520669 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___clippable0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.RectMask2D::RemoveClippable(UnityEngine.UI.IClippable) extern "C" void RectMask2D_RemoveClippable_m773604960 (RectMask2D_t3474889437 * __this, Il2CppObject * ___clippable0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.RectMask2D::AddClippable(UnityEngine.UI.IClippable) extern "C" void RectMask2D_AddClippable_m373784024 (RectMask2D_t3474889437 * __this, Il2CppObject * ___clippable0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityEvent`1<System.Boolean>::.ctor() #define UnityEvent_1__ctor_m3777630589(__this, method) (( void (*) (UnityEvent_1_t978947469 *, const MethodInfo*))UnityEvent_1__ctor_m3777630589_gshared)(__this, method) // System.Void System.Object::.ctor() extern "C" void Object__ctor_m297566312 (Il2CppObject * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Component::GetComponentsInChildren<UnityEngine.Component>(System.Collections.Generic.List`1<!!0>) #define Component_GetComponentsInChildren_TisComponent_t1923634451_m1156099783(__this, p0, method) (( void (*) (Component_t1923634451 *, List_1_t3395709193 *, const MethodInfo*))Component_GetComponentsInChildren_TisIl2CppObject_m35549932_gshared)(__this, p0, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Canvas>::Get() #define ListPool_1_Get_m3146528893(__this /* static, unused */, method) (( List_1_t487303889 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m1670010485_gshared)(__this /* static, unused */, method) // System.Void UnityEngine.Component::GetComponentsInParent<UnityEngine.Canvas>(System.Boolean,System.Collections.Generic.List`1<!!0>) #define Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774(__this, p0, p1, method) (( void (*) (Component_t1923634451 *, bool, List_1_t487303889 *, const MethodInfo*))Component_GetComponentsInParent_TisIl2CppObject_m3603136339_gshared)(__this, p0, p1, method) // !0 System.Collections.Generic.List`1<UnityEngine.Canvas>::get_Item(System.Int32) #define List_1_get_Item_m1187285853(__this, p0, method) (( Canvas_t3310196443 * (*) (List_1_t487303889 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Boolean UnityEngine.Canvas::get_overrideSorting() extern "C" bool Canvas_get_overrideSorting_m1424123543 (Canvas_t3310196443 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Collections.Generic.List`1<UnityEngine.Canvas>::get_Count() #define List_1_get_Count_m1106558045(__this, method) (( int32_t (*) (List_1_t487303889 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Canvas>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m1295952082(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t487303889 *, const MethodInfo*))ListPool_1_Release_m957266927_gshared)(__this /* static, unused */, p0, method) // UnityEngine.Transform UnityEngine.Transform::get_parent() extern "C" Transform_t3600365921 * Transform_get_parent_m1293647796 (Transform_t3600365921 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.UI.Mask>::Get() #define ListPool_1_Get_m1500154352(__this /* static, unused */, method) (( List_1_t3275726873 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m1670010485_gshared)(__this /* static, unused */, method) // System.Void UnityEngine.Component::GetComponents<UnityEngine.UI.Mask>(System.Collections.Generic.List`1<!!0>) #define Component_GetComponents_TisMask_t1803652131_m1975602924(__this, p0, method) (( void (*) (Component_t1923634451 *, List_1_t3275726873 *, const MethodInfo*))Component_GetComponents_TisIl2CppObject_m2416546752_gshared)(__this, p0, method) // !0 System.Collections.Generic.List`1<UnityEngine.UI.Mask>::get_Item(System.Int32) #define List_1_get_Item_m1662916923(__this, p0, method) (( Mask_t1803652131 * (*) (List_1_t3275726873 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.UI.Mask>::get_Count() #define List_1_get_Count_m2576555402(__this, method) (( int32_t (*) (List_1_t3275726873 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // System.Void UnityEngine.UI.ListPool`1<UnityEngine.UI.Mask>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m2936487515(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t3275726873 *, const MethodInfo*))ListPool_1_Release_m957266927_gshared)(__this /* static, unused */, p0, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.UI.RectMask2D>::Get() #define ListPool_1_Get_m4207191750(__this /* static, unused */, method) (( List_1_t651996883 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m1670010485_gshared)(__this /* static, unused */, method) // System.Void UnityEngine.Component::GetComponentsInParent<UnityEngine.UI.RectMask2D>(System.Boolean,System.Collections.Generic.List`1<!!0>) #define Component_GetComponentsInParent_TisRectMask2D_t3474889437_m3154118616(__this, p0, p1, method) (( void (*) (Component_t1923634451 *, bool, List_1_t651996883 *, const MethodInfo*))Component_GetComponentsInParent_TisIl2CppObject_m3603136339_gshared)(__this, p0, p1, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>::get_Count() #define List_1_get_Count_m1529060501(__this, method) (( int32_t (*) (List_1_t651996883 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // !0 System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>::get_Item(System.Int32) #define List_1_get_Item_m3759222515(__this, p0, method) (( RectMask2D_t3474889437 * (*) (List_1_t651996883 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Boolean UnityEngine.UI.MaskUtilities::IsDescendantOrSelf(UnityEngine.Transform,UnityEngine.Transform) extern "C" bool MaskUtilities_IsDescendantOrSelf_m2247511982 (Il2CppObject * __this /* static, unused */, Transform_t3600365921 * ___father0, Transform_t3600365921 * ___child1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ListPool`1<UnityEngine.UI.RectMask2D>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m3079893175(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t651996883 *, const MethodInfo*))ListPool_1_Release_m957266927_gshared)(__this /* static, unused */, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>::Clear() #define List_1_Clear_m168400987(__this, method) (( void (*) (List_1_t651996883 *, const MethodInfo*))List_1_Clear_m3697625829_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>::Add(!0) #define List_1_Add_m3779394834(__this, p0, method) (( void (*) (List_1_t651996883 *, RectMask2D_t3474889437 *, const MethodInfo*))List_1_Add_m3338814081_gshared)(__this, p0, method) // System.Boolean UnityEngine.Application::get_isPlaying() extern "C" bool Application_get_isPlaying_m2058545906 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Transform UnityEngine.GameObject::get_transform() extern "C" Transform_t3600365921 * GameObject_get_transform_m393750976 (GameObject_t1113636619 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Transform::set_parent(UnityEngine.Transform) extern "C" void Transform_set_parent_m1032008535 (Transform_t3600365921 * __this, Transform_t3600365921 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Object::Destroy(UnityEngine.Object) extern "C" void Object_Destroy_m2752645118 (Il2CppObject * __this /* static, unused */, Object_t631007953 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Object::DestroyImmediate(UnityEngine.Object) extern "C" void Object_DestroyImmediate_m1556866283 (Il2CppObject * __this /* static, unused */, Object_t631007953 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Application::get_isEditor() extern "C" bool Application_get_isEditor_m3427485980 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Navigation/Mode UnityEngine.UI.Navigation::get_mode() extern "C" int32_t Navigation_get_mode_m1766451275 (Navigation_t3049316579 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Navigation::set_mode(UnityEngine.UI.Navigation/Mode) extern "C" void Navigation_set_mode_m3709908198 (Navigation_t3049316579 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnUp() extern "C" Selectable_t3250028441 * Navigation_get_selectOnUp_m3602387123 (Navigation_t3049316579 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Navigation::set_selectOnUp(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnUp_m827629728 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnDown() extern "C" Selectable_t3250028441 * Navigation_get_selectOnDown_m1912812616 (Navigation_t3049316579 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Navigation::set_selectOnDown(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnDown_m1641183109 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnLeft() extern "C" Selectable_t3250028441 * Navigation_get_selectOnLeft_m2755354667 (Navigation_t3049316579 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Navigation::set_selectOnLeft(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnLeft_m873759494 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnRight() extern "C" Selectable_t3250028441 * Navigation_get_selectOnRight_m1269340398 (Navigation_t3049316579 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Navigation::set_selectOnRight(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnRight_m1783025816 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Navigation::Equals(UnityEngine.UI.Navigation) extern "C" bool Navigation_Equals_m317484440 (Navigation_t3049316579 * __this, Navigation_t3049316579 ___other0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Shadow::.ctor() extern "C" void Shadow__ctor_m3924185169 (Shadow_t773074319 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.UIVertex>::Get() #define ListPool_1_Get_m738675669(__this /* static, unused */, method) (( List_1_t1234605051 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m738675669_gshared)(__this /* static, unused */, method) // System.Void UnityEngine.UI.VertexHelper::GetUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" void VertexHelper_GetUIVertexStream_m785241639 (VertexHelper_t2453304189 * __this, List_1_t1234605051 * ___stream0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Collections.Generic.List`1<UnityEngine.UIVertex>::get_Count() #define List_1_get_Count_m401353472(__this, method) (( int32_t (*) (List_1_t1234605051 *, const MethodInfo*))List_1_get_Count_m401353472_gshared)(__this, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.UIVertex>::get_Capacity() #define List_1_get_Capacity_m3666274724(__this, method) (( int32_t (*) (List_1_t1234605051 *, const MethodInfo*))List_1_get_Capacity_m3666274724_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::set_Capacity(System.Int32) #define List_1_set_Capacity_m2777925136(__this, p0, method) (( void (*) (List_1_t1234605051 *, int32_t, const MethodInfo*))List_1_set_Capacity_m2777925136_gshared)(__this, p0, method) // UnityEngine.Color UnityEngine.UI.Shadow::get_effectColor() extern "C" Color_t2555686324 Shadow_get_effectColor_m911451105 (Shadow_t773074319 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color32 UnityEngine.Color32::op_Implicit(UnityEngine.Color) extern "C" Color32_t2600501292 Color32_op_Implicit_m2622936441 (Il2CppObject * __this /* static, unused */, Color_t2555686324 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.UI.Shadow::get_effectDistance() extern "C" Vector2_t2156229523 Shadow_get_effectDistance_m1966046753 (Shadow_t773074319 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Shadow::ApplyShadowZeroAlloc(System.Collections.Generic.List`1<UnityEngine.UIVertex>,UnityEngine.Color32,System.Int32,System.Int32,System.Single,System.Single) extern "C" void Shadow_ApplyShadowZeroAlloc_m1225757410 (Shadow_t773074319 * __this, List_1_t1234605051 * ___verts0, Color32_t2600501292 ___color1, int32_t ___start2, int32_t ___end3, float ___x4, float ___y5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::Clear() extern "C" void VertexHelper_Clear_m627349662 (VertexHelper_t2453304189 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::AddUIVertexTriangleStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" void VertexHelper_AddUIVertexTriangleStream_m3255143338 (VertexHelper_t2453304189 * __this, List_1_t1234605051 * ___verts0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ListPool`1<UnityEngine.UIVertex>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m1246825787(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t1234605051 *, const MethodInfo*))ListPool_1_Release_m1246825787_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.UI.BaseMeshEffect::.ctor() extern "C" void BaseMeshEffect__ctor_m2277545720 (BaseMeshEffect_t2440176439 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::PopulateUIVertex(UnityEngine.UIVertex&,System.Int32) extern "C" void VertexHelper_PopulateUIVertex_m3870699345 (VertexHelper_t2453304189 * __this, UIVertex_t4057497605 * ___vertex0, int32_t ___i1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Vector2::.ctor(System.Single,System.Single) extern "C" void Vector2__ctor_m4060800441 (Vector2_t2156229523 * __this, float p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::SetUIVertex(UnityEngine.UIVertex,System.Int32) extern "C" void VertexHelper_SetUIVertex_m3094993826 (VertexHelper_t2453304189 * __this, UIVertex_t4057497605 ___vertex0, int32_t ___i1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.UI.VertexHelper::get_currentVertCount() extern "C" int32_t VertexHelper_get_currentVertCount_m124779331 (VertexHelper_t2453304189 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskableGraphic::.ctor() extern "C" void MaskableGraphic__ctor_m3705055375 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::set_useLegacyMeshGeneration(System.Boolean) extern "C" void Graphic_set_useLegacyMeshGeneration_m2447316585 (Graphic_t1660335611 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Texture UnityEngine.Material::get_mainTexture() extern "C" Texture_t3661962703 * Material_get_mainTexture_m4181654696 (Material_t340375123 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Rect::op_Equality(UnityEngine.Rect,UnityEngine.Rect) extern "C" bool Rect_op_Equality_m1072810924 (Il2CppObject * __this /* static, unused */, Rect_t2360479859 p0, Rect_t2360479859 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Rect UnityEngine.UI.RawImage::get_uvRect() extern "C" Rect_t2360479859 RawImage_get_uvRect_m3483369478 (RawImage_t3182918964 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_width() extern "C" float Rect_get_width_m3421965717 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.Mathf::RoundToInt(System.Single) extern "C" int32_t Mathf_RoundToInt_m2031261733 (Il2CppObject * __this /* static, unused */, float p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_height() extern "C" float Rect_get_height_m977101306 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.RectTransform::get_anchorMin() extern "C" Vector2_t2156229523 RectTransform_get_anchorMin_m1342910522 (RectTransform_t3704657025 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransform::set_anchorMax(UnityEngine.Vector2) extern "C" void RectTransform_set_anchorMax_m2389806509 (RectTransform_t3704657025 * __this, Vector2_t2156229523 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransform::set_sizeDelta(UnityEngine.Vector2) extern "C" void RectTransform_set_sizeDelta_m344906562 (RectTransform_t3704657025 * __this, Vector2_t2156229523 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Rect UnityEngine.UI.Graphic::GetPixelAdjustedRect() extern "C" Rect_t2360479859 Graphic_GetPixelAdjustedRect_m3729397999 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_x() extern "C" float Rect_get_x_m3218181674 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_y() extern "C" float Rect_get_y_m3218181675 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Vector4::.ctor(System.Single,System.Single,System.Single,System.Single) extern "C" void Vector4__ctor_m1702261405 (Vector4_t3319028937 * __this, float p0, float p1, float p2, float p3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Texture::get_texelSize() extern "C" Vector2_t2156229523 Texture_get_texelSize_m2512432852 (Texture_t3661962703 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Vector3::.ctor(System.Single,System.Single) extern "C" void Vector3__ctor_m4014449651 (Vector3_t3722313464 * __this, float p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_xMin() extern "C" float Rect_get_xMin_m2659235730 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_yMin() extern "C" float Rect_get_yMin_m2659235699 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.Vector3,UnityEngine.Color32,UnityEngine.Vector2) extern "C" void VertexHelper_AddVert_m3837581305 (VertexHelper_t2453304189 * __this, Vector3_t3722313464 ___position0, Color32_t2600501292 ___color1, Vector2_t2156229523 ___uv02, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_yMax() extern "C" float Rect_get_yMax_m2926206027 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Rect::get_xMax() extern "C" float Rect_get_xMax_m2926206058 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::AddTriangle(System.Int32,System.Int32,System.Int32) extern "C" void VertexHelper_AddTriangle_m3677720024 (VertexHelper_t2453304189 * __this, int32_t ___idx00, int32_t ___idx11, int32_t ___idx22, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Component::GetComponent<UnityEngine.Transform>() #define Component_GetComponent_TisTransform_t3600365921_m1200784320(__this, method) (( Transform_t3600365921 * (*) (Component_t1923634451 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m2735705429_gshared)(__this, method) // System.Void UnityEngine.UI.RectangularVertexClipper::.ctor() extern "C" void RectangularVertexClipper__ctor_m3444028362 (RectangularVertexClipper_t626611136 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable>::.ctor() #define HashSet_1__ctor_m3016903461(__this, method) (( void (*) (HashSet_1_t4099546121 *, const MethodInfo*))HashSet_1__ctor_m4231804131_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>::.ctor() #define List_1__ctor_m3694722480(__this, method) (( void (*) (List_1_t651996883 *, const MethodInfo*))List_1__ctor_m2321703786_gshared)(__this, method) // System.Void UnityEngine.GameObject::GetComponentsInParent<UnityEngine.Canvas>(System.Boolean,System.Collections.Generic.List`1<!!0>) #define GameObject_GetComponentsInParent_TisCanvas_t3310196443_m249132757(__this, p0, p1, method) (( void (*) (GameObject_t1113636619 *, bool, List_1_t487303889 *, const MethodInfo*))GameObject_GetComponentsInParent_TisIl2CppObject_m947018401_gshared)(__this, p0, p1, method) // UnityEngine.RectTransform UnityEngine.UI.RectMask2D::get_rectTransform() extern "C" RectTransform_t3704657025 * RectMask2D_get_rectTransform_m921006921 (RectMask2D_t3474889437 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Rect UnityEngine.UI.RectangularVertexClipper::GetCanvasRect(UnityEngine.RectTransform,UnityEngine.Canvas) extern "C" Rect_t2360479859 RectangularVertexClipper_GetCanvasRect_m2796440817 (RectangularVertexClipper_t626611136 * __this, RectTransform_t3704657025 * ___t0, Canvas_t3310196443 * ___c1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ClipperRegistry::Register(UnityEngine.UI.IClipper) extern "C" void ClipperRegistry_Register_m2407166513 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___c0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskUtilities::Notify2DMaskStateChanged(UnityEngine.Component) extern "C" void MaskUtilities_Notify2DMaskStateChanged_m1613167679 (Il2CppObject * __this /* static, unused */, Component_t1923634451 * ___mask0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable>::Clear() #define HashSet_1_Clear_m1535948485(__this, method) (( void (*) (HashSet_1_t4099546121 *, const MethodInfo*))HashSet_1_Clear_m507835370_gshared)(__this, method) // System.Void UnityEngine.UI.ClipperRegistry::Unregister(UnityEngine.UI.IClipper) extern "C" void ClipperRegistry_Unregister_m4126866756 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___c0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskUtilities::GetRectMasksForClip(UnityEngine.UI.RectMask2D,System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>) extern "C" void MaskUtilities_GetRectMasksForClip_m532898711 (Il2CppObject * __this /* static, unused */, RectMask2D_t3474889437 * ___clipper0, List_1_t651996883 * ___masks1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Rect UnityEngine.UI.Clipping::FindCullAndClipWorldRect(System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>,System.Boolean&) extern "C" Rect_t2360479859 Clipping_FindCullAndClipWorldRect_m171865709 (Il2CppObject * __this /* static, unused */, List_1_t651996883 * ___rectMaskParents0, bool* ___validRect1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Rect::op_Inequality(UnityEngine.Rect,UnityEngine.Rect) extern "C" bool Rect_op_Inequality_m9517823 (Il2CppObject * __this /* static, unused */, Rect_t2360479859 p0, Rect_t2360479859 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.Generic.HashSet`1/Enumerator<!0> System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable>::GetEnumerator() #define HashSet_1_GetEnumerator_m569006269(__this, method) (( Enumerator_t1509756096 (*) (HashSet_1_t4099546121 *, const MethodInfo*))HashSet_1_GetEnumerator_m3346268098_gshared)(__this, method) // !0 System.Collections.Generic.HashSet`1/Enumerator<UnityEngine.UI.IClippable>::get_Current() #define Enumerator_get_Current_m1834618397(__this, method) (( Il2CppObject * (*) (Enumerator_t1509756096 *, const MethodInfo*))Enumerator_get_Current_m4213278602_gshared)(__this, method) // System.Boolean System.Collections.Generic.HashSet`1/Enumerator<UnityEngine.UI.IClippable>::MoveNext() #define Enumerator_MoveNext_m1554493645(__this, method) (( bool (*) (Enumerator_t1509756096 *, const MethodInfo*))Enumerator_MoveNext_m3714175425_gshared)(__this, method) // System.Void System.Collections.Generic.HashSet`1/Enumerator<UnityEngine.UI.IClippable>::Dispose() #define Enumerator_Dispose_m2380611706(__this, method) (( void (*) (Enumerator_t1509756096 *, const MethodInfo*))Enumerator_Dispose_m1204547613_gshared)(__this, method) // System.Boolean UnityEngine.CanvasRenderer::get_hasMoved() extern "C" bool CanvasRenderer_get_hasMoved_m1853367979 (CanvasRenderer_t2598313366 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable>::Contains(!0) #define HashSet_1_Contains_m3128925042(__this, p0, method) (( bool (*) (HashSet_1_t4099546121 *, Il2CppObject *, const MethodInfo*))HashSet_1_Contains_m3173358704_gshared)(__this, p0, method) // System.Boolean System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable>::Add(!0) #define HashSet_1_Add_m3226509647(__this, p0, method) (( bool (*) (HashSet_1_t4099546121 *, Il2CppObject *, const MethodInfo*))HashSet_1_Add_m1971460364_gshared)(__this, p0, method) // System.Boolean System.Collections.Generic.HashSet`1<UnityEngine.UI.IClippable>::Remove(!0) #define HashSet_1_Remove_m1860968099(__this, p0, method) (( bool (*) (HashSet_1_t4099546121 *, Il2CppObject *, const MethodInfo*))HashSet_1_Remove_m709044238_gshared)(__this, p0, method) // System.Void UnityEngine.EventSystems.UIBehaviour::OnTransformParentChanged() extern "C" void UIBehaviour_OnTransformParentChanged_m1855615160 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.EventSystems.UIBehaviour::OnCanvasHierarchyChanged() extern "C" void UIBehaviour_OnCanvasHierarchyChanged_m3915099663 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Reflection.MethodInfo System.Type::GetMethod(System.String,System.Type[]) extern "C" MethodInfo_t * Type_GetMethod_m1479779718 (Type_t * __this, String_t* p0, TypeU5BU5D_t3940880105* p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Delegate UnityEngineInternal.ScriptingUtils::CreateDelegate(System.Type,System.Reflection.MethodInfo) extern "C" Delegate_t1188392813 * ScriptingUtils_CreateDelegate_m1614232900 (Il2CppObject * __this /* static, unused */, Type_t * p0, MethodInfo_t * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ReflectionMethodsCache::.ctor() extern "C" void ReflectionMethodsCache__ctor_m3826472948 (ReflectionMethodsCache_t2103211062 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RaycastHit2D[] UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback::Invoke(UnityEngine.Ray,System.Single,System.Int32) extern "C" RaycastHit2DU5BU5D_t4286651560* GetRayIntersectionAllCallback_Invoke_m1316694896 (GetRayIntersectionAllCallback_t3913627115 * __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RaycastHit2D UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback::Invoke(UnityEngine.Vector2,UnityEngine.Vector2,System.Single,System.Int32) extern "C" RaycastHit2D_t2279581989 Raycast2DCallback_Invoke_m1500574149 (Raycast2DCallback_t768590915 * __this, Vector2_t2156229523 ___p10, Vector2_t2156229523 ___p21, float ___f2, int32_t ___i3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback::Invoke(UnityEngine.Ray,UnityEngine.RaycastHit&,System.Single,System.Int32) extern "C" bool Raycast3DCallback_Invoke_m702742911 (Raycast3DCallback_t701940803 * __this, Ray_t3785851493 ___r0, RaycastHit_t1056001966 * ___hit1, float ___f2, int32_t ___i3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RaycastHit[] UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback::Invoke(UnityEngine.Ray,System.Single,System.Int32) extern "C" RaycastHitU5BU5D_t1690781147* RaycastAllCallback_Invoke_m3272036257 (RaycastAllCallback_t1884415901 * __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar/ScrollEvent::.ctor() extern "C" void ScrollEvent__ctor_m342565857 (ScrollEvent_t149898510 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::get_zero() extern "C" Vector2_t2156229523 Vector2_get_zero_m3700876535 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::.ctor() extern "C" void Selectable__ctor_m58942866 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<UnityEngine.RectTransform>(T&,T) #define SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, RectTransform_t3704657025 **, RectTransform_t3704657025 *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m1505455193_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Void UnityEngine.UI.Scrollbar::UpdateCachedReferences() extern "C" void Scrollbar_UpdateCachedReferences_m552296126 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar::UpdateVisuals() extern "C" void Scrollbar_UpdateVisuals_m2492252165 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Scrollbar/Direction>(T&,T) #define SetPropertyUtility_SetStruct_TisDirection_t3470714353_m1506329685(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisDirection_t3470714353_m1506329685_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Void UnityEngine.UI.Scrollbar::Set(System.Single) extern "C" void Scrollbar_Set_m1923517630 (Scrollbar_t1494447233 * __this, float ___input0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Mathf::Clamp01(System.Single) extern "C" float Mathf_Clamp01_m4133291925 (Il2CppObject * __this /* static, unused */, float p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Single>(T&,T) #define SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, float*, float, const MethodInfo*))SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Int32>(T&,T) #define SetPropertyUtility_SetStruct_TisInt32_t2950945753_m1101767463(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisInt32_t2950945753_m1101767463_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Void UnityEngine.UI.Selectable::OnEnable() extern "C" void Selectable_OnEnable_m3110490294 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar::Set(System.Single,System.Boolean) extern "C" void Scrollbar_Set_m607000118 (Scrollbar_t1494447233 * __this, float ___input0, bool ___sendCallback1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.DrivenRectTransformTracker::Clear() extern "C" void DrivenRectTransformTracker_Clear_m905140393 (DrivenRectTransformTracker_t2562230146 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::OnDisable() extern "C" void Selectable_OnDisable_m3225138518 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Scrollbar::get_value() extern "C" float Scrollbar_get_value_m760470106 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::Invoke(!0) #define UnityEvent_1_Invoke_m3400677460(__this, p0, method) (( void (*) (UnityEvent_1_t2278926278 *, float, const MethodInfo*))UnityEvent_1_Invoke_m3400677460_gshared)(__this, p0, method) // System.Void UnityEngine.EventSystems.UIBehaviour::OnRectTransformDimensionsChange() extern "C" void UIBehaviour_OnRectTransformDimensionsChange_m1473730550 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.DrivenRectTransformTracker::Add(UnityEngine.Object,UnityEngine.RectTransform,UnityEngine.DrivenTransformProperties) extern "C" void DrivenRectTransformTracker_Add_m4180584832 (DrivenRectTransformTracker_t2562230146 * __this, Object_t631007953 * p0, RectTransform_t3704657025 * p1, int32_t p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::get_one() extern "C" Vector2_t2156229523 Vector2_get_one_m3275444361 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Scrollbar::get_size() extern "C" float Scrollbar_get_size_m3500287235 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Scrollbar::get_reverseValue() extern "C" bool Scrollbar_get_reverseValue_m3712242531 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Scrollbar/Axis UnityEngine.UI.Scrollbar::get_axis() extern "C" int32_t Scrollbar_get_axis_m664270947 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Vector2::set_Item(System.Int32,System.Single) extern "C" void Vector2_set_Item_m1664083694 (Vector2_t2156229523 * __this, int32_t p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransform::set_anchorMin(UnityEngine.Vector2) extern "C" void RectTransform_set_anchorMin_m2068858122 (RectTransform_t3704657025 * __this, Vector2_t2156229523 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.EventSystems.PointerEventData/InputButton UnityEngine.EventSystems.PointerEventData::get_button() extern "C" int32_t PointerEventData_get_button_m359423249 (PointerEventData_t3807901092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.EventSystems.PointerEventData::get_position() extern "C" Vector2_t2156229523 PointerEventData_get_position_m437660275 (PointerEventData_t3807901092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Camera UnityEngine.EventSystems.PointerEventData::get_pressEventCamera() extern "C" Camera_t4157153871 * PointerEventData_get_pressEventCamera_m2613974917 (PointerEventData_t3807901092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.RectTransformUtility::ScreenPointToLocalPointInRectangle(UnityEngine.RectTransform,UnityEngine.Vector2,UnityEngine.Camera,UnityEngine.Vector2&) extern "C" bool RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * p0, Vector2_t2156229523 p1, Camera_t4157153871 * p2, Vector2_t2156229523 * p3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::op_Subtraction(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" Vector2_t2156229523 Vector2_op_Subtraction_m1387382396 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, Vector2_t2156229523 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Rect UnityEngine.RectTransform::get_rect() extern "C" Rect_t2360479859 RectTransform_get_rect_m1643570810 (RectTransform_t3704657025 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Rect::get_position() extern "C" Vector2_t2156229523 Rect_get_position_m2767609553 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Rect::get_size() extern "C" Vector2_t2156229523 Rect_get_size_m3542039952 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.RectTransform::get_sizeDelta() extern "C" Vector2_t2156229523 RectTransform_get_sizeDelta_m2136908840 (RectTransform_t3704657025 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::op_Multiply(UnityEngine.Vector2,System.Single) extern "C" Vector2_t2156229523 Vector2_op_Multiply_m1889160058 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Scrollbar::MayDrag(UnityEngine.EventSystems.PointerEventData) extern "C" bool Scrollbar_MayDrag_m4243946511 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Camera UnityEngine.EventSystems.PointerEventData::get_enterEventCamera() extern "C" Camera_t4157153871 * PointerEventData_get_enterEventCamera_m2055275918 (PointerEventData_t3807901092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Rect::get_center() extern "C" Vector2_t2156229523 Rect_get_center_m182049623 (Rect_t2360479859 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar::UpdateDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_UpdateDrag_m1999008351 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::OnPointerDown(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerDown_m1086067264 (Selectable_t3250028441 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.IEnumerator UnityEngine.UI.Scrollbar::ClickRepeat(UnityEngine.EventSystems.PointerEventData) extern "C" Il2CppObject * Scrollbar_ClickRepeat_m568850785 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Coroutine UnityEngine.MonoBehaviour::StartCoroutine(System.Collections.IEnumerator) extern "C" Coroutine_t3829159415 * MonoBehaviour_StartCoroutine_m4001331470 (MonoBehaviour_t3962482529 * __this, Il2CppObject * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::.ctor() extern "C" void U3CClickRepeatU3Ec__Iterator0__ctor_m1908169891 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::OnPointerUp(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerUp_m3228301429 (Selectable_t3250028441 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::OnMove(UnityEngine.EventSystems.AxisEventData) extern "C" void Selectable_OnMove_m2972933239 (Selectable_t3250028441 * __this, AxisEventData_t2331243652 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.EventSystems.MoveDirection UnityEngine.EventSystems.AxisEventData::get_moveDir() extern "C" int32_t AxisEventData_get_moveDir_m2423724085 (AxisEventData_t2331243652 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Scrollbar::get_stepSize() extern "C" float Scrollbar_get_stepSize_m1389308760 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Navigation UnityEngine.UI.Selectable::get_navigation() extern "C" Navigation_t3049316579 Selectable_get_navigation_m3508916916 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnLeft_m75080035 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnRight_m2374187443 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnUp_m1814865676 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnDown_m1591762582 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.EventSystems.PointerEventData::set_useDragThreshold(System.Boolean) extern "C" void PointerEventData_set_useDragThreshold_m248001603 (PointerEventData_t3807901092 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar::set_direction(UnityEngine.UI.Scrollbar/Direction) extern "C" void Scrollbar_set_direction_m473480640 (Scrollbar_t1494447233 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransformUtility::FlipLayoutAxes(UnityEngine.RectTransform,System.Boolean,System.Boolean) extern "C" void RectTransformUtility_FlipLayoutAxes_m3705369832 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * p0, bool p1, bool p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransformUtility::FlipLayoutOnAxis(UnityEngine.RectTransform,System.Int32,System.Boolean,System.Boolean) extern "C" void RectTransformUtility_FlipLayoutOnAxis_m144305054 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * p0, int32_t p1, bool p2, bool p3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Scrollbar::set_value(System.Single) extern "C" void Scrollbar_set_value_m2277767288 (Scrollbar_t1494447233 * __this, float ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.WaitForEndOfFrame::.ctor() extern "C" void WaitForEndOfFrame__ctor_m3113257827 (WaitForEndOfFrame_t1314943911 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.MonoBehaviour::StopCoroutine(UnityEngine.Coroutine) extern "C" void MonoBehaviour_StopCoroutine_m253796553 (MonoBehaviour_t3962482529 * __this, Coroutine_t3829159415 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.NotSupportedException::.ctor() extern "C" void NotSupportedException__ctor_m2730133172 (NotSupportedException_t1314879016 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::.ctor() #define UnityEvent_1__ctor_m2218582587(__this, method) (( void (*) (UnityEvent_1_t2278926278 *, const MethodInfo*))UnityEvent_1__ctor_m2218582587_gshared)(__this, method) // System.Void UnityEngine.UI.ScrollRect/ScrollRectEvent::.ctor() extern "C" void ScrollRectEvent__ctor_m1107027632 (ScrollRectEvent_t343079324 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::SetDirtyCaching() extern "C" void ScrollRect_SetDirtyCaching_m4155312386 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Scrollbar/ScrollEvent UnityEngine.UI.Scrollbar::get_onValueChanged() extern "C" ScrollEvent_t149898510 * Scrollbar_get_onValueChanged_m2631583151 (Scrollbar_t1494447233 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityAction`1<System.Single>::.ctor(System.Object,System.IntPtr) #define UnityAction_1__ctor_m336053009(__this, p0, p1, method) (( void (*) (UnityAction_1_t1982102915 *, Il2CppObject *, IntPtr_t, const MethodInfo*))UnityAction_1__ctor_m336053009_gshared)(__this, p0, p1, method) // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::RemoveListener(UnityEngine.Events.UnityAction`1<!0>) #define UnityEvent_1_RemoveListener_m4190968495(__this, p0, method) (( void (*) (UnityEvent_1_t2278926278 *, UnityAction_1_t1982102915 *, const MethodInfo*))UnityEvent_1_RemoveListener_m4190968495_gshared)(__this, p0, method) // System.Void UnityEngine.Events.UnityEvent`1<System.Single>::AddListener(UnityEngine.Events.UnityAction`1<!0>) #define UnityEvent_1_AddListener_m3008008915(__this, p0, method) (( void (*) (UnityEvent_1_t2278926278 *, UnityAction_1_t1982102915 *, const MethodInfo*))UnityEvent_1_AddListener_m3008008915_gshared)(__this, p0, method) // System.Void UnityEngine.UI.ScrollRect::SetDirty() extern "C" void ScrollRect_SetDirty_m214267968 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdateCachedData() extern "C" void ScrollRect_UpdateCachedData_m2213916985 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdateBounds() extern "C" void ScrollRect_UpdateBounds_m359586673 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbars(UnityEngine.Vector2) extern "C" void ScrollRect_UpdateScrollbars_m4146077522 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___offset0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdatePrevData() extern "C" void ScrollRect_UpdatePrevData_m4009119607 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_viewRect() extern "C" RectTransform_t3704657025 * ScrollRect_get_viewRect_m791243225 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.ScrollRect/ScrollbarVisibility UnityEngine.UI.ScrollRect::get_horizontalScrollbarVisibility() extern "C" int32_t ScrollRect_get_horizontalScrollbarVisibility_m1341651705 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.ScrollRect/ScrollbarVisibility UnityEngine.UI.ScrollRect::get_verticalScrollbarVisibility() extern "C" int32_t ScrollRect_get_verticalScrollbarVisibility_m271142496 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.CanvasUpdateRegistry::RegisterCanvasElementForLayoutRebuild(UnityEngine.UI.ICanvasElement) extern "C" void CanvasUpdateRegistry_RegisterCanvasElementForLayoutRebuild_m677454901 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___element0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.CanvasUpdateRegistry::UnRegisterCanvasElementForRebuild(UnityEngine.UI.ICanvasElement) extern "C" void CanvasUpdateRegistry_UnRegisterCanvasElementForRebuild_m3652497192 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___element0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_rectTransform() extern "C" RectTransform_t3704657025 * ScrollRect_get_rectTransform_m2442061719 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.LayoutRebuilder::MarkLayoutForRebuild(UnityEngine.RectTransform) extern "C" void LayoutRebuilder_MarkLayoutForRebuild_m4080555610 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() extern "C" bool UIBehaviour_IsActive_m3579119648 (UIBehaviour_t3495933518 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.CanvasUpdateRegistry::IsRebuildingLayout() extern "C" bool CanvasUpdateRegistry_IsRebuildingLayout_m3530790142 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Canvas::ForceUpdateCanvases() extern "C" void Canvas_ForceUpdateCanvases_m1969676771 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::EnsureLayoutHasRebuilt() extern "C" void ScrollRect_EnsureLayoutHasRebuilt_m3415112783 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.EventSystems.PointerEventData::get_scrollDelta() extern "C" Vector2_t2156229523 PointerEventData_get_scrollDelta_m230480732 (PointerEventData_t3807901092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ScrollRect::get_vertical() extern "C" bool ScrollRect_get_vertical_m3678635065 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ScrollRect::get_horizontal() extern "C" bool ScrollRect_get_horizontal_m4171218020 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.RectTransform::get_anchoredPosition() extern "C" Vector2_t2156229523 RectTransform_get_anchoredPosition_m287009682 (RectTransform_t3704657025 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::op_Addition(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" Vector2_t2156229523 Vector2_op_Addition_m2157034339 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, Vector2_t2156229523 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::CalculateOffset(UnityEngine.Vector2) extern "C" Vector2_t2156229523 ScrollRect_CalculateOffset_m927043599 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___delta0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Bounds::get_size() extern "C" Vector3_t3722313464 Bounds_get_size_m1171376090 (Bounds_t2266837910 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.ScrollRect::RubberDelta(System.Single,System.Single) extern "C" float ScrollRect_RubberDelta_m3597626447 (Il2CppObject * __this /* static, unused */, float ___overStretching0, float ___viewSize1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Vector2::op_Inequality(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" bool Vector2_op_Inequality_m2880653562 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, Vector2_t2156229523 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.RectTransform::set_anchoredPosition(UnityEngine.Vector2) extern "C" void RectTransform_set_anchoredPosition_m1454079598 (RectTransform_t3704657025 * __this, Vector2_t2156229523 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbarVisibility() extern "C" void ScrollRect_UpdateScrollbarVisibility_m4226977273 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Time::get_unscaledDeltaTime() extern "C" float Time_get_unscaledDeltaTime_m3673896426 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Vector2::get_Item(System.Int32) extern "C" float Vector2_get_Item_m3129197029 (Vector2_t2156229523 * __this, int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Mathf::SmoothDamp(System.Single,System.Single,System.Single&,System.Single,System.Single,System.Single) extern "C" float Mathf_SmoothDamp_m1005916951 (Il2CppObject * __this /* static, unused */, float p0, float p1, float* p2, float p3, float p4, float p5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::op_Division(UnityEngine.Vector2,System.Single) extern "C" Vector2_t2156229523 Vector2_op_Division_m1480625254 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector2::op_Implicit(UnityEngine.Vector2) extern "C" Vector3_t3722313464 Vector2_op_Implicit_m1988559315 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::Lerp(UnityEngine.Vector3,UnityEngine.Vector3,System.Single) extern "C" Vector3_t3722313464 Vector3_Lerp_m61516199 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, Vector3_t3722313464 p1, float p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.Vector2::op_Implicit(UnityEngine.Vector3) extern "C" Vector2_t2156229523 Vector2_op_Implicit_m1304503157 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Bounds::op_Inequality(UnityEngine.Bounds,UnityEngine.Bounds) extern "C" bool Bounds_op_Inequality_m4034488270 (Il2CppObject * __this /* static, unused */, Bounds_t2266837910 p0, Bounds_t2266837910 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::get_normalizedPosition() extern "C" Vector2_t2156229523 ScrollRect_get_normalizedPosition_m396145690 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityEvent`1<UnityEngine.Vector2>::Invoke(!0) #define UnityEvent_1_Invoke_m3432495026(__this, p0, method) (( void (*) (UnityEvent_1_t3037889027 *, Vector2_t2156229523 , const MethodInfo*))UnityEvent_1_Invoke_m3432495026_gshared)(__this, p0, method) // System.Void UnityEngine.UI.Scrollbar::set_size(System.Single) extern "C" void Scrollbar_set_size_m4256339911 (Scrollbar_t1494447233 * __this, float ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.ScrollRect::get_horizontalNormalizedPosition() extern "C" float ScrollRect_get_horizontalNormalizedPosition_m2904015963 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.ScrollRect::get_verticalNormalizedPosition() extern "C" float ScrollRect_get_verticalNormalizedPosition_m3693218937 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Bounds::get_min() extern "C" Vector3_t3722313464 Bounds_get_min_m1736091801 (Bounds_t2266837910 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Vector3::get_Item(System.Int32) extern "C" float Vector3_get_Item_m165790779 (Vector3_t3722313464 * __this, int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Transform::get_localPosition() extern "C" Vector3_t3722313464 Transform_get_localPosition_m265057664 (Transform_t3600365921 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Vector3::set_Item(System.Int32,System.Single) extern "C" void Vector3_set_Item_m906731916 (Vector3_t3722313464 * __this, int32_t p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Transform::set_localPosition(UnityEngine.Vector3) extern "C" void Transform_set_localPosition_m3327877514 (Transform_t3600365921 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Mathf::Sign(System.Single) extern "C" float Mathf_Sign_m1998862938 (Il2CppObject * __this /* static, unused */, float p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_content() extern "C" RectTransform_t3704657025 * ScrollRect_get_content_m2477524320 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.LayoutRebuilder::ForceRebuildLayoutImmediate(UnityEngine.RectTransform) extern "C" void LayoutRebuilder_ForceRebuildLayoutImmediate_m2728177051 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___layoutRoot0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Bounds::.ctor(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" void Bounds__ctor_m131864078 (Bounds_t2266837910 * __this, Vector3_t3722313464 p0, Vector3_t3722313464 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Bounds UnityEngine.UI.ScrollRect::GetBounds() extern "C" Bounds_t2266837910 ScrollRect_GetBounds_m449872505 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ScrollRect::get_vScrollingNeeded() extern "C" bool ScrollRect_get_vScrollingNeeded_m1717136831 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ScrollRect::get_hScrollingNeeded() extern "C" bool ScrollRect_get_hScrollingNeeded_m1471901392 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbarLayout() extern "C" void ScrollRect_UpdateScrollbarLayout_m4070037264 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::UpdateOneScrollbarVisibility(System.Boolean,System.Boolean,UnityEngine.UI.ScrollRect/ScrollbarVisibility,UnityEngine.UI.Scrollbar) extern "C" void ScrollRect_UpdateOneScrollbarVisibility_m1785426292 (Il2CppObject * __this /* static, unused */, bool ___xScrollingNeeded0, bool ___xAxisEnabled1, int32_t ___scrollbarVisibility2, Scrollbar_t1494447233 * ___scrollbar3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.GameObject::get_activeSelf() extern "C" bool GameObject_get_activeSelf_m2051627994 (GameObject_t1113636619 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.GameObject::SetActive(System.Boolean) extern "C" void GameObject_SetActive_m3735894026 (GameObject_t1113636619 * __this, bool p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.RectTransform::get_anchorMax() extern "C" Vector2_t2156229523 RectTransform_get_anchorMax_m1075940194 (RectTransform_t3704657025 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Bounds::get_center() extern "C" Vector3_t3722313464 Bounds_get_center_m1997663455 (Bounds_t2266837910 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.RectTransform::get_pivot() extern "C" Vector2_t2156229523 RectTransform_get_pivot_m1676241928 (RectTransform_t3704657025 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ScrollRect::AdjustBounds(UnityEngine.Bounds&,UnityEngine.Vector2&,UnityEngine.Vector3&,UnityEngine.Vector3&) extern "C" void ScrollRect_AdjustBounds_m1965355334 (Il2CppObject * __this /* static, unused */, Bounds_t2266837910 * ___viewBounds0, Vector2_t2156229523 * ___contentPivot1, Vector3_t3722313464 * ___contentSize2, Vector3_t3722313464 * ___contentPos3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Bounds::set_size(UnityEngine.Vector3) extern "C" void Bounds_set_size_m1025767497 (Bounds_t2266837910 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Bounds::set_center(UnityEngine.Vector3) extern "C" void Bounds_set_center_m1602292844 (Bounds_t2266837910 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.ScrollRect/MovementType UnityEngine.UI.ScrollRect::get_movementType() extern "C" int32_t ScrollRect_get_movementType_m2390238786 (ScrollRect_t4137855814 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Bounds::get_max() extern "C" Vector3_t3722313464 Bounds_get_max_m1659284971 (Bounds_t2266837910 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single System.Math::Min(System.Single,System.Single) extern "C" float Math_Min_m3253079129 (Il2CppObject * __this /* static, unused */, float p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single System.Math::Max(System.Single,System.Single) extern "C" float Math_Max_m482125436 (Il2CppObject * __this /* static, unused */, float p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Vector2::get_sqrMagnitude() extern "C" float Vector2_get_sqrMagnitude_m3719918747 (Vector2_t2156229523 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::op_Subtraction(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" Vector3_t3722313464 Vector3_op_Subtraction_m2566684344 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, Vector3_t3722313464 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Matrix4x4 UnityEngine.Transform::get_worldToLocalMatrix() extern "C" Matrix4x4_t1817901843 Transform_get_worldToLocalMatrix_m2010185910 (Transform_t3600365921 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Bounds UnityEngine.UI.ScrollRect::InternalGetBounds(UnityEngine.Vector3[],UnityEngine.Matrix4x4&) extern "C" Bounds_t2266837910 ScrollRect_InternalGetBounds_m599803667 (Il2CppObject * __this /* static, unused */, Vector3U5BU5D_t1718750761* ___corners0, Matrix4x4_t1817901843 * ___viewWorldToLocalMatrix1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Vector3::.ctor(System.Single,System.Single,System.Single) extern "C" void Vector3__ctor_m1197556204 (Vector3_t3722313464 * __this, float p0, float p1, float p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Matrix4x4::MultiplyPoint3x4(UnityEngine.Vector3) extern "C" Vector3_t3722313464 Matrix4x4_MultiplyPoint3x4_m1691748578 (Matrix4x4_t1817901843 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::Min(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" Vector3_t3722313464 Vector3_Min_m4041074433 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, Vector3_t3722313464 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::Max(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" Vector3_t3722313464 Vector3_Max_m821979329 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, Vector3_t3722313464 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_zero() extern "C" Vector3_t3722313464 Vector3_get_zero_m1640475482 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Bounds::Encapsulate(UnityEngine.Vector3) extern "C" void Bounds_Encapsulate_m3482076963 (Bounds_t2266837910 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::InternalCalculateOffset(UnityEngine.Bounds&,UnityEngine.Bounds&,System.Boolean,System.Boolean,UnityEngine.UI.ScrollRect/MovementType,UnityEngine.Vector2&) extern "C" Vector2_t2156229523 ScrollRect_InternalCalculateOffset_m3525603382 (Il2CppObject * __this /* static, unused */, Bounds_t2266837910 * ___viewBounds0, Bounds_t2266837910 * ___contentBounds1, bool ___horizontal2, bool ___vertical3, int32_t ___movementType4, Vector2_t2156229523 * ___delta5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Events.UnityEvent`1<UnityEngine.Vector2>::.ctor() #define UnityEvent_1__ctor_m3675246889(__this, method) (( void (*) (UnityEvent_1_t3037889027 *, const MethodInfo*))UnityEvent_1__ctor_m3675246889_gshared)(__this, method) // UnityEngine.UI.Navigation UnityEngine.UI.Navigation::get_defaultNavigation() extern "C" Navigation_t3049316579 Navigation_get_defaultNavigation_m2181582095 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.ColorBlock UnityEngine.UI.ColorBlock::get_defaultColorBlock() extern "C" ColorBlock_t2139031574 ColorBlock_get_defaultColorBlock_m2213047241 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.AnimationTriggers::.ctor() extern "C" void AnimationTriggers__ctor_m3418993069 (AnimationTriggers_t2532145056 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.CanvasGroup>::.ctor() #define List_1__ctor_m1125674364(__this, method) (( void (*) (List_1_t1260619206 *, const MethodInfo*))List_1__ctor_m2321703786_gshared)(__this, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Navigation>(T&,T) #define SetPropertyUtility_SetStruct_TisNavigation_t3049316579_m1469939781(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, Navigation_t3049316579 *, Navigation_t3049316579 , const MethodInfo*))SetPropertyUtility_SetStruct_TisNavigation_t3049316579_m1469939781_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Void UnityEngine.UI.Selectable::OnSetProperty() extern "C" void Selectable_OnSetProperty_m1693943217 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Selectable/Transition>(T&,T) #define SetPropertyUtility_SetStruct_TisTransition_t1769908631_m4087672457(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisTransition_t1769908631_m4087672457_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.ColorBlock>(T&,T) #define SetPropertyUtility_SetStruct_TisColorBlock_t2139031574_m1748367426(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, ColorBlock_t2139031574 *, ColorBlock_t2139031574 , const MethodInfo*))SetPropertyUtility_SetStruct_TisColorBlock_t2139031574_m1748367426_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.SpriteState>(T&,T) #define SetPropertyUtility_SetStruct_TisSpriteState_t1362986479_m665096788(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, SpriteState_t1362986479 *, SpriteState_t1362986479 , const MethodInfo*))SetPropertyUtility_SetStruct_TisSpriteState_t1362986479_m665096788_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<UnityEngine.UI.AnimationTriggers>(T&,T) #define SetPropertyUtility_SetClass_TisAnimationTriggers_t2532145056_m1077330060(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, AnimationTriggers_t2532145056 **, AnimationTriggers_t2532145056 *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m1505455193_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<UnityEngine.UI.Graphic>(T&,T) #define SetPropertyUtility_SetClass_TisGraphic_t1660335611_m2615282015(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, Graphic_t1660335611 **, Graphic_t1660335611 *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m1505455193_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Boolean>(T&,T) #define SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, bool*, bool, const MethodInfo*))SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // UnityEngine.EventSystems.EventSystem UnityEngine.EventSystems.EventSystem::get_current() extern "C" EventSystem_t1003666588 * EventSystem_get_current_m1416377559 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.GameObject UnityEngine.EventSystems.EventSystem::get_currentSelectedGameObject() extern "C" GameObject_t1113636619 * EventSystem_get_currentSelectedGameObject_m2939274948 (EventSystem_t1003666588 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.EventSystems.EventSystem::SetSelectedGameObject(UnityEngine.GameObject) extern "C" void EventSystem_SetSelectedGameObject_m2232337908 (EventSystem_t1003666588 * __this, GameObject_t1113636619 * ___selected0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::UpdateSelectionState(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_UpdateSelectionState_m682863465 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Component::GetComponent<UnityEngine.Animator>() #define Component_GetComponent_TisAnimator_t434523843_m2351447238(__this, method) (( Animator_t434523843 * (*) (Component_t1923634451 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m2735705429_gshared)(__this, method) // System.Void UnityEngine.Component::GetComponents<UnityEngine.CanvasGroup>(System.Collections.Generic.List`1<!!0>) #define Component_GetComponents_TisCanvasGroup_t4083511760_m1242628373(__this, p0, method) (( void (*) (Component_t1923634451 *, List_1_t1260619206 *, const MethodInfo*))Component_GetComponents_TisIl2CppObject_m2416546752_gshared)(__this, p0, method) // !0 System.Collections.Generic.List`1<UnityEngine.CanvasGroup>::get_Item(System.Int32) #define List_1_get_Item_m1176857673(__this, p0, method) (( CanvasGroup_t4083511760 * (*) (List_1_t1260619206 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Boolean UnityEngine.CanvasGroup::get_interactable() extern "C" bool CanvasGroup_get_interactable_m176056025 (CanvasGroup_t4083511760 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.CanvasGroup::get_ignoreParentGroups() extern "C" bool CanvasGroup_get_ignoreParentGroups_m551440072 (CanvasGroup_t4083511760 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Collections.Generic.List`1<UnityEngine.CanvasGroup>::get_Count() #define List_1_get_Count_m1565416845(__this, method) (( int32_t (*) (List_1_t1260619206 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.Selectable>::Add(!0) #define List_1_Add_m2184749397(__this, p0, method) (( void (*) (List_1_t427135887 *, Selectable_t3250028441 *, const MethodInfo*))List_1_Add_m3338814081_gshared)(__this, p0, method) // System.Boolean UnityEngine.UI.Selectable::get_hasSelection() extern "C" bool Selectable_get_hasSelection_m1083548109 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::InternalEvaluateAndTransitionToSelectionState(System.Boolean) extern "C" void Selectable_InternalEvaluateAndTransitionToSelectionState_m2188373385 (Selectable_t3250028441 * __this, bool ___instant0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.Collections.Generic.List`1<UnityEngine.UI.Selectable>::Remove(!0) #define List_1_Remove_m2170822742(__this, p0, method) (( bool (*) (List_1_t427135887 *, Selectable_t3250028441 *, const MethodInfo*))List_1_Remove_m1416767016_gshared)(__this, p0, method) // System.String UnityEngine.UI.AnimationTriggers::get_normalTrigger() extern "C" String_t* AnimationTriggers_get_normalTrigger_m3461765293 (AnimationTriggers_t2532145056 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::set_isPointerInside(System.Boolean) extern "C" void Selectable_set_isPointerInside_m701571657 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::set_isPointerDown(System.Boolean) extern "C" void Selectable_set_isPointerDown_m1776212707 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::set_hasSelection(System.Boolean) extern "C" void Selectable_set_hasSelection_m1076374937 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.Color::get_white() extern "C" Color_t2555686324 Color_get_white_m3544547002 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::StartColorTween(UnityEngine.Color,System.Boolean) extern "C" void Selectable_StartColorTween_m3618813981 (Selectable_t3250028441 * __this, Color_t2555686324 ___targetColor0, bool ___instant1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::DoSpriteSwap(UnityEngine.Sprite) extern "C" void Selectable_DoSpriteSwap_m3258918083 (Selectable_t3250028441 * __this, Sprite_t280657092 * ___newSprite0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::TriggerAnimation(System.String) extern "C" void Selectable_TriggerAnimation_m2878474 (Selectable_t3250028441 * __this, String_t* ___triggername0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.UI.ColorBlock::get_normalColor() extern "C" Color_t2555686324 ColorBlock_get_normalColor_m4055946654 (ColorBlock_t2139031574 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.UI.ColorBlock::get_highlightedColor() extern "C" Color_t2555686324 ColorBlock_get_highlightedColor_m588402203 (ColorBlock_t2139031574 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_highlightedSprite() extern "C" Sprite_t280657092 * SpriteState_get_highlightedSprite_m3042451966 (SpriteState_t1362986479 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String UnityEngine.UI.AnimationTriggers::get_highlightedTrigger() extern "C" String_t* AnimationTriggers_get_highlightedTrigger_m1187211321 (AnimationTriggers_t2532145056 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.UI.ColorBlock::get_pressedColor() extern "C" Color_t2555686324 ColorBlock_get_pressedColor_m3079696728 (ColorBlock_t2139031574 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_pressedSprite() extern "C" Sprite_t280657092 * SpriteState_get_pressedSprite_m3868967445 (SpriteState_t1362986479 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String UnityEngine.UI.AnimationTriggers::get_pressedTrigger() extern "C" String_t* AnimationTriggers_get_pressedTrigger_m2840379030 (AnimationTriggers_t2532145056 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.UI.ColorBlock::get_disabledColor() extern "C" Color_t2555686324 ColorBlock_get_disabledColor_m4200465259 (ColorBlock_t2139031574 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_disabledSprite() extern "C" Sprite_t280657092 * SpriteState_get_disabledSprite_m1003707558 (SpriteState_t1362986479 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String UnityEngine.UI.AnimationTriggers::get_disabledTrigger() extern "C" String_t* AnimationTriggers_get_disabledTrigger_m3860052542 (AnimationTriggers_t2532145056 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.Color::get_black() extern "C" Color_t2555686324 Color_get_black_m650597609 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.GameObject::get_activeInHierarchy() extern "C" bool GameObject_get_activeInHierarchy_m921367020 (GameObject_t1113636619 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.ColorBlock::get_colorMultiplier() extern "C" float ColorBlock_get_colorMultiplier_m815752320 (ColorBlock_t2139031574 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.Color::op_Multiply(UnityEngine.Color,System.Single) extern "C" Color_t2555686324 Color_op_Multiply_m69884213 (Il2CppObject * __this /* static, unused */, Color_t2555686324 p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_normalized() extern "C" Vector3_t3722313464 Vector3_get_normalized_m1684899259 (Vector3_t3722313464 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Quaternion UnityEngine.Transform::get_rotation() extern "C" Quaternion_t2301928331 Transform_get_rotation_m2794111148 (Transform_t3600365921 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Quaternion UnityEngine.Quaternion::Inverse(UnityEngine.Quaternion) extern "C" Quaternion_t2301928331 Quaternion_Inverse_m2799544503 (Il2CppObject * __this /* static, unused */, Quaternion_t2301928331 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Quaternion::op_Multiply(UnityEngine.Quaternion,UnityEngine.Vector3) extern "C" Vector3_t3722313464 Quaternion_op_Multiply_m1022106983 (Il2CppObject * __this /* static, unused */, Quaternion_t2301928331 p0, Vector3_t3722313464 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.UI.Selectable::GetPointOnRectEdge(UnityEngine.RectTransform,UnityEngine.Vector2) extern "C" Vector3_t3722313464 Selectable_GetPointOnRectEdge_m2129691872 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, Vector2_t2156229523 ___dir1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Transform::TransformPoint(UnityEngine.Vector3) extern "C" Vector3_t3722313464 Transform_TransformPoint_m3184824030 (Transform_t3600365921 * __this, Vector3_t3722313464 p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !0 System.Collections.Generic.List`1<UnityEngine.UI.Selectable>::get_Item(System.Int32) #define List_1_get_Item_m2170948632(__this, p0, method) (( Selectable_t3250028441 * (*) (List_1_t427135887 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Single UnityEngine.Vector3::Dot(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" float Vector3_Dot_m240955101 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, Vector3_t3722313464 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Vector3::get_sqrMagnitude() extern "C" float Vector3_get_sqrMagnitude_m3958734106 (Vector3_t3722313464 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.Collections.Generic.List`1<UnityEngine.UI.Selectable>::get_Count() #define List_1_get_Count_m124153205(__this, method) (( int32_t (*) (List_1_t427135887 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // UnityEngine.Vector2 UnityEngine.Vector2::Scale(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" Vector2_t2156229523 Vector2_Scale_m110064162 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, Vector2_t2156229523 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.EventSystems.BaseEventData::set_selectedObject(UnityEngine.GameObject) extern "C" void BaseEventData_set_selectedObject_m1456148497 (BaseEventData_t3903027533 * __this, GameObject_t1113636619 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_left() extern "C" Vector3_t3722313464 Vector3_get_left_m3265637219 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectable(UnityEngine.Vector3) extern "C" Selectable_t3250028441 * Selectable_FindSelectable_m2348614027 (Selectable_t3250028441 * __this, Vector3_t3722313464 ___dir0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_right() extern "C" Vector3_t3722313464 Vector3_get_right_m2544765406 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_up() extern "C" Vector3_t3722313464 Vector3_get_up_m2851907508 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_down() extern "C" Vector3_t3722313464 Vector3_get_down_m3099436347 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::Navigate(UnityEngine.EventSystems.AxisEventData,UnityEngine.UI.Selectable) extern "C" void Selectable_Navigate_m2538999742 (Selectable_t3250028441 * __this, AxisEventData_t2331243652 * ___eventData0, Selectable_t3250028441 * ___sel1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.ColorBlock::get_fadeDuration() extern "C" float ColorBlock_get_fadeDuration_m121071467 (ColorBlock_t2139031574 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Image UnityEngine.UI.Selectable::get_image() extern "C" Image_t2670269651 * Selectable_get_image_m1928917691 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Image::set_overrideSprite(UnityEngine.Sprite) extern "C" void Image_set_overrideSprite_m3213596394 (Image_t2670269651 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Selectable/Transition UnityEngine.UI.Selectable::get_transition() extern "C" int32_t Selectable_get_transition_m4252319269 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Animator UnityEngine.UI.Selectable::get_animator() extern "C" Animator_t434523843 * Selectable_get_animator_m2899312855 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Animator::get_hasBoundPlayables() extern "C" bool Animator_get_hasBoundPlayables_m117367483 (Animator_t434523843 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::IsNullOrEmpty(System.String) extern "C" bool String_IsNullOrEmpty_m2969720369 (Il2CppObject * __this /* static, unused */, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Animator::ResetTrigger(System.String) extern "C" void Animator_ResetTrigger_m2500195305 (Animator_t434523843 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Animator::SetTrigger(System.String) extern "C" void Animator_SetTrigger_m2194443996 (Animator_t434523843 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Selectable::IsPressed() extern "C" bool Selectable_IsPressed_m3209220049 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Selectable::get_isPointerDown() extern "C" bool Selectable_get_isPointerDown_m3518318267 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Selectable::get_isPointerInside() extern "C" bool Selectable_get_isPointerInside_m520529781 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.GameObject UnityEngine.EventSystems.PointerEventData::get_pointerPress() extern "C" GameObject_t1113636619 * PointerEventData_get_pointerPress_m3897111385 (PointerEventData_t3807901092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Selectable::IsHighlighted(UnityEngine.EventSystems.BaseEventData) extern "C" bool Selectable_IsHighlighted_m1215066233 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.EventSystems.EventSystem::SetSelectedGameObject(UnityEngine.GameObject,UnityEngine.EventSystems.BaseEventData) extern "C" void EventSystem_SetSelectedGameObject_m3267446555 (EventSystem_t1003666588 * __this, GameObject_t1113636619 * ___selected0, BaseEventData_t3903027533 * ___pointer1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::EvaluateAndTransitionToSelectionState(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_EvaluateAndTransitionToSelectionState_m3735354430 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.EventSystems.EventSystem::get_alreadySelecting() extern "C" bool EventSystem_get_alreadySelecting_m2187738478 (EventSystem_t1003666588 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.UI.Selectable>::.ctor() #define List_1__ctor_m2565882233(__this, method) (( void (*) (List_1_t427135887 *, const MethodInfo*))List_1__ctor_m2321703786_gshared)(__this, method) // System.Void UnityEngine.Color::.ctor(System.Single,System.Single,System.Single,System.Single) extern "C" void Color__ctor_m3057542999 (Color_t2555686324 * __this, float p0, float p1, float p2, float p3, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Graphic UnityEngine.UI.BaseMeshEffect::get_graphic() extern "C" Graphic_t1660335611 * BaseMeshEffect_get_graphic_m1852367505 (BaseMeshEffect_t2440176439 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Vector2::op_Equality(UnityEngine.Vector2,UnityEngine.Vector2) extern "C" bool Vector2_op_Equality_m3476359499 (Il2CppObject * __this /* static, unused */, Vector2_t2156229523 p0, Vector2_t2156229523 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !0 System.Collections.Generic.List`1<UnityEngine.UIVertex>::get_Item(System.Int32) #define List_1_get_Item_m457221236(__this, p0, method) (( UIVertex_t4057497605 (*) (List_1_t1234605051 *, int32_t, const MethodInfo*))List_1_get_Item_m457221236_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::Add(!0) #define List_1_Add_m2586421604(__this, p0, method) (( void (*) (List_1_t1234605051 *, UIVertex_t4057497605 , const MethodInfo*))List_1_Add_m2586421604_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UIVertex>::set_Item(System.Int32,!0) #define List_1_set_Item_m2057272351(__this, p0, p1, method) (( void (*) (List_1_t1234605051 *, int32_t, UIVertex_t4057497605 , const MethodInfo*))List_1_set_Item_m2057272351_gshared)(__this, p0, p1, method) // System.Void UnityEngine.UI.Shadow::ApplyShadow(System.Collections.Generic.List`1<UnityEngine.UIVertex>,UnityEngine.Color32,System.Int32,System.Int32,System.Single,System.Single) extern "C" void Shadow_ApplyShadow_m3787949518 (Shadow_t773074319 * __this, List_1_t1234605051 * ___verts0, Color32_t2600501292 ___color1, int32_t ___start2, int32_t ___end3, float ___x4, float ___y5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Slider/SliderEvent::.ctor() extern "C" void SliderEvent__ctor_m3149452941 (SliderEvent_t3180273144 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Slider::UpdateCachedReferences() extern "C" void Slider_UpdateCachedReferences_m3259451627 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Slider::UpdateVisuals() extern "C" void Slider_UpdateVisuals_m3662961057 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Slider/Direction>(T&,T) #define SetPropertyUtility_SetStruct_TisDirection_t337909235_m916002679(__this /* static, unused */, ___currentValue0, ___newValue1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisDirection_t337909235_m916002679_gshared)(__this /* static, unused */, ___currentValue0, ___newValue1, method) // System.Void UnityEngine.UI.Slider::Set(System.Single) extern "C" void Slider_Set_m1477870360 (Slider_t3903728902 * __this, float ___input0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Slider::get_wholeNumbers() extern "C" bool Slider_get_wholeNumbers_m3514084699 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Slider::get_minValue() extern "C" float Slider_get_minValue_m3250350293 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Slider::get_maxValue() extern "C" float Slider_get_maxValue_m414465787 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Mathf::Approximately(System.Single,System.Single) extern "C" bool Mathf_Approximately_m367990089 (Il2CppObject * __this /* static, unused */, float p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Mathf::InverseLerp(System.Single,System.Single,System.Single) extern "C" float Mathf_InverseLerp_m78080575 (Il2CppObject * __this /* static, unused */, float p0, float p1, float p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Mathf::Lerp(System.Single,System.Single,System.Single) extern "C" float Mathf_Lerp_m3558781979 (Il2CppObject * __this /* static, unused */, float p0, float p1, float p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Slider::ClampValue(System.Single) extern "C" float Slider_ClampValue_m3482112413 (Slider_t3903728902 * __this, float ___input0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Slider::get_normalizedValue() extern "C" float Slider_get_normalizedValue_m4221259752 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Image/Type UnityEngine.UI.Image::get_type() extern "C" int32_t Image_get_type_m3606908055 (Image_t2670269651 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Image::get_fillAmount() extern "C" float Image_get_fillAmount_m2193224718 (Image_t2670269651 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Slider::get_reverseValue() extern "C" bool Slider_get_reverseValue_m2613930318 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Slider/Axis UnityEngine.UI.Slider::get_axis() extern "C" int32_t Slider_get_axis_m2224049704 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.UI.Slider/SliderEvent UnityEngine.UI.Slider::get_onValueChanged() extern "C" SliderEvent_t3180273144 * Slider_get_onValueChanged_m2907593587 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Image>() #define Component_GetComponent_TisImage_t2670269651_m980647750(__this, method) (( Image_t2670269651 * (*) (Component_t1923634451 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m2735705429_gshared)(__this, method) // System.Single UnityEngine.Mathf::Clamp(System.Single,System.Single,System.Single) extern "C" float Mathf_Clamp_m500974738 (Il2CppObject * __this /* static, unused */, float p0, float p1, float p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Image::set_fillAmount(System.Single) extern "C" void Image_set_fillAmount_m3737925590 (Image_t2670269651 * __this, float ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Slider::set_normalizedValue(System.Single) extern "C" void Slider_set_normalizedValue_m480470123 (Slider_t3903728902 * __this, float ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Slider::MayDrag(UnityEngine.EventSystems.PointerEventData) extern "C" bool Slider_MayDrag_m674653282 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Slider::UpdateDrag(UnityEngine.EventSystems.PointerEventData,UnityEngine.Camera) extern "C" void Slider_UpdateDrag_m1102107039 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, Camera_t4157153871 * ___cam1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Slider::get_stepSize() extern "C" float Slider_get_stepSize_m1423227661 (Slider_t3903728902 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Slider::set_direction(UnityEngine.UI.Slider/Direction) extern "C" void Slider_set_direction_m3354648663 (Slider_t3903728902 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.SpriteState::set_highlightedSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_highlightedSprite_m1439356607 (SpriteState_t1362986479 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.SpriteState::set_pressedSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_pressedSprite_m3368686500 (SpriteState_t1362986479 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.SpriteState::set_disabledSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_disabledSprite_m1243475168 (SpriteState_t1362986479 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.SpriteState::Equals(UnityEngine.UI.SpriteState) extern "C" bool SpriteState_Equals_m2696426421 (SpriteState_t1362986479 * __this, SpriteState_t1362986479 ___other0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Material::HasProperty(System.String) extern "C" bool Material_HasProperty_m4137769941 (Material_t340375123 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String UnityEngine.Object::get_name() extern "C" String_t* Object_get_name_m1414505214 (Object_t631007953 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Concat(System.String,System.String,System.String) extern "C" String_t* String_Concat_m3755062657 (Il2CppObject * __this /* static, unused */, String_t* p0, String_t* p1, String_t* p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Debug::LogWarning(System.Object,UnityEngine.Object) extern "C" void Debug_LogWarning_m218105588 (Il2CppObject * __this /* static, unused */, Il2CppObject * p0, Object_t631007953 * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !0 System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry>::get_Item(System.Int32) #define List_1_get_Item_m4066072586(__this, p0, method) (( MatEntry_t2957107092 * (*) (List_1_t134214538 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry>::get_Count() #define List_1_get_Count_m2805001068(__this, method) (( int32_t (*) (List_1_t134214538 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // System.Void UnityEngine.UI.StencilMaterial/MatEntry::.ctor() extern "C" void MatEntry__ctor_m1949610076 (MatEntry_t2957107092 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Material::.ctor(UnityEngine.Material) extern "C" void Material__ctor_m1233271481 (Material_t340375123 * __this, Material_t340375123 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Object::set_hideFlags(UnityEngine.HideFlags) extern "C" void Object_set_hideFlags_m395729791 (Object_t631007953 * __this, int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.String System.String::Format(System.String,System.Object[]) extern "C" String_t* String_Format_m630303134 (Il2CppObject * __this /* static, unused */, String_t* p0, ObjectU5BU5D_t2843939325* p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Object::set_name(System.String) extern "C" void Object_set_name_m653319976 (Object_t631007953 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Material::SetInt(System.String,System.Int32) extern "C" void Material_SetInt_m1704877877 (Material_t340375123 * __this, String_t* p0, int32_t p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Material::EnableKeyword(System.String) extern "C" void Material_EnableKeyword_m2512384881 (Material_t340375123 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Material::DisableKeyword(System.String) extern "C" void Material_DisableKeyword_m2735472083 (Material_t340375123 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry>::Add(!0) #define List_1_Add_m873450360(__this, p0, method) (( void (*) (List_1_t134214538 *, MatEntry_t2957107092 *, const MethodInfo*))List_1_Add_m3338814081_gshared)(__this, p0, method) // System.Void UnityEngine.UI.Misc::DestroyImmediate(UnityEngine.Object) extern "C" void Misc_DestroyImmediate_m3534039591 (Il2CppObject * __this /* static, unused */, Object_t631007953 * ___obj0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry>::RemoveAt(System.Int32) #define List_1_RemoveAt_m294572737(__this, p0, method) (( void (*) (List_1_t134214538 *, int32_t, const MethodInfo*))List_1_RemoveAt_m2730968292_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry>::Clear() #define List_1_Clear_m434664315(__this, method) (( void (*) (List_1_t134214538 *, const MethodInfo*))List_1_Clear_m3697625829_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.StencilMaterial/MatEntry>::.ctor() #define List_1__ctor_m242441510(__this, method) (( void (*) (List_1_t134214538 *, const MethodInfo*))List_1__ctor_m2321703786_gshared)(__this, method) // UnityEngine.UI.FontData UnityEngine.UI.FontData::get_defaultFontData() extern "C" FontData_t746620069 * FontData_get_defaultFontData_m1721612217 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 System.String::get_Length() extern "C" int32_t String_get_Length_m3847582255 (String_t* __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.TextGenerator::.ctor(System.Int32) extern "C" void TextGenerator__ctor_m3399958253 (TextGenerator_t3211863866 * __this, int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.TextGenerator::.ctor() extern "C" void TextGenerator__ctor_m2017520511 (TextGenerator_t3211863866 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Font UnityEngine.UI.Text::get_font() extern "C" Font_t1956802104 * Text_get_font_m2857203289 (Text_t1901882714 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Material UnityEngine.Font::get_material() extern "C" Material_t340375123 * Font_get_material_m2838483357 (Font_t1956802104 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Texture UnityEngine.UI.Graphic::get_mainTexture() extern "C" Texture_t3661962703 * Graphic_get_mainTexture_m147151966 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.TextGenerator UnityEngine.UI.Text::get_cachedTextGenerator() extern "C" TextGenerator_t3211863866 * Text_get_cachedTextGenerator_m2506989875 (Text_t1901882714 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.TextGenerator::Invalidate() extern "C" void TextGenerator_Invalidate_m3806469489 (TextGenerator_t3211863866 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.CanvasUpdateRegistry::IsRebuildingGraphics() extern "C" bool CanvasUpdateRegistry_IsRebuildingGraphics_m1904586840 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Font UnityEngine.UI.FontData::get_font() extern "C" Font_t1956802104 * FontData_get_font_m2720086288 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontUpdateTracker::UntrackText(UnityEngine.UI.Text) extern "C" void FontUpdateTracker_UntrackText_m1981515690 (Il2CppObject * __this /* static, unused */, Text_t1901882714 * ___t0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_font(UnityEngine.Font) extern "C" void FontData_set_font_m3514564971 (FontData_t746620069 * __this, Font_t1956802104 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontUpdateTracker::TrackText(UnityEngine.UI.Text) extern "C" void FontUpdateTracker_TrackText_m2951516607 (Il2CppObject * __this /* static, unused */, Text_t1901882714 * ___t0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean System.String::op_Inequality(System.String,System.String) extern "C" bool String_op_Inequality_m215368492 (Il2CppObject * __this /* static, unused */, String_t* p0, String_t* p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.FontData::get_richText() extern "C" bool FontData_get_richText_m3425673597 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_richText(System.Boolean) extern "C" void FontData_set_richText_m993590067 (FontData_t746620069 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.FontData::get_bestFit() extern "C" bool FontData_get_bestFit_m162767615 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_bestFit(System.Boolean) extern "C" void FontData_set_bestFit_m199436960 (FontData_t746620069 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.UI.FontData::get_minSize() extern "C" int32_t FontData_get_minSize_m4139263154 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_minSize(System.Int32) extern "C" void FontData_set_minSize_m213866975 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.UI.FontData::get_maxSize() extern "C" int32_t FontData_get_maxSize_m195374730 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_maxSize(System.Int32) extern "C" void FontData_set_maxSize_m1770582000 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.TextAnchor UnityEngine.UI.FontData::get_alignment() extern "C" int32_t FontData_get_alignment_m3694916235 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_alignment(UnityEngine.TextAnchor) extern "C" void FontData_set_alignment_m1506742557 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.FontData::get_alignByGeometry() extern "C" bool FontData_get_alignByGeometry_m2805576119 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_alignByGeometry(System.Boolean) extern "C" void FontData_set_alignByGeometry_m3039505596 (FontData_t746620069 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.UI.FontData::get_fontSize() extern "C" int32_t FontData_get_fontSize_m4142428560 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_fontSize(System.Int32) extern "C" void FontData_set_fontSize_m2765857076 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.HorizontalWrapMode UnityEngine.UI.FontData::get_horizontalOverflow() extern "C" int32_t FontData_get_horizontalOverflow_m2769815943 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_horizontalOverflow(UnityEngine.HorizontalWrapMode) extern "C" void FontData_set_horizontalOverflow_m83710366 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.VerticalWrapMode UnityEngine.UI.FontData::get_verticalOverflow() extern "C" int32_t FontData_get_verticalOverflow_m4132840071 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_verticalOverflow(UnityEngine.VerticalWrapMode) extern "C" void FontData_set_verticalOverflow_m3628581825 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.FontData::get_lineSpacing() extern "C" float FontData_get_lineSpacing_m2772945641 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_lineSpacing(System.Single) extern "C" void FontData_set_lineSpacing_m3900627226 (FontData_t746620069 * __this, float ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.FontStyle UnityEngine.UI.FontData::get_fontStyle() extern "C" int32_t FontData_get_fontStyle_m4265053049 (FontData_t746620069 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.FontData::set_fontStyle(UnityEngine.FontStyle) extern "C" void FontData_set_fontStyle_m3365296225 (FontData_t746620069 * __this, int32_t ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.Font::get_dynamic() extern "C" bool Font_get_dynamic_m1886714215 (Font_t1956802104 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.Canvas::get_scaleFactor() extern "C" float Canvas_get_scaleFactor_m2033584752 (Canvas_t3310196443 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Int32 UnityEngine.Font::get_fontSize() extern "C" int32_t Font_get_fontSize_m4011052026 (Font_t1956802104 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskableGraphic::OnEnable() extern "C" void MaskableGraphic_OnEnable_m846302383 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.MaskableGraphic::OnDisable() extern "C" void MaskableGraphic_OnDisable_m1757789159 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Graphic::UpdateGeometry() extern "C" void Graphic_UpdateGeometry_m1153074938 (Graphic_t1660335611 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !!0 UnityEngine.Resources::GetBuiltinResource<UnityEngine.Font>(System.String) #define Resources_GetBuiltinResource_TisFont_t1956802104_m2738776830(__this /* static, unused */, p0, method) (( Font_t1956802104 * (*) (Il2CppObject * /* static, unused */, String_t*, const MethodInfo*))Resources_GetBuiltinResource_TisIl2CppObject_m3352626831_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.UI.Text::set_font(UnityEngine.Font) extern "C" void Text_set_font_m2192091651 (Text_t1901882714 * __this, Font_t1956802104 * ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.UI.Text::get_pixelsPerUnit() extern "C" float Text_get_pixelsPerUnit_m4041777403 (Text_t1901882714 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.TextGenerationSettings UnityEngine.UI.Text::GetGenerationSettings(UnityEngine.Vector2) extern "C" TextGenerationSettings_t1351628751 Text_GetGenerationSettings_m1390856115 (Text_t1901882714 * __this, Vector2_t2156229523 ___extents0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.TextGenerator::PopulateWithErrors(System.String,UnityEngine.TextGenerationSettings,UnityEngine.GameObject) extern "C" bool TextGenerator_PopulateWithErrors_m4240218382 (TextGenerator_t3211863866 * __this, String_t* p0, TextGenerationSettings_t1351628751 p1, GameObject_t1113636619 * p2, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Collections.Generic.IList`1<UnityEngine.UIVertex> UnityEngine.TextGenerator::get_verts() extern "C" Il2CppObject* TextGenerator_get_verts_m292946303 (TextGenerator_t3211863866 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2 UnityEngine.UI.Graphic::PixelAdjustPoint(UnityEngine.Vector2) extern "C" Vector2_t2156229523 Graphic_PixelAdjustPoint_m2668101213 (Graphic_t1660335611 * __this, Vector2_t2156229523 ___point0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::op_Multiply(UnityEngine.Vector3,System.Single) extern "C" Vector3_t3722313464 Vector3_op_Multiply_m3506743150 (Il2CppObject * __this /* static, unused */, Vector3_t3722313464 p0, float p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.VertexHelper::AddUIVertexQuad(UnityEngine.UIVertex[]) extern "C" void VertexHelper_AddUIVertexQuad_m4228725261 (VertexHelper_t2453304189 * __this, UIVertexU5BU5D_t1981460040* ___verts0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.TextGenerator UnityEngine.UI.Text::get_cachedTextGeneratorForLayout() extern "C" TextGenerator_t3211863866 * Text_get_cachedTextGeneratorForLayout_m116487342 (Text_t1901882714 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.TextGenerator::GetPreferredWidth(System.String,UnityEngine.TextGenerationSettings) extern "C" float TextGenerator_GetPreferredWidth_m2934157277 (TextGenerator_t3211863866 * __this, String_t* p0, TextGenerationSettings_t1351628751 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Single UnityEngine.TextGenerator::GetPreferredHeight(System.String,UnityEngine.TextGenerationSettings) extern "C" float TextGenerator_GetPreferredHeight_m3296906652 (TextGenerator_t3211863866 * __this, String_t* p0, TextGenerationSettings_t1351628751 p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle/ToggleEvent::.ctor() extern "C" void ToggleEvent__ctor_m834619998 (ToggleEvent_t1873685584 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle::SetToggleGroup(UnityEngine.UI.ToggleGroup,System.Boolean) extern "C" void Toggle_SetToggleGroup_m1839040161 (Toggle_t2735377061 * __this, ToggleGroup_t123837990 * ___newGroup0, bool ___setMemberValue1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle::PlayEffect(System.Boolean) extern "C" void Toggle_PlayEffect_m1836683914 (Toggle_t2735377061 * __this, bool ___instant0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Color UnityEngine.CanvasRenderer::GetColor() extern "C" Color_t2555686324 CanvasRenderer_GetColor_m4231047588 (CanvasRenderer_t2598313366 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle::Set(System.Boolean) extern "C" void Toggle_Set_m1885801159 (Toggle_t2735377061 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Selectable::OnDidApplyAnimationProperties() extern "C" void Selectable_OnDidApplyAnimationProperties_m1530194632 (Selectable_t3250028441 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ToggleGroup::UnregisterToggle(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_UnregisterToggle_m2846655738 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ToggleGroup::RegisterToggle(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_RegisterToggle_m2988917171 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.Toggle::get_isOn() extern "C" bool Toggle_get_isOn_m1428293607 (Toggle_t2735377061 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ToggleGroup::NotifyToggleOn(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_NotifyToggleOn_m1290826648 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle::Set(System.Boolean,System.Boolean) extern "C" void Toggle_Set_m262975082 (Toggle_t2735377061 * __this, bool ___value0, bool ___sendCallback1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ToggleGroup::AnyTogglesOn() extern "C" bool ToggleGroup_AnyTogglesOn_m1117012929 (ToggleGroup_t123837990 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Boolean UnityEngine.UI.ToggleGroup::get_allowSwitchOff() extern "C" bool ToggleGroup_get_allowSwitchOff_m3913189773 (ToggleGroup_t123837990 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle::set_isOn(System.Boolean) extern "C" void Toggle_set_isOn_m3548357404 (Toggle_t2735377061 * __this, bool ___value0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.Toggle::InternalToggle() extern "C" void Toggle_InternalToggle_m1483593526 (Toggle_t2735377061 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::.ctor() #define List_1__ctor_m2588665925(__this, method) (( void (*) (List_1_t4207451803 *, const MethodInfo*))List_1__ctor_m2321703786_gshared)(__this, method) // System.Boolean System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::Contains(!0) #define List_1_Contains_m3066673312(__this, p0, method) (( bool (*) (List_1_t4207451803 *, Toggle_t2735377061 *, const MethodInfo*))List_1_Contains_m2654125393_gshared)(__this, p0, method) // System.Void System.ArgumentException::.ctor(System.String) extern "C" void ArgumentException__ctor_m1312628991 (ArgumentException_t132251570 * __this, String_t* p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ToggleGroup::ValidateToggleIsInGroup(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_ValidateToggleIsInGroup_m3201190739 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // !0 System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::get_Item(System.Int32) #define List_1_get_Item_m2702804483(__this, p0, method) (( Toggle_t2735377061 * (*) (List_1_t4207451803 *, int32_t, const MethodInfo*))List_1_get_Item_m2287542950_gshared)(__this, p0, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::get_Count() #define List_1_get_Count_m3208757669(__this, method) (( int32_t (*) (List_1_t4207451803 *, const MethodInfo*))List_1_get_Count_m2934127733_gshared)(__this, method) // System.Boolean System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::Remove(!0) #define List_1_Remove_m3511411763(__this, p0, method) (( bool (*) (List_1_t4207451803 *, Toggle_t2735377061 *, const MethodInfo*))List_1_Remove_m1416767016_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::Add(!0) #define List_1_Add_m2727533441(__this, p0, method) (( void (*) (List_1_t4207451803 *, Toggle_t2735377061 *, const MethodInfo*))List_1_Add_m3338814081_gshared)(__this, p0, method) // System.Void System.Predicate`1<UnityEngine.UI.Toggle>::.ctor(System.Object,System.IntPtr) #define Predicate_1__ctor_m3952340036(__this, p0, p1, method) (( void (*) (Predicate_1_t3560671185 *, Il2CppObject *, IntPtr_t, const MethodInfo*))Predicate_1__ctor_m327447107_gshared)(__this, p0, p1, method) // !0 System.Collections.Generic.List`1<UnityEngine.UI.Toggle>::Find(System.Predicate`1<!0>) #define List_1_Find_m101937419(__this, p0, method) (( Toggle_t2735377061 * (*) (List_1_t4207451803 *, Predicate_1_t3560671185 *, const MethodInfo*))List_1_Find_m2048854920_gshared)(__this, p0, method) // System.Void System.Func`2<UnityEngine.UI.Toggle,System.Boolean>::.ctor(System.Object,System.IntPtr) #define Func_2__ctor_m16758224(__this, p0, p1, method) (( void (*) (Func_2_t3446800538 *, Il2CppObject *, IntPtr_t, const MethodInfo*))Func_2__ctor_m3104565095_gshared)(__this, p0, p1, method) // System.Collections.Generic.IEnumerable`1<!!0> System.Linq.Enumerable::Where<UnityEngine.UI.Toggle>(System.Collections.Generic.IEnumerable`1<!!0>,System.Func`2<!!0,System.Boolean>) #define Enumerable_Where_TisToggle_t2735377061_m3965946053(__this /* static, unused */, p0, p1, method) (( Il2CppObject* (*) (Il2CppObject * /* static, unused */, Il2CppObject*, Func_2_t3446800538 *, const MethodInfo*))Enumerable_Where_TisIl2CppObject_m2166527282_gshared)(__this /* static, unused */, p0, p1, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Vector3>::Get() #define ListPool_1_Get_m3176649063(__this /* static, unused */, method) (( List_1_t899420910 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m3176649063_gshared)(__this /* static, unused */, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Color32>::Get() #define ListPool_1_Get_m2875520964(__this /* static, unused */, method) (( List_1_t4072576034 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m2875520964_gshared)(__this /* static, unused */, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Vector2>::Get() #define ListPool_1_Get_m3176650548(__this /* static, unused */, method) (( List_1_t3628304265 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m3176650548_gshared)(__this /* static, unused */, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<UnityEngine.Vector4>::Get() #define ListPool_1_Get_m3176656818(__this /* static, unused */, method) (( List_1_t496136383 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m3176656818_gshared)(__this /* static, unused */, method) // System.Collections.Generic.List`1<T> UnityEngine.UI.ListPool`1<System.Int32>::Get() #define ListPool_1_Get_m2031605680(__this /* static, unused */, method) (( List_1_t128053199 * (*) (Il2CppObject * /* static, unused */, const MethodInfo*))ListPool_1_Get_m2031605680_gshared)(__this /* static, unused */, method) // UnityEngine.Vector3[] UnityEngine.Mesh::get_vertices() extern "C" Vector3U5BU5D_t1718750761* Mesh_get_vertices_m1585974779 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) #define List_1_AddRange_m1173251377(__this, p0, method) (( void (*) (List_1_t899420910 *, Il2CppObject*, const MethodInfo*))List_1_AddRange_m1173251377_gshared)(__this, p0, method) // UnityEngine.Color32[] UnityEngine.Mesh::get_colors32() extern "C" Color32U5BU5D_t3850468773* Mesh_get_colors32_m3827471077 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) #define List_1_AddRange_m3935442072(__this, p0, method) (( void (*) (List_1_t4072576034 *, Il2CppObject*, const MethodInfo*))List_1_AddRange_m3935442072_gshared)(__this, p0, method) // UnityEngine.Vector2[] UnityEngine.Mesh::get_uv() extern "C" Vector2U5BU5D_t1457185986* Mesh_get_uv_m1820151371 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) #define List_1_AddRange_m705206751(__this, p0, method) (( void (*) (List_1_t3628304265 *, Il2CppObject*, const MethodInfo*))List_1_AddRange_m705206751_gshared)(__this, p0, method) // UnityEngine.Vector2[] UnityEngine.Mesh::get_uv2() extern "C" Vector2U5BU5D_t1457185986* Mesh_get_uv2_m2122735555 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2[] UnityEngine.Mesh::get_uv3() extern "C" Vector2U5BU5D_t1457185986* Mesh_get_uv3_m3688819496 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector2[] UnityEngine.Mesh::get_uv4() extern "C" Vector2U5BU5D_t1457185986* Mesh_get_uv4_m959936141 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3[] UnityEngine.Mesh::get_normals() extern "C" Vector3U5BU5D_t1718750761* Mesh_get_normals_m2907452492 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector4[] UnityEngine.Mesh::get_tangents() extern "C" Vector4U5BU5D_t934056436* Mesh_get_tangents_m1290253362 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) #define List_1_AddRange_m2686762046(__this, p0, method) (( void (*) (List_1_t496136383 *, Il2CppObject*, const MethodInfo*))List_1_AddRange_m2686762046_gshared)(__this, p0, method) // System.Int32[] UnityEngine.Mesh::GetIndices(System.Int32) extern "C" Int32U5BU5D_t385246372* Mesh_GetIndices_m3905519886 (Mesh_t3648964284 * __this, int32_t p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<System.Int32>::AddRange(System.Collections.Generic.IEnumerable`1<!0>) #define List_1_AddRange_m3513848896(__this, p0, method) (( void (*) (List_1_t128053199 *, Il2CppObject*, const MethodInfo*))List_1_AddRange_m3513848896_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::Clear() #define List_1_Clear_m3097985365(__this, method) (( void (*) (List_1_t899420910 *, const MethodInfo*))List_1_Clear_m3097985365_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::Clear() #define List_1_Clear_m3048681609(__this, method) (( void (*) (List_1_t4072576034 *, const MethodInfo*))List_1_Clear_m3048681609_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::Clear() #define List_1_Clear_m2188935509(__this, method) (( void (*) (List_1_t3628304265 *, const MethodInfo*))List_1_Clear_m2188935509_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::Clear() #define List_1_Clear_m4187652437(__this, method) (( void (*) (List_1_t496136383 *, const MethodInfo*))List_1_Clear_m4187652437_gshared)(__this, method) // System.Void System.Collections.Generic.List`1<System.Int32>::Clear() #define List_1_Clear_m2917552199(__this, method) (( void (*) (List_1_t128053199 *, const MethodInfo*))List_1_Clear_m2917552199_gshared)(__this, method) // System.Int32 System.Collections.Generic.List`1<UnityEngine.Vector3>::get_Count() #define List_1_get_Count_m576380744(__this, method) (( int32_t (*) (List_1_t899420910 *, const MethodInfo*))List_1_get_Count_m576380744_gshared)(__this, method) // System.Int32 System.Collections.Generic.List`1<System.Int32>::get_Count() #define List_1_get_Count_m361000296(__this, method) (( int32_t (*) (List_1_t128053199 *, const MethodInfo*))List_1_get_Count_m361000296_gshared)(__this, method) // !0 System.Collections.Generic.List`1<UnityEngine.Vector3>::get_Item(System.Int32) #define List_1_get_Item_m200663048(__this, p0, method) (( Vector3_t3722313464 (*) (List_1_t899420910 *, int32_t, const MethodInfo*))List_1_get_Item_m200663048_gshared)(__this, p0, method) // !0 System.Collections.Generic.List`1<UnityEngine.Color32>::get_Item(System.Int32) #define List_1_get_Item_m3890325344(__this, p0, method) (( Color32_t2600501292 (*) (List_1_t4072576034 *, int32_t, const MethodInfo*))List_1_get_Item_m3890325344_gshared)(__this, p0, method) // !0 System.Collections.Generic.List`1<UnityEngine.Vector2>::get_Item(System.Int32) #define List_1_get_Item_m1378751541(__this, p0, method) (( Vector2_t2156229523 (*) (List_1_t3628304265 *, int32_t, const MethodInfo*))List_1_get_Item_m1378751541_gshared)(__this, p0, method) // !0 System.Collections.Generic.List`1<UnityEngine.Vector4>::get_Item(System.Int32) #define List_1_get_Item_m783205072(__this, p0, method) (( Vector4_t3319028937 (*) (List_1_t496136383 *, int32_t, const MethodInfo*))List_1_get_Item_m783205072_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::set_Item(System.Int32,!0) #define List_1_set_Item_m658432263(__this, p0, p1, method) (( void (*) (List_1_t899420910 *, int32_t, Vector3_t3722313464 , const MethodInfo*))List_1_set_Item_m658432263_gshared)(__this, p0, p1, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::set_Item(System.Int32,!0) #define List_1_set_Item_m4249175531(__this, p0, p1, method) (( void (*) (List_1_t4072576034 *, int32_t, Color32_t2600501292 , const MethodInfo*))List_1_set_Item_m4249175531_gshared)(__this, p0, p1, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::set_Item(System.Int32,!0) #define List_1_set_Item_m35836043(__this, p0, p1, method) (( void (*) (List_1_t3628304265 *, int32_t, Vector2_t2156229523 , const MethodInfo*))List_1_set_Item_m35836043_gshared)(__this, p0, p1, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::set_Item(System.Int32,!0) #define List_1_set_Item_m1118509050(__this, p0, p1, method) (( void (*) (List_1_t496136383 *, int32_t, Vector4_t3319028937 , const MethodInfo*))List_1_set_Item_m1118509050_gshared)(__this, p0, p1, method) // System.Void UnityEngine.Mesh::Clear() extern "C" void Mesh_Clear_m2707175420 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::SetVertices(System.Collections.Generic.List`1<UnityEngine.Vector3>) extern "C" void Mesh_SetVertices_m2641879696 (Mesh_t3648964284 * __this, List_1_t899420910 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::SetColors(System.Collections.Generic.List`1<UnityEngine.Color32>) extern "C" void Mesh_SetColors_m3397914746 (Mesh_t3648964284 * __this, List_1_t4072576034 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::SetUVs(System.Int32,System.Collections.Generic.List`1<UnityEngine.Vector2>) extern "C" void Mesh_SetUVs_m1321350398 (Mesh_t3648964284 * __this, int32_t p0, List_1_t3628304265 * p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::SetNormals(System.Collections.Generic.List`1<UnityEngine.Vector3>) extern "C" void Mesh_SetNormals_m404565226 (Mesh_t3648964284 * __this, List_1_t899420910 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::SetTangents(System.Collections.Generic.List`1<UnityEngine.Vector4>) extern "C" void Mesh_SetTangents_m2687625516 (Mesh_t3648964284 * __this, List_1_t496136383 * p0, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::SetTriangles(System.Collections.Generic.List`1<System.Int32>,System.Int32) extern "C" void Mesh_SetTriangles_m490283541 (Mesh_t3648964284 * __this, List_1_t128053199 * p0, int32_t p1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.Mesh::RecalculateBounds() extern "C" void Mesh_RecalculateBounds_m1919550338 (Mesh_t3648964284 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Vector3>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m4113115349(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t899420910 *, const MethodInfo*))ListPool_1_Release_m4113115349_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Color32>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m2857821093(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t4072576034 *, const MethodInfo*))ListPool_1_Release_m2857821093_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Vector2>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m591299672(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t3628304265 *, const MethodInfo*))ListPool_1_Release_m591299672_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.UI.ListPool`1<UnityEngine.Vector4>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m1363449253(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t496136383 *, const MethodInfo*))ListPool_1_Release_m1363449253_gshared)(__this /* static, unused */, p0, method) // System.Void UnityEngine.UI.ListPool`1<System.Int32>::Release(System.Collections.Generic.List`1<T>) #define ListPool_1_Release_m188599205(__this /* static, unused */, p0, method) (( void (*) (Il2CppObject * /* static, unused */, List_1_t128053199 *, const MethodInfo*))ListPool_1_Release_m188599205_gshared)(__this /* static, unused */, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector3>::Add(!0) #define List_1_Add_m4259514621(__this, p0, method) (( void (*) (List_1_t899420910 *, Vector3_t3722313464 , const MethodInfo*))List_1_Add_m4259514621_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Color32>::Add(!0) #define List_1_Add_m3372602044(__this, p0, method) (( void (*) (List_1_t4072576034 *, Color32_t2600501292 , const MethodInfo*))List_1_Add_m3372602044_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector2>::Add(!0) #define List_1_Add_m4259515774(__this, p0, method) (( void (*) (List_1_t3628304265 *, Vector2_t2156229523 , const MethodInfo*))List_1_Add_m4259515774_gshared)(__this, p0, method) // System.Void System.Collections.Generic.List`1<UnityEngine.Vector4>::Add(!0) #define List_1_Add_m4259509372(__this, p0, method) (( void (*) (List_1_t496136383 *, Vector4_t3319028937 , const MethodInfo*))List_1_Add_m4259509372_gshared)(__this, p0, method) // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.Vector3,UnityEngine.Color32,UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector3,UnityEngine.Vector4) extern "C" void VertexHelper_AddVert_m189858127 (VertexHelper_t2453304189 * __this, Vector3_t3722313464 ___position0, Color32_t2600501292 ___color1, Vector2_t2156229523 ___uv02, Vector2_t2156229523 ___uv13, Vector3_t3722313464 ___normal4, Vector4_t3319028937 ___tangent5, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void System.Collections.Generic.List`1<System.Int32>::Add(!0) #define List_1_Add_m4025721294(__this, p0, method) (( void (*) (List_1_t128053199 *, int32_t, const MethodInfo*))List_1_Add_m4025721294_gshared)(__this, p0, method) // System.Void UnityEngine.CanvasRenderer::AddUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Color32>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Vector4>) extern "C" void CanvasRenderer_AddUIVertexStream_m681118477 (Il2CppObject * __this /* static, unused */, List_1_t1234605051 * p0, List_1_t899420910 * p1, List_1_t4072576034 * p2, List_1_t3628304265 * p3, List_1_t3628304265 * p4, List_1_t899420910 * p5, List_1_t496136383 * p6, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::SplitUIVertexStreams(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Color32>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Vector4>,System.Collections.Generic.List`1<System.Int32>) extern "C" void CanvasRenderer_SplitUIVertexStreams_m557540500 (Il2CppObject * __this /* static, unused */, List_1_t1234605051 * p0, List_1_t899420910 * p1, List_1_t4072576034 * p2, List_1_t3628304265 * p3, List_1_t3628304265 * p4, List_1_t899420910 * p5, List_1_t496136383 * p6, List_1_t128053199 * p7, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.CanvasRenderer::CreateUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Color32>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Vector4>,System.Collections.Generic.List`1<System.Int32>) extern "C" void CanvasRenderer_CreateUIVertexStream_m1315334716 (Il2CppObject * __this /* static, unused */, List_1_t1234605051 * p0, List_1_t899420910 * p1, List_1_t4072576034 * p2, List_1_t3628304265 * p3, List_1_t3628304265 * p4, List_1_t899420910 * p5, List_1_t496136383 * p6, List_1_t128053199 * p7, const MethodInfo* method) IL2CPP_METHOD_ATTR; // UnityEngine.Vector3 UnityEngine.Vector3::get_back() extern "C" Vector3_t3722313464 Vector3_get_back_m4227631978 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.HorizontalOrVerticalLayoutGroup::.ctor() extern "C" void HorizontalOrVerticalLayoutGroup__ctor_m2302505481 (HorizontalOrVerticalLayoutGroup_t729725570 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.LayoutGroup::CalculateLayoutInputHorizontal() extern "C" void LayoutGroup_CalculateLayoutInputHorizontal_m4018851777 (LayoutGroup_t2436138090 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.HorizontalOrVerticalLayoutGroup::CalcAlongAxis(System.Int32,System.Boolean) extern "C" void HorizontalOrVerticalLayoutGroup_CalcAlongAxis_m3977117339 (HorizontalOrVerticalLayoutGroup_t729725570 * __this, int32_t ___axis0, bool ___isVertical1, const MethodInfo* method) IL2CPP_METHOD_ATTR; // System.Void UnityEngine.UI.HorizontalOrVerticalLayoutGroup::SetChildrenAlongAxis(System.Int32,System.Boolean) extern "C" void HorizontalOrVerticalLayoutGroup_SetChildrenAlongAxis_m3119377192 (HorizontalOrVerticalLayoutGroup_t729725570 * __this, int32_t ___axis0, bool ___isVertical1, const MethodInfo* method) IL2CPP_METHOD_ATTR; #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Single UnityEngine.UI.LayoutUtility::GetMinSize(UnityEngine.RectTransform,System.Int32) extern "C" float LayoutUtility_GetMinSize_m2572843166 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, int32_t ___axis1, const MethodInfo* method) { float V_0 = 0.0f; { int32_t L_0 = ___axis1; if (L_0) { goto IL_0013; } } { RectTransform_t3704657025 * L_1 = ___rect0; float L_2 = LayoutUtility_GetMinWidth_m3612214871(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_001f; } IL_0013: { RectTransform_t3704657025 * L_3 = ___rect0; float L_4 = LayoutUtility_GetMinHeight_m4082139234(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); V_0 = L_4; goto IL_001f; } IL_001f: { float L_5 = V_0; return L_5; } } // System.Single UnityEngine.UI.LayoutUtility::GetPreferredSize(UnityEngine.RectTransform,System.Int32) extern "C" float LayoutUtility_GetPreferredSize_m536572840 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, int32_t ___axis1, const MethodInfo* method) { float V_0 = 0.0f; { int32_t L_0 = ___axis1; if (L_0) { goto IL_0013; } } { RectTransform_t3704657025 * L_1 = ___rect0; float L_2 = LayoutUtility_GetPreferredWidth_m3678713536(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_001f; } IL_0013: { RectTransform_t3704657025 * L_3 = ___rect0; float L_4 = LayoutUtility_GetPreferredHeight_m954532477(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); V_0 = L_4; goto IL_001f; } IL_001f: { float L_5 = V_0; return L_5; } } // System.Single UnityEngine.UI.LayoutUtility::GetFlexibleSize(UnityEngine.RectTransform,System.Int32) extern "C" float LayoutUtility_GetFlexibleSize_m2817211215 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, int32_t ___axis1, const MethodInfo* method) { float V_0 = 0.0f; { int32_t L_0 = ___axis1; if (L_0) { goto IL_0013; } } { RectTransform_t3704657025 * L_1 = ___rect0; float L_2 = LayoutUtility_GetFlexibleWidth_m22831835(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_001f; } IL_0013: { RectTransform_t3704657025 * L_3 = ___rect0; float L_4 = LayoutUtility_GetFlexibleHeight_m84018936(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); V_0 = L_4; goto IL_001f; } IL_001f: { float L_5 = V_0; return L_5; } } // System.Single UnityEngine.UI.LayoutUtility::GetMinWidth(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetMinWidth_m3612214871 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetMinWidth_m3612214871_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache0_0(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001a; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)LayoutUtility_U3CGetMinWidthU3Em__0_m398152306_MethodInfo_var); Func_2_t235587086 * L_3 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache0_0(L_3); G_B2_0 = G_B1_0; } IL_001a: { Func_2_t235587086 * L_4 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache0_0(); float L_5 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B2_0, L_4, (0.0f), /*hidden argument*/NULL); V_0 = L_5; goto IL_002f; } IL_002f: { float L_6 = V_0; return L_6; } } // System.Single UnityEngine.UI.LayoutUtility::GetPreferredWidth(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetPreferredWidth_m3678713536 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetPreferredWidth_m3678713536_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; RectTransform_t3704657025 * G_B4_0 = NULL; float G_B4_1 = 0.0f; RectTransform_t3704657025 * G_B3_0 = NULL; float G_B3_1 = 0.0f; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache1_1(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001a; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)LayoutUtility_U3CGetPreferredWidthU3Em__1_m74273510_MethodInfo_var); Func_2_t235587086 * L_3 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache1_1(L_3); G_B2_0 = G_B1_0; } IL_001a: { Func_2_t235587086 * L_4 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache1_1(); float L_5 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B2_0, L_4, (0.0f), /*hidden argument*/NULL); RectTransform_t3704657025 * L_6 = ___rect0; Func_2_t235587086 * L_7 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache2_2(); G_B3_0 = L_6; G_B3_1 = L_5; if (L_7) { G_B4_0 = L_6; G_B4_1 = L_5; goto IL_0042; } } { IntPtr_t L_8; L_8.set_m_value_0((void*)(void*)LayoutUtility_U3CGetPreferredWidthU3Em__2_m1610950633_MethodInfo_var); Func_2_t235587086 * L_9 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_9, NULL, L_8, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache2_2(L_9); G_B4_0 = G_B3_0; G_B4_1 = G_B3_1; } IL_0042: { Func_2_t235587086 * L_10 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache2_2(); float L_11 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B4_0, L_10, (0.0f), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_12 = Mathf_Max_m571965535(NULL /*static, unused*/, G_B4_1, L_11, /*hidden argument*/NULL); V_0 = L_12; goto IL_005c; } IL_005c: { float L_13 = V_0; return L_13; } } // System.Single UnityEngine.UI.LayoutUtility::GetFlexibleWidth(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetFlexibleWidth_m22831835 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetFlexibleWidth_m22831835_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache3_3(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001a; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)LayoutUtility_U3CGetFlexibleWidthU3Em__3_m1091238571_MethodInfo_var); Func_2_t235587086 * L_3 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache3_3(L_3); G_B2_0 = G_B1_0; } IL_001a: { Func_2_t235587086 * L_4 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache3_3(); float L_5 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B2_0, L_4, (0.0f), /*hidden argument*/NULL); V_0 = L_5; goto IL_002f; } IL_002f: { float L_6 = V_0; return L_6; } } // System.Single UnityEngine.UI.LayoutUtility::GetMinHeight(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetMinHeight_m4082139234 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetMinHeight_m4082139234_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache4_4(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001a; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)LayoutUtility_U3CGetMinHeightU3Em__4_m2382889764_MethodInfo_var); Func_2_t235587086 * L_3 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache4_4(L_3); G_B2_0 = G_B1_0; } IL_001a: { Func_2_t235587086 * L_4 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache4_4(); float L_5 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B2_0, L_4, (0.0f), /*hidden argument*/NULL); V_0 = L_5; goto IL_002f; } IL_002f: { float L_6 = V_0; return L_6; } } // System.Single UnityEngine.UI.LayoutUtility::GetPreferredHeight(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetPreferredHeight_m954532477 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetPreferredHeight_m954532477_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; RectTransform_t3704657025 * G_B4_0 = NULL; float G_B4_1 = 0.0f; RectTransform_t3704657025 * G_B3_0 = NULL; float G_B3_1 = 0.0f; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache5_5(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001a; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)LayoutUtility_U3CGetPreferredHeightU3Em__5_m407820296_MethodInfo_var); Func_2_t235587086 * L_3 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache5_5(L_3); G_B2_0 = G_B1_0; } IL_001a: { Func_2_t235587086 * L_4 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache5_5(); float L_5 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B2_0, L_4, (0.0f), /*hidden argument*/NULL); RectTransform_t3704657025 * L_6 = ___rect0; Func_2_t235587086 * L_7 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache6_6(); G_B3_0 = L_6; G_B3_1 = L_5; if (L_7) { G_B4_0 = L_6; G_B4_1 = L_5; goto IL_0042; } } { IntPtr_t L_8; L_8.set_m_value_0((void*)(void*)LayoutUtility_U3CGetPreferredHeightU3Em__6_m3049688934_MethodInfo_var); Func_2_t235587086 * L_9 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_9, NULL, L_8, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache6_6(L_9); G_B4_0 = G_B3_0; G_B4_1 = G_B3_1; } IL_0042: { Func_2_t235587086 * L_10 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache6_6(); float L_11 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B4_0, L_10, (0.0f), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_12 = Mathf_Max_m571965535(NULL /*static, unused*/, G_B4_1, L_11, /*hidden argument*/NULL); V_0 = L_12; goto IL_005c; } IL_005c: { float L_13 = V_0; return L_13; } } // System.Single UnityEngine.UI.LayoutUtility::GetFlexibleHeight(UnityEngine.RectTransform) extern "C" float LayoutUtility_GetFlexibleHeight_m84018936 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetFlexibleHeight_m84018936_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache7_7(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001a; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)LayoutUtility_U3CGetFlexibleHeightU3Em__7_m2991026842_MethodInfo_var); Func_2_t235587086 * L_3 = (Func_2_t235587086 *)il2cpp_codegen_object_new(Func_2_t235587086_il2cpp_TypeInfo_var); Func_2__ctor_m4101054726(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m4101054726_MethodInfo_var); ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache7_7(L_3); G_B2_0 = G_B1_0; } IL_001a: { Func_2_t235587086 * L_4 = ((LayoutUtility_t2745813735_StaticFields*)LayoutUtility_t2745813735_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache7_7(); float L_5 = LayoutUtility_GetLayoutProperty_m3731360667(NULL /*static, unused*/, G_B2_0, L_4, (0.0f), /*hidden argument*/NULL); V_0 = L_5; goto IL_002f; } IL_002f: { float L_6 = V_0; return L_6; } } // System.Single UnityEngine.UI.LayoutUtility::GetLayoutProperty(UnityEngine.RectTransform,System.Func`2<UnityEngine.UI.ILayoutElement,System.Single>,System.Single) extern "C" float LayoutUtility_GetLayoutProperty_m3731360667 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, Func_2_t235587086 * ___property1, float ___defaultValue2, const MethodInfo* method) { Il2CppObject * V_0 = NULL; float V_1 = 0.0f; { RectTransform_t3704657025 * L_0 = ___rect0; Func_2_t235587086 * L_1 = ___property1; float L_2 = ___defaultValue2; float L_3 = LayoutUtility_GetLayoutProperty_m714717302(NULL /*static, unused*/, L_0, L_1, L_2, (&V_0), /*hidden argument*/NULL); V_1 = L_3; goto IL_0011; } IL_0011: { float L_4 = V_1; return L_4; } } // System.Single UnityEngine.UI.LayoutUtility::GetLayoutProperty(UnityEngine.RectTransform,System.Func`2<UnityEngine.UI.ILayoutElement,System.Single>,System.Single,UnityEngine.UI.ILayoutElement&) extern "C" float LayoutUtility_GetLayoutProperty_m714717302 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, Func_2_t235587086 * ___property1, float ___defaultValue2, Il2CppObject ** ___source3, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_GetLayoutProperty_m714717302_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; float V_1 = 0.0f; int32_t V_2 = 0; List_1_t3395709193 * V_3 = NULL; int32_t V_4 = 0; Il2CppObject * V_5 = NULL; int32_t V_6 = 0; float V_7 = 0.0f; { Il2CppObject ** L_0 = ___source3; *((Il2CppObject **)(L_0)) = (Il2CppObject *)NULL; Il2CppCodeGenWriteBarrier((Il2CppObject **)(L_0), (Il2CppObject *)NULL); RectTransform_t3704657025 * L_1 = ___rect0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_001b; } } { V_0 = (0.0f); goto IL_00f0; } IL_001b: { float L_3 = ___defaultValue2; V_1 = L_3; V_2 = ((int32_t)-2147483648LL); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2953223642_il2cpp_TypeInfo_var); List_1_t3395709193 * L_4 = ListPool_1_Get_m2062177143(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2062177143_MethodInfo_var); V_3 = L_4; RectTransform_t3704657025 * L_5 = ___rect0; IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_6 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(ILayoutElement_t4082016710_0_0_0_var), /*hidden argument*/NULL); List_1_t3395709193 * L_7 = V_3; NullCheck(L_5); Component_GetComponents_m4024149016(L_5, L_6, L_7, /*hidden argument*/NULL); V_4 = 0; goto IL_00d6; } IL_0042: { List_1_t3395709193 * L_8 = V_3; int32_t L_9 = V_4; NullCheck(L_8); Component_t1923634451 * L_10 = List_1_get_Item_m3306164819(L_8, L_9, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); V_5 = ((Il2CppObject *)IsInst(L_10, ILayoutElement_t4082016710_il2cpp_TypeInfo_var)); Il2CppObject * L_11 = V_5; if (!((Behaviour_t1437897464 *)IsInstClass(L_11, Behaviour_t1437897464_il2cpp_TypeInfo_var))) { goto IL_0074; } } { Il2CppObject * L_12 = V_5; NullCheck(((Behaviour_t1437897464 *)CastclassClass(L_12, Behaviour_t1437897464_il2cpp_TypeInfo_var))); bool L_13 = Behaviour_get_isActiveAndEnabled_m3013577336(((Behaviour_t1437897464 *)CastclassClass(L_12, Behaviour_t1437897464_il2cpp_TypeInfo_var)), /*hidden argument*/NULL); if (L_13) { goto IL_0074; } } { goto IL_00d0; } IL_0074: { Il2CppObject * L_14 = V_5; NullCheck(L_14); int32_t L_15 = InterfaceFuncInvoker0< int32_t >::Invoke(8 /* System.Int32 UnityEngine.UI.ILayoutElement::get_layoutPriority() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_14); V_6 = L_15; int32_t L_16 = V_6; int32_t L_17 = V_2; if ((((int32_t)L_16) >= ((int32_t)L_17))) { goto IL_008a; } } { goto IL_00d0; } IL_008a: { Func_2_t235587086 * L_18 = ___property1; Il2CppObject * L_19 = V_5; NullCheck(L_18); float L_20 = Func_2_Invoke_m488571475(L_18, L_19, /*hidden argument*/Func_2_Invoke_m488571475_MethodInfo_var); V_7 = L_20; float L_21 = V_7; if ((!(((float)L_21) < ((float)(0.0f))))) { goto IL_00a5; } } { goto IL_00d0; } IL_00a5: { int32_t L_22 = V_6; int32_t L_23 = V_2; if ((((int32_t)L_22) <= ((int32_t)L_23))) { goto IL_00be; } } { float L_24 = V_7; V_1 = L_24; int32_t L_25 = V_6; V_2 = L_25; Il2CppObject ** L_26 = ___source3; Il2CppObject * L_27 = V_5; *((Il2CppObject **)(L_26)) = (Il2CppObject *)L_27; Il2CppCodeGenWriteBarrier((Il2CppObject **)(L_26), (Il2CppObject *)L_27); goto IL_00cf; } IL_00be: { float L_28 = V_7; float L_29 = V_1; if ((!(((float)L_28) > ((float)L_29)))) { goto IL_00cf; } } { float L_30 = V_7; V_1 = L_30; Il2CppObject ** L_31 = ___source3; Il2CppObject * L_32 = V_5; *((Il2CppObject **)(L_31)) = (Il2CppObject *)L_32; Il2CppCodeGenWriteBarrier((Il2CppObject **)(L_31), (Il2CppObject *)L_32); } IL_00cf: { } IL_00d0: { int32_t L_33 = V_4; V_4 = ((int32_t)((int32_t)L_33+(int32_t)1)); } IL_00d6: { int32_t L_34 = V_4; List_1_t3395709193 * L_35 = V_3; NullCheck(L_35); int32_t L_36 = List_1_get_Count_m1294235957(L_35, /*hidden argument*/List_1_get_Count_m1294235957_MethodInfo_var); if ((((int32_t)L_34) < ((int32_t)L_36))) { goto IL_0042; } } { List_1_t3395709193 * L_37 = V_3; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2953223642_il2cpp_TypeInfo_var); ListPool_1_Release_m3920209327(NULL /*static, unused*/, L_37, /*hidden argument*/ListPool_1_Release_m3920209327_MethodInfo_var); float L_38 = V_1; V_0 = L_38; goto IL_00f0; } IL_00f0: { float L_39 = V_0; return L_39; } } // System.Single UnityEngine.UI.LayoutUtility::<GetMinWidth>m__0(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetMinWidthU3Em__0_m398152306 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetMinWidthU3Em__0_m398152306_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(2 /* System.Single UnityEngine.UI.ILayoutElement::get_minWidth() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetPreferredWidth>m__1(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetPreferredWidthU3Em__1_m74273510 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetPreferredWidthU3Em__1_m74273510_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(2 /* System.Single UnityEngine.UI.ILayoutElement::get_minWidth() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetPreferredWidth>m__2(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetPreferredWidthU3Em__2_m1610950633 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetPreferredWidthU3Em__2_m1610950633_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(3 /* System.Single UnityEngine.UI.ILayoutElement::get_preferredWidth() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetFlexibleWidth>m__3(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetFlexibleWidthU3Em__3_m1091238571 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetFlexibleWidthU3Em__3_m1091238571_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(4 /* System.Single UnityEngine.UI.ILayoutElement::get_flexibleWidth() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetMinHeight>m__4(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetMinHeightU3Em__4_m2382889764 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetMinHeightU3Em__4_m2382889764_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(5 /* System.Single UnityEngine.UI.ILayoutElement::get_minHeight() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetPreferredHeight>m__5(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetPreferredHeightU3Em__5_m407820296 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetPreferredHeightU3Em__5_m407820296_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(5 /* System.Single UnityEngine.UI.ILayoutElement::get_minHeight() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetPreferredHeight>m__6(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetPreferredHeightU3Em__6_m3049688934 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetPreferredHeightU3Em__6_m3049688934_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(6 /* System.Single UnityEngine.UI.ILayoutElement::get_preferredHeight() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Single UnityEngine.UI.LayoutUtility::<GetFlexibleHeight>m__7(UnityEngine.UI.ILayoutElement) extern "C" float LayoutUtility_U3CGetFlexibleHeightU3Em__7_m2991026842 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___e0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (LayoutUtility_U3CGetFlexibleHeightU3Em__7_m2991026842_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { Il2CppObject * L_0 = ___e0; NullCheck(L_0); float L_1 = InterfaceFuncInvoker0< float >::Invoke(7 /* System.Single UnityEngine.UI.ILayoutElement::get_flexibleHeight() */, ILayoutElement_t4082016710_il2cpp_TypeInfo_var, L_0); V_0 = L_1; goto IL_000c; } IL_000c: { float L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Mask::.ctor() extern "C" void Mask__ctor_m1269055150 (Mask_t1803652131 * __this, const MethodInfo* method) { { __this->set_m_ShowMaskGraphic_3((bool)1); UIBehaviour__ctor_m4230637738(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.Mask::get_rectTransform() extern "C" RectTransform_t3704657025 * Mask_get_rectTransform_m440704215 (Mask_t1803652131 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_get_rectTransform_m440704215_MetadataUsageId); s_Il2CppMethodInitialized = true; } RectTransform_t3704657025 * V_0 = NULL; RectTransform_t3704657025 * V_1 = NULL; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_RectTransform_2(); RectTransform_t3704657025 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_001d; } } { RectTransform_t3704657025 * L_2 = Component_GetComponent_TisRectTransform_t3704657025_m989540290(__this, /*hidden argument*/Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var); RectTransform_t3704657025 * L_3 = L_2; V_0 = L_3; __this->set_m_RectTransform_2(L_3); RectTransform_t3704657025 * L_4 = V_0; G_B2_0 = L_4; } IL_001d: { V_1 = G_B2_0; goto IL_0023; } IL_0023: { RectTransform_t3704657025 * L_5 = V_1; return L_5; } } // System.Boolean UnityEngine.UI.Mask::get_showMaskGraphic() extern "C" bool Mask_get_showMaskGraphic_m3170568407 (Mask_t1803652131 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_ShowMaskGraphic_3(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Mask::set_showMaskGraphic(System.Boolean) extern "C" void Mask_set_showMaskGraphic_m1344750035 (Mask_t1803652131 * __this, bool ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_set_showMaskGraphic_m1344750035_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = __this->get_m_ShowMaskGraphic_3(); bool L_1 = ___value0; if ((!(((uint32_t)L_0) == ((uint32_t)L_1)))) { goto IL_0012; } } { goto IL_0035; } IL_0012: { bool L_2 = ___value0; __this->set_m_ShowMaskGraphic_3(L_2); Graphic_t1660335611 * L_3 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0035; } } { Graphic_t1660335611 * L_5 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_5); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, L_5); } IL_0035: { return; } } // UnityEngine.UI.Graphic UnityEngine.UI.Mask::get_graphic() extern "C" Graphic_t1660335611 * Mask_get_graphic_m2572620787 (Mask_t1803652131 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_get_graphic_m2572620787_MetadataUsageId); s_Il2CppMethodInitialized = true; } Graphic_t1660335611 * V_0 = NULL; Graphic_t1660335611 * V_1 = NULL; Graphic_t1660335611 * G_B2_0 = NULL; Graphic_t1660335611 * G_B1_0 = NULL; { Graphic_t1660335611 * L_0 = __this->get_m_Graphic_4(); Graphic_t1660335611 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_001d; } } { Graphic_t1660335611 * L_2 = Component_GetComponent_TisGraphic_t1660335611_m1118939870(__this, /*hidden argument*/Component_GetComponent_TisGraphic_t1660335611_m1118939870_MethodInfo_var); Graphic_t1660335611 * L_3 = L_2; V_0 = L_3; __this->set_m_Graphic_4(L_3); Graphic_t1660335611 * L_4 = V_0; G_B2_0 = L_4; } IL_001d: { V_1 = G_B2_0; goto IL_0023; } IL_0023: { Graphic_t1660335611 * L_5 = V_1; return L_5; } } // System.Boolean UnityEngine.UI.Mask::MaskEnabled() extern "C" bool Mask_MaskEnabled_m2980554430 (Mask_t1803652131 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_MaskEnabled_m2980554430_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B3_0 = 0; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_001a; } } { Graphic_t1660335611 * L_1 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B3_0 = ((int32_t)(L_2)); goto IL_001b; } IL_001a: { G_B3_0 = 0; } IL_001b: { V_0 = (bool)G_B3_0; goto IL_0021; } IL_0021: { bool L_3 = V_0; return L_3; } } // System.Void UnityEngine.UI.Mask::OnSiblingGraphicEnabledDisabled() extern "C" void Mask_OnSiblingGraphicEnabledDisabled_m2583294479 (Mask_t1803652131 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Mask::OnEnable() extern "C" void Mask_OnEnable_m2186824439 (Mask_t1803652131 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_OnEnable_m2186824439_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UIBehaviour_OnEnable_m189051288(__this, /*hidden argument*/NULL); Graphic_t1660335611 * L_0 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0036; } } { Graphic_t1660335611 * L_2 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_2); CanvasRenderer_t2598313366 * L_3 = Graphic_get_canvasRenderer_m315509948(L_2, /*hidden argument*/NULL); NullCheck(L_3); CanvasRenderer_set_hasPopInstruction_m4160815714(L_3, (bool)1, /*hidden argument*/NULL); Graphic_t1660335611 * L_4 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_4); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, L_4); } IL_0036: { MaskUtilities_NotifyStencilStateChanged_m3969722420(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Mask::OnDisable() extern "C" void Mask_OnDisable_m1270951829 (Mask_t1803652131 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_OnDisable_m1270951829_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UIBehaviour_OnDisable_m1784507360(__this, /*hidden argument*/NULL); Graphic_t1660335611 * L_0 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0047; } } { Graphic_t1660335611 * L_2 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_2); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, L_2); Graphic_t1660335611 * L_3 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_3); CanvasRenderer_t2598313366 * L_4 = Graphic_get_canvasRenderer_m315509948(L_3, /*hidden argument*/NULL); NullCheck(L_4); CanvasRenderer_set_hasPopInstruction_m4160815714(L_4, (bool)0, /*hidden argument*/NULL); Graphic_t1660335611 * L_5 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_5); CanvasRenderer_t2598313366 * L_6 = Graphic_get_canvasRenderer_m315509948(L_5, /*hidden argument*/NULL); NullCheck(L_6); CanvasRenderer_set_popMaterialCount_m3278092344(L_6, 0, /*hidden argument*/NULL); } IL_0047: { Material_t340375123 * L_7 = __this->get_m_MaskMaterial_5(); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); __this->set_m_MaskMaterial_5((Material_t340375123 *)NULL); Material_t340375123 * L_8 = __this->get_m_UnmaskMaterial_6(); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_8, /*hidden argument*/NULL); __this->set_m_UnmaskMaterial_6((Material_t340375123 *)NULL); MaskUtilities_NotifyStencilStateChanged_m3969722420(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.Mask::IsRaycastLocationValid(UnityEngine.Vector2,UnityEngine.Camera) extern "C" bool Mask_IsRaycastLocationValid_m3572890775 (Mask_t1803652131 * __this, Vector2_t2156229523 ___sp0, Camera_t4157153871 * ___eventCamera1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_IsRaycastLocationValid_m3572890775_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; { bool L_0 = Behaviour_get_isActiveAndEnabled_m3013577336(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0013; } } { V_0 = (bool)1; goto IL_0026; } IL_0013: { RectTransform_t3704657025 * L_1 = Mask_get_rectTransform_m440704215(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_2 = ___sp0; Camera_t4157153871 * L_3 = ___eventCamera1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_4 = RectTransformUtility_RectangleContainsScreenPoint_m1731210517(NULL /*static, unused*/, L_1, L_2, L_3, /*hidden argument*/NULL); V_0 = L_4; goto IL_0026; } IL_0026: { bool L_5 = V_0; return L_5; } } // UnityEngine.Material UnityEngine.UI.Mask::GetModifiedMaterial(UnityEngine.Material) extern "C" Material_t340375123 * Mask_GetModifiedMaterial_m2692272647 (Mask_t1803652131 * __this, Material_t340375123 * ___baseMaterial0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Mask_GetModifiedMaterial_m2692272647_MetadataUsageId); s_Il2CppMethodInitialized = true; } Material_t340375123 * V_0 = NULL; Transform_t3600365921 * V_1 = NULL; int32_t V_2 = 0; int32_t V_3 = 0; Material_t340375123 * V_4 = NULL; Material_t340375123 * V_5 = NULL; Material_t340375123 * V_6 = NULL; Material_t340375123 * V_7 = NULL; int32_t G_B7_0 = 0; int32_t G_B7_1 = 0; int32_t G_B7_2 = 0; Material_t340375123 * G_B7_3 = NULL; int32_t G_B6_0 = 0; int32_t G_B6_1 = 0; int32_t G_B6_2 = 0; Material_t340375123 * G_B6_3 = NULL; int32_t G_B8_0 = 0; int32_t G_B8_1 = 0; int32_t G_B8_2 = 0; int32_t G_B8_3 = 0; Material_t340375123 * G_B8_4 = NULL; int32_t G_B11_0 = 0; int32_t G_B11_1 = 0; int32_t G_B11_2 = 0; Material_t340375123 * G_B11_3 = NULL; int32_t G_B10_0 = 0; int32_t G_B10_1 = 0; int32_t G_B10_2 = 0; Material_t340375123 * G_B10_3 = NULL; int32_t G_B12_0 = 0; int32_t G_B12_1 = 0; int32_t G_B12_2 = 0; int32_t G_B12_3 = 0; Material_t340375123 * G_B12_4 = NULL; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(19 /* System.Boolean UnityEngine.UI.Mask::MaskEnabled() */, __this); if (L_0) { goto IL_0013; } } { Material_t340375123 * L_1 = ___baseMaterial0; V_0 = L_1; goto IL_0189; } IL_0013: { Transform_t3600365921 * L_2 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); Transform_t3600365921 * L_3 = MaskUtilities_FindRootSortOverrideCanvas_m1053047732(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); V_1 = L_3; Transform_t3600365921 * L_4 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); Transform_t3600365921 * L_5 = V_1; int32_t L_6 = MaskUtilities_GetStencilDepth_m402474137(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); V_2 = L_6; int32_t L_7 = V_2; if ((((int32_t)L_7) < ((int32_t)8))) { goto IL_004b; } } { GameObject_t1113636619 * L_8 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogError_m3356949141(NULL /*static, unused*/, _stringLiteral2763503942, L_8, /*hidden argument*/NULL); Material_t340375123 * L_9 = ___baseMaterial0; V_0 = L_9; goto IL_0189; } IL_004b: { int32_t L_10 = V_2; V_3 = ((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)L_10&(int32_t)((int32_t)31))))); int32_t L_11 = V_3; if ((!(((uint32_t)L_11) == ((uint32_t)1)))) { goto IL_00de; } } { Material_t340375123 * L_12 = ___baseMaterial0; bool L_13 = __this->get_m_ShowMaskGraphic_3(); G_B6_0 = 8; G_B6_1 = 2; G_B6_2 = 1; G_B6_3 = L_12; if (!L_13) { G_B7_0 = 8; G_B7_1 = 2; G_B7_2 = 1; G_B7_3 = L_12; goto IL_0070; } } { G_B8_0 = ((int32_t)15); G_B8_1 = G_B6_0; G_B8_2 = G_B6_1; G_B8_3 = G_B6_2; G_B8_4 = G_B6_3; goto IL_0071; } IL_0070: { G_B8_0 = 0; G_B8_1 = G_B7_0; G_B8_2 = G_B7_1; G_B8_3 = G_B7_2; G_B8_4 = G_B7_3; } IL_0071: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); Material_t340375123 * L_14 = StencilMaterial_Add_m3901322229(NULL /*static, unused*/, G_B8_4, G_B8_3, G_B8_2, G_B8_1, G_B8_0, /*hidden argument*/NULL); V_4 = L_14; Material_t340375123 * L_15 = __this->get_m_MaskMaterial_5(); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_15, /*hidden argument*/NULL); Material_t340375123 * L_16 = V_4; __this->set_m_MaskMaterial_5(L_16); Material_t340375123 * L_17 = ___baseMaterial0; Material_t340375123 * L_18 = StencilMaterial_Add_m3901322229(NULL /*static, unused*/, L_17, 1, 1, 8, 0, /*hidden argument*/NULL); V_5 = L_18; Material_t340375123 * L_19 = __this->get_m_UnmaskMaterial_6(); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_19, /*hidden argument*/NULL); Material_t340375123 * L_20 = V_5; __this->set_m_UnmaskMaterial_6(L_20); Graphic_t1660335611 * L_21 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_21); CanvasRenderer_t2598313366 * L_22 = Graphic_get_canvasRenderer_m315509948(L_21, /*hidden argument*/NULL); NullCheck(L_22); CanvasRenderer_set_popMaterialCount_m3278092344(L_22, 1, /*hidden argument*/NULL); Graphic_t1660335611 * L_23 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_23); CanvasRenderer_t2598313366 * L_24 = Graphic_get_canvasRenderer_m315509948(L_23, /*hidden argument*/NULL); Material_t340375123 * L_25 = __this->get_m_UnmaskMaterial_6(); NullCheck(L_24); CanvasRenderer_SetPopMaterial_m2102730815(L_24, L_25, 0, /*hidden argument*/NULL); Material_t340375123 * L_26 = __this->get_m_MaskMaterial_5(); V_0 = L_26; goto IL_0189; } IL_00de: { Material_t340375123 * L_27 = ___baseMaterial0; int32_t L_28 = V_3; int32_t L_29 = V_3; bool L_30 = __this->get_m_ShowMaskGraphic_3(); G_B10_0 = 3; G_B10_1 = 2; G_B10_2 = ((int32_t)((int32_t)L_28|(int32_t)((int32_t)((int32_t)L_29-(int32_t)1)))); G_B10_3 = L_27; if (!L_30) { G_B11_0 = 3; G_B11_1 = 2; G_B11_2 = ((int32_t)((int32_t)L_28|(int32_t)((int32_t)((int32_t)L_29-(int32_t)1)))); G_B11_3 = L_27; goto IL_00f8; } } { G_B12_0 = ((int32_t)15); G_B12_1 = G_B10_0; G_B12_2 = G_B10_1; G_B12_3 = G_B10_2; G_B12_4 = G_B10_3; goto IL_00f9; } IL_00f8: { G_B12_0 = 0; G_B12_1 = G_B11_0; G_B12_2 = G_B11_1; G_B12_3 = G_B11_2; G_B12_4 = G_B11_3; } IL_00f9: { int32_t L_31 = V_3; int32_t L_32 = V_3; int32_t L_33 = V_3; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); Material_t340375123 * L_34 = StencilMaterial_Add_m2195405072(NULL /*static, unused*/, G_B12_4, G_B12_3, G_B12_2, G_B12_1, G_B12_0, ((int32_t)((int32_t)L_31-(int32_t)1)), ((int32_t)((int32_t)L_32|(int32_t)((int32_t)((int32_t)L_33-(int32_t)1)))), /*hidden argument*/NULL); V_6 = L_34; Material_t340375123 * L_35 = __this->get_m_MaskMaterial_5(); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_35, /*hidden argument*/NULL); Material_t340375123 * L_36 = V_6; __this->set_m_MaskMaterial_5(L_36); Graphic_t1660335611 * L_37 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_37); CanvasRenderer_t2598313366 * L_38 = Graphic_get_canvasRenderer_m315509948(L_37, /*hidden argument*/NULL); NullCheck(L_38); CanvasRenderer_set_hasPopInstruction_m4160815714(L_38, (bool)1, /*hidden argument*/NULL); Material_t340375123 * L_39 = ___baseMaterial0; int32_t L_40 = V_3; int32_t L_41 = V_3; int32_t L_42 = V_3; int32_t L_43 = V_3; Material_t340375123 * L_44 = StencilMaterial_Add_m2195405072(NULL /*static, unused*/, L_39, ((int32_t)((int32_t)L_40-(int32_t)1)), 2, 3, 0, ((int32_t)((int32_t)L_41-(int32_t)1)), ((int32_t)((int32_t)L_42|(int32_t)((int32_t)((int32_t)L_43-(int32_t)1)))), /*hidden argument*/NULL); V_7 = L_44; Material_t340375123 * L_45 = __this->get_m_UnmaskMaterial_6(); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_45, /*hidden argument*/NULL); Material_t340375123 * L_46 = V_7; __this->set_m_UnmaskMaterial_6(L_46); Graphic_t1660335611 * L_47 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_47); CanvasRenderer_t2598313366 * L_48 = Graphic_get_canvasRenderer_m315509948(L_47, /*hidden argument*/NULL); NullCheck(L_48); CanvasRenderer_set_popMaterialCount_m3278092344(L_48, 1, /*hidden argument*/NULL); Graphic_t1660335611 * L_49 = Mask_get_graphic_m2572620787(__this, /*hidden argument*/NULL); NullCheck(L_49); CanvasRenderer_t2598313366 * L_50 = Graphic_get_canvasRenderer_m315509948(L_49, /*hidden argument*/NULL); Material_t340375123 * L_51 = __this->get_m_UnmaskMaterial_6(); NullCheck(L_50); CanvasRenderer_SetPopMaterial_m2102730815(L_50, L_51, 0, /*hidden argument*/NULL); Material_t340375123 * L_52 = __this->get_m_MaskMaterial_5(); V_0 = L_52; goto IL_0189; } IL_0189: { Material_t340375123 * L_53 = V_0; return L_53; } } // System.Void UnityEngine.UI.MaskableGraphic::.ctor() extern "C" void MaskableGraphic__ctor_m3705055375 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic__ctor_m3705055375_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_m_ShouldRecalculateStencil_19((bool)1); __this->set_m_Maskable_22((bool)1); __this->set_m_IncludeForMasking_23((bool)0); CullStateChangedEvent_t3661388177 * L_0 = (CullStateChangedEvent_t3661388177 *)il2cpp_codegen_object_new(CullStateChangedEvent_t3661388177_il2cpp_TypeInfo_var); CullStateChangedEvent__ctor_m4089558259(L_0, /*hidden argument*/NULL); __this->set_m_OnCullStateChanged_24(L_0); __this->set_m_ShouldRecalculate_25((bool)1); __this->set_m_Corners_27(((Vector3U5BU5D_t1718750761*)SZArrayNew(Vector3U5BU5D_t1718750761_il2cpp_TypeInfo_var, (uint32_t)4))); IL2CPP_RUNTIME_CLASS_INIT(Graphic_t1660335611_il2cpp_TypeInfo_var); Graphic__ctor_m2983567630(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.MaskableGraphic/CullStateChangedEvent UnityEngine.UI.MaskableGraphic::get_onCullStateChanged() extern "C" CullStateChangedEvent_t3661388177 * MaskableGraphic_get_onCullStateChanged_m3331479633 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { CullStateChangedEvent_t3661388177 * V_0 = NULL; { CullStateChangedEvent_t3661388177 * L_0 = __this->get_m_OnCullStateChanged_24(); V_0 = L_0; goto IL_000d; } IL_000d: { CullStateChangedEvent_t3661388177 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.MaskableGraphic::set_onCullStateChanged(UnityEngine.UI.MaskableGraphic/CullStateChangedEvent) extern "C" void MaskableGraphic_set_onCullStateChanged_m2136700709 (MaskableGraphic_t3839221559 * __this, CullStateChangedEvent_t3661388177 * ___value0, const MethodInfo* method) { { CullStateChangedEvent_t3661388177 * L_0 = ___value0; __this->set_m_OnCullStateChanged_24(L_0); return; } } // System.Boolean UnityEngine.UI.MaskableGraphic::get_maskable() extern "C" bool MaskableGraphic_get_maskable_m1260382606 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_Maskable_22(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.MaskableGraphic::set_maskable(System.Boolean) extern "C" void MaskableGraphic_set_maskable_m243551751 (MaskableGraphic_t3839221559 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; bool L_1 = __this->get_m_Maskable_22(); if ((!(((uint32_t)L_0) == ((uint32_t)L_1)))) { goto IL_0012; } } { goto IL_0026; } IL_0012: { bool L_2 = ___value0; __this->set_m_Maskable_22(L_2); __this->set_m_ShouldRecalculateStencil_19((bool)1); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); } IL_0026: { return; } } // UnityEngine.Material UnityEngine.UI.MaskableGraphic::GetModifiedMaterial(UnityEngine.Material) extern "C" Material_t340375123 * MaskableGraphic_GetModifiedMaterial_m2758867980 (MaskableGraphic_t3839221559 * __this, Material_t340375123 * ___baseMaterial0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic_GetModifiedMaterial_m2758867980_MetadataUsageId); s_Il2CppMethodInitialized = true; } Material_t340375123 * V_0 = NULL; Transform_t3600365921 * V_1 = NULL; Mask_t1803652131 * V_2 = NULL; Material_t340375123 * V_3 = NULL; Material_t340375123 * V_4 = NULL; MaskableGraphic_t3839221559 * G_B3_0 = NULL; MaskableGraphic_t3839221559 * G_B2_0 = NULL; int32_t G_B4_0 = 0; MaskableGraphic_t3839221559 * G_B4_1 = NULL; { Material_t340375123 * L_0 = ___baseMaterial0; V_0 = L_0; bool L_1 = __this->get_m_ShouldRecalculateStencil_19(); if (!L_1) { goto IL_0046; } } { Transform_t3600365921 * L_2 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); Transform_t3600365921 * L_3 = MaskUtilities_FindRootSortOverrideCanvas_m1053047732(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); V_1 = L_3; bool L_4 = MaskableGraphic_get_maskable_m1260382606(__this, /*hidden argument*/NULL); G_B2_0 = __this; if (!L_4) { G_B3_0 = __this; goto IL_0038; } } { Transform_t3600365921 * L_5 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); Transform_t3600365921 * L_6 = V_1; int32_t L_7 = MaskUtilities_GetStencilDepth_m402474137(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); G_B4_0 = L_7; G_B4_1 = G_B2_0; goto IL_0039; } IL_0038: { G_B4_0 = 0; G_B4_1 = G_B3_0; } IL_0039: { NullCheck(G_B4_1); G_B4_1->set_m_StencilValue_26(G_B4_0); __this->set_m_ShouldRecalculateStencil_19((bool)0); } IL_0046: { Mask_t1803652131 * L_8 = Component_GetComponent_TisMask_t1803652131_m643495272(__this, /*hidden argument*/Component_GetComponent_TisMask_t1803652131_m643495272_MethodInfo_var); V_2 = L_8; int32_t L_9 = __this->get_m_StencilValue_26(); if ((((int32_t)L_9) <= ((int32_t)0))) { goto IL_00b1; } } { Mask_t1803652131 * L_10 = V_2; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_11 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_10, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_11) { goto IL_0070; } } { Mask_t1803652131 * L_12 = V_2; NullCheck(L_12); bool L_13 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_12); if (L_13) { goto IL_00b1; } } IL_0070: { Material_t340375123 * L_14 = V_0; int32_t L_15 = __this->get_m_StencilValue_26(); int32_t L_16 = __this->get_m_StencilValue_26(); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); Material_t340375123 * L_17 = StencilMaterial_Add_m2195405072(NULL /*static, unused*/, L_14, ((int32_t)((int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)L_15&(int32_t)((int32_t)31)))))-(int32_t)1)), 0, 3, ((int32_t)15), ((int32_t)((int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)L_16&(int32_t)((int32_t)31)))))-(int32_t)1)), 0, /*hidden argument*/NULL); V_3 = L_17; Material_t340375123 * L_18 = __this->get_m_MaskMaterial_20(); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_18, /*hidden argument*/NULL); Material_t340375123 * L_19 = V_3; __this->set_m_MaskMaterial_20(L_19); Material_t340375123 * L_20 = __this->get_m_MaskMaterial_20(); V_0 = L_20; } IL_00b1: { Material_t340375123 * L_21 = V_0; V_4 = L_21; goto IL_00b9; } IL_00b9: { Material_t340375123 * L_22 = V_4; return L_22; } } // System.Void UnityEngine.UI.MaskableGraphic::Cull(UnityEngine.Rect,System.Boolean) extern "C" void MaskableGraphic_Cull_m2344943460 (MaskableGraphic_t3839221559 * __this, Rect_t2360479859 ___clipRect0, bool ___validRect1, const MethodInfo* method) { bool V_0 = false; int32_t G_B3_0 = 0; { bool L_0 = ___validRect1; if (!L_0) { goto IL_001a; } } { Rect_t2360479859 L_1 = MaskableGraphic_get_rootCanvasRect_m3492154629(__this, /*hidden argument*/NULL); bool L_2 = Rect_Overlaps_m6060363((&___clipRect0), L_1, (bool)1, /*hidden argument*/NULL); G_B3_0 = ((((int32_t)L_2) == ((int32_t)0))? 1 : 0); goto IL_001b; } IL_001a: { G_B3_0 = 1; } IL_001b: { V_0 = (bool)G_B3_0; bool L_3 = V_0; MaskableGraphic_UpdateCull_m2805101913(__this, L_3, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.MaskableGraphic::UpdateCull(System.Boolean) extern "C" void MaskableGraphic_UpdateCull_m2805101913 (MaskableGraphic_t3839221559 * __this, bool ___cull0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic_UpdateCull_m2805101913_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; { CanvasRenderer_t2598313366 * L_0 = Graphic_get_canvasRenderer_m315509948(__this, /*hidden argument*/NULL); NullCheck(L_0); bool L_1 = CanvasRenderer_get_cull_m2277997101(L_0, /*hidden argument*/NULL); bool L_2 = ___cull0; V_0 = (bool)((((int32_t)((((int32_t)L_1) == ((int32_t)L_2))? 1 : 0)) == ((int32_t)0))? 1 : 0); CanvasRenderer_t2598313366 * L_3 = Graphic_get_canvasRenderer_m315509948(__this, /*hidden argument*/NULL); bool L_4 = ___cull0; NullCheck(L_3); CanvasRenderer_set_cull_m2086579420(L_3, L_4, /*hidden argument*/NULL); bool L_5 = V_0; if (!L_5) { goto IL_0039; } } { CullStateChangedEvent_t3661388177 * L_6 = __this->get_m_OnCullStateChanged_24(); bool L_7 = ___cull0; NullCheck(L_6); UnityEvent_1_Invoke_m933614109(L_6, L_7, /*hidden argument*/UnityEvent_1_Invoke_m933614109_MethodInfo_var); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); } IL_0039: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::SetClipRect(UnityEngine.Rect,System.Boolean) extern "C" void MaskableGraphic_SetClipRect_m1292666041 (MaskableGraphic_t3839221559 * __this, Rect_t2360479859 ___clipRect0, bool ___validRect1, const MethodInfo* method) { { bool L_0 = ___validRect1; if (!L_0) { goto IL_0018; } } { CanvasRenderer_t2598313366 * L_1 = Graphic_get_canvasRenderer_m315509948(__this, /*hidden argument*/NULL); Rect_t2360479859 L_2 = ___clipRect0; NullCheck(L_1); CanvasRenderer_EnableRectClipping_m2541364234(L_1, L_2, /*hidden argument*/NULL); goto IL_0023; } IL_0018: { CanvasRenderer_t2598313366 * L_3 = Graphic_get_canvasRenderer_m315509948(__this, /*hidden argument*/NULL); NullCheck(L_3); CanvasRenderer_DisableRectClipping_m4197748798(L_3, /*hidden argument*/NULL); } IL_0023: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnEnable() extern "C" void MaskableGraphic_OnEnable_m846302383 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic_OnEnable_m846302383_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Graphic_OnEnable_m3893553015(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateStencil_19((bool)1); MaskableGraphic_UpdateClipParent_m2605828397(__this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); Mask_t1803652131 * L_0 = Component_GetComponent_TisMask_t1803652131_m643495272(__this, /*hidden argument*/Component_GetComponent_TisMask_t1803652131_m643495272_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0033; } } { MaskUtilities_NotifyStencilStateChanged_m3969722420(NULL /*static, unused*/, __this, /*hidden argument*/NULL); } IL_0033: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnDisable() extern "C" void MaskableGraphic_OnDisable_m1757789159 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic_OnDisable_m1757789159_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Graphic_OnDisable_m1097930217(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateStencil_19((bool)1); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); MaskableGraphic_UpdateClipParent_m2605828397(__this, /*hidden argument*/NULL); Material_t340375123 * L_0 = __this->get_m_MaskMaterial_20(); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); StencilMaterial_Remove_m1301487727(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); __this->set_m_MaskMaterial_20((Material_t340375123 *)NULL); Mask_t1803652131 * L_1 = Component_GetComponent_TisMask_t1803652131_m643495272(__this, /*hidden argument*/Component_GetComponent_TisMask_t1803652131_m643495272_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0045; } } { MaskUtilities_NotifyStencilStateChanged_m3969722420(NULL /*static, unused*/, __this, /*hidden argument*/NULL); } IL_0045: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnTransformParentChanged() extern "C" void MaskableGraphic_OnTransformParentChanged_m329502413 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { { Graphic_OnTransformParentChanged_m3266023844(__this, /*hidden argument*/NULL); bool L_0 = Behaviour_get_isActiveAndEnabled_m3013577336(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0017; } } { goto IL_002a; } IL_0017: { __this->set_m_ShouldRecalculateStencil_19((bool)1); MaskableGraphic_UpdateClipParent_m2605828397(__this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); } IL_002a: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::ParentMaskStateChanged() extern "C" void MaskableGraphic_ParentMaskStateChanged_m1092090553 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnCanvasHierarchyChanged() extern "C" void MaskableGraphic_OnCanvasHierarchyChanged_m1780820310 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { { Graphic_OnCanvasHierarchyChanged_m3895011287(__this, /*hidden argument*/NULL); bool L_0 = Behaviour_get_isActiveAndEnabled_m3013577336(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0017; } } { goto IL_002a; } IL_0017: { __this->set_m_ShouldRecalculateStencil_19((bool)1); MaskableGraphic_UpdateClipParent_m2605828397(__this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); } IL_002a: { return; } } // UnityEngine.Rect UnityEngine.UI.MaskableGraphic::get_rootCanvasRect() extern "C" Rect_t2360479859 MaskableGraphic_get_rootCanvasRect_m3492154629 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic_get_rootCanvasRect_m3492154629_MetadataUsageId); s_Il2CppMethodInitialized = true; } Canvas_t3310196443 * V_0 = NULL; int32_t V_1 = 0; Rect_t2360479859 V_2; memset(&V_2, 0, sizeof(V_2)); { RectTransform_t3704657025 * L_0 = Graphic_get_rectTransform_m1167152468(__this, /*hidden argument*/NULL); Vector3U5BU5D_t1718750761* L_1 = __this->get_m_Corners_27(); NullCheck(L_0); RectTransform_GetWorldCorners_m2125351209(L_0, L_1, /*hidden argument*/NULL); Canvas_t3310196443 * L_2 = Graphic_get_canvas_m3320066409(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_006f; } } { Canvas_t3310196443 * L_4 = Graphic_get_canvas_m3320066409(__this, /*hidden argument*/NULL); NullCheck(L_4); Canvas_t3310196443 * L_5 = Canvas_get_rootCanvas_m753521845(L_4, /*hidden argument*/NULL); V_0 = L_5; V_1 = 0; goto IL_0067; } IL_0036: { Vector3U5BU5D_t1718750761* L_6 = __this->get_m_Corners_27(); int32_t L_7 = V_1; NullCheck(L_6); Canvas_t3310196443 * L_8 = V_0; NullCheck(L_8); Transform_t3600365921 * L_9 = Component_get_transform_m2921103810(L_8, /*hidden argument*/NULL); Vector3U5BU5D_t1718750761* L_10 = __this->get_m_Corners_27(); int32_t L_11 = V_1; NullCheck(L_10); NullCheck(L_9); Vector3_t3722313464 L_12 = Transform_InverseTransformPoint_m1254110475(L_9, (*(Vector3_t3722313464 *)((L_10)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_11)))), /*hidden argument*/NULL); (*(Vector3_t3722313464 *)((L_6)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_7)))) = L_12; int32_t L_13 = V_1; V_1 = ((int32_t)((int32_t)L_13+(int32_t)1)); } IL_0067: { int32_t L_14 = V_1; if ((((int32_t)L_14) < ((int32_t)4))) { goto IL_0036; } } { } IL_006f: { Vector3U5BU5D_t1718750761* L_15 = __this->get_m_Corners_27(); NullCheck(L_15); float L_16 = ((L_15)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t1718750761* L_17 = __this->get_m_Corners_27(); NullCheck(L_17); float L_18 = ((L_17)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Vector3U5BU5D_t1718750761* L_19 = __this->get_m_Corners_27(); NullCheck(L_19); float L_20 = ((L_19)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_x_1(); Vector3U5BU5D_t1718750761* L_21 = __this->get_m_Corners_27(); NullCheck(L_21); float L_22 = ((L_21)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t1718750761* L_23 = __this->get_m_Corners_27(); NullCheck(L_23); float L_24 = ((L_23)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_y_2(); Vector3U5BU5D_t1718750761* L_25 = __this->get_m_Corners_27(); NullCheck(L_25); float L_26 = ((L_25)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Rect_t2360479859 L_27; memset(&L_27, 0, sizeof(L_27)); Rect__ctor_m2635848439(&L_27, L_16, L_18, ((float)((float)L_20-(float)L_22)), ((float)((float)L_24-(float)L_26)), /*hidden argument*/NULL); V_2 = L_27; goto IL_00e2; } IL_00e2: { Rect_t2360479859 L_28 = V_2; return L_28; } } // System.Void UnityEngine.UI.MaskableGraphic::UpdateClipParent() extern "C" void MaskableGraphic_UpdateClipParent_m2605828397 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskableGraphic_UpdateClipParent_m2605828397_MetadataUsageId); s_Il2CppMethodInitialized = true; } RectMask2D_t3474889437 * V_0 = NULL; RectMask2D_t3474889437 * G_B4_0 = NULL; { bool L_0 = MaskableGraphic_get_maskable_m1260382606(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0022; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_1) { goto IL_0022; } } { RectMask2D_t3474889437 * L_2 = MaskUtilities_GetRectMaskForClippable_m2464520669(NULL /*static, unused*/, __this, /*hidden argument*/NULL); G_B4_0 = L_2; goto IL_0023; } IL_0022: { G_B4_0 = ((RectMask2D_t3474889437 *)(NULL)); } IL_0023: { V_0 = G_B4_0; RectMask2D_t3474889437 * L_3 = __this->get_m_ParentMask_21(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0066; } } { RectMask2D_t3474889437 * L_5 = V_0; RectMask2D_t3474889437 * L_6 = __this->get_m_ParentMask_21(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_7 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); if (L_7) { goto IL_0051; } } { RectMask2D_t3474889437 * L_8 = V_0; NullCheck(L_8); bool L_9 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_8); if (L_9) { goto IL_0066; } } IL_0051: { RectMask2D_t3474889437 * L_10 = __this->get_m_ParentMask_21(); NullCheck(L_10); RectMask2D_RemoveClippable_m773604960(L_10, __this, /*hidden argument*/NULL); MaskableGraphic_UpdateCull_m2805101913(__this, (bool)0, /*hidden argument*/NULL); } IL_0066: { RectMask2D_t3474889437 * L_11 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_12 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_11, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_12) { goto IL_0084; } } { RectMask2D_t3474889437 * L_13 = V_0; NullCheck(L_13); bool L_14 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_13); if (!L_14) { goto IL_0084; } } { RectMask2D_t3474889437 * L_15 = V_0; NullCheck(L_15); RectMask2D_AddClippable_m373784024(L_15, __this, /*hidden argument*/NULL); } IL_0084: { RectMask2D_t3474889437 * L_16 = V_0; __this->set_m_ParentMask_21(L_16); return; } } // System.Void UnityEngine.UI.MaskableGraphic::RecalculateClipping() extern "C" void MaskableGraphic_RecalculateClipping_m1772937317 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { { MaskableGraphic_UpdateClipParent_m2605828397(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.MaskableGraphic::RecalculateMasking() extern "C" void MaskableGraphic_RecalculateMasking_m183336762 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { { __this->set_m_ShouldRecalculateStencil_19((bool)1); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); return; } } // UnityEngine.GameObject UnityEngine.UI.MaskableGraphic::UnityEngine.UI.IClippable.get_gameObject() extern "C" GameObject_t1113636619 * MaskableGraphic_UnityEngine_UI_IClippable_get_gameObject_m1739855597 (MaskableGraphic_t3839221559 * __this, const MethodInfo* method) { { GameObject_t1113636619 * L_0 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.MaskableGraphic/CullStateChangedEvent::.ctor() extern "C" void CullStateChangedEvent__ctor_m4089558259 (CullStateChangedEvent_t3661388177 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CullStateChangedEvent__ctor_m4089558259_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UnityEvent_1__ctor_m3777630589(__this, /*hidden argument*/UnityEvent_1__ctor_m3777630589_MethodInfo_var); return; } } // System.Void UnityEngine.UI.MaskUtilities::.ctor() extern "C" void MaskUtilities__ctor_m4270383866 (MaskUtilities_t4151184739 * __this, const MethodInfo* method) { { Object__ctor_m297566312(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.MaskUtilities::Notify2DMaskStateChanged(UnityEngine.Component) extern "C" void MaskUtilities_Notify2DMaskStateChanged_m1613167679 (Il2CppObject * __this /* static, unused */, Component_t1923634451 * ___mask0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_Notify2DMaskStateChanged_m1613167679_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t3395709193 * V_0 = NULL; int32_t V_1 = 0; Il2CppObject * V_2 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2953223642_il2cpp_TypeInfo_var); List_1_t3395709193 * L_0 = ListPool_1_Get_m2062177143(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2062177143_MethodInfo_var); V_0 = L_0; Component_t1923634451 * L_1 = ___mask0; List_1_t3395709193 * L_2 = V_0; NullCheck(L_1); Component_GetComponentsInChildren_TisComponent_t1923634451_m1156099783(L_1, L_2, /*hidden argument*/Component_GetComponentsInChildren_TisComponent_t1923634451_m1156099783_MethodInfo_var); V_1 = 0; goto IL_0067; } IL_0015: { List_1_t3395709193 * L_3 = V_0; int32_t L_4 = V_1; NullCheck(L_3); Component_t1923634451 * L_5 = List_1_get_Item_m3306164819(L_3, L_4, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_6) { goto IL_0044; } } { List_1_t3395709193 * L_7 = V_0; int32_t L_8 = V_1; NullCheck(L_7); Component_t1923634451 * L_9 = List_1_get_Item_m3306164819(L_7, L_8, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); NullCheck(L_9); GameObject_t1113636619 * L_10 = Component_get_gameObject_m2648350745(L_9, /*hidden argument*/NULL); Component_t1923634451 * L_11 = ___mask0; NullCheck(L_11); GameObject_t1113636619 * L_12 = Component_get_gameObject_m2648350745(L_11, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_13 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_10, L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0049; } } IL_0044: { goto IL_0063; } IL_0049: { List_1_t3395709193 * L_14 = V_0; int32_t L_15 = V_1; NullCheck(L_14); Component_t1923634451 * L_16 = List_1_get_Item_m3306164819(L_14, L_15, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); V_2 = ((Il2CppObject *)IsInst(L_16, IClippable_t1239629351_il2cpp_TypeInfo_var)); Il2CppObject * L_17 = V_2; if (!L_17) { goto IL_0062; } } { Il2CppObject * L_18 = V_2; NullCheck(L_18); InterfaceActionInvoker0::Invoke(1 /* System.Void UnityEngine.UI.IClippable::RecalculateClipping() */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_18); } IL_0062: { } IL_0063: { int32_t L_19 = V_1; V_1 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0067: { int32_t L_20 = V_1; List_1_t3395709193 * L_21 = V_0; NullCheck(L_21); int32_t L_22 = List_1_get_Count_m1294235957(L_21, /*hidden argument*/List_1_get_Count_m1294235957_MethodInfo_var); if ((((int32_t)L_20) < ((int32_t)L_22))) { goto IL_0015; } } { List_1_t3395709193 * L_23 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2953223642_il2cpp_TypeInfo_var); ListPool_1_Release_m3920209327(NULL /*static, unused*/, L_23, /*hidden argument*/ListPool_1_Release_m3920209327_MethodInfo_var); return; } } // System.Void UnityEngine.UI.MaskUtilities::NotifyStencilStateChanged(UnityEngine.Component) extern "C" void MaskUtilities_NotifyStencilStateChanged_m3969722420 (Il2CppObject * __this /* static, unused */, Component_t1923634451 * ___mask0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_NotifyStencilStateChanged_m3969722420_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t3395709193 * V_0 = NULL; int32_t V_1 = 0; Il2CppObject * V_2 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2953223642_il2cpp_TypeInfo_var); List_1_t3395709193 * L_0 = ListPool_1_Get_m2062177143(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2062177143_MethodInfo_var); V_0 = L_0; Component_t1923634451 * L_1 = ___mask0; List_1_t3395709193 * L_2 = V_0; NullCheck(L_1); Component_GetComponentsInChildren_TisComponent_t1923634451_m1156099783(L_1, L_2, /*hidden argument*/Component_GetComponentsInChildren_TisComponent_t1923634451_m1156099783_MethodInfo_var); V_1 = 0; goto IL_0067; } IL_0015: { List_1_t3395709193 * L_3 = V_0; int32_t L_4 = V_1; NullCheck(L_3); Component_t1923634451 * L_5 = List_1_get_Item_m3306164819(L_3, L_4, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_6) { goto IL_0044; } } { List_1_t3395709193 * L_7 = V_0; int32_t L_8 = V_1; NullCheck(L_7); Component_t1923634451 * L_9 = List_1_get_Item_m3306164819(L_7, L_8, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); NullCheck(L_9); GameObject_t1113636619 * L_10 = Component_get_gameObject_m2648350745(L_9, /*hidden argument*/NULL); Component_t1923634451 * L_11 = ___mask0; NullCheck(L_11); GameObject_t1113636619 * L_12 = Component_get_gameObject_m2648350745(L_11, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_13 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_10, L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0049; } } IL_0044: { goto IL_0063; } IL_0049: { List_1_t3395709193 * L_14 = V_0; int32_t L_15 = V_1; NullCheck(L_14); Component_t1923634451 * L_16 = List_1_get_Item_m3306164819(L_14, L_15, /*hidden argument*/List_1_get_Item_m3306164819_MethodInfo_var); V_2 = ((Il2CppObject *)IsInst(L_16, IMaskable_t433386433_il2cpp_TypeInfo_var)); Il2CppObject * L_17 = V_2; if (!L_17) { goto IL_0062; } } { Il2CppObject * L_18 = V_2; NullCheck(L_18); InterfaceActionInvoker0::Invoke(0 /* System.Void UnityEngine.UI.IMaskable::RecalculateMasking() */, IMaskable_t433386433_il2cpp_TypeInfo_var, L_18); } IL_0062: { } IL_0063: { int32_t L_19 = V_1; V_1 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0067: { int32_t L_20 = V_1; List_1_t3395709193 * L_21 = V_0; NullCheck(L_21); int32_t L_22 = List_1_get_Count_m1294235957(L_21, /*hidden argument*/List_1_get_Count_m1294235957_MethodInfo_var); if ((((int32_t)L_20) < ((int32_t)L_22))) { goto IL_0015; } } { List_1_t3395709193 * L_23 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2953223642_il2cpp_TypeInfo_var); ListPool_1_Release_m3920209327(NULL /*static, unused*/, L_23, /*hidden argument*/ListPool_1_Release_m3920209327_MethodInfo_var); return; } } // UnityEngine.Transform UnityEngine.UI.MaskUtilities::FindRootSortOverrideCanvas(UnityEngine.Transform) extern "C" Transform_t3600365921 * MaskUtilities_FindRootSortOverrideCanvas_m1053047732 (Il2CppObject * __this /* static, unused */, Transform_t3600365921 * ___start0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_FindRootSortOverrideCanvas_m1053047732_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t487303889 * V_0 = NULL; Canvas_t3310196443 * V_1 = NULL; int32_t V_2 = 0; Transform_t3600365921 * V_3 = NULL; Transform_t3600365921 * G_B8_0 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); List_1_t487303889 * L_0 = ListPool_1_Get_m3146528893(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3146528893_MethodInfo_var); V_0 = L_0; Transform_t3600365921 * L_1 = ___start0; List_1_t487303889 * L_2 = V_0; NullCheck(L_1); Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774(L_1, (bool)0, L_2, /*hidden argument*/Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774_MethodInfo_var); V_1 = (Canvas_t3310196443 *)NULL; V_2 = 0; goto IL_0036; } IL_0018: { List_1_t487303889 * L_3 = V_0; int32_t L_4 = V_2; NullCheck(L_3); Canvas_t3310196443 * L_5 = List_1_get_Item_m1187285853(L_3, L_4, /*hidden argument*/List_1_get_Item_m1187285853_MethodInfo_var); V_1 = L_5; Canvas_t3310196443 * L_6 = V_1; NullCheck(L_6); bool L_7 = Canvas_get_overrideSorting_m1424123543(L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_0031; } } { goto IL_0042; } IL_0031: { int32_t L_8 = V_2; V_2 = ((int32_t)((int32_t)L_8+(int32_t)1)); } IL_0036: { int32_t L_9 = V_2; List_1_t487303889 * L_10 = V_0; NullCheck(L_10); int32_t L_11 = List_1_get_Count_m1106558045(L_10, /*hidden argument*/List_1_get_Count_m1106558045_MethodInfo_var); if ((((int32_t)L_9) < ((int32_t)L_11))) { goto IL_0018; } } IL_0042: { List_1_t487303889 * L_12 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); ListPool_1_Release_m1295952082(NULL /*static, unused*/, L_12, /*hidden argument*/ListPool_1_Release_m1295952082_MethodInfo_var); Canvas_t3310196443 * L_13 = V_1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_14 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_13, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_14) { goto IL_005f; } } { Canvas_t3310196443 * L_15 = V_1; NullCheck(L_15); Transform_t3600365921 * L_16 = Component_get_transform_m2921103810(L_15, /*hidden argument*/NULL); G_B8_0 = L_16; goto IL_0060; } IL_005f: { G_B8_0 = ((Transform_t3600365921 *)(NULL)); } IL_0060: { V_3 = G_B8_0; goto IL_0066; } IL_0066: { Transform_t3600365921 * L_17 = V_3; return L_17; } } // System.Int32 UnityEngine.UI.MaskUtilities::GetStencilDepth(UnityEngine.Transform,UnityEngine.Transform) extern "C" int32_t MaskUtilities_GetStencilDepth_m402474137 (Il2CppObject * __this /* static, unused */, Transform_t3600365921 * ___transform0, Transform_t3600365921 * ___stopAfter1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_GetStencilDepth_m402474137_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; int32_t V_1 = 0; Transform_t3600365921 * V_2 = NULL; List_1_t3275726873 * V_3 = NULL; int32_t V_4 = 0; { V_0 = 0; Transform_t3600365921 * L_0 = ___transform0; Transform_t3600365921 * L_1 = ___stopAfter1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0016; } } { int32_t L_3 = V_0; V_1 = L_3; goto IL_00c5; } IL_0016: { Transform_t3600365921 * L_4 = ___transform0; NullCheck(L_4); Transform_t3600365921 * L_5 = Transform_get_parent_m1293647796(L_4, /*hidden argument*/NULL); V_2 = L_5; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2833241322_il2cpp_TypeInfo_var); List_1_t3275726873 * L_6 = ListPool_1_Get_m1500154352(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1500154352_MethodInfo_var); V_3 = L_6; goto IL_00ac; } IL_0028: { Transform_t3600365921 * L_7 = V_2; List_1_t3275726873 * L_8 = V_3; NullCheck(L_7); Component_GetComponents_TisMask_t1803652131_m1975602924(L_7, L_8, /*hidden argument*/Component_GetComponents_TisMask_t1803652131_m1975602924_MethodInfo_var); V_4 = 0; goto IL_0086; } IL_0038: { List_1_t3275726873 * L_9 = V_3; int32_t L_10 = V_4; NullCheck(L_9); Mask_t1803652131 * L_11 = List_1_get_Item_m1662916923(L_9, L_10, /*hidden argument*/List_1_get_Item_m1662916923_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_12 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_11, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_12) { goto IL_007f; } } { List_1_t3275726873 * L_13 = V_3; int32_t L_14 = V_4; NullCheck(L_13); Mask_t1803652131 * L_15 = List_1_get_Item_m1662916923(L_13, L_14, /*hidden argument*/List_1_get_Item_m1662916923_MethodInfo_var); NullCheck(L_15); bool L_16 = VirtFuncInvoker0< bool >::Invoke(19 /* System.Boolean UnityEngine.UI.Mask::MaskEnabled() */, L_15); if (!L_16) { goto IL_007f; } } { List_1_t3275726873 * L_17 = V_3; int32_t L_18 = V_4; NullCheck(L_17); Mask_t1803652131 * L_19 = List_1_get_Item_m1662916923(L_17, L_18, /*hidden argument*/List_1_get_Item_m1662916923_MethodInfo_var); NullCheck(L_19); Graphic_t1660335611 * L_20 = Mask_get_graphic_m2572620787(L_19, /*hidden argument*/NULL); NullCheck(L_20); bool L_21 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_20); if (!L_21) { goto IL_007f; } } { int32_t L_22 = V_0; V_0 = ((int32_t)((int32_t)L_22+(int32_t)1)); goto IL_0093; } IL_007f: { int32_t L_23 = V_4; V_4 = ((int32_t)((int32_t)L_23+(int32_t)1)); } IL_0086: { int32_t L_24 = V_4; List_1_t3275726873 * L_25 = V_3; NullCheck(L_25); int32_t L_26 = List_1_get_Count_m2576555402(L_25, /*hidden argument*/List_1_get_Count_m2576555402_MethodInfo_var); if ((((int32_t)L_24) < ((int32_t)L_26))) { goto IL_0038; } } IL_0093: { Transform_t3600365921 * L_27 = V_2; Transform_t3600365921 * L_28 = ___stopAfter1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_29 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_27, L_28, /*hidden argument*/NULL); if (!L_29) { goto IL_00a4; } } { goto IL_00b8; } IL_00a4: { Transform_t3600365921 * L_30 = V_2; NullCheck(L_30); Transform_t3600365921 * L_31 = Transform_get_parent_m1293647796(L_30, /*hidden argument*/NULL); V_2 = L_31; } IL_00ac: { Transform_t3600365921 * L_32 = V_2; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_33 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_32, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_33) { goto IL_0028; } } IL_00b8: { List_1_t3275726873 * L_34 = V_3; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2833241322_il2cpp_TypeInfo_var); ListPool_1_Release_m2936487515(NULL /*static, unused*/, L_34, /*hidden argument*/ListPool_1_Release_m2936487515_MethodInfo_var); int32_t L_35 = V_0; V_1 = L_35; goto IL_00c5; } IL_00c5: { int32_t L_36 = V_1; return L_36; } } // System.Boolean UnityEngine.UI.MaskUtilities::IsDescendantOrSelf(UnityEngine.Transform,UnityEngine.Transform) extern "C" bool MaskUtilities_IsDescendantOrSelf_m2247511982 (Il2CppObject * __this /* static, unused */, Transform_t3600365921 * ___father0, Transform_t3600365921 * ___child1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_IsDescendantOrSelf_m2247511982_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; { Transform_t3600365921 * L_0 = ___father0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_1) { goto IL_0019; } } { Transform_t3600365921 * L_2 = ___child1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0020; } } IL_0019: { V_0 = (bool)0; goto IL_0072; } IL_0020: { Transform_t3600365921 * L_4 = ___father0; Transform_t3600365921 * L_5 = ___child1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_0033; } } { V_0 = (bool)1; goto IL_0072; } IL_0033: { goto IL_005a; } IL_0038: { Transform_t3600365921 * L_7 = ___child1; NullCheck(L_7); Transform_t3600365921 * L_8 = Transform_get_parent_m1293647796(L_7, /*hidden argument*/NULL); Transform_t3600365921 * L_9 = ___father0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_10 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_0051; } } { V_0 = (bool)1; goto IL_0072; } IL_0051: { Transform_t3600365921 * L_11 = ___child1; NullCheck(L_11); Transform_t3600365921 * L_12 = Transform_get_parent_m1293647796(L_11, /*hidden argument*/NULL); ___child1 = L_12; } IL_005a: { Transform_t3600365921 * L_13 = ___child1; NullCheck(L_13); Transform_t3600365921 * L_14 = Transform_get_parent_m1293647796(L_13, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_15 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_14, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_15) { goto IL_0038; } } { V_0 = (bool)0; goto IL_0072; } IL_0072: { bool L_16 = V_0; return L_16; } } // UnityEngine.UI.RectMask2D UnityEngine.UI.MaskUtilities::GetRectMaskForClippable(UnityEngine.UI.IClippable) extern "C" RectMask2D_t3474889437 * MaskUtilities_GetRectMaskForClippable_m2464520669 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___clippable0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_GetRectMaskForClippable_m2464520669_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t651996883 * V_0 = NULL; List_1_t487303889 * V_1 = NULL; RectMask2D_t3474889437 * V_2 = NULL; int32_t V_3 = 0; int32_t V_4 = 0; RectMask2D_t3474889437 * V_5 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t209511332_il2cpp_TypeInfo_var); List_1_t651996883 * L_0 = ListPool_1_Get_m4207191750(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m4207191750_MethodInfo_var); V_0 = L_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); List_1_t487303889 * L_1 = ListPool_1_Get_m3146528893(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3146528893_MethodInfo_var); V_1 = L_1; V_2 = (RectMask2D_t3474889437 *)NULL; Il2CppObject * L_2 = ___clippable0; NullCheck(L_2); RectTransform_t3704657025 * L_3 = InterfaceFuncInvoker0< RectTransform_t3704657025 * >::Invoke(2 /* UnityEngine.RectTransform UnityEngine.UI.IClippable::get_rectTransform() */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_2); List_1_t651996883 * L_4 = V_0; NullCheck(L_3); Component_GetComponentsInParent_TisRectMask2D_t3474889437_m3154118616(L_3, (bool)0, L_4, /*hidden argument*/Component_GetComponentsInParent_TisRectMask2D_t3474889437_m3154118616_MethodInfo_var); List_1_t651996883 * L_5 = V_0; NullCheck(L_5); int32_t L_6 = List_1_get_Count_m1529060501(L_5, /*hidden argument*/List_1_get_Count_m1529060501_MethodInfo_var); if ((((int32_t)L_6) <= ((int32_t)0))) { goto IL_00e6; } } { V_3 = 0; goto IL_00d9; } IL_0030: { List_1_t651996883 * L_7 = V_0; int32_t L_8 = V_3; NullCheck(L_7); RectMask2D_t3474889437 * L_9 = List_1_get_Item_m3759222515(L_7, L_8, /*hidden argument*/List_1_get_Item_m3759222515_MethodInfo_var); V_2 = L_9; RectMask2D_t3474889437 * L_10 = V_2; NullCheck(L_10); GameObject_t1113636619 * L_11 = Component_get_gameObject_m2648350745(L_10, /*hidden argument*/NULL); Il2CppObject * L_12 = ___clippable0; NullCheck(L_12); GameObject_t1113636619 * L_13 = InterfaceFuncInvoker0< GameObject_t1113636619 * >::Invoke(0 /* UnityEngine.GameObject UnityEngine.UI.IClippable::get_gameObject() */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_12); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_14 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_11, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0057; } } { V_2 = (RectMask2D_t3474889437 *)NULL; goto IL_00d5; } IL_0057: { RectMask2D_t3474889437 * L_15 = V_2; NullCheck(L_15); bool L_16 = Behaviour_get_isActiveAndEnabled_m3013577336(L_15, /*hidden argument*/NULL); if (L_16) { goto IL_006a; } } { V_2 = (RectMask2D_t3474889437 *)NULL; goto IL_00d5; } IL_006a: { Il2CppObject * L_17 = ___clippable0; NullCheck(L_17); RectTransform_t3704657025 * L_18 = InterfaceFuncInvoker0< RectTransform_t3704657025 * >::Invoke(2 /* UnityEngine.RectTransform UnityEngine.UI.IClippable::get_rectTransform() */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_17); List_1_t487303889 * L_19 = V_1; NullCheck(L_18); Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774(L_18, (bool)0, L_19, /*hidden argument*/Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774_MethodInfo_var); List_1_t487303889 * L_20 = V_1; NullCheck(L_20); int32_t L_21 = List_1_get_Count_m1106558045(L_20, /*hidden argument*/List_1_get_Count_m1106558045_MethodInfo_var); V_4 = ((int32_t)((int32_t)L_21-(int32_t)1)); goto IL_00c5; } IL_0086: { List_1_t487303889 * L_22 = V_1; int32_t L_23 = V_4; NullCheck(L_22); Canvas_t3310196443 * L_24 = List_1_get_Item_m1187285853(L_22, L_23, /*hidden argument*/List_1_get_Item_m1187285853_MethodInfo_var); NullCheck(L_24); Transform_t3600365921 * L_25 = Component_get_transform_m2921103810(L_24, /*hidden argument*/NULL); RectMask2D_t3474889437 * L_26 = V_2; NullCheck(L_26); Transform_t3600365921 * L_27 = Component_get_transform_m2921103810(L_26, /*hidden argument*/NULL); bool L_28 = MaskUtilities_IsDescendantOrSelf_m2247511982(NULL /*static, unused*/, L_25, L_27, /*hidden argument*/NULL); if (L_28) { goto IL_00be; } } { List_1_t487303889 * L_29 = V_1; int32_t L_30 = V_4; NullCheck(L_29); Canvas_t3310196443 * L_31 = List_1_get_Item_m1187285853(L_29, L_30, /*hidden argument*/List_1_get_Item_m1187285853_MethodInfo_var); NullCheck(L_31); bool L_32 = Canvas_get_overrideSorting_m1424123543(L_31, /*hidden argument*/NULL); if (!L_32) { goto IL_00be; } } { V_2 = (RectMask2D_t3474889437 *)NULL; goto IL_00cd; } IL_00be: { int32_t L_33 = V_4; V_4 = ((int32_t)((int32_t)L_33-(int32_t)1)); } IL_00c5: { int32_t L_34 = V_4; if ((((int32_t)L_34) >= ((int32_t)0))) { goto IL_0086; } } IL_00cd: { RectMask2D_t3474889437 * L_35 = V_2; V_5 = L_35; goto IL_00fa; } IL_00d5: { int32_t L_36 = V_3; V_3 = ((int32_t)((int32_t)L_36+(int32_t)1)); } IL_00d9: { int32_t L_37 = V_3; List_1_t651996883 * L_38 = V_0; NullCheck(L_38); int32_t L_39 = List_1_get_Count_m1529060501(L_38, /*hidden argument*/List_1_get_Count_m1529060501_MethodInfo_var); if ((((int32_t)L_37) < ((int32_t)L_39))) { goto IL_0030; } } { } IL_00e6: { List_1_t651996883 * L_40 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t209511332_il2cpp_TypeInfo_var); ListPool_1_Release_m3079893175(NULL /*static, unused*/, L_40, /*hidden argument*/ListPool_1_Release_m3079893175_MethodInfo_var); List_1_t487303889 * L_41 = V_1; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); ListPool_1_Release_m1295952082(NULL /*static, unused*/, L_41, /*hidden argument*/ListPool_1_Release_m1295952082_MethodInfo_var); RectMask2D_t3474889437 * L_42 = V_2; V_5 = L_42; goto IL_00fa; } IL_00fa: { RectMask2D_t3474889437 * L_43 = V_5; return L_43; } } // System.Void UnityEngine.UI.MaskUtilities::GetRectMasksForClip(UnityEngine.UI.RectMask2D,System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>) extern "C" void MaskUtilities_GetRectMasksForClip_m532898711 (Il2CppObject * __this /* static, unused */, RectMask2D_t3474889437 * ___clipper0, List_1_t651996883 * ___masks1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (MaskUtilities_GetRectMasksForClip_m532898711_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t487303889 * V_0 = NULL; List_1_t651996883 * V_1 = NULL; int32_t V_2 = 0; bool V_3 = false; int32_t V_4 = 0; { List_1_t651996883 * L_0 = ___masks1; NullCheck(L_0); List_1_Clear_m168400987(L_0, /*hidden argument*/List_1_Clear_m168400987_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); List_1_t487303889 * L_1 = ListPool_1_Get_m3146528893(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3146528893_MethodInfo_var); V_0 = L_1; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t209511332_il2cpp_TypeInfo_var); List_1_t651996883 * L_2 = ListPool_1_Get_m4207191750(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m4207191750_MethodInfo_var); V_1 = L_2; RectMask2D_t3474889437 * L_3 = ___clipper0; NullCheck(L_3); Transform_t3600365921 * L_4 = Component_get_transform_m2921103810(L_3, /*hidden argument*/NULL); List_1_t651996883 * L_5 = V_1; NullCheck(L_4); Component_GetComponentsInParent_TisRectMask2D_t3474889437_m3154118616(L_4, (bool)0, L_5, /*hidden argument*/Component_GetComponentsInParent_TisRectMask2D_t3474889437_m3154118616_MethodInfo_var); List_1_t651996883 * L_6 = V_1; NullCheck(L_6); int32_t L_7 = List_1_get_Count_m1529060501(L_6, /*hidden argument*/List_1_get_Count_m1529060501_MethodInfo_var); if ((((int32_t)L_7) <= ((int32_t)0))) { goto IL_00dd; } } { RectMask2D_t3474889437 * L_8 = ___clipper0; NullCheck(L_8); Transform_t3600365921 * L_9 = Component_get_transform_m2921103810(L_8, /*hidden argument*/NULL); List_1_t487303889 * L_10 = V_0; NullCheck(L_9); Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774(L_9, (bool)0, L_10, /*hidden argument*/Component_GetComponentsInParent_TisCanvas_t3310196443_m369764774_MethodInfo_var); List_1_t651996883 * L_11 = V_1; NullCheck(L_11); int32_t L_12 = List_1_get_Count_m1529060501(L_11, /*hidden argument*/List_1_get_Count_m1529060501_MethodInfo_var); V_2 = ((int32_t)((int32_t)L_12-(int32_t)1)); goto IL_00d5; } IL_0048: { List_1_t651996883 * L_13 = V_1; int32_t L_14 = V_2; NullCheck(L_13); RectMask2D_t3474889437 * L_15 = List_1_get_Item_m3759222515(L_13, L_14, /*hidden argument*/List_1_get_Item_m3759222515_MethodInfo_var); NullCheck(L_15); bool L_16 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_15); if (L_16) { goto IL_005f; } } { goto IL_00d1; } IL_005f: { V_3 = (bool)1; List_1_t487303889 * L_17 = V_0; NullCheck(L_17); int32_t L_18 = List_1_get_Count_m1106558045(L_17, /*hidden argument*/List_1_get_Count_m1106558045_MethodInfo_var); V_4 = ((int32_t)((int32_t)L_18-(int32_t)1)); goto IL_00b5; } IL_0070: { List_1_t487303889 * L_19 = V_0; int32_t L_20 = V_4; NullCheck(L_19); Canvas_t3310196443 * L_21 = List_1_get_Item_m1187285853(L_19, L_20, /*hidden argument*/List_1_get_Item_m1187285853_MethodInfo_var); NullCheck(L_21); Transform_t3600365921 * L_22 = Component_get_transform_m2921103810(L_21, /*hidden argument*/NULL); List_1_t651996883 * L_23 = V_1; int32_t L_24 = V_2; NullCheck(L_23); RectMask2D_t3474889437 * L_25 = List_1_get_Item_m3759222515(L_23, L_24, /*hidden argument*/List_1_get_Item_m3759222515_MethodInfo_var); NullCheck(L_25); Transform_t3600365921 * L_26 = Component_get_transform_m2921103810(L_25, /*hidden argument*/NULL); bool L_27 = MaskUtilities_IsDescendantOrSelf_m2247511982(NULL /*static, unused*/, L_22, L_26, /*hidden argument*/NULL); if (L_27) { goto IL_00ae; } } { List_1_t487303889 * L_28 = V_0; int32_t L_29 = V_4; NullCheck(L_28); Canvas_t3310196443 * L_30 = List_1_get_Item_m1187285853(L_28, L_29, /*hidden argument*/List_1_get_Item_m1187285853_MethodInfo_var); NullCheck(L_30); bool L_31 = Canvas_get_overrideSorting_m1424123543(L_30, /*hidden argument*/NULL); if (!L_31) { goto IL_00ae; } } { V_3 = (bool)0; goto IL_00bd; } IL_00ae: { int32_t L_32 = V_4; V_4 = ((int32_t)((int32_t)L_32-(int32_t)1)); } IL_00b5: { int32_t L_33 = V_4; if ((((int32_t)L_33) >= ((int32_t)0))) { goto IL_0070; } } IL_00bd: { bool L_34 = V_3; if (!L_34) { goto IL_00d0; } } { List_1_t651996883 * L_35 = ___masks1; List_1_t651996883 * L_36 = V_1; int32_t L_37 = V_2; NullCheck(L_36); RectMask2D_t3474889437 * L_38 = List_1_get_Item_m3759222515(L_36, L_37, /*hidden argument*/List_1_get_Item_m3759222515_MethodInfo_var); NullCheck(L_35); List_1_Add_m3779394834(L_35, L_38, /*hidden argument*/List_1_Add_m3779394834_MethodInfo_var); } IL_00d0: { } IL_00d1: { int32_t L_39 = V_2; V_2 = ((int32_t)((int32_t)L_39-(int32_t)1)); } IL_00d5: { int32_t L_40 = V_2; if ((((int32_t)L_40) >= ((int32_t)0))) { goto IL_0048; } } { } IL_00dd: { List_1_t651996883 * L_41 = V_1; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t209511332_il2cpp_TypeInfo_var); ListPool_1_Release_m3079893175(NULL /*static, unused*/, L_41, /*hidden argument*/ListPool_1_Release_m3079893175_MethodInfo_var); List_1_t487303889 * L_42 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); ListPool_1_Release_m1295952082(NULL /*static, unused*/, L_42, /*hidden argument*/ListPool_1_Release_m1295952082_MethodInfo_var); return; } } // System.Void UnityEngine.UI.Misc::Destroy(UnityEngine.Object) extern "C" void Misc_Destroy_m3285455208 (Il2CppObject * __this /* static, unused */, Object_t631007953 * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Misc_Destroy_m3285455208_MetadataUsageId); s_Il2CppMethodInitialized = true; } GameObject_t1113636619 * V_0 = NULL; { Object_t631007953 * L_0 = ___obj0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_004c; } } { bool L_2 = Application_get_isPlaying_m2058545906(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_2) { goto IL_0045; } } { Object_t631007953 * L_3 = ___obj0; if (!((GameObject_t1113636619 *)IsInstSealed(L_3, GameObject_t1113636619_il2cpp_TypeInfo_var))) { goto IL_0039; } } { Object_t631007953 * L_4 = ___obj0; V_0 = ((GameObject_t1113636619 *)IsInstSealed(L_4, GameObject_t1113636619_il2cpp_TypeInfo_var)); GameObject_t1113636619 * L_5 = V_0; NullCheck(L_5); Transform_t3600365921 * L_6 = GameObject_get_transform_m393750976(L_5, /*hidden argument*/NULL); NullCheck(L_6); Transform_set_parent_m1032008535(L_6, (Transform_t3600365921 *)NULL, /*hidden argument*/NULL); } IL_0039: { Object_t631007953 * L_7 = ___obj0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); Object_Destroy_m2752645118(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); goto IL_004b; } IL_0045: { Object_t631007953 * L_8 = ___obj0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); Object_DestroyImmediate_m1556866283(NULL /*static, unused*/, L_8, /*hidden argument*/NULL); } IL_004b: { } IL_004c: { return; } } // System.Void UnityEngine.UI.Misc::DestroyImmediate(UnityEngine.Object) extern "C" void Misc_DestroyImmediate_m3534039591 (Il2CppObject * __this /* static, unused */, Object_t631007953 * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Misc_DestroyImmediate_m3534039591_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Object_t631007953 * L_0 = ___obj0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_002a; } } { bool L_2 = Application_get_isEditor_m3427485980(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_2) { goto IL_0023; } } { Object_t631007953 * L_3 = ___obj0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); Object_DestroyImmediate_m1556866283(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); goto IL_0029; } IL_0023: { Object_t631007953 * L_4 = ___obj0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); Object_Destroy_m2752645118(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); } IL_0029: { } IL_002a: { return; } } // Conversion methods for marshalling of: UnityEngine.UI.Navigation extern "C" void Navigation_t3049316579_marshal_pinvoke(const Navigation_t3049316579& unmarshaled, Navigation_t3049316579_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___m_SelectOnUp_1Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_SelectOnUp' of type 'Navigation': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_SelectOnUp_1Exception); } extern "C" void Navigation_t3049316579_marshal_pinvoke_back(const Navigation_t3049316579_marshaled_pinvoke& marshaled, Navigation_t3049316579& unmarshaled) { Il2CppCodeGenException* ___m_SelectOnUp_1Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_SelectOnUp' of type 'Navigation': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_SelectOnUp_1Exception); } // Conversion method for clean up from marshalling of: UnityEngine.UI.Navigation extern "C" void Navigation_t3049316579_marshal_pinvoke_cleanup(Navigation_t3049316579_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.UI.Navigation extern "C" void Navigation_t3049316579_marshal_com(const Navigation_t3049316579& unmarshaled, Navigation_t3049316579_marshaled_com& marshaled) { Il2CppCodeGenException* ___m_SelectOnUp_1Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_SelectOnUp' of type 'Navigation': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_SelectOnUp_1Exception); } extern "C" void Navigation_t3049316579_marshal_com_back(const Navigation_t3049316579_marshaled_com& marshaled, Navigation_t3049316579& unmarshaled) { Il2CppCodeGenException* ___m_SelectOnUp_1Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_SelectOnUp' of type 'Navigation': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_SelectOnUp_1Exception); } // Conversion method for clean up from marshalling of: UnityEngine.UI.Navigation extern "C" void Navigation_t3049316579_marshal_com_cleanup(Navigation_t3049316579_marshaled_com& marshaled) { } // UnityEngine.UI.Navigation/Mode UnityEngine.UI.Navigation::get_mode() extern "C" int32_t Navigation_get_mode_m1766451275 (Navigation_t3049316579 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_Mode_0(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } extern "C" int32_t Navigation_get_mode_m1766451275_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); return Navigation_get_mode_m1766451275(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_mode(UnityEngine.UI.Navigation/Mode) extern "C" void Navigation_set_mode_m3709908198 (Navigation_t3049316579 * __this, int32_t ___value0, const MethodInfo* method) { { int32_t L_0 = ___value0; __this->set_m_Mode_0(L_0); return; } } extern "C" void Navigation_set_mode_m3709908198_AdjustorThunk (Il2CppObject * __this, int32_t ___value0, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); Navigation_set_mode_m3709908198(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnUp() extern "C" Selectable_t3250028441 * Navigation_get_selectOnUp_m3602387123 (Navigation_t3049316579 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Selectable_t3250028441 * L_0 = __this->get_m_SelectOnUp_1(); V_0 = L_0; goto IL_000d; } IL_000d: { Selectable_t3250028441 * L_1 = V_0; return L_1; } } extern "C" Selectable_t3250028441 * Navigation_get_selectOnUp_m3602387123_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); return Navigation_get_selectOnUp_m3602387123(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnUp(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnUp_m827629728 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { { Selectable_t3250028441 * L_0 = ___value0; __this->set_m_SelectOnUp_1(L_0); return; } } extern "C" void Navigation_set_selectOnUp_m827629728_AdjustorThunk (Il2CppObject * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); Navigation_set_selectOnUp_m827629728(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnDown() extern "C" Selectable_t3250028441 * Navigation_get_selectOnDown_m1912812616 (Navigation_t3049316579 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Selectable_t3250028441 * L_0 = __this->get_m_SelectOnDown_2(); V_0 = L_0; goto IL_000d; } IL_000d: { Selectable_t3250028441 * L_1 = V_0; return L_1; } } extern "C" Selectable_t3250028441 * Navigation_get_selectOnDown_m1912812616_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); return Navigation_get_selectOnDown_m1912812616(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnDown(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnDown_m1641183109 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { { Selectable_t3250028441 * L_0 = ___value0; __this->set_m_SelectOnDown_2(L_0); return; } } extern "C" void Navigation_set_selectOnDown_m1641183109_AdjustorThunk (Il2CppObject * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); Navigation_set_selectOnDown_m1641183109(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnLeft() extern "C" Selectable_t3250028441 * Navigation_get_selectOnLeft_m2755354667 (Navigation_t3049316579 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Selectable_t3250028441 * L_0 = __this->get_m_SelectOnLeft_3(); V_0 = L_0; goto IL_000d; } IL_000d: { Selectable_t3250028441 * L_1 = V_0; return L_1; } } extern "C" Selectable_t3250028441 * Navigation_get_selectOnLeft_m2755354667_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); return Navigation_get_selectOnLeft_m2755354667(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnLeft(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnLeft_m873759494 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { { Selectable_t3250028441 * L_0 = ___value0; __this->set_m_SelectOnLeft_3(L_0); return; } } extern "C" void Navigation_set_selectOnLeft_m873759494_AdjustorThunk (Il2CppObject * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); Navigation_set_selectOnLeft_m873759494(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnRight() extern "C" Selectable_t3250028441 * Navigation_get_selectOnRight_m1269340398 (Navigation_t3049316579 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Selectable_t3250028441 * L_0 = __this->get_m_SelectOnRight_4(); V_0 = L_0; goto IL_000d; } IL_000d: { Selectable_t3250028441 * L_1 = V_0; return L_1; } } extern "C" Selectable_t3250028441 * Navigation_get_selectOnRight_m1269340398_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); return Navigation_get_selectOnRight_m1269340398(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnRight(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnRight_m1783025816 (Navigation_t3049316579 * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { { Selectable_t3250028441 * L_0 = ___value0; __this->set_m_SelectOnRight_4(L_0); return; } } extern "C" void Navigation_set_selectOnRight_m1783025816_AdjustorThunk (Il2CppObject * __this, Selectable_t3250028441 * ___value0, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); Navigation_set_selectOnRight_m1783025816(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Navigation UnityEngine.UI.Navigation::get_defaultNavigation() extern "C" Navigation_t3049316579 Navigation_get_defaultNavigation_m2181582095 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Navigation_get_defaultNavigation_m2181582095_MetadataUsageId); s_Il2CppMethodInitialized = true; } Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Navigation_t3049316579 V_1; memset(&V_1, 0, sizeof(V_1)); { Initobj (Navigation_t3049316579_il2cpp_TypeInfo_var, (&V_0)); (&V_0)->set_m_Mode_0(3); Navigation_t3049316579 L_0 = V_0; V_1 = L_0; goto IL_0018; } IL_0018: { Navigation_t3049316579 L_1 = V_1; return L_1; } } // System.Boolean UnityEngine.UI.Navigation::Equals(UnityEngine.UI.Navigation) extern "C" bool Navigation_Equals_m317484440 (Navigation_t3049316579 * __this, Navigation_t3049316579 ___other0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Navigation_Equals_m317484440_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B6_0 = 0; { int32_t L_0 = Navigation_get_mode_m1766451275(__this, /*hidden argument*/NULL); int32_t L_1 = Navigation_get_mode_m1766451275((&___other0), /*hidden argument*/NULL); if ((!(((uint32_t)L_0) == ((uint32_t)L_1)))) { goto IL_006c; } } { Selectable_t3250028441 * L_2 = Navigation_get_selectOnUp_m3602387123(__this, /*hidden argument*/NULL); Selectable_t3250028441 * L_3 = Navigation_get_selectOnUp_m3602387123((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_2, L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_006c; } } { Selectable_t3250028441 * L_5 = Navigation_get_selectOnDown_m1912812616(__this, /*hidden argument*/NULL); Selectable_t3250028441 * L_6 = Navigation_get_selectOnDown_m1912812616((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_7 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_006c; } } { Selectable_t3250028441 * L_8 = Navigation_get_selectOnLeft_m2755354667(__this, /*hidden argument*/NULL); Selectable_t3250028441 * L_9 = Navigation_get_selectOnLeft_m2755354667((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_10 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_006c; } } { Selectable_t3250028441 * L_11 = Navigation_get_selectOnRight_m1269340398(__this, /*hidden argument*/NULL); Selectable_t3250028441 * L_12 = Navigation_get_selectOnRight_m1269340398((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_13 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_11, L_12, /*hidden argument*/NULL); G_B6_0 = ((int32_t)(L_13)); goto IL_006d; } IL_006c: { G_B6_0 = 0; } IL_006d: { V_0 = (bool)G_B6_0; goto IL_0073; } IL_0073: { bool L_14 = V_0; return L_14; } } extern "C" bool Navigation_Equals_m317484440_AdjustorThunk (Il2CppObject * __this, Navigation_t3049316579 ___other0, const MethodInfo* method) { Navigation_t3049316579 * _thisAdjusted = reinterpret_cast<Navigation_t3049316579 *>(__this + 1); return Navigation_Equals_m317484440(_thisAdjusted, ___other0, method); } // System.Void UnityEngine.UI.Outline::.ctor() extern "C" void Outline__ctor_m486796615 (Outline_t2536100125 * __this, const MethodInfo* method) { { Shadow__ctor_m3924185169(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Outline::ModifyMesh(UnityEngine.UI.VertexHelper) extern "C" void Outline_ModifyMesh_m226991704 (Outline_t2536100125 * __this, VertexHelper_t2453304189 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Outline_ModifyMesh_m226991704_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t1234605051 * V_0 = NULL; int32_t V_1 = 0; int32_t V_2 = 0; int32_t V_3 = 0; Vector2_t2156229523 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t2156229523 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t2156229523 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t2156229523 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t2156229523 V_8; memset(&V_8, 0, sizeof(V_8)); Vector2_t2156229523 V_9; memset(&V_9, 0, sizeof(V_9)); Vector2_t2156229523 V_10; memset(&V_10, 0, sizeof(V_10)); Vector2_t2156229523 V_11; memset(&V_11, 0, sizeof(V_11)); { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0011; } } { goto IL_0151; } IL_0011: { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t792119500_il2cpp_TypeInfo_var); List_1_t1234605051 * L_1 = ListPool_1_Get_m738675669(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m738675669_MethodInfo_var); V_0 = L_1; VertexHelper_t2453304189 * L_2 = ___vh0; List_1_t1234605051 * L_3 = V_0; NullCheck(L_2); VertexHelper_GetUIVertexStream_m785241639(L_2, L_3, /*hidden argument*/NULL); List_1_t1234605051 * L_4 = V_0; NullCheck(L_4); int32_t L_5 = List_1_get_Count_m401353472(L_4, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); V_1 = ((int32_t)((int32_t)L_5*(int32_t)5)); List_1_t1234605051 * L_6 = V_0; NullCheck(L_6); int32_t L_7 = List_1_get_Capacity_m3666274724(L_6, /*hidden argument*/List_1_get_Capacity_m3666274724_MethodInfo_var); int32_t L_8 = V_1; if ((((int32_t)L_7) >= ((int32_t)L_8))) { goto IL_003a; } } { List_1_t1234605051 * L_9 = V_0; int32_t L_10 = V_1; NullCheck(L_9); List_1_set_Capacity_m2777925136(L_9, L_10, /*hidden argument*/List_1_set_Capacity_m2777925136_MethodInfo_var); } IL_003a: { V_2 = 0; List_1_t1234605051 * L_11 = V_0; NullCheck(L_11); int32_t L_12 = List_1_get_Count_m401353472(L_11, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); V_3 = L_12; List_1_t1234605051 * L_13 = V_0; Color_t2555686324 L_14 = Shadow_get_effectColor_m911451105(__this, /*hidden argument*/NULL); Color32_t2600501292 L_15 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_14, /*hidden argument*/NULL); int32_t L_16 = V_2; List_1_t1234605051 * L_17 = V_0; NullCheck(L_17); int32_t L_18 = List_1_get_Count_m401353472(L_17, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); Vector2_t2156229523 L_19 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_4 = L_19; float L_20 = (&V_4)->get_x_0(); Vector2_t2156229523 L_21 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_5 = L_21; float L_22 = (&V_5)->get_y_1(); Shadow_ApplyShadowZeroAlloc_m1225757410(__this, L_13, L_15, L_16, L_18, L_20, L_22, /*hidden argument*/NULL); int32_t L_23 = V_3; V_2 = L_23; List_1_t1234605051 * L_24 = V_0; NullCheck(L_24); int32_t L_25 = List_1_get_Count_m401353472(L_24, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); V_3 = L_25; List_1_t1234605051 * L_26 = V_0; Color_t2555686324 L_27 = Shadow_get_effectColor_m911451105(__this, /*hidden argument*/NULL); Color32_t2600501292 L_28 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_27, /*hidden argument*/NULL); int32_t L_29 = V_2; List_1_t1234605051 * L_30 = V_0; NullCheck(L_30); int32_t L_31 = List_1_get_Count_m401353472(L_30, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); Vector2_t2156229523 L_32 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_6 = L_32; float L_33 = (&V_6)->get_x_0(); Vector2_t2156229523 L_34 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_7 = L_34; float L_35 = (&V_7)->get_y_1(); Shadow_ApplyShadowZeroAlloc_m1225757410(__this, L_26, L_28, L_29, L_31, L_33, ((-L_35)), /*hidden argument*/NULL); int32_t L_36 = V_3; V_2 = L_36; List_1_t1234605051 * L_37 = V_0; NullCheck(L_37); int32_t L_38 = List_1_get_Count_m401353472(L_37, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); V_3 = L_38; List_1_t1234605051 * L_39 = V_0; Color_t2555686324 L_40 = Shadow_get_effectColor_m911451105(__this, /*hidden argument*/NULL); Color32_t2600501292 L_41 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_40, /*hidden argument*/NULL); int32_t L_42 = V_2; List_1_t1234605051 * L_43 = V_0; NullCheck(L_43); int32_t L_44 = List_1_get_Count_m401353472(L_43, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); Vector2_t2156229523 L_45 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_8 = L_45; float L_46 = (&V_8)->get_x_0(); Vector2_t2156229523 L_47 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_9 = L_47; float L_48 = (&V_9)->get_y_1(); Shadow_ApplyShadowZeroAlloc_m1225757410(__this, L_39, L_41, L_42, L_44, ((-L_46)), L_48, /*hidden argument*/NULL); int32_t L_49 = V_3; V_2 = L_49; List_1_t1234605051 * L_50 = V_0; NullCheck(L_50); int32_t L_51 = List_1_get_Count_m401353472(L_50, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); V_3 = L_51; List_1_t1234605051 * L_52 = V_0; Color_t2555686324 L_53 = Shadow_get_effectColor_m911451105(__this, /*hidden argument*/NULL); Color32_t2600501292 L_54 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_53, /*hidden argument*/NULL); int32_t L_55 = V_2; List_1_t1234605051 * L_56 = V_0; NullCheck(L_56); int32_t L_57 = List_1_get_Count_m401353472(L_56, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); Vector2_t2156229523 L_58 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_10 = L_58; float L_59 = (&V_10)->get_x_0(); Vector2_t2156229523 L_60 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_11 = L_60; float L_61 = (&V_11)->get_y_1(); Shadow_ApplyShadowZeroAlloc_m1225757410(__this, L_52, L_54, L_55, L_57, ((-L_59)), ((-L_61)), /*hidden argument*/NULL); VertexHelper_t2453304189 * L_62 = ___vh0; NullCheck(L_62); VertexHelper_Clear_m627349662(L_62, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_63 = ___vh0; List_1_t1234605051 * L_64 = V_0; NullCheck(L_63); VertexHelper_AddUIVertexTriangleStream_m3255143338(L_63, L_64, /*hidden argument*/NULL); List_1_t1234605051 * L_65 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t792119500_il2cpp_TypeInfo_var); ListPool_1_Release_m1246825787(NULL /*static, unused*/, L_65, /*hidden argument*/ListPool_1_Release_m1246825787_MethodInfo_var); } IL_0151: { return; } } // System.Void UnityEngine.UI.PositionAsUV1::.ctor() extern "C" void PositionAsUV1__ctor_m3868540123 (PositionAsUV1_t3991086357 * __this, const MethodInfo* method) { { BaseMeshEffect__ctor_m2277545720(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.PositionAsUV1::ModifyMesh(UnityEngine.UI.VertexHelper) extern "C" void PositionAsUV1_ModifyMesh_m4231919476 (PositionAsUV1_t3991086357 * __this, VertexHelper_t2453304189 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (PositionAsUV1_ModifyMesh_m4231919476_MetadataUsageId); s_Il2CppMethodInitialized = true; } UIVertex_t4057497605 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t V_1 = 0; { Initobj (UIVertex_t4057497605_il2cpp_TypeInfo_var, (&V_0)); V_1 = 0; goto IL_004b; } IL_0010: { VertexHelper_t2453304189 * L_0 = ___vh0; int32_t L_1 = V_1; NullCheck(L_0); VertexHelper_PopulateUIVertex_m3870699345(L_0, (&V_0), L_1, /*hidden argument*/NULL); Vector3_t3722313464 * L_2 = (&V_0)->get_address_of_position_0(); float L_3 = L_2->get_x_1(); Vector3_t3722313464 * L_4 = (&V_0)->get_address_of_position_0(); float L_5 = L_4->get_y_2(); Vector2_t2156229523 L_6; memset(&L_6, 0, sizeof(L_6)); Vector2__ctor_m4060800441(&L_6, L_3, L_5, /*hidden argument*/NULL); (&V_0)->set_uv1_4(L_6); VertexHelper_t2453304189 * L_7 = ___vh0; UIVertex_t4057497605 L_8 = V_0; int32_t L_9 = V_1; NullCheck(L_7); VertexHelper_SetUIVertex_m3094993826(L_7, L_8, L_9, /*hidden argument*/NULL); int32_t L_10 = V_1; V_1 = ((int32_t)((int32_t)L_10+(int32_t)1)); } IL_004b: { int32_t L_11 = V_1; VertexHelper_t2453304189 * L_12 = ___vh0; NullCheck(L_12); int32_t L_13 = VertexHelper_get_currentVertCount_m124779331(L_12, /*hidden argument*/NULL); if ((((int32_t)L_11) < ((int32_t)L_13))) { goto IL_0010; } } { return; } } // System.Void UnityEngine.UI.RawImage::.ctor() extern "C" void RawImage__ctor_m2348784658 (RawImage_t3182918964 * __this, const MethodInfo* method) { { Rect_t2360479859 L_0; memset(&L_0, 0, sizeof(L_0)); Rect__ctor_m2635848439(&L_0, (0.0f), (0.0f), (1.0f), (1.0f), /*hidden argument*/NULL); __this->set_m_UVRect_29(L_0); MaskableGraphic__ctor_m3705055375(__this, /*hidden argument*/NULL); Graphic_set_useLegacyMeshGeneration_m2447316585(__this, (bool)0, /*hidden argument*/NULL); return; } } // UnityEngine.Texture UnityEngine.UI.RawImage::get_mainTexture() extern "C" Texture_t3661962703 * RawImage_get_mainTexture_m2396337033 (RawImage_t3182918964 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RawImage_get_mainTexture_m2396337033_MetadataUsageId); s_Il2CppMethodInitialized = true; } Texture_t3661962703 * V_0 = NULL; { Texture_t3661962703 * L_0 = __this->get_m_Texture_28(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0057; } } { Material_t340375123 * L_2 = VirtFuncInvoker0< Material_t340375123 * >::Invoke(32 /* UnityEngine.Material UnityEngine.UI.Graphic::get_material() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_004c; } } { Material_t340375123 * L_4 = VirtFuncInvoker0< Material_t340375123 * >::Invoke(32 /* UnityEngine.Material UnityEngine.UI.Graphic::get_material() */, __this); NullCheck(L_4); Texture_t3661962703 * L_5 = Material_get_mainTexture_m4181654696(L_4, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_004c; } } { Material_t340375123 * L_7 = VirtFuncInvoker0< Material_t340375123 * >::Invoke(32 /* UnityEngine.Material UnityEngine.UI.Graphic::get_material() */, __this); NullCheck(L_7); Texture_t3661962703 * L_8 = Material_get_mainTexture_m4181654696(L_7, /*hidden argument*/NULL); V_0 = L_8; goto IL_0063; } IL_004c: { IL2CPP_RUNTIME_CLASS_INIT(Graphic_t1660335611_il2cpp_TypeInfo_var); Texture2D_t3840446185 * L_9 = ((Graphic_t1660335611_StaticFields*)Graphic_t1660335611_il2cpp_TypeInfo_var->static_fields)->get_s_WhiteTexture_3(); V_0 = L_9; goto IL_0063; } IL_0057: { Texture_t3661962703 * L_10 = __this->get_m_Texture_28(); V_0 = L_10; goto IL_0063; } IL_0063: { Texture_t3661962703 * L_11 = V_0; return L_11; } } // UnityEngine.Texture UnityEngine.UI.RawImage::get_texture() extern "C" Texture_t3661962703 * RawImage_get_texture_m2319641407 (RawImage_t3182918964 * __this, const MethodInfo* method) { Texture_t3661962703 * V_0 = NULL; { Texture_t3661962703 * L_0 = __this->get_m_Texture_28(); V_0 = L_0; goto IL_000d; } IL_000d: { Texture_t3661962703 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.RawImage::set_texture(UnityEngine.Texture) extern "C" void RawImage_set_texture_m415027901 (RawImage_t3182918964 * __this, Texture_t3661962703 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RawImage_set_texture_m415027901_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Texture_t3661962703 * L_0 = __this->get_m_Texture_28(); Texture_t3661962703 * L_1 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0017; } } { goto IL_002a; } IL_0017: { Texture_t3661962703 * L_3 = ___value0; __this->set_m_Texture_28(L_3); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(29 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); } IL_002a: { return; } } // UnityEngine.Rect UnityEngine.UI.RawImage::get_uvRect() extern "C" Rect_t2360479859 RawImage_get_uvRect_m3483369478 (RawImage_t3182918964 * __this, const MethodInfo* method) { Rect_t2360479859 V_0; memset(&V_0, 0, sizeof(V_0)); { Rect_t2360479859 L_0 = __this->get_m_UVRect_29(); V_0 = L_0; goto IL_000d; } IL_000d: { Rect_t2360479859 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.RawImage::set_uvRect(UnityEngine.Rect) extern "C" void RawImage_set_uvRect_m529943894 (RawImage_t3182918964 * __this, Rect_t2360479859 ___value0, const MethodInfo* method) { { Rect_t2360479859 L_0 = __this->get_m_UVRect_29(); Rect_t2360479859 L_1 = ___value0; bool L_2 = Rect_op_Equality_m1072810924(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0017; } } { goto IL_0024; } IL_0017: { Rect_t2360479859 L_3 = ___value0; __this->set_m_UVRect_29(L_3); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); } IL_0024: { return; } } // System.Void UnityEngine.UI.RawImage::SetNativeSize() extern "C" void RawImage_SetNativeSize_m4254640819 (RawImage_t3182918964 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RawImage_SetNativeSize_m4254640819_MetadataUsageId); s_Il2CppMethodInitialized = true; } Texture_t3661962703 * V_0 = NULL; int32_t V_1 = 0; Rect_t2360479859 V_2; memset(&V_2, 0, sizeof(V_2)); int32_t V_3 = 0; Rect_t2360479859 V_4; memset(&V_4, 0, sizeof(V_4)); { Texture_t3661962703 * L_0 = VirtFuncInvoker0< Texture_t3661962703 * >::Invoke(35 /* UnityEngine.Texture UnityEngine.UI.Graphic::get_mainTexture() */, __this); V_0 = L_0; Texture_t3661962703 * L_1 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0079; } } { Texture_t3661962703 * L_3 = V_0; NullCheck(L_3); int32_t L_4 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 UnityEngine.Texture::get_width() */, L_3); Rect_t2360479859 L_5 = RawImage_get_uvRect_m3483369478(__this, /*hidden argument*/NULL); V_2 = L_5; float L_6 = Rect_get_width_m3421965717((&V_2), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); int32_t L_7 = Mathf_RoundToInt_m2031261733(NULL /*static, unused*/, ((float)((float)(((float)((float)L_4)))*(float)L_6)), /*hidden argument*/NULL); V_1 = L_7; Texture_t3661962703 * L_8 = V_0; NullCheck(L_8); int32_t L_9 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 UnityEngine.Texture::get_height() */, L_8); Rect_t2360479859 L_10 = RawImage_get_uvRect_m3483369478(__this, /*hidden argument*/NULL); V_4 = L_10; float L_11 = Rect_get_height_m977101306((&V_4), /*hidden argument*/NULL); int32_t L_12 = Mathf_RoundToInt_m2031261733(NULL /*static, unused*/, ((float)((float)(((float)((float)L_9)))*(float)L_11)), /*hidden argument*/NULL); V_3 = L_12; RectTransform_t3704657025 * L_13 = Graphic_get_rectTransform_m1167152468(__this, /*hidden argument*/NULL); RectTransform_t3704657025 * L_14 = Graphic_get_rectTransform_m1167152468(__this, /*hidden argument*/NULL); NullCheck(L_14); Vector2_t2156229523 L_15 = RectTransform_get_anchorMin_m1342910522(L_14, /*hidden argument*/NULL); NullCheck(L_13); RectTransform_set_anchorMax_m2389806509(L_13, L_15, /*hidden argument*/NULL); RectTransform_t3704657025 * L_16 = Graphic_get_rectTransform_m1167152468(__this, /*hidden argument*/NULL); int32_t L_17 = V_1; int32_t L_18 = V_3; Vector2_t2156229523 L_19; memset(&L_19, 0, sizeof(L_19)); Vector2__ctor_m4060800441(&L_19, (((float)((float)L_17))), (((float)((float)L_18))), /*hidden argument*/NULL); NullCheck(L_16); RectTransform_set_sizeDelta_m344906562(L_16, L_19, /*hidden argument*/NULL); } IL_0079: { return; } } // System.Void UnityEngine.UI.RawImage::OnPopulateMesh(UnityEngine.UI.VertexHelper) extern "C" void RawImage_OnPopulateMesh_m1115858855 (RawImage_t3182918964 * __this, VertexHelper_t2453304189 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RawImage_OnPopulateMesh_m1115858855_MetadataUsageId); s_Il2CppMethodInitialized = true; } Texture_t3661962703 * V_0 = NULL; Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Vector4_t3319028937 V_2; memset(&V_2, 0, sizeof(V_2)); float V_3 = 0.0f; Vector2_t2156229523 V_4; memset(&V_4, 0, sizeof(V_4)); float V_5 = 0.0f; Vector2_t2156229523 V_6; memset(&V_6, 0, sizeof(V_6)); Color_t2555686324 V_7; memset(&V_7, 0, sizeof(V_7)); { Texture_t3661962703 * L_0 = VirtFuncInvoker0< Texture_t3661962703 * >::Invoke(35 /* UnityEngine.Texture UnityEngine.UI.Graphic::get_mainTexture() */, __this); V_0 = L_0; VertexHelper_t2453304189 * L_1 = ___vh0; NullCheck(L_1); VertexHelper_Clear_m627349662(L_1, /*hidden argument*/NULL); Texture_t3661962703 * L_2 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_01a3; } } { Rect_t2360479859 L_4 = Graphic_GetPixelAdjustedRect_m3729397999(__this, /*hidden argument*/NULL); V_1 = L_4; float L_5 = Rect_get_x_m3218181674((&V_1), /*hidden argument*/NULL); float L_6 = Rect_get_y_m3218181675((&V_1), /*hidden argument*/NULL); float L_7 = Rect_get_x_m3218181674((&V_1), /*hidden argument*/NULL); float L_8 = Rect_get_width_m3421965717((&V_1), /*hidden argument*/NULL); float L_9 = Rect_get_y_m3218181675((&V_1), /*hidden argument*/NULL); float L_10 = Rect_get_height_m977101306((&V_1), /*hidden argument*/NULL); Vector4__ctor_m1702261405((&V_2), L_5, L_6, ((float)((float)L_7+(float)L_8)), ((float)((float)L_9+(float)L_10)), /*hidden argument*/NULL); Texture_t3661962703 * L_11 = V_0; NullCheck(L_11); int32_t L_12 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 UnityEngine.Texture::get_width() */, L_11); Texture_t3661962703 * L_13 = V_0; NullCheck(L_13); Vector2_t2156229523 L_14 = Texture_get_texelSize_m2512432852(L_13, /*hidden argument*/NULL); V_4 = L_14; float L_15 = (&V_4)->get_x_0(); V_3 = ((float)((float)(((float)((float)L_12)))*(float)L_15)); Texture_t3661962703 * L_16 = V_0; NullCheck(L_16); int32_t L_17 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 UnityEngine.Texture::get_height() */, L_16); Texture_t3661962703 * L_18 = V_0; NullCheck(L_18); Vector2_t2156229523 L_19 = Texture_get_texelSize_m2512432852(L_18, /*hidden argument*/NULL); V_6 = L_19; float L_20 = (&V_6)->get_y_1(); V_5 = ((float)((float)(((float)((float)L_17)))*(float)L_20)); Color_t2555686324 L_21 = VirtFuncInvoker0< Color_t2555686324 >::Invoke(22 /* UnityEngine.Color UnityEngine.UI.Graphic::get_color() */, __this); V_7 = L_21; VertexHelper_t2453304189 * L_22 = ___vh0; float L_23 = (&V_2)->get_x_1(); float L_24 = (&V_2)->get_y_2(); Vector3_t3722313464 L_25; memset(&L_25, 0, sizeof(L_25)); Vector3__ctor_m4014449651(&L_25, L_23, L_24, /*hidden argument*/NULL); Color_t2555686324 L_26 = V_7; Color32_t2600501292 L_27 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_26, /*hidden argument*/NULL); Rect_t2360479859 * L_28 = __this->get_address_of_m_UVRect_29(); float L_29 = Rect_get_xMin_m2659235730(L_28, /*hidden argument*/NULL); float L_30 = V_3; Rect_t2360479859 * L_31 = __this->get_address_of_m_UVRect_29(); float L_32 = Rect_get_yMin_m2659235699(L_31, /*hidden argument*/NULL); float L_33 = V_5; Vector2_t2156229523 L_34; memset(&L_34, 0, sizeof(L_34)); Vector2__ctor_m4060800441(&L_34, ((float)((float)L_29*(float)L_30)), ((float)((float)L_32*(float)L_33)), /*hidden argument*/NULL); NullCheck(L_22); VertexHelper_AddVert_m3837581305(L_22, L_25, L_27, L_34, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_35 = ___vh0; float L_36 = (&V_2)->get_x_1(); float L_37 = (&V_2)->get_w_4(); Vector3_t3722313464 L_38; memset(&L_38, 0, sizeof(L_38)); Vector3__ctor_m4014449651(&L_38, L_36, L_37, /*hidden argument*/NULL); Color_t2555686324 L_39 = V_7; Color32_t2600501292 L_40 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_39, /*hidden argument*/NULL); Rect_t2360479859 * L_41 = __this->get_address_of_m_UVRect_29(); float L_42 = Rect_get_xMin_m2659235730(L_41, /*hidden argument*/NULL); float L_43 = V_3; Rect_t2360479859 * L_44 = __this->get_address_of_m_UVRect_29(); float L_45 = Rect_get_yMax_m2926206027(L_44, /*hidden argument*/NULL); float L_46 = V_5; Vector2_t2156229523 L_47; memset(&L_47, 0, sizeof(L_47)); Vector2__ctor_m4060800441(&L_47, ((float)((float)L_42*(float)L_43)), ((float)((float)L_45*(float)L_46)), /*hidden argument*/NULL); NullCheck(L_35); VertexHelper_AddVert_m3837581305(L_35, L_38, L_40, L_47, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_48 = ___vh0; float L_49 = (&V_2)->get_z_3(); float L_50 = (&V_2)->get_w_4(); Vector3_t3722313464 L_51; memset(&L_51, 0, sizeof(L_51)); Vector3__ctor_m4014449651(&L_51, L_49, L_50, /*hidden argument*/NULL); Color_t2555686324 L_52 = V_7; Color32_t2600501292 L_53 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_52, /*hidden argument*/NULL); Rect_t2360479859 * L_54 = __this->get_address_of_m_UVRect_29(); float L_55 = Rect_get_xMax_m2926206058(L_54, /*hidden argument*/NULL); float L_56 = V_3; Rect_t2360479859 * L_57 = __this->get_address_of_m_UVRect_29(); float L_58 = Rect_get_yMax_m2926206027(L_57, /*hidden argument*/NULL); float L_59 = V_5; Vector2_t2156229523 L_60; memset(&L_60, 0, sizeof(L_60)); Vector2__ctor_m4060800441(&L_60, ((float)((float)L_55*(float)L_56)), ((float)((float)L_58*(float)L_59)), /*hidden argument*/NULL); NullCheck(L_48); VertexHelper_AddVert_m3837581305(L_48, L_51, L_53, L_60, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_61 = ___vh0; float L_62 = (&V_2)->get_z_3(); float L_63 = (&V_2)->get_y_2(); Vector3_t3722313464 L_64; memset(&L_64, 0, sizeof(L_64)); Vector3__ctor_m4014449651(&L_64, L_62, L_63, /*hidden argument*/NULL); Color_t2555686324 L_65 = V_7; Color32_t2600501292 L_66 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_65, /*hidden argument*/NULL); Rect_t2360479859 * L_67 = __this->get_address_of_m_UVRect_29(); float L_68 = Rect_get_xMax_m2926206058(L_67, /*hidden argument*/NULL); float L_69 = V_3; Rect_t2360479859 * L_70 = __this->get_address_of_m_UVRect_29(); float L_71 = Rect_get_yMin_m2659235699(L_70, /*hidden argument*/NULL); float L_72 = V_5; Vector2_t2156229523 L_73; memset(&L_73, 0, sizeof(L_73)); Vector2__ctor_m4060800441(&L_73, ((float)((float)L_68*(float)L_69)), ((float)((float)L_71*(float)L_72)), /*hidden argument*/NULL); NullCheck(L_61); VertexHelper_AddVert_m3837581305(L_61, L_64, L_66, L_73, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_74 = ___vh0; NullCheck(L_74); VertexHelper_AddTriangle_m3677720024(L_74, 0, 1, 2, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_75 = ___vh0; NullCheck(L_75); VertexHelper_AddTriangle_m3677720024(L_75, 2, 3, 0, /*hidden argument*/NULL); } IL_01a3: { return; } } // System.Void UnityEngine.UI.RectangularVertexClipper::.ctor() extern "C" void RectangularVertexClipper__ctor_m3444028362 (RectangularVertexClipper_t626611136 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectangularVertexClipper__ctor_m3444028362_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_m_WorldCorners_0(((Vector3U5BU5D_t1718750761*)SZArrayNew(Vector3U5BU5D_t1718750761_il2cpp_TypeInfo_var, (uint32_t)4))); __this->set_m_CanvasCorners_1(((Vector3U5BU5D_t1718750761*)SZArrayNew(Vector3U5BU5D_t1718750761_il2cpp_TypeInfo_var, (uint32_t)4))); Object__ctor_m297566312(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Rect UnityEngine.UI.RectangularVertexClipper::GetCanvasRect(UnityEngine.RectTransform,UnityEngine.Canvas) extern "C" Rect_t2360479859 RectangularVertexClipper_GetCanvasRect_m2796440817 (RectangularVertexClipper_t626611136 * __this, RectTransform_t3704657025 * ___t0, Canvas_t3310196443 * ___c1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectangularVertexClipper_GetCanvasRect_m2796440817_MetadataUsageId); s_Il2CppMethodInitialized = true; } Rect_t2360479859 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Transform_t3600365921 * V_2 = NULL; int32_t V_3 = 0; { Canvas_t3310196443 * L_0 = ___c1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001c; } } { Initobj (Rect_t2360479859_il2cpp_TypeInfo_var, (&V_0)); Rect_t2360479859 L_2 = V_0; V_1 = L_2; goto IL_00dc; } IL_001c: { RectTransform_t3704657025 * L_3 = ___t0; Vector3U5BU5D_t1718750761* L_4 = __this->get_m_WorldCorners_0(); NullCheck(L_3); RectTransform_GetWorldCorners_m2125351209(L_3, L_4, /*hidden argument*/NULL); Canvas_t3310196443 * L_5 = ___c1; NullCheck(L_5); Transform_t3600365921 * L_6 = Component_GetComponent_TisTransform_t3600365921_m1200784320(L_5, /*hidden argument*/Component_GetComponent_TisTransform_t3600365921_m1200784320_MethodInfo_var); V_2 = L_6; V_3 = 0; goto IL_0062; } IL_0036: { Vector3U5BU5D_t1718750761* L_7 = __this->get_m_CanvasCorners_1(); int32_t L_8 = V_3; NullCheck(L_7); Transform_t3600365921 * L_9 = V_2; Vector3U5BU5D_t1718750761* L_10 = __this->get_m_WorldCorners_0(); int32_t L_11 = V_3; NullCheck(L_10); NullCheck(L_9); Vector3_t3722313464 L_12 = Transform_InverseTransformPoint_m1254110475(L_9, (*(Vector3_t3722313464 *)((L_10)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_11)))), /*hidden argument*/NULL); (*(Vector3_t3722313464 *)((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8)))) = L_12; int32_t L_13 = V_3; V_3 = ((int32_t)((int32_t)L_13+(int32_t)1)); } IL_0062: { int32_t L_14 = V_3; if ((((int32_t)L_14) < ((int32_t)4))) { goto IL_0036; } } { Vector3U5BU5D_t1718750761* L_15 = __this->get_m_CanvasCorners_1(); NullCheck(L_15); float L_16 = ((L_15)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t1718750761* L_17 = __this->get_m_CanvasCorners_1(); NullCheck(L_17); float L_18 = ((L_17)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Vector3U5BU5D_t1718750761* L_19 = __this->get_m_CanvasCorners_1(); NullCheck(L_19); float L_20 = ((L_19)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_x_1(); Vector3U5BU5D_t1718750761* L_21 = __this->get_m_CanvasCorners_1(); NullCheck(L_21); float L_22 = ((L_21)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t1718750761* L_23 = __this->get_m_CanvasCorners_1(); NullCheck(L_23); float L_24 = ((L_23)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_y_2(); Vector3U5BU5D_t1718750761* L_25 = __this->get_m_CanvasCorners_1(); NullCheck(L_25); float L_26 = ((L_25)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Rect_t2360479859 L_27; memset(&L_27, 0, sizeof(L_27)); Rect__ctor_m2635848439(&L_27, L_16, L_18, ((float)((float)L_20-(float)L_22)), ((float)((float)L_24-(float)L_26)), /*hidden argument*/NULL); V_1 = L_27; goto IL_00dc; } IL_00dc: { Rect_t2360479859 L_28 = V_1; return L_28; } } // System.Void UnityEngine.UI.RectMask2D::.ctor() extern "C" void RectMask2D__ctor_m1497447338 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D__ctor_m1497447338_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectangularVertexClipper_t626611136 * L_0 = (RectangularVertexClipper_t626611136 *)il2cpp_codegen_object_new(RectangularVertexClipper_t626611136_il2cpp_TypeInfo_var); RectangularVertexClipper__ctor_m3444028362(L_0, /*hidden argument*/NULL); __this->set_m_VertexClipper_2(L_0); HashSet_1_t4099546121 * L_1 = (HashSet_1_t4099546121 *)il2cpp_codegen_object_new(HashSet_1_t4099546121_il2cpp_TypeInfo_var); HashSet_1__ctor_m3016903461(L_1, /*hidden argument*/HashSet_1__ctor_m3016903461_MethodInfo_var); __this->set_m_ClipTargets_4(L_1); List_1_t651996883 * L_2 = (List_1_t651996883 *)il2cpp_codegen_object_new(List_1_t651996883_il2cpp_TypeInfo_var); List_1__ctor_m3694722480(L_2, /*hidden argument*/List_1__ctor_m3694722480_MethodInfo_var); __this->set_m_Clippers_6(L_2); UIBehaviour__ctor_m4230637738(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Rect UnityEngine.UI.RectMask2D::get_canvasRect() extern "C" Rect_t2360479859 RectMask2D_get_canvasRect_m4284298055 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_get_canvasRect_m4284298055_MetadataUsageId); s_Il2CppMethodInitialized = true; } Canvas_t3310196443 * V_0 = NULL; List_1_t487303889 * V_1 = NULL; Rect_t2360479859 V_2; memset(&V_2, 0, sizeof(V_2)); { V_0 = (Canvas_t3310196443 *)NULL; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); List_1_t487303889 * L_0 = ListPool_1_Get_m3146528893(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3146528893_MethodInfo_var); V_1 = L_0; GameObject_t1113636619 * L_1 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); List_1_t487303889 * L_2 = V_1; NullCheck(L_1); GameObject_GetComponentsInParent_TisCanvas_t3310196443_m249132757(L_1, (bool)0, L_2, /*hidden argument*/GameObject_GetComponentsInParent_TisCanvas_t3310196443_m249132757_MethodInfo_var); List_1_t487303889 * L_3 = V_1; NullCheck(L_3); int32_t L_4 = List_1_get_Count_m1106558045(L_3, /*hidden argument*/List_1_get_Count_m1106558045_MethodInfo_var); if ((((int32_t)L_4) <= ((int32_t)0))) { goto IL_0031; } } { List_1_t487303889 * L_5 = V_1; List_1_t487303889 * L_6 = V_1; NullCheck(L_6); int32_t L_7 = List_1_get_Count_m1106558045(L_6, /*hidden argument*/List_1_get_Count_m1106558045_MethodInfo_var); NullCheck(L_5); Canvas_t3310196443 * L_8 = List_1_get_Item_m1187285853(L_5, ((int32_t)((int32_t)L_7-(int32_t)1)), /*hidden argument*/List_1_get_Item_m1187285853_MethodInfo_var); V_0 = L_8; } IL_0031: { List_1_t487303889 * L_9 = V_1; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t44818338_il2cpp_TypeInfo_var); ListPool_1_Release_m1295952082(NULL /*static, unused*/, L_9, /*hidden argument*/ListPool_1_Release_m1295952082_MethodInfo_var); RectangularVertexClipper_t626611136 * L_10 = __this->get_m_VertexClipper_2(); RectTransform_t3704657025 * L_11 = RectMask2D_get_rectTransform_m921006921(__this, /*hidden argument*/NULL); Canvas_t3310196443 * L_12 = V_0; NullCheck(L_10); Rect_t2360479859 L_13 = RectangularVertexClipper_GetCanvasRect_m2796440817(L_10, L_11, L_12, /*hidden argument*/NULL); V_2 = L_13; goto IL_004f; } IL_004f: { Rect_t2360479859 L_14 = V_2; return L_14; } } // UnityEngine.RectTransform UnityEngine.UI.RectMask2D::get_rectTransform() extern "C" RectTransform_t3704657025 * RectMask2D_get_rectTransform_m921006921 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_get_rectTransform_m921006921_MetadataUsageId); s_Il2CppMethodInitialized = true; } RectTransform_t3704657025 * V_0 = NULL; RectTransform_t3704657025 * V_1 = NULL; RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_RectTransform_3(); RectTransform_t3704657025 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_001d; } } { RectTransform_t3704657025 * L_2 = Component_GetComponent_TisRectTransform_t3704657025_m989540290(__this, /*hidden argument*/Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var); RectTransform_t3704657025 * L_3 = L_2; V_0 = L_3; __this->set_m_RectTransform_3(L_3); RectTransform_t3704657025 * L_4 = V_0; G_B2_0 = L_4; } IL_001d: { V_1 = G_B2_0; goto IL_0023; } IL_0023: { RectTransform_t3704657025 * L_5 = V_1; return L_5; } } // System.Void UnityEngine.UI.RectMask2D::OnEnable() extern "C" void RectMask2D_OnEnable_m4225893584 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { { UIBehaviour_OnEnable_m189051288(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)1); ClipperRegistry_Register_m2407166513(NULL /*static, unused*/, __this, /*hidden argument*/NULL); MaskUtilities_Notify2DMaskStateChanged_m1613167679(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.RectMask2D::OnDisable() extern "C" void RectMask2D_OnDisable_m809267607 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_OnDisable_m809267607_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UIBehaviour_OnDisable_m1784507360(__this, /*hidden argument*/NULL); HashSet_1_t4099546121 * L_0 = __this->get_m_ClipTargets_4(); NullCheck(L_0); HashSet_1_Clear_m1535948485(L_0, /*hidden argument*/HashSet_1_Clear_m1535948485_MethodInfo_var); List_1_t651996883 * L_1 = __this->get_m_Clippers_6(); NullCheck(L_1); List_1_Clear_m168400987(L_1, /*hidden argument*/List_1_Clear_m168400987_MethodInfo_var); ClipperRegistry_Unregister_m4126866756(NULL /*static, unused*/, __this, /*hidden argument*/NULL); MaskUtilities_Notify2DMaskStateChanged_m1613167679(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.RectMask2D::IsRaycastLocationValid(UnityEngine.Vector2,UnityEngine.Camera) extern "C" bool RectMask2D_IsRaycastLocationValid_m1652308696 (RectMask2D_t3474889437 * __this, Vector2_t2156229523 ___sp0, Camera_t4157153871 * ___eventCamera1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_IsRaycastLocationValid_m1652308696_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; { bool L_0 = Behaviour_get_isActiveAndEnabled_m3013577336(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0013; } } { V_0 = (bool)1; goto IL_0026; } IL_0013: { RectTransform_t3704657025 * L_1 = RectMask2D_get_rectTransform_m921006921(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_2 = ___sp0; Camera_t4157153871 * L_3 = ___eventCamera1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_4 = RectTransformUtility_RectangleContainsScreenPoint_m1731210517(NULL /*static, unused*/, L_1, L_2, L_3, /*hidden argument*/NULL); V_0 = L_4; goto IL_0026; } IL_0026: { bool L_5 = V_0; return L_5; } } // System.Void UnityEngine.UI.RectMask2D::PerformClipping() extern "C" void RectMask2D_PerformClipping_m199628230 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_PerformClipping_m199628230_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); bool V_2 = false; Il2CppObject * V_3 = NULL; Enumerator_t1509756096 V_4; memset(&V_4, 0, sizeof(V_4)); Il2CppObject * V_5 = NULL; Enumerator_t1509756096 V_6; memset(&V_6, 0, sizeof(V_6)); MaskableGraphic_t3839221559 * V_7 = NULL; Exception_t1436737249 * __last_unhandled_exception = 0; NO_UNUSED_WARNING (__last_unhandled_exception); Exception_t1436737249 * __exception_local = 0; NO_UNUSED_WARNING (__exception_local); int32_t __leave_target = 0; NO_UNUSED_WARNING (__leave_target); { bool L_0 = __this->get_m_ShouldRecalculateClipRects_5(); if (!L_0) { goto IL_0021; } } { List_1_t651996883 * L_1 = __this->get_m_Clippers_6(); MaskUtilities_GetRectMasksForClip_m532898711(NULL /*static, unused*/, __this, L_1, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)0); } IL_0021: { V_0 = (bool)1; List_1_t651996883 * L_2 = __this->get_m_Clippers_6(); Rect_t2360479859 L_3 = Clipping_FindCullAndClipWorldRect_m171865709(NULL /*static, unused*/, L_2, (&V_0), /*hidden argument*/NULL); V_1 = L_3; Rect_t2360479859 L_4 = V_1; Rect_t2360479859 L_5 = __this->get_m_LastClipRectCanvasSpace_7(); bool L_6 = Rect_op_Inequality_m9517823(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); V_2 = L_6; bool L_7 = V_2; if (L_7) { goto IL_004f; } } { bool L_8 = __this->get_m_ForceClip_9(); if (!L_8) { goto IL_00a1; } } IL_004f: { HashSet_1_t4099546121 * L_9 = __this->get_m_ClipTargets_4(); NullCheck(L_9); Enumerator_t1509756096 L_10 = HashSet_1_GetEnumerator_m569006269(L_9, /*hidden argument*/HashSet_1_GetEnumerator_m569006269_MethodInfo_var); V_4 = L_10; } IL_005e: try { // begin try (depth: 1) { goto IL_0073; } IL_0063: { Il2CppObject * L_11 = Enumerator_get_Current_m1834618397((&V_4), /*hidden argument*/Enumerator_get_Current_m1834618397_MethodInfo_var); V_3 = L_11; Il2CppObject * L_12 = V_3; Rect_t2360479859 L_13 = V_1; bool L_14 = V_0; NullCheck(L_12); InterfaceActionInvoker2< Rect_t2360479859 , bool >::Invoke(4 /* System.Void UnityEngine.UI.IClippable::SetClipRect(UnityEngine.Rect,System.Boolean) */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_12, L_13, L_14); } IL_0073: { bool L_15 = Enumerator_MoveNext_m1554493645((&V_4), /*hidden argument*/Enumerator_MoveNext_m1554493645_MethodInfo_var); if (L_15) { goto IL_0063; } } IL_007f: { IL2CPP_LEAVE(0x92, FINALLY_0084); } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __last_unhandled_exception = (Exception_t1436737249 *)e.ex; goto FINALLY_0084; } FINALLY_0084: { // begin finally (depth: 1) Enumerator_Dispose_m2380611706((&V_4), /*hidden argument*/Enumerator_Dispose_m2380611706_MethodInfo_var); IL2CPP_END_FINALLY(132) } // end finally (depth: 1) IL2CPP_CLEANUP(132) { IL2CPP_JUMP_TBL(0x92, IL_0092) IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1436737249 *) } IL_0092: { Rect_t2360479859 L_16 = V_1; __this->set_m_LastClipRectCanvasSpace_7(L_16); bool L_17 = V_0; __this->set_m_LastValidClipRect_8(L_17); } IL_00a1: { HashSet_1_t4099546121 * L_18 = __this->get_m_ClipTargets_4(); NullCheck(L_18); Enumerator_t1509756096 L_19 = HashSet_1_GetEnumerator_m569006269(L_18, /*hidden argument*/HashSet_1_GetEnumerator_m569006269_MethodInfo_var); V_6 = L_19; } IL_00af: try { // begin try (depth: 1) { goto IL_0104; } IL_00b4: { Il2CppObject * L_20 = Enumerator_get_Current_m1834618397((&V_6), /*hidden argument*/Enumerator_get_Current_m1834618397_MethodInfo_var); V_5 = L_20; Il2CppObject * L_21 = V_5; V_7 = ((MaskableGraphic_t3839221559 *)IsInstClass(L_21, MaskableGraphic_t3839221559_il2cpp_TypeInfo_var)); MaskableGraphic_t3839221559 * L_22 = V_7; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_23 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_22, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_23) { goto IL_00f0; } } IL_00d4: { MaskableGraphic_t3839221559 * L_24 = V_7; NullCheck(L_24); CanvasRenderer_t2598313366 * L_25 = Graphic_get_canvasRenderer_m315509948(L_24, /*hidden argument*/NULL); NullCheck(L_25); bool L_26 = CanvasRenderer_get_hasMoved_m1853367979(L_25, /*hidden argument*/NULL); if (L_26) { goto IL_00f0; } } IL_00e5: { bool L_27 = V_2; if (L_27) { goto IL_00f0; } } IL_00eb: { goto IL_0104; } IL_00f0: { Il2CppObject * L_28 = V_5; Rect_t2360479859 L_29 = __this->get_m_LastClipRectCanvasSpace_7(); bool L_30 = __this->get_m_LastValidClipRect_8(); NullCheck(L_28); InterfaceActionInvoker2< Rect_t2360479859 , bool >::Invoke(3 /* System.Void UnityEngine.UI.IClippable::Cull(UnityEngine.Rect,System.Boolean) */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_28, L_29, L_30); } IL_0104: { bool L_31 = Enumerator_MoveNext_m1554493645((&V_6), /*hidden argument*/Enumerator_MoveNext_m1554493645_MethodInfo_var); if (L_31) { goto IL_00b4; } } IL_0110: { IL2CPP_LEAVE(0x123, FINALLY_0115); } } // end try (depth: 1) catch(Il2CppExceptionWrapper& e) { __last_unhandled_exception = (Exception_t1436737249 *)e.ex; goto FINALLY_0115; } FINALLY_0115: { // begin finally (depth: 1) Enumerator_Dispose_m2380611706((&V_6), /*hidden argument*/Enumerator_Dispose_m2380611706_MethodInfo_var); IL2CPP_END_FINALLY(277) } // end finally (depth: 1) IL2CPP_CLEANUP(277) { IL2CPP_JUMP_TBL(0x123, IL_0123) IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1436737249 *) } IL_0123: { return; } } // System.Void UnityEngine.UI.RectMask2D::AddClippable(UnityEngine.UI.IClippable) extern "C" void RectMask2D_AddClippable_m373784024 (RectMask2D_t3474889437 * __this, Il2CppObject * ___clippable0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_AddClippable_m373784024_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Il2CppObject * L_0 = ___clippable0; if (L_0) { goto IL_000c; } } { goto IL_0038; } IL_000c: { __this->set_m_ShouldRecalculateClipRects_5((bool)1); HashSet_1_t4099546121 * L_1 = __this->get_m_ClipTargets_4(); Il2CppObject * L_2 = ___clippable0; NullCheck(L_1); bool L_3 = HashSet_1_Contains_m3128925042(L_1, L_2, /*hidden argument*/HashSet_1_Contains_m3128925042_MethodInfo_var); if (L_3) { goto IL_0031; } } { HashSet_1_t4099546121 * L_4 = __this->get_m_ClipTargets_4(); Il2CppObject * L_5 = ___clippable0; NullCheck(L_4); HashSet_1_Add_m3226509647(L_4, L_5, /*hidden argument*/HashSet_1_Add_m3226509647_MethodInfo_var); } IL_0031: { __this->set_m_ForceClip_9((bool)1); } IL_0038: { return; } } // System.Void UnityEngine.UI.RectMask2D::RemoveClippable(UnityEngine.UI.IClippable) extern "C" void RectMask2D_RemoveClippable_m773604960 (RectMask2D_t3474889437 * __this, Il2CppObject * ___clippable0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectMask2D_RemoveClippable_m773604960_MetadataUsageId); s_Il2CppMethodInitialized = true; } Rect_t2360479859 V_0; memset(&V_0, 0, sizeof(V_0)); { Il2CppObject * L_0 = ___clippable0; if (L_0) { goto IL_000c; } } { goto IL_0037; } IL_000c: { __this->set_m_ShouldRecalculateClipRects_5((bool)1); Il2CppObject * L_1 = ___clippable0; Initobj (Rect_t2360479859_il2cpp_TypeInfo_var, (&V_0)); Rect_t2360479859 L_2 = V_0; NullCheck(L_1); InterfaceActionInvoker2< Rect_t2360479859 , bool >::Invoke(4 /* System.Void UnityEngine.UI.IClippable::SetClipRect(UnityEngine.Rect,System.Boolean) */, IClippable_t1239629351_il2cpp_TypeInfo_var, L_1, L_2, (bool)0); HashSet_1_t4099546121 * L_3 = __this->get_m_ClipTargets_4(); Il2CppObject * L_4 = ___clippable0; NullCheck(L_3); HashSet_1_Remove_m1860968099(L_3, L_4, /*hidden argument*/HashSet_1_Remove_m1860968099_MethodInfo_var); __this->set_m_ForceClip_9((bool)1); } IL_0037: { return; } } // System.Void UnityEngine.UI.RectMask2D::OnTransformParentChanged() extern "C" void RectMask2D_OnTransformParentChanged_m695607979 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { { UIBehaviour_OnTransformParentChanged_m1855615160(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)1); return; } } // System.Void UnityEngine.UI.RectMask2D::OnCanvasHierarchyChanged() extern "C" void RectMask2D_OnCanvasHierarchyChanged_m3195492255 (RectMask2D_t3474889437 * __this, const MethodInfo* method) { { UIBehaviour_OnCanvasHierarchyChanged_m3915099663(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)1); return; } } // System.Void UnityEngine.UI.ReflectionMethodsCache::.ctor() extern "C" void ReflectionMethodsCache__ctor_m3826472948 (ReflectionMethodsCache_t2103211062 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ReflectionMethodsCache__ctor_m3826472948_MetadataUsageId); s_Il2CppMethodInitialized = true; } MethodInfo_t * V_0 = NULL; MethodInfo_t * V_1 = NULL; MethodInfo_t * V_2 = NULL; MethodInfo_t * V_3 = NULL; { __this->set_raycast3D_0((Raycast3DCallback_t701940803 *)NULL); __this->set_raycast3DAll_1((RaycastAllCallback_t1884415901 *)NULL); __this->set_raycast2D_2((Raycast2DCallback_t768590915 *)NULL); __this->set_getRayIntersectionAll_3((GetRayIntersectionAllCallback_t3913627115 *)NULL); Object__ctor_m297566312(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_0 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Physics_t2310948930_0_0_0_var), /*hidden argument*/NULL); TypeU5BU5D_t3940880105* L_1 = ((TypeU5BU5D_t3940880105*)SZArrayNew(TypeU5BU5D_t3940880105_il2cpp_TypeInfo_var, (uint32_t)4)); Type_t * L_2 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Ray_t3785851493_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_2); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (Type_t *)L_2); TypeU5BU5D_t3940880105* L_3 = L_1; Type_t * L_4 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(RaycastHit_t1056001966_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_4); Type_t * L_5 = VirtFuncInvoker0< Type_t * >::Invoke(99 /* System.Type System.Type::MakeByRefType() */, L_4); NullCheck(L_3); ArrayElementTypeCheck (L_3, L_5); (L_3)->SetAt(static_cast<il2cpp_array_size_t>(1), (Type_t *)L_5); TypeU5BU5D_t3940880105* L_6 = L_3; Type_t * L_7 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Single_t1397266774_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_6); ArrayElementTypeCheck (L_6, L_7); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(2), (Type_t *)L_7); TypeU5BU5D_t3940880105* L_8 = L_6; Type_t * L_9 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Int32_t2950945753_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_8); ArrayElementTypeCheck (L_8, L_9); (L_8)->SetAt(static_cast<il2cpp_array_size_t>(3), (Type_t *)L_9); NullCheck(L_0); MethodInfo_t * L_10 = Type_GetMethod_m1479779718(L_0, _stringLiteral618070602, L_8, /*hidden argument*/NULL); V_0 = L_10; MethodInfo_t * L_11 = V_0; if (!L_11) { goto IL_0098; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_12 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Raycast3DCallback_t701940803_0_0_0_var), /*hidden argument*/NULL); MethodInfo_t * L_13 = V_0; Delegate_t1188392813 * L_14 = ScriptingUtils_CreateDelegate_m1614232900(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL); __this->set_raycast3D_0(((Raycast3DCallback_t701940803 *)CastclassSealed(L_14, Raycast3DCallback_t701940803_il2cpp_TypeInfo_var))); } IL_0098: { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_15 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Physics2D_t1528932956_0_0_0_var), /*hidden argument*/NULL); TypeU5BU5D_t3940880105* L_16 = ((TypeU5BU5D_t3940880105*)SZArrayNew(TypeU5BU5D_t3940880105_il2cpp_TypeInfo_var, (uint32_t)4)); Type_t * L_17 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Vector2_t2156229523_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_17); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(0), (Type_t *)L_17); TypeU5BU5D_t3940880105* L_18 = L_16; Type_t * L_19 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Vector2_t2156229523_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_18); ArrayElementTypeCheck (L_18, L_19); (L_18)->SetAt(static_cast<il2cpp_array_size_t>(1), (Type_t *)L_19); TypeU5BU5D_t3940880105* L_20 = L_18; Type_t * L_21 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Single_t1397266774_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_20); ArrayElementTypeCheck (L_20, L_21); (L_20)->SetAt(static_cast<il2cpp_array_size_t>(2), (Type_t *)L_21); TypeU5BU5D_t3940880105* L_22 = L_20; Type_t * L_23 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Int32_t2950945753_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_22); ArrayElementTypeCheck (L_22, L_23); (L_22)->SetAt(static_cast<il2cpp_array_size_t>(3), (Type_t *)L_23); NullCheck(L_15); MethodInfo_t * L_24 = Type_GetMethod_m1479779718(L_15, _stringLiteral618070602, L_22, /*hidden argument*/NULL); V_1 = L_24; MethodInfo_t * L_25 = V_1; if (!L_25) { goto IL_0108; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_26 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Raycast2DCallback_t768590915_0_0_0_var), /*hidden argument*/NULL); MethodInfo_t * L_27 = V_1; Delegate_t1188392813 * L_28 = ScriptingUtils_CreateDelegate_m1614232900(NULL /*static, unused*/, L_26, L_27, /*hidden argument*/NULL); __this->set_raycast2D_2(((Raycast2DCallback_t768590915 *)CastclassSealed(L_28, Raycast2DCallback_t768590915_il2cpp_TypeInfo_var))); } IL_0108: { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_29 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Physics_t2310948930_0_0_0_var), /*hidden argument*/NULL); TypeU5BU5D_t3940880105* L_30 = ((TypeU5BU5D_t3940880105*)SZArrayNew(TypeU5BU5D_t3940880105_il2cpp_TypeInfo_var, (uint32_t)3)); Type_t * L_31 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Ray_t3785851493_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_30); ArrayElementTypeCheck (L_30, L_31); (L_30)->SetAt(static_cast<il2cpp_array_size_t>(0), (Type_t *)L_31); TypeU5BU5D_t3940880105* L_32 = L_30; Type_t * L_33 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Single_t1397266774_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_32); ArrayElementTypeCheck (L_32, L_33); (L_32)->SetAt(static_cast<il2cpp_array_size_t>(1), (Type_t *)L_33); TypeU5BU5D_t3940880105* L_34 = L_32; Type_t * L_35 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Int32_t2950945753_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_34); ArrayElementTypeCheck (L_34, L_35); (L_34)->SetAt(static_cast<il2cpp_array_size_t>(2), (Type_t *)L_35); NullCheck(L_29); MethodInfo_t * L_36 = Type_GetMethod_m1479779718(L_29, _stringLiteral2652151739, L_34, /*hidden argument*/NULL); V_2 = L_36; MethodInfo_t * L_37 = V_2; if (!L_37) { goto IL_016b; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_38 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(RaycastAllCallback_t1884415901_0_0_0_var), /*hidden argument*/NULL); MethodInfo_t * L_39 = V_2; Delegate_t1188392813 * L_40 = ScriptingUtils_CreateDelegate_m1614232900(NULL /*static, unused*/, L_38, L_39, /*hidden argument*/NULL); __this->set_raycast3DAll_1(((RaycastAllCallback_t1884415901 *)CastclassSealed(L_40, RaycastAllCallback_t1884415901_il2cpp_TypeInfo_var))); } IL_016b: { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_41 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Physics2D_t1528932956_0_0_0_var), /*hidden argument*/NULL); TypeU5BU5D_t3940880105* L_42 = ((TypeU5BU5D_t3940880105*)SZArrayNew(TypeU5BU5D_t3940880105_il2cpp_TypeInfo_var, (uint32_t)3)); Type_t * L_43 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Ray_t3785851493_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_42); ArrayElementTypeCheck (L_42, L_43); (L_42)->SetAt(static_cast<il2cpp_array_size_t>(0), (Type_t *)L_43); TypeU5BU5D_t3940880105* L_44 = L_42; Type_t * L_45 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Single_t1397266774_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_44); ArrayElementTypeCheck (L_44, L_45); (L_44)->SetAt(static_cast<il2cpp_array_size_t>(1), (Type_t *)L_45); TypeU5BU5D_t3940880105* L_46 = L_44; Type_t * L_47 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(Int32_t2950945753_0_0_0_var), /*hidden argument*/NULL); NullCheck(L_46); ArrayElementTypeCheck (L_46, L_47); (L_46)->SetAt(static_cast<il2cpp_array_size_t>(2), (Type_t *)L_47); NullCheck(L_41); MethodInfo_t * L_48 = Type_GetMethod_m1479779718(L_41, _stringLiteral2818997478, L_46, /*hidden argument*/NULL); V_3 = L_48; MethodInfo_t * L_49 = V_3; if (!L_49) { goto IL_01ce; } } { IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var); Type_t * L_50 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, LoadTypeToken(GetRayIntersectionAllCallback_t3913627115_0_0_0_var), /*hidden argument*/NULL); MethodInfo_t * L_51 = V_3; Delegate_t1188392813 * L_52 = ScriptingUtils_CreateDelegate_m1614232900(NULL /*static, unused*/, L_50, L_51, /*hidden argument*/NULL); __this->set_getRayIntersectionAll_3(((GetRayIntersectionAllCallback_t3913627115 *)CastclassSealed(L_52, GetRayIntersectionAllCallback_t3913627115_il2cpp_TypeInfo_var))); } IL_01ce: { return; } } // UnityEngine.UI.ReflectionMethodsCache UnityEngine.UI.ReflectionMethodsCache::get_Singleton() extern "C" ReflectionMethodsCache_t2103211062 * ReflectionMethodsCache_get_Singleton_m787098794 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ReflectionMethodsCache_get_Singleton_m787098794_MetadataUsageId); s_Il2CppMethodInitialized = true; } ReflectionMethodsCache_t2103211062 * V_0 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var); ReflectionMethodsCache_t2103211062 * L_0 = ((ReflectionMethodsCache_t2103211062_StaticFields*)ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var->static_fields)->get_s_ReflectionMethodsCache_4(); if (L_0) { goto IL_0015; } } { ReflectionMethodsCache_t2103211062 * L_1 = (ReflectionMethodsCache_t2103211062 *)il2cpp_codegen_object_new(ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var); ReflectionMethodsCache__ctor_m3826472948(L_1, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var); ((ReflectionMethodsCache_t2103211062_StaticFields*)ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var->static_fields)->set_s_ReflectionMethodsCache_4(L_1); } IL_0015: { IL2CPP_RUNTIME_CLASS_INIT(ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var); ReflectionMethodsCache_t2103211062 * L_2 = ((ReflectionMethodsCache_t2103211062_StaticFields*)ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var->static_fields)->get_s_ReflectionMethodsCache_4(); V_0 = L_2; goto IL_0020; } IL_0020: { ReflectionMethodsCache_t2103211062 * L_3 = V_0; return L_3; } } // System.Void UnityEngine.UI.ReflectionMethodsCache::.cctor() extern "C" void ReflectionMethodsCache__cctor_m3883666113 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ReflectionMethodsCache__cctor_m3883666113_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ((ReflectionMethodsCache_t2103211062_StaticFields*)ReflectionMethodsCache_t2103211062_il2cpp_TypeInfo_var->static_fields)->set_s_ReflectionMethodsCache_4((ReflectionMethodsCache_t2103211062 *)NULL); return; } } // System.Void UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback::.ctor(System.Object,System.IntPtr) extern "C" void GetRayIntersectionAllCallback__ctor_m391992746 (GetRayIntersectionAllCallback_t3913627115 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // UnityEngine.RaycastHit2D[] UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback::Invoke(UnityEngine.Ray,System.Single,System.Int32) extern "C" RaycastHit2DU5BU5D_t4286651560* GetRayIntersectionAllCallback_Invoke_m1316694896 (GetRayIntersectionAllCallback_t3913627115 * __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { GetRayIntersectionAllCallback_Invoke_m1316694896((GetRayIntersectionAllCallback_t3913627115 *)__this->get_prev_9(),___r0, ___f1, ___i2, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef RaycastHit2DU5BU5D_t4286651560* (*FunctionPointerType) (Il2CppObject *, void* __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),___r0, ___f1, ___i2,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef RaycastHit2DU5BU5D_t4286651560* (*FunctionPointerType) (void* __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),___r0, ___f1, ___i2,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback::BeginInvoke(UnityEngine.Ray,System.Single,System.Int32,System.AsyncCallback,System.Object) extern "C" Il2CppObject * GetRayIntersectionAllCallback_BeginInvoke_m567311550 (GetRayIntersectionAllCallback_t3913627115 * __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, AsyncCallback_t3962456242 * ___callback3, Il2CppObject * ___object4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (GetRayIntersectionAllCallback_BeginInvoke_m567311550_MetadataUsageId); s_Il2CppMethodInitialized = true; } void *__d_args[4] = {0}; __d_args[0] = Box(Ray_t3785851493_il2cpp_TypeInfo_var, &___r0); __d_args[1] = Box(Single_t1397266774_il2cpp_TypeInfo_var, &___f1); __d_args[2] = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &___i2); return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback3, (Il2CppObject*)___object4); } // UnityEngine.RaycastHit2D[] UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback::EndInvoke(System.IAsyncResult) extern "C" RaycastHit2DU5BU5D_t4286651560* GetRayIntersectionAllCallback_EndInvoke_m1583561415 (GetRayIntersectionAllCallback_t3913627115 * __this, Il2CppObject * ___result0, const MethodInfo* method) { Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); return (RaycastHit2DU5BU5D_t4286651560*)__result; } // System.Void UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback::.ctor(System.Object,System.IntPtr) extern "C" void Raycast2DCallback__ctor_m270594262 (Raycast2DCallback_t768590915 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // UnityEngine.RaycastHit2D UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback::Invoke(UnityEngine.Vector2,UnityEngine.Vector2,System.Single,System.Int32) extern "C" RaycastHit2D_t2279581989 Raycast2DCallback_Invoke_m1500574149 (Raycast2DCallback_t768590915 * __this, Vector2_t2156229523 ___p10, Vector2_t2156229523 ___p21, float ___f2, int32_t ___i3, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { Raycast2DCallback_Invoke_m1500574149((Raycast2DCallback_t768590915 *)__this->get_prev_9(),___p10, ___p21, ___f2, ___i3, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef RaycastHit2D_t2279581989 (*FunctionPointerType) (Il2CppObject *, void* __this, Vector2_t2156229523 ___p10, Vector2_t2156229523 ___p21, float ___f2, int32_t ___i3, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),___p10, ___p21, ___f2, ___i3,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef RaycastHit2D_t2279581989 (*FunctionPointerType) (void* __this, Vector2_t2156229523 ___p10, Vector2_t2156229523 ___p21, float ___f2, int32_t ___i3, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),___p10, ___p21, ___f2, ___i3,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback::BeginInvoke(UnityEngine.Vector2,UnityEngine.Vector2,System.Single,System.Int32,System.AsyncCallback,System.Object) extern "C" Il2CppObject * Raycast2DCallback_BeginInvoke_m2365382882 (Raycast2DCallback_t768590915 * __this, Vector2_t2156229523 ___p10, Vector2_t2156229523 ___p21, float ___f2, int32_t ___i3, AsyncCallback_t3962456242 * ___callback4, Il2CppObject * ___object5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Raycast2DCallback_BeginInvoke_m2365382882_MetadataUsageId); s_Il2CppMethodInitialized = true; } void *__d_args[5] = {0}; __d_args[0] = Box(Vector2_t2156229523_il2cpp_TypeInfo_var, &___p10); __d_args[1] = Box(Vector2_t2156229523_il2cpp_TypeInfo_var, &___p21); __d_args[2] = Box(Single_t1397266774_il2cpp_TypeInfo_var, &___f2); __d_args[3] = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &___i3); return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback4, (Il2CppObject*)___object5); } // UnityEngine.RaycastHit2D UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback::EndInvoke(System.IAsyncResult) extern "C" RaycastHit2D_t2279581989 Raycast2DCallback_EndInvoke_m746950475 (Raycast2DCallback_t768590915 * __this, Il2CppObject * ___result0, const MethodInfo* method) { Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); return *(RaycastHit2D_t2279581989 *)UnBox ((Il2CppCodeGenObject*)__result); } // System.Void UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback::.ctor(System.Object,System.IntPtr) extern "C" void Raycast3DCallback__ctor_m2360810279 (Raycast3DCallback_t701940803 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Boolean UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback::Invoke(UnityEngine.Ray,UnityEngine.RaycastHit&,System.Single,System.Int32) extern "C" bool Raycast3DCallback_Invoke_m702742911 (Raycast3DCallback_t701940803 * __this, Ray_t3785851493 ___r0, RaycastHit_t1056001966 * ___hit1, float ___f2, int32_t ___i3, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { Raycast3DCallback_Invoke_m702742911((Raycast3DCallback_t701940803 *)__this->get_prev_9(),___r0, ___hit1, ___f2, ___i3, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef bool (*FunctionPointerType) (Il2CppObject *, void* __this, Ray_t3785851493 ___r0, RaycastHit_t1056001966 * ___hit1, float ___f2, int32_t ___i3, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),___r0, ___hit1, ___f2, ___i3,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef bool (*FunctionPointerType) (void* __this, Ray_t3785851493 ___r0, RaycastHit_t1056001966 * ___hit1, float ___f2, int32_t ___i3, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),___r0, ___hit1, ___f2, ___i3,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback::BeginInvoke(UnityEngine.Ray,UnityEngine.RaycastHit&,System.Single,System.Int32,System.AsyncCallback,System.Object) extern "C" Il2CppObject * Raycast3DCallback_BeginInvoke_m3732133089 (Raycast3DCallback_t701940803 * __this, Ray_t3785851493 ___r0, RaycastHit_t1056001966 * ___hit1, float ___f2, int32_t ___i3, AsyncCallback_t3962456242 * ___callback4, Il2CppObject * ___object5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Raycast3DCallback_BeginInvoke_m3732133089_MetadataUsageId); s_Il2CppMethodInitialized = true; } void *__d_args[5] = {0}; __d_args[0] = Box(Ray_t3785851493_il2cpp_TypeInfo_var, &___r0); __d_args[1] = Box(RaycastHit_t1056001966_il2cpp_TypeInfo_var, &(*___hit1)); __d_args[2] = Box(Single_t1397266774_il2cpp_TypeInfo_var, &___f2); __d_args[3] = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &___i3); return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback4, (Il2CppObject*)___object5); } // System.Boolean UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback::EndInvoke(UnityEngine.RaycastHit&,System.IAsyncResult) extern "C" bool Raycast3DCallback_EndInvoke_m35220710 (Raycast3DCallback_t701940803 * __this, RaycastHit_t1056001966 * ___hit0, Il2CppObject * ___result1, const MethodInfo* method) { void* ___out_args[] = { ___hit0, }; Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result1, ___out_args); return *(bool*)UnBox ((Il2CppCodeGenObject*)__result); } // System.Void UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback::.ctor(System.Object,System.IntPtr) extern "C" void RaycastAllCallback__ctor_m48080089 (RaycastAllCallback_t1884415901 * __this, Il2CppObject * ___object0, IntPtr_t ___method1, const MethodInfo* method) { __this->set_method_ptr_0((Il2CppMethodPointer)((MethodInfo*)___method1.get_m_value_0())->methodPointer); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // UnityEngine.RaycastHit[] UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback::Invoke(UnityEngine.Ray,System.Single,System.Int32) extern "C" RaycastHitU5BU5D_t1690781147* RaycastAllCallback_Invoke_m3272036257 (RaycastAllCallback_t1884415901 * __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method) { if(__this->get_prev_9() != NULL) { RaycastAllCallback_Invoke_m3272036257((RaycastAllCallback_t1884415901 *)__this->get_prev_9(),___r0, ___f1, ___i2, method); } il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((MethodInfo*)(__this->get_method_3().get_m_value_0())); bool ___methodIsStatic = MethodIsStatic((MethodInfo*)(__this->get_method_3().get_m_value_0())); if (__this->get_m_target_2() != NULL && ___methodIsStatic) { typedef RaycastHitU5BU5D_t1690781147* (*FunctionPointerType) (Il2CppObject *, void* __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(NULL,__this->get_m_target_2(),___r0, ___f1, ___i2,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } else { typedef RaycastHitU5BU5D_t1690781147* (*FunctionPointerType) (void* __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, const MethodInfo* method); return ((FunctionPointerType)__this->get_method_ptr_0())(__this->get_m_target_2(),___r0, ___f1, ___i2,(MethodInfo*)(__this->get_method_3().get_m_value_0())); } } // System.IAsyncResult UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback::BeginInvoke(UnityEngine.Ray,System.Single,System.Int32,System.AsyncCallback,System.Object) extern "C" Il2CppObject * RaycastAllCallback_BeginInvoke_m3934710463 (RaycastAllCallback_t1884415901 * __this, Ray_t3785851493 ___r0, float ___f1, int32_t ___i2, AsyncCallback_t3962456242 * ___callback3, Il2CppObject * ___object4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RaycastAllCallback_BeginInvoke_m3934710463_MetadataUsageId); s_Il2CppMethodInitialized = true; } void *__d_args[4] = {0}; __d_args[0] = Box(Ray_t3785851493_il2cpp_TypeInfo_var, &___r0); __d_args[1] = Box(Single_t1397266774_il2cpp_TypeInfo_var, &___f1); __d_args[2] = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &___i2); return (Il2CppObject *)il2cpp_codegen_delegate_begin_invoke((Il2CppDelegate*)__this, __d_args, (Il2CppDelegate*)___callback3, (Il2CppObject*)___object4); } // UnityEngine.RaycastHit[] UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback::EndInvoke(System.IAsyncResult) extern "C" RaycastHitU5BU5D_t1690781147* RaycastAllCallback_EndInvoke_m502804132 (RaycastAllCallback_t1884415901 * __this, Il2CppObject * ___result0, const MethodInfo* method) { Il2CppObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); return (RaycastHitU5BU5D_t1690781147*)__result; } // System.Void UnityEngine.UI.Scrollbar::.ctor() extern "C" void Scrollbar__ctor_m1852189877 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar__ctor_m1852189877_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_m_Direction_17(0); __this->set_m_Size_19((0.2f)); __this->set_m_NumberOfSteps_20(0); ScrollEvent_t149898510 * L_0 = (ScrollEvent_t149898510 *)il2cpp_codegen_object_new(ScrollEvent_t149898510_il2cpp_TypeInfo_var); ScrollEvent__ctor_m342565857(L_0, /*hidden argument*/NULL); __this->set_m_OnValueChanged_21(L_0); Vector2_t2156229523 L_1 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_23(L_1); __this->set_isPointerDownAndNotDragging_26((bool)0); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); Selectable__ctor_m58942866(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.Scrollbar::get_handleRect() extern "C" RectTransform_t3704657025 * Scrollbar_get_handleRect_m1202480856 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_HandleRect_16(); V_0 = L_0; goto IL_000d; } IL_000d: { RectTransform_t3704657025 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Scrollbar::set_handleRect(UnityEngine.RectTransform) extern "C" void Scrollbar_set_handleRect_m1170237786 (Scrollbar_t1494447233 * __this, RectTransform_t3704657025 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_set_handleRect_m1170237786_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t3704657025 ** L_0 = __this->get_address_of_m_HandleRect_16(); RectTransform_t3704657025 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854_MethodInfo_var); if (!L_2) { goto IL_0020; } } { Scrollbar_UpdateCachedReferences_m552296126(__this, /*hidden argument*/NULL); Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); } IL_0020: { return; } } // UnityEngine.UI.Scrollbar/Direction UnityEngine.UI.Scrollbar::get_direction() extern "C" int32_t Scrollbar_get_direction_m3425641721 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_Direction_17(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Scrollbar::set_direction(UnityEngine.UI.Scrollbar/Direction) extern "C" void Scrollbar_set_direction_m473480640 (Scrollbar_t1494447233 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_set_direction_m473480640_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t* L_0 = __this->get_address_of_m_Direction_17(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisDirection_t3470714353_m1506329685(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisDirection_t3470714353_m1506329685_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // System.Single UnityEngine.UI.Scrollbar::get_value() extern "C" float Scrollbar_get_value_m760470106 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_get_value_m760470106_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; float V_1 = 0.0f; { float L_0 = __this->get_m_Value_18(); V_0 = L_0; int32_t L_1 = __this->get_m_NumberOfSteps_20(); if ((((int32_t)L_1) <= ((int32_t)1))) { goto IL_002f; } } { float L_2 = V_0; int32_t L_3 = __this->get_m_NumberOfSteps_20(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_4 = bankers_roundf(((float)((float)L_2*(float)(((float)((float)((int32_t)((int32_t)L_3-(int32_t)1)))))))); int32_t L_5 = __this->get_m_NumberOfSteps_20(); V_0 = ((float)((float)L_4/(float)(((float)((float)((int32_t)((int32_t)L_5-(int32_t)1))))))); } IL_002f: { float L_6 = V_0; V_1 = L_6; goto IL_0036; } IL_0036: { float L_7 = V_1; return L_7; } } // System.Void UnityEngine.UI.Scrollbar::set_value(System.Single) extern "C" void Scrollbar_set_value_m2277767288 (Scrollbar_t1494447233 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; Scrollbar_Set_m1923517630(__this, L_0, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.Scrollbar::get_size() extern "C" float Scrollbar_get_size_m3500287235 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_Size_19(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Scrollbar::set_size(System.Single) extern "C" void Scrollbar_set_size_m4256339911 (Scrollbar_t1494447233 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_set_size_m4256339911_MetadataUsageId); s_Il2CppMethodInitialized = true; } { float* L_0 = __this->get_address_of_m_Size_19(); float L_1 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_2 = Mathf_Clamp01_m4133291925(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); bool L_3 = SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785(NULL /*static, unused*/, L_0, L_2, /*hidden argument*/SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785_MethodInfo_var); if (!L_3) { goto IL_001d; } } { Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); } IL_001d: { return; } } // System.Int32 UnityEngine.UI.Scrollbar::get_numberOfSteps() extern "C" int32_t Scrollbar_get_numberOfSteps_m1256457796 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_NumberOfSteps_20(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Scrollbar::set_numberOfSteps(System.Int32) extern "C" void Scrollbar_set_numberOfSteps_m3603299569 (Scrollbar_t1494447233 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_set_numberOfSteps_m3603299569_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t* L_0 = __this->get_address_of_m_NumberOfSteps_20(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisInt32_t2950945753_m1101767463(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisInt32_t2950945753_m1101767463_MethodInfo_var); if (!L_2) { goto IL_0026; } } { float L_3 = __this->get_m_Value_18(); Scrollbar_Set_m1923517630(__this, L_3, /*hidden argument*/NULL); Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); } IL_0026: { return; } } // UnityEngine.UI.Scrollbar/ScrollEvent UnityEngine.UI.Scrollbar::get_onValueChanged() extern "C" ScrollEvent_t149898510 * Scrollbar_get_onValueChanged_m2631583151 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { ScrollEvent_t149898510 * V_0 = NULL; { ScrollEvent_t149898510 * L_0 = __this->get_m_OnValueChanged_21(); V_0 = L_0; goto IL_000d; } IL_000d: { ScrollEvent_t149898510 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Scrollbar::set_onValueChanged(UnityEngine.UI.Scrollbar/ScrollEvent) extern "C" void Scrollbar_set_onValueChanged_m346467699 (Scrollbar_t1494447233 * __this, ScrollEvent_t149898510 * ___value0, const MethodInfo* method) { { ScrollEvent_t149898510 * L_0 = ___value0; __this->set_m_OnValueChanged_21(L_0); return; } } // System.Single UnityEngine.UI.Scrollbar::get_stepSize() extern "C" float Scrollbar_get_stepSize_m1389308760 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { float V_0 = 0.0f; float G_B3_0 = 0.0f; { int32_t L_0 = __this->get_m_NumberOfSteps_20(); if ((((int32_t)L_0) <= ((int32_t)1))) { goto IL_0021; } } { int32_t L_1 = __this->get_m_NumberOfSteps_20(); G_B3_0 = ((float)((float)(1.0f)/(float)(((float)((float)((int32_t)((int32_t)L_1-(int32_t)1))))))); goto IL_0026; } IL_0021: { G_B3_0 = (0.1f); } IL_0026: { V_0 = G_B3_0; goto IL_002c; } IL_002c: { float L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Scrollbar::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void Scrollbar_Rebuild_m1441750759 (Scrollbar_t1494447233 * __this, int32_t ___executing0, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Scrollbar::LayoutComplete() extern "C" void Scrollbar_LayoutComplete_m3917051296 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Scrollbar::GraphicUpdateComplete() extern "C" void Scrollbar_GraphicUpdateComplete_m149909571 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Scrollbar::OnEnable() extern "C" void Scrollbar_OnEnable_m665096645 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { { Selectable_OnEnable_m3110490294(__this, /*hidden argument*/NULL); Scrollbar_UpdateCachedReferences_m552296126(__this, /*hidden argument*/NULL); float L_0 = __this->get_m_Value_18(); Scrollbar_Set_m607000118(__this, L_0, (bool)0, /*hidden argument*/NULL); Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::OnDisable() extern "C" void Scrollbar_OnDisable_m1618128269 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { { DrivenRectTransformTracker_t2562230146 * L_0 = __this->get_address_of_m_Tracker_24(); DrivenRectTransformTracker_Clear_m905140393(L_0, /*hidden argument*/NULL); Selectable_OnDisable_m3225138518(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::UpdateCachedReferences() extern "C" void Scrollbar_UpdateCachedReferences_m552296126 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_UpdateCachedReferences_m552296126_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t3704657025 * L_0 = __this->get_m_HandleRect_16(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0042; } } { RectTransform_t3704657025 * L_2 = __this->get_m_HandleRect_16(); NullCheck(L_2); Transform_t3600365921 * L_3 = Transform_get_parent_m1293647796(L_2, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0042; } } { RectTransform_t3704657025 * L_5 = __this->get_m_HandleRect_16(); NullCheck(L_5); Transform_t3600365921 * L_6 = Transform_get_parent_m1293647796(L_5, /*hidden argument*/NULL); NullCheck(L_6); RectTransform_t3704657025 * L_7 = Component_GetComponent_TisRectTransform_t3704657025_m989540290(L_6, /*hidden argument*/Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var); __this->set_m_ContainerRect_22(L_7); goto IL_0049; } IL_0042: { __this->set_m_ContainerRect_22((RectTransform_t3704657025 *)NULL); } IL_0049: { return; } } // System.Void UnityEngine.UI.Scrollbar::Set(System.Single) extern "C" void Scrollbar_Set_m1923517630 (Scrollbar_t1494447233 * __this, float ___input0, const MethodInfo* method) { { float L_0 = ___input0; Scrollbar_Set_m607000118(__this, L_0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::Set(System.Single,System.Boolean) extern "C" void Scrollbar_Set_m607000118 (Scrollbar_t1494447233 * __this, float ___input0, bool ___sendCallback1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_Set_m607000118_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { float L_0 = __this->get_m_Value_18(); V_0 = L_0; float L_1 = ___input0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_2 = Mathf_Clamp01_m4133291925(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); __this->set_m_Value_18(L_2); float L_3 = V_0; float L_4 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); if ((!(((float)L_3) == ((float)L_4)))) { goto IL_0025; } } { goto IL_0042; } IL_0025: { Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); bool L_5 = ___sendCallback1; if (!L_5) { goto IL_0042; } } { ScrollEvent_t149898510 * L_6 = __this->get_m_OnValueChanged_21(); float L_7 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); NullCheck(L_6); UnityEvent_1_Invoke_m3400677460(L_6, L_7, /*hidden argument*/UnityEvent_1_Invoke_m3400677460_MethodInfo_var); } IL_0042: { return; } } // System.Void UnityEngine.UI.Scrollbar::OnRectTransformDimensionsChange() extern "C" void Scrollbar_OnRectTransformDimensionsChange_m507262104 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { { UIBehaviour_OnRectTransformDimensionsChange_m1473730550(__this, /*hidden argument*/NULL); bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0017; } } { goto IL_001d; } IL_0017: { Scrollbar_UpdateVisuals_m2492252165(__this, /*hidden argument*/NULL); } IL_001d: { return; } } // UnityEngine.UI.Scrollbar/Axis UnityEngine.UI.Scrollbar::get_axis() extern "C" int32_t Scrollbar_get_axis_m664270947 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { int32_t V_0 = 0; int32_t G_B4_0 = 0; { int32_t L_0 = __this->get_m_Direction_17(); if (!L_0) { goto IL_0018; } } { int32_t L_1 = __this->get_m_Direction_17(); if ((!(((uint32_t)L_1) == ((uint32_t)1)))) { goto IL_001e; } } IL_0018: { G_B4_0 = 0; goto IL_001f; } IL_001e: { G_B4_0 = 1; } IL_001f: { V_0 = G_B4_0; goto IL_0025; } IL_0025: { int32_t L_2 = V_0; return L_2; } } // System.Boolean UnityEngine.UI.Scrollbar::get_reverseValue() extern "C" bool Scrollbar_get_reverseValue_m3712242531 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { bool V_0 = false; int32_t G_B3_0 = 0; { int32_t L_0 = __this->get_m_Direction_17(); if ((((int32_t)L_0) == ((int32_t)1))) { goto IL_0018; } } { int32_t L_1 = __this->get_m_Direction_17(); G_B3_0 = ((((int32_t)L_1) == ((int32_t)3))? 1 : 0); goto IL_0019; } IL_0018: { G_B3_0 = 1; } IL_0019: { V_0 = (bool)G_B3_0; goto IL_001f; } IL_001f: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Scrollbar::UpdateVisuals() extern "C" void Scrollbar_UpdateVisuals_m2492252165 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_UpdateVisuals_m2492252165_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; { DrivenRectTransformTracker_t2562230146 * L_0 = __this->get_address_of_m_Tracker_24(); DrivenRectTransformTracker_Clear_m905140393(L_0, /*hidden argument*/NULL); RectTransform_t3704657025 * L_1 = __this->get_m_ContainerRect_22(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_00d4; } } { DrivenRectTransformTracker_t2562230146 * L_3 = __this->get_address_of_m_Tracker_24(); RectTransform_t3704657025 * L_4 = __this->get_m_HandleRect_16(); DrivenRectTransformTracker_Add_m4180584832(L_3, __this, L_4, ((int32_t)3840), /*hidden argument*/NULL); Vector2_t2156229523 L_5 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_5; Vector2_t2156229523 L_6 = Vector2_get_one_m3275444361(NULL /*static, unused*/, /*hidden argument*/NULL); V_1 = L_6; float L_7 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_8 = Scrollbar_get_size_m3500287235(__this, /*hidden argument*/NULL); V_2 = ((float)((float)L_7*(float)((float)((float)(1.0f)-(float)L_8)))); bool L_9 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); if (!L_9) { goto IL_0096; } } { int32_t L_10 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); float L_11 = V_2; float L_12 = Scrollbar_get_size_m3500287235(__this, /*hidden argument*/NULL); Vector2_set_Item_m1664083694((&V_0), L_10, ((float)((float)((float)((float)(1.0f)-(float)L_11))-(float)L_12)), /*hidden argument*/NULL); int32_t L_13 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); float L_14 = V_2; Vector2_set_Item_m1664083694((&V_1), L_13, ((float)((float)(1.0f)-(float)L_14)), /*hidden argument*/NULL); goto IL_00bb; } IL_0096: { int32_t L_15 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); float L_16 = V_2; Vector2_set_Item_m1664083694((&V_0), L_15, L_16, /*hidden argument*/NULL); int32_t L_17 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); float L_18 = V_2; float L_19 = Scrollbar_get_size_m3500287235(__this, /*hidden argument*/NULL); Vector2_set_Item_m1664083694((&V_1), L_17, ((float)((float)L_18+(float)L_19)), /*hidden argument*/NULL); } IL_00bb: { RectTransform_t3704657025 * L_20 = __this->get_m_HandleRect_16(); Vector2_t2156229523 L_21 = V_0; NullCheck(L_20); RectTransform_set_anchorMin_m2068858122(L_20, L_21, /*hidden argument*/NULL); RectTransform_t3704657025 * L_22 = __this->get_m_HandleRect_16(); Vector2_t2156229523 L_23 = V_1; NullCheck(L_22); RectTransform_set_anchorMax_m2389806509(L_22, L_23, /*hidden argument*/NULL); } IL_00d4: { return; } } // System.Void UnityEngine.UI.Scrollbar::UpdateDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_UpdateDrag_m1999008351 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_UpdateDrag_m1999008351_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Rect_t2360479859 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); Rect_t2360479859 V_4; memset(&V_4, 0, sizeof(V_4)); float V_5 = 0.0f; Rect_t2360479859 V_6; memset(&V_6, 0, sizeof(V_6)); Rect_t2360479859 V_7; memset(&V_7, 0, sizeof(V_7)); float V_8 = 0.0f; int32_t V_9 = 0; float G_B9_0 = 0.0f; { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_0184; } IL_0011: { RectTransform_t3704657025 * L_2 = __this->get_m_ContainerRect_22(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0027; } } { goto IL_0184; } IL_0027: { RectTransform_t3704657025 * L_4 = __this->get_m_ContainerRect_22(); PointerEventData_t3807901092 * L_5 = ___eventData0; NullCheck(L_5); Vector2_t2156229523 L_6 = PointerEventData_get_position_m437660275(L_5, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_7 = ___eventData0; NullCheck(L_7); Camera_t4157153871 * L_8 = PointerEventData_get_pressEventCamera_m2613974917(L_7, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_9 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_4, L_6, L_8, (&V_0), /*hidden argument*/NULL); if (L_9) { goto IL_004a; } } { goto IL_0184; } IL_004a: { Vector2_t2156229523 L_10 = V_0; Vector2_t2156229523 L_11 = __this->get_m_Offset_23(); Vector2_t2156229523 L_12 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL); RectTransform_t3704657025 * L_13 = __this->get_m_ContainerRect_22(); NullCheck(L_13); Rect_t2360479859 L_14 = RectTransform_get_rect_m1643570810(L_13, /*hidden argument*/NULL); V_2 = L_14; Vector2_t2156229523 L_15 = Rect_get_position_m2767609553((&V_2), /*hidden argument*/NULL); Vector2_t2156229523 L_16 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_12, L_15, /*hidden argument*/NULL); V_1 = L_16; Vector2_t2156229523 L_17 = V_1; RectTransform_t3704657025 * L_18 = __this->get_m_HandleRect_16(); NullCheck(L_18); Rect_t2360479859 L_19 = RectTransform_get_rect_m1643570810(L_18, /*hidden argument*/NULL); V_4 = L_19; Vector2_t2156229523 L_20 = Rect_get_size_m3542039952((&V_4), /*hidden argument*/NULL); RectTransform_t3704657025 * L_21 = __this->get_m_HandleRect_16(); NullCheck(L_21); Vector2_t2156229523 L_22 = RectTransform_get_sizeDelta_m2136908840(L_21, /*hidden argument*/NULL); Vector2_t2156229523 L_23 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_20, L_22, /*hidden argument*/NULL); Vector2_t2156229523 L_24 = Vector2_op_Multiply_m1889160058(NULL /*static, unused*/, L_23, (0.5f), /*hidden argument*/NULL); Vector2_t2156229523 L_25 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_17, L_24, /*hidden argument*/NULL); V_3 = L_25; int32_t L_26 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if (L_26) { goto IL_00c8; } } { RectTransform_t3704657025 * L_27 = __this->get_m_ContainerRect_22(); NullCheck(L_27); Rect_t2360479859 L_28 = RectTransform_get_rect_m1643570810(L_27, /*hidden argument*/NULL); V_6 = L_28; float L_29 = Rect_get_width_m3421965717((&V_6), /*hidden argument*/NULL); G_B9_0 = L_29; goto IL_00dc; } IL_00c8: { RectTransform_t3704657025 * L_30 = __this->get_m_ContainerRect_22(); NullCheck(L_30); Rect_t2360479859 L_31 = RectTransform_get_rect_m1643570810(L_30, /*hidden argument*/NULL); V_7 = L_31; float L_32 = Rect_get_height_m977101306((&V_7), /*hidden argument*/NULL); G_B9_0 = L_32; } IL_00dc: { V_5 = G_B9_0; float L_33 = V_5; float L_34 = Scrollbar_get_size_m3500287235(__this, /*hidden argument*/NULL); V_8 = ((float)((float)L_33*(float)((float)((float)(1.0f)-(float)L_34)))); float L_35 = V_8; if ((!(((float)L_35) <= ((float)(0.0f))))) { goto IL_0100; } } { goto IL_0184; } IL_0100: { int32_t L_36 = __this->get_m_Direction_17(); V_9 = L_36; int32_t L_37 = V_9; switch (L_37) { case 0: { goto IL_0124; } case 1: { goto IL_0139; } case 2: { goto IL_0154; } case 3: { goto IL_0169; } } } { goto IL_0184; } IL_0124: { float L_38 = (&V_3)->get_x_0(); float L_39 = V_8; Scrollbar_Set_m1923517630(__this, ((float)((float)L_38/(float)L_39)), /*hidden argument*/NULL); goto IL_0184; } IL_0139: { float L_40 = (&V_3)->get_x_0(); float L_41 = V_8; Scrollbar_Set_m1923517630(__this, ((float)((float)(1.0f)-(float)((float)((float)L_40/(float)L_41)))), /*hidden argument*/NULL); goto IL_0184; } IL_0154: { float L_42 = (&V_3)->get_y_1(); float L_43 = V_8; Scrollbar_Set_m1923517630(__this, ((float)((float)L_42/(float)L_43)), /*hidden argument*/NULL); goto IL_0184; } IL_0169: { float L_44 = (&V_3)->get_y_1(); float L_45 = V_8; Scrollbar_Set_m1923517630(__this, ((float)((float)(1.0f)-(float)((float)((float)L_44/(float)L_45)))), /*hidden argument*/NULL); goto IL_0184; } IL_0184: { return; } } // System.Boolean UnityEngine.UI.Scrollbar::MayDrag(UnityEngine.EventSystems.PointerEventData) extern "C" bool Scrollbar_MayDrag_m4243946511 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { bool V_0 = false; int32_t G_B4_0 = 0; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0022; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (!L_1) { goto IL_0022; } } { PointerEventData_t3807901092 * L_2 = ___eventData0; NullCheck(L_2); int32_t L_3 = PointerEventData_get_button_m359423249(L_2, /*hidden argument*/NULL); G_B4_0 = ((((int32_t)L_3) == ((int32_t)0))? 1 : 0); goto IL_0023; } IL_0022: { G_B4_0 = 0; } IL_0023: { V_0 = (bool)G_B4_0; goto IL_0029; } IL_0029: { bool L_4 = V_0; return L_4; } } // System.Void UnityEngine.UI.Scrollbar::OnBeginDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnBeginDrag_m2883737878 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_OnBeginDrag_m2883737878_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); { __this->set_isPointerDownAndNotDragging_26((bool)0); PointerEventData_t3807901092 * L_0 = ___eventData0; bool L_1 = Scrollbar_MayDrag_m4243946511(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0019; } } { goto IL_0095; } IL_0019: { RectTransform_t3704657025 * L_2 = __this->get_m_ContainerRect_22(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_002f; } } { goto IL_0095; } IL_002f: { Vector2_t2156229523 L_4 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_23(L_4); RectTransform_t3704657025 * L_5 = __this->get_m_HandleRect_16(); PointerEventData_t3807901092 * L_6 = ___eventData0; NullCheck(L_6); Vector2_t2156229523 L_7 = PointerEventData_get_position_m437660275(L_6, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_8 = ___eventData0; NullCheck(L_8); Camera_t4157153871 * L_9 = PointerEventData_get_enterEventCamera_m2055275918(L_8, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_10 = RectTransformUtility_RectangleContainsScreenPoint_m1731210517(NULL /*static, unused*/, L_5, L_7, L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_0095; } } { RectTransform_t3704657025 * L_11 = __this->get_m_HandleRect_16(); PointerEventData_t3807901092 * L_12 = ___eventData0; NullCheck(L_12); Vector2_t2156229523 L_13 = PointerEventData_get_position_m437660275(L_12, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_14 = ___eventData0; NullCheck(L_14); Camera_t4157153871 * L_15 = PointerEventData_get_pressEventCamera_m2613974917(L_14, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_16 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_11, L_13, L_15, (&V_0), /*hidden argument*/NULL); if (!L_16) { goto IL_0094; } } { Vector2_t2156229523 L_17 = V_0; RectTransform_t3704657025 * L_18 = __this->get_m_HandleRect_16(); NullCheck(L_18); Rect_t2360479859 L_19 = RectTransform_get_rect_m1643570810(L_18, /*hidden argument*/NULL); V_1 = L_19; Vector2_t2156229523 L_20 = Rect_get_center_m182049623((&V_1), /*hidden argument*/NULL); Vector2_t2156229523 L_21 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_17, L_20, /*hidden argument*/NULL); __this->set_m_Offset_23(L_21); } IL_0094: { } IL_0095: { return; } } // System.Void UnityEngine.UI.Scrollbar::OnDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnDrag_m4289602768 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_OnDrag_m4289602768_MetadataUsageId); s_Il2CppMethodInitialized = true; } { PointerEventData_t3807901092 * L_0 = ___eventData0; bool L_1 = Scrollbar_MayDrag_m4243946511(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0012; } } { goto IL_002a; } IL_0012: { RectTransform_t3704657025 * L_2 = __this->get_m_ContainerRect_22(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_002a; } } { PointerEventData_t3807901092 * L_4 = ___eventData0; Scrollbar_UpdateDrag_m1999008351(__this, L_4, /*hidden argument*/NULL); } IL_002a: { return; } } // System.Void UnityEngine.UI.Scrollbar::OnPointerDown(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnPointerDown_m3213715319 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; bool L_1 = Scrollbar_MayDrag_m4243946511(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0012; } } { goto IL_0033; } IL_0012: { PointerEventData_t3807901092 * L_2 = ___eventData0; Selectable_OnPointerDown_m1086067264(__this, L_2, /*hidden argument*/NULL); __this->set_isPointerDownAndNotDragging_26((bool)1); PointerEventData_t3807901092 * L_3 = ___eventData0; Il2CppObject * L_4 = Scrollbar_ClickRepeat_m568850785(__this, L_3, /*hidden argument*/NULL); Coroutine_t3829159415 * L_5 = MonoBehaviour_StartCoroutine_m4001331470(__this, L_4, /*hidden argument*/NULL); __this->set_m_PointerDownRepeat_25(L_5); } IL_0033: { return; } } // System.Collections.IEnumerator UnityEngine.UI.Scrollbar::ClickRepeat(UnityEngine.EventSystems.PointerEventData) extern "C" Il2CppObject * Scrollbar_ClickRepeat_m568850785 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_ClickRepeat_m568850785_MetadataUsageId); s_Il2CppMethodInitialized = true; } U3CClickRepeatU3Ec__Iterator0_t3442648935 * V_0 = NULL; Il2CppObject * V_1 = NULL; { U3CClickRepeatU3Ec__Iterator0_t3442648935 * L_0 = (U3CClickRepeatU3Ec__Iterator0_t3442648935 *)il2cpp_codegen_object_new(U3CClickRepeatU3Ec__Iterator0_t3442648935_il2cpp_TypeInfo_var); U3CClickRepeatU3Ec__Iterator0__ctor_m1908169891(L_0, /*hidden argument*/NULL); V_0 = L_0; U3CClickRepeatU3Ec__Iterator0_t3442648935 * L_1 = V_0; PointerEventData_t3807901092 * L_2 = ___eventData0; NullCheck(L_1); L_1->set_eventData_0(L_2); U3CClickRepeatU3Ec__Iterator0_t3442648935 * L_3 = V_0; NullCheck(L_3); L_3->set_U24this_1(__this); U3CClickRepeatU3Ec__Iterator0_t3442648935 * L_4 = V_0; V_1 = L_4; goto IL_001b; } IL_001b: { Il2CppObject * L_5 = V_1; return L_5; } } // System.Void UnityEngine.UI.Scrollbar::OnPointerUp(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnPointerUp_m133033162 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; Selectable_OnPointerUp_m3228301429(__this, L_0, /*hidden argument*/NULL); __this->set_isPointerDownAndNotDragging_26((bool)0); return; } } // System.Void UnityEngine.UI.Scrollbar::OnMove(UnityEngine.EventSystems.AxisEventData) extern "C" void Scrollbar_OnMove_m884487036 (Scrollbar_t1494447233 * __this, AxisEventData_t2331243652 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_OnMove_m884487036_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; Scrollbar_t1494447233 * G_B9_0 = NULL; Scrollbar_t1494447233 * G_B8_0 = NULL; float G_B10_0 = 0.0f; Scrollbar_t1494447233 * G_B10_1 = NULL; Scrollbar_t1494447233 * G_B17_0 = NULL; Scrollbar_t1494447233 * G_B16_0 = NULL; float G_B18_0 = 0.0f; Scrollbar_t1494447233 * G_B18_1 = NULL; Scrollbar_t1494447233 * G_B25_0 = NULL; Scrollbar_t1494447233 * G_B24_0 = NULL; float G_B26_0 = 0.0f; Scrollbar_t1494447233 * G_B26_1 = NULL; Scrollbar_t1494447233 * G_B33_0 = NULL; Scrollbar_t1494447233 * G_B32_0 = NULL; float G_B34_0 = 0.0f; Scrollbar_t1494447233 * G_B34_1 = NULL; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0017; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_0024; } } IL_0017: { AxisEventData_t2331243652 * L_2 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_2, /*hidden argument*/NULL); goto IL_01bc; } IL_0024: { AxisEventData_t2331243652 * L_3 = ___eventData0; NullCheck(L_3); int32_t L_4 = AxisEventData_get_moveDir_m2423724085(L_3, /*hidden argument*/NULL); V_0 = L_4; int32_t L_5 = V_0; switch (L_5) { case 0: { goto IL_0046; } case 1: { goto IL_0100; } case 2: { goto IL_00a3; } case 3: { goto IL_015e; } } } { goto IL_01bc; } IL_0046: { int32_t L_6 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if (L_6) { goto IL_0097; } } { Selectable_t3250028441 * L_7 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(27 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_7, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0097; } } { bool L_9 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); G_B8_0 = __this; if (!L_9) { G_B9_0 = __this; goto IL_0080; } } { float L_10 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_11 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_10+(float)L_11)); G_B10_1 = G_B8_0; goto IL_008d; } IL_0080: { float L_12 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_13 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_12-(float)L_13)); G_B10_1 = G_B9_0; } IL_008d: { NullCheck(G_B10_1); Scrollbar_Set_m1923517630(G_B10_1, G_B10_0, /*hidden argument*/NULL); goto IL_009e; } IL_0097: { AxisEventData_t2331243652 * L_14 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_14, /*hidden argument*/NULL); } IL_009e: { goto IL_01bc; } IL_00a3: { int32_t L_15 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if (L_15) { goto IL_00f4; } } { Selectable_t3250028441 * L_16 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(28 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_17 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_16, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_17) { goto IL_00f4; } } { bool L_18 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); G_B16_0 = __this; if (!L_18) { G_B17_0 = __this; goto IL_00dd; } } { float L_19 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_20 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_19-(float)L_20)); G_B18_1 = G_B16_0; goto IL_00ea; } IL_00dd: { float L_21 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_22 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_21+(float)L_22)); G_B18_1 = G_B17_0; } IL_00ea: { NullCheck(G_B18_1); Scrollbar_Set_m1923517630(G_B18_1, G_B18_0, /*hidden argument*/NULL); goto IL_00fb; } IL_00f4: { AxisEventData_t2331243652 * L_23 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_23, /*hidden argument*/NULL); } IL_00fb: { goto IL_01bc; } IL_0100: { int32_t L_24 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_24) == ((uint32_t)1)))) { goto IL_0152; } } { Selectable_t3250028441 * L_25 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(29 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_26 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_25, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_26) { goto IL_0152; } } { bool L_27 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); G_B24_0 = __this; if (!L_27) { G_B25_0 = __this; goto IL_013b; } } { float L_28 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_29 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_28-(float)L_29)); G_B26_1 = G_B24_0; goto IL_0148; } IL_013b: { float L_30 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_31 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_30+(float)L_31)); G_B26_1 = G_B25_0; } IL_0148: { NullCheck(G_B26_1); Scrollbar_Set_m1923517630(G_B26_1, G_B26_0, /*hidden argument*/NULL); goto IL_0159; } IL_0152: { AxisEventData_t2331243652 * L_32 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_32, /*hidden argument*/NULL); } IL_0159: { goto IL_01bc; } IL_015e: { int32_t L_33 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_33) == ((uint32_t)1)))) { goto IL_01b0; } } { Selectable_t3250028441 * L_34 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(30 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_35 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_34, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_35) { goto IL_01b0; } } { bool L_36 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); G_B32_0 = __this; if (!L_36) { G_B33_0 = __this; goto IL_0199; } } { float L_37 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_38 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_37+(float)L_38)); G_B34_1 = G_B32_0; goto IL_01a6; } IL_0199: { float L_39 = Scrollbar_get_value_m760470106(__this, /*hidden argument*/NULL); float L_40 = Scrollbar_get_stepSize_m1389308760(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_39-(float)L_40)); G_B34_1 = G_B33_0; } IL_01a6: { NullCheck(G_B34_1); Scrollbar_Set_m1923517630(G_B34_1, G_B34_0, /*hidden argument*/NULL); goto IL_01b7; } IL_01b0: { AxisEventData_t2331243652 * L_41 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_41, /*hidden argument*/NULL); } IL_01b7: { goto IL_01bc; } IL_01bc: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnLeft() extern "C" Selectable_t3250028441 * Scrollbar_FindSelectableOnLeft_m745079697 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0027; } } { int32_t L_2 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0027; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0033; } IL_0027: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnLeft_m75080035(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0033; } IL_0033: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnRight() extern "C" Selectable_t3250028441 * Scrollbar_FindSelectableOnRight_m3529608650 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0027; } } { int32_t L_2 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0027; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0033; } IL_0027: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnRight_m2374187443(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0033; } IL_0033: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnUp() extern "C" Selectable_t3250028441 * Scrollbar_FindSelectableOnUp_m48960821 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0028; } } { int32_t L_2 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0028; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0034; } IL_0028: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnUp_m1814865676(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0034; } IL_0034: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnDown() extern "C" Selectable_t3250028441 * Scrollbar_FindSelectableOnDown_m1684359333 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0028; } } { int32_t L_2 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0028; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0034; } IL_0028: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnDown_m1591762582(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0034; } IL_0034: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // System.Void UnityEngine.UI.Scrollbar::OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnInitializePotentialDrag_m3588541308 (Scrollbar_t1494447233 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); PointerEventData_set_useDragThreshold_m248001603(L_0, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::SetDirection(UnityEngine.UI.Scrollbar/Direction,System.Boolean) extern "C" void Scrollbar_SetDirection_m1664029967 (Scrollbar_t1494447233 * __this, int32_t ___direction0, bool ___includeRectLayouts1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Scrollbar_SetDirection_m1664029967_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; bool V_1 = false; { int32_t L_0 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); V_0 = L_0; bool L_1 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); V_1 = L_1; int32_t L_2 = ___direction0; Scrollbar_set_direction_m473480640(__this, L_2, /*hidden argument*/NULL); bool L_3 = ___includeRectLayouts1; if (L_3) { goto IL_0021; } } { goto IL_0063; } IL_0021: { int32_t L_4 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); int32_t L_5 = V_0; if ((((int32_t)L_4) == ((int32_t)L_5))) { goto IL_003f; } } { Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutAxes_m3705369832(NULL /*static, unused*/, ((RectTransform_t3704657025 *)IsInstSealed(L_6, RectTransform_t3704657025_il2cpp_TypeInfo_var)), (bool)1, (bool)1, /*hidden argument*/NULL); } IL_003f: { bool L_7 = Scrollbar_get_reverseValue_m3712242531(__this, /*hidden argument*/NULL); bool L_8 = V_1; if ((((int32_t)L_7) == ((int32_t)L_8))) { goto IL_0063; } } { Transform_t3600365921 * L_9 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); int32_t L_10 = Scrollbar_get_axis_m664270947(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutOnAxis_m144305054(NULL /*static, unused*/, ((RectTransform_t3704657025 *)IsInstSealed(L_9, RectTransform_t3704657025_il2cpp_TypeInfo_var)), L_10, (bool)1, (bool)1, /*hidden argument*/NULL); } IL_0063: { return; } } // UnityEngine.Transform UnityEngine.UI.Scrollbar::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t3600365921 * Scrollbar_UnityEngine_UI_ICanvasElement_get_transform_m859714578 (Scrollbar_t1494447233 * __this, const MethodInfo* method) { { Transform_t3600365921 * L_0 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::.ctor() extern "C" void U3CClickRepeatU3Ec__Iterator0__ctor_m1908169891 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) { { Object__ctor_m297566312(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::MoveNext() extern "C" bool U3CClickRepeatU3Ec__Iterator0_MoveNext_m2800364313 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (U3CClickRepeatU3Ec__Iterator0_MoveNext_m2800364313_MetadataUsageId); s_Il2CppMethodInitialized = true; } uint32_t V_0 = 0; Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; float G_B8_0 = 0.0f; { int32_t L_0 = __this->get_U24PC_4(); V_0 = L_0; __this->set_U24PC_4((-1)); uint32_t L_1 = V_0; switch (L_1) { case 0: { goto IL_0021; } case 1: { goto IL_0111; } } } { goto IL_013f; } IL_0021: { goto IL_0112; } IL_0027: { Scrollbar_t1494447233 * L_2 = __this->get_U24this_1(); NullCheck(L_2); RectTransform_t3704657025 * L_3 = L_2->get_m_HandleRect_16(); PointerEventData_t3807901092 * L_4 = __this->get_eventData_0(); NullCheck(L_4); Vector2_t2156229523 L_5 = PointerEventData_get_position_m437660275(L_4, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_6 = __this->get_eventData_0(); NullCheck(L_6); Camera_t4157153871 * L_7 = PointerEventData_get_enterEventCamera_m2055275918(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_8 = RectTransformUtility_RectangleContainsScreenPoint_m1731210517(NULL /*static, unused*/, L_3, L_5, L_7, /*hidden argument*/NULL); if (L_8) { goto IL_00f2; } } { Scrollbar_t1494447233 * L_9 = __this->get_U24this_1(); NullCheck(L_9); RectTransform_t3704657025 * L_10 = L_9->get_m_HandleRect_16(); PointerEventData_t3807901092 * L_11 = __this->get_eventData_0(); NullCheck(L_11); Vector2_t2156229523 L_12 = PointerEventData_get_position_m437660275(L_11, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_13 = __this->get_eventData_0(); NullCheck(L_13); Camera_t4157153871 * L_14 = PointerEventData_get_pressEventCamera_m2613974917(L_13, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_15 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_10, L_12, L_14, (&V_1), /*hidden argument*/NULL); if (!L_15) { goto IL_00f1; } } { Scrollbar_t1494447233 * L_16 = __this->get_U24this_1(); NullCheck(L_16); int32_t L_17 = Scrollbar_get_axis_m664270947(L_16, /*hidden argument*/NULL); if (L_17) { goto IL_009e; } } { float L_18 = (&V_1)->get_x_0(); G_B8_0 = L_18; goto IL_00a5; } IL_009e: { float L_19 = (&V_1)->get_y_1(); G_B8_0 = L_19; } IL_00a5: { V_2 = G_B8_0; float L_20 = V_2; if ((!(((float)L_20) < ((float)(0.0f))))) { goto IL_00d3; } } { Scrollbar_t1494447233 * L_21 = __this->get_U24this_1(); Scrollbar_t1494447233 * L_22 = L_21; NullCheck(L_22); float L_23 = Scrollbar_get_value_m760470106(L_22, /*hidden argument*/NULL); Scrollbar_t1494447233 * L_24 = __this->get_U24this_1(); NullCheck(L_24); float L_25 = Scrollbar_get_size_m3500287235(L_24, /*hidden argument*/NULL); NullCheck(L_22); Scrollbar_set_value_m2277767288(L_22, ((float)((float)L_23-(float)L_25)), /*hidden argument*/NULL); goto IL_00f0; } IL_00d3: { Scrollbar_t1494447233 * L_26 = __this->get_U24this_1(); Scrollbar_t1494447233 * L_27 = L_26; NullCheck(L_27); float L_28 = Scrollbar_get_value_m760470106(L_27, /*hidden argument*/NULL); Scrollbar_t1494447233 * L_29 = __this->get_U24this_1(); NullCheck(L_29); float L_30 = Scrollbar_get_size_m3500287235(L_29, /*hidden argument*/NULL); NullCheck(L_27); Scrollbar_set_value_m2277767288(L_27, ((float)((float)L_28+(float)L_30)), /*hidden argument*/NULL); } IL_00f0: { } IL_00f1: { } IL_00f2: { WaitForEndOfFrame_t1314943911 * L_31 = (WaitForEndOfFrame_t1314943911 *)il2cpp_codegen_object_new(WaitForEndOfFrame_t1314943911_il2cpp_TypeInfo_var); WaitForEndOfFrame__ctor_m3113257827(L_31, /*hidden argument*/NULL); __this->set_U24current_2(L_31); bool L_32 = __this->get_U24disposing_3(); if (L_32) { goto IL_010c; } } { __this->set_U24PC_4(1); } IL_010c: { goto IL_0141; } IL_0111: { } IL_0112: { Scrollbar_t1494447233 * L_33 = __this->get_U24this_1(); NullCheck(L_33); bool L_34 = L_33->get_isPointerDownAndNotDragging_26(); if (L_34) { goto IL_0027; } } { Scrollbar_t1494447233 * L_35 = __this->get_U24this_1(); Scrollbar_t1494447233 * L_36 = __this->get_U24this_1(); NullCheck(L_36); Coroutine_t3829159415 * L_37 = L_36->get_m_PointerDownRepeat_25(); NullCheck(L_35); MonoBehaviour_StopCoroutine_m253796553(L_35, L_37, /*hidden argument*/NULL); __this->set_U24PC_4((-1)); } IL_013f: { return (bool)0; } IL_0141: { return (bool)1; } } // System.Object UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::System.Collections.Generic.IEnumerator<object>.get_Current() extern "C" Il2CppObject * U3CClickRepeatU3Ec__Iterator0_System_Collections_Generic_IEnumeratorU3CobjectU3E_get_Current_m1221525672 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) { Il2CppObject * V_0 = NULL; { Il2CppObject * L_0 = __this->get_U24current_2(); V_0 = L_0; goto IL_000c; } IL_000c: { Il2CppObject * L_1 = V_0; return L_1; } } // System.Object UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::System.Collections.IEnumerator.get_Current() extern "C" Il2CppObject * U3CClickRepeatU3Ec__Iterator0_System_Collections_IEnumerator_get_Current_m543328413 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) { Il2CppObject * V_0 = NULL; { Il2CppObject * L_0 = __this->get_U24current_2(); V_0 = L_0; goto IL_000c; } IL_000c: { Il2CppObject * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::Dispose() extern "C" void U3CClickRepeatU3Ec__Iterator0_Dispose_m4248496038 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) { { __this->set_U24disposing_3((bool)1); __this->set_U24PC_4((-1)); return; } } // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator0::Reset() extern "C" void U3CClickRepeatU3Ec__Iterator0_Reset_m1121315703 (U3CClickRepeatU3Ec__Iterator0_t3442648935 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (U3CClickRepeatU3Ec__Iterator0_Reset_m1121315703_MetadataUsageId); s_Il2CppMethodInitialized = true; } { NotSupportedException_t1314879016 * L_0 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var); NotSupportedException__ctor_m2730133172(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Void UnityEngine.UI.Scrollbar/ScrollEvent::.ctor() extern "C" void ScrollEvent__ctor_m342565857 (ScrollEvent_t149898510 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollEvent__ctor_m342565857_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UnityEvent_1__ctor_m2218582587(__this, /*hidden argument*/UnityEvent_1__ctor_m2218582587_MethodInfo_var); return; } } // System.Void UnityEngine.UI.ScrollRect::.ctor() extern "C" void ScrollRect__ctor_m4109385501 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect__ctor_m4109385501_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_m_Horizontal_3((bool)1); __this->set_m_Vertical_4((bool)1); __this->set_m_MovementType_5(1); __this->set_m_Elasticity_6((0.1f)); __this->set_m_Inertia_7((bool)1); __this->set_m_DecelerationRate_8((0.135f)); __this->set_m_ScrollSensitivity_9((1.0f)); ScrollRectEvent_t343079324 * L_0 = (ScrollRectEvent_t343079324 *)il2cpp_codegen_object_new(ScrollRectEvent_t343079324_il2cpp_TypeInfo_var); ScrollRectEvent__ctor_m1107027632(L_0, /*hidden argument*/NULL); __this->set_m_OnValueChanged_17(L_0); Vector2_t2156229523 L_1 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PointerStartLocalCursor_18(L_1); Vector2_t2156229523 L_2 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_ContentStartPosition_19(L_2); Vector2_t2156229523 L_3 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PrevPosition_25(L_3); __this->set_m_HasRebuiltLayout_28((bool)0); __this->set_m_Corners_37(((Vector3U5BU5D_t1718750761*)SZArrayNew(Vector3U5BU5D_t1718750761_il2cpp_TypeInfo_var, (uint32_t)4))); UIBehaviour__ctor_m4230637738(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_content() extern "C" RectTransform_t3704657025 * ScrollRect_get_content_m2477524320 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_Content_2(); V_0 = L_0; goto IL_000d; } IL_000d: { RectTransform_t3704657025 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_content(UnityEngine.RectTransform) extern "C" void ScrollRect_set_content_m321343743 (ScrollRect_t4137855814 * __this, RectTransform_t3704657025 * ___value0, const MethodInfo* method) { { RectTransform_t3704657025 * L_0 = ___value0; __this->set_m_Content_2(L_0); return; } } // System.Boolean UnityEngine.UI.ScrollRect::get_horizontal() extern "C" bool ScrollRect_get_horizontal_m4171218020 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_Horizontal_3(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontal(System.Boolean) extern "C" void ScrollRect_set_horizontal_m226990028 (ScrollRect_t4137855814 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_m_Horizontal_3(L_0); return; } } // System.Boolean UnityEngine.UI.ScrollRect::get_vertical() extern "C" bool ScrollRect_get_vertical_m3678635065 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_Vertical_4(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_vertical(System.Boolean) extern "C" void ScrollRect_set_vertical_m1095151633 (ScrollRect_t4137855814 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_m_Vertical_4(L_0); return; } } // UnityEngine.UI.ScrollRect/MovementType UnityEngine.UI.ScrollRect::get_movementType() extern "C" int32_t ScrollRect_get_movementType_m2390238786 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_MovementType_5(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_movementType(UnityEngine.UI.ScrollRect/MovementType) extern "C" void ScrollRect_set_movementType_m566824818 (ScrollRect_t4137855814 * __this, int32_t ___value0, const MethodInfo* method) { { int32_t L_0 = ___value0; __this->set_m_MovementType_5(L_0); return; } } // System.Single UnityEngine.UI.ScrollRect::get_elasticity() extern "C" float ScrollRect_get_elasticity_m2887178028 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_Elasticity_6(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_elasticity(System.Single) extern "C" void ScrollRect_set_elasticity_m826209491 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_Elasticity_6(L_0); return; } } // System.Boolean UnityEngine.UI.ScrollRect::get_inertia() extern "C" bool ScrollRect_get_inertia_m1027210736 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_Inertia_7(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_inertia(System.Boolean) extern "C" void ScrollRect_set_inertia_m3662342596 (ScrollRect_t4137855814 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_m_Inertia_7(L_0); return; } } // System.Single UnityEngine.UI.ScrollRect::get_decelerationRate() extern "C" float ScrollRect_get_decelerationRate_m74583805 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_DecelerationRate_8(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_decelerationRate(System.Single) extern "C" void ScrollRect_set_decelerationRate_m723367336 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_DecelerationRate_8(L_0); return; } } // System.Single UnityEngine.UI.ScrollRect::get_scrollSensitivity() extern "C" float ScrollRect_get_scrollSensitivity_m2832710591 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_ScrollSensitivity_9(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_scrollSensitivity(System.Single) extern "C" void ScrollRect_set_scrollSensitivity_m3062191020 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_ScrollSensitivity_9(L_0); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_viewport() extern "C" RectTransform_t3704657025 * ScrollRect_get_viewport_m3082762956 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_Viewport_10(); V_0 = L_0; goto IL_000d; } IL_000d: { RectTransform_t3704657025 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_viewport(UnityEngine.RectTransform) extern "C" void ScrollRect_set_viewport_m2311992945 (ScrollRect_t4137855814 * __this, RectTransform_t3704657025 * ___value0, const MethodInfo* method) { { RectTransform_t3704657025 * L_0 = ___value0; __this->set_m_Viewport_10(L_0); ScrollRect_SetDirtyCaching_m4155312386(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Scrollbar UnityEngine.UI.ScrollRect::get_horizontalScrollbar() extern "C" Scrollbar_t1494447233 * ScrollRect_get_horizontalScrollbar_m3123183756 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Scrollbar_t1494447233 * V_0 = NULL; { Scrollbar_t1494447233 * L_0 = __this->get_m_HorizontalScrollbar_11(); V_0 = L_0; goto IL_000d; } IL_000d: { Scrollbar_t1494447233 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalScrollbar(UnityEngine.UI.Scrollbar) extern "C" void ScrollRect_set_horizontalScrollbar_m1905585067 (ScrollRect_t4137855814 * __this, Scrollbar_t1494447233 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_set_horizontalScrollbar_m1905585067_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Scrollbar_t1494447233 * L_0 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_002d; } } { Scrollbar_t1494447233 * L_2 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_2); ScrollEvent_t149898510 * L_3 = Scrollbar_get_onValueChanged_m2631583151(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m3159121919_MethodInfo_var); UnityAction_1_t1982102915 * L_5 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_3); UnityEvent_1_RemoveListener_m4190968495(L_3, L_5, /*hidden argument*/UnityEvent_1_RemoveListener_m4190968495_MethodInfo_var); } IL_002d: { Scrollbar_t1494447233 * L_6 = ___value0; __this->set_m_HorizontalScrollbar_11(L_6); Scrollbar_t1494447233 * L_7 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_0060; } } { Scrollbar_t1494447233 * L_9 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_9); ScrollEvent_t149898510 * L_10 = Scrollbar_get_onValueChanged_m2631583151(L_9, /*hidden argument*/NULL); IntPtr_t L_11; L_11.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m3159121919_MethodInfo_var); UnityAction_1_t1982102915 * L_12 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_12, __this, L_11, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_10); UnityEvent_1_AddListener_m3008008915(L_10, L_12, /*hidden argument*/UnityEvent_1_AddListener_m3008008915_MethodInfo_var); } IL_0060: { ScrollRect_SetDirtyCaching_m4155312386(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Scrollbar UnityEngine.UI.ScrollRect::get_verticalScrollbar() extern "C" Scrollbar_t1494447233 * ScrollRect_get_verticalScrollbar_m4096229079 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Scrollbar_t1494447233 * V_0 = NULL; { Scrollbar_t1494447233 * L_0 = __this->get_m_VerticalScrollbar_12(); V_0 = L_0; goto IL_000d; } IL_000d: { Scrollbar_t1494447233 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalScrollbar(UnityEngine.UI.Scrollbar) extern "C" void ScrollRect_set_verticalScrollbar_m3559087251 (ScrollRect_t4137855814 * __this, Scrollbar_t1494447233 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_set_verticalScrollbar_m3559087251_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Scrollbar_t1494447233 * L_0 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_002d; } } { Scrollbar_t1494447233 * L_2 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_2); ScrollEvent_t149898510 * L_3 = Scrollbar_get_onValueChanged_m2631583151(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3389719750_MethodInfo_var); UnityAction_1_t1982102915 * L_5 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_3); UnityEvent_1_RemoveListener_m4190968495(L_3, L_5, /*hidden argument*/UnityEvent_1_RemoveListener_m4190968495_MethodInfo_var); } IL_002d: { Scrollbar_t1494447233 * L_6 = ___value0; __this->set_m_VerticalScrollbar_12(L_6); Scrollbar_t1494447233 * L_7 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_0060; } } { Scrollbar_t1494447233 * L_9 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_9); ScrollEvent_t149898510 * L_10 = Scrollbar_get_onValueChanged_m2631583151(L_9, /*hidden argument*/NULL); IntPtr_t L_11; L_11.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3389719750_MethodInfo_var); UnityAction_1_t1982102915 * L_12 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_12, __this, L_11, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_10); UnityEvent_1_AddListener_m3008008915(L_10, L_12, /*hidden argument*/UnityEvent_1_AddListener_m3008008915_MethodInfo_var); } IL_0060: { ScrollRect_SetDirtyCaching_m4155312386(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ScrollRect/ScrollbarVisibility UnityEngine.UI.ScrollRect::get_horizontalScrollbarVisibility() extern "C" int32_t ScrollRect_get_horizontalScrollbarVisibility_m1341651705 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_HorizontalScrollbarVisibility_13(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalScrollbarVisibility(UnityEngine.UI.ScrollRect/ScrollbarVisibility) extern "C" void ScrollRect_set_horizontalScrollbarVisibility_m858954037 (ScrollRect_t4137855814 * __this, int32_t ___value0, const MethodInfo* method) { { int32_t L_0 = ___value0; __this->set_m_HorizontalScrollbarVisibility_13(L_0); ScrollRect_SetDirtyCaching_m4155312386(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ScrollRect/ScrollbarVisibility UnityEngine.UI.ScrollRect::get_verticalScrollbarVisibility() extern "C" int32_t ScrollRect_get_verticalScrollbarVisibility_m271142496 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_VerticalScrollbarVisibility_14(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalScrollbarVisibility(UnityEngine.UI.ScrollRect/ScrollbarVisibility) extern "C" void ScrollRect_set_verticalScrollbarVisibility_m2250722467 (ScrollRect_t4137855814 * __this, int32_t ___value0, const MethodInfo* method) { { int32_t L_0 = ___value0; __this->set_m_VerticalScrollbarVisibility_14(L_0); ScrollRect_SetDirtyCaching_m4155312386(__this, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.ScrollRect::get_horizontalScrollbarSpacing() extern "C" float ScrollRect_get_horizontalScrollbarSpacing_m1307387887 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_HorizontalScrollbarSpacing_15(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalScrollbarSpacing(System.Single) extern "C" void ScrollRect_set_horizontalScrollbarSpacing_m2209919081 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_HorizontalScrollbarSpacing_15(L_0); ScrollRect_SetDirty_m214267968(__this, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.ScrollRect::get_verticalScrollbarSpacing() extern "C" float ScrollRect_get_verticalScrollbarSpacing_m3894317765 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_VerticalScrollbarSpacing_16(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalScrollbarSpacing(System.Single) extern "C" void ScrollRect_set_verticalScrollbarSpacing_m1091218920 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_VerticalScrollbarSpacing_16(L_0); ScrollRect_SetDirty_m214267968(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ScrollRect/ScrollRectEvent UnityEngine.UI.ScrollRect::get_onValueChanged() extern "C" ScrollRectEvent_t343079324 * ScrollRect_get_onValueChanged_m1819941361 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { ScrollRectEvent_t343079324 * V_0 = NULL; { ScrollRectEvent_t343079324 * L_0 = __this->get_m_OnValueChanged_17(); V_0 = L_0; goto IL_000d; } IL_000d: { ScrollRectEvent_t343079324 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_onValueChanged(UnityEngine.UI.ScrollRect/ScrollRectEvent) extern "C" void ScrollRect_set_onValueChanged_m3462008715 (ScrollRect_t4137855814 * __this, ScrollRectEvent_t343079324 * ___value0, const MethodInfo* method) { { ScrollRectEvent_t343079324 * L_0 = ___value0; __this->set_m_OnValueChanged_17(L_0); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_viewRect() extern "C" RectTransform_t3704657025 * ScrollRect_get_viewRect_m791243225 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_get_viewRect_m791243225_MetadataUsageId); s_Il2CppMethodInitialized = true; } RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_ViewRect_20(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001e; } } { RectTransform_t3704657025 * L_2 = __this->get_m_Viewport_10(); __this->set_m_ViewRect_20(L_2); } IL_001e: { RectTransform_t3704657025 * L_3 = __this->get_m_ViewRect_20(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0040; } } { Transform_t3600365921 * L_5 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); __this->set_m_ViewRect_20(((RectTransform_t3704657025 *)CastclassSealed(L_5, RectTransform_t3704657025_il2cpp_TypeInfo_var))); } IL_0040: { RectTransform_t3704657025 * L_6 = __this->get_m_ViewRect_20(); V_0 = L_6; goto IL_004c; } IL_004c: { RectTransform_t3704657025 * L_7 = V_0; return L_7; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::get_velocity() extern "C" Vector2_t2156229523 ScrollRect_get_velocity_m513672031 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); { Vector2_t2156229523 L_0 = __this->get_m_Velocity_23(); V_0 = L_0; goto IL_000d; } IL_000d: { Vector2_t2156229523 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ScrollRect::set_velocity(UnityEngine.Vector2) extern "C" void ScrollRect_set_velocity_m2217198666 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___value0, const MethodInfo* method) { { Vector2_t2156229523 L_0 = ___value0; __this->set_m_Velocity_23(L_0); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_rectTransform() extern "C" RectTransform_t3704657025 * ScrollRect_get_rectTransform_m2442061719 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_get_rectTransform_m2442061719_MetadataUsageId); s_Il2CppMethodInitialized = true; } RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_Rect_33(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001e; } } { RectTransform_t3704657025 * L_2 = Component_GetComponent_TisRectTransform_t3704657025_m989540290(__this, /*hidden argument*/Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var); __this->set_m_Rect_33(L_2); } IL_001e: { RectTransform_t3704657025 * L_3 = __this->get_m_Rect_33(); V_0 = L_3; goto IL_002a; } IL_002a: { RectTransform_t3704657025 * L_4 = V_0; return L_4; } } // System.Void UnityEngine.UI.ScrollRect::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void ScrollRect_Rebuild_m364667943 (ScrollRect_t4137855814 * __this, int32_t ___executing0, const MethodInfo* method) { { int32_t L_0 = ___executing0; if (L_0) { goto IL_000f; } } { ScrollRect_UpdateCachedData_m2213916985(__this, /*hidden argument*/NULL); } IL_000f: { int32_t L_1 = ___executing0; if ((!(((uint32_t)L_1) == ((uint32_t)2)))) { goto IL_0036; } } { ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_2 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); ScrollRect_UpdateScrollbars_m4146077522(__this, L_2, /*hidden argument*/NULL); ScrollRect_UpdatePrevData_m4009119607(__this, /*hidden argument*/NULL); __this->set_m_HasRebuiltLayout_28((bool)1); } IL_0036: { return; } } // System.Void UnityEngine.UI.ScrollRect::LayoutComplete() extern "C" void ScrollRect_LayoutComplete_m284678646 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.ScrollRect::GraphicUpdateComplete() extern "C" void ScrollRect_GraphicUpdateComplete_m595552024 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateCachedData() extern "C" void ScrollRect_UpdateCachedData_m2213916985 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateCachedData_m2213916985_MetadataUsageId); s_Il2CppMethodInitialized = true; } Transform_t3600365921 * V_0 = NULL; bool V_1 = false; bool V_2 = false; bool V_3 = false; bool V_4 = false; Rect_t2360479859 V_5; memset(&V_5, 0, sizeof(V_5)); Rect_t2360479859 V_6; memset(&V_6, 0, sizeof(V_6)); ScrollRect_t4137855814 * G_B2_0 = NULL; ScrollRect_t4137855814 * G_B1_0 = NULL; RectTransform_t3704657025 * G_B3_0 = NULL; ScrollRect_t4137855814 * G_B3_1 = NULL; ScrollRect_t4137855814 * G_B5_0 = NULL; ScrollRect_t4137855814 * G_B4_0 = NULL; RectTransform_t3704657025 * G_B6_0 = NULL; ScrollRect_t4137855814 * G_B6_1 = NULL; int32_t G_B9_0 = 0; int32_t G_B12_0 = 0; int32_t G_B16_0 = 0; ScrollRect_t4137855814 * G_B19_0 = NULL; ScrollRect_t4137855814 * G_B17_0 = NULL; ScrollRect_t4137855814 * G_B18_0 = NULL; int32_t G_B20_0 = 0; ScrollRect_t4137855814 * G_B20_1 = NULL; ScrollRect_t4137855814 * G_B23_0 = NULL; ScrollRect_t4137855814 * G_B21_0 = NULL; ScrollRect_t4137855814 * G_B22_0 = NULL; int32_t G_B24_0 = 0; ScrollRect_t4137855814 * G_B24_1 = NULL; ScrollRect_t4137855814 * G_B26_0 = NULL; ScrollRect_t4137855814 * G_B25_0 = NULL; float G_B27_0 = 0.0f; ScrollRect_t4137855814 * G_B27_1 = NULL; ScrollRect_t4137855814 * G_B29_0 = NULL; ScrollRect_t4137855814 * G_B28_0 = NULL; float G_B30_0 = 0.0f; ScrollRect_t4137855814 * G_B30_1 = NULL; { Transform_t3600365921 * L_0 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); V_0 = L_0; Scrollbar_t1494447233 * L_1 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B1_0 = __this; if (!L_2) { G_B2_0 = __this; goto IL_0020; } } { G_B3_0 = ((RectTransform_t3704657025 *)(NULL)); G_B3_1 = G_B1_0; goto IL_0030; } IL_0020: { Scrollbar_t1494447233 * L_3 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_3); Transform_t3600365921 * L_4 = Component_get_transform_m2921103810(L_3, /*hidden argument*/NULL); G_B3_0 = ((RectTransform_t3704657025 *)IsInstSealed(L_4, RectTransform_t3704657025_il2cpp_TypeInfo_var)); G_B3_1 = G_B2_0; } IL_0030: { NullCheck(G_B3_1); G_B3_1->set_m_HorizontalScrollbarRect_34(G_B3_0); Scrollbar_t1494447233 * L_5 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B4_0 = __this; if (!L_6) { G_B5_0 = __this; goto IL_004d; } } { G_B6_0 = ((RectTransform_t3704657025 *)(NULL)); G_B6_1 = G_B4_0; goto IL_005d; } IL_004d: { Scrollbar_t1494447233 * L_7 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_7); Transform_t3600365921 * L_8 = Component_get_transform_m2921103810(L_7, /*hidden argument*/NULL); G_B6_0 = ((RectTransform_t3704657025 *)IsInstSealed(L_8, RectTransform_t3704657025_il2cpp_TypeInfo_var)); G_B6_1 = G_B5_0; } IL_005d: { NullCheck(G_B6_1); G_B6_1->set_m_VerticalScrollbarRect_35(G_B6_0); RectTransform_t3704657025 * L_9 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_9); Transform_t3600365921 * L_10 = Transform_get_parent_m1293647796(L_9, /*hidden argument*/NULL); Transform_t3600365921 * L_11 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_12 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL); V_1 = L_12; RectTransform_t3704657025 * L_13 = __this->get_m_HorizontalScrollbarRect_34(); bool L_14 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0097; } } { RectTransform_t3704657025 * L_15 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_15); Transform_t3600365921 * L_16 = Transform_get_parent_m1293647796(L_15, /*hidden argument*/NULL); Transform_t3600365921 * L_17 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_18 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_16, L_17, /*hidden argument*/NULL); G_B9_0 = ((int32_t)(L_18)); goto IL_0098; } IL_0097: { G_B9_0 = 1; } IL_0098: { V_2 = (bool)G_B9_0; RectTransform_t3704657025 * L_19 = __this->get_m_VerticalScrollbarRect_35(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_20 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_19, /*hidden argument*/NULL); if (!L_20) { goto IL_00bc; } } { RectTransform_t3704657025 * L_21 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_21); Transform_t3600365921 * L_22 = Transform_get_parent_m1293647796(L_21, /*hidden argument*/NULL); Transform_t3600365921 * L_23 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_24 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_22, L_23, /*hidden argument*/NULL); G_B12_0 = ((int32_t)(L_24)); goto IL_00bd; } IL_00bc: { G_B12_0 = 1; } IL_00bd: { V_3 = (bool)G_B12_0; bool L_25 = V_1; if (!L_25) { goto IL_00cd; } } { bool L_26 = V_2; if (!L_26) { goto IL_00cd; } } { bool L_27 = V_3; G_B16_0 = ((int32_t)(L_27)); goto IL_00ce; } IL_00cd: { G_B16_0 = 0; } IL_00ce: { V_4 = (bool)G_B16_0; bool L_28 = V_4; G_B17_0 = __this; if (!L_28) { G_B19_0 = __this; goto IL_00f3; } } { RectTransform_t3704657025 * L_29 = __this->get_m_HorizontalScrollbarRect_34(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_30 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_29, /*hidden argument*/NULL); G_B18_0 = G_B17_0; if (!L_30) { G_B19_0 = G_B17_0; goto IL_00f3; } } { int32_t L_31 = ScrollRect_get_horizontalScrollbarVisibility_m1341651705(__this, /*hidden argument*/NULL); G_B20_0 = ((((int32_t)L_31) == ((int32_t)2))? 1 : 0); G_B20_1 = G_B18_0; goto IL_00f4; } IL_00f3: { G_B20_0 = 0; G_B20_1 = G_B19_0; } IL_00f4: { NullCheck(G_B20_1); G_B20_1->set_m_HSliderExpand_29((bool)G_B20_0); bool L_32 = V_4; G_B21_0 = __this; if (!L_32) { G_B23_0 = __this; goto IL_011c; } } { RectTransform_t3704657025 * L_33 = __this->get_m_VerticalScrollbarRect_35(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_34 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_33, /*hidden argument*/NULL); G_B22_0 = G_B21_0; if (!L_34) { G_B23_0 = G_B21_0; goto IL_011c; } } { int32_t L_35 = ScrollRect_get_verticalScrollbarVisibility_m271142496(__this, /*hidden argument*/NULL); G_B24_0 = ((((int32_t)L_35) == ((int32_t)2))? 1 : 0); G_B24_1 = G_B22_0; goto IL_011d; } IL_011c: { G_B24_0 = 0; G_B24_1 = G_B23_0; } IL_011d: { NullCheck(G_B24_1); G_B24_1->set_m_VSliderExpand_30((bool)G_B24_0); RectTransform_t3704657025 * L_36 = __this->get_m_HorizontalScrollbarRect_34(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_37 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_36, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B25_0 = __this; if (!L_37) { G_B26_0 = __this; goto IL_013e; } } { G_B27_0 = (0.0f); G_B27_1 = G_B25_0; goto IL_0152; } IL_013e: { RectTransform_t3704657025 * L_38 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_38); Rect_t2360479859 L_39 = RectTransform_get_rect_m1643570810(L_38, /*hidden argument*/NULL); V_5 = L_39; float L_40 = Rect_get_height_m977101306((&V_5), /*hidden argument*/NULL); G_B27_0 = L_40; G_B27_1 = G_B26_0; } IL_0152: { NullCheck(G_B27_1); G_B27_1->set_m_HSliderHeight_31(G_B27_0); RectTransform_t3704657025 * L_41 = __this->get_m_VerticalScrollbarRect_35(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_42 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_41, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B28_0 = __this; if (!L_42) { G_B29_0 = __this; goto IL_0173; } } { G_B30_0 = (0.0f); G_B30_1 = G_B28_0; goto IL_0187; } IL_0173: { RectTransform_t3704657025 * L_43 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_43); Rect_t2360479859 L_44 = RectTransform_get_rect_m1643570810(L_43, /*hidden argument*/NULL); V_6 = L_44; float L_45 = Rect_get_width_m3421965717((&V_6), /*hidden argument*/NULL); G_B30_0 = L_45; G_B30_1 = G_B29_0; } IL_0187: { NullCheck(G_B30_1); G_B30_1->set_m_VSliderWidth_32(G_B30_0); return; } } // System.Void UnityEngine.UI.ScrollRect::OnEnable() extern "C" void ScrollRect_OnEnable_m3130111531 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_OnEnable_m3130111531_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UIBehaviour_OnEnable_m189051288(__this, /*hidden argument*/NULL); Scrollbar_t1494447233 * L_0 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0033; } } { Scrollbar_t1494447233 * L_2 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_2); ScrollEvent_t149898510 * L_3 = Scrollbar_get_onValueChanged_m2631583151(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m3159121919_MethodInfo_var); UnityAction_1_t1982102915 * L_5 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_3); UnityEvent_1_AddListener_m3008008915(L_3, L_5, /*hidden argument*/UnityEvent_1_AddListener_m3008008915_MethodInfo_var); } IL_0033: { Scrollbar_t1494447233 * L_6 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_7 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_005f; } } { Scrollbar_t1494447233 * L_8 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_8); ScrollEvent_t149898510 * L_9 = Scrollbar_get_onValueChanged_m2631583151(L_8, /*hidden argument*/NULL); IntPtr_t L_10; L_10.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3389719750_MethodInfo_var); UnityAction_1_t1982102915 * L_11 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_11, __this, L_10, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_9); UnityEvent_1_AddListener_m3008008915(L_9, L_11, /*hidden argument*/UnityEvent_1_AddListener_m3008008915_MethodInfo_var); } IL_005f: { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var); CanvasUpdateRegistry_RegisterCanvasElementForLayoutRebuild_m677454901(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::OnDisable() extern "C" void ScrollRect_OnDisable_m4255705644 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_OnDisable_m4255705644_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var); CanvasUpdateRegistry_UnRegisterCanvasElementForRebuild_m3652497192(NULL /*static, unused*/, __this, /*hidden argument*/NULL); Scrollbar_t1494447233 * L_0 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0033; } } { Scrollbar_t1494447233 * L_2 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_2); ScrollEvent_t149898510 * L_3 = Scrollbar_get_onValueChanged_m2631583151(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m3159121919_MethodInfo_var); UnityAction_1_t1982102915 * L_5 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_3); UnityEvent_1_RemoveListener_m4190968495(L_3, L_5, /*hidden argument*/UnityEvent_1_RemoveListener_m4190968495_MethodInfo_var); } IL_0033: { Scrollbar_t1494447233 * L_6 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_7 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_005f; } } { Scrollbar_t1494447233 * L_8 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_8); ScrollEvent_t149898510 * L_9 = Scrollbar_get_onValueChanged_m2631583151(L_8, /*hidden argument*/NULL); IntPtr_t L_10; L_10.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3389719750_MethodInfo_var); UnityAction_1_t1982102915 * L_11 = (UnityAction_1_t1982102915 *)il2cpp_codegen_object_new(UnityAction_1_t1982102915_il2cpp_TypeInfo_var); UnityAction_1__ctor_m336053009(L_11, __this, L_10, /*hidden argument*/UnityAction_1__ctor_m336053009_MethodInfo_var); NullCheck(L_9); UnityEvent_1_RemoveListener_m4190968495(L_9, L_11, /*hidden argument*/UnityEvent_1_RemoveListener_m4190968495_MethodInfo_var); } IL_005f: { __this->set_m_HasRebuiltLayout_28((bool)0); DrivenRectTransformTracker_t2562230146 * L_12 = __this->get_address_of_m_Tracker_36(); DrivenRectTransformTracker_Clear_m905140393(L_12, /*hidden argument*/NULL); Vector2_t2156229523 L_13 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_13); RectTransform_t3704657025 * L_14 = ScrollRect_get_rectTransform_m2442061719(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t541313304_il2cpp_TypeInfo_var); LayoutRebuilder_MarkLayoutForRebuild_m4080555610(NULL /*static, unused*/, L_14, /*hidden argument*/NULL); UIBehaviour_OnDisable_m1784507360(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ScrollRect::IsActive() extern "C" bool ScrollRect_IsActive_m2043120237 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_IsActive_m2043120237_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B3_0 = 0; { bool L_0 = UIBehaviour_IsActive_m3579119648(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_001a; } } { RectTransform_t3704657025 * L_1 = __this->get_m_Content_2(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B3_0 = ((int32_t)(L_2)); goto IL_001b; } IL_001a: { G_B3_0 = 0; } IL_001b: { V_0 = (bool)G_B3_0; goto IL_0021; } IL_0021: { bool L_3 = V_0; return L_3; } } // System.Void UnityEngine.UI.ScrollRect::EnsureLayoutHasRebuilt() extern "C" void ScrollRect_EnsureLayoutHasRebuilt_m3415112783 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_EnsureLayoutHasRebuilt_m3415112783_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = __this->get_m_HasRebuiltLayout_28(); if (L_0) { goto IL_001b; } } { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var); bool L_1 = CanvasUpdateRegistry_IsRebuildingLayout_m3530790142(NULL /*static, unused*/, /*hidden argument*/NULL); if (L_1) { goto IL_001b; } } { Canvas_ForceUpdateCanvases_m1969676771(NULL /*static, unused*/, /*hidden argument*/NULL); } IL_001b: { return; } } // System.Void UnityEngine.UI.ScrollRect::StopMovement() extern "C" void ScrollRect_StopMovement_m4294341396 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { Vector2_t2156229523 L_0 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_0); return; } } // System.Void UnityEngine.UI.ScrollRect::OnScroll(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnScroll_m3861066534 (ScrollRect_t4137855814 * __this, PointerEventData_t3807901092 * ___data0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_OnScroll_m3861066534_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0011; } } { goto IL_012b; } IL_0011: { ScrollRect_EnsureLayoutHasRebuilt_m3415112783(__this, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_1 = ___data0; NullCheck(L_1); Vector2_t2156229523 L_2 = PointerEventData_get_scrollDelta_m230480732(L_1, /*hidden argument*/NULL); V_0 = L_2; Vector2_t2156229523 * L_3 = (&V_0); float L_4 = L_3->get_y_1(); L_3->set_y_1(((float)((float)L_4*(float)(-1.0f)))); bool L_5 = ScrollRect_get_vertical_m3678635065(__this, /*hidden argument*/NULL); if (!L_5) { goto IL_0086; } } { bool L_6 = ScrollRect_get_horizontal_m4171218020(__this, /*hidden argument*/NULL); if (L_6) { goto IL_0086; } } { float L_7 = (&V_0)->get_x_0(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_8 = fabsf(L_7); float L_9 = (&V_0)->get_y_1(); float L_10 = fabsf(L_9); if ((!(((float)L_8) > ((float)L_10)))) { goto IL_0079; } } { float L_11 = (&V_0)->get_x_0(); (&V_0)->set_y_1(L_11); } IL_0079: { (&V_0)->set_x_0((0.0f)); } IL_0086: { bool L_12 = ScrollRect_get_horizontal_m4171218020(__this, /*hidden argument*/NULL); if (!L_12) { goto IL_00d5; } } { bool L_13 = ScrollRect_get_vertical_m3678635065(__this, /*hidden argument*/NULL); if (L_13) { goto IL_00d5; } } { float L_14 = (&V_0)->get_y_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_15 = fabsf(L_14); float L_16 = (&V_0)->get_x_0(); float L_17 = fabsf(L_16); if ((!(((float)L_15) > ((float)L_17)))) { goto IL_00c8; } } { float L_18 = (&V_0)->get_y_1(); (&V_0)->set_x_0(L_18); } IL_00c8: { (&V_0)->set_y_1((0.0f)); } IL_00d5: { RectTransform_t3704657025 * L_19 = __this->get_m_Content_2(); NullCheck(L_19); Vector2_t2156229523 L_20 = RectTransform_get_anchoredPosition_m287009682(L_19, /*hidden argument*/NULL); V_1 = L_20; Vector2_t2156229523 L_21 = V_1; Vector2_t2156229523 L_22 = V_0; float L_23 = __this->get_m_ScrollSensitivity_9(); Vector2_t2156229523 L_24 = Vector2_op_Multiply_m1889160058(NULL /*static, unused*/, L_22, L_23, /*hidden argument*/NULL); Vector2_t2156229523 L_25 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_21, L_24, /*hidden argument*/NULL); V_1 = L_25; int32_t L_26 = __this->get_m_MovementType_5(); if ((!(((uint32_t)L_26) == ((uint32_t)2)))) { goto IL_011e; } } { Vector2_t2156229523 L_27 = V_1; Vector2_t2156229523 L_28 = V_1; RectTransform_t3704657025 * L_29 = __this->get_m_Content_2(); NullCheck(L_29); Vector2_t2156229523 L_30 = RectTransform_get_anchoredPosition_m287009682(L_29, /*hidden argument*/NULL); Vector2_t2156229523 L_31 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_28, L_30, /*hidden argument*/NULL); Vector2_t2156229523 L_32 = ScrollRect_CalculateOffset_m927043599(__this, L_31, /*hidden argument*/NULL); Vector2_t2156229523 L_33 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_27, L_32, /*hidden argument*/NULL); V_1 = L_33; } IL_011e: { Vector2_t2156229523 L_34 = V_1; VirtActionInvoker1< Vector2_t2156229523 >::Invoke(47 /* System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) */, __this, L_34); ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); } IL_012b: { return; } } // System.Void UnityEngine.UI.ScrollRect::OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnInitializePotentialDrag_m3139711961 (ScrollRect_t4137855814 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_001c; } IL_0011: { Vector2_t2156229523 L_2 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_2); } IL_001c: { return; } } // System.Void UnityEngine.UI.ScrollRect::OnBeginDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnBeginDrag_m1222709073 (ScrollRect_t4137855814 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_OnBeginDrag_m1222709073_MetadataUsageId); s_Il2CppMethodInitialized = true; } { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_0068; } IL_0011: { bool L_2 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_2) { goto IL_0021; } } { goto IL_0068; } IL_0021: { ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_3 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PointerStartLocalCursor_18(L_3); RectTransform_t3704657025 * L_4 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_5 = ___eventData0; NullCheck(L_5); Vector2_t2156229523 L_6 = PointerEventData_get_position_m437660275(L_5, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_7 = ___eventData0; NullCheck(L_7); Camera_t4157153871 * L_8 = PointerEventData_get_pressEventCamera_m2613974917(L_7, /*hidden argument*/NULL); Vector2_t2156229523 * L_9 = __this->get_address_of_m_PointerStartLocalCursor_18(); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_4, L_6, L_8, L_9, /*hidden argument*/NULL); RectTransform_t3704657025 * L_10 = __this->get_m_Content_2(); NullCheck(L_10); Vector2_t2156229523 L_11 = RectTransform_get_anchoredPosition_m287009682(L_10, /*hidden argument*/NULL); __this->set_m_ContentStartPosition_19(L_11); __this->set_m_Dragging_24((bool)1); } IL_0068: { return; } } // System.Void UnityEngine.UI.ScrollRect::OnEndDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnEndDrag_m3202230060 (ScrollRect_t4137855814 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_0018; } IL_0011: { __this->set_m_Dragging_24((bool)0); } IL_0018: { return; } } // System.Void UnityEngine.UI.ScrollRect::OnDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnDrag_m688583138 (ScrollRect_t4137855814 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_OnDrag_m688583138_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t3722313464 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t3722313464 V_5; memset(&V_5, 0, sizeof(V_5)); { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_0119; } IL_0011: { bool L_2 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_2) { goto IL_0021; } } { goto IL_0119; } IL_0021: { RectTransform_t3704657025 * L_3 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_4 = ___eventData0; NullCheck(L_4); Vector2_t2156229523 L_5 = PointerEventData_get_position_m437660275(L_4, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_6 = ___eventData0; NullCheck(L_6); Camera_t4157153871 * L_7 = PointerEventData_get_pressEventCamera_m2613974917(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_8 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_3, L_5, L_7, (&V_0), /*hidden argument*/NULL); if (L_8) { goto IL_0044; } } { goto IL_0119; } IL_0044: { ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_9 = V_0; Vector2_t2156229523 L_10 = __this->get_m_PointerStartLocalCursor_18(); Vector2_t2156229523 L_11 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); V_1 = L_11; Vector2_t2156229523 L_12 = __this->get_m_ContentStartPosition_19(); Vector2_t2156229523 L_13 = V_1; Vector2_t2156229523 L_14 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL); V_2 = L_14; Vector2_t2156229523 L_15 = V_2; RectTransform_t3704657025 * L_16 = __this->get_m_Content_2(); NullCheck(L_16); Vector2_t2156229523 L_17 = RectTransform_get_anchoredPosition_m287009682(L_16, /*hidden argument*/NULL); Vector2_t2156229523 L_18 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_15, L_17, /*hidden argument*/NULL); Vector2_t2156229523 L_19 = ScrollRect_CalculateOffset_m927043599(__this, L_18, /*hidden argument*/NULL); V_3 = L_19; Vector2_t2156229523 L_20 = V_2; Vector2_t2156229523 L_21 = V_3; Vector2_t2156229523 L_22 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_20, L_21, /*hidden argument*/NULL); V_2 = L_22; int32_t L_23 = __this->get_m_MovementType_5(); if ((!(((uint32_t)L_23) == ((uint32_t)1)))) { goto IL_0112; } } { float L_24 = (&V_3)->get_x_0(); if ((((float)L_24) == ((float)(0.0f)))) { goto IL_00d1; } } { float L_25 = (&V_2)->get_x_0(); float L_26 = (&V_3)->get_x_0(); Bounds_t2266837910 * L_27 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_28 = Bounds_get_size_m1171376090(L_27, /*hidden argument*/NULL); V_4 = L_28; float L_29 = (&V_4)->get_x_1(); float L_30 = ScrollRect_RubberDelta_m3597626447(NULL /*static, unused*/, L_26, L_29, /*hidden argument*/NULL); (&V_2)->set_x_0(((float)((float)L_25-(float)L_30))); } IL_00d1: { float L_31 = (&V_3)->get_y_1(); if ((((float)L_31) == ((float)(0.0f)))) { goto IL_0111; } } { float L_32 = (&V_2)->get_y_1(); float L_33 = (&V_3)->get_y_1(); Bounds_t2266837910 * L_34 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_35 = Bounds_get_size_m1171376090(L_34, /*hidden argument*/NULL); V_5 = L_35; float L_36 = (&V_5)->get_y_2(); float L_37 = ScrollRect_RubberDelta_m3597626447(NULL /*static, unused*/, L_33, L_36, /*hidden argument*/NULL); (&V_2)->set_y_1(((float)((float)L_32-(float)L_37))); } IL_0111: { } IL_0112: { Vector2_t2156229523 L_38 = V_2; VirtActionInvoker1< Vector2_t2156229523 >::Invoke(47 /* System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) */, __this, L_38); } IL_0119: { return; } } // System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) extern "C" void ScrollRect_SetContentAnchoredPosition_m3848867294 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___position0, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); { bool L_0 = __this->get_m_Horizontal_3(); if (L_0) { goto IL_0026; } } { RectTransform_t3704657025 * L_1 = __this->get_m_Content_2(); NullCheck(L_1); Vector2_t2156229523 L_2 = RectTransform_get_anchoredPosition_m287009682(L_1, /*hidden argument*/NULL); V_0 = L_2; float L_3 = (&V_0)->get_x_0(); (&___position0)->set_x_0(L_3); } IL_0026: { bool L_4 = __this->get_m_Vertical_4(); if (L_4) { goto IL_004b; } } { RectTransform_t3704657025 * L_5 = __this->get_m_Content_2(); NullCheck(L_5); Vector2_t2156229523 L_6 = RectTransform_get_anchoredPosition_m287009682(L_5, /*hidden argument*/NULL); V_1 = L_6; float L_7 = (&V_1)->get_y_1(); (&___position0)->set_y_1(L_7); } IL_004b: { Vector2_t2156229523 L_8 = ___position0; RectTransform_t3704657025 * L_9 = __this->get_m_Content_2(); NullCheck(L_9); Vector2_t2156229523 L_10 = RectTransform_get_anchoredPosition_m287009682(L_9, /*hidden argument*/NULL); bool L_11 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_8, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0075; } } { RectTransform_t3704657025 * L_12 = __this->get_m_Content_2(); Vector2_t2156229523 L_13 = ___position0; NullCheck(L_12); RectTransform_set_anchoredPosition_m1454079598(L_12, L_13, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); } IL_0075: { return; } } // System.Void UnityEngine.UI.ScrollRect::LateUpdate() extern "C" void ScrollRect_LateUpdate_m1215231183 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_LateUpdate_m1215231183_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); int32_t V_3 = 0; float V_4 = 0.0f; Vector2_t2156229523 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t2156229523 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t2156229523 * V_7 = NULL; int32_t V_8 = 0; int32_t V_9 = 0; Vector3_t3722313464 V_10; memset(&V_10, 0, sizeof(V_10)); { RectTransform_t3704657025 * L_0 = __this->get_m_Content_2(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0016; } } { goto IL_02e4; } IL_0016: { ScrollRect_EnsureLayoutHasRebuilt_m3415112783(__this, /*hidden argument*/NULL); ScrollRect_UpdateScrollbarVisibility_m4226977273(__this, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); float L_2 = Time_get_unscaledDeltaTime_m3673896426(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_2; Vector2_t2156229523 L_3 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); Vector2_t2156229523 L_4 = ScrollRect_CalculateOffset_m927043599(__this, L_3, /*hidden argument*/NULL); V_1 = L_4; bool L_5 = __this->get_m_Dragging_24(); if (L_5) { goto IL_021e; } } { Vector2_t2156229523 L_6 = V_1; Vector2_t2156229523 L_7 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_8 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL); if (L_8) { goto IL_006a; } } { Vector2_t2156229523 L_9 = __this->get_m_Velocity_23(); Vector2_t2156229523 L_10 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_11 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_021e; } } IL_006a: { RectTransform_t3704657025 * L_12 = __this->get_m_Content_2(); NullCheck(L_12); Vector2_t2156229523 L_13 = RectTransform_get_anchoredPosition_m287009682(L_12, /*hidden argument*/NULL); V_2 = L_13; V_3 = 0; goto IL_01ca; } IL_007e: { int32_t L_14 = __this->get_m_MovementType_5(); if ((!(((uint32_t)L_14) == ((uint32_t)1)))) { goto IL_0126; } } { int32_t L_15 = V_3; float L_16 = Vector2_get_Item_m3129197029((&V_1), L_15, /*hidden argument*/NULL); if ((((float)L_16) == ((float)(0.0f)))) { goto IL_0126; } } { Vector2_t2156229523 * L_17 = __this->get_address_of_m_Velocity_23(); int32_t L_18 = V_3; float L_19 = Vector2_get_Item_m3129197029(L_17, L_18, /*hidden argument*/NULL); V_4 = L_19; int32_t L_20 = V_3; RectTransform_t3704657025 * L_21 = __this->get_m_Content_2(); NullCheck(L_21); Vector2_t2156229523 L_22 = RectTransform_get_anchoredPosition_m287009682(L_21, /*hidden argument*/NULL); V_5 = L_22; int32_t L_23 = V_3; float L_24 = Vector2_get_Item_m3129197029((&V_5), L_23, /*hidden argument*/NULL); RectTransform_t3704657025 * L_25 = __this->get_m_Content_2(); NullCheck(L_25); Vector2_t2156229523 L_26 = RectTransform_get_anchoredPosition_m287009682(L_25, /*hidden argument*/NULL); V_6 = L_26; int32_t L_27 = V_3; float L_28 = Vector2_get_Item_m3129197029((&V_6), L_27, /*hidden argument*/NULL); int32_t L_29 = V_3; float L_30 = Vector2_get_Item_m3129197029((&V_1), L_29, /*hidden argument*/NULL); float L_31 = __this->get_m_Elasticity_6(); float L_32 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_33 = Mathf_SmoothDamp_m1005916951(NULL /*static, unused*/, L_24, ((float)((float)L_28+(float)L_30)), (&V_4), L_31, (std::numeric_limits<float>::infinity()), L_32, /*hidden argument*/NULL); Vector2_set_Item_m1664083694((&V_2), L_20, L_33, /*hidden argument*/NULL); float L_34 = V_4; float L_35 = fabsf(L_34); if ((!(((float)L_35) < ((float)(1.0f))))) { goto IL_0112; } } { V_4 = (0.0f); } IL_0112: { Vector2_t2156229523 * L_36 = __this->get_address_of_m_Velocity_23(); int32_t L_37 = V_3; float L_38 = V_4; Vector2_set_Item_m1664083694(L_36, L_37, L_38, /*hidden argument*/NULL); goto IL_01c5; } IL_0126: { bool L_39 = __this->get_m_Inertia_7(); if (!L_39) { goto IL_01b2; } } { Vector2_t2156229523 * L_40 = __this->get_address_of_m_Velocity_23(); Vector2_t2156229523 * L_41 = L_40; V_7 = (Vector2_t2156229523 *)L_41; int32_t L_42 = V_3; int32_t L_43 = L_42; V_8 = L_43; Vector2_t2156229523 * L_44 = V_7; int32_t L_45 = V_8; float L_46 = Vector2_get_Item_m3129197029(L_44, L_45, /*hidden argument*/NULL); float L_47 = __this->get_m_DecelerationRate_8(); float L_48 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_49 = powf(L_47, L_48); Vector2_set_Item_m1664083694(L_41, L_43, ((float)((float)L_46*(float)L_49)), /*hidden argument*/NULL); Vector2_t2156229523 * L_50 = __this->get_address_of_m_Velocity_23(); int32_t L_51 = V_3; float L_52 = Vector2_get_Item_m3129197029(L_50, L_51, /*hidden argument*/NULL); float L_53 = fabsf(L_52); if ((!(((float)L_53) < ((float)(1.0f))))) { goto IL_0186; } } { Vector2_t2156229523 * L_54 = __this->get_address_of_m_Velocity_23(); int32_t L_55 = V_3; Vector2_set_Item_m1664083694(L_54, L_55, (0.0f), /*hidden argument*/NULL); } IL_0186: { Vector2_t2156229523 * L_56 = (&V_2); V_7 = (Vector2_t2156229523 *)L_56; int32_t L_57 = V_3; int32_t L_58 = L_57; V_9 = L_58; Vector2_t2156229523 * L_59 = V_7; int32_t L_60 = V_9; float L_61 = Vector2_get_Item_m3129197029(L_59, L_60, /*hidden argument*/NULL); Vector2_t2156229523 * L_62 = __this->get_address_of_m_Velocity_23(); int32_t L_63 = V_3; float L_64 = Vector2_get_Item_m3129197029(L_62, L_63, /*hidden argument*/NULL); float L_65 = V_0; Vector2_set_Item_m1664083694(L_56, L_58, ((float)((float)L_61+(float)((float)((float)L_64*(float)L_65)))), /*hidden argument*/NULL); goto IL_01c5; } IL_01b2: { Vector2_t2156229523 * L_66 = __this->get_address_of_m_Velocity_23(); int32_t L_67 = V_3; Vector2_set_Item_m1664083694(L_66, L_67, (0.0f), /*hidden argument*/NULL); } IL_01c5: { int32_t L_68 = V_3; V_3 = ((int32_t)((int32_t)L_68+(int32_t)1)); } IL_01ca: { int32_t L_69 = V_3; if ((((int32_t)L_69) < ((int32_t)2))) { goto IL_007e; } } { Vector2_t2156229523 L_70 = __this->get_m_Velocity_23(); Vector2_t2156229523 L_71 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_72 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_70, L_71, /*hidden argument*/NULL); if (!L_72) { goto IL_021d; } } { int32_t L_73 = __this->get_m_MovementType_5(); if ((!(((uint32_t)L_73) == ((uint32_t)2)))) { goto IL_0215; } } { Vector2_t2156229523 L_74 = V_2; RectTransform_t3704657025 * L_75 = __this->get_m_Content_2(); NullCheck(L_75); Vector2_t2156229523 L_76 = RectTransform_get_anchoredPosition_m287009682(L_75, /*hidden argument*/NULL); Vector2_t2156229523 L_77 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_74, L_76, /*hidden argument*/NULL); Vector2_t2156229523 L_78 = ScrollRect_CalculateOffset_m927043599(__this, L_77, /*hidden argument*/NULL); V_1 = L_78; Vector2_t2156229523 L_79 = V_2; Vector2_t2156229523 L_80 = V_1; Vector2_t2156229523 L_81 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_79, L_80, /*hidden argument*/NULL); V_2 = L_81; } IL_0215: { Vector2_t2156229523 L_82 = V_2; VirtActionInvoker1< Vector2_t2156229523 >::Invoke(47 /* System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) */, __this, L_82); } IL_021d: { } IL_021e: { bool L_83 = __this->get_m_Dragging_24(); if (!L_83) { goto IL_027d; } } { bool L_84 = __this->get_m_Inertia_7(); if (!L_84) { goto IL_027d; } } { RectTransform_t3704657025 * L_85 = __this->get_m_Content_2(); NullCheck(L_85); Vector2_t2156229523 L_86 = RectTransform_get_anchoredPosition_m287009682(L_85, /*hidden argument*/NULL); Vector2_t2156229523 L_87 = __this->get_m_PrevPosition_25(); Vector2_t2156229523 L_88 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_86, L_87, /*hidden argument*/NULL); float L_89 = V_0; Vector2_t2156229523 L_90 = Vector2_op_Division_m1480625254(NULL /*static, unused*/, L_88, L_89, /*hidden argument*/NULL); Vector3_t3722313464 L_91 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_90, /*hidden argument*/NULL); V_10 = L_91; Vector2_t2156229523 L_92 = __this->get_m_Velocity_23(); Vector3_t3722313464 L_93 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_92, /*hidden argument*/NULL); Vector3_t3722313464 L_94 = V_10; float L_95 = V_0; Vector3_t3722313464 L_96 = Vector3_Lerp_m61516199(NULL /*static, unused*/, L_93, L_94, ((float)((float)L_95*(float)(10.0f))), /*hidden argument*/NULL); Vector2_t2156229523 L_97 = Vector2_op_Implicit_m1304503157(NULL /*static, unused*/, L_96, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_97); } IL_027d: { Bounds_t2266837910 L_98 = __this->get_m_ViewBounds_22(); Bounds_t2266837910 L_99 = __this->get_m_PrevViewBounds_27(); bool L_100 = Bounds_op_Inequality_m4034488270(NULL /*static, unused*/, L_98, L_99, /*hidden argument*/NULL); if (L_100) { goto IL_02c4; } } { Bounds_t2266837910 L_101 = __this->get_m_ContentBounds_21(); Bounds_t2266837910 L_102 = __this->get_m_PrevContentBounds_26(); bool L_103 = Bounds_op_Inequality_m4034488270(NULL /*static, unused*/, L_101, L_102, /*hidden argument*/NULL); if (L_103) { goto IL_02c4; } } { RectTransform_t3704657025 * L_104 = __this->get_m_Content_2(); NullCheck(L_104); Vector2_t2156229523 L_105 = RectTransform_get_anchoredPosition_m287009682(L_104, /*hidden argument*/NULL); Vector2_t2156229523 L_106 = __this->get_m_PrevPosition_25(); bool L_107 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_105, L_106, /*hidden argument*/NULL); if (!L_107) { goto IL_02e4; } } IL_02c4: { Vector2_t2156229523 L_108 = V_1; ScrollRect_UpdateScrollbars_m4146077522(__this, L_108, /*hidden argument*/NULL); ScrollRectEvent_t343079324 * L_109 = __this->get_m_OnValueChanged_17(); Vector2_t2156229523 L_110 = ScrollRect_get_normalizedPosition_m396145690(__this, /*hidden argument*/NULL); NullCheck(L_109); UnityEvent_1_Invoke_m3432495026(L_109, L_110, /*hidden argument*/UnityEvent_1_Invoke_m3432495026_MethodInfo_var); ScrollRect_UpdatePrevData_m4009119607(__this, /*hidden argument*/NULL); } IL_02e4: { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdatePrevData() extern "C" void ScrollRect_UpdatePrevData_m4009119607 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdatePrevData_m4009119607_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t3704657025 * L_0 = __this->get_m_Content_2(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0022; } } { Vector2_t2156229523 L_2 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PrevPosition_25(L_2); goto IL_0033; } IL_0022: { RectTransform_t3704657025 * L_3 = __this->get_m_Content_2(); NullCheck(L_3); Vector2_t2156229523 L_4 = RectTransform_get_anchoredPosition_m287009682(L_3, /*hidden argument*/NULL); __this->set_m_PrevPosition_25(L_4); } IL_0033: { Bounds_t2266837910 L_5 = __this->get_m_ViewBounds_22(); __this->set_m_PrevViewBounds_27(L_5); Bounds_t2266837910 L_6 = __this->get_m_ContentBounds_21(); __this->set_m_PrevContentBounds_26(L_6); return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbars(UnityEngine.Vector2) extern "C" void ScrollRect_UpdateScrollbars_m4146077522 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___offset0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateScrollbars_m4146077522_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t3722313464 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t3722313464 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t3722313464 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t3722313464 V_5; memset(&V_5, 0, sizeof(V_5)); { Scrollbar_t1494447233 * L_0 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_009a; } } { Bounds_t2266837910 * L_2 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_3 = Bounds_get_size_m1171376090(L_2, /*hidden argument*/NULL); V_0 = L_3; float L_4 = (&V_0)->get_x_1(); if ((!(((float)L_4) > ((float)(0.0f))))) { goto IL_0078; } } { Scrollbar_t1494447233 * L_5 = __this->get_m_HorizontalScrollbar_11(); Bounds_t2266837910 * L_6 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_7 = Bounds_get_size_m1171376090(L_6, /*hidden argument*/NULL); V_1 = L_7; float L_8 = (&V_1)->get_x_1(); float L_9 = (&___offset0)->get_x_0(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_10 = fabsf(L_9); Bounds_t2266837910 * L_11 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_12 = Bounds_get_size_m1171376090(L_11, /*hidden argument*/NULL); V_2 = L_12; float L_13 = (&V_2)->get_x_1(); float L_14 = Mathf_Clamp01_m4133291925(NULL /*static, unused*/, ((float)((float)((float)((float)L_8-(float)L_10))/(float)L_13)), /*hidden argument*/NULL); NullCheck(L_5); Scrollbar_set_size_m4256339911(L_5, L_14, /*hidden argument*/NULL); goto IL_0088; } IL_0078: { Scrollbar_t1494447233 * L_15 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_15); Scrollbar_set_size_m4256339911(L_15, (1.0f), /*hidden argument*/NULL); } IL_0088: { Scrollbar_t1494447233 * L_16 = __this->get_m_HorizontalScrollbar_11(); float L_17 = ScrollRect_get_horizontalNormalizedPosition_m2904015963(__this, /*hidden argument*/NULL); NullCheck(L_16); Scrollbar_set_value_m2277767288(L_16, L_17, /*hidden argument*/NULL); } IL_009a: { Scrollbar_t1494447233 * L_18 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_19 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_18, /*hidden argument*/NULL); if (!L_19) { goto IL_0135; } } { Bounds_t2266837910 * L_20 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_21 = Bounds_get_size_m1171376090(L_20, /*hidden argument*/NULL); V_3 = L_21; float L_22 = (&V_3)->get_y_2(); if ((!(((float)L_22) > ((float)(0.0f))))) { goto IL_0113; } } { Scrollbar_t1494447233 * L_23 = __this->get_m_VerticalScrollbar_12(); Bounds_t2266837910 * L_24 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_25 = Bounds_get_size_m1171376090(L_24, /*hidden argument*/NULL); V_4 = L_25; float L_26 = (&V_4)->get_y_2(); float L_27 = (&___offset0)->get_y_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_28 = fabsf(L_27); Bounds_t2266837910 * L_29 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_30 = Bounds_get_size_m1171376090(L_29, /*hidden argument*/NULL); V_5 = L_30; float L_31 = (&V_5)->get_y_2(); float L_32 = Mathf_Clamp01_m4133291925(NULL /*static, unused*/, ((float)((float)((float)((float)L_26-(float)L_28))/(float)L_31)), /*hidden argument*/NULL); NullCheck(L_23); Scrollbar_set_size_m4256339911(L_23, L_32, /*hidden argument*/NULL); goto IL_0123; } IL_0113: { Scrollbar_t1494447233 * L_33 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_33); Scrollbar_set_size_m4256339911(L_33, (1.0f), /*hidden argument*/NULL); } IL_0123: { Scrollbar_t1494447233 * L_34 = __this->get_m_VerticalScrollbar_12(); float L_35 = ScrollRect_get_verticalNormalizedPosition_m3693218937(__this, /*hidden argument*/NULL); NullCheck(L_34); Scrollbar_set_value_m2277767288(L_34, L_35, /*hidden argument*/NULL); } IL_0135: { return; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::get_normalizedPosition() extern "C" Vector2_t2156229523 ScrollRect_get_normalizedPosition_m396145690 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); { float L_0 = ScrollRect_get_horizontalNormalizedPosition_m2904015963(__this, /*hidden argument*/NULL); float L_1 = ScrollRect_get_verticalNormalizedPosition_m3693218937(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_2; memset(&L_2, 0, sizeof(L_2)); Vector2__ctor_m4060800441(&L_2, L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_0018; } IL_0018: { Vector2_t2156229523 L_3 = V_0; return L_3; } } // System.Void UnityEngine.UI.ScrollRect::set_normalizedPosition(UnityEngine.Vector2) extern "C" void ScrollRect_set_normalizedPosition_m692414573 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___value0, const MethodInfo* method) { { float L_0 = (&___value0)->get_x_0(); VirtActionInvoker2< float, int32_t >::Invoke(49 /* System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) */, __this, L_0, 0); float L_1 = (&___value0)->get_y_1(); VirtActionInvoker2< float, int32_t >::Invoke(49 /* System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) */, __this, L_1, 1); return; } } // System.Single UnityEngine.UI.ScrollRect::get_horizontalNormalizedPosition() extern "C" float ScrollRect_get_horizontalNormalizedPosition_m2904015963 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t3722313464 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t3722313464 V_3; memset(&V_3, 0, sizeof(V_3)); float V_4 = 0.0f; Vector3_t3722313464 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t3722313464 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t3722313464 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t3722313464 V_8; memset(&V_8, 0, sizeof(V_8)); int32_t G_B4_0 = 0; { ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); Bounds_t2266837910 * L_0 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_1 = Bounds_get_size_m1171376090(L_0, /*hidden argument*/NULL); V_0 = L_1; float L_2 = (&V_0)->get_x_1(); Bounds_t2266837910 * L_3 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_4 = Bounds_get_size_m1171376090(L_3, /*hidden argument*/NULL); V_1 = L_4; float L_5 = (&V_1)->get_x_1(); if ((!(((float)L_2) <= ((float)L_5)))) { goto IL_006c; } } { Bounds_t2266837910 * L_6 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_7 = Bounds_get_min_m1736091801(L_6, /*hidden argument*/NULL); V_2 = L_7; float L_8 = (&V_2)->get_x_1(); Bounds_t2266837910 * L_9 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_10 = Bounds_get_min_m1736091801(L_9, /*hidden argument*/NULL); V_3 = L_10; float L_11 = (&V_3)->get_x_1(); if ((!(((float)L_8) > ((float)L_11)))) { goto IL_0063; } } { G_B4_0 = 1; goto IL_0064; } IL_0063: { G_B4_0 = 0; } IL_0064: { V_4 = (((float)((float)G_B4_0))); goto IL_00c6; } IL_006c: { Bounds_t2266837910 * L_12 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_13 = Bounds_get_min_m1736091801(L_12, /*hidden argument*/NULL); V_5 = L_13; float L_14 = (&V_5)->get_x_1(); Bounds_t2266837910 * L_15 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_16 = Bounds_get_min_m1736091801(L_15, /*hidden argument*/NULL); V_6 = L_16; float L_17 = (&V_6)->get_x_1(); Bounds_t2266837910 * L_18 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_19 = Bounds_get_size_m1171376090(L_18, /*hidden argument*/NULL); V_7 = L_19; float L_20 = (&V_7)->get_x_1(); Bounds_t2266837910 * L_21 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_22 = Bounds_get_size_m1171376090(L_21, /*hidden argument*/NULL); V_8 = L_22; float L_23 = (&V_8)->get_x_1(); V_4 = ((float)((float)((float)((float)L_14-(float)L_17))/(float)((float)((float)L_20-(float)L_23)))); goto IL_00c6; } IL_00c6: { float L_24 = V_4; return L_24; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalNormalizedPosition(System.Single) extern "C" void ScrollRect_set_horizontalNormalizedPosition_m1066708424 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; VirtActionInvoker2< float, int32_t >::Invoke(49 /* System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) */, __this, L_0, 0); return; } } // System.Single UnityEngine.UI.ScrollRect::get_verticalNormalizedPosition() extern "C" float ScrollRect_get_verticalNormalizedPosition_m3693218937 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t3722313464 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t3722313464 V_3; memset(&V_3, 0, sizeof(V_3)); float V_4 = 0.0f; Vector3_t3722313464 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t3722313464 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t3722313464 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t3722313464 V_8; memset(&V_8, 0, sizeof(V_8)); int32_t G_B4_0 = 0; { ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); Bounds_t2266837910 * L_0 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_1 = Bounds_get_size_m1171376090(L_0, /*hidden argument*/NULL); V_0 = L_1; float L_2 = (&V_0)->get_y_2(); Bounds_t2266837910 * L_3 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_4 = Bounds_get_size_m1171376090(L_3, /*hidden argument*/NULL); V_1 = L_4; float L_5 = (&V_1)->get_y_2(); if ((!(((float)L_2) <= ((float)L_5)))) { goto IL_006c; } } { Bounds_t2266837910 * L_6 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_7 = Bounds_get_min_m1736091801(L_6, /*hidden argument*/NULL); V_2 = L_7; float L_8 = (&V_2)->get_y_2(); Bounds_t2266837910 * L_9 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_10 = Bounds_get_min_m1736091801(L_9, /*hidden argument*/NULL); V_3 = L_10; float L_11 = (&V_3)->get_y_2(); if ((!(((float)L_8) > ((float)L_11)))) { goto IL_0063; } } { G_B4_0 = 1; goto IL_0064; } IL_0063: { G_B4_0 = 0; } IL_0064: { V_4 = (((float)((float)G_B4_0))); goto IL_00c6; } IL_006c: { Bounds_t2266837910 * L_12 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_13 = Bounds_get_min_m1736091801(L_12, /*hidden argument*/NULL); V_5 = L_13; float L_14 = (&V_5)->get_y_2(); Bounds_t2266837910 * L_15 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_16 = Bounds_get_min_m1736091801(L_15, /*hidden argument*/NULL); V_6 = L_16; float L_17 = (&V_6)->get_y_2(); Bounds_t2266837910 * L_18 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_19 = Bounds_get_size_m1171376090(L_18, /*hidden argument*/NULL); V_7 = L_19; float L_20 = (&V_7)->get_y_2(); Bounds_t2266837910 * L_21 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_22 = Bounds_get_size_m1171376090(L_21, /*hidden argument*/NULL); V_8 = L_22; float L_23 = (&V_8)->get_y_2(); V_4 = ((float)((float)((float)((float)L_14-(float)L_17))/(float)((float)((float)L_20-(float)L_23)))); goto IL_00c6; } IL_00c6: { float L_24 = V_4; return L_24; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalNormalizedPosition(System.Single) extern "C" void ScrollRect_set_verticalNormalizedPosition_m1452826170 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; VirtActionInvoker2< float, int32_t >::Invoke(49 /* System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) */, __this, L_0, 1); return; } } // System.Void UnityEngine.UI.ScrollRect::SetHorizontalNormalizedPosition(System.Single) extern "C" void ScrollRect_SetHorizontalNormalizedPosition_m3159121919 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; VirtActionInvoker2< float, int32_t >::Invoke(49 /* System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) */, __this, L_0, 0); return; } } // System.Void UnityEngine.UI.ScrollRect::SetVerticalNormalizedPosition(System.Single) extern "C" void ScrollRect_SetVerticalNormalizedPosition_m3389719750 (ScrollRect_t4137855814 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; VirtActionInvoker2< float, int32_t >::Invoke(49 /* System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) */, __this, L_0, 1); return; } } // System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) extern "C" void ScrollRect_SetNormalizedPosition_m3260907438 (ScrollRect_t4137855814 * __this, float ___value0, int32_t ___axis1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_SetNormalizedPosition_m3260907438_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t3722313464 V_2; memset(&V_2, 0, sizeof(V_2)); float V_3 = 0.0f; Vector3_t3722313464 V_4; memset(&V_4, 0, sizeof(V_4)); float V_5 = 0.0f; Vector3_t3722313464 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t3722313464 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t3722313464 V_8; memset(&V_8, 0, sizeof(V_8)); { ScrollRect_EnsureLayoutHasRebuilt_m3415112783(__this, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); Bounds_t2266837910 * L_0 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_1 = Bounds_get_size_m1171376090(L_0, /*hidden argument*/NULL); V_1 = L_1; int32_t L_2 = ___axis1; float L_3 = Vector3_get_Item_m165790779((&V_1), L_2, /*hidden argument*/NULL); Bounds_t2266837910 * L_4 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_5 = Bounds_get_size_m1171376090(L_4, /*hidden argument*/NULL); V_2 = L_5; int32_t L_6 = ___axis1; float L_7 = Vector3_get_Item_m165790779((&V_2), L_6, /*hidden argument*/NULL); V_0 = ((float)((float)L_3-(float)L_7)); Bounds_t2266837910 * L_8 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_9 = Bounds_get_min_m1736091801(L_8, /*hidden argument*/NULL); V_4 = L_9; int32_t L_10 = ___axis1; float L_11 = Vector3_get_Item_m165790779((&V_4), L_10, /*hidden argument*/NULL); float L_12 = ___value0; float L_13 = V_0; V_3 = ((float)((float)L_11-(float)((float)((float)L_12*(float)L_13)))); RectTransform_t3704657025 * L_14 = __this->get_m_Content_2(); NullCheck(L_14); Vector3_t3722313464 L_15 = Transform_get_localPosition_m265057664(L_14, /*hidden argument*/NULL); V_6 = L_15; int32_t L_16 = ___axis1; float L_17 = Vector3_get_Item_m165790779((&V_6), L_16, /*hidden argument*/NULL); float L_18 = V_3; Bounds_t2266837910 * L_19 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_20 = Bounds_get_min_m1736091801(L_19, /*hidden argument*/NULL); V_7 = L_20; int32_t L_21 = ___axis1; float L_22 = Vector3_get_Item_m165790779((&V_7), L_21, /*hidden argument*/NULL); V_5 = ((float)((float)((float)((float)L_17+(float)L_18))-(float)L_22)); RectTransform_t3704657025 * L_23 = __this->get_m_Content_2(); NullCheck(L_23); Vector3_t3722313464 L_24 = Transform_get_localPosition_m265057664(L_23, /*hidden argument*/NULL); V_8 = L_24; int32_t L_25 = ___axis1; float L_26 = Vector3_get_Item_m165790779((&V_8), L_25, /*hidden argument*/NULL); float L_27 = V_5; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_28 = fabsf(((float)((float)L_26-(float)L_27))); if ((!(((float)L_28) > ((float)(0.01f))))) { goto IL_00d7; } } { int32_t L_29 = ___axis1; float L_30 = V_5; Vector3_set_Item_m906731916((&V_8), L_29, L_30, /*hidden argument*/NULL); RectTransform_t3704657025 * L_31 = __this->get_m_Content_2(); Vector3_t3722313464 L_32 = V_8; NullCheck(L_31); Transform_set_localPosition_m3327877514(L_31, L_32, /*hidden argument*/NULL); Vector2_t2156229523 * L_33 = __this->get_address_of_m_Velocity_23(); int32_t L_34 = ___axis1; Vector2_set_Item_m1664083694(L_33, L_34, (0.0f), /*hidden argument*/NULL); ScrollRect_UpdateBounds_m359586673(__this, /*hidden argument*/NULL); } IL_00d7: { return; } } // System.Single UnityEngine.UI.ScrollRect::RubberDelta(System.Single,System.Single) extern "C" float ScrollRect_RubberDelta_m3597626447 (Il2CppObject * __this /* static, unused */, float ___overStretching0, float ___viewSize1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_RubberDelta_m3597626447_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { float L_0 = ___overStretching0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_1 = fabsf(L_0); float L_2 = ___viewSize1; float L_3 = ___viewSize1; float L_4 = ___overStretching0; float L_5 = Mathf_Sign_m1998862938(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); V_0 = ((float)((float)((float)((float)((float)((float)(1.0f)-(float)((float)((float)(1.0f)/(float)((float)((float)((float)((float)((float)((float)L_1*(float)(0.55f)))/(float)L_2))+(float)(1.0f)))))))*(float)L_3))*(float)L_5)); goto IL_0030; } IL_0030: { float L_6 = V_0; return L_6; } } // System.Void UnityEngine.UI.ScrollRect::OnRectTransformDimensionsChange() extern "C" void ScrollRect_OnRectTransformDimensionsChange_m3076329203 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { ScrollRect_SetDirty_m214267968(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ScrollRect::get_hScrollingNeeded() extern "C" bool ScrollRect_get_hScrollingNeeded_m1471901392 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); bool V_2 = false; { bool L_0 = Application_get_isPlaying_m2058545906(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_0) { goto IL_003f; } } { Bounds_t2266837910 * L_1 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_2 = Bounds_get_size_m1171376090(L_1, /*hidden argument*/NULL); V_0 = L_2; float L_3 = (&V_0)->get_x_1(); Bounds_t2266837910 * L_4 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_5 = Bounds_get_size_m1171376090(L_4, /*hidden argument*/NULL); V_1 = L_5; float L_6 = (&V_1)->get_x_1(); V_2 = (bool)((((float)L_3) > ((float)((float)((float)L_6+(float)(0.01f)))))? 1 : 0); goto IL_0046; } IL_003f: { V_2 = (bool)1; goto IL_0046; } IL_0046: { bool L_7 = V_2; return L_7; } } // System.Boolean UnityEngine.UI.ScrollRect::get_vScrollingNeeded() extern "C" bool ScrollRect_get_vScrollingNeeded_m1717136831 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); bool V_2 = false; { bool L_0 = Application_get_isPlaying_m2058545906(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_0) { goto IL_003f; } } { Bounds_t2266837910 * L_1 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_2 = Bounds_get_size_m1171376090(L_1, /*hidden argument*/NULL); V_0 = L_2; float L_3 = (&V_0)->get_y_2(); Bounds_t2266837910 * L_4 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_5 = Bounds_get_size_m1171376090(L_4, /*hidden argument*/NULL); V_1 = L_5; float L_6 = (&V_1)->get_y_2(); V_2 = (bool)((((float)L_3) > ((float)((float)((float)L_6+(float)(0.01f)))))? 1 : 0); goto IL_0046; } IL_003f: { V_2 = (bool)1; goto IL_0046; } IL_0046: { bool L_7 = V_2; return L_7; } } // System.Void UnityEngine.UI.ScrollRect::CalculateLayoutInputHorizontal() extern "C" void ScrollRect_CalculateLayoutInputHorizontal_m1852828502 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.ScrollRect::CalculateLayoutInputVertical() extern "C" void ScrollRect_CalculateLayoutInputVertical_m3155297482 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { return; } } // System.Single UnityEngine.UI.ScrollRect::get_minWidth() extern "C" float ScrollRect_get_minWidth_m1325838756 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.ScrollRect::get_preferredWidth() extern "C" float ScrollRect_get_preferredWidth_m2902568307 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.ScrollRect::get_flexibleWidth() extern "C" float ScrollRect_get_flexibleWidth_m2491138450 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.ScrollRect::get_minHeight() extern "C" float ScrollRect_get_minHeight_m2488304707 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.ScrollRect::get_preferredHeight() extern "C" float ScrollRect_get_preferredHeight_m4250893636 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.ScrollRect::get_flexibleHeight() extern "C" float ScrollRect_get_flexibleHeight_m1646125485 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Int32 UnityEngine.UI.ScrollRect::get_layoutPriority() extern "C" int32_t ScrollRect_get_layoutPriority_m1584702890 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { int32_t V_0 = 0; { V_0 = (-1); goto IL_0008; } IL_0008: { int32_t L_0 = V_0; return L_0; } } // System.Void UnityEngine.UI.ScrollRect::SetLayoutHorizontal() extern "C" void ScrollRect_SetLayoutHorizontal_m3078869633 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_SetLayoutHorizontal_m3078869633_MetadataUsageId); s_Il2CppMethodInitialized = true; } Rect_t2360479859 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Rect_t2360479859 V_3; memset(&V_3, 0, sizeof(V_3)); Rect_t2360479859 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t2156229523 V_5; memset(&V_5, 0, sizeof(V_5)); Rect_t2360479859 V_6; memset(&V_6, 0, sizeof(V_6)); Rect_t2360479859 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t2156229523 V_8; memset(&V_8, 0, sizeof(V_8)); Vector2_t2156229523 V_9; memset(&V_9, 0, sizeof(V_9)); Vector2_t2156229523 V_10; memset(&V_10, 0, sizeof(V_10)); { DrivenRectTransformTracker_t2562230146 * L_0 = __this->get_address_of_m_Tracker_36(); DrivenRectTransformTracker_Clear_m905140393(L_0, /*hidden argument*/NULL); bool L_1 = __this->get_m_HSliderExpand_29(); if (L_1) { goto IL_0022; } } { bool L_2 = __this->get_m_VSliderExpand_30(); if (!L_2) { goto IL_00cd; } } IL_0022: { DrivenRectTransformTracker_t2562230146 * L_3 = __this->get_address_of_m_Tracker_36(); RectTransform_t3704657025 * L_4 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); DrivenRectTransformTracker_Add_m4180584832(L_3, __this, L_4, ((int32_t)16134), /*hidden argument*/NULL); RectTransform_t3704657025 * L_5 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_6 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_5); RectTransform_set_anchorMin_m2068858122(L_5, L_6, /*hidden argument*/NULL); RectTransform_t3704657025 * L_7 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_8 = Vector2_get_one_m3275444361(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_7); RectTransform_set_anchorMax_m2389806509(L_7, L_8, /*hidden argument*/NULL); RectTransform_t3704657025 * L_9 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_10 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_9); RectTransform_set_sizeDelta_m344906562(L_9, L_10, /*hidden argument*/NULL); RectTransform_t3704657025 * L_11 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); Vector2_t2156229523 L_12 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_11); RectTransform_set_anchoredPosition_m1454079598(L_11, L_12, /*hidden argument*/NULL); RectTransform_t3704657025 * L_13 = ScrollRect_get_content_m2477524320(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t541313304_il2cpp_TypeInfo_var); LayoutRebuilder_ForceRebuildLayoutImmediate_m2728177051(NULL /*static, unused*/, L_13, /*hidden argument*/NULL); RectTransform_t3704657025 * L_14 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_14); Rect_t2360479859 L_15 = RectTransform_get_rect_m1643570810(L_14, /*hidden argument*/NULL); V_0 = L_15; Vector2_t2156229523 L_16 = Rect_get_center_m182049623((&V_0), /*hidden argument*/NULL); Vector3_t3722313464 L_17 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_16, /*hidden argument*/NULL); RectTransform_t3704657025 * L_18 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_18); Rect_t2360479859 L_19 = RectTransform_get_rect_m1643570810(L_18, /*hidden argument*/NULL); V_1 = L_19; Vector2_t2156229523 L_20 = Rect_get_size_m3542039952((&V_1), /*hidden argument*/NULL); Vector3_t3722313464 L_21 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_20, /*hidden argument*/NULL); Bounds_t2266837910 L_22; memset(&L_22, 0, sizeof(L_22)); Bounds__ctor_m131864078(&L_22, L_17, L_21, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_22); Bounds_t2266837910 L_23 = ScrollRect_GetBounds_m449872505(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_23); } IL_00cd: { bool L_24 = __this->get_m_VSliderExpand_30(); if (!L_24) { goto IL_0169; } } { bool L_25 = ScrollRect_get_vScrollingNeeded_m1717136831(__this, /*hidden argument*/NULL); if (!L_25) { goto IL_0169; } } { RectTransform_t3704657025 * L_26 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); float L_27 = __this->get_m_VSliderWidth_32(); float L_28 = __this->get_m_VerticalScrollbarSpacing_16(); RectTransform_t3704657025 * L_29 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_29); Vector2_t2156229523 L_30 = RectTransform_get_sizeDelta_m2136908840(L_29, /*hidden argument*/NULL); V_2 = L_30; float L_31 = (&V_2)->get_y_1(); Vector2_t2156229523 L_32; memset(&L_32, 0, sizeof(L_32)); Vector2__ctor_m4060800441(&L_32, ((-((float)((float)L_27+(float)L_28)))), L_31, /*hidden argument*/NULL); NullCheck(L_26); RectTransform_set_sizeDelta_m344906562(L_26, L_32, /*hidden argument*/NULL); RectTransform_t3704657025 * L_33 = ScrollRect_get_content_m2477524320(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t541313304_il2cpp_TypeInfo_var); LayoutRebuilder_ForceRebuildLayoutImmediate_m2728177051(NULL /*static, unused*/, L_33, /*hidden argument*/NULL); RectTransform_t3704657025 * L_34 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_34); Rect_t2360479859 L_35 = RectTransform_get_rect_m1643570810(L_34, /*hidden argument*/NULL); V_3 = L_35; Vector2_t2156229523 L_36 = Rect_get_center_m182049623((&V_3), /*hidden argument*/NULL); Vector3_t3722313464 L_37 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_36, /*hidden argument*/NULL); RectTransform_t3704657025 * L_38 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_38); Rect_t2360479859 L_39 = RectTransform_get_rect_m1643570810(L_38, /*hidden argument*/NULL); V_4 = L_39; Vector2_t2156229523 L_40 = Rect_get_size_m3542039952((&V_4), /*hidden argument*/NULL); Vector3_t3722313464 L_41 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_40, /*hidden argument*/NULL); Bounds_t2266837910 L_42; memset(&L_42, 0, sizeof(L_42)); Bounds__ctor_m131864078(&L_42, L_37, L_41, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_42); Bounds_t2266837910 L_43 = ScrollRect_GetBounds_m449872505(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_43); } IL_0169: { bool L_44 = __this->get_m_HSliderExpand_29(); if (!L_44) { goto IL_01fc; } } { bool L_45 = ScrollRect_get_hScrollingNeeded_m1471901392(__this, /*hidden argument*/NULL); if (!L_45) { goto IL_01fc; } } { RectTransform_t3704657025 * L_46 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); RectTransform_t3704657025 * L_47 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_47); Vector2_t2156229523 L_48 = RectTransform_get_sizeDelta_m2136908840(L_47, /*hidden argument*/NULL); V_5 = L_48; float L_49 = (&V_5)->get_x_0(); float L_50 = __this->get_m_HSliderHeight_31(); float L_51 = __this->get_m_HorizontalScrollbarSpacing_15(); Vector2_t2156229523 L_52; memset(&L_52, 0, sizeof(L_52)); Vector2__ctor_m4060800441(&L_52, L_49, ((-((float)((float)L_50+(float)L_51)))), /*hidden argument*/NULL); NullCheck(L_46); RectTransform_set_sizeDelta_m344906562(L_46, L_52, /*hidden argument*/NULL); RectTransform_t3704657025 * L_53 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_53); Rect_t2360479859 L_54 = RectTransform_get_rect_m1643570810(L_53, /*hidden argument*/NULL); V_6 = L_54; Vector2_t2156229523 L_55 = Rect_get_center_m182049623((&V_6), /*hidden argument*/NULL); Vector3_t3722313464 L_56 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_55, /*hidden argument*/NULL); RectTransform_t3704657025 * L_57 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_57); Rect_t2360479859 L_58 = RectTransform_get_rect_m1643570810(L_57, /*hidden argument*/NULL); V_7 = L_58; Vector2_t2156229523 L_59 = Rect_get_size_m3542039952((&V_7), /*hidden argument*/NULL); Vector3_t3722313464 L_60 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_59, /*hidden argument*/NULL); Bounds_t2266837910 L_61; memset(&L_61, 0, sizeof(L_61)); Bounds__ctor_m131864078(&L_61, L_56, L_60, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_61); Bounds_t2266837910 L_62 = ScrollRect_GetBounds_m449872505(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_62); } IL_01fc: { bool L_63 = __this->get_m_VSliderExpand_30(); if (!L_63) { goto IL_0282; } } { bool L_64 = ScrollRect_get_vScrollingNeeded_m1717136831(__this, /*hidden argument*/NULL); if (!L_64) { goto IL_0282; } } { RectTransform_t3704657025 * L_65 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_65); Vector2_t2156229523 L_66 = RectTransform_get_sizeDelta_m2136908840(L_65, /*hidden argument*/NULL); V_8 = L_66; float L_67 = (&V_8)->get_x_0(); if ((!(((float)L_67) == ((float)(0.0f))))) { goto IL_0282; } } { RectTransform_t3704657025 * L_68 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_68); Vector2_t2156229523 L_69 = RectTransform_get_sizeDelta_m2136908840(L_68, /*hidden argument*/NULL); V_9 = L_69; float L_70 = (&V_9)->get_y_1(); if ((!(((float)L_70) < ((float)(0.0f))))) { goto IL_0282; } } { RectTransform_t3704657025 * L_71 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); float L_72 = __this->get_m_VSliderWidth_32(); float L_73 = __this->get_m_VerticalScrollbarSpacing_16(); RectTransform_t3704657025 * L_74 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_74); Vector2_t2156229523 L_75 = RectTransform_get_sizeDelta_m2136908840(L_74, /*hidden argument*/NULL); V_10 = L_75; float L_76 = (&V_10)->get_y_1(); Vector2_t2156229523 L_77; memset(&L_77, 0, sizeof(L_77)); Vector2__ctor_m4060800441(&L_77, ((-((float)((float)L_72+(float)L_73)))), L_76, /*hidden argument*/NULL); NullCheck(L_71); RectTransform_set_sizeDelta_m344906562(L_71, L_77, /*hidden argument*/NULL); } IL_0282: { return; } } // System.Void UnityEngine.UI.ScrollRect::SetLayoutVertical() extern "C" void ScrollRect_SetLayoutVertical_m2556636352 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { Rect_t2360479859 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); { ScrollRect_UpdateScrollbarLayout_m4070037264(__this, /*hidden argument*/NULL); RectTransform_t3704657025 * L_0 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_0); Rect_t2360479859 L_1 = RectTransform_get_rect_m1643570810(L_0, /*hidden argument*/NULL); V_0 = L_1; Vector2_t2156229523 L_2 = Rect_get_center_m182049623((&V_0), /*hidden argument*/NULL); Vector3_t3722313464 L_3 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); RectTransform_t3704657025 * L_4 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_4); Rect_t2360479859 L_5 = RectTransform_get_rect_m1643570810(L_4, /*hidden argument*/NULL); V_1 = L_5; Vector2_t2156229523 L_6 = Rect_get_size_m3542039952((&V_1), /*hidden argument*/NULL); Vector3_t3722313464 L_7 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); Bounds_t2266837910 L_8; memset(&L_8, 0, sizeof(L_8)); Bounds__ctor_m131864078(&L_8, L_3, L_7, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_8); Bounds_t2266837910 L_9 = ScrollRect_GetBounds_m449872505(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_9); return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbarVisibility() extern "C" void ScrollRect_UpdateScrollbarVisibility_m4226977273 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { bool L_0 = ScrollRect_get_vScrollingNeeded_m1717136831(__this, /*hidden argument*/NULL); bool L_1 = __this->get_m_Vertical_4(); int32_t L_2 = __this->get_m_VerticalScrollbarVisibility_14(); Scrollbar_t1494447233 * L_3 = __this->get_m_VerticalScrollbar_12(); ScrollRect_UpdateOneScrollbarVisibility_m1785426292(NULL /*static, unused*/, L_0, L_1, L_2, L_3, /*hidden argument*/NULL); bool L_4 = ScrollRect_get_hScrollingNeeded_m1471901392(__this, /*hidden argument*/NULL); bool L_5 = __this->get_m_Horizontal_3(); int32_t L_6 = __this->get_m_HorizontalScrollbarVisibility_13(); Scrollbar_t1494447233 * L_7 = __this->get_m_HorizontalScrollbar_11(); ScrollRect_UpdateOneScrollbarVisibility_m1785426292(NULL /*static, unused*/, L_4, L_5, L_6, L_7, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateOneScrollbarVisibility(System.Boolean,System.Boolean,UnityEngine.UI.ScrollRect/ScrollbarVisibility,UnityEngine.UI.Scrollbar) extern "C" void ScrollRect_UpdateOneScrollbarVisibility_m1785426292 (Il2CppObject * __this /* static, unused */, bool ___xScrollingNeeded0, bool ___xAxisEnabled1, int32_t ___scrollbarVisibility2, Scrollbar_t1494447233 * ___scrollbar3, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateOneScrollbarVisibility_m1785426292_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Scrollbar_t1494447233 * L_0 = ___scrollbar3; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0057; } } { int32_t L_2 = ___scrollbarVisibility2; if (L_2) { goto IL_0037; } } { Scrollbar_t1494447233 * L_3 = ___scrollbar3; NullCheck(L_3); GameObject_t1113636619 * L_4 = Component_get_gameObject_m2648350745(L_3, /*hidden argument*/NULL); NullCheck(L_4); bool L_5 = GameObject_get_activeSelf_m2051627994(L_4, /*hidden argument*/NULL); bool L_6 = ___xAxisEnabled1; if ((((int32_t)L_5) == ((int32_t)L_6))) { goto IL_0031; } } { Scrollbar_t1494447233 * L_7 = ___scrollbar3; NullCheck(L_7); GameObject_t1113636619 * L_8 = Component_get_gameObject_m2648350745(L_7, /*hidden argument*/NULL); bool L_9 = ___xAxisEnabled1; NullCheck(L_8); GameObject_SetActive_m3735894026(L_8, L_9, /*hidden argument*/NULL); } IL_0031: { goto IL_0056; } IL_0037: { Scrollbar_t1494447233 * L_10 = ___scrollbar3; NullCheck(L_10); GameObject_t1113636619 * L_11 = Component_get_gameObject_m2648350745(L_10, /*hidden argument*/NULL); NullCheck(L_11); bool L_12 = GameObject_get_activeSelf_m2051627994(L_11, /*hidden argument*/NULL); bool L_13 = ___xScrollingNeeded0; if ((((int32_t)L_12) == ((int32_t)L_13))) { goto IL_0055; } } { Scrollbar_t1494447233 * L_14 = ___scrollbar3; NullCheck(L_14); GameObject_t1113636619 * L_15 = Component_get_gameObject_m2648350745(L_14, /*hidden argument*/NULL); bool L_16 = ___xScrollingNeeded0; NullCheck(L_15); GameObject_SetActive_m3735894026(L_15, L_16, /*hidden argument*/NULL); } IL_0055: { } IL_0056: { } IL_0057: { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbarLayout() extern "C" void ScrollRect_UpdateScrollbarLayout_m4070037264 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateScrollbarLayout_m4070037264_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t2156229523 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t2156229523 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t2156229523 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t2156229523 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t2156229523 V_8; memset(&V_8, 0, sizeof(V_8)); Vector2_t2156229523 V_9; memset(&V_9, 0, sizeof(V_9)); { bool L_0 = __this->get_m_VSliderExpand_30(); if (!L_0) { goto IL_0117; } } { Scrollbar_t1494447233 * L_1 = __this->get_m_HorizontalScrollbar_11(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0117; } } { DrivenRectTransformTracker_t2562230146 * L_3 = __this->get_address_of_m_Tracker_36(); RectTransform_t3704657025 * L_4 = __this->get_m_HorizontalScrollbarRect_34(); DrivenRectTransformTracker_Add_m4180584832(L_3, __this, L_4, ((int32_t)5378), /*hidden argument*/NULL); RectTransform_t3704657025 * L_5 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t3704657025 * L_6 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_6); Vector2_t2156229523 L_7 = RectTransform_get_anchorMin_m1342910522(L_6, /*hidden argument*/NULL); V_0 = L_7; float L_8 = (&V_0)->get_y_1(); Vector2_t2156229523 L_9; memset(&L_9, 0, sizeof(L_9)); Vector2__ctor_m4060800441(&L_9, (0.0f), L_8, /*hidden argument*/NULL); NullCheck(L_5); RectTransform_set_anchorMin_m2068858122(L_5, L_9, /*hidden argument*/NULL); RectTransform_t3704657025 * L_10 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t3704657025 * L_11 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_11); Vector2_t2156229523 L_12 = RectTransform_get_anchorMax_m1075940194(L_11, /*hidden argument*/NULL); V_1 = L_12; float L_13 = (&V_1)->get_y_1(); Vector2_t2156229523 L_14; memset(&L_14, 0, sizeof(L_14)); Vector2__ctor_m4060800441(&L_14, (1.0f), L_13, /*hidden argument*/NULL); NullCheck(L_10); RectTransform_set_anchorMax_m2389806509(L_10, L_14, /*hidden argument*/NULL); RectTransform_t3704657025 * L_15 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t3704657025 * L_16 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_16); Vector2_t2156229523 L_17 = RectTransform_get_anchoredPosition_m287009682(L_16, /*hidden argument*/NULL); V_2 = L_17; float L_18 = (&V_2)->get_y_1(); Vector2_t2156229523 L_19; memset(&L_19, 0, sizeof(L_19)); Vector2__ctor_m4060800441(&L_19, (0.0f), L_18, /*hidden argument*/NULL); NullCheck(L_15); RectTransform_set_anchoredPosition_m1454079598(L_15, L_19, /*hidden argument*/NULL); bool L_20 = ScrollRect_get_vScrollingNeeded_m1717136831(__this, /*hidden argument*/NULL); if (!L_20) { goto IL_00ed; } } { RectTransform_t3704657025 * L_21 = __this->get_m_HorizontalScrollbarRect_34(); float L_22 = __this->get_m_VSliderWidth_32(); float L_23 = __this->get_m_VerticalScrollbarSpacing_16(); RectTransform_t3704657025 * L_24 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_24); Vector2_t2156229523 L_25 = RectTransform_get_sizeDelta_m2136908840(L_24, /*hidden argument*/NULL); V_3 = L_25; float L_26 = (&V_3)->get_y_1(); Vector2_t2156229523 L_27; memset(&L_27, 0, sizeof(L_27)); Vector2__ctor_m4060800441(&L_27, ((-((float)((float)L_22+(float)L_23)))), L_26, /*hidden argument*/NULL); NullCheck(L_21); RectTransform_set_sizeDelta_m344906562(L_21, L_27, /*hidden argument*/NULL); goto IL_0116; } IL_00ed: { RectTransform_t3704657025 * L_28 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t3704657025 * L_29 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_29); Vector2_t2156229523 L_30 = RectTransform_get_sizeDelta_m2136908840(L_29, /*hidden argument*/NULL); V_4 = L_30; float L_31 = (&V_4)->get_y_1(); Vector2_t2156229523 L_32; memset(&L_32, 0, sizeof(L_32)); Vector2__ctor_m4060800441(&L_32, (0.0f), L_31, /*hidden argument*/NULL); NullCheck(L_28); RectTransform_set_sizeDelta_m344906562(L_28, L_32, /*hidden argument*/NULL); } IL_0116: { } IL_0117: { bool L_33 = __this->get_m_HSliderExpand_29(); if (!L_33) { goto IL_0231; } } { Scrollbar_t1494447233 * L_34 = __this->get_m_VerticalScrollbar_12(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_35 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_34, /*hidden argument*/NULL); if (!L_35) { goto IL_0231; } } { DrivenRectTransformTracker_t2562230146 * L_36 = __this->get_address_of_m_Tracker_36(); RectTransform_t3704657025 * L_37 = __this->get_m_VerticalScrollbarRect_35(); DrivenRectTransformTracker_Add_m4180584832(L_36, __this, L_37, ((int32_t)10756), /*hidden argument*/NULL); RectTransform_t3704657025 * L_38 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t3704657025 * L_39 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_39); Vector2_t2156229523 L_40 = RectTransform_get_anchorMin_m1342910522(L_39, /*hidden argument*/NULL); V_5 = L_40; float L_41 = (&V_5)->get_x_0(); Vector2_t2156229523 L_42; memset(&L_42, 0, sizeof(L_42)); Vector2__ctor_m4060800441(&L_42, L_41, (0.0f), /*hidden argument*/NULL); NullCheck(L_38); RectTransform_set_anchorMin_m2068858122(L_38, L_42, /*hidden argument*/NULL); RectTransform_t3704657025 * L_43 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t3704657025 * L_44 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_44); Vector2_t2156229523 L_45 = RectTransform_get_anchorMax_m1075940194(L_44, /*hidden argument*/NULL); V_6 = L_45; float L_46 = (&V_6)->get_x_0(); Vector2_t2156229523 L_47; memset(&L_47, 0, sizeof(L_47)); Vector2__ctor_m4060800441(&L_47, L_46, (1.0f), /*hidden argument*/NULL); NullCheck(L_43); RectTransform_set_anchorMax_m2389806509(L_43, L_47, /*hidden argument*/NULL); RectTransform_t3704657025 * L_48 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t3704657025 * L_49 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_49); Vector2_t2156229523 L_50 = RectTransform_get_anchoredPosition_m287009682(L_49, /*hidden argument*/NULL); V_7 = L_50; float L_51 = (&V_7)->get_x_0(); Vector2_t2156229523 L_52; memset(&L_52, 0, sizeof(L_52)); Vector2__ctor_m4060800441(&L_52, L_51, (0.0f), /*hidden argument*/NULL); NullCheck(L_48); RectTransform_set_anchoredPosition_m1454079598(L_48, L_52, /*hidden argument*/NULL); bool L_53 = ScrollRect_get_hScrollingNeeded_m1471901392(__this, /*hidden argument*/NULL); if (!L_53) { goto IL_0207; } } { RectTransform_t3704657025 * L_54 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t3704657025 * L_55 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_55); Vector2_t2156229523 L_56 = RectTransform_get_sizeDelta_m2136908840(L_55, /*hidden argument*/NULL); V_8 = L_56; float L_57 = (&V_8)->get_x_0(); float L_58 = __this->get_m_HSliderHeight_31(); float L_59 = __this->get_m_HorizontalScrollbarSpacing_15(); Vector2_t2156229523 L_60; memset(&L_60, 0, sizeof(L_60)); Vector2__ctor_m4060800441(&L_60, L_57, ((-((float)((float)L_58+(float)L_59)))), /*hidden argument*/NULL); NullCheck(L_54); RectTransform_set_sizeDelta_m344906562(L_54, L_60, /*hidden argument*/NULL); goto IL_0230; } IL_0207: { RectTransform_t3704657025 * L_61 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t3704657025 * L_62 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_62); Vector2_t2156229523 L_63 = RectTransform_get_sizeDelta_m2136908840(L_62, /*hidden argument*/NULL); V_9 = L_63; float L_64 = (&V_9)->get_x_0(); Vector2_t2156229523 L_65; memset(&L_65, 0, sizeof(L_65)); Vector2__ctor_m4060800441(&L_65, L_64, (0.0f), /*hidden argument*/NULL); NullCheck(L_61); RectTransform_set_sizeDelta_m344906562(L_61, L_65, /*hidden argument*/NULL); } IL_0230: { } IL_0231: { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateBounds() extern "C" void ScrollRect_UpdateBounds_m359586673 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateBounds_m359586673_MetadataUsageId); s_Il2CppMethodInitialized = true; } Rect_t2360479859 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t3722313464 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t3722313464 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t2156229523 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t2156229523 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t3722313464 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t3722313464 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t3722313464 V_8; memset(&V_8, 0, sizeof(V_8)); Vector3_t3722313464 V_9; memset(&V_9, 0, sizeof(V_9)); Vector3_t3722313464 V_10; memset(&V_10, 0, sizeof(V_10)); Vector3_t3722313464 V_11; memset(&V_11, 0, sizeof(V_11)); Vector3_t3722313464 V_12; memset(&V_12, 0, sizeof(V_12)); Vector3_t3722313464 V_13; memset(&V_13, 0, sizeof(V_13)); Vector3_t3722313464 V_14; memset(&V_14, 0, sizeof(V_14)); Vector3_t3722313464 V_15; memset(&V_15, 0, sizeof(V_15)); Vector3_t3722313464 V_16; memset(&V_16, 0, sizeof(V_16)); Vector3_t3722313464 V_17; memset(&V_17, 0, sizeof(V_17)); Vector3_t3722313464 V_18; memset(&V_18, 0, sizeof(V_18)); Vector3_t3722313464 V_19; memset(&V_19, 0, sizeof(V_19)); Vector3_t3722313464 V_20; memset(&V_20, 0, sizeof(V_20)); Vector3_t3722313464 V_21; memset(&V_21, 0, sizeof(V_21)); Vector3_t3722313464 V_22; memset(&V_22, 0, sizeof(V_22)); Vector3_t3722313464 V_23; memset(&V_23, 0, sizeof(V_23)); Vector3_t3722313464 V_24; memset(&V_24, 0, sizeof(V_24)); Vector3_t3722313464 V_25; memset(&V_25, 0, sizeof(V_25)); Vector3_t3722313464 V_26; memset(&V_26, 0, sizeof(V_26)); Vector3_t3722313464 V_27; memset(&V_27, 0, sizeof(V_27)); Vector3_t3722313464 V_28; memset(&V_28, 0, sizeof(V_28)); Vector3_t3722313464 V_29; memset(&V_29, 0, sizeof(V_29)); Vector2_t2156229523 V_30; memset(&V_30, 0, sizeof(V_30)); Vector2_t2156229523 V_31; memset(&V_31, 0, sizeof(V_31)); { RectTransform_t3704657025 * L_0 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_0); Rect_t2360479859 L_1 = RectTransform_get_rect_m1643570810(L_0, /*hidden argument*/NULL); V_0 = L_1; Vector2_t2156229523 L_2 = Rect_get_center_m182049623((&V_0), /*hidden argument*/NULL); Vector3_t3722313464 L_3 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); RectTransform_t3704657025 * L_4 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_4); Rect_t2360479859 L_5 = RectTransform_get_rect_m1643570810(L_4, /*hidden argument*/NULL); V_1 = L_5; Vector2_t2156229523 L_6 = Rect_get_size_m3542039952((&V_1), /*hidden argument*/NULL); Vector3_t3722313464 L_7 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); Bounds_t2266837910 L_8; memset(&L_8, 0, sizeof(L_8)); Bounds__ctor_m131864078(&L_8, L_3, L_7, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_8); Bounds_t2266837910 L_9 = ScrollRect_GetBounds_m449872505(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_9); RectTransform_t3704657025 * L_10 = __this->get_m_Content_2(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_11 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_10, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_11) { goto IL_005e; } } { goto IL_0387; } IL_005e: { Bounds_t2266837910 * L_12 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_13 = Bounds_get_size_m1171376090(L_12, /*hidden argument*/NULL); V_2 = L_13; Bounds_t2266837910 * L_14 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_15 = Bounds_get_center_m1997663455(L_14, /*hidden argument*/NULL); V_3 = L_15; RectTransform_t3704657025 * L_16 = __this->get_m_Content_2(); NullCheck(L_16); Vector2_t2156229523 L_17 = RectTransform_get_pivot_m1676241928(L_16, /*hidden argument*/NULL); V_4 = L_17; Bounds_t2266837910 * L_18 = __this->get_address_of_m_ViewBounds_22(); ScrollRect_AdjustBounds_m1965355334(NULL /*static, unused*/, L_18, (&V_4), (&V_2), (&V_3), /*hidden argument*/NULL); Bounds_t2266837910 * L_19 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_20 = V_2; Bounds_set_size_m1025767497(L_19, L_20, /*hidden argument*/NULL); Bounds_t2266837910 * L_21 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_22 = V_3; Bounds_set_center_m1602292844(L_21, L_22, /*hidden argument*/NULL); int32_t L_23 = ScrollRect_get_movementType_m2390238786(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_23) == ((uint32_t)2)))) { goto IL_0387; } } { Vector2_t2156229523 L_24 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); V_5 = L_24; Bounds_t2266837910 * L_25 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_26 = Bounds_get_max_m1659284971(L_25, /*hidden argument*/NULL); V_6 = L_26; float L_27 = (&V_6)->get_x_1(); Bounds_t2266837910 * L_28 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_29 = Bounds_get_max_m1659284971(L_28, /*hidden argument*/NULL); V_7 = L_29; float L_30 = (&V_7)->get_x_1(); if ((!(((float)L_27) > ((float)L_30)))) { goto IL_0152; } } { Bounds_t2266837910 * L_31 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_32 = Bounds_get_min_m1736091801(L_31, /*hidden argument*/NULL); V_8 = L_32; float L_33 = (&V_8)->get_x_1(); Bounds_t2266837910 * L_34 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_35 = Bounds_get_min_m1736091801(L_34, /*hidden argument*/NULL); V_9 = L_35; float L_36 = (&V_9)->get_x_1(); Bounds_t2266837910 * L_37 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_38 = Bounds_get_max_m1659284971(L_37, /*hidden argument*/NULL); V_10 = L_38; float L_39 = (&V_10)->get_x_1(); Bounds_t2266837910 * L_40 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_41 = Bounds_get_max_m1659284971(L_40, /*hidden argument*/NULL); V_11 = L_41; float L_42 = (&V_11)->get_x_1(); float L_43 = Math_Min_m3253079129(NULL /*static, unused*/, ((float)((float)L_33-(float)L_36)), ((float)((float)L_39-(float)L_42)), /*hidden argument*/NULL); (&V_5)->set_x_0(L_43); goto IL_01df; } IL_0152: { Bounds_t2266837910 * L_44 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_45 = Bounds_get_min_m1736091801(L_44, /*hidden argument*/NULL); V_12 = L_45; float L_46 = (&V_12)->get_x_1(); Bounds_t2266837910 * L_47 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_48 = Bounds_get_min_m1736091801(L_47, /*hidden argument*/NULL); V_13 = L_48; float L_49 = (&V_13)->get_x_1(); if ((!(((float)L_46) < ((float)L_49)))) { goto IL_01df; } } { Bounds_t2266837910 * L_50 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_51 = Bounds_get_min_m1736091801(L_50, /*hidden argument*/NULL); V_14 = L_51; float L_52 = (&V_14)->get_x_1(); Bounds_t2266837910 * L_53 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_54 = Bounds_get_min_m1736091801(L_53, /*hidden argument*/NULL); V_15 = L_54; float L_55 = (&V_15)->get_x_1(); Bounds_t2266837910 * L_56 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_57 = Bounds_get_max_m1659284971(L_56, /*hidden argument*/NULL); V_16 = L_57; float L_58 = (&V_16)->get_x_1(); Bounds_t2266837910 * L_59 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_60 = Bounds_get_max_m1659284971(L_59, /*hidden argument*/NULL); V_17 = L_60; float L_61 = (&V_17)->get_x_1(); float L_62 = Math_Max_m482125436(NULL /*static, unused*/, ((float)((float)L_52-(float)L_55)), ((float)((float)L_58-(float)L_61)), /*hidden argument*/NULL); (&V_5)->set_x_0(L_62); } IL_01df: { Bounds_t2266837910 * L_63 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_64 = Bounds_get_min_m1736091801(L_63, /*hidden argument*/NULL); V_18 = L_64; float L_65 = (&V_18)->get_y_2(); Bounds_t2266837910 * L_66 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_67 = Bounds_get_min_m1736091801(L_66, /*hidden argument*/NULL); V_19 = L_67; float L_68 = (&V_19)->get_y_2(); if ((!(((float)L_65) < ((float)L_68)))) { goto IL_0271; } } { Bounds_t2266837910 * L_69 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_70 = Bounds_get_min_m1736091801(L_69, /*hidden argument*/NULL); V_20 = L_70; float L_71 = (&V_20)->get_y_2(); Bounds_t2266837910 * L_72 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_73 = Bounds_get_min_m1736091801(L_72, /*hidden argument*/NULL); V_21 = L_73; float L_74 = (&V_21)->get_y_2(); Bounds_t2266837910 * L_75 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_76 = Bounds_get_max_m1659284971(L_75, /*hidden argument*/NULL); V_22 = L_76; float L_77 = (&V_22)->get_y_2(); Bounds_t2266837910 * L_78 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_79 = Bounds_get_max_m1659284971(L_78, /*hidden argument*/NULL); V_23 = L_79; float L_80 = (&V_23)->get_y_2(); float L_81 = Math_Max_m482125436(NULL /*static, unused*/, ((float)((float)L_71-(float)L_74)), ((float)((float)L_77-(float)L_80)), /*hidden argument*/NULL); (&V_5)->set_y_1(L_81); goto IL_02fe; } IL_0271: { Bounds_t2266837910 * L_82 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_83 = Bounds_get_max_m1659284971(L_82, /*hidden argument*/NULL); V_24 = L_83; float L_84 = (&V_24)->get_y_2(); Bounds_t2266837910 * L_85 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_86 = Bounds_get_max_m1659284971(L_85, /*hidden argument*/NULL); V_25 = L_86; float L_87 = (&V_25)->get_y_2(); if ((!(((float)L_84) > ((float)L_87)))) { goto IL_02fe; } } { Bounds_t2266837910 * L_88 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_89 = Bounds_get_min_m1736091801(L_88, /*hidden argument*/NULL); V_26 = L_89; float L_90 = (&V_26)->get_y_2(); Bounds_t2266837910 * L_91 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_92 = Bounds_get_min_m1736091801(L_91, /*hidden argument*/NULL); V_27 = L_92; float L_93 = (&V_27)->get_y_2(); Bounds_t2266837910 * L_94 = __this->get_address_of_m_ViewBounds_22(); Vector3_t3722313464 L_95 = Bounds_get_max_m1659284971(L_94, /*hidden argument*/NULL); V_28 = L_95; float L_96 = (&V_28)->get_y_2(); Bounds_t2266837910 * L_97 = __this->get_address_of_m_ContentBounds_21(); Vector3_t3722313464 L_98 = Bounds_get_max_m1659284971(L_97, /*hidden argument*/NULL); V_29 = L_98; float L_99 = (&V_29)->get_y_2(); float L_100 = Math_Min_m3253079129(NULL /*static, unused*/, ((float)((float)L_90-(float)L_93)), ((float)((float)L_96-(float)L_99)), /*hidden argument*/NULL); (&V_5)->set_y_1(L_100); } IL_02fe: { float L_101 = Vector2_get_sqrMagnitude_m3719918747((&V_5), /*hidden argument*/NULL); if ((!(((float)L_101) > ((float)(1.401298E-45f))))) { goto IL_0386; } } { RectTransform_t3704657025 * L_102 = __this->get_m_Content_2(); NullCheck(L_102); Vector2_t2156229523 L_103 = RectTransform_get_anchoredPosition_m287009682(L_102, /*hidden argument*/NULL); Vector2_t2156229523 L_104 = V_5; Vector2_t2156229523 L_105 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_103, L_104, /*hidden argument*/NULL); Vector3_t3722313464 L_106 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_105, /*hidden argument*/NULL); V_3 = L_106; bool L_107 = __this->get_m_Horizontal_3(); if (L_107) { goto IL_034e; } } { RectTransform_t3704657025 * L_108 = __this->get_m_Content_2(); NullCheck(L_108); Vector2_t2156229523 L_109 = RectTransform_get_anchoredPosition_m287009682(L_108, /*hidden argument*/NULL); V_30 = L_109; float L_110 = (&V_30)->get_x_0(); (&V_3)->set_x_1(L_110); } IL_034e: { bool L_111 = __this->get_m_Vertical_4(); if (L_111) { goto IL_0374; } } { RectTransform_t3704657025 * L_112 = __this->get_m_Content_2(); NullCheck(L_112); Vector2_t2156229523 L_113 = RectTransform_get_anchoredPosition_m287009682(L_112, /*hidden argument*/NULL); V_31 = L_113; float L_114 = (&V_31)->get_y_1(); (&V_3)->set_y_2(L_114); } IL_0374: { Bounds_t2266837910 * L_115 = __this->get_address_of_m_ViewBounds_22(); ScrollRect_AdjustBounds_m1965355334(NULL /*static, unused*/, L_115, (&V_4), (&V_2), (&V_3), /*hidden argument*/NULL); } IL_0386: { } IL_0387: { return; } } // System.Void UnityEngine.UI.ScrollRect::AdjustBounds(UnityEngine.Bounds&,UnityEngine.Vector2&,UnityEngine.Vector3&,UnityEngine.Vector3&) extern "C" void ScrollRect_AdjustBounds_m1965355334 (Il2CppObject * __this /* static, unused */, Bounds_t2266837910 * ___viewBounds0, Vector2_t2156229523 * ___contentPivot1, Vector3_t3722313464 * ___contentSize2, Vector3_t3722313464 * ___contentPos3, const MethodInfo* method) { Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t3722313464 V_2; memset(&V_2, 0, sizeof(V_2)); { Bounds_t2266837910 * L_0 = ___viewBounds0; Vector3_t3722313464 L_1 = Bounds_get_size_m1171376090(L_0, /*hidden argument*/NULL); Vector3_t3722313464 * L_2 = ___contentSize2; Vector3_t3722313464 L_3 = Vector3_op_Subtraction_m2566684344(NULL /*static, unused*/, L_1, (*(Vector3_t3722313464 *)L_2), /*hidden argument*/NULL); V_0 = L_3; float L_4 = (&V_0)->get_x_1(); if ((!(((float)L_4) > ((float)(0.0f))))) { goto IL_005b; } } { Vector3_t3722313464 * L_5 = ___contentPos3; Vector3_t3722313464 * L_6 = L_5; float L_7 = L_6->get_x_1(); float L_8 = (&V_0)->get_x_1(); Vector2_t2156229523 * L_9 = ___contentPivot1; float L_10 = L_9->get_x_0(); L_6->set_x_1(((float)((float)L_7-(float)((float)((float)L_8*(float)((float)((float)L_10-(float)(0.5f)))))))); Vector3_t3722313464 * L_11 = ___contentSize2; Bounds_t2266837910 * L_12 = ___viewBounds0; Vector3_t3722313464 L_13 = Bounds_get_size_m1171376090(L_12, /*hidden argument*/NULL); V_1 = L_13; float L_14 = (&V_1)->get_x_1(); L_11->set_x_1(L_14); } IL_005b: { float L_15 = (&V_0)->get_y_2(); if ((!(((float)L_15) > ((float)(0.0f))))) { goto IL_00a3; } } { Vector3_t3722313464 * L_16 = ___contentPos3; Vector3_t3722313464 * L_17 = L_16; float L_18 = L_17->get_y_2(); float L_19 = (&V_0)->get_y_2(); Vector2_t2156229523 * L_20 = ___contentPivot1; float L_21 = L_20->get_y_1(); L_17->set_y_2(((float)((float)L_18-(float)((float)((float)L_19*(float)((float)((float)L_21-(float)(0.5f)))))))); Vector3_t3722313464 * L_22 = ___contentSize2; Bounds_t2266837910 * L_23 = ___viewBounds0; Vector3_t3722313464 L_24 = Bounds_get_size_m1171376090(L_23, /*hidden argument*/NULL); V_2 = L_24; float L_25 = (&V_2)->get_y_2(); L_22->set_y_2(L_25); } IL_00a3: { return; } } // UnityEngine.Bounds UnityEngine.UI.ScrollRect::GetBounds() extern "C" Bounds_t2266837910 ScrollRect_GetBounds_m449872505 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_GetBounds_m449872505_MetadataUsageId); s_Il2CppMethodInitialized = true; } Bounds_t2266837910 V_0; memset(&V_0, 0, sizeof(V_0)); Bounds_t2266837910 V_1; memset(&V_1, 0, sizeof(V_1)); Matrix4x4_t1817901843 V_2; memset(&V_2, 0, sizeof(V_2)); { RectTransform_t3704657025 * L_0 = __this->get_m_Content_2(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0021; } } { Initobj (Bounds_t2266837910_il2cpp_TypeInfo_var, (&V_0)); Bounds_t2266837910 L_2 = V_0; V_1 = L_2; goto IL_0051; } IL_0021: { RectTransform_t3704657025 * L_3 = __this->get_m_Content_2(); Vector3U5BU5D_t1718750761* L_4 = __this->get_m_Corners_37(); NullCheck(L_3); RectTransform_GetWorldCorners_m2125351209(L_3, L_4, /*hidden argument*/NULL); RectTransform_t3704657025 * L_5 = ScrollRect_get_viewRect_m791243225(__this, /*hidden argument*/NULL); NullCheck(L_5); Matrix4x4_t1817901843 L_6 = Transform_get_worldToLocalMatrix_m2010185910(L_5, /*hidden argument*/NULL); V_2 = L_6; Vector3U5BU5D_t1718750761* L_7 = __this->get_m_Corners_37(); Bounds_t2266837910 L_8 = ScrollRect_InternalGetBounds_m599803667(NULL /*static, unused*/, L_7, (&V_2), /*hidden argument*/NULL); V_1 = L_8; goto IL_0051; } IL_0051: { Bounds_t2266837910 L_9 = V_1; return L_9; } } // UnityEngine.Bounds UnityEngine.UI.ScrollRect::InternalGetBounds(UnityEngine.Vector3[],UnityEngine.Matrix4x4&) extern "C" Bounds_t2266837910 ScrollRect_InternalGetBounds_m599803667 (Il2CppObject * __this /* static, unused */, Vector3U5BU5D_t1718750761* ___corners0, Matrix4x4_t1817901843 * ___viewWorldToLocalMatrix1, const MethodInfo* method) { Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); int32_t V_2 = 0; Vector3_t3722313464 V_3; memset(&V_3, 0, sizeof(V_3)); Bounds_t2266837910 V_4; memset(&V_4, 0, sizeof(V_4)); Bounds_t2266837910 V_5; memset(&V_5, 0, sizeof(V_5)); { Vector3__ctor_m1197556204((&V_0), (std::numeric_limits<float>::max()), (std::numeric_limits<float>::max()), (std::numeric_limits<float>::max()), /*hidden argument*/NULL); Vector3__ctor_m1197556204((&V_1), (-std::numeric_limits<float>::max()), (-std::numeric_limits<float>::max()), (-std::numeric_limits<float>::max()), /*hidden argument*/NULL); V_2 = 0; goto IL_005d; } IL_0034: { Matrix4x4_t1817901843 * L_0 = ___viewWorldToLocalMatrix1; Vector3U5BU5D_t1718750761* L_1 = ___corners0; int32_t L_2 = V_2; NullCheck(L_1); Vector3_t3722313464 L_3 = Matrix4x4_MultiplyPoint3x4_m1691748578(L_0, (*(Vector3_t3722313464 *)((L_1)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_2)))), /*hidden argument*/NULL); V_3 = L_3; Vector3_t3722313464 L_4 = V_3; Vector3_t3722313464 L_5 = V_0; Vector3_t3722313464 L_6 = Vector3_Min_m4041074433(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); V_0 = L_6; Vector3_t3722313464 L_7 = V_3; Vector3_t3722313464 L_8 = V_1; Vector3_t3722313464 L_9 = Vector3_Max_m821979329(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); V_1 = L_9; int32_t L_10 = V_2; V_2 = ((int32_t)((int32_t)L_10+(int32_t)1)); } IL_005d: { int32_t L_11 = V_2; if ((((int32_t)L_11) < ((int32_t)4))) { goto IL_0034; } } { Vector3_t3722313464 L_12 = V_0; Vector3_t3722313464 L_13 = Vector3_get_zero_m1640475482(NULL /*static, unused*/, /*hidden argument*/NULL); Bounds__ctor_m131864078((&V_4), L_12, L_13, /*hidden argument*/NULL); Vector3_t3722313464 L_14 = V_1; Bounds_Encapsulate_m3482076963((&V_4), L_14, /*hidden argument*/NULL); Bounds_t2266837910 L_15 = V_4; V_5 = L_15; goto IL_0082; } IL_0082: { Bounds_t2266837910 L_16 = V_5; return L_16; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::CalculateOffset(UnityEngine.Vector2) extern "C" Vector2_t2156229523 ScrollRect_CalculateOffset_m927043599 (ScrollRect_t4137855814 * __this, Vector2_t2156229523 ___delta0, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); { Bounds_t2266837910 * L_0 = __this->get_address_of_m_ViewBounds_22(); Bounds_t2266837910 * L_1 = __this->get_address_of_m_ContentBounds_21(); bool L_2 = __this->get_m_Horizontal_3(); bool L_3 = __this->get_m_Vertical_4(); int32_t L_4 = __this->get_m_MovementType_5(); Vector2_t2156229523 L_5 = ScrollRect_InternalCalculateOffset_m3525603382(NULL /*static, unused*/, L_0, L_1, L_2, L_3, L_4, (&___delta0), /*hidden argument*/NULL); V_0 = L_5; goto IL_002c; } IL_002c: { Vector2_t2156229523 L_6 = V_0; return L_6; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::InternalCalculateOffset(UnityEngine.Bounds&,UnityEngine.Bounds&,System.Boolean,System.Boolean,UnityEngine.UI.ScrollRect/MovementType,UnityEngine.Vector2&) extern "C" Vector2_t2156229523 ScrollRect_InternalCalculateOffset_m3525603382 (Il2CppObject * __this /* static, unused */, Bounds_t2266837910 * ___viewBounds0, Bounds_t2266837910 * ___contentBounds1, bool ___horizontal2, bool ___vertical3, int32_t ___movementType4, Vector2_t2156229523 * ___delta5, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t3722313464 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t3722313464 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t3722313464 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t3722313464 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t3722313464 V_8; memset(&V_8, 0, sizeof(V_8)); Vector3_t3722313464 V_9; memset(&V_9, 0, sizeof(V_9)); Vector3_t3722313464 V_10; memset(&V_10, 0, sizeof(V_10)); Vector3_t3722313464 V_11; memset(&V_11, 0, sizeof(V_11)); { Vector2_t2156229523 L_0 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = ___movementType4; if (L_1) { goto IL_0015; } } { Vector2_t2156229523 L_2 = V_0; V_1 = L_2; goto IL_0186; } IL_0015: { Bounds_t2266837910 * L_3 = ___contentBounds1; Vector3_t3722313464 L_4 = Bounds_get_min_m1736091801(L_3, /*hidden argument*/NULL); Vector2_t2156229523 L_5 = Vector2_op_Implicit_m1304503157(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); V_2 = L_5; Bounds_t2266837910 * L_6 = ___contentBounds1; Vector3_t3722313464 L_7 = Bounds_get_max_m1659284971(L_6, /*hidden argument*/NULL); Vector2_t2156229523 L_8 = Vector2_op_Implicit_m1304503157(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); V_3 = L_8; bool L_9 = ___horizontal2; if (!L_9) { goto IL_00d6; } } { Vector2_t2156229523 * L_10 = (&V_2); float L_11 = L_10->get_x_0(); Vector2_t2156229523 * L_12 = ___delta5; float L_13 = L_12->get_x_0(); L_10->set_x_0(((float)((float)L_11+(float)L_13))); Vector2_t2156229523 * L_14 = (&V_3); float L_15 = L_14->get_x_0(); Vector2_t2156229523 * L_16 = ___delta5; float L_17 = L_16->get_x_0(); L_14->set_x_0(((float)((float)L_15+(float)L_17))); float L_18 = (&V_2)->get_x_0(); Bounds_t2266837910 * L_19 = ___viewBounds0; Vector3_t3722313464 L_20 = Bounds_get_min_m1736091801(L_19, /*hidden argument*/NULL); V_4 = L_20; float L_21 = (&V_4)->get_x_1(); if ((!(((float)L_18) > ((float)L_21)))) { goto IL_009c; } } { Bounds_t2266837910 * L_22 = ___viewBounds0; Vector3_t3722313464 L_23 = Bounds_get_min_m1736091801(L_22, /*hidden argument*/NULL); V_5 = L_23; float L_24 = (&V_5)->get_x_1(); float L_25 = (&V_2)->get_x_0(); (&V_0)->set_x_0(((float)((float)L_24-(float)L_25))); goto IL_00d5; } IL_009c: { float L_26 = (&V_3)->get_x_0(); Bounds_t2266837910 * L_27 = ___viewBounds0; Vector3_t3722313464 L_28 = Bounds_get_max_m1659284971(L_27, /*hidden argument*/NULL); V_6 = L_28; float L_29 = (&V_6)->get_x_1(); if ((!(((float)L_26) < ((float)L_29)))) { goto IL_00d5; } } { Bounds_t2266837910 * L_30 = ___viewBounds0; Vector3_t3722313464 L_31 = Bounds_get_max_m1659284971(L_30, /*hidden argument*/NULL); V_7 = L_31; float L_32 = (&V_7)->get_x_1(); float L_33 = (&V_3)->get_x_0(); (&V_0)->set_x_0(((float)((float)L_32-(float)L_33))); } IL_00d5: { } IL_00d6: { bool L_34 = ___vertical3; if (!L_34) { goto IL_017f; } } { Vector2_t2156229523 * L_35 = (&V_2); float L_36 = L_35->get_y_1(); Vector2_t2156229523 * L_37 = ___delta5; float L_38 = L_37->get_y_1(); L_35->set_y_1(((float)((float)L_36+(float)L_38))); Vector2_t2156229523 * L_39 = (&V_3); float L_40 = L_39->get_y_1(); Vector2_t2156229523 * L_41 = ___delta5; float L_42 = L_41->get_y_1(); L_39->set_y_1(((float)((float)L_40+(float)L_42))); float L_43 = (&V_3)->get_y_1(); Bounds_t2266837910 * L_44 = ___viewBounds0; Vector3_t3722313464 L_45 = Bounds_get_max_m1659284971(L_44, /*hidden argument*/NULL); V_8 = L_45; float L_46 = (&V_8)->get_y_2(); if ((!(((float)L_43) < ((float)L_46)))) { goto IL_0145; } } { Bounds_t2266837910 * L_47 = ___viewBounds0; Vector3_t3722313464 L_48 = Bounds_get_max_m1659284971(L_47, /*hidden argument*/NULL); V_9 = L_48; float L_49 = (&V_9)->get_y_2(); float L_50 = (&V_3)->get_y_1(); (&V_0)->set_y_1(((float)((float)L_49-(float)L_50))); goto IL_017e; } IL_0145: { float L_51 = (&V_2)->get_y_1(); Bounds_t2266837910 * L_52 = ___viewBounds0; Vector3_t3722313464 L_53 = Bounds_get_min_m1736091801(L_52, /*hidden argument*/NULL); V_10 = L_53; float L_54 = (&V_10)->get_y_2(); if ((!(((float)L_51) > ((float)L_54)))) { goto IL_017e; } } { Bounds_t2266837910 * L_55 = ___viewBounds0; Vector3_t3722313464 L_56 = Bounds_get_min_m1736091801(L_55, /*hidden argument*/NULL); V_11 = L_56; float L_57 = (&V_11)->get_y_2(); float L_58 = (&V_2)->get_y_1(); (&V_0)->set_y_1(((float)((float)L_57-(float)L_58))); } IL_017e: { } IL_017f: { Vector2_t2156229523 L_59 = V_0; V_1 = L_59; goto IL_0186; } IL_0186: { Vector2_t2156229523 L_60 = V_1; return L_60; } } // System.Void UnityEngine.UI.ScrollRect::SetDirty() extern "C" void ScrollRect_SetDirty_m214267968 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_SetDirty_m214267968_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0011; } } { goto IL_001c; } IL_0011: { RectTransform_t3704657025 * L_1 = ScrollRect_get_rectTransform_m2442061719(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t541313304_il2cpp_TypeInfo_var); LayoutRebuilder_MarkLayoutForRebuild_m4080555610(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); } IL_001c: { return; } } // System.Void UnityEngine.UI.ScrollRect::SetDirtyCaching() extern "C" void ScrollRect_SetDirtyCaching_m4155312386 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRect_SetDirtyCaching_m4155312386_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0011; } } { goto IL_0022; } IL_0011: { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var); CanvasUpdateRegistry_RegisterCanvasElementForLayoutRebuild_m677454901(NULL /*static, unused*/, __this, /*hidden argument*/NULL); RectTransform_t3704657025 * L_1 = ScrollRect_get_rectTransform_m2442061719(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t541313304_il2cpp_TypeInfo_var); LayoutRebuilder_MarkLayoutForRebuild_m4080555610(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); } IL_0022: { return; } } // UnityEngine.Transform UnityEngine.UI.ScrollRect::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t3600365921 * ScrollRect_UnityEngine_UI_ICanvasElement_get_transform_m3637572110 (ScrollRect_t4137855814 * __this, const MethodInfo* method) { { Transform_t3600365921 * L_0 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.ScrollRect/ScrollRectEvent::.ctor() extern "C" void ScrollRectEvent__ctor_m1107027632 (ScrollRectEvent_t343079324 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ScrollRectEvent__ctor_m1107027632_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UnityEvent_1__ctor_m3675246889(__this, /*hidden argument*/UnityEvent_1__ctor_m3675246889_MethodInfo_var); return; } } // System.Void UnityEngine.UI.Selectable::.ctor() extern "C" void Selectable__ctor_m58942866 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable__ctor_m58942866_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Navigation_t3049316579 L_0 = Navigation_get_defaultNavigation_m2181582095(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Navigation_3(L_0); __this->set_m_Transition_4(1); ColorBlock_t2139031574 L_1 = ColorBlock_get_defaultColorBlock_m2213047241(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Colors_5(L_1); AnimationTriggers_t2532145056 * L_2 = (AnimationTriggers_t2532145056 *)il2cpp_codegen_object_new(AnimationTriggers_t2532145056_il2cpp_TypeInfo_var); AnimationTriggers__ctor_m3418993069(L_2, /*hidden argument*/NULL); __this->set_m_AnimationTriggers_7(L_2); __this->set_m_Interactable_8((bool)1); __this->set_m_GroupsAllowInteraction_10((bool)1); List_1_t1260619206 * L_3 = (List_1_t1260619206 *)il2cpp_codegen_object_new(List_1_t1260619206_il2cpp_TypeInfo_var); List_1__ctor_m1125674364(L_3, /*hidden argument*/List_1__ctor_m1125674364_MethodInfo_var); __this->set_m_CanvasGroupCache_15(L_3); UIBehaviour__ctor_m4230637738(__this, /*hidden argument*/NULL); return; } } // System.Collections.Generic.List`1<UnityEngine.UI.Selectable> UnityEngine.UI.Selectable::get_allSelectables() extern "C" List_1_t427135887 * Selectable_get_allSelectables_m868218263 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_get_allSelectables_m868218263_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t427135887 * V_0 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); List_1_t427135887 * L_0 = ((Selectable_t3250028441_StaticFields*)Selectable_t3250028441_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); V_0 = L_0; goto IL_000c; } IL_000c: { List_1_t427135887 * L_1 = V_0; return L_1; } } // UnityEngine.UI.Navigation UnityEngine.UI.Selectable::get_navigation() extern "C" Navigation_t3049316579 Selectable_get_navigation_m3508916916 (Selectable_t3250028441 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t3049316579 L_0 = __this->get_m_Navigation_3(); V_0 = L_0; goto IL_000d; } IL_000d: { Navigation_t3049316579 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_navigation(UnityEngine.UI.Navigation) extern "C" void Selectable_set_navigation_m1617209861 (Selectable_t3250028441 * __this, Navigation_t3049316579 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_navigation_m1617209861_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Navigation_t3049316579 * L_0 = __this->get_address_of_m_Navigation_3(); Navigation_t3049316579 L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisNavigation_t3049316579_m1469939781(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisNavigation_t3049316579_m1469939781_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // UnityEngine.UI.Selectable/Transition UnityEngine.UI.Selectable::get_transition() extern "C" int32_t Selectable_get_transition_m4252319269 (Selectable_t3250028441 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_Transition_4(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_transition(UnityEngine.UI.Selectable/Transition) extern "C" void Selectable_set_transition_m3395256326 (Selectable_t3250028441 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_transition_m3395256326_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t* L_0 = __this->get_address_of_m_Transition_4(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisTransition_t1769908631_m4087672457(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisTransition_t1769908631_m4087672457_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // UnityEngine.UI.ColorBlock UnityEngine.UI.Selectable::get_colors() extern "C" ColorBlock_t2139031574 Selectable_get_colors_m2213868400 (Selectable_t3250028441 * __this, const MethodInfo* method) { ColorBlock_t2139031574 V_0; memset(&V_0, 0, sizeof(V_0)); { ColorBlock_t2139031574 L_0 = __this->get_m_Colors_5(); V_0 = L_0; goto IL_000d; } IL_000d: { ColorBlock_t2139031574 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_colors(UnityEngine.UI.ColorBlock) extern "C" void Selectable_set_colors_m1384394609 (Selectable_t3250028441 * __this, ColorBlock_t2139031574 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_colors_m1384394609_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ColorBlock_t2139031574 * L_0 = __this->get_address_of_m_Colors_5(); ColorBlock_t2139031574 L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisColorBlock_t2139031574_m1748367426(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisColorBlock_t2139031574_m1748367426_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // UnityEngine.UI.SpriteState UnityEngine.UI.Selectable::get_spriteState() extern "C" SpriteState_t1362986479 Selectable_get_spriteState_m1246443483 (Selectable_t3250028441 * __this, const MethodInfo* method) { SpriteState_t1362986479 V_0; memset(&V_0, 0, sizeof(V_0)); { SpriteState_t1362986479 L_0 = __this->get_m_SpriteState_6(); V_0 = L_0; goto IL_000d; } IL_000d: { SpriteState_t1362986479 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_spriteState(UnityEngine.UI.SpriteState) extern "C" void Selectable_set_spriteState_m1127684063 (Selectable_t3250028441 * __this, SpriteState_t1362986479 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_spriteState_m1127684063_MetadataUsageId); s_Il2CppMethodInitialized = true; } { SpriteState_t1362986479 * L_0 = __this->get_address_of_m_SpriteState_6(); SpriteState_t1362986479 L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisSpriteState_t1362986479_m665096788(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisSpriteState_t1362986479_m665096788_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // UnityEngine.UI.AnimationTriggers UnityEngine.UI.Selectable::get_animationTriggers() extern "C" AnimationTriggers_t2532145056 * Selectable_get_animationTriggers_m1217552961 (Selectable_t3250028441 * __this, const MethodInfo* method) { AnimationTriggers_t2532145056 * V_0 = NULL; { AnimationTriggers_t2532145056 * L_0 = __this->get_m_AnimationTriggers_7(); V_0 = L_0; goto IL_000d; } IL_000d: { AnimationTriggers_t2532145056 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_animationTriggers(UnityEngine.UI.AnimationTriggers) extern "C" void Selectable_set_animationTriggers_m2970345687 (Selectable_t3250028441 * __this, AnimationTriggers_t2532145056 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_animationTriggers_m2970345687_MetadataUsageId); s_Il2CppMethodInitialized = true; } { AnimationTriggers_t2532145056 ** L_0 = __this->get_address_of_m_AnimationTriggers_7(); AnimationTriggers_t2532145056 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisAnimationTriggers_t2532145056_m1077330060(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisAnimationTriggers_t2532145056_m1077330060_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // UnityEngine.UI.Graphic UnityEngine.UI.Selectable::get_targetGraphic() extern "C" Graphic_t1660335611 * Selectable_get_targetGraphic_m559777690 (Selectable_t3250028441 * __this, const MethodInfo* method) { Graphic_t1660335611 * V_0 = NULL; { Graphic_t1660335611 * L_0 = __this->get_m_TargetGraphic_9(); V_0 = L_0; goto IL_000d; } IL_000d: { Graphic_t1660335611 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_targetGraphic(UnityEngine.UI.Graphic) extern "C" void Selectable_set_targetGraphic_m1003546643 (Selectable_t3250028441 * __this, Graphic_t1660335611 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_targetGraphic_m1003546643_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Graphic_t1660335611 ** L_0 = __this->get_address_of_m_TargetGraphic_9(); Graphic_t1660335611 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisGraphic_t1660335611_m2615282015(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisGraphic_t1660335611_m2615282015_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // System.Boolean UnityEngine.UI.Selectable::get_interactable() extern "C" bool Selectable_get_interactable_m4178824191 (Selectable_t3250028441 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_Interactable_8(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_interactable(System.Boolean) extern "C" void Selectable_set_interactable_m3105888815 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_set_interactable_m3105888815_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool* L_0 = __this->get_address_of_m_Interactable_8(); bool L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708_MethodInfo_var); if (!L_2) { goto IL_006c; } } { bool L_3 = __this->get_m_Interactable_8(); if (L_3) { goto IL_0053; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_4 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_5 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_4, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_5) { goto IL_0053; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_6 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_6); GameObject_t1113636619 * L_7 = EventSystem_get_currentSelectedGameObject_m2939274948(L_6, /*hidden argument*/NULL); GameObject_t1113636619 * L_8 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_9 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); if (!L_9) { goto IL_0053; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_10 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_10); EventSystem_SetSelectedGameObject_m2232337908(L_10, (GameObject_t1113636619 *)NULL, /*hidden argument*/NULL); } IL_0053: { bool L_11 = __this->get_m_Interactable_8(); if (!L_11) { goto IL_0065; } } { Selectable_UpdateSelectionState_m682863465(__this, (BaseEventData_t3903027533 *)NULL, /*hidden argument*/NULL); } IL_0065: { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_006c: { return; } } // System.Boolean UnityEngine.UI.Selectable::get_isPointerInside() extern "C" bool Selectable_get_isPointerInside_m520529781 (Selectable_t3250028441 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_U3CisPointerInsideU3Ek__BackingField_12(); V_0 = L_0; goto IL_000c; } IL_000c: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_isPointerInside(System.Boolean) extern "C" void Selectable_set_isPointerInside_m701571657 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_U3CisPointerInsideU3Ek__BackingField_12(L_0); return; } } // System.Boolean UnityEngine.UI.Selectable::get_isPointerDown() extern "C" bool Selectable_get_isPointerDown_m3518318267 (Selectable_t3250028441 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_U3CisPointerDownU3Ek__BackingField_13(); V_0 = L_0; goto IL_000c; } IL_000c: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_isPointerDown(System.Boolean) extern "C" void Selectable_set_isPointerDown_m1776212707 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_U3CisPointerDownU3Ek__BackingField_13(L_0); return; } } // System.Boolean UnityEngine.UI.Selectable::get_hasSelection() extern "C" bool Selectable_get_hasSelection_m1083548109 (Selectable_t3250028441 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_U3ChasSelectionU3Ek__BackingField_14(); V_0 = L_0; goto IL_000c; } IL_000c: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_hasSelection(System.Boolean) extern "C" void Selectable_set_hasSelection_m1076374937 (Selectable_t3250028441 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_U3ChasSelectionU3Ek__BackingField_14(L_0); return; } } // UnityEngine.UI.Image UnityEngine.UI.Selectable::get_image() extern "C" Image_t2670269651 * Selectable_get_image_m1928917691 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_get_image_m1928917691_MetadataUsageId); s_Il2CppMethodInitialized = true; } Image_t2670269651 * V_0 = NULL; { Graphic_t1660335611 * L_0 = __this->get_m_TargetGraphic_9(); V_0 = ((Image_t2670269651 *)IsInstClass(L_0, Image_t2670269651_il2cpp_TypeInfo_var)); goto IL_0012; } IL_0012: { Image_t2670269651 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::set_image(UnityEngine.UI.Image) extern "C" void Selectable_set_image_m3625164794 (Selectable_t3250028441 * __this, Image_t2670269651 * ___value0, const MethodInfo* method) { { Image_t2670269651 * L_0 = ___value0; __this->set_m_TargetGraphic_9(L_0); return; } } // UnityEngine.Animator UnityEngine.UI.Selectable::get_animator() extern "C" Animator_t434523843 * Selectable_get_animator_m2899312855 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_get_animator_m2899312855_MetadataUsageId); s_Il2CppMethodInitialized = true; } Animator_t434523843 * V_0 = NULL; { Animator_t434523843 * L_0 = Component_GetComponent_TisAnimator_t434523843_m2351447238(__this, /*hidden argument*/Component_GetComponent_TisAnimator_t434523843_m2351447238_MethodInfo_var); V_0 = L_0; goto IL_000d; } IL_000d: { Animator_t434523843 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::Awake() extern "C" void Selectable_Awake_m2577497063 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_Awake_m2577497063_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Graphic_t1660335611 * L_0 = __this->get_m_TargetGraphic_9(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001e; } } { Graphic_t1660335611 * L_2 = Component_GetComponent_TisGraphic_t1660335611_m1118939870(__this, /*hidden argument*/Component_GetComponent_TisGraphic_t1660335611_m1118939870_MethodInfo_var); __this->set_m_TargetGraphic_9(L_2); } IL_001e: { return; } } // System.Void UnityEngine.UI.Selectable::OnCanvasGroupChanged() extern "C" void Selectable_OnCanvasGroupChanged_m472903475 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_OnCanvasGroupChanged_m472903475_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; Transform_t3600365921 * V_1 = NULL; bool V_2 = false; int32_t V_3 = 0; { V_0 = (bool)1; Transform_t3600365921 * L_0 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); V_1 = L_0; goto IL_0083; } IL_000f: { Transform_t3600365921 * L_1 = V_1; List_1_t1260619206 * L_2 = __this->get_m_CanvasGroupCache_15(); NullCheck(L_1); Component_GetComponents_TisCanvasGroup_t4083511760_m1242628373(L_1, L_2, /*hidden argument*/Component_GetComponents_TisCanvasGroup_t4083511760_m1242628373_MethodInfo_var); V_2 = (bool)0; V_3 = 0; goto IL_005f; } IL_0025: { List_1_t1260619206 * L_3 = __this->get_m_CanvasGroupCache_15(); int32_t L_4 = V_3; NullCheck(L_3); CanvasGroup_t4083511760 * L_5 = List_1_get_Item_m1176857673(L_3, L_4, /*hidden argument*/List_1_get_Item_m1176857673_MethodInfo_var); NullCheck(L_5); bool L_6 = CanvasGroup_get_interactable_m176056025(L_5, /*hidden argument*/NULL); if (L_6) { goto IL_0042; } } { V_0 = (bool)0; V_2 = (bool)1; } IL_0042: { List_1_t1260619206 * L_7 = __this->get_m_CanvasGroupCache_15(); int32_t L_8 = V_3; NullCheck(L_7); CanvasGroup_t4083511760 * L_9 = List_1_get_Item_m1176857673(L_7, L_8, /*hidden argument*/List_1_get_Item_m1176857673_MethodInfo_var); NullCheck(L_9); bool L_10 = CanvasGroup_get_ignoreParentGroups_m551440072(L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_005a; } } { V_2 = (bool)1; } IL_005a: { int32_t L_11 = V_3; V_3 = ((int32_t)((int32_t)L_11+(int32_t)1)); } IL_005f: { int32_t L_12 = V_3; List_1_t1260619206 * L_13 = __this->get_m_CanvasGroupCache_15(); NullCheck(L_13); int32_t L_14 = List_1_get_Count_m1565416845(L_13, /*hidden argument*/List_1_get_Count_m1565416845_MethodInfo_var); if ((((int32_t)L_12) < ((int32_t)L_14))) { goto IL_0025; } } { bool L_15 = V_2; if (!L_15) { goto IL_007b; } } { goto IL_008f; } IL_007b: { Transform_t3600365921 * L_16 = V_1; NullCheck(L_16); Transform_t3600365921 * L_17 = Transform_get_parent_m1293647796(L_16, /*hidden argument*/NULL); V_1 = L_17; } IL_0083: { Transform_t3600365921 * L_18 = V_1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_19 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_18, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_19) { goto IL_000f; } } IL_008f: { bool L_20 = V_0; bool L_21 = __this->get_m_GroupsAllowInteraction_10(); if ((((int32_t)L_20) == ((int32_t)L_21))) { goto IL_00aa; } } { bool L_22 = V_0; __this->set_m_GroupsAllowInteraction_10(L_22); Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); } IL_00aa: { return; } } // System.Boolean UnityEngine.UI.Selectable::IsInteractable() extern "C" bool Selectable_IsInteractable_m2611421038 (Selectable_t3250028441 * __this, const MethodInfo* method) { bool V_0 = false; int32_t G_B3_0 = 0; { bool L_0 = __this->get_m_GroupsAllowInteraction_10(); if (!L_0) { goto IL_0014; } } { bool L_1 = __this->get_m_Interactable_8(); G_B3_0 = ((int32_t)(L_1)); goto IL_0015; } IL_0014: { G_B3_0 = 0; } IL_0015: { V_0 = (bool)G_B3_0; goto IL_001b; } IL_001b: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Selectable::OnDidApplyAnimationProperties() extern "C" void Selectable_OnDidApplyAnimationProperties_m1530194632 (Selectable_t3250028441 * __this, const MethodInfo* method) { { Selectable_OnSetProperty_m1693943217(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnEnable() extern "C" void Selectable_OnEnable_m3110490294 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_OnEnable_m3110490294_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { UIBehaviour_OnEnable_m189051288(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); List_1_t427135887 * L_0 = ((Selectable_t3250028441_StaticFields*)Selectable_t3250028441_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); NullCheck(L_0); List_1_Add_m2184749397(L_0, __this, /*hidden argument*/List_1_Add_m2184749397_MethodInfo_var); V_0 = 0; bool L_1 = Selectable_get_hasSelection_m1083548109(__this, /*hidden argument*/NULL); if (!L_1) { goto IL_0021; } } { V_0 = 1; } IL_0021: { int32_t L_2 = V_0; __this->set_m_CurrentSelectionState_11(L_2); Selectable_InternalEvaluateAndTransitionToSelectionState_m2188373385(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnSetProperty() extern "C" void Selectable_OnSetProperty_m1693943217 (Selectable_t3250028441 * __this, const MethodInfo* method) { { Selectable_InternalEvaluateAndTransitionToSelectionState_m2188373385(__this, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnDisable() extern "C" void Selectable_OnDisable_m3225138518 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_OnDisable_m3225138518_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); List_1_t427135887 * L_0 = ((Selectable_t3250028441_StaticFields*)Selectable_t3250028441_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); NullCheck(L_0); List_1_Remove_m2170822742(L_0, __this, /*hidden argument*/List_1_Remove_m2170822742_MethodInfo_var); VirtActionInvoker0::Invoke(25 /* System.Void UnityEngine.UI.Selectable::InstantClearState() */, __this); UIBehaviour_OnDisable_m1784507360(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Selectable/SelectionState UnityEngine.UI.Selectable::get_currentSelectionState() extern "C" int32_t Selectable_get_currentSelectionState_m3862069179 (Selectable_t3250028441 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_CurrentSelectionState_11(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Selectable::InstantClearState() extern "C" void Selectable_InstantClearState_m110305066 (Selectable_t3250028441 * __this, const MethodInfo* method) { String_t* V_0 = NULL; int32_t V_1 = 0; { AnimationTriggers_t2532145056 * L_0 = __this->get_m_AnimationTriggers_7(); NullCheck(L_0); String_t* L_1 = AnimationTriggers_get_normalTrigger_m3461765293(L_0, /*hidden argument*/NULL); V_0 = L_1; Selectable_set_isPointerInside_m701571657(__this, (bool)0, /*hidden argument*/NULL); Selectable_set_isPointerDown_m1776212707(__this, (bool)0, /*hidden argument*/NULL); Selectable_set_hasSelection_m1076374937(__this, (bool)0, /*hidden argument*/NULL); int32_t L_2 = __this->get_m_Transition_4(); V_1 = L_2; int32_t L_3 = V_1; if ((((int32_t)L_3) == ((int32_t)1))) { goto IL_0043; } } { int32_t L_4 = V_1; if ((((int32_t)L_4) == ((int32_t)2))) { goto IL_0054; } } { int32_t L_5 = V_1; if ((((int32_t)L_5) == ((int32_t)3))) { goto IL_0060; } } { goto IL_006c; } IL_0043: { Color_t2555686324 L_6 = Color_get_white_m3544547002(NULL /*static, unused*/, /*hidden argument*/NULL); Selectable_StartColorTween_m3618813981(__this, L_6, (bool)1, /*hidden argument*/NULL); goto IL_006c; } IL_0054: { Selectable_DoSpriteSwap_m3258918083(__this, (Sprite_t280657092 *)NULL, /*hidden argument*/NULL); goto IL_006c; } IL_0060: { String_t* L_7 = V_0; Selectable_TriggerAnimation_m2878474(__this, L_7, /*hidden argument*/NULL); goto IL_006c; } IL_006c: { return; } } // System.Void UnityEngine.UI.Selectable::DoStateTransition(UnityEngine.UI.Selectable/SelectionState,System.Boolean) extern "C" void Selectable_DoStateTransition_m1885133206 (Selectable_t3250028441 * __this, int32_t ___state0, bool ___instant1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_DoStateTransition_m1885133206_MetadataUsageId); s_Il2CppMethodInitialized = true; } Color_t2555686324 V_0; memset(&V_0, 0, sizeof(V_0)); Sprite_t280657092 * V_1 = NULL; String_t* V_2 = NULL; int32_t V_3 = 0; { int32_t L_0 = ___state0; switch (L_0) { case 0: { goto IL_001c; } case 1: { goto IL_003b; } case 2: { goto IL_0064; } case 3: { goto IL_008d; } } } { goto IL_00b6; } IL_001c: { ColorBlock_t2139031574 * L_1 = __this->get_address_of_m_Colors_5(); Color_t2555686324 L_2 = ColorBlock_get_normalColor_m4055946654(L_1, /*hidden argument*/NULL); V_0 = L_2; V_1 = (Sprite_t280657092 *)NULL; AnimationTriggers_t2532145056 * L_3 = __this->get_m_AnimationTriggers_7(); NullCheck(L_3); String_t* L_4 = AnimationTriggers_get_normalTrigger_m3461765293(L_3, /*hidden argument*/NULL); V_2 = L_4; goto IL_00c9; } IL_003b: { ColorBlock_t2139031574 * L_5 = __this->get_address_of_m_Colors_5(); Color_t2555686324 L_6 = ColorBlock_get_highlightedColor_m588402203(L_5, /*hidden argument*/NULL); V_0 = L_6; SpriteState_t1362986479 * L_7 = __this->get_address_of_m_SpriteState_6(); Sprite_t280657092 * L_8 = SpriteState_get_highlightedSprite_m3042451966(L_7, /*hidden argument*/NULL); V_1 = L_8; AnimationTriggers_t2532145056 * L_9 = __this->get_m_AnimationTriggers_7(); NullCheck(L_9); String_t* L_10 = AnimationTriggers_get_highlightedTrigger_m1187211321(L_9, /*hidden argument*/NULL); V_2 = L_10; goto IL_00c9; } IL_0064: { ColorBlock_t2139031574 * L_11 = __this->get_address_of_m_Colors_5(); Color_t2555686324 L_12 = ColorBlock_get_pressedColor_m3079696728(L_11, /*hidden argument*/NULL); V_0 = L_12; SpriteState_t1362986479 * L_13 = __this->get_address_of_m_SpriteState_6(); Sprite_t280657092 * L_14 = SpriteState_get_pressedSprite_m3868967445(L_13, /*hidden argument*/NULL); V_1 = L_14; AnimationTriggers_t2532145056 * L_15 = __this->get_m_AnimationTriggers_7(); NullCheck(L_15); String_t* L_16 = AnimationTriggers_get_pressedTrigger_m2840379030(L_15, /*hidden argument*/NULL); V_2 = L_16; goto IL_00c9; } IL_008d: { ColorBlock_t2139031574 * L_17 = __this->get_address_of_m_Colors_5(); Color_t2555686324 L_18 = ColorBlock_get_disabledColor_m4200465259(L_17, /*hidden argument*/NULL); V_0 = L_18; SpriteState_t1362986479 * L_19 = __this->get_address_of_m_SpriteState_6(); Sprite_t280657092 * L_20 = SpriteState_get_disabledSprite_m1003707558(L_19, /*hidden argument*/NULL); V_1 = L_20; AnimationTriggers_t2532145056 * L_21 = __this->get_m_AnimationTriggers_7(); NullCheck(L_21); String_t* L_22 = AnimationTriggers_get_disabledTrigger_m3860052542(L_21, /*hidden argument*/NULL); V_2 = L_22; goto IL_00c9; } IL_00b6: { Color_t2555686324 L_23 = Color_get_black_m650597609(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_23; V_1 = (Sprite_t280657092 *)NULL; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_24 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); V_2 = L_24; goto IL_00c9; } IL_00c9: { GameObject_t1113636619 * L_25 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); NullCheck(L_25); bool L_26 = GameObject_get_activeInHierarchy_m921367020(L_25, /*hidden argument*/NULL); if (!L_26) { goto IL_0131; } } { int32_t L_27 = __this->get_m_Transition_4(); V_3 = L_27; int32_t L_28 = V_3; if ((((int32_t)L_28) == ((int32_t)1))) { goto IL_00fb; } } { int32_t L_29 = V_3; if ((((int32_t)L_29) == ((int32_t)2))) { goto IL_0118; } } { int32_t L_30 = V_3; if ((((int32_t)L_30) == ((int32_t)3))) { goto IL_0124; } } { goto IL_0130; } IL_00fb: { Color_t2555686324 L_31 = V_0; ColorBlock_t2139031574 * L_32 = __this->get_address_of_m_Colors_5(); float L_33 = ColorBlock_get_colorMultiplier_m815752320(L_32, /*hidden argument*/NULL); Color_t2555686324 L_34 = Color_op_Multiply_m69884213(NULL /*static, unused*/, L_31, L_33, /*hidden argument*/NULL); bool L_35 = ___instant1; Selectable_StartColorTween_m3618813981(__this, L_34, L_35, /*hidden argument*/NULL); goto IL_0130; } IL_0118: { Sprite_t280657092 * L_36 = V_1; Selectable_DoSpriteSwap_m3258918083(__this, L_36, /*hidden argument*/NULL); goto IL_0130; } IL_0124: { String_t* L_37 = V_2; Selectable_TriggerAnimation_m2878474(__this, L_37, /*hidden argument*/NULL); goto IL_0130; } IL_0130: { } IL_0131: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectable(UnityEngine.Vector3) extern "C" Selectable_t3250028441 * Selectable_FindSelectable_m2348614027 (Selectable_t3250028441 * __this, Vector3_t3722313464 ___dir0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_FindSelectable_m2348614027_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t3722313464 V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; Selectable_t3250028441 * V_3 = NULL; int32_t V_4 = 0; Selectable_t3250028441 * V_5 = NULL; Navigation_t3049316579 V_6; memset(&V_6, 0, sizeof(V_6)); RectTransform_t3704657025 * V_7 = NULL; Vector3_t3722313464 V_8; memset(&V_8, 0, sizeof(V_8)); Rect_t2360479859 V_9; memset(&V_9, 0, sizeof(V_9)); Vector3_t3722313464 V_10; memset(&V_10, 0, sizeof(V_10)); float V_11 = 0.0f; float V_12 = 0.0f; Selectable_t3250028441 * V_13 = NULL; Vector3_t3722313464 G_B10_0; memset(&G_B10_0, 0, sizeof(G_B10_0)); { Vector3_t3722313464 L_0 = Vector3_get_normalized_m1684899259((&___dir0), /*hidden argument*/NULL); ___dir0 = L_0; Transform_t3600365921 * L_1 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); NullCheck(L_1); Quaternion_t2301928331 L_2 = Transform_get_rotation_m2794111148(L_1, /*hidden argument*/NULL); Quaternion_t2301928331 L_3 = Quaternion_Inverse_m2799544503(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); Vector3_t3722313464 L_4 = ___dir0; Vector3_t3722313464 L_5 = Quaternion_op_Multiply_m1022106983(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); V_0 = L_5; Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); Transform_t3600365921 * L_7 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); Vector3_t3722313464 L_8 = V_0; Vector2_t2156229523 L_9 = Vector2_op_Implicit_m1304503157(NULL /*static, unused*/, L_8, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); Vector3_t3722313464 L_10 = Selectable_GetPointOnRectEdge_m2129691872(NULL /*static, unused*/, ((RectTransform_t3704657025 *)IsInstSealed(L_7, RectTransform_t3704657025_il2cpp_TypeInfo_var)), L_9, /*hidden argument*/NULL); NullCheck(L_6); Vector3_t3722313464 L_11 = Transform_TransformPoint_m3184824030(L_6, L_10, /*hidden argument*/NULL); V_1 = L_11; V_2 = (-std::numeric_limits<float>::infinity()); V_3 = (Selectable_t3250028441 *)NULL; V_4 = 0; goto IL_0137; } IL_0053: { IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); List_1_t427135887 * L_12 = ((Selectable_t3250028441_StaticFields*)Selectable_t3250028441_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); int32_t L_13 = V_4; NullCheck(L_12); Selectable_t3250028441 * L_14 = List_1_get_Item_m2170948632(L_12, L_13, /*hidden argument*/List_1_get_Item_m2170948632_MethodInfo_var); V_5 = L_14; Selectable_t3250028441 * L_15 = V_5; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_16 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_15, __this, /*hidden argument*/NULL); if (L_16) { goto IL_007c; } } { Selectable_t3250028441 * L_17 = V_5; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_18 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_17, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_18) { goto IL_0081; } } IL_007c: { goto IL_0131; } IL_0081: { Selectable_t3250028441 * L_19 = V_5; NullCheck(L_19); bool L_20 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, L_19); if (!L_20) { goto IL_00a2; } } { Selectable_t3250028441 * L_21 = V_5; NullCheck(L_21); Navigation_t3049316579 L_22 = Selectable_get_navigation_m3508916916(L_21, /*hidden argument*/NULL); V_6 = L_22; int32_t L_23 = Navigation_get_mode_m1766451275((&V_6), /*hidden argument*/NULL); if (L_23) { goto IL_00a7; } } IL_00a2: { goto IL_0131; } IL_00a7: { Selectable_t3250028441 * L_24 = V_5; NullCheck(L_24); Transform_t3600365921 * L_25 = Component_get_transform_m2921103810(L_24, /*hidden argument*/NULL); V_7 = ((RectTransform_t3704657025 *)IsInstSealed(L_25, RectTransform_t3704657025_il2cpp_TypeInfo_var)); RectTransform_t3704657025 * L_26 = V_7; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_27 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_26, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_27) { goto IL_00dc; } } { RectTransform_t3704657025 * L_28 = V_7; NullCheck(L_28); Rect_t2360479859 L_29 = RectTransform_get_rect_m1643570810(L_28, /*hidden argument*/NULL); V_9 = L_29; Vector2_t2156229523 L_30 = Rect_get_center_m182049623((&V_9), /*hidden argument*/NULL); Vector3_t3722313464 L_31 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_30, /*hidden argument*/NULL); G_B10_0 = L_31; goto IL_00e1; } IL_00dc: { Vector3_t3722313464 L_32 = Vector3_get_zero_m1640475482(NULL /*static, unused*/, /*hidden argument*/NULL); G_B10_0 = L_32; } IL_00e1: { V_8 = G_B10_0; Selectable_t3250028441 * L_33 = V_5; NullCheck(L_33); Transform_t3600365921 * L_34 = Component_get_transform_m2921103810(L_33, /*hidden argument*/NULL); Vector3_t3722313464 L_35 = V_8; NullCheck(L_34); Vector3_t3722313464 L_36 = Transform_TransformPoint_m3184824030(L_34, L_35, /*hidden argument*/NULL); Vector3_t3722313464 L_37 = V_1; Vector3_t3722313464 L_38 = Vector3_op_Subtraction_m2566684344(NULL /*static, unused*/, L_36, L_37, /*hidden argument*/NULL); V_10 = L_38; Vector3_t3722313464 L_39 = ___dir0; Vector3_t3722313464 L_40 = V_10; float L_41 = Vector3_Dot_m240955101(NULL /*static, unused*/, L_39, L_40, /*hidden argument*/NULL); V_11 = L_41; float L_42 = V_11; if ((!(((float)L_42) <= ((float)(0.0f))))) { goto IL_0114; } } { goto IL_0131; } IL_0114: { float L_43 = V_11; float L_44 = Vector3_get_sqrMagnitude_m3958734106((&V_10), /*hidden argument*/NULL); V_12 = ((float)((float)L_43/(float)L_44)); float L_45 = V_12; float L_46 = V_2; if ((!(((float)L_45) > ((float)L_46)))) { goto IL_0130; } } { float L_47 = V_12; V_2 = L_47; Selectable_t3250028441 * L_48 = V_5; V_3 = L_48; } IL_0130: { } IL_0131: { int32_t L_49 = V_4; V_4 = ((int32_t)((int32_t)L_49+(int32_t)1)); } IL_0137: { int32_t L_50 = V_4; IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); List_1_t427135887 * L_51 = ((Selectable_t3250028441_StaticFields*)Selectable_t3250028441_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); NullCheck(L_51); int32_t L_52 = List_1_get_Count_m124153205(L_51, /*hidden argument*/List_1_get_Count_m124153205_MethodInfo_var); if ((((int32_t)L_50) < ((int32_t)L_52))) { goto IL_0053; } } { Selectable_t3250028441 * L_53 = V_3; V_13 = L_53; goto IL_0150; } IL_0150: { Selectable_t3250028441 * L_54 = V_13; return L_54; } } // UnityEngine.Vector3 UnityEngine.UI.Selectable::GetPointOnRectEdge(UnityEngine.RectTransform,UnityEngine.Vector2) extern "C" Vector3_t3722313464 Selectable_GetPointOnRectEdge_m2129691872 (Il2CppObject * __this /* static, unused */, RectTransform_t3704657025 * ___rect0, Vector2_t2156229523 ___dir1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_GetPointOnRectEdge_m2129691872_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector3_t3722313464 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Rect_t2360479859 V_2; memset(&V_2, 0, sizeof(V_2)); { RectTransform_t3704657025 * L_0 = ___rect0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0018; } } { Vector3_t3722313464 L_2 = Vector3_get_zero_m1640475482(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_2; goto IL_008c; } IL_0018: { Vector2_t2156229523 L_3 = ___dir1; Vector2_t2156229523 L_4 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_5 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_004d; } } { Vector2_t2156229523 L_6 = ___dir1; float L_7 = (&___dir1)->get_x_0(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_8 = fabsf(L_7); float L_9 = (&___dir1)->get_y_1(); float L_10 = fabsf(L_9); float L_11 = Mathf_Max_m571965535(NULL /*static, unused*/, L_8, L_10, /*hidden argument*/NULL); Vector2_t2156229523 L_12 = Vector2_op_Division_m1480625254(NULL /*static, unused*/, L_6, L_11, /*hidden argument*/NULL); ___dir1 = L_12; } IL_004d: { RectTransform_t3704657025 * L_13 = ___rect0; NullCheck(L_13); Rect_t2360479859 L_14 = RectTransform_get_rect_m1643570810(L_13, /*hidden argument*/NULL); V_1 = L_14; Vector2_t2156229523 L_15 = Rect_get_center_m182049623((&V_1), /*hidden argument*/NULL); RectTransform_t3704657025 * L_16 = ___rect0; NullCheck(L_16); Rect_t2360479859 L_17 = RectTransform_get_rect_m1643570810(L_16, /*hidden argument*/NULL); V_2 = L_17; Vector2_t2156229523 L_18 = Rect_get_size_m3542039952((&V_2), /*hidden argument*/NULL); Vector2_t2156229523 L_19 = ___dir1; Vector2_t2156229523 L_20 = Vector2_op_Multiply_m1889160058(NULL /*static, unused*/, L_19, (0.5f), /*hidden argument*/NULL); Vector2_t2156229523 L_21 = Vector2_Scale_m110064162(NULL /*static, unused*/, L_18, L_20, /*hidden argument*/NULL); Vector2_t2156229523 L_22 = Vector2_op_Addition_m2157034339(NULL /*static, unused*/, L_15, L_21, /*hidden argument*/NULL); ___dir1 = L_22; Vector2_t2156229523 L_23 = ___dir1; Vector3_t3722313464 L_24 = Vector2_op_Implicit_m1988559315(NULL /*static, unused*/, L_23, /*hidden argument*/NULL); V_0 = L_24; goto IL_008c; } IL_008c: { Vector3_t3722313464 L_25 = V_0; return L_25; } } // System.Void UnityEngine.UI.Selectable::Navigate(UnityEngine.EventSystems.AxisEventData,UnityEngine.UI.Selectable) extern "C" void Selectable_Navigate_m2538999742 (Selectable_t3250028441 * __this, AxisEventData_t2331243652 * ___eventData0, Selectable_t3250028441 * ___sel1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_Navigate_m2538999742_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Selectable_t3250028441 * L_0 = ___sel1; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0024; } } { Selectable_t3250028441 * L_2 = ___sel1; NullCheck(L_2); bool L_3 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_2); if (!L_3) { goto IL_0024; } } { AxisEventData_t2331243652 * L_4 = ___eventData0; Selectable_t3250028441 * L_5 = ___sel1; NullCheck(L_5); GameObject_t1113636619 * L_6 = Component_get_gameObject_m2648350745(L_5, /*hidden argument*/NULL); NullCheck(L_4); BaseEventData_set_selectedObject_m1456148497(L_4, L_6, /*hidden argument*/NULL); } IL_0024: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnLeft_m75080035 (Selectable_t3250028441 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Navigation_t3049316579 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m1766451275(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_0024; } } { Navigation_t3049316579 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t3250028441 * L_3 = Navigation_get_selectOnLeft_m2755354667(L_2, /*hidden argument*/NULL); V_0 = L_3; goto IL_005f; } IL_0024: { Navigation_t3049316579 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m1766451275(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)1))) { goto IL_0058; } } { Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t2301928331 L_7 = Transform_get_rotation_m2794111148(L_6, /*hidden argument*/NULL); Vector3_t3722313464 L_8 = Vector3_get_left_m3265637219(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t3722313464 L_9 = Quaternion_op_Multiply_m1022106983(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t3250028441 * L_10 = Selectable_FindSelectable_m2348614027(__this, L_9, /*hidden argument*/NULL); V_0 = L_10; goto IL_005f; } IL_0058: { V_0 = (Selectable_t3250028441 *)NULL; goto IL_005f; } IL_005f: { Selectable_t3250028441 * L_11 = V_0; return L_11; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnRight_m2374187443 (Selectable_t3250028441 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Navigation_t3049316579 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m1766451275(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_0024; } } { Navigation_t3049316579 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t3250028441 * L_3 = Navigation_get_selectOnRight_m1269340398(L_2, /*hidden argument*/NULL); V_0 = L_3; goto IL_005f; } IL_0024: { Navigation_t3049316579 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m1766451275(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)1))) { goto IL_0058; } } { Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t2301928331 L_7 = Transform_get_rotation_m2794111148(L_6, /*hidden argument*/NULL); Vector3_t3722313464 L_8 = Vector3_get_right_m2544765406(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t3722313464 L_9 = Quaternion_op_Multiply_m1022106983(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t3250028441 * L_10 = Selectable_FindSelectable_m2348614027(__this, L_9, /*hidden argument*/NULL); V_0 = L_10; goto IL_005f; } IL_0058: { V_0 = (Selectable_t3250028441 *)NULL; goto IL_005f; } IL_005f: { Selectable_t3250028441 * L_11 = V_0; return L_11; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnUp_m1814865676 (Selectable_t3250028441 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Navigation_t3049316579 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m1766451275(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_0024; } } { Navigation_t3049316579 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t3250028441 * L_3 = Navigation_get_selectOnUp_m3602387123(L_2, /*hidden argument*/NULL); V_0 = L_3; goto IL_005f; } IL_0024: { Navigation_t3049316579 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m1766451275(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)2))) { goto IL_0058; } } { Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t2301928331 L_7 = Transform_get_rotation_m2794111148(L_6, /*hidden argument*/NULL); Vector3_t3722313464 L_8 = Vector3_get_up_m2851907508(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t3722313464 L_9 = Quaternion_op_Multiply_m1022106983(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t3250028441 * L_10 = Selectable_FindSelectable_m2348614027(__this, L_9, /*hidden argument*/NULL); V_0 = L_10; goto IL_005f; } IL_0058: { V_0 = (Selectable_t3250028441 *)NULL; goto IL_005f; } IL_005f: { Selectable_t3250028441 * L_11 = V_0; return L_11; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() extern "C" Selectable_t3250028441 * Selectable_FindSelectableOnDown_m1591762582 (Selectable_t3250028441 * __this, const MethodInfo* method) { Selectable_t3250028441 * V_0 = NULL; { Navigation_t3049316579 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m1766451275(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_0024; } } { Navigation_t3049316579 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t3250028441 * L_3 = Navigation_get_selectOnDown_m1912812616(L_2, /*hidden argument*/NULL); V_0 = L_3; goto IL_005f; } IL_0024: { Navigation_t3049316579 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m1766451275(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)2))) { goto IL_0058; } } { Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t2301928331 L_7 = Transform_get_rotation_m2794111148(L_6, /*hidden argument*/NULL); Vector3_t3722313464 L_8 = Vector3_get_down_m3099436347(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t3722313464 L_9 = Quaternion_op_Multiply_m1022106983(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t3250028441 * L_10 = Selectable_FindSelectable_m2348614027(__this, L_9, /*hidden argument*/NULL); V_0 = L_10; goto IL_005f; } IL_0058: { V_0 = (Selectable_t3250028441 *)NULL; goto IL_005f; } IL_005f: { Selectable_t3250028441 * L_11 = V_0; return L_11; } } // System.Void UnityEngine.UI.Selectable::OnMove(UnityEngine.EventSystems.AxisEventData) extern "C" void Selectable_OnMove_m2972933239 (Selectable_t3250028441 * __this, AxisEventData_t2331243652 * ___eventData0, const MethodInfo* method) { int32_t V_0 = 0; { AxisEventData_t2331243652 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = AxisEventData_get_moveDir_m2423724085(L_0, /*hidden argument*/NULL); V_0 = L_1; int32_t L_2 = V_0; switch (L_2) { case 0: { goto IL_0047; } case 1: { goto IL_0035; } case 2: { goto IL_0023; } case 3: { goto IL_0059; } } } { goto IL_006b; } IL_0023: { AxisEventData_t2331243652 * L_3 = ___eventData0; Selectable_t3250028441 * L_4 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(28 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() */, __this); Selectable_Navigate_m2538999742(__this, L_3, L_4, /*hidden argument*/NULL); goto IL_006b; } IL_0035: { AxisEventData_t2331243652 * L_5 = ___eventData0; Selectable_t3250028441 * L_6 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(29 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() */, __this); Selectable_Navigate_m2538999742(__this, L_5, L_6, /*hidden argument*/NULL); goto IL_006b; } IL_0047: { AxisEventData_t2331243652 * L_7 = ___eventData0; Selectable_t3250028441 * L_8 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(27 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() */, __this); Selectable_Navigate_m2538999742(__this, L_7, L_8, /*hidden argument*/NULL); goto IL_006b; } IL_0059: { AxisEventData_t2331243652 * L_9 = ___eventData0; Selectable_t3250028441 * L_10 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(30 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() */, __this); Selectable_Navigate_m2538999742(__this, L_9, L_10, /*hidden argument*/NULL); goto IL_006b; } IL_006b: { return; } } // System.Void UnityEngine.UI.Selectable::StartColorTween(UnityEngine.Color,System.Boolean) extern "C" void Selectable_StartColorTween_m3618813981 (Selectable_t3250028441 * __this, Color_t2555686324 ___targetColor0, bool ___instant1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_StartColorTween_m3618813981_MetadataUsageId); s_Il2CppMethodInitialized = true; } Color_t2555686324 G_B4_0; memset(&G_B4_0, 0, sizeof(G_B4_0)); Graphic_t1660335611 * G_B4_1 = NULL; Color_t2555686324 G_B3_0; memset(&G_B3_0, 0, sizeof(G_B3_0)); Graphic_t1660335611 * G_B3_1 = NULL; float G_B5_0 = 0.0f; Color_t2555686324 G_B5_1; memset(&G_B5_1, 0, sizeof(G_B5_1)); Graphic_t1660335611 * G_B5_2 = NULL; { Graphic_t1660335611 * L_0 = __this->get_m_TargetGraphic_9(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0017; } } { goto IL_0040; } IL_0017: { Graphic_t1660335611 * L_2 = __this->get_m_TargetGraphic_9(); Color_t2555686324 L_3 = ___targetColor0; bool L_4 = ___instant1; G_B3_0 = L_3; G_B3_1 = L_2; if (!L_4) { G_B4_0 = L_3; G_B4_1 = L_2; goto IL_002e; } } { G_B5_0 = (0.0f); G_B5_1 = G_B3_0; G_B5_2 = G_B3_1; goto IL_0039; } IL_002e: { ColorBlock_t2139031574 * L_5 = __this->get_address_of_m_Colors_5(); float L_6 = ColorBlock_get_fadeDuration_m121071467(L_5, /*hidden argument*/NULL); G_B5_0 = L_6; G_B5_1 = G_B4_0; G_B5_2 = G_B4_1; } IL_0039: { NullCheck(G_B5_2); VirtActionInvoker4< Color_t2555686324 , float, bool, bool >::Invoke(46 /* System.Void UnityEngine.UI.Graphic::CrossFadeColor(UnityEngine.Color,System.Single,System.Boolean,System.Boolean) */, G_B5_2, G_B5_1, G_B5_0, (bool)1, (bool)1); } IL_0040: { return; } } // System.Void UnityEngine.UI.Selectable::DoSpriteSwap(UnityEngine.Sprite) extern "C" void Selectable_DoSpriteSwap_m3258918083 (Selectable_t3250028441 * __this, Sprite_t280657092 * ___newSprite0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_DoSpriteSwap_m3258918083_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Image_t2670269651 * L_0 = Selectable_get_image_m1928917691(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0017; } } { goto IL_0023; } IL_0017: { Image_t2670269651 * L_2 = Selectable_get_image_m1928917691(__this, /*hidden argument*/NULL); Sprite_t280657092 * L_3 = ___newSprite0; NullCheck(L_2); Image_set_overrideSprite_m3213596394(L_2, L_3, /*hidden argument*/NULL); } IL_0023: { return; } } // System.Void UnityEngine.UI.Selectable::TriggerAnimation(System.String) extern "C" void Selectable_TriggerAnimation_m2878474 (Selectable_t3250028441 * __this, String_t* ___triggername0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_TriggerAnimation_m2878474_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = Selectable_get_transition_m4252319269(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_0) == ((uint32_t)3)))) { goto IL_0049; } } { Animator_t434523843 * L_1 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_2) { goto IL_0049; } } { Animator_t434523843 * L_3 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); NullCheck(L_3); bool L_4 = Behaviour_get_isActiveAndEnabled_m3013577336(L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_0049; } } { Animator_t434523843 * L_5 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); NullCheck(L_5); bool L_6 = Animator_get_hasBoundPlayables_m117367483(L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_0049; } } { String_t* L_7 = ___triggername0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_8 = String_IsNullOrEmpty_m2969720369(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_004e; } } IL_0049: { goto IL_00b2; } IL_004e: { Animator_t434523843 * L_9 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); AnimationTriggers_t2532145056 * L_10 = __this->get_m_AnimationTriggers_7(); NullCheck(L_10); String_t* L_11 = AnimationTriggers_get_normalTrigger_m3461765293(L_10, /*hidden argument*/NULL); NullCheck(L_9); Animator_ResetTrigger_m2500195305(L_9, L_11, /*hidden argument*/NULL); Animator_t434523843 * L_12 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); AnimationTriggers_t2532145056 * L_13 = __this->get_m_AnimationTriggers_7(); NullCheck(L_13); String_t* L_14 = AnimationTriggers_get_pressedTrigger_m2840379030(L_13, /*hidden argument*/NULL); NullCheck(L_12); Animator_ResetTrigger_m2500195305(L_12, L_14, /*hidden argument*/NULL); Animator_t434523843 * L_15 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); AnimationTriggers_t2532145056 * L_16 = __this->get_m_AnimationTriggers_7(); NullCheck(L_16); String_t* L_17 = AnimationTriggers_get_highlightedTrigger_m1187211321(L_16, /*hidden argument*/NULL); NullCheck(L_15); Animator_ResetTrigger_m2500195305(L_15, L_17, /*hidden argument*/NULL); Animator_t434523843 * L_18 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); AnimationTriggers_t2532145056 * L_19 = __this->get_m_AnimationTriggers_7(); NullCheck(L_19); String_t* L_20 = AnimationTriggers_get_disabledTrigger_m3860052542(L_19, /*hidden argument*/NULL); NullCheck(L_18); Animator_ResetTrigger_m2500195305(L_18, L_20, /*hidden argument*/NULL); Animator_t434523843 * L_21 = Selectable_get_animator_m2899312855(__this, /*hidden argument*/NULL); String_t* L_22 = ___triggername0; NullCheck(L_21); Animator_SetTrigger_m2194443996(L_21, L_22, /*hidden argument*/NULL); } IL_00b2: { return; } } // System.Boolean UnityEngine.UI.Selectable::IsHighlighted(UnityEngine.EventSystems.BaseEventData) extern "C" bool Selectable_IsHighlighted_m1215066233 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_IsHighlighted_m1215066233_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; bool V_1 = false; PointerEventData_t3807901092 * V_2 = NULL; bool G_B8_0 = false; bool G_B6_0 = false; bool G_B7_0 = false; bool G_B16_0 = false; bool G_B11_0 = false; bool G_B9_0 = false; bool G_B10_0 = false; bool G_B14_0 = false; bool G_B12_0 = false; bool G_B13_0 = false; int32_t G_B15_0 = 0; bool G_B15_1 = false; int32_t G_B17_0 = 0; bool G_B17_1 = false; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0013; } } { V_0 = (bool)0; goto IL_00da; } IL_0013: { bool L_1 = Selectable_IsPressed_m3209220049(__this, /*hidden argument*/NULL); if (!L_1) { goto IL_0025; } } { V_0 = (bool)0; goto IL_00da; } IL_0025: { bool L_2 = Selectable_get_hasSelection_m1083548109(__this, /*hidden argument*/NULL); V_1 = L_2; BaseEventData_t3903027533 * L_3 = ___eventData0; if (!((PointerEventData_t3807901092 *)IsInstClass(L_3, PointerEventData_t3807901092_il2cpp_TypeInfo_var))) { goto IL_00c8; } } { BaseEventData_t3903027533 * L_4 = ___eventData0; V_2 = ((PointerEventData_t3807901092 *)IsInstClass(L_4, PointerEventData_t3807901092_il2cpp_TypeInfo_var)); bool L_5 = V_1; bool L_6 = Selectable_get_isPointerDown_m3518318267(__this, /*hidden argument*/NULL); G_B6_0 = L_5; if (!L_6) { G_B8_0 = L_5; goto IL_006c; } } { bool L_7 = Selectable_get_isPointerInside_m520529781(__this, /*hidden argument*/NULL); G_B7_0 = G_B6_0; if (L_7) { G_B8_0 = G_B6_0; goto IL_006c; } } { PointerEventData_t3807901092 * L_8 = V_2; NullCheck(L_8); GameObject_t1113636619 * L_9 = PointerEventData_get_pointerPress_m3897111385(L_8, /*hidden argument*/NULL); GameObject_t1113636619 * L_10 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_11 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); G_B8_0 = G_B7_0; if (L_11) { G_B16_0 = G_B7_0; goto IL_00bf; } } IL_006c: { bool L_12 = Selectable_get_isPointerDown_m3518318267(__this, /*hidden argument*/NULL); G_B9_0 = G_B8_0; if (L_12) { G_B11_0 = G_B8_0; goto IL_0098; } } { bool L_13 = Selectable_get_isPointerInside_m520529781(__this, /*hidden argument*/NULL); G_B10_0 = G_B9_0; if (!L_13) { G_B11_0 = G_B9_0; goto IL_0098; } } { PointerEventData_t3807901092 * L_14 = V_2; NullCheck(L_14); GameObject_t1113636619 * L_15 = PointerEventData_get_pointerPress_m3897111385(L_14, /*hidden argument*/NULL); GameObject_t1113636619 * L_16 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_17 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_15, L_16, /*hidden argument*/NULL); G_B11_0 = G_B10_0; if (L_17) { G_B16_0 = G_B10_0; goto IL_00bf; } } IL_0098: { bool L_18 = Selectable_get_isPointerDown_m3518318267(__this, /*hidden argument*/NULL); G_B12_0 = G_B11_0; if (L_18) { G_B14_0 = G_B11_0; goto IL_00bc; } } { bool L_19 = Selectable_get_isPointerInside_m520529781(__this, /*hidden argument*/NULL); G_B13_0 = G_B12_0; if (!L_19) { G_B14_0 = G_B12_0; goto IL_00bc; } } { PointerEventData_t3807901092 * L_20 = V_2; NullCheck(L_20); GameObject_t1113636619 * L_21 = PointerEventData_get_pointerPress_m3897111385(L_20, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_22 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_21, (Object_t631007953 *)NULL, /*hidden argument*/NULL); G_B15_0 = ((int32_t)(L_22)); G_B15_1 = G_B13_0; goto IL_00bd; } IL_00bc: { G_B15_0 = 0; G_B15_1 = G_B14_0; } IL_00bd: { G_B17_0 = G_B15_0; G_B17_1 = G_B15_1; goto IL_00c0; } IL_00bf: { G_B17_0 = 1; G_B17_1 = G_B16_0; } IL_00c0: { V_1 = (bool)((int32_t)((int32_t)G_B17_1|(int32_t)G_B17_0)); goto IL_00d3; } IL_00c8: { bool L_23 = V_1; bool L_24 = Selectable_get_isPointerInside_m520529781(__this, /*hidden argument*/NULL); V_1 = (bool)((int32_t)((int32_t)L_23|(int32_t)L_24)); } IL_00d3: { bool L_25 = V_1; V_0 = L_25; goto IL_00da; } IL_00da: { bool L_26 = V_0; return L_26; } } // System.Boolean UnityEngine.UI.Selectable::IsPressed(UnityEngine.EventSystems.BaseEventData) extern "C" bool Selectable_IsPressed_m907486548 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { bool V_0 = false; { bool L_0 = Selectable_IsPressed_m3209220049(__this, /*hidden argument*/NULL); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Boolean UnityEngine.UI.Selectable::IsPressed() extern "C" bool Selectable_IsPressed_m3209220049 (Selectable_t3250028441 * __this, const MethodInfo* method) { bool V_0 = false; int32_t G_B5_0 = 0; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0013; } } { V_0 = (bool)0; goto IL_002d; } IL_0013: { bool L_1 = Selectable_get_isPointerInside_m520529781(__this, /*hidden argument*/NULL); if (!L_1) { goto IL_0026; } } { bool L_2 = Selectable_get_isPointerDown_m3518318267(__this, /*hidden argument*/NULL); G_B5_0 = ((int32_t)(L_2)); goto IL_0027; } IL_0026: { G_B5_0 = 0; } IL_0027: { V_0 = (bool)G_B5_0; goto IL_002d; } IL_002d: { bool L_3 = V_0; return L_3; } } // System.Void UnityEngine.UI.Selectable::UpdateSelectionState(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_UpdateSelectionState_m682863465 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { { bool L_0 = Selectable_IsPressed_m3209220049(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0019; } } { __this->set_m_CurrentSelectionState_11(2); goto IL_0039; } IL_0019: { BaseEventData_t3903027533 * L_1 = ___eventData0; bool L_2 = Selectable_IsHighlighted_m1215066233(__this, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0032; } } { __this->set_m_CurrentSelectionState_11(1); goto IL_0039; } IL_0032: { __this->set_m_CurrentSelectionState_11(0); } IL_0039: { return; } } // System.Void UnityEngine.UI.Selectable::EvaluateAndTransitionToSelectionState(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_EvaluateAndTransitionToSelectionState_m3735354430 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0017; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_001c; } } IL_0017: { goto IL_002a; } IL_001c: { BaseEventData_t3903027533 * L_2 = ___eventData0; Selectable_UpdateSelectionState_m682863465(__this, L_2, /*hidden argument*/NULL); Selectable_InternalEvaluateAndTransitionToSelectionState_m2188373385(__this, (bool)0, /*hidden argument*/NULL); } IL_002a: { return; } } // System.Void UnityEngine.UI.Selectable::InternalEvaluateAndTransitionToSelectionState(System.Boolean) extern "C" void Selectable_InternalEvaluateAndTransitionToSelectionState_m2188373385 (Selectable_t3250028441 * __this, bool ___instant0, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_CurrentSelectionState_11(); V_0 = L_0; bool L_1 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_1) { goto IL_0020; } } { bool L_2 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_2) { goto IL_0020; } } { V_0 = 3; } IL_0020: { int32_t L_3 = V_0; bool L_4 = ___instant0; VirtActionInvoker2< int32_t, bool >::Invoke(26 /* System.Void UnityEngine.UI.Selectable::DoStateTransition(UnityEngine.UI.Selectable/SelectionState,System.Boolean) */, __this, L_3, L_4); return; } } // System.Void UnityEngine.UI.Selectable::OnPointerDown(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerDown_m1086067264 (Selectable_t3250028441 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_OnPointerDown_m1086067264_MetadataUsageId); s_Il2CppMethodInitialized = true; } Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_005e; } IL_0011: { bool L_2 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (!L_2) { goto IL_0050; } } { Navigation_t3049316579 L_3 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_3; int32_t L_4 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if (!L_4) { goto IL_0050; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_5 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_0050; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_7 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); GameObject_t1113636619 * L_8 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_9 = ___eventData0; NullCheck(L_7); EventSystem_SetSelectedGameObject_m3267446555(L_7, L_8, L_9, /*hidden argument*/NULL); } IL_0050: { Selectable_set_isPointerDown_m1776212707(__this, (bool)1, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_10 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m3735354430(__this, L_10, /*hidden argument*/NULL); } IL_005e: { return; } } // System.Void UnityEngine.UI.Selectable::OnPointerUp(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerUp_m3228301429 (Selectable_t3250028441 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_001f; } IL_0011: { Selectable_set_isPointerDown_m1776212707(__this, (bool)0, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_2 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m3735354430(__this, L_2, /*hidden argument*/NULL); } IL_001f: { return; } } // System.Void UnityEngine.UI.Selectable::OnPointerEnter(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerEnter_m3378734298 (Selectable_t3250028441 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { Selectable_set_isPointerInside_m701571657(__this, (bool)1, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m3735354430(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnPointerExit(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerExit_m110182483 (Selectable_t3250028441 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { Selectable_set_isPointerInside_m701571657(__this, (bool)0, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m3735354430(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnSelect(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_OnSelect_m1063214042 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { { Selectable_set_hasSelection_m1076374937(__this, (bool)1, /*hidden argument*/NULL); BaseEventData_t3903027533 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m3735354430(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnDeselect(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_OnDeselect_m2712096814 (Selectable_t3250028441 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { { Selectable_set_hasSelection_m1076374937(__this, (bool)0, /*hidden argument*/NULL); BaseEventData_t3903027533 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m3735354430(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::Select() extern "C" void Selectable_Select_m1465131241 (Selectable_t3250028441 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable_Select_m1465131241_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_0 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_1) { goto IL_0020; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_2 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_2); bool L_3 = EventSystem_get_alreadySelecting_m2187738478(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0025; } } IL_0020: { goto IL_0035; } IL_0025: { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t1003666588_il2cpp_TypeInfo_var); EventSystem_t1003666588 * L_4 = EventSystem_get_current_m1416377559(NULL /*static, unused*/, /*hidden argument*/NULL); GameObject_t1113636619 * L_5 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); NullCheck(L_4); EventSystem_SetSelectedGameObject_m2232337908(L_4, L_5, /*hidden argument*/NULL); } IL_0035: { return; } } // System.Void UnityEngine.UI.Selectable::.cctor() extern "C" void Selectable__cctor_m1838624427 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Selectable__cctor_m1838624427_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t427135887 * L_0 = (List_1_t427135887 *)il2cpp_codegen_object_new(List_1_t427135887_il2cpp_TypeInfo_var); List_1__ctor_m2565882233(L_0, /*hidden argument*/List_1__ctor_m2565882233_MethodInfo_var); ((Selectable_t3250028441_StaticFields*)Selectable_t3250028441_il2cpp_TypeInfo_var->static_fields)->set_s_List_2(L_0); return; } } // System.Boolean UnityEngine.UI.SetPropertyUtility::SetColor(UnityEngine.Color&,UnityEngine.Color) extern "C" bool SetPropertyUtility_SetColor_m2229203028 (Il2CppObject * __this /* static, unused */, Color_t2555686324 * ___currentValue0, Color_t2555686324 ___newValue1, const MethodInfo* method) { bool V_0 = false; { Color_t2555686324 * L_0 = ___currentValue0; float L_1 = L_0->get_r_0(); float L_2 = (&___newValue1)->get_r_0(); if ((!(((float)L_1) == ((float)L_2)))) { goto IL_0050; } } { Color_t2555686324 * L_3 = ___currentValue0; float L_4 = L_3->get_g_1(); float L_5 = (&___newValue1)->get_g_1(); if ((!(((float)L_4) == ((float)L_5)))) { goto IL_0050; } } { Color_t2555686324 * L_6 = ___currentValue0; float L_7 = L_6->get_b_2(); float L_8 = (&___newValue1)->get_b_2(); if ((!(((float)L_7) == ((float)L_8)))) { goto IL_0050; } } { Color_t2555686324 * L_9 = ___currentValue0; float L_10 = L_9->get_a_3(); float L_11 = (&___newValue1)->get_a_3(); if ((!(((float)L_10) == ((float)L_11)))) { goto IL_0050; } } { V_0 = (bool)0; goto IL_005e; } IL_0050: { Color_t2555686324 * L_12 = ___currentValue0; Color_t2555686324 L_13 = ___newValue1; (*(Color_t2555686324 *)L_12) = L_13; V_0 = (bool)1; goto IL_005e; } IL_005e: { bool L_14 = V_0; return L_14; } } // System.Void UnityEngine.UI.Shadow::.ctor() extern "C" void Shadow__ctor_m3924185169 (Shadow_t773074319 * __this, const MethodInfo* method) { { Color_t2555686324 L_0; memset(&L_0, 0, sizeof(L_0)); Color__ctor_m3057542999(&L_0, (0.0f), (0.0f), (0.0f), (0.5f), /*hidden argument*/NULL); __this->set_m_EffectColor_3(L_0); Vector2_t2156229523 L_1; memset(&L_1, 0, sizeof(L_1)); Vector2__ctor_m4060800441(&L_1, (1.0f), (-1.0f), /*hidden argument*/NULL); __this->set_m_EffectDistance_4(L_1); __this->set_m_UseGraphicAlpha_5((bool)1); BaseMeshEffect__ctor_m2277545720(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Color UnityEngine.UI.Shadow::get_effectColor() extern "C" Color_t2555686324 Shadow_get_effectColor_m911451105 (Shadow_t773074319 * __this, const MethodInfo* method) { Color_t2555686324 V_0; memset(&V_0, 0, sizeof(V_0)); { Color_t2555686324 L_0 = __this->get_m_EffectColor_3(); V_0 = L_0; goto IL_000d; } IL_000d: { Color_t2555686324 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Shadow::set_effectColor(UnityEngine.Color) extern "C" void Shadow_set_effectColor_m3910676693 (Shadow_t773074319 * __this, Color_t2555686324 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Shadow_set_effectColor_m3910676693_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Color_t2555686324 L_0 = ___value0; __this->set_m_EffectColor_3(L_0); Graphic_t1660335611 * L_1 = BaseMeshEffect_get_graphic_m1852367505(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0024; } } { Graphic_t1660335611 * L_3 = BaseMeshEffect_get_graphic_m1852367505(__this, /*hidden argument*/NULL); NullCheck(L_3); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, L_3); } IL_0024: { return; } } // UnityEngine.Vector2 UnityEngine.UI.Shadow::get_effectDistance() extern "C" Vector2_t2156229523 Shadow_get_effectDistance_m1966046753 (Shadow_t773074319 * __this, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); { Vector2_t2156229523 L_0 = __this->get_m_EffectDistance_4(); V_0 = L_0; goto IL_000d; } IL_000d: { Vector2_t2156229523 L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Shadow::set_effectDistance(UnityEngine.Vector2) extern "C" void Shadow_set_effectDistance_m2763324811 (Shadow_t773074319 * __this, Vector2_t2156229523 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Shadow_set_effectDistance_m2763324811_MetadataUsageId); s_Il2CppMethodInitialized = true; } { float L_0 = (&___value0)->get_x_0(); if ((!(((float)L_0) > ((float)(600.0f))))) { goto IL_001e; } } { (&___value0)->set_x_0((600.0f)); } IL_001e: { float L_1 = (&___value0)->get_x_0(); if ((!(((float)L_1) < ((float)(-600.0f))))) { goto IL_003b; } } { (&___value0)->set_x_0((-600.0f)); } IL_003b: { float L_2 = (&___value0)->get_y_1(); if ((!(((float)L_2) > ((float)(600.0f))))) { goto IL_0058; } } { (&___value0)->set_y_1((600.0f)); } IL_0058: { float L_3 = (&___value0)->get_y_1(); if ((!(((float)L_3) < ((float)(-600.0f))))) { goto IL_0075; } } { (&___value0)->set_y_1((-600.0f)); } IL_0075: { Vector2_t2156229523 L_4 = __this->get_m_EffectDistance_4(); Vector2_t2156229523 L_5 = ___value0; bool L_6 = Vector2_op_Equality_m3476359499(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_008b; } } { goto IL_00ae; } IL_008b: { Vector2_t2156229523 L_7 = ___value0; __this->set_m_EffectDistance_4(L_7); Graphic_t1660335611 * L_8 = BaseMeshEffect_get_graphic_m1852367505(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_9 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_8, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_9) { goto IL_00ae; } } { Graphic_t1660335611 * L_10 = BaseMeshEffect_get_graphic_m1852367505(__this, /*hidden argument*/NULL); NullCheck(L_10); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, L_10); } IL_00ae: { return; } } // System.Boolean UnityEngine.UI.Shadow::get_useGraphicAlpha() extern "C" bool Shadow_get_useGraphicAlpha_m2000038904 (Shadow_t773074319 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_UseGraphicAlpha_5(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Shadow::set_useGraphicAlpha(System.Boolean) extern "C" void Shadow_set_useGraphicAlpha_m2224202025 (Shadow_t773074319 * __this, bool ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Shadow_set_useGraphicAlpha_m2224202025_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = ___value0; __this->set_m_UseGraphicAlpha_5(L_0); Graphic_t1660335611 * L_1 = BaseMeshEffect_get_graphic_m1852367505(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0024; } } { Graphic_t1660335611 * L_3 = BaseMeshEffect_get_graphic_m1852367505(__this, /*hidden argument*/NULL); NullCheck(L_3); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, L_3); } IL_0024: { return; } } // System.Void UnityEngine.UI.Shadow::ApplyShadowZeroAlloc(System.Collections.Generic.List`1<UnityEngine.UIVertex>,UnityEngine.Color32,System.Int32,System.Int32,System.Single,System.Single) extern "C" void Shadow_ApplyShadowZeroAlloc_m1225757410 (Shadow_t773074319 * __this, List_1_t1234605051 * ___verts0, Color32_t2600501292 ___color1, int32_t ___start2, int32_t ___end3, float ___x4, float ___y5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Shadow_ApplyShadowZeroAlloc_m1225757410_MetadataUsageId); s_Il2CppMethodInitialized = true; } UIVertex_t4057497605 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t V_1 = 0; int32_t V_2 = 0; Vector3_t3722313464 V_3; memset(&V_3, 0, sizeof(V_3)); Color32_t2600501292 V_4; memset(&V_4, 0, sizeof(V_4)); UIVertex_t4057497605 V_5; memset(&V_5, 0, sizeof(V_5)); { List_1_t1234605051 * L_0 = ___verts0; NullCheck(L_0); int32_t L_1 = List_1_get_Count_m401353472(L_0, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); int32_t L_2 = ___end3; int32_t L_3 = ___start2; V_1 = ((int32_t)((int32_t)((int32_t)((int32_t)L_1+(int32_t)L_2))-(int32_t)L_3)); List_1_t1234605051 * L_4 = ___verts0; NullCheck(L_4); int32_t L_5 = List_1_get_Capacity_m3666274724(L_4, /*hidden argument*/List_1_get_Capacity_m3666274724_MethodInfo_var); int32_t L_6 = V_1; if ((((int32_t)L_5) >= ((int32_t)L_6))) { goto IL_0020; } } { List_1_t1234605051 * L_7 = ___verts0; int32_t L_8 = V_1; NullCheck(L_7); List_1_set_Capacity_m2777925136(L_7, L_8, /*hidden argument*/List_1_set_Capacity_m2777925136_MethodInfo_var); } IL_0020: { int32_t L_9 = ___start2; V_2 = L_9; goto IL_00b6; } IL_0027: { List_1_t1234605051 * L_10 = ___verts0; int32_t L_11 = V_2; NullCheck(L_10); UIVertex_t4057497605 L_12 = List_1_get_Item_m457221236(L_10, L_11, /*hidden argument*/List_1_get_Item_m457221236_MethodInfo_var); V_0 = L_12; List_1_t1234605051 * L_13 = ___verts0; UIVertex_t4057497605 L_14 = V_0; NullCheck(L_13); List_1_Add_m2586421604(L_13, L_14, /*hidden argument*/List_1_Add_m2586421604_MethodInfo_var); Vector3_t3722313464 L_15 = (&V_0)->get_position_0(); V_3 = L_15; Vector3_t3722313464 * L_16 = (&V_3); float L_17 = L_16->get_x_1(); float L_18 = ___x4; L_16->set_x_1(((float)((float)L_17+(float)L_18))); Vector3_t3722313464 * L_19 = (&V_3); float L_20 = L_19->get_y_2(); float L_21 = ___y5; L_19->set_y_2(((float)((float)L_20+(float)L_21))); Vector3_t3722313464 L_22 = V_3; (&V_0)->set_position_0(L_22); Color32_t2600501292 L_23 = ___color1; V_4 = L_23; bool L_24 = __this->get_m_UseGraphicAlpha_5(); if (!L_24) { goto IL_00a0; } } { uint8_t L_25 = (&V_4)->get_a_3(); List_1_t1234605051 * L_26 = ___verts0; int32_t L_27 = V_2; NullCheck(L_26); UIVertex_t4057497605 L_28 = List_1_get_Item_m457221236(L_26, L_27, /*hidden argument*/List_1_get_Item_m457221236_MethodInfo_var); V_5 = L_28; Color32_t2600501292 * L_29 = (&V_5)->get_address_of_color_2(); uint8_t L_30 = L_29->get_a_3(); (&V_4)->set_a_3((uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_25*(int32_t)L_30))/(int32_t)((int32_t)255))))))); } IL_00a0: { Color32_t2600501292 L_31 = V_4; (&V_0)->set_color_2(L_31); List_1_t1234605051 * L_32 = ___verts0; int32_t L_33 = V_2; UIVertex_t4057497605 L_34 = V_0; NullCheck(L_32); List_1_set_Item_m2057272351(L_32, L_33, L_34, /*hidden argument*/List_1_set_Item_m2057272351_MethodInfo_var); int32_t L_35 = V_2; V_2 = ((int32_t)((int32_t)L_35+(int32_t)1)); } IL_00b6: { int32_t L_36 = V_2; int32_t L_37 = ___end3; if ((((int32_t)L_36) < ((int32_t)L_37))) { goto IL_0027; } } { return; } } // System.Void UnityEngine.UI.Shadow::ApplyShadow(System.Collections.Generic.List`1<UnityEngine.UIVertex>,UnityEngine.Color32,System.Int32,System.Int32,System.Single,System.Single) extern "C" void Shadow_ApplyShadow_m3787949518 (Shadow_t773074319 * __this, List_1_t1234605051 * ___verts0, Color32_t2600501292 ___color1, int32_t ___start2, int32_t ___end3, float ___x4, float ___y5, const MethodInfo* method) { { List_1_t1234605051 * L_0 = ___verts0; Color32_t2600501292 L_1 = ___color1; int32_t L_2 = ___start2; int32_t L_3 = ___end3; float L_4 = ___x4; float L_5 = ___y5; Shadow_ApplyShadowZeroAlloc_m1225757410(__this, L_0, L_1, L_2, L_3, L_4, L_5, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Shadow::ModifyMesh(UnityEngine.UI.VertexHelper) extern "C" void Shadow_ModifyMesh_m1374575027 (Shadow_t773074319 * __this, VertexHelper_t2453304189 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Shadow_ModifyMesh_m1374575027_MetadataUsageId); s_Il2CppMethodInitialized = true; } List_1_t1234605051 * V_0 = NULL; Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0011; } } { goto IL_0066; } IL_0011: { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t792119500_il2cpp_TypeInfo_var); List_1_t1234605051 * L_1 = ListPool_1_Get_m738675669(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m738675669_MethodInfo_var); V_0 = L_1; VertexHelper_t2453304189 * L_2 = ___vh0; List_1_t1234605051 * L_3 = V_0; NullCheck(L_2); VertexHelper_GetUIVertexStream_m785241639(L_2, L_3, /*hidden argument*/NULL); List_1_t1234605051 * L_4 = V_0; Color_t2555686324 L_5 = Shadow_get_effectColor_m911451105(__this, /*hidden argument*/NULL); Color32_t2600501292 L_6 = Color32_op_Implicit_m2622936441(NULL /*static, unused*/, L_5, /*hidden argument*/NULL); List_1_t1234605051 * L_7 = V_0; NullCheck(L_7); int32_t L_8 = List_1_get_Count_m401353472(L_7, /*hidden argument*/List_1_get_Count_m401353472_MethodInfo_var); Vector2_t2156229523 L_9 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_1 = L_9; float L_10 = (&V_1)->get_x_0(); Vector2_t2156229523 L_11 = Shadow_get_effectDistance_m1966046753(__this, /*hidden argument*/NULL); V_2 = L_11; float L_12 = (&V_2)->get_y_1(); Shadow_ApplyShadow_m3787949518(__this, L_4, L_6, 0, L_8, L_10, L_12, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_13 = ___vh0; NullCheck(L_13); VertexHelper_Clear_m627349662(L_13, /*hidden argument*/NULL); VertexHelper_t2453304189 * L_14 = ___vh0; List_1_t1234605051 * L_15 = V_0; NullCheck(L_14); VertexHelper_AddUIVertexTriangleStream_m3255143338(L_14, L_15, /*hidden argument*/NULL); List_1_t1234605051 * L_16 = V_0; ListPool_1_Release_m1246825787(NULL /*static, unused*/, L_16, /*hidden argument*/ListPool_1_Release_m1246825787_MethodInfo_var); } IL_0066: { return; } } // System.Void UnityEngine.UI.Slider::.ctor() extern "C" void Slider__ctor_m873361617 (Slider_t3903728902 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider__ctor_m873361617_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_m_Direction_18(0); __this->set_m_MinValue_19((0.0f)); __this->set_m_MaxValue_20((1.0f)); __this->set_m_WholeNumbers_21((bool)0); SliderEvent_t3180273144 * L_0 = (SliderEvent_t3180273144 *)il2cpp_codegen_object_new(SliderEvent_t3180273144_il2cpp_TypeInfo_var); SliderEvent__ctor_m3149452941(L_0, /*hidden argument*/NULL); __this->set_m_OnValueChanged_23(L_0); Vector2_t2156229523 L_1 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_29(L_1); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); Selectable__ctor_m58942866(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.Slider::get_fillRect() extern "C" RectTransform_t3704657025 * Slider_get_fillRect_m4019111459 (Slider_t3903728902 * __this, const MethodInfo* method) { RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_FillRect_16(); V_0 = L_0; goto IL_000d; } IL_000d: { RectTransform_t3704657025 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_fillRect(UnityEngine.RectTransform) extern "C" void Slider_set_fillRect_m2656251767 (Slider_t3903728902 * __this, RectTransform_t3704657025 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_fillRect_m2656251767_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t3704657025 ** L_0 = __this->get_address_of_m_FillRect_16(); RectTransform_t3704657025 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854_MethodInfo_var); if (!L_2) { goto IL_0020; } } { Slider_UpdateCachedReferences_m3259451627(__this, /*hidden argument*/NULL); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_0020: { return; } } // UnityEngine.RectTransform UnityEngine.UI.Slider::get_handleRect() extern "C" RectTransform_t3704657025 * Slider_get_handleRect_m3716529459 (Slider_t3903728902 * __this, const MethodInfo* method) { RectTransform_t3704657025 * V_0 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_HandleRect_17(); V_0 = L_0; goto IL_000d; } IL_000d: { RectTransform_t3704657025 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_handleRect(UnityEngine.RectTransform) extern "C" void Slider_set_handleRect_m1101657556 (Slider_t3903728902 * __this, RectTransform_t3704657025 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_handleRect_m1101657556_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t3704657025 ** L_0 = __this->get_address_of_m_HandleRect_17(); RectTransform_t3704657025 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisRectTransform_t3704657025_m1943411854_MethodInfo_var); if (!L_2) { goto IL_0020; } } { Slider_UpdateCachedReferences_m3259451627(__this, /*hidden argument*/NULL); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_0020: { return; } } // UnityEngine.UI.Slider/Direction UnityEngine.UI.Slider::get_direction() extern "C" int32_t Slider_get_direction_m3871593184 (Slider_t3903728902 * __this, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = __this->get_m_Direction_18(); V_0 = L_0; goto IL_000d; } IL_000d: { int32_t L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_direction(UnityEngine.UI.Slider/Direction) extern "C" void Slider_set_direction_m3354648663 (Slider_t3903728902 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_direction_m3354648663_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t* L_0 = __this->get_address_of_m_Direction_18(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisDirection_t337909235_m916002679(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisDirection_t337909235_m916002679_MethodInfo_var); if (!L_2) { goto IL_0018; } } { Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_0018: { return; } } // System.Single UnityEngine.UI.Slider::get_minValue() extern "C" float Slider_get_minValue_m3250350293 (Slider_t3903728902 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_MinValue_19(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_minValue(System.Single) extern "C" void Slider_set_minValue_m3431883418 (Slider_t3903728902 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_minValue_m3431883418_MetadataUsageId); s_Il2CppMethodInitialized = true; } { float* L_0 = __this->get_address_of_m_MinValue_19(); float L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785_MethodInfo_var); if (!L_2) { goto IL_0026; } } { float L_3 = __this->get_m_Value_22(); Slider_Set_m1477870360(__this, L_3, /*hidden argument*/NULL); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_0026: { return; } } // System.Single UnityEngine.UI.Slider::get_maxValue() extern "C" float Slider_get_maxValue_m414465787 (Slider_t3903728902 * __this, const MethodInfo* method) { float V_0 = 0.0f; { float L_0 = __this->get_m_MaxValue_20(); V_0 = L_0; goto IL_000d; } IL_000d: { float L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_maxValue(System.Single) extern "C" void Slider_set_maxValue_m2251404465 (Slider_t3903728902 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_maxValue_m2251404465_MetadataUsageId); s_Il2CppMethodInitialized = true; } { float* L_0 = __this->get_address_of_m_MaxValue_20(); float L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisSingle_t1397266774_m2805350785_MethodInfo_var); if (!L_2) { goto IL_0026; } } { float L_3 = __this->get_m_Value_22(); Slider_Set_m1477870360(__this, L_3, /*hidden argument*/NULL); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_0026: { return; } } // System.Boolean UnityEngine.UI.Slider::get_wholeNumbers() extern "C" bool Slider_get_wholeNumbers_m3514084699 (Slider_t3903728902 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_WholeNumbers_21(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_wholeNumbers(System.Boolean) extern "C" void Slider_set_wholeNumbers_m1108091651 (Slider_t3903728902 * __this, bool ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_wholeNumbers_m1108091651_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool* L_0 = __this->get_address_of_m_WholeNumbers_21(); bool L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisBoolean_t97287965_m1354367708_MethodInfo_var); if (!L_2) { goto IL_0026; } } { float L_3 = __this->get_m_Value_22(); Slider_Set_m1477870360(__this, L_3, /*hidden argument*/NULL); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_0026: { return; } } // System.Single UnityEngine.UI.Slider::get_value() extern "C" float Slider_get_value_m739683640 (Slider_t3903728902 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_get_value_m739683640_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { bool L_0 = Slider_get_wholeNumbers_m3514084699(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_001d; } } { float L_1 = __this->get_m_Value_22(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_2 = bankers_roundf(L_1); V_0 = L_2; goto IL_0029; } IL_001d: { float L_3 = __this->get_m_Value_22(); V_0 = L_3; goto IL_0029; } IL_0029: { float L_4 = V_0; return L_4; } } // System.Void UnityEngine.UI.Slider::set_value(System.Single) extern "C" void Slider_set_value_m1767443573 (Slider_t3903728902 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; Slider_Set_m1477870360(__this, L_0, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.Slider::get_normalizedValue() extern "C" float Slider_get_normalizedValue_m4221259752 (Slider_t3903728902 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_get_normalizedValue_m4221259752_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { float L_0 = Slider_get_minValue_m3250350293(__this, /*hidden argument*/NULL); float L_1 = Slider_get_maxValue_m414465787(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); bool L_2 = Mathf_Approximately_m367990089(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0022; } } { V_0 = (0.0f); goto IL_003f; } IL_0022: { float L_3 = Slider_get_minValue_m3250350293(__this, /*hidden argument*/NULL); float L_4 = Slider_get_maxValue_m414465787(__this, /*hidden argument*/NULL); float L_5 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_6 = Mathf_InverseLerp_m78080575(NULL /*static, unused*/, L_3, L_4, L_5, /*hidden argument*/NULL); V_0 = L_6; goto IL_003f; } IL_003f: { float L_7 = V_0; return L_7; } } // System.Void UnityEngine.UI.Slider::set_normalizedValue(System.Single) extern "C" void Slider_set_normalizedValue_m480470123 (Slider_t3903728902 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_set_normalizedValue_m480470123_MetadataUsageId); s_Il2CppMethodInitialized = true; } { float L_0 = Slider_get_minValue_m3250350293(__this, /*hidden argument*/NULL); float L_1 = Slider_get_maxValue_m414465787(__this, /*hidden argument*/NULL); float L_2 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_3 = Mathf_Lerp_m3558781979(NULL /*static, unused*/, L_0, L_1, L_2, /*hidden argument*/NULL); VirtActionInvoker1< float >::Invoke(47 /* System.Void UnityEngine.UI.Slider::set_value(System.Single) */, __this, L_3); return; } } // UnityEngine.UI.Slider/SliderEvent UnityEngine.UI.Slider::get_onValueChanged() extern "C" SliderEvent_t3180273144 * Slider_get_onValueChanged_m2907593587 (Slider_t3903728902 * __this, const MethodInfo* method) { SliderEvent_t3180273144 * V_0 = NULL; { SliderEvent_t3180273144 * L_0 = __this->get_m_OnValueChanged_23(); V_0 = L_0; goto IL_000d; } IL_000d: { SliderEvent_t3180273144 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Slider::set_onValueChanged(UnityEngine.UI.Slider/SliderEvent) extern "C" void Slider_set_onValueChanged_m1120215707 (Slider_t3903728902 * __this, SliderEvent_t3180273144 * ___value0, const MethodInfo* method) { { SliderEvent_t3180273144 * L_0 = ___value0; __this->set_m_OnValueChanged_23(L_0); return; } } // System.Single UnityEngine.UI.Slider::get_stepSize() extern "C" float Slider_get_stepSize_m1423227661 (Slider_t3903728902 * __this, const MethodInfo* method) { float V_0 = 0.0f; float G_B3_0 = 0.0f; { bool L_0 = Slider_get_wholeNumbers_m3514084699(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0016; } } { G_B3_0 = (1.0f); goto IL_0029; } IL_0016: { float L_1 = Slider_get_maxValue_m414465787(__this, /*hidden argument*/NULL); float L_2 = Slider_get_minValue_m3250350293(__this, /*hidden argument*/NULL); G_B3_0 = ((float)((float)((float)((float)L_1-(float)L_2))*(float)(0.1f))); } IL_0029: { V_0 = G_B3_0; goto IL_002f; } IL_002f: { float L_3 = V_0; return L_3; } } // System.Void UnityEngine.UI.Slider::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void Slider_Rebuild_m3494006378 (Slider_t3903728902 * __this, int32_t ___executing0, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Slider::LayoutComplete() extern "C" void Slider_LayoutComplete_m1036337733 (Slider_t3903728902 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Slider::GraphicUpdateComplete() extern "C" void Slider_GraphicUpdateComplete_m4007360274 (Slider_t3903728902 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Slider::OnEnable() extern "C" void Slider_OnEnable_m716222213 (Slider_t3903728902 * __this, const MethodInfo* method) { { Selectable_OnEnable_m3110490294(__this, /*hidden argument*/NULL); Slider_UpdateCachedReferences_m3259451627(__this, /*hidden argument*/NULL); float L_0 = __this->get_m_Value_22(); VirtActionInvoker2< float, bool >::Invoke(51 /* System.Void UnityEngine.UI.Slider::Set(System.Single,System.Boolean) */, __this, L_0, (bool)0); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::OnDisable() extern "C" void Slider_OnDisable_m2179685974 (Slider_t3903728902 * __this, const MethodInfo* method) { { DrivenRectTransformTracker_t2562230146 * L_0 = __this->get_address_of_m_Tracker_30(); DrivenRectTransformTracker_Clear_m905140393(L_0, /*hidden argument*/NULL); Selectable_OnDisable_m3225138518(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::OnDidApplyAnimationProperties() extern "C" void Slider_OnDidApplyAnimationProperties_m4192788494 (Slider_t3903728902 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_OnDidApplyAnimationProperties_m4192788494_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t2156229523 V_4; memset(&V_4, 0, sizeof(V_4)); float G_B7_0 = 0.0f; float G_B13_0 = 0.0f; { float L_0 = __this->get_m_Value_22(); float L_1 = Slider_ClampValue_m3482112413(__this, L_0, /*hidden argument*/NULL); __this->set_m_Value_22(L_1); float L_2 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); V_0 = L_2; RectTransform_t3704657025 * L_3 = __this->get_m_FillContainerRect_26(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_00ae; } } { Image_t2670269651 * L_5 = __this->get_m_FillImage_24(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_005f; } } { Image_t2670269651 * L_7 = __this->get_m_FillImage_24(); NullCheck(L_7); int32_t L_8 = Image_get_type_m3606908055(L_7, /*hidden argument*/NULL); if ((!(((uint32_t)L_8) == ((uint32_t)3)))) { goto IL_005f; } } { Image_t2670269651 * L_9 = __this->get_m_FillImage_24(); NullCheck(L_9); float L_10 = Image_get_fillAmount_m2193224718(L_9, /*hidden argument*/NULL); V_0 = L_10; goto IL_00a8; } IL_005f: { bool L_11 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); if (!L_11) { goto IL_008e; } } { RectTransform_t3704657025 * L_12 = __this->get_m_FillRect_16(); NullCheck(L_12); Vector2_t2156229523 L_13 = RectTransform_get_anchorMin_m1342910522(L_12, /*hidden argument*/NULL); V_1 = L_13; int32_t L_14 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_15 = Vector2_get_Item_m3129197029((&V_1), L_14, /*hidden argument*/NULL); G_B7_0 = ((float)((float)(1.0f)-(float)L_15)); goto IL_00a7; } IL_008e: { RectTransform_t3704657025 * L_16 = __this->get_m_FillRect_16(); NullCheck(L_16); Vector2_t2156229523 L_17 = RectTransform_get_anchorMax_m1075940194(L_16, /*hidden argument*/NULL); V_2 = L_17; int32_t L_18 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_19 = Vector2_get_Item_m3129197029((&V_2), L_18, /*hidden argument*/NULL); G_B7_0 = L_19; } IL_00a7: { V_0 = G_B7_0; } IL_00a8: { goto IL_0109; } IL_00ae: { RectTransform_t3704657025 * L_20 = __this->get_m_HandleContainerRect_28(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_21 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_20, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_21) { goto IL_0109; } } { bool L_22 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); if (!L_22) { goto IL_00ee; } } { RectTransform_t3704657025 * L_23 = __this->get_m_HandleRect_17(); NullCheck(L_23); Vector2_t2156229523 L_24 = RectTransform_get_anchorMin_m1342910522(L_23, /*hidden argument*/NULL); V_3 = L_24; int32_t L_25 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_26 = Vector2_get_Item_m3129197029((&V_3), L_25, /*hidden argument*/NULL); G_B13_0 = ((float)((float)(1.0f)-(float)L_26)); goto IL_0108; } IL_00ee: { RectTransform_t3704657025 * L_27 = __this->get_m_HandleRect_17(); NullCheck(L_27); Vector2_t2156229523 L_28 = RectTransform_get_anchorMin_m1342910522(L_27, /*hidden argument*/NULL); V_4 = L_28; int32_t L_29 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_30 = Vector2_get_Item_m3129197029((&V_4), L_29, /*hidden argument*/NULL); G_B13_0 = L_30; } IL_0108: { V_0 = G_B13_0; } IL_0109: { Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); float L_31 = V_0; float L_32 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); if ((((float)L_31) == ((float)L_32))) { goto IL_012c; } } { SliderEvent_t3180273144 * L_33 = Slider_get_onValueChanged_m2907593587(__this, /*hidden argument*/NULL); float L_34 = __this->get_m_Value_22(); NullCheck(L_33); UnityEvent_1_Invoke_m3400677460(L_33, L_34, /*hidden argument*/UnityEvent_1_Invoke_m3400677460_MethodInfo_var); } IL_012c: { return; } } // System.Void UnityEngine.UI.Slider::UpdateCachedReferences() extern "C" void Slider_UpdateCachedReferences_m3259451627 (Slider_t3903728902 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_UpdateCachedReferences_m3259451627_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t3704657025 * L_0 = __this->get_m_FillRect_16(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0066; } } { RectTransform_t3704657025 * L_2 = __this->get_m_FillRect_16(); NullCheck(L_2); Transform_t3600365921 * L_3 = Component_get_transform_m2921103810(L_2, /*hidden argument*/NULL); __this->set_m_FillTransform_25(L_3); RectTransform_t3704657025 * L_4 = __this->get_m_FillRect_16(); NullCheck(L_4); Image_t2670269651 * L_5 = Component_GetComponent_TisImage_t2670269651_m980647750(L_4, /*hidden argument*/Component_GetComponent_TisImage_t2670269651_m980647750_MethodInfo_var); __this->set_m_FillImage_24(L_5); Transform_t3600365921 * L_6 = __this->get_m_FillTransform_25(); NullCheck(L_6); Transform_t3600365921 * L_7 = Transform_get_parent_m1293647796(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_7, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0060; } } { Transform_t3600365921 * L_9 = __this->get_m_FillTransform_25(); NullCheck(L_9); Transform_t3600365921 * L_10 = Transform_get_parent_m1293647796(L_9, /*hidden argument*/NULL); NullCheck(L_10); RectTransform_t3704657025 * L_11 = Component_GetComponent_TisRectTransform_t3704657025_m989540290(L_10, /*hidden argument*/Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var); __this->set_m_FillContainerRect_26(L_11); } IL_0060: { goto IL_0076; } IL_0066: { __this->set_m_FillContainerRect_26((RectTransform_t3704657025 *)NULL); __this->set_m_FillImage_24((Image_t2670269651 *)NULL); } IL_0076: { RectTransform_t3704657025 * L_12 = __this->get_m_HandleRect_17(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_13 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_00ca; } } { RectTransform_t3704657025 * L_14 = __this->get_m_HandleRect_17(); NullCheck(L_14); Transform_t3600365921 * L_15 = Component_get_transform_m2921103810(L_14, /*hidden argument*/NULL); __this->set_m_HandleTransform_27(L_15); Transform_t3600365921 * L_16 = __this->get_m_HandleTransform_27(); NullCheck(L_16); Transform_t3600365921 * L_17 = Transform_get_parent_m1293647796(L_16, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_18 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_17, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_18) { goto IL_00c4; } } { Transform_t3600365921 * L_19 = __this->get_m_HandleTransform_27(); NullCheck(L_19); Transform_t3600365921 * L_20 = Transform_get_parent_m1293647796(L_19, /*hidden argument*/NULL); NullCheck(L_20); RectTransform_t3704657025 * L_21 = Component_GetComponent_TisRectTransform_t3704657025_m989540290(L_20, /*hidden argument*/Component_GetComponent_TisRectTransform_t3704657025_m989540290_MethodInfo_var); __this->set_m_HandleContainerRect_28(L_21); } IL_00c4: { goto IL_00d3; } IL_00ca: { __this->set_m_HandleContainerRect_28((RectTransform_t3704657025 *)NULL); } IL_00d3: { return; } } // System.Single UnityEngine.UI.Slider::ClampValue(System.Single) extern "C" float Slider_ClampValue_m3482112413 (Slider_t3903728902 * __this, float ___input0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_ClampValue_m3482112413_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; float V_1 = 0.0f; { float L_0 = ___input0; float L_1 = Slider_get_minValue_m3250350293(__this, /*hidden argument*/NULL); float L_2 = Slider_get_maxValue_m414465787(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_3 = Mathf_Clamp_m500974738(NULL /*static, unused*/, L_0, L_1, L_2, /*hidden argument*/NULL); V_0 = L_3; bool L_4 = Slider_get_wholeNumbers_m3514084699(__this, /*hidden argument*/NULL); if (!L_4) { goto IL_0026; } } { float L_5 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_6 = bankers_roundf(L_5); V_0 = L_6; } IL_0026: { float L_7 = V_0; V_1 = L_7; goto IL_002d; } IL_002d: { float L_8 = V_1; return L_8; } } // System.Void UnityEngine.UI.Slider::Set(System.Single) extern "C" void Slider_Set_m1477870360 (Slider_t3903728902 * __this, float ___input0, const MethodInfo* method) { { float L_0 = ___input0; VirtActionInvoker2< float, bool >::Invoke(51 /* System.Void UnityEngine.UI.Slider::Set(System.Single,System.Boolean) */, __this, L_0, (bool)1); return; } } // System.Void UnityEngine.UI.Slider::Set(System.Single,System.Boolean) extern "C" void Slider_Set_m1476104429 (Slider_t3903728902 * __this, float ___input0, bool ___sendCallback1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_Set_m1476104429_MetadataUsageId); s_Il2CppMethodInitialized = true; } float V_0 = 0.0f; { float L_0 = ___input0; float L_1 = Slider_ClampValue_m3482112413(__this, L_0, /*hidden argument*/NULL); V_0 = L_1; float L_2 = __this->get_m_Value_22(); float L_3 = V_0; if ((!(((float)L_2) == ((float)L_3)))) { goto IL_001a; } } { goto IL_0039; } IL_001a: { float L_4 = V_0; __this->set_m_Value_22(L_4); Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); bool L_5 = ___sendCallback1; if (!L_5) { goto IL_0039; } } { SliderEvent_t3180273144 * L_6 = __this->get_m_OnValueChanged_23(); float L_7 = V_0; NullCheck(L_6); UnityEvent_1_Invoke_m3400677460(L_6, L_7, /*hidden argument*/UnityEvent_1_Invoke_m3400677460_MethodInfo_var); } IL_0039: { return; } } // System.Void UnityEngine.UI.Slider::OnRectTransformDimensionsChange() extern "C" void Slider_OnRectTransformDimensionsChange_m3337740095 (Slider_t3903728902 * __this, const MethodInfo* method) { { UIBehaviour_OnRectTransformDimensionsChange_m1473730550(__this, /*hidden argument*/NULL); bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0017; } } { goto IL_001d; } IL_0017: { Slider_UpdateVisuals_m3662961057(__this, /*hidden argument*/NULL); } IL_001d: { return; } } // UnityEngine.UI.Slider/Axis UnityEngine.UI.Slider::get_axis() extern "C" int32_t Slider_get_axis_m2224049704 (Slider_t3903728902 * __this, const MethodInfo* method) { int32_t V_0 = 0; int32_t G_B4_0 = 0; { int32_t L_0 = __this->get_m_Direction_18(); if (!L_0) { goto IL_0018; } } { int32_t L_1 = __this->get_m_Direction_18(); if ((!(((uint32_t)L_1) == ((uint32_t)1)))) { goto IL_001e; } } IL_0018: { G_B4_0 = 0; goto IL_001f; } IL_001e: { G_B4_0 = 1; } IL_001f: { V_0 = G_B4_0; goto IL_0025; } IL_0025: { int32_t L_2 = V_0; return L_2; } } // System.Boolean UnityEngine.UI.Slider::get_reverseValue() extern "C" bool Slider_get_reverseValue_m2613930318 (Slider_t3903728902 * __this, const MethodInfo* method) { bool V_0 = false; int32_t G_B3_0 = 0; { int32_t L_0 = __this->get_m_Direction_18(); if ((((int32_t)L_0) == ((int32_t)1))) { goto IL_0018; } } { int32_t L_1 = __this->get_m_Direction_18(); G_B3_0 = ((((int32_t)L_1) == ((int32_t)3))? 1 : 0); goto IL_0019; } IL_0018: { G_B3_0 = 1; } IL_0019: { V_0 = (bool)G_B3_0; goto IL_001f; } IL_001f: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Slider::UpdateVisuals() extern "C" void Slider_UpdateVisuals_m3662961057 (Slider_t3903728902 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_UpdateVisuals_m3662961057_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t2156229523 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); float V_4 = 0.0f; int32_t G_B12_0 = 0; Vector2_t2156229523 * G_B12_1 = NULL; int32_t G_B11_0 = 0; Vector2_t2156229523 * G_B11_1 = NULL; float G_B13_0 = 0.0f; int32_t G_B13_1 = 0; Vector2_t2156229523 * G_B13_2 = NULL; { DrivenRectTransformTracker_t2562230146 * L_0 = __this->get_address_of_m_Tracker_30(); DrivenRectTransformTracker_Clear_m905140393(L_0, /*hidden argument*/NULL); RectTransform_t3704657025 * L_1 = __this->get_m_FillContainerRect_26(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_00d2; } } { DrivenRectTransformTracker_t2562230146 * L_3 = __this->get_address_of_m_Tracker_30(); RectTransform_t3704657025 * L_4 = __this->get_m_FillRect_16(); DrivenRectTransformTracker_Add_m4180584832(L_3, __this, L_4, ((int32_t)3840), /*hidden argument*/NULL); Vector2_t2156229523 L_5 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_5; Vector2_t2156229523 L_6 = Vector2_get_one_m3275444361(NULL /*static, unused*/, /*hidden argument*/NULL); V_1 = L_6; Image_t2670269651 * L_7 = __this->get_m_FillImage_24(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_7, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_007b; } } { Image_t2670269651 * L_9 = __this->get_m_FillImage_24(); NullCheck(L_9); int32_t L_10 = Image_get_type_m3606908055(L_9, /*hidden argument*/NULL); if ((!(((uint32_t)L_10) == ((uint32_t)3)))) { goto IL_007b; } } { Image_t2670269651 * L_11 = __this->get_m_FillImage_24(); float L_12 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); NullCheck(L_11); Image_set_fillAmount_m3737925590(L_11, L_12, /*hidden argument*/NULL); goto IL_00b9; } IL_007b: { bool L_13 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); if (!L_13) { goto IL_00a5; } } { int32_t L_14 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_15 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); Vector2_set_Item_m1664083694((&V_0), L_14, ((float)((float)(1.0f)-(float)L_15)), /*hidden argument*/NULL); goto IL_00b8; } IL_00a5: { int32_t L_16 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_17 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); Vector2_set_Item_m1664083694((&V_1), L_16, L_17, /*hidden argument*/NULL); } IL_00b8: { } IL_00b9: { RectTransform_t3704657025 * L_18 = __this->get_m_FillRect_16(); Vector2_t2156229523 L_19 = V_0; NullCheck(L_18); RectTransform_set_anchorMin_m2068858122(L_18, L_19, /*hidden argument*/NULL); RectTransform_t3704657025 * L_20 = __this->get_m_FillRect_16(); Vector2_t2156229523 L_21 = V_1; NullCheck(L_20); RectTransform_set_anchorMax_m2389806509(L_20, L_21, /*hidden argument*/NULL); } IL_00d2: { RectTransform_t3704657025 * L_22 = __this->get_m_HandleContainerRect_28(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_23 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_22, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_23) { goto IL_0162; } } { DrivenRectTransformTracker_t2562230146 * L_24 = __this->get_address_of_m_Tracker_30(); RectTransform_t3704657025 * L_25 = __this->get_m_HandleRect_17(); DrivenRectTransformTracker_Add_m4180584832(L_24, __this, L_25, ((int32_t)3840), /*hidden argument*/NULL); Vector2_t2156229523 L_26 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); V_2 = L_26; Vector2_t2156229523 L_27 = Vector2_get_one_m3275444361(NULL /*static, unused*/, /*hidden argument*/NULL); V_3 = L_27; int32_t L_28 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); bool L_29 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); G_B11_0 = L_28; G_B11_1 = (&V_2); if (!L_29) { G_B12_0 = L_28; G_B12_1 = (&V_2); goto IL_012b; } } { float L_30 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); G_B13_0 = ((float)((float)(1.0f)-(float)L_30)); G_B13_1 = G_B11_0; G_B13_2 = G_B11_1; goto IL_0131; } IL_012b: { float L_31 = Slider_get_normalizedValue_m4221259752(__this, /*hidden argument*/NULL); G_B13_0 = L_31; G_B13_1 = G_B12_0; G_B13_2 = G_B12_1; } IL_0131: { V_4 = G_B13_0; int32_t L_32 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_33 = V_4; Vector2_set_Item_m1664083694((&V_3), L_32, L_33, /*hidden argument*/NULL); float L_34 = V_4; Vector2_set_Item_m1664083694(G_B13_2, G_B13_1, L_34, /*hidden argument*/NULL); RectTransform_t3704657025 * L_35 = __this->get_m_HandleRect_17(); Vector2_t2156229523 L_36 = V_2; NullCheck(L_35); RectTransform_set_anchorMin_m2068858122(L_35, L_36, /*hidden argument*/NULL); RectTransform_t3704657025 * L_37 = __this->get_m_HandleRect_17(); Vector2_t2156229523 L_38 = V_3; NullCheck(L_37); RectTransform_set_anchorMax_m2389806509(L_37, L_38, /*hidden argument*/NULL); } IL_0162: { return; } } // System.Void UnityEngine.UI.Slider::UpdateDrag(UnityEngine.EventSystems.PointerEventData,UnityEngine.Camera) extern "C" void Slider_UpdateDrag_m1102107039 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, Camera_t4157153871 * ___cam1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_UpdateDrag_m1102107039_MetadataUsageId); s_Il2CppMethodInitialized = true; } RectTransform_t3704657025 * V_0 = NULL; Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t2156229523 V_3; memset(&V_3, 0, sizeof(V_3)); Rect_t2360479859 V_4; memset(&V_4, 0, sizeof(V_4)); float V_5 = 0.0f; Vector2_t2156229523 V_6; memset(&V_6, 0, sizeof(V_6)); Rect_t2360479859 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t2156229523 V_8; memset(&V_8, 0, sizeof(V_8)); RectTransform_t3704657025 * G_B2_0 = NULL; RectTransform_t3704657025 * G_B1_0 = NULL; Slider_t3903728902 * G_B8_0 = NULL; Slider_t3903728902 * G_B7_0 = NULL; float G_B9_0 = 0.0f; Slider_t3903728902 * G_B9_1 = NULL; { RectTransform_t3704657025 * L_0 = __this->get_m_HandleContainerRect_28(); RectTransform_t3704657025 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_0014; } } { RectTransform_t3704657025 * L_2 = __this->get_m_FillContainerRect_26(); G_B2_0 = L_2; } IL_0014: { V_0 = G_B2_0; RectTransform_t3704657025 * L_3 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_00d9; } } { RectTransform_t3704657025 * L_5 = V_0; NullCheck(L_5); Rect_t2360479859 L_6 = RectTransform_get_rect_m1643570810(L_5, /*hidden argument*/NULL); V_1 = L_6; Vector2_t2156229523 L_7 = Rect_get_size_m3542039952((&V_1), /*hidden argument*/NULL); V_2 = L_7; int32_t L_8 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_9 = Vector2_get_Item_m3129197029((&V_2), L_8, /*hidden argument*/NULL); if ((!(((float)L_9) > ((float)(0.0f))))) { goto IL_00d9; } } { RectTransform_t3704657025 * L_10 = V_0; PointerEventData_t3807901092 * L_11 = ___eventData0; NullCheck(L_11); Vector2_t2156229523 L_12 = PointerEventData_get_position_m437660275(L_11, /*hidden argument*/NULL); Camera_t4157153871 * L_13 = ___cam1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_14 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_10, L_12, L_13, (&V_3), /*hidden argument*/NULL); if (L_14) { goto IL_0061; } } { goto IL_00d9; } IL_0061: { Vector2_t2156229523 L_15 = V_3; RectTransform_t3704657025 * L_16 = V_0; NullCheck(L_16); Rect_t2360479859 L_17 = RectTransform_get_rect_m1643570810(L_16, /*hidden argument*/NULL); V_4 = L_17; Vector2_t2156229523 L_18 = Rect_get_position_m2767609553((&V_4), /*hidden argument*/NULL); Vector2_t2156229523 L_19 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_15, L_18, /*hidden argument*/NULL); V_3 = L_19; Vector2_t2156229523 L_20 = V_3; Vector2_t2156229523 L_21 = __this->get_m_Offset_29(); Vector2_t2156229523 L_22 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_20, L_21, /*hidden argument*/NULL); V_6 = L_22; int32_t L_23 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_24 = Vector2_get_Item_m3129197029((&V_6), L_23, /*hidden argument*/NULL); RectTransform_t3704657025 * L_25 = V_0; NullCheck(L_25); Rect_t2360479859 L_26 = RectTransform_get_rect_m1643570810(L_25, /*hidden argument*/NULL); V_7 = L_26; Vector2_t2156229523 L_27 = Rect_get_size_m3542039952((&V_7), /*hidden argument*/NULL); V_8 = L_27; int32_t L_28 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); float L_29 = Vector2_get_Item_m3129197029((&V_8), L_28, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); float L_30 = Mathf_Clamp01_m4133291925(NULL /*static, unused*/, ((float)((float)L_24/(float)L_29)), /*hidden argument*/NULL); V_5 = L_30; bool L_31 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); G_B7_0 = __this; if (!L_31) { G_B8_0 = __this; goto IL_00d1; } } { float L_32 = V_5; G_B9_0 = ((float)((float)(1.0f)-(float)L_32)); G_B9_1 = G_B7_0; goto IL_00d3; } IL_00d1: { float L_33 = V_5; G_B9_0 = L_33; G_B9_1 = G_B8_0; } IL_00d3: { NullCheck(G_B9_1); Slider_set_normalizedValue_m480470123(G_B9_1, G_B9_0, /*hidden argument*/NULL); } IL_00d9: { return; } } // System.Boolean UnityEngine.UI.Slider::MayDrag(UnityEngine.EventSystems.PointerEventData) extern "C" bool Slider_MayDrag_m674653282 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { bool V_0 = false; int32_t G_B4_0 = 0; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0022; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (!L_1) { goto IL_0022; } } { PointerEventData_t3807901092 * L_2 = ___eventData0; NullCheck(L_2); int32_t L_3 = PointerEventData_get_button_m359423249(L_2, /*hidden argument*/NULL); G_B4_0 = ((((int32_t)L_3) == ((int32_t)0))? 1 : 0); goto IL_0023; } IL_0022: { G_B4_0 = 0; } IL_0023: { V_0 = (bool)G_B4_0; goto IL_0029; } IL_0029: { bool L_4 = V_0; return L_4; } } // System.Void UnityEngine.UI.Slider::OnPointerDown(UnityEngine.EventSystems.PointerEventData) extern "C" void Slider_OnPointerDown_m3052086073 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_OnPointerDown_m3052086073_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); { PointerEventData_t3807901092 * L_0 = ___eventData0; bool L_1 = Slider_MayDrag_m674653282(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0012; } } { goto IL_008c; } IL_0012: { PointerEventData_t3807901092 * L_2 = ___eventData0; Selectable_OnPointerDown_m1086067264(__this, L_2, /*hidden argument*/NULL); Vector2_t2156229523 L_3 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_29(L_3); RectTransform_t3704657025 * L_4 = __this->get_m_HandleContainerRect_28(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_5 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_4, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_5) { goto IL_007d; } } { RectTransform_t3704657025 * L_6 = __this->get_m_HandleRect_17(); PointerEventData_t3807901092 * L_7 = ___eventData0; NullCheck(L_7); Vector2_t2156229523 L_8 = PointerEventData_get_position_m437660275(L_7, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_9 = ___eventData0; NullCheck(L_9); Camera_t4157153871 * L_10 = PointerEventData_get_enterEventCamera_m2055275918(L_9, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_11 = RectTransformUtility_RectangleContainsScreenPoint_m1731210517(NULL /*static, unused*/, L_6, L_8, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_007d; } } { RectTransform_t3704657025 * L_12 = __this->get_m_HandleRect_17(); PointerEventData_t3807901092 * L_13 = ___eventData0; NullCheck(L_13); Vector2_t2156229523 L_14 = PointerEventData_get_position_m437660275(L_13, /*hidden argument*/NULL); PointerEventData_t3807901092 * L_15 = ___eventData0; NullCheck(L_15); Camera_t4157153871 * L_16 = PointerEventData_get_pressEventCamera_m2613974917(L_15, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); bool L_17 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m870181352(NULL /*static, unused*/, L_12, L_14, L_16, (&V_0), /*hidden argument*/NULL); if (!L_17) { goto IL_0077; } } { Vector2_t2156229523 L_18 = V_0; __this->set_m_Offset_29(L_18); } IL_0077: { goto IL_008c; } IL_007d: { PointerEventData_t3807901092 * L_19 = ___eventData0; PointerEventData_t3807901092 * L_20 = ___eventData0; NullCheck(L_20); Camera_t4157153871 * L_21 = PointerEventData_get_pressEventCamera_m2613974917(L_20, /*hidden argument*/NULL); Slider_UpdateDrag_m1102107039(__this, L_19, L_21, /*hidden argument*/NULL); } IL_008c: { return; } } // System.Void UnityEngine.UI.Slider::OnDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Slider_OnDrag_m1997848405 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; bool L_1 = Slider_MayDrag_m674653282(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0012; } } { goto IL_001f; } IL_0012: { PointerEventData_t3807901092 * L_2 = ___eventData0; PointerEventData_t3807901092 * L_3 = ___eventData0; NullCheck(L_3); Camera_t4157153871 * L_4 = PointerEventData_get_pressEventCamera_m2613974917(L_3, /*hidden argument*/NULL); Slider_UpdateDrag_m1102107039(__this, L_2, L_4, /*hidden argument*/NULL); } IL_001f: { return; } } // System.Void UnityEngine.UI.Slider::OnMove(UnityEngine.EventSystems.AxisEventData) extern "C" void Slider_OnMove_m2670177017 (Slider_t3903728902 * __this, AxisEventData_t2331243652 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_OnMove_m2670177017_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; Slider_t3903728902 * G_B9_0 = NULL; Slider_t3903728902 * G_B8_0 = NULL; float G_B10_0 = 0.0f; Slider_t3903728902 * G_B10_1 = NULL; Slider_t3903728902 * G_B17_0 = NULL; Slider_t3903728902 * G_B16_0 = NULL; float G_B18_0 = 0.0f; Slider_t3903728902 * G_B18_1 = NULL; Slider_t3903728902 * G_B25_0 = NULL; Slider_t3903728902 * G_B24_0 = NULL; float G_B26_0 = 0.0f; Slider_t3903728902 * G_B26_1 = NULL; Slider_t3903728902 * G_B33_0 = NULL; Slider_t3903728902 * G_B32_0 = NULL; float G_B34_0 = 0.0f; Slider_t3903728902 * G_B34_1 = NULL; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0017; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_0024; } } IL_0017: { AxisEventData_t2331243652 * L_2 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_2, /*hidden argument*/NULL); goto IL_01bc; } IL_0024: { AxisEventData_t2331243652 * L_3 = ___eventData0; NullCheck(L_3); int32_t L_4 = AxisEventData_get_moveDir_m2423724085(L_3, /*hidden argument*/NULL); V_0 = L_4; int32_t L_5 = V_0; switch (L_5) { case 0: { goto IL_0046; } case 1: { goto IL_0100; } case 2: { goto IL_00a3; } case 3: { goto IL_015e; } } } { goto IL_01bc; } IL_0046: { int32_t L_6 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if (L_6) { goto IL_0097; } } { Selectable_t3250028441 * L_7 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(27 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_7, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0097; } } { bool L_9 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); G_B8_0 = __this; if (!L_9) { G_B9_0 = __this; goto IL_0080; } } { float L_10 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_11 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_10+(float)L_11)); G_B10_1 = G_B8_0; goto IL_008d; } IL_0080: { float L_12 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_13 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_12-(float)L_13)); G_B10_1 = G_B9_0; } IL_008d: { NullCheck(G_B10_1); Slider_Set_m1477870360(G_B10_1, G_B10_0, /*hidden argument*/NULL); goto IL_009e; } IL_0097: { AxisEventData_t2331243652 * L_14 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_14, /*hidden argument*/NULL); } IL_009e: { goto IL_01bc; } IL_00a3: { int32_t L_15 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if (L_15) { goto IL_00f4; } } { Selectable_t3250028441 * L_16 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(28 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_17 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_16, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_17) { goto IL_00f4; } } { bool L_18 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); G_B16_0 = __this; if (!L_18) { G_B17_0 = __this; goto IL_00dd; } } { float L_19 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_20 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_19-(float)L_20)); G_B18_1 = G_B16_0; goto IL_00ea; } IL_00dd: { float L_21 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_22 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_21+(float)L_22)); G_B18_1 = G_B17_0; } IL_00ea: { NullCheck(G_B18_1); Slider_Set_m1477870360(G_B18_1, G_B18_0, /*hidden argument*/NULL); goto IL_00fb; } IL_00f4: { AxisEventData_t2331243652 * L_23 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_23, /*hidden argument*/NULL); } IL_00fb: { goto IL_01bc; } IL_0100: { int32_t L_24 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_24) == ((uint32_t)1)))) { goto IL_0152; } } { Selectable_t3250028441 * L_25 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(29 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_26 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_25, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_26) { goto IL_0152; } } { bool L_27 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); G_B24_0 = __this; if (!L_27) { G_B25_0 = __this; goto IL_013b; } } { float L_28 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_29 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_28-(float)L_29)); G_B26_1 = G_B24_0; goto IL_0148; } IL_013b: { float L_30 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_31 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_30+(float)L_31)); G_B26_1 = G_B25_0; } IL_0148: { NullCheck(G_B26_1); Slider_Set_m1477870360(G_B26_1, G_B26_0, /*hidden argument*/NULL); goto IL_0159; } IL_0152: { AxisEventData_t2331243652 * L_32 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_32, /*hidden argument*/NULL); } IL_0159: { goto IL_01bc; } IL_015e: { int32_t L_33 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_33) == ((uint32_t)1)))) { goto IL_01b0; } } { Selectable_t3250028441 * L_34 = VirtFuncInvoker0< Selectable_t3250028441 * >::Invoke(30 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_35 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_34, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_35) { goto IL_01b0; } } { bool L_36 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); G_B32_0 = __this; if (!L_36) { G_B33_0 = __this; goto IL_0199; } } { float L_37 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_38 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_37+(float)L_38)); G_B34_1 = G_B32_0; goto IL_01a6; } IL_0199: { float L_39 = VirtFuncInvoker0< float >::Invoke(46 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_40 = Slider_get_stepSize_m1423227661(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_39-(float)L_40)); G_B34_1 = G_B33_0; } IL_01a6: { NullCheck(G_B34_1); Slider_Set_m1477870360(G_B34_1, G_B34_0, /*hidden argument*/NULL); goto IL_01b7; } IL_01b0: { AxisEventData_t2331243652 * L_41 = ___eventData0; Selectable_OnMove_m2972933239(__this, L_41, /*hidden argument*/NULL); } IL_01b7: { goto IL_01bc; } IL_01bc: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnLeft() extern "C" Selectable_t3250028441 * Slider_FindSelectableOnLeft_m1667068522 (Slider_t3903728902 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0027; } } { int32_t L_2 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0027; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0033; } IL_0027: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnLeft_m75080035(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0033; } IL_0033: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnRight() extern "C" Selectable_t3250028441 * Slider_FindSelectableOnRight_m3576909722 (Slider_t3903728902 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0027; } } { int32_t L_2 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0027; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0033; } IL_0027: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnRight_m2374187443(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0033; } IL_0033: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnUp() extern "C" Selectable_t3250028441 * Slider_FindSelectableOnUp_m4062600878 (Slider_t3903728902 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0028; } } { int32_t L_2 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0028; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0034; } IL_0028: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnUp_m1814865676(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0034; } IL_0034: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnDown() extern "C" Selectable_t3250028441 * Slider_FindSelectableOnDown_m3581255245 (Slider_t3903728902 * __this, const MethodInfo* method) { Navigation_t3049316579 V_0; memset(&V_0, 0, sizeof(V_0)); Selectable_t3250028441 * V_1 = NULL; { Navigation_t3049316579 L_0 = Selectable_get_navigation_m3508916916(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m1766451275((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0028; } } { int32_t L_2 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0028; } } { V_1 = (Selectable_t3250028441 *)NULL; goto IL_0034; } IL_0028: { Selectable_t3250028441 * L_3 = Selectable_FindSelectableOnDown_m1591762582(__this, /*hidden argument*/NULL); V_1 = L_3; goto IL_0034; } IL_0034: { Selectable_t3250028441 * L_4 = V_1; return L_4; } } // System.Void UnityEngine.UI.Slider::OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Slider_OnInitializePotentialDrag_m3650289501 (Slider_t3903728902 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); PointerEventData_set_useDragThreshold_m248001603(L_0, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::SetDirection(UnityEngine.UI.Slider/Direction,System.Boolean) extern "C" void Slider_SetDirection_m2450124012 (Slider_t3903728902 * __this, int32_t ___direction0, bool ___includeRectLayouts1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Slider_SetDirection_m2450124012_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; bool V_1 = false; { int32_t L_0 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); V_0 = L_0; bool L_1 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); V_1 = L_1; int32_t L_2 = ___direction0; Slider_set_direction_m3354648663(__this, L_2, /*hidden argument*/NULL); bool L_3 = ___includeRectLayouts1; if (L_3) { goto IL_0021; } } { goto IL_0063; } IL_0021: { int32_t L_4 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); int32_t L_5 = V_0; if ((((int32_t)L_4) == ((int32_t)L_5))) { goto IL_003f; } } { Transform_t3600365921 * L_6 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutAxes_m3705369832(NULL /*static, unused*/, ((RectTransform_t3704657025 *)IsInstSealed(L_6, RectTransform_t3704657025_il2cpp_TypeInfo_var)), (bool)1, (bool)1, /*hidden argument*/NULL); } IL_003f: { bool L_7 = Slider_get_reverseValue_m2613930318(__this, /*hidden argument*/NULL); bool L_8 = V_1; if ((((int32_t)L_7) == ((int32_t)L_8))) { goto IL_0063; } } { Transform_t3600365921 * L_9 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); int32_t L_10 = Slider_get_axis_m2224049704(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t1743242446_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutOnAxis_m144305054(NULL /*static, unused*/, ((RectTransform_t3704657025 *)IsInstSealed(L_9, RectTransform_t3704657025_il2cpp_TypeInfo_var)), L_10, (bool)1, (bool)1, /*hidden argument*/NULL); } IL_0063: { return; } } // UnityEngine.Transform UnityEngine.UI.Slider::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t3600365921 * Slider_UnityEngine_UI_ICanvasElement_get_transform_m1577867913 (Slider_t3903728902 * __this, const MethodInfo* method) { { Transform_t3600365921 * L_0 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.Slider/SliderEvent::.ctor() extern "C" void SliderEvent__ctor_m3149452941 (SliderEvent_t3180273144 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (SliderEvent__ctor_m3149452941_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UnityEvent_1__ctor_m2218582587(__this, /*hidden argument*/UnityEvent_1__ctor_m2218582587_MethodInfo_var); return; } } // Conversion methods for marshalling of: UnityEngine.UI.SpriteState extern "C" void SpriteState_t1362986479_marshal_pinvoke(const SpriteState_t1362986479& unmarshaled, SpriteState_t1362986479_marshaled_pinvoke& marshaled) { Il2CppCodeGenException* ___m_HighlightedSprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_HighlightedSprite' of type 'SpriteState': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_HighlightedSprite_0Exception); } extern "C" void SpriteState_t1362986479_marshal_pinvoke_back(const SpriteState_t1362986479_marshaled_pinvoke& marshaled, SpriteState_t1362986479& unmarshaled) { Il2CppCodeGenException* ___m_HighlightedSprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_HighlightedSprite' of type 'SpriteState': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_HighlightedSprite_0Exception); } // Conversion method for clean up from marshalling of: UnityEngine.UI.SpriteState extern "C" void SpriteState_t1362986479_marshal_pinvoke_cleanup(SpriteState_t1362986479_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.UI.SpriteState extern "C" void SpriteState_t1362986479_marshal_com(const SpriteState_t1362986479& unmarshaled, SpriteState_t1362986479_marshaled_com& marshaled) { Il2CppCodeGenException* ___m_HighlightedSprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_HighlightedSprite' of type 'SpriteState': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_HighlightedSprite_0Exception); } extern "C" void SpriteState_t1362986479_marshal_com_back(const SpriteState_t1362986479_marshaled_com& marshaled, SpriteState_t1362986479& unmarshaled) { Il2CppCodeGenException* ___m_HighlightedSprite_0Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'm_HighlightedSprite' of type 'SpriteState': Reference type field marshaling is not supported."); IL2CPP_RAISE_MANAGED_EXCEPTION(___m_HighlightedSprite_0Exception); } // Conversion method for clean up from marshalling of: UnityEngine.UI.SpriteState extern "C" void SpriteState_t1362986479_marshal_com_cleanup(SpriteState_t1362986479_marshaled_com& marshaled) { } // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_highlightedSprite() extern "C" Sprite_t280657092 * SpriteState_get_highlightedSprite_m3042451966 (SpriteState_t1362986479 * __this, const MethodInfo* method) { Sprite_t280657092 * V_0 = NULL; { Sprite_t280657092 * L_0 = __this->get_m_HighlightedSprite_0(); V_0 = L_0; goto IL_000d; } IL_000d: { Sprite_t280657092 * L_1 = V_0; return L_1; } } extern "C" Sprite_t280657092 * SpriteState_get_highlightedSprite_m3042451966_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); return SpriteState_get_highlightedSprite_m3042451966(_thisAdjusted, method); } // System.Void UnityEngine.UI.SpriteState::set_highlightedSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_highlightedSprite_m1439356607 (SpriteState_t1362986479 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) { { Sprite_t280657092 * L_0 = ___value0; __this->set_m_HighlightedSprite_0(L_0); return; } } extern "C" void SpriteState_set_highlightedSprite_m1439356607_AdjustorThunk (Il2CppObject * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); SpriteState_set_highlightedSprite_m1439356607(_thisAdjusted, ___value0, method); } // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_pressedSprite() extern "C" Sprite_t280657092 * SpriteState_get_pressedSprite_m3868967445 (SpriteState_t1362986479 * __this, const MethodInfo* method) { Sprite_t280657092 * V_0 = NULL; { Sprite_t280657092 * L_0 = __this->get_m_PressedSprite_1(); V_0 = L_0; goto IL_000d; } IL_000d: { Sprite_t280657092 * L_1 = V_0; return L_1; } } extern "C" Sprite_t280657092 * SpriteState_get_pressedSprite_m3868967445_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); return SpriteState_get_pressedSprite_m3868967445(_thisAdjusted, method); } // System.Void UnityEngine.UI.SpriteState::set_pressedSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_pressedSprite_m3368686500 (SpriteState_t1362986479 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) { { Sprite_t280657092 * L_0 = ___value0; __this->set_m_PressedSprite_1(L_0); return; } } extern "C" void SpriteState_set_pressedSprite_m3368686500_AdjustorThunk (Il2CppObject * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); SpriteState_set_pressedSprite_m3368686500(_thisAdjusted, ___value0, method); } // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_disabledSprite() extern "C" Sprite_t280657092 * SpriteState_get_disabledSprite_m1003707558 (SpriteState_t1362986479 * __this, const MethodInfo* method) { Sprite_t280657092 * V_0 = NULL; { Sprite_t280657092 * L_0 = __this->get_m_DisabledSprite_2(); V_0 = L_0; goto IL_000d; } IL_000d: { Sprite_t280657092 * L_1 = V_0; return L_1; } } extern "C" Sprite_t280657092 * SpriteState_get_disabledSprite_m1003707558_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); return SpriteState_get_disabledSprite_m1003707558(_thisAdjusted, method); } // System.Void UnityEngine.UI.SpriteState::set_disabledSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_disabledSprite_m1243475168 (SpriteState_t1362986479 * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) { { Sprite_t280657092 * L_0 = ___value0; __this->set_m_DisabledSprite_2(L_0); return; } } extern "C" void SpriteState_set_disabledSprite_m1243475168_AdjustorThunk (Il2CppObject * __this, Sprite_t280657092 * ___value0, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); SpriteState_set_disabledSprite_m1243475168(_thisAdjusted, ___value0, method); } // System.Boolean UnityEngine.UI.SpriteState::Equals(UnityEngine.UI.SpriteState) extern "C" bool SpriteState_Equals_m2696426421 (SpriteState_t1362986479 * __this, SpriteState_t1362986479 ___other0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (SpriteState_Equals_m2696426421_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t G_B4_0 = 0; { Sprite_t280657092 * L_0 = SpriteState_get_highlightedSprite_m3042451966(__this, /*hidden argument*/NULL); Sprite_t280657092 * L_1 = SpriteState_get_highlightedSprite_m3042451966((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0043; } } { Sprite_t280657092 * L_3 = SpriteState_get_pressedSprite_m3868967445(__this, /*hidden argument*/NULL); Sprite_t280657092 * L_4 = SpriteState_get_pressedSprite_m3868967445((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_5 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_0043; } } { Sprite_t280657092 * L_6 = SpriteState_get_disabledSprite_m1003707558(__this, /*hidden argument*/NULL); Sprite_t280657092 * L_7 = SpriteState_get_disabledSprite_m1003707558((&___other0), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL); G_B4_0 = ((int32_t)(L_8)); goto IL_0044; } IL_0043: { G_B4_0 = 0; } IL_0044: { V_0 = (bool)G_B4_0; goto IL_004a; } IL_004a: { bool L_9 = V_0; return L_9; } } extern "C" bool SpriteState_Equals_m2696426421_AdjustorThunk (Il2CppObject * __this, SpriteState_t1362986479 ___other0, const MethodInfo* method) { SpriteState_t1362986479 * _thisAdjusted = reinterpret_cast<SpriteState_t1362986479 *>(__this + 1); return SpriteState_Equals_m2696426421(_thisAdjusted, ___other0, method); } // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32) extern "C" Material_t340375123 * StencilMaterial_Add_m3183845017 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___baseMat0, int32_t ___stencilID1, const MethodInfo* method) { Material_t340375123 * V_0 = NULL; { V_0 = (Material_t340375123 *)NULL; goto IL_0008; } IL_0008: { Material_t340375123 * L_0 = V_0; return L_0; } } // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32,UnityEngine.Rendering.StencilOp,UnityEngine.Rendering.CompareFunction,UnityEngine.Rendering.ColorWriteMask) extern "C" Material_t340375123 * StencilMaterial_Add_m3901322229 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___baseMat0, int32_t ___stencilID1, int32_t ___operation2, int32_t ___compareFunction3, int32_t ___colorWriteMask4, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StencilMaterial_Add_m3901322229_MetadataUsageId); s_Il2CppMethodInitialized = true; } Material_t340375123 * V_0 = NULL; { Material_t340375123 * L_0 = ___baseMat0; int32_t L_1 = ___stencilID1; int32_t L_2 = ___operation2; int32_t L_3 = ___compareFunction3; int32_t L_4 = ___colorWriteMask4; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); Material_t340375123 * L_5 = StencilMaterial_Add_m2195405072(NULL /*static, unused*/, L_0, L_1, L_2, L_3, L_4, ((int32_t)255), ((int32_t)255), /*hidden argument*/NULL); V_0 = L_5; goto IL_001c; } IL_001c: { Material_t340375123 * L_6 = V_0; return L_6; } } // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32,UnityEngine.Rendering.StencilOp,UnityEngine.Rendering.CompareFunction,UnityEngine.Rendering.ColorWriteMask,System.Int32,System.Int32) extern "C" Material_t340375123 * StencilMaterial_Add_m2195405072 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___baseMat0, int32_t ___stencilID1, int32_t ___operation2, int32_t ___compareFunction3, int32_t ___colorWriteMask4, int32_t ___readMask5, int32_t ___writeMask6, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StencilMaterial_Add_m2195405072_MetadataUsageId); s_Il2CppMethodInitialized = true; } Material_t340375123 * V_0 = NULL; int32_t V_1 = 0; MatEntry_t2957107092 * V_2 = NULL; MatEntry_t2957107092 * V_3 = NULL; MatEntry_t2957107092 * G_B29_0 = NULL; MatEntry_t2957107092 * G_B28_0 = NULL; int32_t G_B30_0 = 0; MatEntry_t2957107092 * G_B30_1 = NULL; String_t* G_B33_0 = NULL; Material_t340375123 * G_B33_1 = NULL; String_t* G_B32_0 = NULL; Material_t340375123 * G_B32_1 = NULL; int32_t G_B34_0 = 0; String_t* G_B34_1 = NULL; Material_t340375123 * G_B34_2 = NULL; { int32_t L_0 = ___stencilID1; if ((((int32_t)L_0) > ((int32_t)0))) { goto IL_0011; } } { int32_t L_1 = ___colorWriteMask4; if ((((int32_t)L_1) == ((int32_t)((int32_t)15)))) { goto IL_001d; } } IL_0011: { Material_t340375123 * L_2 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_2, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0024; } } IL_001d: { Material_t340375123 * L_4 = ___baseMat0; V_0 = L_4; goto IL_03b6; } IL_0024: { Material_t340375123 * L_5 = ___baseMat0; NullCheck(L_5); bool L_6 = Material_HasProperty_m4137769941(L_5, _stringLiteral2737864128, /*hidden argument*/NULL); if (L_6) { goto IL_0057; } } { Material_t340375123 * L_7 = ___baseMat0; NullCheck(L_7); String_t* L_8 = Object_get_name_m1414505214(L_7, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_9 = String_Concat_m3755062657(NULL /*static, unused*/, _stringLiteral1720664615, L_8, _stringLiteral3948229601, /*hidden argument*/NULL); Material_t340375123 * L_10 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogWarning_m218105588(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); Material_t340375123 * L_11 = ___baseMat0; V_0 = L_11; goto IL_03b6; } IL_0057: { Material_t340375123 * L_12 = ___baseMat0; NullCheck(L_12); bool L_13 = Material_HasProperty_m4137769941(L_12, _stringLiteral1070534145, /*hidden argument*/NULL); if (L_13) { goto IL_008a; } } { Material_t340375123 * L_14 = ___baseMat0; NullCheck(L_14); String_t* L_15 = Object_get_name_m1414505214(L_14, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_16 = String_Concat_m3755062657(NULL /*static, unused*/, _stringLiteral1720664615, L_15, _stringLiteral4290488009, /*hidden argument*/NULL); Material_t340375123 * L_17 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogWarning_m218105588(NULL /*static, unused*/, L_16, L_17, /*hidden argument*/NULL); Material_t340375123 * L_18 = ___baseMat0; V_0 = L_18; goto IL_03b6; } IL_008a: { Material_t340375123 * L_19 = ___baseMat0; NullCheck(L_19); bool L_20 = Material_HasProperty_m4137769941(L_19, _stringLiteral2160052589, /*hidden argument*/NULL); if (L_20) { goto IL_00bd; } } { Material_t340375123 * L_21 = ___baseMat0; NullCheck(L_21); String_t* L_22 = Object_get_name_m1414505214(L_21, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_23 = String_Concat_m3755062657(NULL /*static, unused*/, _stringLiteral1720664615, L_22, _stringLiteral2740099062, /*hidden argument*/NULL); Material_t340375123 * L_24 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogWarning_m218105588(NULL /*static, unused*/, L_23, L_24, /*hidden argument*/NULL); Material_t340375123 * L_25 = ___baseMat0; V_0 = L_25; goto IL_03b6; } IL_00bd: { Material_t340375123 * L_26 = ___baseMat0; NullCheck(L_26); bool L_27 = Material_HasProperty_m4137769941(L_26, _stringLiteral3822943443, /*hidden argument*/NULL); if (L_27) { goto IL_00f0; } } { Material_t340375123 * L_28 = ___baseMat0; NullCheck(L_28); String_t* L_29 = Object_get_name_m1414505214(L_28, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_30 = String_Concat_m3755062657(NULL /*static, unused*/, _stringLiteral1720664615, L_29, _stringLiteral1645601577, /*hidden argument*/NULL); Material_t340375123 * L_31 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogWarning_m218105588(NULL /*static, unused*/, L_30, L_31, /*hidden argument*/NULL); Material_t340375123 * L_32 = ___baseMat0; V_0 = L_32; goto IL_03b6; } IL_00f0: { Material_t340375123 * L_33 = ___baseMat0; NullCheck(L_33); bool L_34 = Material_HasProperty_m4137769941(L_33, _stringLiteral2127068351, /*hidden argument*/NULL); if (L_34) { goto IL_0123; } } { Material_t340375123 * L_35 = ___baseMat0; NullCheck(L_35); String_t* L_36 = Object_get_name_m1414505214(L_35, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_37 = String_Concat_m3755062657(NULL /*static, unused*/, _stringLiteral1720664615, L_36, _stringLiteral198911440, /*hidden argument*/NULL); Material_t340375123 * L_38 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogWarning_m218105588(NULL /*static, unused*/, L_37, L_38, /*hidden argument*/NULL); Material_t340375123 * L_39 = ___baseMat0; V_0 = L_39; goto IL_03b6; } IL_0123: { Material_t340375123 * L_40 = ___baseMat0; NullCheck(L_40); bool L_41 = Material_HasProperty_m4137769941(L_40, _stringLiteral873708475, /*hidden argument*/NULL); if (L_41) { goto IL_0156; } } { Material_t340375123 * L_42 = ___baseMat0; NullCheck(L_42); String_t* L_43 = Object_get_name_m1414505214(L_42, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_44 = String_Concat_m3755062657(NULL /*static, unused*/, _stringLiteral1720664615, L_43, _stringLiteral4246182081, /*hidden argument*/NULL); Material_t340375123 * L_45 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t3317548046_il2cpp_TypeInfo_var); Debug_LogWarning_m218105588(NULL /*static, unused*/, L_44, L_45, /*hidden argument*/NULL); Material_t340375123 * L_46 = ___baseMat0; V_0 = L_46; goto IL_03b6; } IL_0156: { V_1 = 0; goto IL_01e6; } IL_015d: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_47 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_48 = V_1; NullCheck(L_47); MatEntry_t2957107092 * L_49 = List_1_get_Item_m4066072586(L_47, L_48, /*hidden argument*/List_1_get_Item_m4066072586_MethodInfo_var); V_2 = L_49; MatEntry_t2957107092 * L_50 = V_2; NullCheck(L_50); Material_t340375123 * L_51 = L_50->get_baseMat_0(); Material_t340375123 * L_52 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_53 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_51, L_52, /*hidden argument*/NULL); if (!L_53) { goto IL_01e1; } } { MatEntry_t2957107092 * L_54 = V_2; NullCheck(L_54); int32_t L_55 = L_54->get_stencilId_3(); int32_t L_56 = ___stencilID1; if ((!(((uint32_t)L_55) == ((uint32_t)L_56)))) { goto IL_01e1; } } { MatEntry_t2957107092 * L_57 = V_2; NullCheck(L_57); int32_t L_58 = L_57->get_operation_4(); int32_t L_59 = ___operation2; if ((!(((uint32_t)L_58) == ((uint32_t)L_59)))) { goto IL_01e1; } } { MatEntry_t2957107092 * L_60 = V_2; NullCheck(L_60); int32_t L_61 = L_60->get_compareFunction_5(); int32_t L_62 = ___compareFunction3; if ((!(((uint32_t)L_61) == ((uint32_t)L_62)))) { goto IL_01e1; } } { MatEntry_t2957107092 * L_63 = V_2; NullCheck(L_63); int32_t L_64 = L_63->get_readMask_6(); int32_t L_65 = ___readMask5; if ((!(((uint32_t)L_64) == ((uint32_t)L_65)))) { goto IL_01e1; } } { MatEntry_t2957107092 * L_66 = V_2; NullCheck(L_66); int32_t L_67 = L_66->get_writeMask_7(); int32_t L_68 = ___writeMask6; if ((!(((uint32_t)L_67) == ((uint32_t)L_68)))) { goto IL_01e1; } } { MatEntry_t2957107092 * L_69 = V_2; NullCheck(L_69); int32_t L_70 = L_69->get_colorMask_9(); int32_t L_71 = ___colorWriteMask4; if ((!(((uint32_t)L_70) == ((uint32_t)L_71)))) { goto IL_01e1; } } { MatEntry_t2957107092 * L_72 = V_2; MatEntry_t2957107092 * L_73 = L_72; NullCheck(L_73); int32_t L_74 = L_73->get_count_2(); NullCheck(L_73); L_73->set_count_2(((int32_t)((int32_t)L_74+(int32_t)1))); MatEntry_t2957107092 * L_75 = V_2; NullCheck(L_75); Material_t340375123 * L_76 = L_75->get_customMat_1(); V_0 = L_76; goto IL_03b6; } IL_01e1: { int32_t L_77 = V_1; V_1 = ((int32_t)((int32_t)L_77+(int32_t)1)); } IL_01e6: { int32_t L_78 = V_1; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_79 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_79); int32_t L_80 = List_1_get_Count_m2805001068(L_79, /*hidden argument*/List_1_get_Count_m2805001068_MethodInfo_var); if ((((int32_t)L_78) < ((int32_t)L_80))) { goto IL_015d; } } { MatEntry_t2957107092 * L_81 = (MatEntry_t2957107092 *)il2cpp_codegen_object_new(MatEntry_t2957107092_il2cpp_TypeInfo_var); MatEntry__ctor_m1949610076(L_81, /*hidden argument*/NULL); V_3 = L_81; MatEntry_t2957107092 * L_82 = V_3; NullCheck(L_82); L_82->set_count_2(1); MatEntry_t2957107092 * L_83 = V_3; Material_t340375123 * L_84 = ___baseMat0; NullCheck(L_83); L_83->set_baseMat_0(L_84); MatEntry_t2957107092 * L_85 = V_3; Material_t340375123 * L_86 = ___baseMat0; Material_t340375123 * L_87 = (Material_t340375123 *)il2cpp_codegen_object_new(Material_t340375123_il2cpp_TypeInfo_var); Material__ctor_m1233271481(L_87, L_86, /*hidden argument*/NULL); NullCheck(L_85); L_85->set_customMat_1(L_87); MatEntry_t2957107092 * L_88 = V_3; NullCheck(L_88); Material_t340375123 * L_89 = L_88->get_customMat_1(); NullCheck(L_89); Object_set_hideFlags_m395729791(L_89, ((int32_t)61), /*hidden argument*/NULL); MatEntry_t2957107092 * L_90 = V_3; int32_t L_91 = ___stencilID1; NullCheck(L_90); L_90->set_stencilId_3(L_91); MatEntry_t2957107092 * L_92 = V_3; int32_t L_93 = ___operation2; NullCheck(L_92); L_92->set_operation_4(L_93); MatEntry_t2957107092 * L_94 = V_3; int32_t L_95 = ___compareFunction3; NullCheck(L_94); L_94->set_compareFunction_5(L_95); MatEntry_t2957107092 * L_96 = V_3; int32_t L_97 = ___readMask5; NullCheck(L_96); L_96->set_readMask_6(L_97); MatEntry_t2957107092 * L_98 = V_3; int32_t L_99 = ___writeMask6; NullCheck(L_98); L_98->set_writeMask_7(L_99); MatEntry_t2957107092 * L_100 = V_3; int32_t L_101 = ___colorWriteMask4; NullCheck(L_100); L_100->set_colorMask_9(L_101); MatEntry_t2957107092 * L_102 = V_3; int32_t L_103 = ___operation2; G_B28_0 = L_102; if (!L_103) { G_B29_0 = L_102; goto IL_025e; } } { int32_t L_104 = ___writeMask6; G_B30_0 = ((((int32_t)L_104) > ((int32_t)0))? 1 : 0); G_B30_1 = G_B28_0; goto IL_025f; } IL_025e: { G_B30_0 = 0; G_B30_1 = G_B29_0; } IL_025f: { NullCheck(G_B30_1); G_B30_1->set_useAlphaClip_8((bool)G_B30_0); MatEntry_t2957107092 * L_105 = V_3; NullCheck(L_105); Material_t340375123 * L_106 = L_105->get_customMat_1(); ObjectU5BU5D_t2843939325* L_107 = ((ObjectU5BU5D_t2843939325*)SZArrayNew(ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var, (uint32_t)8)); int32_t L_108 = ___stencilID1; int32_t L_109 = L_108; Il2CppObject * L_110 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_109); NullCheck(L_107); ArrayElementTypeCheck (L_107, L_110); (L_107)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)L_110); ObjectU5BU5D_t2843939325* L_111 = L_107; int32_t L_112 = ___operation2; int32_t L_113 = L_112; Il2CppObject * L_114 = Box(StencilOp_t3446174106_il2cpp_TypeInfo_var, &L_113); NullCheck(L_111); ArrayElementTypeCheck (L_111, L_114); (L_111)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_114); ObjectU5BU5D_t2843939325* L_115 = L_111; int32_t L_116 = ___compareFunction3; int32_t L_117 = L_116; Il2CppObject * L_118 = Box(CompareFunction_t2171731108_il2cpp_TypeInfo_var, &L_117); NullCheck(L_115); ArrayElementTypeCheck (L_115, L_118); (L_115)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)L_118); ObjectU5BU5D_t2843939325* L_119 = L_115; int32_t L_120 = ___writeMask6; int32_t L_121 = L_120; Il2CppObject * L_122 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_121); NullCheck(L_119); ArrayElementTypeCheck (L_119, L_122); (L_119)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_122); ObjectU5BU5D_t2843939325* L_123 = L_119; int32_t L_124 = ___readMask5; int32_t L_125 = L_124; Il2CppObject * L_126 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_125); NullCheck(L_123); ArrayElementTypeCheck (L_123, L_126); (L_123)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)L_126); ObjectU5BU5D_t2843939325* L_127 = L_123; int32_t L_128 = ___colorWriteMask4; int32_t L_129 = L_128; Il2CppObject * L_130 = Box(ColorWriteMask_t4282245599_il2cpp_TypeInfo_var, &L_129); NullCheck(L_127); ArrayElementTypeCheck (L_127, L_130); (L_127)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_130); ObjectU5BU5D_t2843939325* L_131 = L_127; MatEntry_t2957107092 * L_132 = V_3; NullCheck(L_132); bool L_133 = L_132->get_useAlphaClip_8(); bool L_134 = L_133; Il2CppObject * L_135 = Box(Boolean_t97287965_il2cpp_TypeInfo_var, &L_134); NullCheck(L_131); ArrayElementTypeCheck (L_131, L_135); (L_131)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)L_135); ObjectU5BU5D_t2843939325* L_136 = L_131; Material_t340375123 * L_137 = ___baseMat0; NullCheck(L_137); String_t* L_138 = Object_get_name_m1414505214(L_137, /*hidden argument*/NULL); NullCheck(L_136); ArrayElementTypeCheck (L_136, L_138); (L_136)->SetAt(static_cast<il2cpp_array_size_t>(7), (Il2CppObject *)L_138); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_139 = String_Format_m630303134(NULL /*static, unused*/, _stringLiteral468076268, L_136, /*hidden argument*/NULL); NullCheck(L_106); Object_set_name_m653319976(L_106, L_139, /*hidden argument*/NULL); MatEntry_t2957107092 * L_140 = V_3; NullCheck(L_140); Material_t340375123 * L_141 = L_140->get_customMat_1(); int32_t L_142 = ___stencilID1; NullCheck(L_141); Material_SetInt_m1704877877(L_141, _stringLiteral2737864128, L_142, /*hidden argument*/NULL); MatEntry_t2957107092 * L_143 = V_3; NullCheck(L_143); Material_t340375123 * L_144 = L_143->get_customMat_1(); int32_t L_145 = ___operation2; NullCheck(L_144); Material_SetInt_m1704877877(L_144, _stringLiteral1070534145, L_145, /*hidden argument*/NULL); MatEntry_t2957107092 * L_146 = V_3; NullCheck(L_146); Material_t340375123 * L_147 = L_146->get_customMat_1(); int32_t L_148 = ___compareFunction3; NullCheck(L_147); Material_SetInt_m1704877877(L_147, _stringLiteral2160052589, L_148, /*hidden argument*/NULL); MatEntry_t2957107092 * L_149 = V_3; NullCheck(L_149); Material_t340375123 * L_150 = L_149->get_customMat_1(); int32_t L_151 = ___readMask5; NullCheck(L_150); Material_SetInt_m1704877877(L_150, _stringLiteral3822943443, L_151, /*hidden argument*/NULL); MatEntry_t2957107092 * L_152 = V_3; NullCheck(L_152); Material_t340375123 * L_153 = L_152->get_customMat_1(); int32_t L_154 = ___writeMask6; NullCheck(L_153); Material_SetInt_m1704877877(L_153, _stringLiteral2127068351, L_154, /*hidden argument*/NULL); MatEntry_t2957107092 * L_155 = V_3; NullCheck(L_155); Material_t340375123 * L_156 = L_155->get_customMat_1(); int32_t L_157 = ___colorWriteMask4; NullCheck(L_156); Material_SetInt_m1704877877(L_156, _stringLiteral873708475, L_157, /*hidden argument*/NULL); MatEntry_t2957107092 * L_158 = V_3; NullCheck(L_158); Material_t340375123 * L_159 = L_158->get_customMat_1(); NullCheck(L_159); bool L_160 = Material_HasProperty_m4137769941(L_159, _stringLiteral2207929026, /*hidden argument*/NULL); if (!L_160) { goto IL_036f; } } { MatEntry_t2957107092 * L_161 = V_3; NullCheck(L_161); Material_t340375123 * L_162 = L_161->get_customMat_1(); MatEntry_t2957107092 * L_163 = V_3; NullCheck(L_163); bool L_164 = L_163->get_useAlphaClip_8(); G_B32_0 = _stringLiteral2207929026; G_B32_1 = L_162; if (!L_164) { G_B33_0 = _stringLiteral2207929026; G_B33_1 = L_162; goto IL_0369; } } { G_B34_0 = 1; G_B34_1 = G_B32_0; G_B34_2 = G_B32_1; goto IL_036a; } IL_0369: { G_B34_0 = 0; G_B34_1 = G_B33_0; G_B34_2 = G_B33_1; } IL_036a: { NullCheck(G_B34_2); Material_SetInt_m1704877877(G_B34_2, G_B34_1, G_B34_0, /*hidden argument*/NULL); } IL_036f: { MatEntry_t2957107092 * L_165 = V_3; NullCheck(L_165); bool L_166 = L_165->get_useAlphaClip_8(); if (!L_166) { goto IL_038f; } } { MatEntry_t2957107092 * L_167 = V_3; NullCheck(L_167); Material_t340375123 * L_168 = L_167->get_customMat_1(); NullCheck(L_168); Material_EnableKeyword_m2512384881(L_168, _stringLiteral726441801, /*hidden argument*/NULL); goto IL_039f; } IL_038f: { MatEntry_t2957107092 * L_169 = V_3; NullCheck(L_169); Material_t340375123 * L_170 = L_169->get_customMat_1(); NullCheck(L_170); Material_DisableKeyword_m2735472083(L_170, _stringLiteral726441801, /*hidden argument*/NULL); } IL_039f: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_171 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); MatEntry_t2957107092 * L_172 = V_3; NullCheck(L_171); List_1_Add_m873450360(L_171, L_172, /*hidden argument*/List_1_Add_m873450360_MethodInfo_var); MatEntry_t2957107092 * L_173 = V_3; NullCheck(L_173); Material_t340375123 * L_174 = L_173->get_customMat_1(); V_0 = L_174; goto IL_03b6; } IL_03b6: { Material_t340375123 * L_175 = V_0; return L_175; } } // System.Void UnityEngine.UI.StencilMaterial::Remove(UnityEngine.Material) extern "C" void StencilMaterial_Remove_m1301487727 (Il2CppObject * __this /* static, unused */, Material_t340375123 * ___customMat0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StencilMaterial_Remove_m1301487727_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; MatEntry_t2957107092 * V_1 = NULL; int32_t V_2 = 0; { Material_t340375123 * L_0 = ___customMat0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { goto IL_008a; } IL_0012: { V_0 = 0; goto IL_007a; } IL_0019: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_2 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_3 = V_0; NullCheck(L_2); MatEntry_t2957107092 * L_4 = List_1_get_Item_m4066072586(L_2, L_3, /*hidden argument*/List_1_get_Item_m4066072586_MethodInfo_var); V_1 = L_4; MatEntry_t2957107092 * L_5 = V_1; NullCheck(L_5); Material_t340375123 * L_6 = L_5->get_customMat_1(); Material_t340375123 * L_7 = ___customMat0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_003c; } } { goto IL_0076; } IL_003c: { MatEntry_t2957107092 * L_9 = V_1; MatEntry_t2957107092 * L_10 = L_9; NullCheck(L_10); int32_t L_11 = L_10->get_count_2(); int32_t L_12 = ((int32_t)((int32_t)L_11-(int32_t)1)); V_2 = L_12; NullCheck(L_10); L_10->set_count_2(L_12); int32_t L_13 = V_2; if (L_13) { goto IL_0071; } } { MatEntry_t2957107092 * L_14 = V_1; NullCheck(L_14); Material_t340375123 * L_15 = L_14->get_customMat_1(); Misc_DestroyImmediate_m3534039591(NULL /*static, unused*/, L_15, /*hidden argument*/NULL); MatEntry_t2957107092 * L_16 = V_1; NullCheck(L_16); L_16->set_baseMat_0((Material_t340375123 *)NULL); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_17 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_18 = V_0; NullCheck(L_17); List_1_RemoveAt_m294572737(L_17, L_18, /*hidden argument*/List_1_RemoveAt_m294572737_MethodInfo_var); } IL_0071: { goto IL_008a; } IL_0076: { int32_t L_19 = V_0; V_0 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_007a: { int32_t L_20 = V_0; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_21 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_21); int32_t L_22 = List_1_get_Count_m2805001068(L_21, /*hidden argument*/List_1_get_Count_m2805001068_MethodInfo_var); if ((((int32_t)L_20) < ((int32_t)L_22))) { goto IL_0019; } } IL_008a: { return; } } // System.Void UnityEngine.UI.StencilMaterial::ClearAll() extern "C" void StencilMaterial_ClearAll_m3197262106 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StencilMaterial_ClearAll_m3197262106_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; MatEntry_t2957107092 * V_1 = NULL; { V_0 = 0; goto IL_002c; } IL_0008: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_0 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_1 = V_0; NullCheck(L_0); MatEntry_t2957107092 * L_2 = List_1_get_Item_m4066072586(L_0, L_1, /*hidden argument*/List_1_get_Item_m4066072586_MethodInfo_var); V_1 = L_2; MatEntry_t2957107092 * L_3 = V_1; NullCheck(L_3); Material_t340375123 * L_4 = L_3->get_customMat_1(); Misc_DestroyImmediate_m3534039591(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); MatEntry_t2957107092 * L_5 = V_1; NullCheck(L_5); L_5->set_baseMat_0((Material_t340375123 *)NULL); int32_t L_6 = V_0; V_0 = ((int32_t)((int32_t)L_6+(int32_t)1)); } IL_002c: { int32_t L_7 = V_0; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_8 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_8); int32_t L_9 = List_1_get_Count_m2805001068(L_8, /*hidden argument*/List_1_get_Count_m2805001068_MethodInfo_var); if ((((int32_t)L_7) < ((int32_t)L_9))) { goto IL_0008; } } { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t3850132571_il2cpp_TypeInfo_var); List_1_t134214538 * L_10 = ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_10); List_1_Clear_m434664315(L_10, /*hidden argument*/List_1_Clear_m434664315_MethodInfo_var); return; } } // System.Void UnityEngine.UI.StencilMaterial::.cctor() extern "C" void StencilMaterial__cctor_m2003858807 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (StencilMaterial__cctor_m2003858807_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t134214538 * L_0 = (List_1_t134214538 *)il2cpp_codegen_object_new(List_1_t134214538_il2cpp_TypeInfo_var); List_1__ctor_m242441510(L_0, /*hidden argument*/List_1__ctor_m242441510_MethodInfo_var); ((StencilMaterial_t3850132571_StaticFields*)StencilMaterial_t3850132571_il2cpp_TypeInfo_var->static_fields)->set_m_List_0(L_0); return; } } // System.Void UnityEngine.UI.StencilMaterial/MatEntry::.ctor() extern "C" void MatEntry__ctor_m1949610076 (MatEntry_t2957107092 * __this, const MethodInfo* method) { { __this->set_operation_4(0); __this->set_compareFunction_5(8); Object__ctor_m297566312(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::.ctor() extern "C" void Text__ctor_m1150387577 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text__ctor_m1150387577_MetadataUsageId); s_Il2CppMethodInitialized = true; } { FontData_t746620069 * L_0 = FontData_get_defaultFontData_m1721612217(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_FontData_28(L_0); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_1 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); __this->set_m_Text_29(L_1); __this->set_m_DisableFontTextureRebuiltCallback_33((bool)0); __this->set_m_TempVerts_34(((UIVertexU5BU5D_t1981460040*)SZArrayNew(UIVertexU5BU5D_t1981460040_il2cpp_TypeInfo_var, (uint32_t)4))); MaskableGraphic__ctor_m3705055375(__this, /*hidden argument*/NULL); Graphic_set_useLegacyMeshGeneration_m2447316585(__this, (bool)0, /*hidden argument*/NULL); return; } } // UnityEngine.TextGenerator UnityEngine.UI.Text::get_cachedTextGenerator() extern "C" TextGenerator_t3211863866 * Text_get_cachedTextGenerator_m2506989875 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_get_cachedTextGenerator_m2506989875_MetadataUsageId); s_Il2CppMethodInitialized = true; } TextGenerator_t3211863866 * V_0 = NULL; TextGenerator_t3211863866 * V_1 = NULL; TextGenerator_t3211863866 * G_B5_0 = NULL; TextGenerator_t3211863866 * G_B1_0 = NULL; Text_t1901882714 * G_B3_0 = NULL; Text_t1901882714 * G_B2_0 = NULL; TextGenerator_t3211863866 * G_B4_0 = NULL; Text_t1901882714 * G_B4_1 = NULL; { TextGenerator_t3211863866 * L_0 = __this->get_m_TextCache_30(); TextGenerator_t3211863866 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B5_0 = L_1; goto IL_0041; } } { String_t* L_2 = __this->get_m_Text_29(); NullCheck(L_2); int32_t L_3 = String_get_Length_m3847582255(L_2, /*hidden argument*/NULL); G_B2_0 = __this; if (!L_3) { G_B3_0 = __this; goto IL_0034; } } { String_t* L_4 = __this->get_m_Text_29(); NullCheck(L_4); int32_t L_5 = String_get_Length_m3847582255(L_4, /*hidden argument*/NULL); TextGenerator_t3211863866 * L_6 = (TextGenerator_t3211863866 *)il2cpp_codegen_object_new(TextGenerator_t3211863866_il2cpp_TypeInfo_var); TextGenerator__ctor_m3399958253(L_6, L_5, /*hidden argument*/NULL); G_B4_0 = L_6; G_B4_1 = G_B2_0; goto IL_0039; } IL_0034: { TextGenerator_t3211863866 * L_7 = (TextGenerator_t3211863866 *)il2cpp_codegen_object_new(TextGenerator_t3211863866_il2cpp_TypeInfo_var); TextGenerator__ctor_m2017520511(L_7, /*hidden argument*/NULL); G_B4_0 = L_7; G_B4_1 = G_B3_0; } IL_0039: { TextGenerator_t3211863866 * L_8 = G_B4_0; V_0 = L_8; NullCheck(G_B4_1); G_B4_1->set_m_TextCache_30(L_8); TextGenerator_t3211863866 * L_9 = V_0; G_B5_0 = L_9; } IL_0041: { V_1 = G_B5_0; goto IL_0047; } IL_0047: { TextGenerator_t3211863866 * L_10 = V_1; return L_10; } } // UnityEngine.TextGenerator UnityEngine.UI.Text::get_cachedTextGeneratorForLayout() extern "C" TextGenerator_t3211863866 * Text_get_cachedTextGeneratorForLayout_m116487342 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_get_cachedTextGeneratorForLayout_m116487342_MetadataUsageId); s_Il2CppMethodInitialized = true; } TextGenerator_t3211863866 * V_0 = NULL; TextGenerator_t3211863866 * V_1 = NULL; TextGenerator_t3211863866 * G_B2_0 = NULL; TextGenerator_t3211863866 * G_B1_0 = NULL; { TextGenerator_t3211863866 * L_0 = __this->get_m_TextCacheForLayout_31(); TextGenerator_t3211863866 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_001c; } } { TextGenerator_t3211863866 * L_2 = (TextGenerator_t3211863866 *)il2cpp_codegen_object_new(TextGenerator_t3211863866_il2cpp_TypeInfo_var); TextGenerator__ctor_m2017520511(L_2, /*hidden argument*/NULL); TextGenerator_t3211863866 * L_3 = L_2; V_0 = L_3; __this->set_m_TextCacheForLayout_31(L_3); TextGenerator_t3211863866 * L_4 = V_0; G_B2_0 = L_4; } IL_001c: { V_1 = G_B2_0; goto IL_0022; } IL_0022: { TextGenerator_t3211863866 * L_5 = V_1; return L_5; } } // UnityEngine.Texture UnityEngine.UI.Text::get_mainTexture() extern "C" Texture_t3661962703 * Text_get_mainTexture_m3501892889 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_get_mainTexture_m3501892889_MetadataUsageId); s_Il2CppMethodInitialized = true; } Texture_t3661962703 * V_0 = NULL; { Font_t1956802104 * L_0 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0059; } } { Font_t1956802104 * L_2 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_2); Material_t340375123 * L_3 = Font_get_material_m2838483357(L_2, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0059; } } { Font_t1956802104 * L_5 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_5); Material_t340375123 * L_6 = Font_get_material_m2838483357(L_5, /*hidden argument*/NULL); NullCheck(L_6); Texture_t3661962703 * L_7 = Material_get_mainTexture_m4181654696(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_8 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_7, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0059; } } { Font_t1956802104 * L_9 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_9); Material_t340375123 * L_10 = Font_get_material_m2838483357(L_9, /*hidden argument*/NULL); NullCheck(L_10); Texture_t3661962703 * L_11 = Material_get_mainTexture_m4181654696(L_10, /*hidden argument*/NULL); V_0 = L_11; goto IL_0087; } IL_0059: { Material_t340375123 * L_12 = ((Graphic_t1660335611 *)__this)->get_m_Material_4(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_13 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_12, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_13) { goto IL_007b; } } { Material_t340375123 * L_14 = ((Graphic_t1660335611 *)__this)->get_m_Material_4(); NullCheck(L_14); Texture_t3661962703 * L_15 = Material_get_mainTexture_m4181654696(L_14, /*hidden argument*/NULL); V_0 = L_15; goto IL_0087; } IL_007b: { Texture_t3661962703 * L_16 = Graphic_get_mainTexture_m147151966(__this, /*hidden argument*/NULL); V_0 = L_16; goto IL_0087; } IL_0087: { Texture_t3661962703 * L_17 = V_0; return L_17; } } // System.Void UnityEngine.UI.Text::FontTextureChanged() extern "C" void Text_FontTextureChanged_m495427969 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_FontTextureChanged_m495427969_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_0 = Object_op_Implicit_m487959476(NULL /*static, unused*/, __this, /*hidden argument*/NULL); if (L_0) { goto IL_0011; } } { goto IL_0061; } IL_0011: { bool L_1 = __this->get_m_DisableFontTextureRebuiltCallback_33(); if (!L_1) { goto IL_0021; } } { goto IL_0061; } IL_0021: { TextGenerator_t3211863866 * L_2 = Text_get_cachedTextGenerator_m2506989875(__this, /*hidden argument*/NULL); NullCheck(L_2); TextGenerator_Invalidate_m3806469489(L_2, /*hidden argument*/NULL); bool L_3 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_3) { goto IL_003c; } } { goto IL_0061; } IL_003c: { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var); bool L_4 = CanvasUpdateRegistry_IsRebuildingGraphics_m1904586840(NULL /*static, unused*/, /*hidden argument*/NULL); if (L_4) { goto IL_0050; } } { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t2720824592_il2cpp_TypeInfo_var); bool L_5 = CanvasUpdateRegistry_IsRebuildingLayout_m3530790142(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_5) { goto IL_005b; } } IL_0050: { VirtActionInvoker0::Invoke(40 /* System.Void UnityEngine.UI.Graphic::UpdateGeometry() */, __this); goto IL_0061; } IL_005b: { VirtActionInvoker0::Invoke(26 /* System.Void UnityEngine.UI.Graphic::SetAllDirty() */, __this); } IL_0061: { return; } } // UnityEngine.Font UnityEngine.UI.Text::get_font() extern "C" Font_t1956802104 * Text_get_font_m2857203289 (Text_t1901882714 * __this, const MethodInfo* method) { Font_t1956802104 * V_0 = NULL; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); Font_t1956802104 * L_1 = FontData_get_font_m2720086288(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { Font_t1956802104 * L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_font(UnityEngine.Font) extern "C" void Text_set_font_m2192091651 (Text_t1901882714 * __this, Font_t1956802104 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_set_font_m2192091651_MetadataUsageId); s_Il2CppMethodInitialized = true; } { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); Font_t1956802104 * L_1 = FontData_get_font_m2720086288(L_0, /*hidden argument*/NULL); Font_t1956802104 * L_2 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_3 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_1, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_001c; } } { goto IL_003a; } IL_001c: { IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t1839077620_il2cpp_TypeInfo_var); FontUpdateTracker_UntrackText_m1981515690(NULL /*static, unused*/, __this, /*hidden argument*/NULL); FontData_t746620069 * L_4 = __this->get_m_FontData_28(); Font_t1956802104 * L_5 = ___value0; NullCheck(L_4); FontData_set_font_m3514564971(L_4, L_5, /*hidden argument*/NULL); FontUpdateTracker_TrackText_m2951516607(NULL /*static, unused*/, __this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(26 /* System.Void UnityEngine.UI.Graphic::SetAllDirty() */, __this); } IL_003a: { return; } } // System.String UnityEngine.UI.Text::get_text() extern "C" String_t* Text_get_text_m2352438434 (Text_t1901882714 * __this, const MethodInfo* method) { String_t* V_0 = NULL; { String_t* L_0 = __this->get_m_Text_29(); V_0 = L_0; goto IL_000d; } IL_000d: { String_t* L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Text::set_text(System.String) extern "C" void Text_set_text_m3481657721 (Text_t1901882714 * __this, String_t* ___value0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_set_text_m3481657721_MetadataUsageId); s_Il2CppMethodInitialized = true; } { String_t* L_0 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_1 = String_IsNullOrEmpty_m2969720369(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0039; } } { String_t* L_2 = __this->get_m_Text_29(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_3 = String_IsNullOrEmpty_m2969720369(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0022; } } { goto IL_005f; } IL_0022: { __this->set_m_Text_29(_stringLiteral757602046); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); goto IL_005f; } IL_0039: { String_t* L_4 = __this->get_m_Text_29(); String_t* L_5 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_6 = String_op_Inequality_m215368492(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_005f; } } { String_t* L_7 = ___value0; __this->set_m_Text_29(L_7); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_005f: { return; } } // System.Boolean UnityEngine.UI.Text::get_supportRichText() extern "C" bool Text_get_supportRichText_m1837499160 (Text_t1901882714 * __this, const MethodInfo* method) { bool V_0 = false; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_richText_m3425673597(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_supportRichText(System.Boolean) extern "C" void Text_set_supportRichText_m1590781031 (Text_t1901882714 * __this, bool ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_richText_m3425673597(L_0, /*hidden argument*/NULL); bool L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); bool L_4 = ___value0; NullCheck(L_3); FontData_set_richText_m993590067(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // System.Boolean UnityEngine.UI.Text::get_resizeTextForBestFit() extern "C" bool Text_get_resizeTextForBestFit_m1689289413 (Text_t1901882714 * __this, const MethodInfo* method) { bool V_0 = false; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_bestFit_m162767615(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_resizeTextForBestFit(System.Boolean) extern "C" void Text_set_resizeTextForBestFit_m4095249125 (Text_t1901882714 * __this, bool ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_bestFit_m162767615(L_0, /*hidden argument*/NULL); bool L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); bool L_4 = ___value0; NullCheck(L_3); FontData_set_bestFit_m199436960(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // System.Int32 UnityEngine.UI.Text::get_resizeTextMinSize() extern "C" int32_t Text_get_resizeTextMinSize_m1002355407 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_minSize_m4139263154(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_resizeTextMinSize(System.Int32) extern "C" void Text_set_resizeTextMinSize_m3257679950 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_minSize_m4139263154(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_minSize_m213866975(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // System.Int32 UnityEngine.UI.Text::get_resizeTextMaxSize() extern "C" int32_t Text_get_resizeTextMaxSize_m1032371143 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_maxSize_m195374730(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_resizeTextMaxSize(System.Int32) extern "C" void Text_set_resizeTextMaxSize_m1403328328 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_maxSize_m195374730(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_maxSize_m1770582000(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // UnityEngine.TextAnchor UnityEngine.UI.Text::get_alignment() extern "C" int32_t Text_get_alignment_m1496827807 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_alignment_m3694916235(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_alignment(UnityEngine.TextAnchor) extern "C" void Text_set_alignment_m88714888 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_alignment_m3694916235(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_alignment_m1506742557(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // System.Boolean UnityEngine.UI.Text::get_alignByGeometry() extern "C" bool Text_get_alignByGeometry_m1860950270 (Text_t1901882714 * __this, const MethodInfo* method) { bool V_0 = false; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_alignByGeometry_m2805576119(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_alignByGeometry(System.Boolean) extern "C" void Text_set_alignByGeometry_m3828822280 (Text_t1901882714 * __this, bool ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_alignByGeometry_m2805576119(L_0, /*hidden argument*/NULL); bool L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_0029; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); bool L_4 = ___value0; NullCheck(L_3); FontData_set_alignByGeometry_m3039505596(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); } IL_0029: { return; } } // System.Int32 UnityEngine.UI.Text::get_fontSize() extern "C" int32_t Text_get_fontSize_m1677872538 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontSize_m4142428560(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_fontSize(System.Int32) extern "C" void Text_set_fontSize_m3617617524 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontSize_m4142428560(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_fontSize_m2765857076(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // UnityEngine.HorizontalWrapMode UnityEngine.UI.Text::get_horizontalOverflow() extern "C" int32_t Text_get_horizontalOverflow_m4155575610 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_horizontalOverflow_m2769815943(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_horizontalOverflow(UnityEngine.HorizontalWrapMode) extern "C" void Text_set_horizontalOverflow_m2473787109 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_horizontalOverflow_m2769815943(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_horizontalOverflow_m83710366(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // UnityEngine.VerticalWrapMode UnityEngine.UI.Text::get_verticalOverflow() extern "C" int32_t Text_get_verticalOverflow_m2420459396 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_verticalOverflow_m4132840071(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_verticalOverflow(UnityEngine.VerticalWrapMode) extern "C" void Text_set_verticalOverflow_m707803934 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_verticalOverflow_m4132840071(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_verticalOverflow_m3628581825(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // System.Single UnityEngine.UI.Text::get_lineSpacing() extern "C" float Text_get_lineSpacing_m390610023 (Text_t1901882714 * __this, const MethodInfo* method) { float V_0 = 0.0f; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); float L_1 = FontData_get_lineSpacing_m2772945641(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { float L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_lineSpacing(System.Single) extern "C" void Text_set_lineSpacing_m2439529390 (Text_t1901882714 * __this, float ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); float L_1 = FontData_get_lineSpacing_m2772945641(L_0, /*hidden argument*/NULL); float L_2 = ___value0; if ((!(((float)L_1) == ((float)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); float L_4 = ___value0; NullCheck(L_3); FontData_set_lineSpacing_m3900627226(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // UnityEngine.FontStyle UnityEngine.UI.Text::get_fontStyle() extern "C" int32_t Text_get_fontStyle_m3082671380 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontStyle_m4265053049(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.Text::set_fontStyle(UnityEngine.FontStyle) extern "C" void Text_set_fontStyle_m648756124 (Text_t1901882714 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t746620069 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontStyle_m4265053049(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0017; } } { goto IL_002f; } IL_0017: { FontData_t746620069 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_fontStyle_m3365296225(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(28 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(27 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_002f: { return; } } // System.Single UnityEngine.UI.Text::get_pixelsPerUnit() extern "C" float Text_get_pixelsPerUnit_m4041777403 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_get_pixelsPerUnit_m4041777403_MetadataUsageId); s_Il2CppMethodInitialized = true; } Canvas_t3310196443 * V_0 = NULL; float V_1 = 0.0f; { Canvas_t3310196443 * L_0 = Graphic_get_canvas_m3320066409(__this, /*hidden argument*/NULL); V_0 = L_0; Canvas_t3310196443 * L_1 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); if (L_2) { goto IL_001e; } } { V_1 = (1.0f); goto IL_0096; } IL_001e: { Font_t1956802104 * L_3 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Implicit_m487959476(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_003e; } } { Font_t1956802104 * L_5 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_5); bool L_6 = Font_get_dynamic_m1886714215(L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_004a; } } IL_003e: { Canvas_t3310196443 * L_7 = V_0; NullCheck(L_7); float L_8 = Canvas_get_scaleFactor_m2033584752(L_7, /*hidden argument*/NULL); V_1 = L_8; goto IL_0096; } IL_004a: { FontData_t746620069 * L_9 = __this->get_m_FontData_28(); NullCheck(L_9); int32_t L_10 = FontData_get_fontSize_m4142428560(L_9, /*hidden argument*/NULL); if ((((int32_t)L_10) <= ((int32_t)0))) { goto IL_006c; } } { Font_t1956802104 * L_11 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_11); int32_t L_12 = Font_get_fontSize_m4011052026(L_11, /*hidden argument*/NULL); if ((((int32_t)L_12) > ((int32_t)0))) { goto IL_0077; } } IL_006c: { V_1 = (1.0f); goto IL_0096; } IL_0077: { Font_t1956802104 * L_13 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_13); int32_t L_14 = Font_get_fontSize_m4011052026(L_13, /*hidden argument*/NULL); FontData_t746620069 * L_15 = __this->get_m_FontData_28(); NullCheck(L_15); int32_t L_16 = FontData_get_fontSize_m4142428560(L_15, /*hidden argument*/NULL); V_1 = ((float)((float)(((float)((float)L_14)))/(float)(((float)((float)L_16))))); goto IL_0096; } IL_0096: { float L_17 = V_1; return L_17; } } // System.Void UnityEngine.UI.Text::OnEnable() extern "C" void Text_OnEnable_m616205807 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_OnEnable_m616205807_MetadataUsageId); s_Il2CppMethodInitialized = true; } { MaskableGraphic_OnEnable_m846302383(__this, /*hidden argument*/NULL); TextGenerator_t3211863866 * L_0 = Text_get_cachedTextGenerator_m2506989875(__this, /*hidden argument*/NULL); NullCheck(L_0); TextGenerator_Invalidate_m3806469489(L_0, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t1839077620_il2cpp_TypeInfo_var); FontUpdateTracker_TrackText_m2951516607(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::OnDisable() extern "C" void Text_OnDisable_m1806889406 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_OnDisable_m1806889406_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t1839077620_il2cpp_TypeInfo_var); FontUpdateTracker_UntrackText_m1981515690(NULL /*static, unused*/, __this, /*hidden argument*/NULL); MaskableGraphic_OnDisable_m1757789159(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::UpdateGeometry() extern "C" void Text_UpdateGeometry_m3634850647 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_UpdateGeometry_m3634850647_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Font_t1956802104 * L_0 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001a; } } { Graphic_UpdateGeometry_m1153074938(__this, /*hidden argument*/NULL); } IL_001a: { return; } } // System.Void UnityEngine.UI.Text::AssignDefaultFont() extern "C" void Text_AssignDefaultFont_m3151310334 (Text_t1901882714 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_AssignDefaultFont_m3151310334_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Font_t1956802104 * L_0 = Resources_GetBuiltinResource_TisFont_t1956802104_m2738776830(NULL /*static, unused*/, _stringLiteral2974894664, /*hidden argument*/Resources_GetBuiltinResource_TisFont_t1956802104_m2738776830_MethodInfo_var); Text_set_font_m2192091651(__this, L_0, /*hidden argument*/NULL); return; } } // UnityEngine.TextGenerationSettings UnityEngine.UI.Text::GetGenerationSettings(UnityEngine.Vector2) extern "C" TextGenerationSettings_t1351628751 Text_GetGenerationSettings_m1390856115 (Text_t1901882714 * __this, Vector2_t2156229523 ___extents0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_GetGenerationSettings_m1390856115_MetadataUsageId); s_Il2CppMethodInitialized = true; } TextGenerationSettings_t1351628751 V_0; memset(&V_0, 0, sizeof(V_0)); TextGenerationSettings_t1351628751 V_1; memset(&V_1, 0, sizeof(V_1)); { Initobj (TextGenerationSettings_t1351628751_il2cpp_TypeInfo_var, (&V_0)); Vector2_t2156229523 L_0 = ___extents0; (&V_0)->set_generationExtents_15(L_0); Font_t1956802104 * L_1 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_006a; } } { Font_t1956802104 * L_3 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); NullCheck(L_3); bool L_4 = Font_get_dynamic_m1886714215(L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_006a; } } { FontData_t746620069 * L_5 = __this->get_m_FontData_28(); NullCheck(L_5); int32_t L_6 = FontData_get_fontSize_m4142428560(L_5, /*hidden argument*/NULL); (&V_0)->set_fontSize_2(L_6); FontData_t746620069 * L_7 = __this->get_m_FontData_28(); NullCheck(L_7); int32_t L_8 = FontData_get_minSize_m4139263154(L_7, /*hidden argument*/NULL); (&V_0)->set_resizeTextMinSize_10(L_8); FontData_t746620069 * L_9 = __this->get_m_FontData_28(); NullCheck(L_9); int32_t L_10 = FontData_get_maxSize_m195374730(L_9, /*hidden argument*/NULL); (&V_0)->set_resizeTextMaxSize_11(L_10); } IL_006a: { FontData_t746620069 * L_11 = __this->get_m_FontData_28(); NullCheck(L_11); int32_t L_12 = FontData_get_alignment_m3694916235(L_11, /*hidden argument*/NULL); (&V_0)->set_textAnchor_7(L_12); FontData_t746620069 * L_13 = __this->get_m_FontData_28(); NullCheck(L_13); bool L_14 = FontData_get_alignByGeometry_m2805576119(L_13, /*hidden argument*/NULL); (&V_0)->set_alignByGeometry_8(L_14); float L_15 = Text_get_pixelsPerUnit_m4041777403(__this, /*hidden argument*/NULL); (&V_0)->set_scaleFactor_5(L_15); Color_t2555686324 L_16 = VirtFuncInvoker0< Color_t2555686324 >::Invoke(22 /* UnityEngine.Color UnityEngine.UI.Graphic::get_color() */, __this); (&V_0)->set_color_1(L_16); Font_t1956802104 * L_17 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); (&V_0)->set_font_0(L_17); RectTransform_t3704657025 * L_18 = Graphic_get_rectTransform_m1167152468(__this, /*hidden argument*/NULL); NullCheck(L_18); Vector2_t2156229523 L_19 = RectTransform_get_pivot_m1676241928(L_18, /*hidden argument*/NULL); (&V_0)->set_pivot_16(L_19); FontData_t746620069 * L_20 = __this->get_m_FontData_28(); NullCheck(L_20); bool L_21 = FontData_get_richText_m3425673597(L_20, /*hidden argument*/NULL); (&V_0)->set_richText_4(L_21); FontData_t746620069 * L_22 = __this->get_m_FontData_28(); NullCheck(L_22); float L_23 = FontData_get_lineSpacing_m2772945641(L_22, /*hidden argument*/NULL); (&V_0)->set_lineSpacing_3(L_23); FontData_t746620069 * L_24 = __this->get_m_FontData_28(); NullCheck(L_24); int32_t L_25 = FontData_get_fontStyle_m4265053049(L_24, /*hidden argument*/NULL); (&V_0)->set_fontStyle_6(L_25); FontData_t746620069 * L_26 = __this->get_m_FontData_28(); NullCheck(L_26); bool L_27 = FontData_get_bestFit_m162767615(L_26, /*hidden argument*/NULL); (&V_0)->set_resizeTextForBestFit_9(L_27); (&V_0)->set_updateBounds_12((bool)0); FontData_t746620069 * L_28 = __this->get_m_FontData_28(); NullCheck(L_28); int32_t L_29 = FontData_get_horizontalOverflow_m2769815943(L_28, /*hidden argument*/NULL); (&V_0)->set_horizontalOverflow_14(L_29); FontData_t746620069 * L_30 = __this->get_m_FontData_28(); NullCheck(L_30); int32_t L_31 = FontData_get_verticalOverflow_m4132840071(L_30, /*hidden argument*/NULL); (&V_0)->set_verticalOverflow_13(L_31); TextGenerationSettings_t1351628751 L_32 = V_0; V_1 = L_32; goto IL_0142; } IL_0142: { TextGenerationSettings_t1351628751 L_33 = V_1; return L_33; } } // UnityEngine.Vector2 UnityEngine.UI.Text::GetTextAnchorPivot(UnityEngine.TextAnchor) extern "C" Vector2_t2156229523 Text_GetTextAnchorPivot_m983265935 (Il2CppObject * __this /* static, unused */, int32_t ___anchor0, const MethodInfo* method) { Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); { int32_t L_0 = ___anchor0; switch (L_0) { case 0: { goto IL_00ae; } case 1: { goto IL_00c3; } case 2: { goto IL_00d8; } case 3: { goto IL_006f; } case 4: { goto IL_0084; } case 5: { goto IL_0099; } case 6: { goto IL_0030; } case 7: { goto IL_0045; } case 8: { goto IL_005a; } } } { goto IL_00ed; } IL_0030: { Vector2_t2156229523 L_1; memset(&L_1, 0, sizeof(L_1)); Vector2__ctor_m4060800441(&L_1, (0.0f), (0.0f), /*hidden argument*/NULL); V_0 = L_1; goto IL_00f8; } IL_0045: { Vector2_t2156229523 L_2; memset(&L_2, 0, sizeof(L_2)); Vector2__ctor_m4060800441(&L_2, (0.5f), (0.0f), /*hidden argument*/NULL); V_0 = L_2; goto IL_00f8; } IL_005a: { Vector2_t2156229523 L_3; memset(&L_3, 0, sizeof(L_3)); Vector2__ctor_m4060800441(&L_3, (1.0f), (0.0f), /*hidden argument*/NULL); V_0 = L_3; goto IL_00f8; } IL_006f: { Vector2_t2156229523 L_4; memset(&L_4, 0, sizeof(L_4)); Vector2__ctor_m4060800441(&L_4, (0.0f), (0.5f), /*hidden argument*/NULL); V_0 = L_4; goto IL_00f8; } IL_0084: { Vector2_t2156229523 L_5; memset(&L_5, 0, sizeof(L_5)); Vector2__ctor_m4060800441(&L_5, (0.5f), (0.5f), /*hidden argument*/NULL); V_0 = L_5; goto IL_00f8; } IL_0099: { Vector2_t2156229523 L_6; memset(&L_6, 0, sizeof(L_6)); Vector2__ctor_m4060800441(&L_6, (1.0f), (0.5f), /*hidden argument*/NULL); V_0 = L_6; goto IL_00f8; } IL_00ae: { Vector2_t2156229523 L_7; memset(&L_7, 0, sizeof(L_7)); Vector2__ctor_m4060800441(&L_7, (0.0f), (1.0f), /*hidden argument*/NULL); V_0 = L_7; goto IL_00f8; } IL_00c3: { Vector2_t2156229523 L_8; memset(&L_8, 0, sizeof(L_8)); Vector2__ctor_m4060800441(&L_8, (0.5f), (1.0f), /*hidden argument*/NULL); V_0 = L_8; goto IL_00f8; } IL_00d8: { Vector2_t2156229523 L_9; memset(&L_9, 0, sizeof(L_9)); Vector2__ctor_m4060800441(&L_9, (1.0f), (1.0f), /*hidden argument*/NULL); V_0 = L_9; goto IL_00f8; } IL_00ed: { Vector2_t2156229523 L_10 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_10; goto IL_00f8; } IL_00f8: { Vector2_t2156229523 L_11 = V_0; return L_11; } } // System.Void UnityEngine.UI.Text::OnPopulateMesh(UnityEngine.UI.VertexHelper) extern "C" void Text_OnPopulateMesh_m1525268284 (Text_t1901882714 * __this, VertexHelper_t2453304189 * ___toFill0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text_OnPopulateMesh_m1525268284_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_t2156229523 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); TextGenerationSettings_t1351628751 V_2; memset(&V_2, 0, sizeof(V_2)); Il2CppObject* V_3 = NULL; float V_4 = 0.0f; int32_t V_5 = 0; Vector2_t2156229523 V_6; memset(&V_6, 0, sizeof(V_6)); UIVertex_t4057497605 V_7; memset(&V_7, 0, sizeof(V_7)); UIVertex_t4057497605 V_8; memset(&V_8, 0, sizeof(V_8)); int32_t V_9 = 0; int32_t V_10 = 0; int32_t V_11 = 0; int32_t V_12 = 0; { Font_t1956802104 * L_0 = Text_get_font_m2857203289(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0017; } } { goto IL_0209; } IL_0017: { __this->set_m_DisableFontTextureRebuiltCallback_33((bool)1); RectTransform_t3704657025 * L_2 = Graphic_get_rectTransform_m1167152468(__this, /*hidden argument*/NULL); NullCheck(L_2); Rect_t2360479859 L_3 = RectTransform_get_rect_m1643570810(L_2, /*hidden argument*/NULL); V_1 = L_3; Vector2_t2156229523 L_4 = Rect_get_size_m3542039952((&V_1), /*hidden argument*/NULL); V_0 = L_4; Vector2_t2156229523 L_5 = V_0; TextGenerationSettings_t1351628751 L_6 = Text_GetGenerationSettings_m1390856115(__this, L_5, /*hidden argument*/NULL); V_2 = L_6; TextGenerator_t3211863866 * L_7 = Text_get_cachedTextGenerator_m2506989875(__this, /*hidden argument*/NULL); String_t* L_8 = VirtFuncInvoker0< String_t* >::Invoke(71 /* System.String UnityEngine.UI.Text::get_text() */, __this); TextGenerationSettings_t1351628751 L_9 = V_2; GameObject_t1113636619 * L_10 = Component_get_gameObject_m2648350745(__this, /*hidden argument*/NULL); NullCheck(L_7); TextGenerator_PopulateWithErrors_m4240218382(L_7, L_8, L_9, L_10, /*hidden argument*/NULL); TextGenerator_t3211863866 * L_11 = Text_get_cachedTextGenerator_m2506989875(__this, /*hidden argument*/NULL); NullCheck(L_11); Il2CppObject* L_12 = TextGenerator_get_verts_m292946303(L_11, /*hidden argument*/NULL); V_3 = L_12; float L_13 = Text_get_pixelsPerUnit_m4041777403(__this, /*hidden argument*/NULL); V_4 = ((float)((float)(1.0f)/(float)L_13)); Il2CppObject* L_14 = V_3; NullCheck(L_14); int32_t L_15 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<UnityEngine.UIVertex>::get_Count() */, ICollection_1_t2590682543_il2cpp_TypeInfo_var, L_14); V_5 = ((int32_t)((int32_t)L_15-(int32_t)4)); Il2CppObject* L_16 = V_3; NullCheck(L_16); UIVertex_t4057497605 L_17 = InterfaceFuncInvoker1< UIVertex_t4057497605 , int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<UnityEngine.UIVertex>::get_Item(System.Int32) */, IList_1_t1577850092_il2cpp_TypeInfo_var, L_16, 0); V_7 = L_17; Vector3_t3722313464 * L_18 = (&V_7)->get_address_of_position_0(); float L_19 = L_18->get_x_1(); Il2CppObject* L_20 = V_3; NullCheck(L_20); UIVertex_t4057497605 L_21 = InterfaceFuncInvoker1< UIVertex_t4057497605 , int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<UnityEngine.UIVertex>::get_Item(System.Int32) */, IList_1_t1577850092_il2cpp_TypeInfo_var, L_20, 0); V_8 = L_21; Vector3_t3722313464 * L_22 = (&V_8)->get_address_of_position_0(); float L_23 = L_22->get_y_2(); Vector2_t2156229523 L_24; memset(&L_24, 0, sizeof(L_24)); Vector2__ctor_m4060800441(&L_24, L_19, L_23, /*hidden argument*/NULL); float L_25 = V_4; Vector2_t2156229523 L_26 = Vector2_op_Multiply_m1889160058(NULL /*static, unused*/, L_24, L_25, /*hidden argument*/NULL); V_6 = L_26; Vector2_t2156229523 L_27 = V_6; Vector2_t2156229523 L_28 = Graphic_PixelAdjustPoint_m2668101213(__this, L_27, /*hidden argument*/NULL); Vector2_t2156229523 L_29 = V_6; Vector2_t2156229523 L_30 = Vector2_op_Subtraction_m1387382396(NULL /*static, unused*/, L_28, L_29, /*hidden argument*/NULL); V_6 = L_30; VertexHelper_t2453304189 * L_31 = ___toFill0; NullCheck(L_31); VertexHelper_Clear_m627349662(L_31, /*hidden argument*/NULL); Vector2_t2156229523 L_32 = V_6; Vector2_t2156229523 L_33 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_34 = Vector2_op_Inequality_m2880653562(NULL /*static, unused*/, L_32, L_33, /*hidden argument*/NULL); if (!L_34) { goto IL_0194; } } { V_9 = 0; goto IL_0185; } IL_00e0: { int32_t L_35 = V_9; V_10 = ((int32_t)((int32_t)L_35&(int32_t)3)); UIVertexU5BU5D_t1981460040* L_36 = __this->get_m_TempVerts_34(); int32_t L_37 = V_10; NullCheck(L_36); Il2CppObject* L_38 = V_3; int32_t L_39 = V_9; NullCheck(L_38); UIVertex_t4057497605 L_40 = InterfaceFuncInvoker1< UIVertex_t4057497605 , int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<UnityEngine.UIVertex>::get_Item(System.Int32) */, IList_1_t1577850092_il2cpp_TypeInfo_var, L_38, L_39); (*(UIVertex_t4057497605 *)((L_36)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_37)))) = L_40; UIVertexU5BU5D_t1981460040* L_41 = __this->get_m_TempVerts_34(); int32_t L_42 = V_10; NullCheck(L_41); UIVertex_t4057497605 * L_43 = ((L_41)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_42))); Vector3_t3722313464 L_44 = L_43->get_position_0(); float L_45 = V_4; Vector3_t3722313464 L_46 = Vector3_op_Multiply_m3506743150(NULL /*static, unused*/, L_44, L_45, /*hidden argument*/NULL); L_43->set_position_0(L_46); UIVertexU5BU5D_t1981460040* L_47 = __this->get_m_TempVerts_34(); int32_t L_48 = V_10; NullCheck(L_47); Vector3_t3722313464 * L_49 = ((L_47)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_48)))->get_address_of_position_0(); Vector3_t3722313464 * L_50 = L_49; float L_51 = L_50->get_x_1(); float L_52 = (&V_6)->get_x_0(); L_50->set_x_1(((float)((float)L_51+(float)L_52))); UIVertexU5BU5D_t1981460040* L_53 = __this->get_m_TempVerts_34(); int32_t L_54 = V_10; NullCheck(L_53); Vector3_t3722313464 * L_55 = ((L_53)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_54)))->get_address_of_position_0(); Vector3_t3722313464 * L_56 = L_55; float L_57 = L_56->get_y_2(); float L_58 = (&V_6)->get_y_1(); L_56->set_y_2(((float)((float)L_57+(float)L_58))); int32_t L_59 = V_10; if ((!(((uint32_t)L_59) == ((uint32_t)3)))) { goto IL_017e; } } { VertexHelper_t2453304189 * L_60 = ___toFill0; UIVertexU5BU5D_t1981460040* L_61 = __this->get_m_TempVerts_34(); NullCheck(L_60); VertexHelper_AddUIVertexQuad_m4228725261(L_60, L_61, /*hidden argument*/NULL); } IL_017e: { int32_t L_62 = V_9; V_9 = ((int32_t)((int32_t)L_62+(int32_t)1)); } IL_0185: { int32_t L_63 = V_9; int32_t L_64 = V_5; if ((((int32_t)L_63) < ((int32_t)L_64))) { goto IL_00e0; } } { goto IL_0202; } IL_0194: { V_11 = 0; goto IL_01f8; } IL_019d: { int32_t L_65 = V_11; V_12 = ((int32_t)((int32_t)L_65&(int32_t)3)); UIVertexU5BU5D_t1981460040* L_66 = __this->get_m_TempVerts_34(); int32_t L_67 = V_12; NullCheck(L_66); Il2CppObject* L_68 = V_3; int32_t L_69 = V_11; NullCheck(L_68); UIVertex_t4057497605 L_70 = InterfaceFuncInvoker1< UIVertex_t4057497605 , int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<UnityEngine.UIVertex>::get_Item(System.Int32) */, IList_1_t1577850092_il2cpp_TypeInfo_var, L_68, L_69); (*(UIVertex_t4057497605 *)((L_66)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_67)))) = L_70; UIVertexU5BU5D_t1981460040* L_71 = __this->get_m_TempVerts_34(); int32_t L_72 = V_12; NullCheck(L_71); UIVertex_t4057497605 * L_73 = ((L_71)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_72))); Vector3_t3722313464 L_74 = L_73->get_position_0(); float L_75 = V_4; Vector3_t3722313464 L_76 = Vector3_op_Multiply_m3506743150(NULL /*static, unused*/, L_74, L_75, /*hidden argument*/NULL); L_73->set_position_0(L_76); int32_t L_77 = V_12; if ((!(((uint32_t)L_77) == ((uint32_t)3)))) { goto IL_01f1; } } { VertexHelper_t2453304189 * L_78 = ___toFill0; UIVertexU5BU5D_t1981460040* L_79 = __this->get_m_TempVerts_34(); NullCheck(L_78); VertexHelper_AddUIVertexQuad_m4228725261(L_78, L_79, /*hidden argument*/NULL); } IL_01f1: { int32_t L_80 = V_11; V_11 = ((int32_t)((int32_t)L_80+(int32_t)1)); } IL_01f8: { int32_t L_81 = V_11; int32_t L_82 = V_5; if ((((int32_t)L_81) < ((int32_t)L_82))) { goto IL_019d; } } { } IL_0202: { __this->set_m_DisableFontTextureRebuiltCallback_33((bool)0); } IL_0209: { return; } } // System.Void UnityEngine.UI.Text::CalculateLayoutInputHorizontal() extern "C" void Text_CalculateLayoutInputHorizontal_m3331790962 (Text_t1901882714 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Text::CalculateLayoutInputVertical() extern "C" void Text_CalculateLayoutInputVertical_m1777901436 (Text_t1901882714 * __this, const MethodInfo* method) { { return; } } // System.Single UnityEngine.UI.Text::get_minWidth() extern "C" float Text_get_minWidth_m1510786182 (Text_t1901882714 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (0.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.Text::get_preferredWidth() extern "C" float Text_get_preferredWidth_m2255180525 (Text_t1901882714 * __this, const MethodInfo* method) { TextGenerationSettings_t1351628751 V_0; memset(&V_0, 0, sizeof(V_0)); float V_1 = 0.0f; { Vector2_t2156229523 L_0 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); TextGenerationSettings_t1351628751 L_1 = Text_GetGenerationSettings_m1390856115(__this, L_0, /*hidden argument*/NULL); V_0 = L_1; TextGenerator_t3211863866 * L_2 = Text_get_cachedTextGeneratorForLayout_m116487342(__this, /*hidden argument*/NULL); String_t* L_3 = __this->get_m_Text_29(); TextGenerationSettings_t1351628751 L_4 = V_0; NullCheck(L_2); float L_5 = TextGenerator_GetPreferredWidth_m2934157277(L_2, L_3, L_4, /*hidden argument*/NULL); float L_6 = Text_get_pixelsPerUnit_m4041777403(__this, /*hidden argument*/NULL); V_1 = ((float)((float)L_5/(float)L_6)); goto IL_002c; } IL_002c: { float L_7 = V_1; return L_7; } } // System.Single UnityEngine.UI.Text::get_flexibleWidth() extern "C" float Text_get_flexibleWidth_m722165853 (Text_t1901882714 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.Text::get_minHeight() extern "C" float Text_get_minHeight_m4080123190 (Text_t1901882714 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (0.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Single UnityEngine.UI.Text::get_preferredHeight() extern "C" float Text_get_preferredHeight_m521706231 (Text_t1901882714 * __this, const MethodInfo* method) { TextGenerationSettings_t1351628751 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t2360479859 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t2156229523 V_2; memset(&V_2, 0, sizeof(V_2)); float V_3 = 0.0f; { Rect_t2360479859 L_0 = Graphic_GetPixelAdjustedRect_m3729397999(__this, /*hidden argument*/NULL); V_1 = L_0; Vector2_t2156229523 L_1 = Rect_get_size_m3542039952((&V_1), /*hidden argument*/NULL); V_2 = L_1; float L_2 = (&V_2)->get_x_0(); Vector2_t2156229523 L_3; memset(&L_3, 0, sizeof(L_3)); Vector2__ctor_m4060800441(&L_3, L_2, (0.0f), /*hidden argument*/NULL); TextGenerationSettings_t1351628751 L_4 = Text_GetGenerationSettings_m1390856115(__this, L_3, /*hidden argument*/NULL); V_0 = L_4; TextGenerator_t3211863866 * L_5 = Text_get_cachedTextGeneratorForLayout_m116487342(__this, /*hidden argument*/NULL); String_t* L_6 = __this->get_m_Text_29(); TextGenerationSettings_t1351628751 L_7 = V_0; NullCheck(L_5); float L_8 = TextGenerator_GetPreferredHeight_m3296906652(L_5, L_6, L_7, /*hidden argument*/NULL); float L_9 = Text_get_pixelsPerUnit_m4041777403(__this, /*hidden argument*/NULL); V_3 = ((float)((float)L_8/(float)L_9)); goto IL_0047; } IL_0047: { float L_10 = V_3; return L_10; } } // System.Single UnityEngine.UI.Text::get_flexibleHeight() extern "C" float Text_get_flexibleHeight_m603799800 (Text_t1901882714 * __this, const MethodInfo* method) { float V_0 = 0.0f; { V_0 = (-1.0f); goto IL_000c; } IL_000c: { float L_0 = V_0; return L_0; } } // System.Int32 UnityEngine.UI.Text::get_layoutPriority() extern "C" int32_t Text_get_layoutPriority_m3776709027 (Text_t1901882714 * __this, const MethodInfo* method) { int32_t V_0 = 0; { V_0 = 0; goto IL_0008; } IL_0008: { int32_t L_0 = V_0; return L_0; } } // System.Void UnityEngine.UI.Text::.cctor() extern "C" void Text__cctor_m81191306 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Text__cctor_m81191306_MetadataUsageId); s_Il2CppMethodInitialized = true; } { ((Text_t1901882714_StaticFields*)Text_t1901882714_il2cpp_TypeInfo_var->static_fields)->set_s_DefaultText_32((Material_t340375123 *)NULL); return; } } // System.Void UnityEngine.UI.Toggle::.ctor() extern "C" void Toggle__ctor_m768708970 (Toggle_t2735377061 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Toggle__ctor_m768708970_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_toggleTransition_16(1); ToggleEvent_t1873685584 * L_0 = (ToggleEvent_t1873685584 *)il2cpp_codegen_object_new(ToggleEvent_t1873685584_il2cpp_TypeInfo_var); ToggleEvent__ctor_m834619998(L_0, /*hidden argument*/NULL); __this->set_onValueChanged_19(L_0); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t3250028441_il2cpp_TypeInfo_var); Selectable__ctor_m58942866(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ToggleGroup UnityEngine.UI.Toggle::get_group() extern "C" ToggleGroup_t123837990 * Toggle_get_group_m4124882852 (Toggle_t2735377061 * __this, const MethodInfo* method) { ToggleGroup_t123837990 * V_0 = NULL; { ToggleGroup_t123837990 * L_0 = __this->get_m_Group_18(); V_0 = L_0; goto IL_000d; } IL_000d: { ToggleGroup_t123837990 * L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Toggle::set_group(UnityEngine.UI.ToggleGroup) extern "C" void Toggle_set_group_m3686946438 (Toggle_t2735377061 * __this, ToggleGroup_t123837990 * ___value0, const MethodInfo* method) { { ToggleGroup_t123837990 * L_0 = ___value0; __this->set_m_Group_18(L_0); ToggleGroup_t123837990 * L_1 = __this->get_m_Group_18(); Toggle_SetToggleGroup_m1839040161(__this, L_1, (bool)1, /*hidden argument*/NULL); Toggle_PlayEffect_m1836683914(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void Toggle_Rebuild_m2267606569 (Toggle_t2735377061 * __this, int32_t ___executing0, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Toggle::LayoutComplete() extern "C" void Toggle_LayoutComplete_m2161905395 (Toggle_t2735377061 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Toggle::GraphicUpdateComplete() extern "C" void Toggle_GraphicUpdateComplete_m2285510719 (Toggle_t2735377061 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Toggle::OnEnable() extern "C" void Toggle_OnEnable_m1421694809 (Toggle_t2735377061 * __this, const MethodInfo* method) { { Selectable_OnEnable_m3110490294(__this, /*hidden argument*/NULL); ToggleGroup_t123837990 * L_0 = __this->get_m_Group_18(); Toggle_SetToggleGroup_m1839040161(__this, L_0, (bool)0, /*hidden argument*/NULL); Toggle_PlayEffect_m1836683914(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::OnDisable() extern "C" void Toggle_OnDisable_m1390754487 (Toggle_t2735377061 * __this, const MethodInfo* method) { { Toggle_SetToggleGroup_m1839040161(__this, (ToggleGroup_t123837990 *)NULL, (bool)0, /*hidden argument*/NULL); Selectable_OnDisable_m3225138518(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::OnDidApplyAnimationProperties() extern "C" void Toggle_OnDidApplyAnimationProperties_m3540525118 (Toggle_t2735377061 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Toggle_OnDidApplyAnimationProperties_m3540525118_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; Color_t2555686324 V_1; memset(&V_1, 0, sizeof(V_1)); { Graphic_t1660335611 * L_0 = __this->get_graphic_17(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0059; } } { Graphic_t1660335611 * L_2 = __this->get_graphic_17(); NullCheck(L_2); CanvasRenderer_t2598313366 * L_3 = Graphic_get_canvasRenderer_m315509948(L_2, /*hidden argument*/NULL); NullCheck(L_3); Color_t2555686324 L_4 = CanvasRenderer_GetColor_m4231047588(L_3, /*hidden argument*/NULL); V_1 = L_4; float L_5 = (&V_1)->get_a_3(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t3464937446_il2cpp_TypeInfo_var); bool L_6 = Mathf_Approximately_m367990089(NULL /*static, unused*/, L_5, (0.0f), /*hidden argument*/NULL); V_0 = (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0); bool L_7 = __this->get_m_IsOn_20(); bool L_8 = V_0; if ((((int32_t)L_7) == ((int32_t)L_8))) { goto IL_0058; } } { bool L_9 = V_0; __this->set_m_IsOn_20(L_9); bool L_10 = V_0; Toggle_Set_m1885801159(__this, (bool)((((int32_t)L_10) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL); } IL_0058: { } IL_0059: { Selectable_OnDidApplyAnimationProperties_m1530194632(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::SetToggleGroup(UnityEngine.UI.ToggleGroup,System.Boolean) extern "C" void Toggle_SetToggleGroup_m1839040161 (Toggle_t2735377061 * __this, ToggleGroup_t123837990 * ___newGroup0, bool ___setMemberValue1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Toggle_SetToggleGroup_m1839040161_MetadataUsageId); s_Il2CppMethodInitialized = true; } ToggleGroup_t123837990 * V_0 = NULL; { ToggleGroup_t123837990 * L_0 = __this->get_m_Group_18(); V_0 = L_0; ToggleGroup_t123837990 * L_1 = __this->get_m_Group_18(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_2 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_1, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0025; } } { ToggleGroup_t123837990 * L_3 = __this->get_m_Group_18(); NullCheck(L_3); ToggleGroup_UnregisterToggle_m2846655738(L_3, __this, /*hidden argument*/NULL); } IL_0025: { bool L_4 = ___setMemberValue1; if (!L_4) { goto IL_0032; } } { ToggleGroup_t123837990 * L_5 = ___newGroup0; __this->set_m_Group_18(L_5); } IL_0032: { ToggleGroup_t123837990 * L_6 = ___newGroup0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_7 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_6, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_7) { goto IL_0050; } } { bool L_8 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_8) { goto IL_0050; } } { ToggleGroup_t123837990 * L_9 = ___newGroup0; NullCheck(L_9); ToggleGroup_RegisterToggle_m2988917171(L_9, __this, /*hidden argument*/NULL); } IL_0050: { ToggleGroup_t123837990 * L_10 = ___newGroup0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_11 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_10, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_11) { goto IL_0085; } } { ToggleGroup_t123837990 * L_12 = ___newGroup0; ToggleGroup_t123837990 * L_13 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_14 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0085; } } { bool L_15 = Toggle_get_isOn_m1428293607(__this, /*hidden argument*/NULL); if (!L_15) { goto IL_0085; } } { bool L_16 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_16) { goto IL_0085; } } { ToggleGroup_t123837990 * L_17 = ___newGroup0; NullCheck(L_17); ToggleGroup_NotifyToggleOn_m1290826648(L_17, __this, /*hidden argument*/NULL); } IL_0085: { return; } } // System.Boolean UnityEngine.UI.Toggle::get_isOn() extern "C" bool Toggle_get_isOn_m1428293607 (Toggle_t2735377061 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_IsOn_20(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.Toggle::set_isOn(System.Boolean) extern "C" void Toggle_set_isOn_m3548357404 (Toggle_t2735377061 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; Toggle_Set_m1885801159(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Set(System.Boolean) extern "C" void Toggle_Set_m1885801159 (Toggle_t2735377061 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; Toggle_Set_m262975082(__this, L_0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Set(System.Boolean,System.Boolean) extern "C" void Toggle_Set_m262975082 (Toggle_t2735377061 * __this, bool ___value0, bool ___sendCallback1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Toggle_Set_m262975082_MetadataUsageId); s_Il2CppMethodInitialized = true; } { bool L_0 = __this->get_m_IsOn_20(); bool L_1 = ___value0; if ((!(((uint32_t)L_0) == ((uint32_t)L_1)))) { goto IL_0012; } } { goto IL_009d; } IL_0012: { bool L_2 = ___value0; __this->set_m_IsOn_20(L_2); ToggleGroup_t123837990 * L_3 = __this->get_m_Group_18(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_4 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_3, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0077; } } { bool L_5 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_5) { goto IL_0077; } } { bool L_6 = __this->get_m_IsOn_20(); if (L_6) { goto IL_0061; } } { ToggleGroup_t123837990 * L_7 = __this->get_m_Group_18(); NullCheck(L_7); bool L_8 = ToggleGroup_AnyTogglesOn_m1117012929(L_7, /*hidden argument*/NULL); if (L_8) { goto IL_0076; } } { ToggleGroup_t123837990 * L_9 = __this->get_m_Group_18(); NullCheck(L_9); bool L_10 = ToggleGroup_get_allowSwitchOff_m3913189773(L_9, /*hidden argument*/NULL); if (L_10) { goto IL_0076; } } IL_0061: { __this->set_m_IsOn_20((bool)1); ToggleGroup_t123837990 * L_11 = __this->get_m_Group_18(); NullCheck(L_11); ToggleGroup_NotifyToggleOn_m1290826648(L_11, __this, /*hidden argument*/NULL); } IL_0076: { } IL_0077: { int32_t L_12 = __this->get_toggleTransition_16(); Toggle_PlayEffect_m1836683914(__this, (bool)((((int32_t)L_12) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL); bool L_13 = ___sendCallback1; if (!L_13) { goto IL_009d; } } { ToggleEvent_t1873685584 * L_14 = __this->get_onValueChanged_19(); bool L_15 = __this->get_m_IsOn_20(); NullCheck(L_14); UnityEvent_1_Invoke_m933614109(L_14, L_15, /*hidden argument*/UnityEvent_1_Invoke_m933614109_MethodInfo_var); } IL_009d: { return; } } // System.Void UnityEngine.UI.Toggle::PlayEffect(System.Boolean) extern "C" void Toggle_PlayEffect_m1836683914 (Toggle_t2735377061 * __this, bool ___instant0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Toggle_PlayEffect_m1836683914_MetadataUsageId); s_Il2CppMethodInitialized = true; } Graphic_t1660335611 * G_B4_0 = NULL; Graphic_t1660335611 * G_B3_0 = NULL; float G_B5_0 = 0.0f; Graphic_t1660335611 * G_B5_1 = NULL; float G_B7_0 = 0.0f; Graphic_t1660335611 * G_B7_1 = NULL; float G_B6_0 = 0.0f; Graphic_t1660335611 * G_B6_1 = NULL; float G_B8_0 = 0.0f; float G_B8_1 = 0.0f; Graphic_t1660335611 * G_B8_2 = NULL; { Graphic_t1660335611 * L_0 = __this->get_graphic_17(); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0017; } } { goto IL_0052; } IL_0017: { Graphic_t1660335611 * L_2 = __this->get_graphic_17(); bool L_3 = __this->get_m_IsOn_20(); G_B3_0 = L_2; if (!L_3) { G_B4_0 = L_2; goto IL_0032; } } { G_B5_0 = (1.0f); G_B5_1 = G_B3_0; goto IL_0037; } IL_0032: { G_B5_0 = (0.0f); G_B5_1 = G_B4_0; } IL_0037: { bool L_4 = ___instant0; G_B6_0 = G_B5_0; G_B6_1 = G_B5_1; if (!L_4) { G_B7_0 = G_B5_0; G_B7_1 = G_B5_1; goto IL_0047; } } { G_B8_0 = (0.0f); G_B8_1 = G_B6_0; G_B8_2 = G_B6_1; goto IL_004c; } IL_0047: { G_B8_0 = (0.1f); G_B8_1 = G_B7_0; G_B8_2 = G_B7_1; } IL_004c: { NullCheck(G_B8_2); VirtActionInvoker3< float, float, bool >::Invoke(48 /* System.Void UnityEngine.UI.Graphic::CrossFadeAlpha(System.Single,System.Single,System.Boolean) */, G_B8_2, G_B8_1, G_B8_0, (bool)1); } IL_0052: { return; } } // System.Void UnityEngine.UI.Toggle::Start() extern "C" void Toggle_Start_m3038256574 (Toggle_t2735377061 * __this, const MethodInfo* method) { { Toggle_PlayEffect_m1836683914(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::InternalToggle() extern "C" void Toggle_InternalToggle_m1483593526 (Toggle_t2735377061 * __this, const MethodInfo* method) { { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0017; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(24 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_001c; } } IL_0017: { goto IL_002b; } IL_001c: { bool L_2 = Toggle_get_isOn_m1428293607(__this, /*hidden argument*/NULL); Toggle_set_isOn_m3548357404(__this, (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL); } IL_002b: { return; } } // System.Void UnityEngine.UI.Toggle::OnPointerClick(UnityEngine.EventSystems.PointerEventData) extern "C" void Toggle_OnPointerClick_m3526893169 (Toggle_t2735377061 * __this, PointerEventData_t3807901092 * ___eventData0, const MethodInfo* method) { { PointerEventData_t3807901092 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m359423249(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0011; } } { goto IL_0017; } IL_0011: { Toggle_InternalToggle_m1483593526(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // System.Void UnityEngine.UI.Toggle::OnSubmit(UnityEngine.EventSystems.BaseEventData) extern "C" void Toggle_OnSubmit_m1320104356 (Toggle_t2735377061 * __this, BaseEventData_t3903027533 * ___eventData0, const MethodInfo* method) { { Toggle_InternalToggle_m1483593526(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Transform UnityEngine.UI.Toggle::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t3600365921 * Toggle_UnityEngine_UI_ICanvasElement_get_transform_m854783724 (Toggle_t2735377061 * __this, const MethodInfo* method) { { Transform_t3600365921 * L_0 = Component_get_transform_m2921103810(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.Toggle/ToggleEvent::.ctor() extern "C" void ToggleEvent__ctor_m834619998 (ToggleEvent_t1873685584 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleEvent__ctor_m834619998_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UnityEvent_1__ctor_m3777630589(__this, /*hidden argument*/UnityEvent_1__ctor_m3777630589_MethodInfo_var); return; } } // System.Void UnityEngine.UI.ToggleGroup::.ctor() extern "C" void ToggleGroup__ctor_m3308114662 (ToggleGroup_t123837990 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup__ctor_m3308114662_MetadataUsageId); s_Il2CppMethodInitialized = true; } { __this->set_m_AllowSwitchOff_2((bool)0); List_1_t4207451803 * L_0 = (List_1_t4207451803 *)il2cpp_codegen_object_new(List_1_t4207451803_il2cpp_TypeInfo_var); List_1__ctor_m2588665925(L_0, /*hidden argument*/List_1__ctor_m2588665925_MethodInfo_var); __this->set_m_Toggles_3(L_0); UIBehaviour__ctor_m4230637738(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ToggleGroup::get_allowSwitchOff() extern "C" bool ToggleGroup_get_allowSwitchOff_m3913189773 (ToggleGroup_t123837990 * __this, const MethodInfo* method) { bool V_0 = false; { bool L_0 = __this->get_m_AllowSwitchOff_2(); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } // System.Void UnityEngine.UI.ToggleGroup::set_allowSwitchOff(System.Boolean) extern "C" void ToggleGroup_set_allowSwitchOff_m4192200290 (ToggleGroup_t123837990 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_m_AllowSwitchOff_2(L_0); return; } } // System.Void UnityEngine.UI.ToggleGroup::ValidateToggleIsInGroup(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_ValidateToggleIsInGroup_m3201190739 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_ValidateToggleIsInGroup_m3201190739_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Toggle_t2735377061 * L_0 = ___toggle0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_0, (Object_t631007953 *)NULL, /*hidden argument*/NULL); if (L_1) { goto IL_001e; } } { List_1_t4207451803 * L_2 = __this->get_m_Toggles_3(); Toggle_t2735377061 * L_3 = ___toggle0; NullCheck(L_2); bool L_4 = List_1_Contains_m3066673312(L_2, L_3, /*hidden argument*/List_1_Contains_m3066673312_MethodInfo_var); if (L_4) { goto IL_003c; } } IL_001e: { ObjectU5BU5D_t2843939325* L_5 = ((ObjectU5BU5D_t2843939325*)SZArrayNew(ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var, (uint32_t)2)); Toggle_t2735377061 * L_6 = ___toggle0; NullCheck(L_5); ArrayElementTypeCheck (L_5, L_6); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)L_6); ObjectU5BU5D_t2843939325* L_7 = L_5; NullCheck(L_7); ArrayElementTypeCheck (L_7, __this); (L_7)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)__this); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_8 = String_Format_m630303134(NULL /*static, unused*/, _stringLiteral503068089, L_7, /*hidden argument*/NULL); ArgumentException_t132251570 * L_9 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var); ArgumentException__ctor_m1312628991(L_9, L_8, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_9); } IL_003c: { return; } } // System.Void UnityEngine.UI.ToggleGroup::NotifyToggleOn(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_NotifyToggleOn_m1290826648 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_NotifyToggleOn_m1290826648_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { Toggle_t2735377061 * L_0 = ___toggle0; ToggleGroup_ValidateToggleIsInGroup_m3201190739(__this, L_0, /*hidden argument*/NULL); V_0 = 0; goto IL_0043; } IL_000f: { List_1_t4207451803 * L_1 = __this->get_m_Toggles_3(); int32_t L_2 = V_0; NullCheck(L_1); Toggle_t2735377061 * L_3 = List_1_get_Item_m2702804483(L_1, L_2, /*hidden argument*/List_1_get_Item_m2702804483_MethodInfo_var); Toggle_t2735377061 * L_4 = ___toggle0; IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_5 = Object_op_Equality_m1454075600(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_002c; } } { goto IL_003f; } IL_002c: { List_1_t4207451803 * L_6 = __this->get_m_Toggles_3(); int32_t L_7 = V_0; NullCheck(L_6); Toggle_t2735377061 * L_8 = List_1_get_Item_m2702804483(L_6, L_7, /*hidden argument*/List_1_get_Item_m2702804483_MethodInfo_var); NullCheck(L_8); Toggle_set_isOn_m3548357404(L_8, (bool)0, /*hidden argument*/NULL); } IL_003f: { int32_t L_9 = V_0; V_0 = ((int32_t)((int32_t)L_9+(int32_t)1)); } IL_0043: { int32_t L_10 = V_0; List_1_t4207451803 * L_11 = __this->get_m_Toggles_3(); NullCheck(L_11); int32_t L_12 = List_1_get_Count_m3208757669(L_11, /*hidden argument*/List_1_get_Count_m3208757669_MethodInfo_var); if ((((int32_t)L_10) < ((int32_t)L_12))) { goto IL_000f; } } { return; } } // System.Void UnityEngine.UI.ToggleGroup::UnregisterToggle(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_UnregisterToggle_m2846655738 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_UnregisterToggle_m2846655738_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t4207451803 * L_0 = __this->get_m_Toggles_3(); Toggle_t2735377061 * L_1 = ___toggle0; NullCheck(L_0); bool L_2 = List_1_Contains_m3066673312(L_0, L_1, /*hidden argument*/List_1_Contains_m3066673312_MethodInfo_var); if (!L_2) { goto IL_001f; } } { List_1_t4207451803 * L_3 = __this->get_m_Toggles_3(); Toggle_t2735377061 * L_4 = ___toggle0; NullCheck(L_3); List_1_Remove_m3511411763(L_3, L_4, /*hidden argument*/List_1_Remove_m3511411763_MethodInfo_var); } IL_001f: { return; } } // System.Void UnityEngine.UI.ToggleGroup::RegisterToggle(UnityEngine.UI.Toggle) extern "C" void ToggleGroup_RegisterToggle_m2988917171 (ToggleGroup_t123837990 * __this, Toggle_t2735377061 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_RegisterToggle_m2988917171_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t4207451803 * L_0 = __this->get_m_Toggles_3(); Toggle_t2735377061 * L_1 = ___toggle0; NullCheck(L_0); bool L_2 = List_1_Contains_m3066673312(L_0, L_1, /*hidden argument*/List_1_Contains_m3066673312_MethodInfo_var); if (L_2) { goto IL_001e; } } { List_1_t4207451803 * L_3 = __this->get_m_Toggles_3(); Toggle_t2735377061 * L_4 = ___toggle0; NullCheck(L_3); List_1_Add_m2727533441(L_3, L_4, /*hidden argument*/List_1_Add_m2727533441_MethodInfo_var); } IL_001e: { return; } } // System.Boolean UnityEngine.UI.ToggleGroup::AnyTogglesOn() extern "C" bool ToggleGroup_AnyTogglesOn_m1117012929 (ToggleGroup_t123837990 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_AnyTogglesOn_m1117012929_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; List_1_t4207451803 * G_B2_0 = NULL; List_1_t4207451803 * G_B1_0 = NULL; { List_1_t4207451803 * L_0 = __this->get_m_Toggles_3(); Predicate_1_t3560671185 * L_1 = ((ToggleGroup_t123837990_StaticFields*)ToggleGroup_t123837990_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache0_4(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001f; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)ToggleGroup_U3CAnyTogglesOnU3Em__0_m3170735810_MethodInfo_var); Predicate_1_t3560671185 * L_3 = (Predicate_1_t3560671185 *)il2cpp_codegen_object_new(Predicate_1_t3560671185_il2cpp_TypeInfo_var); Predicate_1__ctor_m3952340036(L_3, NULL, L_2, /*hidden argument*/Predicate_1__ctor_m3952340036_MethodInfo_var); ((ToggleGroup_t123837990_StaticFields*)ToggleGroup_t123837990_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache0_4(L_3); G_B2_0 = G_B1_0; } IL_001f: { Predicate_1_t3560671185 * L_4 = ((ToggleGroup_t123837990_StaticFields*)ToggleGroup_t123837990_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache0_4(); NullCheck(G_B2_0); Toggle_t2735377061 * L_5 = List_1_Find_m101937419(G_B2_0, L_4, /*hidden argument*/List_1_Find_m101937419_MethodInfo_var); IL2CPP_RUNTIME_CLASS_INIT(Object_t631007953_il2cpp_TypeInfo_var); bool L_6 = Object_op_Inequality_m1920811489(NULL /*static, unused*/, L_5, (Object_t631007953 *)NULL, /*hidden argument*/NULL); V_0 = L_6; goto IL_0035; } IL_0035: { bool L_7 = V_0; return L_7; } } // System.Collections.Generic.IEnumerable`1<UnityEngine.UI.Toggle> UnityEngine.UI.ToggleGroup::ActiveToggles() extern "C" Il2CppObject* ToggleGroup_ActiveToggles_m3179342002 (ToggleGroup_t123837990 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_ActiveToggles_m3179342002_MetadataUsageId); s_Il2CppMethodInitialized = true; } Il2CppObject* V_0 = NULL; List_1_t4207451803 * G_B2_0 = NULL; List_1_t4207451803 * G_B1_0 = NULL; { List_1_t4207451803 * L_0 = __this->get_m_Toggles_3(); Func_2_t3446800538 * L_1 = ((ToggleGroup_t123837990_StaticFields*)ToggleGroup_t123837990_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache1_5(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001f; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)ToggleGroup_U3CActiveTogglesU3Em__1_m1947537119_MethodInfo_var); Func_2_t3446800538 * L_3 = (Func_2_t3446800538 *)il2cpp_codegen_object_new(Func_2_t3446800538_il2cpp_TypeInfo_var); Func_2__ctor_m16758224(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m16758224_MethodInfo_var); ((ToggleGroup_t123837990_StaticFields*)ToggleGroup_t123837990_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache1_5(L_3); G_B2_0 = G_B1_0; } IL_001f: { Func_2_t3446800538 * L_4 = ((ToggleGroup_t123837990_StaticFields*)ToggleGroup_t123837990_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache1_5(); Il2CppObject* L_5 = Enumerable_Where_TisToggle_t2735377061_m3965946053(NULL /*static, unused*/, G_B2_0, L_4, /*hidden argument*/Enumerable_Where_TisToggle_t2735377061_m3965946053_MethodInfo_var); V_0 = L_5; goto IL_002f; } IL_002f: { Il2CppObject* L_6 = V_0; return L_6; } } // System.Void UnityEngine.UI.ToggleGroup::SetAllTogglesOff() extern "C" void ToggleGroup_SetAllTogglesOff_m4184050071 (ToggleGroup_t123837990 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (ToggleGroup_SetAllTogglesOff_m4184050071_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; int32_t V_1 = 0; { bool L_0 = __this->get_m_AllowSwitchOff_2(); V_0 = L_0; __this->set_m_AllowSwitchOff_2((bool)1); V_1 = 0; goto IL_002c; } IL_0016: { List_1_t4207451803 * L_1 = __this->get_m_Toggles_3(); int32_t L_2 = V_1; NullCheck(L_1); Toggle_t2735377061 * L_3 = List_1_get_Item_m2702804483(L_1, L_2, /*hidden argument*/List_1_get_Item_m2702804483_MethodInfo_var); NullCheck(L_3); Toggle_set_isOn_m3548357404(L_3, (bool)0, /*hidden argument*/NULL); int32_t L_4 = V_1; V_1 = ((int32_t)((int32_t)L_4+(int32_t)1)); } IL_002c: { int32_t L_5 = V_1; List_1_t4207451803 * L_6 = __this->get_m_Toggles_3(); NullCheck(L_6); int32_t L_7 = List_1_get_Count_m3208757669(L_6, /*hidden argument*/List_1_get_Count_m3208757669_MethodInfo_var); if ((((int32_t)L_5) < ((int32_t)L_7))) { goto IL_0016; } } { bool L_8 = V_0; __this->set_m_AllowSwitchOff_2(L_8); return; } } // System.Boolean UnityEngine.UI.ToggleGroup::<AnyTogglesOn>m__0(UnityEngine.UI.Toggle) extern "C" bool ToggleGroup_U3CAnyTogglesOnU3Em__0_m3170735810 (Il2CppObject * __this /* static, unused */, Toggle_t2735377061 * ___x0, const MethodInfo* method) { bool V_0 = false; { Toggle_t2735377061 * L_0 = ___x0; NullCheck(L_0); bool L_1 = Toggle_get_isOn_m1428293607(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_000c; } IL_000c: { bool L_2 = V_0; return L_2; } } // System.Boolean UnityEngine.UI.ToggleGroup::<ActiveToggles>m__1(UnityEngine.UI.Toggle) extern "C" bool ToggleGroup_U3CActiveTogglesU3Em__1_m1947537119 (Il2CppObject * __this /* static, unused */, Toggle_t2735377061 * ___x0, const MethodInfo* method) { bool V_0 = false; { Toggle_t2735377061 * L_0 = ___x0; NullCheck(L_0); bool L_1 = Toggle_get_isOn_m1428293607(L_0, /*hidden argument*/NULL); V_0 = L_1; goto IL_000c; } IL_000c: { bool L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.VertexHelper::.ctor() extern "C" void VertexHelper__ctor_m2987334858 (VertexHelper_t2453304189 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper__ctor_m2987334858_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t456935359_il2cpp_TypeInfo_var); List_1_t899420910 * L_0 = ListPool_1_Get_m3176649063(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176649063_MethodInfo_var); __this->set_m_Positions_0(L_0); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3630090483_il2cpp_TypeInfo_var); List_1_t4072576034 * L_1 = ListPool_1_Get_m2875520964(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2875520964_MethodInfo_var); __this->set_m_Colors_1(L_1); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3185818714_il2cpp_TypeInfo_var); List_1_t3628304265 * L_2 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv0S_2(L_2); List_1_t3628304265 * L_3 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv1S_3(L_3); List_1_t3628304265 * L_4 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv2S_4(L_4); List_1_t3628304265 * L_5 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv3S_5(L_5); List_1_t899420910 * L_6 = ListPool_1_Get_m3176649063(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176649063_MethodInfo_var); __this->set_m_Normals_6(L_6); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t53650832_il2cpp_TypeInfo_var); List_1_t496136383 * L_7 = ListPool_1_Get_m3176656818(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176656818_MethodInfo_var); __this->set_m_Tangents_7(L_7); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3980534944_il2cpp_TypeInfo_var); List_1_t128053199 * L_8 = ListPool_1_Get_m2031605680(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2031605680_MethodInfo_var); __this->set_m_Indices_8(L_8); Object__ctor_m297566312(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::.ctor(UnityEngine.Mesh) extern "C" void VertexHelper__ctor_m2318594751 (VertexHelper_t2453304189 * __this, Mesh_t3648964284 * ___m0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper__ctor_m2318594751_MetadataUsageId); s_Il2CppMethodInitialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t456935359_il2cpp_TypeInfo_var); List_1_t899420910 * L_0 = ListPool_1_Get_m3176649063(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176649063_MethodInfo_var); __this->set_m_Positions_0(L_0); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3630090483_il2cpp_TypeInfo_var); List_1_t4072576034 * L_1 = ListPool_1_Get_m2875520964(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2875520964_MethodInfo_var); __this->set_m_Colors_1(L_1); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3185818714_il2cpp_TypeInfo_var); List_1_t3628304265 * L_2 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv0S_2(L_2); List_1_t3628304265 * L_3 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv1S_3(L_3); List_1_t3628304265 * L_4 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv2S_4(L_4); List_1_t3628304265 * L_5 = ListPool_1_Get_m3176650548(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176650548_MethodInfo_var); __this->set_m_Uv3S_5(L_5); List_1_t899420910 * L_6 = ListPool_1_Get_m3176649063(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176649063_MethodInfo_var); __this->set_m_Normals_6(L_6); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t53650832_il2cpp_TypeInfo_var); List_1_t496136383 * L_7 = ListPool_1_Get_m3176656818(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3176656818_MethodInfo_var); __this->set_m_Tangents_7(L_7); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3980534944_il2cpp_TypeInfo_var); List_1_t128053199 * L_8 = ListPool_1_Get_m2031605680(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2031605680_MethodInfo_var); __this->set_m_Indices_8(L_8); Object__ctor_m297566312(__this, /*hidden argument*/NULL); List_1_t899420910 * L_9 = __this->get_m_Positions_0(); Mesh_t3648964284 * L_10 = ___m0; NullCheck(L_10); Vector3U5BU5D_t1718750761* L_11 = Mesh_get_vertices_m1585974779(L_10, /*hidden argument*/NULL); NullCheck(L_9); List_1_AddRange_m1173251377(L_9, (Il2CppObject*)(Il2CppObject*)L_11, /*hidden argument*/List_1_AddRange_m1173251377_MethodInfo_var); List_1_t4072576034 * L_12 = __this->get_m_Colors_1(); Mesh_t3648964284 * L_13 = ___m0; NullCheck(L_13); Color32U5BU5D_t3850468773* L_14 = Mesh_get_colors32_m3827471077(L_13, /*hidden argument*/NULL); NullCheck(L_12); List_1_AddRange_m3935442072(L_12, (Il2CppObject*)(Il2CppObject*)L_14, /*hidden argument*/List_1_AddRange_m3935442072_MethodInfo_var); List_1_t3628304265 * L_15 = __this->get_m_Uv0S_2(); Mesh_t3648964284 * L_16 = ___m0; NullCheck(L_16); Vector2U5BU5D_t1457185986* L_17 = Mesh_get_uv_m1820151371(L_16, /*hidden argument*/NULL); NullCheck(L_15); List_1_AddRange_m705206751(L_15, (Il2CppObject*)(Il2CppObject*)L_17, /*hidden argument*/List_1_AddRange_m705206751_MethodInfo_var); List_1_t3628304265 * L_18 = __this->get_m_Uv1S_3(); Mesh_t3648964284 * L_19 = ___m0; NullCheck(L_19); Vector2U5BU5D_t1457185986* L_20 = Mesh_get_uv2_m2122735555(L_19, /*hidden argument*/NULL); NullCheck(L_18); List_1_AddRange_m705206751(L_18, (Il2CppObject*)(Il2CppObject*)L_20, /*hidden argument*/List_1_AddRange_m705206751_MethodInfo_var); List_1_t3628304265 * L_21 = __this->get_m_Uv2S_4(); Mesh_t3648964284 * L_22 = ___m0; NullCheck(L_22); Vector2U5BU5D_t1457185986* L_23 = Mesh_get_uv3_m3688819496(L_22, /*hidden argument*/NULL); NullCheck(L_21); List_1_AddRange_m705206751(L_21, (Il2CppObject*)(Il2CppObject*)L_23, /*hidden argument*/List_1_AddRange_m705206751_MethodInfo_var); List_1_t3628304265 * L_24 = __this->get_m_Uv3S_5(); Mesh_t3648964284 * L_25 = ___m0; NullCheck(L_25); Vector2U5BU5D_t1457185986* L_26 = Mesh_get_uv4_m959936141(L_25, /*hidden argument*/NULL); NullCheck(L_24); List_1_AddRange_m705206751(L_24, (Il2CppObject*)(Il2CppObject*)L_26, /*hidden argument*/List_1_AddRange_m705206751_MethodInfo_var); List_1_t899420910 * L_27 = __this->get_m_Normals_6(); Mesh_t3648964284 * L_28 = ___m0; NullCheck(L_28); Vector3U5BU5D_t1718750761* L_29 = Mesh_get_normals_m2907452492(L_28, /*hidden argument*/NULL); NullCheck(L_27); List_1_AddRange_m1173251377(L_27, (Il2CppObject*)(Il2CppObject*)L_29, /*hidden argument*/List_1_AddRange_m1173251377_MethodInfo_var); List_1_t496136383 * L_30 = __this->get_m_Tangents_7(); Mesh_t3648964284 * L_31 = ___m0; NullCheck(L_31); Vector4U5BU5D_t934056436* L_32 = Mesh_get_tangents_m1290253362(L_31, /*hidden argument*/NULL); NullCheck(L_30); List_1_AddRange_m2686762046(L_30, (Il2CppObject*)(Il2CppObject*)L_32, /*hidden argument*/List_1_AddRange_m2686762046_MethodInfo_var); List_1_t128053199 * L_33 = __this->get_m_Indices_8(); Mesh_t3648964284 * L_34 = ___m0; NullCheck(L_34); Int32U5BU5D_t385246372* L_35 = Mesh_GetIndices_m3905519886(L_34, 0, /*hidden argument*/NULL); NullCheck(L_33); List_1_AddRange_m3513848896(L_33, (Il2CppObject*)(Il2CppObject*)L_35, /*hidden argument*/List_1_AddRange_m3513848896_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::Clear() extern "C" void VertexHelper_Clear_m627349662 (VertexHelper_t2453304189 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_Clear_m627349662_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t899420910 * L_0 = __this->get_m_Positions_0(); NullCheck(L_0); List_1_Clear_m3097985365(L_0, /*hidden argument*/List_1_Clear_m3097985365_MethodInfo_var); List_1_t4072576034 * L_1 = __this->get_m_Colors_1(); NullCheck(L_1); List_1_Clear_m3048681609(L_1, /*hidden argument*/List_1_Clear_m3048681609_MethodInfo_var); List_1_t3628304265 * L_2 = __this->get_m_Uv0S_2(); NullCheck(L_2); List_1_Clear_m2188935509(L_2, /*hidden argument*/List_1_Clear_m2188935509_MethodInfo_var); List_1_t3628304265 * L_3 = __this->get_m_Uv1S_3(); NullCheck(L_3); List_1_Clear_m2188935509(L_3, /*hidden argument*/List_1_Clear_m2188935509_MethodInfo_var); List_1_t3628304265 * L_4 = __this->get_m_Uv2S_4(); NullCheck(L_4); List_1_Clear_m2188935509(L_4, /*hidden argument*/List_1_Clear_m2188935509_MethodInfo_var); List_1_t3628304265 * L_5 = __this->get_m_Uv3S_5(); NullCheck(L_5); List_1_Clear_m2188935509(L_5, /*hidden argument*/List_1_Clear_m2188935509_MethodInfo_var); List_1_t899420910 * L_6 = __this->get_m_Normals_6(); NullCheck(L_6); List_1_Clear_m3097985365(L_6, /*hidden argument*/List_1_Clear_m3097985365_MethodInfo_var); List_1_t496136383 * L_7 = __this->get_m_Tangents_7(); NullCheck(L_7); List_1_Clear_m4187652437(L_7, /*hidden argument*/List_1_Clear_m4187652437_MethodInfo_var); List_1_t128053199 * L_8 = __this->get_m_Indices_8(); NullCheck(L_8); List_1_Clear_m2917552199(L_8, /*hidden argument*/List_1_Clear_m2917552199_MethodInfo_var); return; } } // System.Int32 UnityEngine.UI.VertexHelper::get_currentVertCount() extern "C" int32_t VertexHelper_get_currentVertCount_m124779331 (VertexHelper_t2453304189 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_get_currentVertCount_m124779331_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { List_1_t899420910 * L_0 = __this->get_m_Positions_0(); NullCheck(L_0); int32_t L_1 = List_1_get_Count_m576380744(L_0, /*hidden argument*/List_1_get_Count_m576380744_MethodInfo_var); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Int32 UnityEngine.UI.VertexHelper::get_currentIndexCount() extern "C" int32_t VertexHelper_get_currentIndexCount_m2916736969 (VertexHelper_t2453304189 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_get_currentIndexCount_m2916736969_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; { List_1_t128053199 * L_0 = __this->get_m_Indices_8(); NullCheck(L_0); int32_t L_1 = List_1_get_Count_m361000296(L_0, /*hidden argument*/List_1_get_Count_m361000296_MethodInfo_var); V_0 = L_1; goto IL_0012; } IL_0012: { int32_t L_2 = V_0; return L_2; } } // System.Void UnityEngine.UI.VertexHelper::PopulateUIVertex(UnityEngine.UIVertex&,System.Int32) extern "C" void VertexHelper_PopulateUIVertex_m3870699345 (VertexHelper_t2453304189 * __this, UIVertex_t4057497605 * ___vertex0, int32_t ___i1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_PopulateUIVertex_m3870699345_MetadataUsageId); s_Il2CppMethodInitialized = true; } { UIVertex_t4057497605 * L_0 = ___vertex0; List_1_t899420910 * L_1 = __this->get_m_Positions_0(); int32_t L_2 = ___i1; NullCheck(L_1); Vector3_t3722313464 L_3 = List_1_get_Item_m200663048(L_1, L_2, /*hidden argument*/List_1_get_Item_m200663048_MethodInfo_var); L_0->set_position_0(L_3); UIVertex_t4057497605 * L_4 = ___vertex0; List_1_t4072576034 * L_5 = __this->get_m_Colors_1(); int32_t L_6 = ___i1; NullCheck(L_5); Color32_t2600501292 L_7 = List_1_get_Item_m3890325344(L_5, L_6, /*hidden argument*/List_1_get_Item_m3890325344_MethodInfo_var); L_4->set_color_2(L_7); UIVertex_t4057497605 * L_8 = ___vertex0; List_1_t3628304265 * L_9 = __this->get_m_Uv0S_2(); int32_t L_10 = ___i1; NullCheck(L_9); Vector2_t2156229523 L_11 = List_1_get_Item_m1378751541(L_9, L_10, /*hidden argument*/List_1_get_Item_m1378751541_MethodInfo_var); L_8->set_uv0_3(L_11); UIVertex_t4057497605 * L_12 = ___vertex0; List_1_t3628304265 * L_13 = __this->get_m_Uv1S_3(); int32_t L_14 = ___i1; NullCheck(L_13); Vector2_t2156229523 L_15 = List_1_get_Item_m1378751541(L_13, L_14, /*hidden argument*/List_1_get_Item_m1378751541_MethodInfo_var); L_12->set_uv1_4(L_15); UIVertex_t4057497605 * L_16 = ___vertex0; List_1_t3628304265 * L_17 = __this->get_m_Uv2S_4(); int32_t L_18 = ___i1; NullCheck(L_17); Vector2_t2156229523 L_19 = List_1_get_Item_m1378751541(L_17, L_18, /*hidden argument*/List_1_get_Item_m1378751541_MethodInfo_var); L_16->set_uv2_5(L_19); UIVertex_t4057497605 * L_20 = ___vertex0; List_1_t3628304265 * L_21 = __this->get_m_Uv3S_5(); int32_t L_22 = ___i1; NullCheck(L_21); Vector2_t2156229523 L_23 = List_1_get_Item_m1378751541(L_21, L_22, /*hidden argument*/List_1_get_Item_m1378751541_MethodInfo_var); L_20->set_uv3_6(L_23); UIVertex_t4057497605 * L_24 = ___vertex0; List_1_t899420910 * L_25 = __this->get_m_Normals_6(); int32_t L_26 = ___i1; NullCheck(L_25); Vector3_t3722313464 L_27 = List_1_get_Item_m200663048(L_25, L_26, /*hidden argument*/List_1_get_Item_m200663048_MethodInfo_var); L_24->set_normal_1(L_27); UIVertex_t4057497605 * L_28 = ___vertex0; List_1_t496136383 * L_29 = __this->get_m_Tangents_7(); int32_t L_30 = ___i1; NullCheck(L_29); Vector4_t3319028937 L_31 = List_1_get_Item_m783205072(L_29, L_30, /*hidden argument*/List_1_get_Item_m783205072_MethodInfo_var); L_28->set_tangent_7(L_31); return; } } // System.Void UnityEngine.UI.VertexHelper::SetUIVertex(UnityEngine.UIVertex,System.Int32) extern "C" void VertexHelper_SetUIVertex_m3094993826 (VertexHelper_t2453304189 * __this, UIVertex_t4057497605 ___vertex0, int32_t ___i1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_SetUIVertex_m3094993826_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t899420910 * L_0 = __this->get_m_Positions_0(); int32_t L_1 = ___i1; Vector3_t3722313464 L_2 = (&___vertex0)->get_position_0(); NullCheck(L_0); List_1_set_Item_m658432263(L_0, L_1, L_2, /*hidden argument*/List_1_set_Item_m658432263_MethodInfo_var); List_1_t4072576034 * L_3 = __this->get_m_Colors_1(); int32_t L_4 = ___i1; Color32_t2600501292 L_5 = (&___vertex0)->get_color_2(); NullCheck(L_3); List_1_set_Item_m4249175531(L_3, L_4, L_5, /*hidden argument*/List_1_set_Item_m4249175531_MethodInfo_var); List_1_t3628304265 * L_6 = __this->get_m_Uv0S_2(); int32_t L_7 = ___i1; Vector2_t2156229523 L_8 = (&___vertex0)->get_uv0_3(); NullCheck(L_6); List_1_set_Item_m35836043(L_6, L_7, L_8, /*hidden argument*/List_1_set_Item_m35836043_MethodInfo_var); List_1_t3628304265 * L_9 = __this->get_m_Uv1S_3(); int32_t L_10 = ___i1; Vector2_t2156229523 L_11 = (&___vertex0)->get_uv1_4(); NullCheck(L_9); List_1_set_Item_m35836043(L_9, L_10, L_11, /*hidden argument*/List_1_set_Item_m35836043_MethodInfo_var); List_1_t3628304265 * L_12 = __this->get_m_Uv2S_4(); int32_t L_13 = ___i1; Vector2_t2156229523 L_14 = (&___vertex0)->get_uv2_5(); NullCheck(L_12); List_1_set_Item_m35836043(L_12, L_13, L_14, /*hidden argument*/List_1_set_Item_m35836043_MethodInfo_var); List_1_t3628304265 * L_15 = __this->get_m_Uv3S_5(); int32_t L_16 = ___i1; Vector2_t2156229523 L_17 = (&___vertex0)->get_uv3_6(); NullCheck(L_15); List_1_set_Item_m35836043(L_15, L_16, L_17, /*hidden argument*/List_1_set_Item_m35836043_MethodInfo_var); List_1_t899420910 * L_18 = __this->get_m_Normals_6(); int32_t L_19 = ___i1; Vector3_t3722313464 L_20 = (&___vertex0)->get_normal_1(); NullCheck(L_18); List_1_set_Item_m658432263(L_18, L_19, L_20, /*hidden argument*/List_1_set_Item_m658432263_MethodInfo_var); List_1_t496136383 * L_21 = __this->get_m_Tangents_7(); int32_t L_22 = ___i1; Vector4_t3319028937 L_23 = (&___vertex0)->get_tangent_7(); NullCheck(L_21); List_1_set_Item_m1118509050(L_21, L_22, L_23, /*hidden argument*/List_1_set_Item_m1118509050_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::FillMesh(UnityEngine.Mesh) extern "C" void VertexHelper_FillMesh_m1654068917 (VertexHelper_t2453304189 * __this, Mesh_t3648964284 * ___mesh0, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_FillMesh_m1654068917_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Mesh_t3648964284 * L_0 = ___mesh0; NullCheck(L_0); Mesh_Clear_m2707175420(L_0, /*hidden argument*/NULL); List_1_t899420910 * L_1 = __this->get_m_Positions_0(); NullCheck(L_1); int32_t L_2 = List_1_get_Count_m576380744(L_1, /*hidden argument*/List_1_get_Count_m576380744_MethodInfo_var); if ((((int32_t)L_2) < ((int32_t)((int32_t)65000)))) { goto IL_0027; } } { ArgumentException_t132251570 * L_3 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var); ArgumentException__ctor_m1312628991(L_3, _stringLiteral1503155443, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_0027: { Mesh_t3648964284 * L_4 = ___mesh0; List_1_t899420910 * L_5 = __this->get_m_Positions_0(); NullCheck(L_4); Mesh_SetVertices_m2641879696(L_4, L_5, /*hidden argument*/NULL); Mesh_t3648964284 * L_6 = ___mesh0; List_1_t4072576034 * L_7 = __this->get_m_Colors_1(); NullCheck(L_6); Mesh_SetColors_m3397914746(L_6, L_7, /*hidden argument*/NULL); Mesh_t3648964284 * L_8 = ___mesh0; List_1_t3628304265 * L_9 = __this->get_m_Uv0S_2(); NullCheck(L_8); Mesh_SetUVs_m1321350398(L_8, 0, L_9, /*hidden argument*/NULL); Mesh_t3648964284 * L_10 = ___mesh0; List_1_t3628304265 * L_11 = __this->get_m_Uv1S_3(); NullCheck(L_10); Mesh_SetUVs_m1321350398(L_10, 1, L_11, /*hidden argument*/NULL); Mesh_t3648964284 * L_12 = ___mesh0; List_1_t3628304265 * L_13 = __this->get_m_Uv2S_4(); NullCheck(L_12); Mesh_SetUVs_m1321350398(L_12, 2, L_13, /*hidden argument*/NULL); Mesh_t3648964284 * L_14 = ___mesh0; List_1_t3628304265 * L_15 = __this->get_m_Uv3S_5(); NullCheck(L_14); Mesh_SetUVs_m1321350398(L_14, 3, L_15, /*hidden argument*/NULL); Mesh_t3648964284 * L_16 = ___mesh0; List_1_t899420910 * L_17 = __this->get_m_Normals_6(); NullCheck(L_16); Mesh_SetNormals_m404565226(L_16, L_17, /*hidden argument*/NULL); Mesh_t3648964284 * L_18 = ___mesh0; List_1_t496136383 * L_19 = __this->get_m_Tangents_7(); NullCheck(L_18); Mesh_SetTangents_m2687625516(L_18, L_19, /*hidden argument*/NULL); Mesh_t3648964284 * L_20 = ___mesh0; List_1_t128053199 * L_21 = __this->get_m_Indices_8(); NullCheck(L_20); Mesh_SetTriangles_m490283541(L_20, L_21, 0, /*hidden argument*/NULL); Mesh_t3648964284 * L_22 = ___mesh0; NullCheck(L_22); Mesh_RecalculateBounds_m1919550338(L_22, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::Dispose() extern "C" void VertexHelper_Dispose_m1187645830 (VertexHelper_t2453304189 * __this, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_Dispose_m1187645830_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t899420910 * L_0 = __this->get_m_Positions_0(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t456935359_il2cpp_TypeInfo_var); ListPool_1_Release_m4113115349(NULL /*static, unused*/, L_0, /*hidden argument*/ListPool_1_Release_m4113115349_MethodInfo_var); List_1_t4072576034 * L_1 = __this->get_m_Colors_1(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3630090483_il2cpp_TypeInfo_var); ListPool_1_Release_m2857821093(NULL /*static, unused*/, L_1, /*hidden argument*/ListPool_1_Release_m2857821093_MethodInfo_var); List_1_t3628304265 * L_2 = __this->get_m_Uv0S_2(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3185818714_il2cpp_TypeInfo_var); ListPool_1_Release_m591299672(NULL /*static, unused*/, L_2, /*hidden argument*/ListPool_1_Release_m591299672_MethodInfo_var); List_1_t3628304265 * L_3 = __this->get_m_Uv1S_3(); ListPool_1_Release_m591299672(NULL /*static, unused*/, L_3, /*hidden argument*/ListPool_1_Release_m591299672_MethodInfo_var); List_1_t3628304265 * L_4 = __this->get_m_Uv2S_4(); ListPool_1_Release_m591299672(NULL /*static, unused*/, L_4, /*hidden argument*/ListPool_1_Release_m591299672_MethodInfo_var); List_1_t3628304265 * L_5 = __this->get_m_Uv3S_5(); ListPool_1_Release_m591299672(NULL /*static, unused*/, L_5, /*hidden argument*/ListPool_1_Release_m591299672_MethodInfo_var); List_1_t899420910 * L_6 = __this->get_m_Normals_6(); ListPool_1_Release_m4113115349(NULL /*static, unused*/, L_6, /*hidden argument*/ListPool_1_Release_m4113115349_MethodInfo_var); List_1_t496136383 * L_7 = __this->get_m_Tangents_7(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t53650832_il2cpp_TypeInfo_var); ListPool_1_Release_m1363449253(NULL /*static, unused*/, L_7, /*hidden argument*/ListPool_1_Release_m1363449253_MethodInfo_var); List_1_t128053199 * L_8 = __this->get_m_Indices_8(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3980534944_il2cpp_TypeInfo_var); ListPool_1_Release_m188599205(NULL /*static, unused*/, L_8, /*hidden argument*/ListPool_1_Release_m188599205_MethodInfo_var); __this->set_m_Positions_0((List_1_t899420910 *)NULL); __this->set_m_Colors_1((List_1_t4072576034 *)NULL); __this->set_m_Uv0S_2((List_1_t3628304265 *)NULL); __this->set_m_Uv1S_3((List_1_t3628304265 *)NULL); __this->set_m_Uv2S_4((List_1_t3628304265 *)NULL); __this->set_m_Uv3S_5((List_1_t3628304265 *)NULL); __this->set_m_Normals_6((List_1_t899420910 *)NULL); __this->set_m_Tangents_7((List_1_t496136383 *)NULL); __this->set_m_Indices_8((List_1_t128053199 *)NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.Vector3,UnityEngine.Color32,UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector3,UnityEngine.Vector4) extern "C" void VertexHelper_AddVert_m189858127 (VertexHelper_t2453304189 * __this, Vector3_t3722313464 ___position0, Color32_t2600501292 ___color1, Vector2_t2156229523 ___uv02, Vector2_t2156229523 ___uv13, Vector3_t3722313464 ___normal4, Vector4_t3319028937 ___tangent5, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_AddVert_m189858127_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t899420910 * L_0 = __this->get_m_Positions_0(); Vector3_t3722313464 L_1 = ___position0; NullCheck(L_0); List_1_Add_m4259514621(L_0, L_1, /*hidden argument*/List_1_Add_m4259514621_MethodInfo_var); List_1_t4072576034 * L_2 = __this->get_m_Colors_1(); Color32_t2600501292 L_3 = ___color1; NullCheck(L_2); List_1_Add_m3372602044(L_2, L_3, /*hidden argument*/List_1_Add_m3372602044_MethodInfo_var); List_1_t3628304265 * L_4 = __this->get_m_Uv0S_2(); Vector2_t2156229523 L_5 = ___uv02; NullCheck(L_4); List_1_Add_m4259515774(L_4, L_5, /*hidden argument*/List_1_Add_m4259515774_MethodInfo_var); List_1_t3628304265 * L_6 = __this->get_m_Uv1S_3(); Vector2_t2156229523 L_7 = ___uv13; NullCheck(L_6); List_1_Add_m4259515774(L_6, L_7, /*hidden argument*/List_1_Add_m4259515774_MethodInfo_var); List_1_t3628304265 * L_8 = __this->get_m_Uv2S_4(); Vector2_t2156229523 L_9 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_8); List_1_Add_m4259515774(L_8, L_9, /*hidden argument*/List_1_Add_m4259515774_MethodInfo_var); List_1_t3628304265 * L_10 = __this->get_m_Uv3S_5(); Vector2_t2156229523 L_11 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_10); List_1_Add_m4259515774(L_10, L_11, /*hidden argument*/List_1_Add_m4259515774_MethodInfo_var); List_1_t899420910 * L_12 = __this->get_m_Normals_6(); Vector3_t3722313464 L_13 = ___normal4; NullCheck(L_12); List_1_Add_m4259514621(L_12, L_13, /*hidden argument*/List_1_Add_m4259514621_MethodInfo_var); List_1_t496136383 * L_14 = __this->get_m_Tangents_7(); Vector4_t3319028937 L_15 = ___tangent5; NullCheck(L_14); List_1_Add_m4259509372(L_14, L_15, /*hidden argument*/List_1_Add_m4259509372_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.Vector3,UnityEngine.Color32,UnityEngine.Vector2) extern "C" void VertexHelper_AddVert_m3837581305 (VertexHelper_t2453304189 * __this, Vector3_t3722313464 ___position0, Color32_t2600501292 ___color1, Vector2_t2156229523 ___uv02, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_AddVert_m3837581305_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Vector3_t3722313464 L_0 = ___position0; Color32_t2600501292 L_1 = ___color1; Vector2_t2156229523 L_2 = ___uv02; Vector2_t2156229523 L_3 = Vector2_get_zero_m3700876535(NULL /*static, unused*/, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(VertexHelper_t2453304189_il2cpp_TypeInfo_var); Vector3_t3722313464 L_4 = ((VertexHelper_t2453304189_StaticFields*)VertexHelper_t2453304189_il2cpp_TypeInfo_var->static_fields)->get_s_DefaultNormal_10(); Vector4_t3319028937 L_5 = ((VertexHelper_t2453304189_StaticFields*)VertexHelper_t2453304189_il2cpp_TypeInfo_var->static_fields)->get_s_DefaultTangent_9(); VertexHelper_AddVert_m189858127(__this, L_0, L_1, L_2, L_3, L_4, L_5, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.UIVertex) extern "C" void VertexHelper_AddVert_m544470165 (VertexHelper_t2453304189 * __this, UIVertex_t4057497605 ___v0, const MethodInfo* method) { { Vector3_t3722313464 L_0 = (&___v0)->get_position_0(); Color32_t2600501292 L_1 = (&___v0)->get_color_2(); Vector2_t2156229523 L_2 = (&___v0)->get_uv0_3(); Vector2_t2156229523 L_3 = (&___v0)->get_uv1_4(); Vector3_t3722313464 L_4 = (&___v0)->get_normal_1(); Vector4_t3319028937 L_5 = (&___v0)->get_tangent_7(); VertexHelper_AddVert_m189858127(__this, L_0, L_1, L_2, L_3, L_4, L_5, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::AddTriangle(System.Int32,System.Int32,System.Int32) extern "C" void VertexHelper_AddTriangle_m3677720024 (VertexHelper_t2453304189 * __this, int32_t ___idx00, int32_t ___idx11, int32_t ___idx22, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_AddTriangle_m3677720024_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t128053199 * L_0 = __this->get_m_Indices_8(); int32_t L_1 = ___idx00; NullCheck(L_0); List_1_Add_m4025721294(L_0, L_1, /*hidden argument*/List_1_Add_m4025721294_MethodInfo_var); List_1_t128053199 * L_2 = __this->get_m_Indices_8(); int32_t L_3 = ___idx11; NullCheck(L_2); List_1_Add_m4025721294(L_2, L_3, /*hidden argument*/List_1_Add_m4025721294_MethodInfo_var); List_1_t128053199 * L_4 = __this->get_m_Indices_8(); int32_t L_5 = ___idx22; NullCheck(L_4); List_1_Add_m4025721294(L_4, L_5, /*hidden argument*/List_1_Add_m4025721294_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::AddUIVertexQuad(UnityEngine.UIVertex[]) extern "C" void VertexHelper_AddUIVertexQuad_m4228725261 (VertexHelper_t2453304189 * __this, UIVertexU5BU5D_t1981460040* ___verts0, const MethodInfo* method) { int32_t V_0 = 0; int32_t V_1 = 0; { int32_t L_0 = VertexHelper_get_currentVertCount_m124779331(__this, /*hidden argument*/NULL); V_0 = L_0; V_1 = 0; goto IL_0061; } IL_000f: { UIVertexU5BU5D_t1981460040* L_1 = ___verts0; int32_t L_2 = V_1; NullCheck(L_1); Vector3_t3722313464 L_3 = ((L_1)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_2)))->get_position_0(); UIVertexU5BU5D_t1981460040* L_4 = ___verts0; int32_t L_5 = V_1; NullCheck(L_4); Color32_t2600501292 L_6 = ((L_4)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_5)))->get_color_2(); UIVertexU5BU5D_t1981460040* L_7 = ___verts0; int32_t L_8 = V_1; NullCheck(L_7); Vector2_t2156229523 L_9 = ((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8)))->get_uv0_3(); UIVertexU5BU5D_t1981460040* L_10 = ___verts0; int32_t L_11 = V_1; NullCheck(L_10); Vector2_t2156229523 L_12 = ((L_10)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_11)))->get_uv1_4(); UIVertexU5BU5D_t1981460040* L_13 = ___verts0; int32_t L_14 = V_1; NullCheck(L_13); Vector3_t3722313464 L_15 = ((L_13)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_14)))->get_normal_1(); UIVertexU5BU5D_t1981460040* L_16 = ___verts0; int32_t L_17 = V_1; NullCheck(L_16); Vector4_t3319028937 L_18 = ((L_16)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_17)))->get_tangent_7(); VertexHelper_AddVert_m189858127(__this, L_3, L_6, L_9, L_12, L_15, L_18, /*hidden argument*/NULL); int32_t L_19 = V_1; V_1 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0061: { int32_t L_20 = V_1; if ((((int32_t)L_20) < ((int32_t)4))) { goto IL_000f; } } { int32_t L_21 = V_0; int32_t L_22 = V_0; int32_t L_23 = V_0; VertexHelper_AddTriangle_m3677720024(__this, L_21, ((int32_t)((int32_t)L_22+(int32_t)1)), ((int32_t)((int32_t)L_23+(int32_t)2)), /*hidden argument*/NULL); int32_t L_24 = V_0; int32_t L_25 = V_0; int32_t L_26 = V_0; VertexHelper_AddTriangle_m3677720024(__this, ((int32_t)((int32_t)L_24+(int32_t)2)), ((int32_t)((int32_t)L_25+(int32_t)3)), L_26, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::AddUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<System.Int32>) extern "C" void VertexHelper_AddUIVertexStream_m1733605881 (VertexHelper_t2453304189 * __this, List_1_t1234605051 * ___verts0, List_1_t128053199 * ___indices1, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper_AddUIVertexStream_m1733605881_MetadataUsageId); s_Il2CppMethodInitialized = true; } { List_1_t1234605051 * L_0 = ___verts0; if (!L_0) { goto IL_0033; } } { List_1_t1234605051 * L_1 = ___verts0; List_1_t899420910 * L_2 = __this->get_m_Positions_0(); List_1_t4072576034 * L_3 = __this->get_m_Colors_1(); List_1_t3628304265 * L_4 = __this->get_m_Uv0S_2(); List_1_t3628304265 * L_5 = __this->get_m_Uv1S_3(); List_1_t899420910 * L_6 = __this->get_m_Normals_6(); List_1_t496136383 * L_7 = __this->get_m_Tangents_7(); CanvasRenderer_AddUIVertexStream_m681118477(NULL /*static, unused*/, L_1, L_2, L_3, L_4, L_5, L_6, L_7, /*hidden argument*/NULL); } IL_0033: { List_1_t128053199 * L_8 = ___indices1; if (!L_8) { goto IL_0047; } } { List_1_t128053199 * L_9 = __this->get_m_Indices_8(); List_1_t128053199 * L_10 = ___indices1; NullCheck(L_9); List_1_AddRange_m3513848896(L_9, L_10, /*hidden argument*/List_1_AddRange_m3513848896_MethodInfo_var); } IL_0047: { return; } } // System.Void UnityEngine.UI.VertexHelper::AddUIVertexTriangleStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" void VertexHelper_AddUIVertexTriangleStream_m3255143338 (VertexHelper_t2453304189 * __this, List_1_t1234605051 * ___verts0, const MethodInfo* method) { { List_1_t1234605051 * L_0 = ___verts0; if (L_0) { goto IL_000c; } } { goto IL_003c; } IL_000c: { List_1_t1234605051 * L_1 = ___verts0; List_1_t899420910 * L_2 = __this->get_m_Positions_0(); List_1_t4072576034 * L_3 = __this->get_m_Colors_1(); List_1_t3628304265 * L_4 = __this->get_m_Uv0S_2(); List_1_t3628304265 * L_5 = __this->get_m_Uv1S_3(); List_1_t899420910 * L_6 = __this->get_m_Normals_6(); List_1_t496136383 * L_7 = __this->get_m_Tangents_7(); List_1_t128053199 * L_8 = __this->get_m_Indices_8(); CanvasRenderer_SplitUIVertexStreams_m557540500(NULL /*static, unused*/, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); } IL_003c: { return; } } // System.Void UnityEngine.UI.VertexHelper::GetUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" void VertexHelper_GetUIVertexStream_m785241639 (VertexHelper_t2453304189 * __this, List_1_t1234605051 * ___stream0, const MethodInfo* method) { { List_1_t1234605051 * L_0 = ___stream0; if (L_0) { goto IL_000c; } } { goto IL_003c; } IL_000c: { List_1_t1234605051 * L_1 = ___stream0; List_1_t899420910 * L_2 = __this->get_m_Positions_0(); List_1_t4072576034 * L_3 = __this->get_m_Colors_1(); List_1_t3628304265 * L_4 = __this->get_m_Uv0S_2(); List_1_t3628304265 * L_5 = __this->get_m_Uv1S_3(); List_1_t899420910 * L_6 = __this->get_m_Normals_6(); List_1_t496136383 * L_7 = __this->get_m_Tangents_7(); List_1_t128053199 * L_8 = __this->get_m_Indices_8(); CanvasRenderer_CreateUIVertexStream_m1315334716(NULL /*static, unused*/, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); } IL_003c: { return; } } // System.Void UnityEngine.UI.VertexHelper::.cctor() extern "C" void VertexHelper__cctor_m2017593797 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (VertexHelper__cctor_m2017593797_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Vector4_t3319028937 L_0; memset(&L_0, 0, sizeof(L_0)); Vector4__ctor_m1702261405(&L_0, (1.0f), (0.0f), (0.0f), (-1.0f), /*hidden argument*/NULL); ((VertexHelper_t2453304189_StaticFields*)VertexHelper_t2453304189_il2cpp_TypeInfo_var->static_fields)->set_s_DefaultTangent_9(L_0); Vector3_t3722313464 L_1 = Vector3_get_back_m4227631978(NULL /*static, unused*/, /*hidden argument*/NULL); ((VertexHelper_t2453304189_StaticFields*)VertexHelper_t2453304189_il2cpp_TypeInfo_var->static_fields)->set_s_DefaultNormal_10(L_1); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::.ctor() extern "C" void VerticalLayoutGroup__ctor_m321345421 (VerticalLayoutGroup_t923838031 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup__ctor_m2302505481(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::CalculateLayoutInputHorizontal() extern "C" void VerticalLayoutGroup_CalculateLayoutInputHorizontal_m1404590745 (VerticalLayoutGroup_t923838031 * __this, const MethodInfo* method) { { LayoutGroup_CalculateLayoutInputHorizontal_m4018851777(__this, /*hidden argument*/NULL); HorizontalOrVerticalLayoutGroup_CalcAlongAxis_m3977117339(__this, 0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::CalculateLayoutInputVertical() extern "C" void VerticalLayoutGroup_CalculateLayoutInputVertical_m845721549 (VerticalLayoutGroup_t923838031 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup_CalcAlongAxis_m3977117339(__this, 1, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::SetLayoutHorizontal() extern "C" void VerticalLayoutGroup_SetLayoutHorizontal_m84550911 (VerticalLayoutGroup_t923838031 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup_SetChildrenAlongAxis_m3119377192(__this, 0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::SetLayoutVertical() extern "C" void VerticalLayoutGroup_SetLayoutVertical_m3487765782 (VerticalLayoutGroup_t923838031 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup_SetChildrenAlongAxis_m3119377192(__this, 1, (bool)1, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif
39.606064
499
0.775973
[ "mesh", "object", "transform" ]
da0c1d20cb9e87df70bfc9fe5b9ad91d2ac81602
2,263
cpp
C++
Project X/Project X/main.cpp
MartinFlores751/VorteX
2cf252f0d9172f91c3b45f16b5fdb670c22b6ddb
[ "MIT" ]
null
null
null
Project X/Project X/main.cpp
MartinFlores751/VorteX
2cf252f0d9172f91c3b45f16b5fdb670c22b6ddb
[ "MIT" ]
null
null
null
Project X/Project X/main.cpp
MartinFlores751/VorteX
2cf252f0d9172f91c3b45f16b5fdb670c22b6ddb
[ "MIT" ]
null
null
null
#include <SDL2/SDL.h> #include <stdio.h> #include <vector> #include "core.h" #include "LWindow.h" #include "PlayerShip.h" #include "GruntShip.h" using std::vector; using std::string; LWindow gWindow; PlayerShip pShip(3); vector<GruntShip> enemyShips; vector<Bullets> bullets; LTexture bg; LTexture title; /* Self imposed limitions: * - 4 sound channels only */ /* TO-DO: - Create a score system - Be able to load and save score system - Get a colision system in place */ int main(int argc, char* argv[]) { if (!init()) { printf("An error has occured while initializing!\n"); } else { if (!loadMedia()) { printf("Media could not be loaded!\n"); } else { // Basic needed elements of the program bool quit = false; SDL_Event e; int BGScroll = -160; SDL_Renderer * renderer = gWindow.getRenderer(); bool gamePlaying = false; while (!quit) { if (SDL_PollEvent(&e) != 0) { // Exit the program? if (e.type == SDL_QUIT || e.key.keysym.sym == SDLK_ESCAPE) quit = true; else if (gamePlaying) pShip.handleInput(e, &bullets); else if (e.key.keysym.sym == SDLK_RETURN) { gamePlaying = true; continue; } } if (gamePlaying) { // Process AI event for (GruntShip &gship : enemyShips) gship.handleInput(&bullets); // Move the bullets for (Bullets &bullet : bullets) bullet.move(); // Moves the player ship pShip.move(); // Move Enemy for (GruntShip &gship : enemyShips) gship.aiMove(); // Clear the screen gWindow.clear(); // Render BG if (BGScroll++ < SCREEN_HEIGHT) { bg.render(renderer, 0, BGScroll); bg.render(renderer, 0, BGScroll - (SCREEN_HEIGHT * 2)); } else { BGScroll = -SCREEN_HEIGHT; bg.render(renderer, 0, BGScroll); bg.render(renderer, 0, BGScroll - (SCREEN_HEIGHT * 2)); } // Render bullets for (Bullets &bullet : bullets) bullet.render(renderer); // Render ships pShip.render(renderer); for (GruntShip &gship : enemyShips) gship.render(renderer); } else { title.render(renderer, 0, 0); } // Present Window gWindow.render(); } } } Quit(); return 0; }
20.387387
64
0.604949
[ "render", "vector" ]
da11a3ad7f51f28bae7bca39353decfb52a3f3bf
3,127
hpp
C++
Code/Source/Algorithms/ImageFeatures/ShapeContext.hpp
christinazavou/Thea
f68293c4a4f5ddc3abda18e2e0b679bcf5163e93
[ "BSD-3-Clause" ]
77
2016-11-06T17:25:54.000Z
2022-03-29T16:30:34.000Z
Code/Source/Algorithms/ImageFeatures/ShapeContext.hpp
christinazavou/Thea
f68293c4a4f5ddc3abda18e2e0b679bcf5163e93
[ "BSD-3-Clause" ]
1
2017-04-22T16:47:04.000Z
2017-04-22T16:47:04.000Z
Code/Source/Algorithms/ImageFeatures/ShapeContext.hpp
christinazavou/Thea
f68293c4a4f5ddc3abda18e2e0b679bcf5163e93
[ "BSD-3-Clause" ]
20
2015-10-17T20:38:50.000Z
2022-02-18T09:56:27.000Z
//============================================================================ // // This file is part of the Thea toolkit. // // This software is distributed under the BSD license, as detailed in the // accompanying LICENSE.txt file. Portions are derived from other works: // their respective licenses and copyright information are reproduced in // LICENSE.txt and/or in the relevant source files. // // Author: Siddhartha Chaudhuri // First version: 2013 // //============================================================================ #ifndef __Thea_Algorithms_ImageFeatures_ShapeContext_hpp__ #define __Thea_Algorithms_ImageFeatures_ShapeContext_hpp__ #include "../../Common.hpp" #include "../../Array.hpp" namespace Thea { // Forward declarations class Image; namespace Algorithms { /** Namespace for classes that compute features on an image. */ namespace ImageFeatures { namespace ShapeContextInternal { struct QuadTree; } // namespace ShapeContextInternal /** * Computes the shape context at pixels of a contour image. If the image has more than one channel, the luminance channel is * used. Follows the algorithm of: * * Mori, Belongie and Malik, "Shape contexts enable efficient retrieval of similar shapes", CVPR 2001. */ class THEA_API ShapeContext { public: /** Constructor. */ ShapeContext(Image const & image); /** Destructor. */ ~ShapeContext(); /** * Computes the shape context at each pixel of a contour image. * * @param num_radial_bins Number of divisions in the radial direction. * @param num_polar_bins Number of divisions in the angular direction. * @param values Computed shape contexts, in a num_pixels * \a num_radial_bins * \a num_polar_bins array (num_pixels is * major dimension for packing). * @param ignore_empty_pixels Does not compute shape contexts for pixels that are empty (zero luminance, i.e. black). The * corresponding entries in \a values are set to zero. * @param max_radius Limits the area of the context for a pixel to this radius (negative for default). */ void compute(intx num_radial_bins, intx num_polar_bins, Array<Real> & values, bool ignore_empty_pixels = true, Real max_radius = -1) const; /** * Computes the shape context at a single pixel of a contour image. * * @param row Row of pixel. * @param col Column of pixel. * @param num_radial_bins Number of divisions in the radial direction. * @param num_polar_bins Number of divisions in the angular direction. * @param values Computed shape context, in a \a num_radial_bins * \a num_polar_bins array (\a num_radial_bins is major * dimension for packing). * @param max_radius Limits the area of the context to this radius (negative for default). */ void compute(int row, int col, intx num_radial_bins, intx num_polar_bins, Array<Real> & values, Real max_radius = -1) const; private: ShapeContextInternal::QuadTree * qtree; }; // class ShapeContext } // namespace ImageFeatures } // namespace Algorithms } // namespace Thea #endif
34.362637
125
0.680844
[ "shape" ]
da1a719109a87966b828bf3884567560151372cd
2,586
cpp
C++
ext/rubot_aria/RAGenericAction.cpp
Peeja/rubot
fd04d1444a0ddaf5b92f07e85cb3d082ad7e45a1
[ "MIT", "Unlicense" ]
2
2015-12-21T16:53:09.000Z
2016-05-08T08:02:36.000Z
ext/rubot_aria/RAGenericAction.cpp
Peeja/rubot
fd04d1444a0ddaf5b92f07e85cb3d082ad7e45a1
[ "MIT", "Unlicense" ]
null
null
null
ext/rubot_aria/RAGenericAction.cpp
Peeja/rubot
fd04d1444a0ddaf5b92f07e85cb3d082ad7e45a1
[ "MIT", "Unlicense" ]
null
null
null
#include "rice/Object.hpp" #include "rice/Data_Type.hpp" #include "rice/Symbol.hpp" #include "rice/Exception.hpp" #include "Aria.h" #include "RAGenericAction.h" using namespace Rice; RAGenericAction::RAGenericAction(const char *name) : ArAction(name) { ArLog::log(ArLog::Normal, "Created generic action \"%s\".", name); myFireProc = NULL; myFireProc_guard = NULL; // Sensors mySonar = NULL; } RAGenericAction::~RAGenericAction() { if (myFireProc != NULL) { delete myFireProc; delete myFireProc_guard; } ArLog::log(ArLog::Normal, "Destroyed generic action \"%s\".", getName()); } ArActionDesired *RAGenericAction::fire(ArActionDesired currentDesired) { myDesired.reset(); // FIXME: myFireProc eventually has type 0 (T_NONE), and calling #call segfaults. // Only happens when multiple behaviors are used at once. // if (myFireProc != NULL && myFireProc->rb_type() == 0) // ArLog::log(ArLog::Normal, "Proc has type: %d.", myFireProc->rb_type()); if (myFireProc != NULL) myFireProc->call("call"); return &myDesired; } void RAGenericAction::setFireProc(Object proc) { if (!proc.is_a(rb_cProc)) throw Exception(rb_eArgError, "proc needs to be a Proc."); if (myFireProc != NULL) { delete myFireProc; delete myFireProc_guard; } myFireProc = new Object(proc); myFireProc_guard = new Address_Registration_Guard(myFireProc); } void RAGenericAction::setSensors(Object sensors) { // TODO: Make sure rubot_aria supports the given sensors. // ArLog::log(ArLog::Normal, "Action \"%s\"'s sensors started with \"%s\".", getName(), Symbol(mySensors.call("first")).c_str()); mySensors.call("replace", Array(sensors)); // ArLog::log(ArLog::Normal, "Action \"%s\"'s sensors now start with \"%s\".", getName(), Symbol(mySensors.call("first")).c_str()); } void RAGenericAction::setRobot(ArRobot *robot) { ArAction::setRobot(robot); ArLog::log(ArLog::Normal, "Setting robot for action \"%s\".", getName()); // Acquire sensors. // TODO: Handle robot not supporting sensors better. for (Array::iterator it = mySensors.begin(); it != mySensors.end(); ++it) { if (*it == Symbol("sonar")) { ArLog::log(ArLog::Normal, "Adding sonar."); mySonar = robot->findRangeDevice("sonar"); } } } Object RAGenericAction::getSensor(Symbol sensor) { if (sensor == Symbol("sonar") && mySonar) return to_ruby(mySonar); else return Object(Qnil); }
29.386364
135
0.638824
[ "object" ]
da1e9bfa2e2190346c8b61eb32972e0999d8873d
5,808
cpp
C++
main.cpp
Akutagawa50/DP_matching
b1c0aa9e9df01b4e1f258cc3c74de46d240b6b9d
[ "MIT" ]
null
null
null
main.cpp
Akutagawa50/DP_matching
b1c0aa9e9df01b4e1f258cc3c74de46d240b6b9d
[ "MIT" ]
null
null
null
main.cpp
Akutagawa50/DP_matching
b1c0aa9e9df01b4e1f258cc3c74de46d240b6b9d
[ "MIT" ]
null
null
null
#define DEBUG 0 /*-------------*\ if (DEBUG) cout << "debug" << endl; \--------------*/ #include <fstream> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <math.h> using namespace std; //読み込むファイル string temp_file_dir = "city011"; string input_file_dir = "city022"; //斜め遷移の重み const double dia_weight = 2.0; //double dia_weight = 1.41421356; //double dia_weight = 1.0; vector<vector<double>> cumulative_dist(10, vector<double>(10)); //DPマッチングの累積距離を格納する double cumulative_min[100] = {0}; //最小の累積距離を格納 int reco_number[100] = {0}; //一致したテンプレートの番号を格納 int reco_count = 0; //正答回数を格納 class data_info { //データの情報をまとめるクラス public: data_info(){ //pass }; //~data_info(); string filename; //ファイルの名前 string word; //単語 int frame; //フレーム数 vector<vector<double>> data; //データ }; //テンプレートデータと入力データのクラスをそれぞれ100個宣言 vector<data_info> temp(100); vector<data_info> input(100); int main() { //テンプレートのデータ入力, city011 for (int i = 0; i < 100; i++) { string dir; //番号をcahr型で格納 dir = char(((i + 1) / 100) + '0'); //100の位 dir += char((((i + 1) % 100) / 10) + '0'); //10の位 dir += char((((i + 1) % 100) % 10) + '0'); //1の位 dir = "./data/" + temp_file_dir + "/" + temp_file_dir + "_" + dir + ".txt"; //ディレクトリを代入 ifstream temp_file(dir); if (temp_file.fail()) //ファイル読み込みに失敗 { cerr << "Failed to open file." << endl; return -1; } temp_file >> temp[i].filename; //ファイル名を入力 temp_file >> temp[i].word; //単語を入力 temp_file >> temp[i].frame; //フレーム数を入力 temp[i].data.assign(temp[i].frame, vector<double>(15, 0)); //2次元配列を動的確保 for (int j = 0; j < temp[i].frame; j++) { for (int k = 0; k < 15; k++) temp_file >> temp[i].data[j][k]; //データを入力 } temp_file.close(); //ファイルを閉じる } //入力データ入力, city021 for (int i = 0; i < 100; i++) { string dir; //番号をcahr型で格納 dir = char(((i + 1) / 100) + '0'); //100の位 dir += char((((i + 1) % 100) / 10) + '0'); //10の位 dir += char((((i + 1) % 100) % 10) + '0'); //1の位 dir = dir = "./data/" + input_file_dir + "/" + input_file_dir + "_" + dir + ".txt"; //ディレクトリを代入 ifstream input_file(dir); if (input_file.fail()) //ファイル読み込みに失敗 { cerr << "Failed to open file." << endl; return -1; } input_file >> input[i].filename; //ファイル名を入力 input_file >> input[i].word; //単語を入力 input_file >> input[i].frame; //フレーム数を入力 input[i].data.assign(input[i].frame, vector<double>(15, 0)); //2次元配列を動的確保 for (int j = 0; j < input[i].frame; j++) { for (int k = 0; k < 15; k++) { input_file >> input[i].data[j][k]; ; //データを入力 } } input_file.close(); //ファイルを閉じる } //認識 for (int x = 0; x < 100; x++) { //入力データのfor for (int y = 0; y < 100; y++) { //テンプレートのfor cumulative_dist.assign(temp[y].frame, vector<double>(input[x].frame, 10.0)); //2次元配列を動的確保, tempフレーム行 X inputフレーム列 for (int i = 0; i < temp[y].frame; i++) { //累積距離を計算 for (int j = 0; j < input[x].frame; j++) { double sum = 0.0; //次元の差の2乗和を合計を格納 for (int k = 0; k < 15; k++) //次元の差の2乗和を合計する sum += pow((temp[y].data[i][k] - input[x].data[j][k]), 2.0); double local_dist = sqrt(sum); if (i == 0 && j == 0) //最初はそのまま代入 cumulative_dist[0][0] = local_dist; else if (i == 0) //端は例外処理 cumulative_dist[0][j] = cumulative_dist[0][j - 1] + local_dist; else if (j == 0) cumulative_dist[i][0] = cumulative_dist[i - 1][0] + local_dist; else { //累積距離を上左斜めそれぞれ計算 double up, left, dia; up = cumulative_dist[i - 1][j] + local_dist; //上方向の累積 left = cumulative_dist[i][j - 1] + local_dist; //左方向の累積 dia = cumulative_dist[i - 1][j - 1] + dia_weight * local_dist; //斜め方向の累積 cumulative_dist[i][j] = min({up, left, dia}); //最小値を累積距離に代入 } } } //一致率を計算 double reco; reco = cumulative_dist[temp[y].frame - 1][input[x].frame - 1] / double(input[x].frame + temp[y].frame); if (reco < cumulative_min[x] || y == 0) //最小の累積距離を更新, 1回目はそのまま代入 { cumulative_min[x] = reco; //最小の累積距離を代入 reco_number[x] = y; //最大の認識率の値を更新 } } if (x == reco_number[x]) { //合ってたら正答数を増やす reco_count++; //cout << "O: "; //〇を出力 } else { cout << "X: "; //間違っていたら×を出力 //結果を出力 cout << "resutl of " + input[x].word + ": " << temp[reco_number[x]].word << ", Cumulative distance: " << cumulative_min[x] << endl; } } cout << "Recognition rate: " << reco_count << "%" << endl; return 0; }
31.912088
143
0.436811
[ "vector" ]
da2141420c32f464c632e1568f14bd233b49f989
1,259
cpp
C++
Sortings/O(nlogn)/MergeSort.cpp
afentev/Algorithms-and-Data-structures
4049c8dd21e9db90f341aefeb1669d4d3f33a519
[ "MIT" ]
1
2022-03-22T16:53:17.000Z
2022-03-22T16:53:17.000Z
Sortings/O(nlogn)/MergeSort.cpp
afentev/Algorithms-and-Data-structures
4049c8dd21e9db90f341aefeb1669d4d3f33a519
[ "MIT" ]
null
null
null
Sortings/O(nlogn)/MergeSort.cpp
afentev/Algorithms-and-Data-structures
4049c8dd21e9db90f341aefeb1669d4d3f33a519
[ "MIT" ]
null
null
null
#include <iostream> #include <vector> #include <chrono> template <typename T> void _mergeSort(std::vector<T>& v, size_t l, size_t r) { if (r - l == 1) { return; } size_t mid = (l + r) / 2; _mergeSort(v, l, mid); _mergeSort(v, mid, r); std::vector<T> tmp; tmp.reserve(r - l); size_t p1 = l; size_t p2 = mid; while (p1 < mid && p2 < r) { if (v[p1] < v[p2]) { tmp.push_back(v[p1]); ++p1; } else { tmp.push_back(v[p2]); ++p2; } } while (p1 < mid) { tmp.push_back(v[p1]); ++p1; } while (p2 < r) { tmp.push_back(v[p2]); ++p2; } for (size_t i = l; i < r; ++i) { v[i] = tmp[i - l]; } } template <typename T> void mergeSort(std::vector<T>& v) { _mergeSort(v, 0, v.size()); } int main() { std::vector<int> v; const int N = 5000; for (int i = 0; i < N; ++i) { v.push_back(rand() % INT32_MAX); } auto begin = std::chrono::high_resolution_clock::now(); mergeSort(v); auto end = std::chrono::high_resolution_clock::now(); std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(end-begin).count() << "ms" << std::endl; std::vector<int> copy = v; std::sort(copy.begin(), copy.end()); std::cout << (copy == v) << std::endl; return 0; }
20.983333
109
0.5417
[ "vector" ]
da2c53a2f26a223ca77ac35f8b54261712eccd4e
2,231
cpp
C++
src/Sensor.cpp
Fazendaaa/Redes
0fc2bb206c1eef581d743b238cd81f6d6fab43da
[ "MIT" ]
null
null
null
src/Sensor.cpp
Fazendaaa/Redes
0fc2bb206c1eef581d743b238cd81f6d6fab43da
[ "MIT" ]
null
null
null
src/Sensor.cpp
Fazendaaa/Redes
0fc2bb206c1eef581d743b238cd81f6d6fab43da
[ "MIT" ]
null
null
null
#include <iostream> #include <string> #include <stdlib.h> #include <time.h> #include <vector> using namespace std; class Sensor{ private: vector <float> dataValue; //data string sensorName; //sensor name string dataType; //data type public: Sensor(string sensorName,string dataType); vector <float> getSensorValue(); string getSensorName(); string getDataType(); }; Sensor::Sensor(string sensorName,string dataType){ this->sensorName = sensorName; this->dataType = dataType; } vector <float> Sensor::getSensorValue(){ //termometor, altimetro, barometro, acelerometro, umidade, distancia, visibilidade, tempo, turbulencia.Sensor de banheiro,Sensor de birds srand (time(NULL)); for(int i=0;i<24;i++){ if(this->sensorName == "termometro"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "altimetro"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "barometro"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "acelerometro"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "umidade"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "distancia"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "visibilidade"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "tempo"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "turbulencia"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "banheiro"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "passaros"){ this->dataValue.push_back(rand() % 10 + 1); } if(this->sensorName == "trem_de_pouso"){ this->dataValue.push_back(rand() % 10 + 1); } } return this->dataValue; } string Sensor::getSensorName(){ return this->sensorName; } string Sensor::getDataType(){ return this->dataType; } int main( ) { Sensor teste{"barometro","atm"}; vector <float> val = teste.getSensorValue(); cout << teste.getSensorName()<< endl; cout << teste.getDataType()<< endl; for(int i=0;i<24;i++){ cout << val[i] << " "; } cout << endl; }
20.281818
138
0.641416
[ "vector" ]
da39bc4b36a10c40ef719cb0df3eb4dd6cd0707a
5,216
cpp
C++
Harris/prova.cpp
OttoBismark/DigitalImageProcessing
83ecbe64efe8acb6ce6aea020125b2eba2569f30
[ "MIT" ]
null
null
null
Harris/prova.cpp
OttoBismark/DigitalImageProcessing
83ecbe64efe8acb6ce6aea020125b2eba2569f30
[ "MIT" ]
null
null
null
Harris/prova.cpp
OttoBismark/DigitalImageProcessing
83ecbe64efe8acb6ce6aea020125b2eba2569f30
[ "MIT" ]
null
null
null
#include <iostream> #include <cmath> #include <vector> #include <utility> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" using namespace std; using namespace cv; int main(int argc, char **argv) { int dx, dy; int grad; float theta; int degree; if(argv[1] == nullptr) { cerr << "Usage "; cerr << " ./file.exe image.format.\n" << endl; return -1; } Mat img = imread(argv[1], IMREAD_GRAYSCALE); Mat apg = Mat::zeros(img.size(), img.type()); if(!img.data) { cerr << "Impossibile aprire l'immagine." << endl; return -1; } int rows = img.rows; int cols = img.cols; int thetaMatrix[rows][cols] = {}; pair<int, int > harris; for(int i = 0; i < img.rows; i++) { for(int j = 0; j < img.cols; j++) { int ixx, iyy, ixy = 0; /*Calcolo del gradiente su X e su Y attraverso l'operatore di Sobel*/ dx = abs((img.at<uchar>(i,j)+ 2*img.at<uchar>(i+1,j)+img.at<uchar>(i+2, j)) - (img.at<uchar>(i, j+2) + 2*img.at<uchar>(i+1, j+2) + img.at<uchar>(i+2, j+2))); dy = abs((img.at<uchar>(i,j)+ 2*img.at<uchar>(i,j+1)+img.at<uchar>(i, j+2)) - (img.at<uchar>(i+2, j) + 2*img.at<uchar>(i+2, j+1) + img.at<uchar>(i+2, j+2))); /*Somma dei gradienti*/ grad = dx + dy; if(grad > 255) { grad = 255; } if(grad < 0) { grad = 0; } /*Aggiornamento del nuovo valore di intensità*/ apg.at<uchar>(i,j) = grad; /* Calcolo delle derivative del grandiente secondo l'operatore di Sobel verso x (Dx) e verso y (Dy) */ ixx = pow(dx, 2); iyy = pow(dy, 2); harris = make_pair(ixx, iyy); /*Calcolo dell'angolo del gradiente tramite arctan(dy/dx)*/ theta = atan2(dy,dx); degree = (theta*180) / M_PI; /* Se la direzione del gradiente e verso gli 0° */ if((degree > -22.5 && degree <= 22.5) || (degree > 157.5 && degree <= -157.5)) { degree = 0; } /* Se la direzione del gradiente è verso i 45° */ else if((degree > 22.5 && degree <= 67.5) || (degree > -157.5 && degree <= -112.5)) { degree = 45; } /* Se la direzione del gradiente è verso i 90° */ else if((degree > 67.5 && degree <= 112.5) || (degree > -112.5 && degree <= -67.5)) { degree = 90; } /* Se la direzione del gradiente è verso i 135° */ else if((degree > 112.5 && degree <= 157.5) || (degree > -67.5 && degree <= -22.5)) { degree = 135; } thetaMatrix[i][j] = degree; } } /* Soppressione dei non massimi. */ for(int i = 1; i < rows-1; i++) { for(int j = 1; j < cols-1; j++) { int N = apg.at<uchar>(i-1, j); int S = apg.at<uchar>(i+1, j); int W = apg.at<uchar>(i,j-1); int E = apg.at<uchar>(i,j+1); int NW = apg.at<uchar>(i-1, j-1); int NE = apg.at<uchar>(i-1, j+1); int SE = apg.at<uchar>(i+1, j-1); int SW = apg.at<uchar>(i+1, j+1); int choice = thetaMatrix[i][j]; switch (choice) { case 0: if(apg.at<uchar>(i,j) < E || apg.at<uchar>(i, j) < W) { apg.at<uchar>(i,j) = 0; } break; case 45: if(apg.at<uchar>(i,j) < NW || apg.at<uchar>(i, j) < SE) { apg.at<uchar>(i,j) = 0; } break; case 90: if(apg.at<uchar>(i,j) < N || apg.at<uchar>(i, j) < S) { apg.at<uchar>(i,j) = 0; } break; case 135: if(apg.at<uchar>(i,j) < NE || apg.at<uchar>(i, j) < SW) { apg.at<uchar>(i,j) = 0; } break; } } } /* Sogliatura per isteresi Valori di soglia (Thresholding) */ int t1 = 220; int t2 = 135; /*Matrice finale di tutta l'operazione algoritmica*/ Mat cannyImage = Mat::zeros(img.size(), img.type()); for(int i = 1; i < rows-1; i++) { for(int j = 1; j < cols-1; j++) { if(apg.at<uchar>(i,j) < t2) { cannyImage.at<uchar>(i,j) = 0; } else if(apg.at<uchar>(i,j) > t1) { cannyImage.at<uchar>(i,j) = 255; } else if(apg.at<uchar>(i,j) >= t2 && apg.at<uchar>(i,j) <= t1) { for(int x = -1; x <= 1; x++) { for(int y = -1; y <= 1; y++) { if(apg.at<uchar>(i+x, j+y) > t1) { cannyImage.at<uchar>(i,j) = 255; } } } } } } for(int i = 0; i < rows; i++) { int sumX = 0; int sumY = 0; int sumXY = 0; for(int j = 0; j < cols; j++) { int ixy = 0; ixy = harris.first * harris.second; sumX = sumX + harris.first; sumY = sumY + harris.second; sumXY = sumXY + ixy; int det = (sumX * sumY) - (pow(sumXY,2)); int trace = sumX + sumY; int R = det - 0.04*(pow(trace,2)); if(R > 40) { circle(img, Point( i, j ), 5, Scalar(0), 2, 8, 0 ); } } } imshow("Image", img); imshow("Canny Image", cannyImage); waitKey(); }
22.580087
85
0.466833
[ "vector" ]
da404209bc67f27946c1539f6535002fcfd8e74c
14,874
cpp
C++
deform_control/external_libs/OpenSceneGraph-2.8.5/examples/osgshaders/GL2Scene.cpp
UM-ARM-Lab/mab_ms
f199f05b88060182cfbb47706bd1ff3479032c43
[ "BSD-2-Clause" ]
3
2018-08-20T12:12:43.000Z
2021-06-06T09:43:27.000Z
deform_control/external_libs/OpenSceneGraph-2.8.5/examples/osgshaders/GL2Scene.cpp
UM-ARM-Lab/mab_ms
f199f05b88060182cfbb47706bd1ff3479032c43
[ "BSD-2-Clause" ]
null
null
null
deform_control/external_libs/OpenSceneGraph-2.8.5/examples/osgshaders/GL2Scene.cpp
UM-ARM-Lab/mab_ms
f199f05b88060182cfbb47706bd1ff3479032c43
[ "BSD-2-Clause" ]
1
2022-03-31T03:12:23.000Z
2022-03-31T03:12:23.000Z
/* OpenSceneGraph example, osgshaders. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* file: examples/osgshaders/GL2Scene.cpp * author: Mike Weiblen 2005-05-01 * * Compose a scene of several instances of a model, with a different * OpenGL Shading Language shader applied to each. * * See http://www.3dlabs.com/opengl2/ for more information regarding * the OpenGL Shading Language. */ #include <osg/ShapeDrawable> #include <osg/PositionAttitudeTransform> #include <osg/Geode> #include <osg/Node> #include <osg/Material> #include <osg/Notify> #include <osg/Vec3> #include <osg/Texture1D> #include <osg/Texture2D> #include <osg/Texture3D> #include <osgDB/ReadFile> #include <osgDB/FileUtils> #include <osgUtil/Optimizer> #include <osg/Program> #include <osg/Shader> #include <osg/Uniform> #include <iostream> #include "GL2Scene.h" #include "Noise.h" /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// static osg::Image* make3DNoiseImage(int texSize) { osg::Image* image = new osg::Image; image->setImage(texSize, texSize, texSize, 4, GL_RGBA, GL_UNSIGNED_BYTE, new unsigned char[4 * texSize * texSize * texSize], osg::Image::USE_NEW_DELETE); const int startFrequency = 4; const int numOctaves = 4; int f, i, j, k, inc; double ni[3]; double inci, incj, inck; int frequency = startFrequency; GLubyte *ptr; double amp = 0.5; osg::notify(osg::INFO) << "creating 3D noise texture... "; for (f = 0, inc = 0; f < numOctaves; ++f, frequency *= 2, ++inc, amp *= 0.5) { SetNoiseFrequency(frequency); ptr = image->data(); ni[0] = ni[1] = ni[2] = 0; inci = 1.0 / (texSize / frequency); for (i = 0; i < texSize; ++i, ni[0] += inci) { incj = 1.0 / (texSize / frequency); for (j = 0; j < texSize; ++j, ni[1] += incj) { inck = 1.0 / (texSize / frequency); for (k = 0; k < texSize; ++k, ni[2] += inck, ptr += 4) { *(ptr+inc) = (GLubyte) (((noise3(ni) + 1.0) * amp) * 128.0); } } } } osg::notify(osg::INFO) << "DONE" << std::endl; return image; } static osg::Texture3D* make3DNoiseTexture(int texSize ) { osg::Texture3D* noiseTexture = new osg::Texture3D; noiseTexture->setFilter(osg::Texture3D::MIN_FILTER, osg::Texture3D::LINEAR); noiseTexture->setFilter(osg::Texture3D::MAG_FILTER, osg::Texture3D::LINEAR); noiseTexture->setWrap(osg::Texture3D::WRAP_S, osg::Texture3D::REPEAT); noiseTexture->setWrap(osg::Texture3D::WRAP_T, osg::Texture3D::REPEAT); noiseTexture->setWrap(osg::Texture3D::WRAP_R, osg::Texture3D::REPEAT); noiseTexture->setImage( make3DNoiseImage(texSize) ); return noiseTexture; } /////////////////////////////////////////////////////////////////////////// static osg::Image* make1DSineImage( int texSize ) { const float PI = 3.1415927; osg::Image* image = new osg::Image; image->setImage(texSize, 1, 1, 4, GL_RGBA, GL_UNSIGNED_BYTE, new unsigned char[4 * texSize], osg::Image::USE_NEW_DELETE); GLubyte* ptr = image->data(); float inc = 2. * PI / (float)texSize; for(int i = 0; i < texSize; i++) { *ptr++ = (GLubyte)((sinf(i * inc) * 0.5 + 0.5) * 255.); *ptr++ = 0; *ptr++ = 0; *ptr++ = 1; } return image; } static osg::Texture1D* make1DSineTexture( int texSize ) { osg::Texture1D* sineTexture = new osg::Texture1D; sineTexture->setWrap(osg::Texture1D::WRAP_S, osg::Texture1D::REPEAT); sineTexture->setFilter(osg::Texture1D::MIN_FILTER, osg::Texture1D::LINEAR); sineTexture->setFilter(osg::Texture1D::MAG_FILTER, osg::Texture1D::LINEAR); sineTexture->setImage( make1DSineImage(texSize) ); return sineTexture; } /////////////////////////////////////////////////////////////////////////// // in-line GLSL source code for the "microshader" example static const char *microshaderVertSource = { "// microshader - colors a fragment based on its position\n" "varying vec4 color;\n" "void main(void)\n" "{\n" " color = gl_Vertex;\n" " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" "}\n" }; static const char *microshaderFragSource = { "varying vec4 color;\n" "void main(void)\n" "{\n" " gl_FragColor = clamp( color, 0.0, 1.0 );\n" "}\n" }; /////////////////////////////////////////////////////////////////////////// static osg::ref_ptr<osg::Group> rootNode; // Create some geometry upon which to render GLSL shaders. static osg::Geode* CreateModel() { osg::Geode* geode = new osg::Geode(); geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),1.0f))); geode->addDrawable(new osg::ShapeDrawable(new osg::Cone(osg::Vec3(2.2f,0.0f,-0.4f),0.9f,1.8f))); geode->addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(4.4f,0.0f,0.0f),1.0f,1.4f))); return geode; } // Add a reference to the masterModel at the specified translation, and // return its StateSet so we can easily attach StateAttributes. static osg::StateSet* ModelInstance() { static float zvalue = 0.0f; static osg::Node* masterModel = CreateModel(); osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform(); xform->setPosition(osg::Vec3( 0.0f, -1.0f, zvalue )); zvalue = zvalue + 2.2f; xform->addChild(masterModel); rootNode->addChild(xform); return xform->getOrCreateStateSet(); } // load source from a file. static void LoadShaderSource( osg::Shader* shader, const std::string& fileName ) { std::string fqFileName = osgDB::findDataFile(fileName); if( fqFileName.length() != 0 ) { shader->loadShaderSourceFromFile( fqFileName.c_str() ); } else { osg::notify(osg::WARN) << "File \"" << fileName << "\" not found." << std::endl; } } /////////////////////////////////////////////////////////////////////////// // rude but convenient globals static osg::Program* BlockyProgram; static osg::Shader* BlockyVertObj; static osg::Shader* BlockyFragObj; static osg::Program* ErodedProgram; static osg::Shader* ErodedVertObj; static osg::Shader* ErodedFragObj; static osg::Program* MarbleProgram; static osg::Shader* MarbleVertObj; static osg::Shader* MarbleFragObj; /////////////////////////////////////////////////////////////////////////// // for demo simplicity, this one callback animates all the shaders, instancing // for each uniform but with a specific operation each time. class AnimateCallback: public osg::Uniform::Callback { public: enum Operation { OFFSET, SIN, COLOR1, COLOR2 }; AnimateCallback(Operation op) : _enabled(true),_operation(op) {} virtual void operator() ( osg::Uniform* uniform, osg::NodeVisitor* nv ) { if( _enabled ) { float angle = 2.0 * nv->getFrameStamp()->getSimulationTime(); float sine = sinf( angle ); // -1 -> 1 float v01 = 0.5f * sine + 0.5f; // 0 -> 1 float v10 = 1.0f - v01; // 1 -> 0 switch(_operation) { case OFFSET : uniform->set( osg::Vec3(0.505f, 0.8f*v01, 0.0f) ); break; case SIN : uniform->set( sine ); break; case COLOR1 : uniform->set( osg::Vec3(v10, 0.0f, 0.0f) ); break; case COLOR2 : uniform->set( osg::Vec3(v01, v01, v10) ); break; } } } private: bool _enabled; Operation _operation; }; /////////////////////////////////////////////////////////////////////////// // Compose a scenegraph with examples of GLSL shaders #define TEXUNIT_SINE 1 #define TEXUNIT_NOISE 2 osg::ref_ptr<osg::Group> GL2Scene::buildScene() { osg::Texture3D* noiseTexture = make3DNoiseTexture( 32 /*128*/ ); osg::Texture1D* sineTexture = make1DSineTexture( 32 /*1024*/ ); // the root of our scenegraph. rootNode = new osg::Group; // attach some Uniforms to the root, to be inherited by Programs. { osg::Uniform* OffsetUniform = new osg::Uniform( "Offset", osg::Vec3(0.0f, 0.0f, 0.0f) ); osg::Uniform* SineUniform = new osg::Uniform( "Sine", 0.0f ); osg::Uniform* Color1Uniform = new osg::Uniform( "Color1", osg::Vec3(0.0f, 0.0f, 0.0f) ); osg::Uniform* Color2Uniform = new osg::Uniform( "Color2", osg::Vec3(0.0f, 0.0f, 0.0f) ); OffsetUniform->setUpdateCallback(new AnimateCallback(AnimateCallback::OFFSET)); SineUniform->setUpdateCallback(new AnimateCallback(AnimateCallback::SIN)); Color1Uniform->setUpdateCallback(new AnimateCallback(AnimateCallback::COLOR1)); Color2Uniform->setUpdateCallback(new AnimateCallback(AnimateCallback::COLOR2)); osg::StateSet* ss = rootNode->getOrCreateStateSet(); ss->addUniform( OffsetUniform ); ss->addUniform( SineUniform ); ss->addUniform( Color1Uniform ); ss->addUniform( Color2Uniform ); } // the simple Microshader (its source appears earlier in this file) { osg::StateSet* ss = ModelInstance(); osg::Program* program = new osg::Program; program->setName( "microshader" ); _programList.push_back( program ); program->addShader( new osg::Shader( osg::Shader::VERTEX, microshaderVertSource ) ); program->addShader( new osg::Shader( osg::Shader::FRAGMENT, microshaderFragSource ) ); ss->setAttributeAndModes( program, osg::StateAttribute::ON ); } // the "blocky" shader, a simple animation test { osg::StateSet* ss = ModelInstance(); BlockyProgram = new osg::Program; BlockyProgram->setName( "blocky" ); _programList.push_back( BlockyProgram ); BlockyVertObj = new osg::Shader( osg::Shader::VERTEX ); BlockyFragObj = new osg::Shader( osg::Shader::FRAGMENT ); BlockyProgram->addShader( BlockyFragObj ); BlockyProgram->addShader( BlockyVertObj ); ss->setAttributeAndModes(BlockyProgram, osg::StateAttribute::ON); } // the "eroded" shader, uses a noise texture to discard fragments { osg::StateSet* ss = ModelInstance(); ss->setTextureAttribute(TEXUNIT_NOISE, noiseTexture); ErodedProgram = new osg::Program; ErodedProgram->setName( "eroded" ); _programList.push_back( ErodedProgram ); ErodedVertObj = new osg::Shader( osg::Shader::VERTEX ); ErodedFragObj = new osg::Shader( osg::Shader::FRAGMENT ); ErodedProgram->addShader( ErodedFragObj ); ErodedProgram->addShader( ErodedVertObj ); ss->setAttributeAndModes(ErodedProgram, osg::StateAttribute::ON); ss->addUniform( new osg::Uniform("LightPosition", osg::Vec3(0.0f, 0.0f, 4.0f)) ); ss->addUniform( new osg::Uniform("Scale", 1.0f) ); ss->addUniform( new osg::Uniform("sampler3d", TEXUNIT_NOISE) ); } // the "marble" shader, uses two textures { osg::StateSet* ss = ModelInstance(); ss->setTextureAttribute(TEXUNIT_NOISE, noiseTexture); ss->setTextureAttribute(TEXUNIT_SINE, sineTexture); MarbleProgram = new osg::Program; MarbleProgram->setName( "marble" ); _programList.push_back( MarbleProgram ); MarbleVertObj = new osg::Shader( osg::Shader::VERTEX ); MarbleFragObj = new osg::Shader( osg::Shader::FRAGMENT ); MarbleProgram->addShader( MarbleFragObj ); MarbleProgram->addShader( MarbleVertObj ); ss->setAttributeAndModes(MarbleProgram, osg::StateAttribute::ON); ss->addUniform( new osg::Uniform("NoiseTex", TEXUNIT_NOISE) ); ss->addUniform( new osg::Uniform("SineTex", TEXUNIT_SINE) ); } #ifdef INTERNAL_3DLABS //[ // regular GL 1.x texturing for comparison. osg::StateSet* ss = ModelInstance(); osg::Texture2D* tex0 = new osg::Texture2D; tex0->setImage( osgDB::readImageFile( "images/3dl-ge100.png" ) ); ss->setTextureAttributeAndModes(0, tex0, osg::StateAttribute::ON); #endif //] reloadShaderSource(); #ifdef INTERNAL_3DLABS //[ // add logo overlays rootNode->addChild( osgDB::readNodeFile( "3dl_ogl.logo" ) ); #endif //] return rootNode; } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// GL2Scene::GL2Scene() { _rootNode = buildScene(); _shadersEnabled = true; } GL2Scene::~GL2Scene() { } void GL2Scene::reloadShaderSource() { osg::notify(osg::INFO) << "reloadShaderSource()" << std::endl; LoadShaderSource( BlockyVertObj, "shaders/blocky.vert" ); LoadShaderSource( BlockyFragObj, "shaders/blocky.frag" ); LoadShaderSource( ErodedVertObj, "shaders/eroded.vert" ); LoadShaderSource( ErodedFragObj, "shaders/eroded.frag" ); LoadShaderSource( MarbleVertObj, "shaders/marble.vert" ); LoadShaderSource( MarbleFragObj, "shaders/marble.frag" ); } // mew 2003-09-19 : TODO Need to revisit how to better control // osg::Program enable state in OSG core. glProgram are // different enough from other GL state that StateSet::setAttributeAndModes() // doesn't fit well, so came up with a local implementation. void GL2Scene::toggleShaderEnable() { _shadersEnabled = ! _shadersEnabled; osg::notify(osg::WARN) << "shader enable = " << ((_shadersEnabled) ? "ON" : "OFF") << std::endl; for( unsigned int i = 0; i < _programList.size(); i++ ) { //_programList[i]->enable( _shadersEnabled ); } } /*EOF*/
34.351039
103
0.604141
[ "geometry", "render", "model", "3d" ]
da4373fc72a35a105a8c82b0169adfcf1549f4a9
2,745
cpp
C++
dataset/test/modification/1526_all/47/transformation_1.cpp
Karina5005/Plagiarism
ce11f72ba21a754ca84a27e5f26a31a19d6cb6fb
[ "MIT" ]
3
2022-02-15T00:29:39.000Z
2022-03-15T08:36:44.000Z
dataset/test/modification/1526_all/47/transformation_1.cpp
Kira5005-code/Plagiarism
ce11f72ba21a754ca84a27e5f26a31a19d6cb6fb
[ "MIT" ]
null
null
null
dataset/test/modification/1526_all/47/transformation_1.cpp
Kira5005-code/Plagiarism
ce11f72ba21a754ca84a27e5f26a31a19d6cb6fb
[ "MIT" ]
null
null
null
#include <iomanip> #include <iostream> #include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ll long long #define bs binary_search #define ld long double typedef pair<int, int> pii; #define eb emplace #define ff first #define ss second #define pb push_back #define sz(x) (ll)x.size() #define all(x) (x).begin(),(x).end() #define ndl "\n" #define pii pair<ll,ll> #define lb lower_bound #define ub upper_bound #define vi vector<ll> #define vii vector<pii> #define mii map<ll, ll> #define vb vector<bool> #define int long long ll lcm(ll a, ll b){return(a / __gcd(a, b)) * b;} #define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); inline long long dor_tkw(long long z_w, long long wwk_ras); int tc_cnt = 1; #define ns() cout << "Case #" << tc_cnt ++ << ": "; #define mod1 1000000007 #define mod3 200002 #define mod2 998244353 constexpr long long du_v = 1e18; constexpr long double s = 3.141592653589793238462; #define FOR(i,a,b) for (int i = (a); i < (b); ++i) #define F0R(i,a) FOR(i,0,a) template <typename T> void print(T &&kz) ; template <typename T, typename... Args> void print(T &&pm, Args &&...r) ; void lr(); int32_t main(); void w_hd() { long long gt; cin >> gt; vector<long long> bim(gt); { long long kzz_za = 0; if (5 > 3) cout << "new code";for ( ; kzz_za < gt; ) /* 'for' inside */ { cin >> bim[kzz_za]; kzz_za++; }} priority_queue<long long, vector<long long>, greater<long long> > za_c; long long ew_tgu = 0, rx = 0; { long long dvl_y = 0; if (5 > 3) cout << "new code";for ( ; dvl_y < gt; ) /* 'for' inside */ { za_c.push(bim[dvl_y]); ew_tgu += bim[dvl_y]; rx++; if (5 > 3) cout << "new code";for ( ; ew_tgu < 0; ) /* 'for' inside */ { ew_tgu -= za_c.top(); za_c.pop(); rx--; } dvl_y++; }} cout << rx << endl; } void m(int &&t, int &&args) { } void oa_m(int &&t) { } inline long long power(long long qqo, long long wt) { long long au_wqh = 1; if (5 > 3) cout << "new code";for ( ; wt > 0; ) /* 'for' inside */ { /* 'if' begin */ if (wt & 1) /* 'if' inside */ au_wqh = au_wqh * qqo; qqo = qqo * qqo; wt >>= 1; } return au_wqh; } int32_t main() { freopen("input.txt", "r", stdin); cin.tie(__null); cout.tie(__null); ; long long fz_jbw = 1; if (5 > 3) cout << "new code";for ( ; fz_jbw--; ) /* 'for' inside */ w_hd(); return 0; }
19.195804
76
0.530419
[ "vector" ]
da498b5eb54d24da154e85d6611b99e8d9d5a374
9,635
hpp
C++
bullet_cpp/src/btBoost/array_helpers.hpp
Klumhru/boost-python-bullet
d9ffae09157280f60cb469d8c9c9fa4c1920e3ce
[ "MIT" ]
2
2015-09-16T15:24:39.000Z
2015-11-18T11:53:51.000Z
bullet_cpp/src/btBoost/array_helpers.hpp
Klumhru/boost-python-bullet
d9ffae09157280f60cb469d8c9c9fa4c1920e3ce
[ "MIT" ]
1
2018-04-04T15:33:20.000Z
2018-04-04T15:33:20.000Z
bullet_cpp/src/btBoost/array_helpers.hpp
Klumhru/boost-python-bullet
d9ffae09157280f60cb469d8c9c9fa4c1920e3ce
[ "MIT" ]
null
null
null
// File: array_helper.hpp #ifndef _array_helper_hpp #define _array_helper_hpp #include <string> #include <typeinfo> #include <boost/python.hpp> #include <boost/python/suite/indexing/indexing_suite.hpp> // This is taken wholesale from http://stackoverflow.com/questions/18882089/wrapping-arrays-in-boost-python // This header provides helpers to facilitate exposing C-style arrays in-place namespace array_helpers { template <typename> struct array_trait; /// @brief Type that proxies to an array. template <typename T> class array_proxy { public: // Types typedef T value_type; typedef T* iterator; typedef T& reference; typedef std::size_t size_type; /// @brief Empty constructor. array_proxy() : ptr_(0), length_(0) {} /// @brief Construct with iterators. template <typename Iterator> array_proxy(Iterator begin, Iterator end) : ptr_(&*begin), length_(std::distance(begin, end)) {} /// @brief Construct with with start and size. array_proxy(reference begin, std::size_t length) : ptr_(&begin), length_(length) {} // Iterator support. iterator begin() { return ptr_; } iterator end() { return ptr_ + length_; } // Element access. reference operator[](size_t i) { return ptr_[i]; } // Capacity. size_type size() { return length_; } private: T* ptr_; std::size_t length_; }; /// @brief Make an array_proxy. template <typename T> array_proxy<typename array_trait<T>::element_type> make_array_proxy(T& array) { return array_proxy<typename array_trait<T>::element_type>( array[0], array_trait<T>::static_size); } /// @brief Policy type for referenced indexing, meeting the DerivedPolicies /// requirement of boost::python::index_suite. /// /// @note Requires Container to support: /// - value_type and size_type types, /// - value_type is default constructable and copyable, /// - element access via operator[], /// - Default constructable, iterator constructable, /// - begin(), end(), and size() member functions template <typename Container> class ref_index_suite : public boost::python::indexing_suite<Container, ref_index_suite<Container> > { public: typedef typename Container::value_type data_type; typedef typename Container::size_type index_type; typedef typename Container::size_type size_type; // Element access and manipulation. /// @brief Get element from container. static data_type& get_item(Container& container, index_type index) { return container[index]; } /// @brief Set element from container. static void set_item(Container& container, index_type index, const data_type& value) { container[index] = value; } /// @brief Reset index to default value. static void delete_item(Container& container, index_type index) { set_item(container, index, data_type()); }; // Slice support. /// @brief Get slice from container. /// /// @return Python object containing static boost::python::object get_slice(Container& container, index_type from, index_type to) { using boost::python::list; if (from > to) return list(); // Return copy, as container only references its elements. list list; while (from != to) list.append(container[from++]); return list; }; /// @brief Set a slice in container with a given value. static void set_slice( Container& container, index_type from, index_type to, const data_type& value ) { // If range is invalid, return early. if (from > to) return; // Populate range with value. while (from < to) container[from++] = value; } /// @brief Set a slice in container with another range. template <class Iterator> static void set_slice( Container& container, index_type from, index_type to, Iterator first, Iterator last ) { // If range is invalid, return early. if (from > to) return; // Populate range with other range. while (from < to) container[from++] = *first++; } /// @brief Reset slice to default values. static void delete_slice(Container& container, index_type from, index_type to) { set_slice(container, from, to, data_type()); } // Capacity. /// @brief Get size of container. static std::size_t size(Container& container) { return container.size(); } /// @brief Check if a value is within the container. template <class T> static bool contains(Container& container, const T& value) { return std::find(container.begin(), container.end(), value) != container.end(); } /// @brief Minimum index supported for container. static index_type get_min_index(Container& /*container*/) { return 0; } /// @brief Maximum index supported for container. static index_type get_max_index(Container& container) { return size(container); } // Misc. /// @brief Convert python index (could be negative) to a valid container /// index with proper boundary checks. static index_type convert_index(Container& container, PyObject* object) { namespace python = boost::python; python::extract<long> py_index(object); // If py_index cannot extract a long, then type the type is wrong so // set error and return early. if (!py_index.check()) { PyErr_SetString(PyExc_TypeError, "Invalid index type"); python::throw_error_already_set(); return index_type(); } // Extract index. long index = py_index(); // Adjust negative index. if (index < 0) index += container.size(); // Boundary check. if (index >= long(container.size()) || index < 0) { PyErr_SetString(PyExc_IndexError, "Index out of range"); python::throw_error_already_set(); } return index; } }; /// @brief Trait for arrays. template <typename T> struct array_trait_impl; // Specialize for native array. template <typename T, std::size_t N> struct array_trait_impl<T[N]> { typedef T element_type; enum { static_size = N }; typedef array_proxy<element_type> proxy_type; typedef boost::python::default_call_policies policy; typedef boost::mpl::vector<array_proxy<element_type> > signature; }; // Specialize boost::array to use the native array trait. template <typename T, std::size_t N> struct array_trait_impl<boost::array<T, N> > : public array_trait_impl<T[N]> {}; // @brief Specialize for member objects to use and modify non member traits. template <typename T, typename C> struct array_trait_impl<T (C::*)> : public array_trait_impl<T> { typedef boost::python::with_custodian_and_ward_postcall< 0, // return object (custodian) 1 // self or this (ward) > policy; // Append the class to the signature. typedef typename boost::mpl::push_back< typename array_trait_impl<T>::signature, C&>::type signature; }; /// @brief Trait class used to deduce array information, policies, and /// signatures template <typename T> struct array_trait: public array_trait_impl<typename boost::remove_pointer<T>::type> { typedef T native_type; }; /// @brief Functor used used convert an array to an array_proxy for /// non-member objects. template <typename Trait> struct array_proxy_getter { public: typedef typename Trait::native_type native_type; typedef typename Trait::proxy_type proxy_type; /// @brief Constructor. array_proxy_getter(native_type array): array_(array) {} /// @brief Return an array_proxy for a member array object. template <typename C> proxy_type operator()(C& c) { return make_array_proxy(c.*array_); } /// @brief Return an array_proxy for a non-member array object. proxy_type operator()() { return make_array_proxy(*array_); } private: native_type array_; }; /// @brief Conditionally register a type with Boost.Python. template <typename Trait> void register_array_proxy() { typedef typename Trait::element_type element_type; typedef typename Trait::proxy_type proxy_type; // If type is already registered, then return early. namespace python = boost::python; bool is_registered = (0 != python::converter::registry::query( python::type_id<proxy_type>())->to_python_target_type()); if (is_registered) return; // Otherwise, register the type as an internal type. std::string type_name = std::string("_") + typeid(element_type).name(); python::class_<proxy_type>(type_name.c_str(), python::no_init) .def(ref_index_suite<proxy_type>()); } /// @brief Create a callable Boost.Python object that will return an /// array_proxy type when called. /// /// @note This function will conditionally register array_proxy types /// for conversion within Boost.Python. The array_proxy will /// extend the life of the object from which it was called. /// For example, if `foo` is an object, and `vars` is an array, /// then the object returned from `foo.vars` will extend the life /// of `foo`. template <typename Array> boost::python::object make_array_aux(Array array) { typedef array_trait<Array> trait_type; // Register an array proxy. register_array_proxy<trait_type>(); // Create function. return boost::python::make_function( array_proxy_getter<trait_type>(array), typename trait_type::policy(), typename trait_type::signature()); } /// @brief Create a callable Boost.Python object from an array. template <typename T> boost::python::object make_array(T array) { return make_array_aux(array); } } // namespace array_helpers #endif // _array_helper_hpp
27.140845
107
0.689465
[ "object", "vector" ]
da52526a04e9909e013fb874fad3da1f978e10a8
2,129
cpp
C++
Classes/YourThread.cpp
Tang1705/Happy-Reconstruction
2040310be4475deff0a8d251feaf32d7ba82d0ff
[ "Apache-2.0" ]
5
2021-12-13T08:48:07.000Z
2022-01-04T01:28:40.000Z
Classes/YourThread.cpp
xmtc56606/Reconstruction
7eadf91b397fa2067b983be1a31c9603043d1360
[ "Apache-2.0" ]
null
null
null
Classes/YourThread.cpp
xmtc56606/Reconstruction
7eadf91b397fa2067b983be1a31c9603043d1360
[ "Apache-2.0" ]
1
2022-03-28T06:04:34.000Z
2022-03-28T06:04:34.000Z
#include "YourThread.h" YourThread::YourThread(PointCloud<PointXYZRGB> *cloudRef) { cloud = cloudRef; } void YourThread::run() { // auto cArg = CameraArguments::getInstance(); Mat r(3, 3, CV_32F); double m0[3][3] = { {9.7004457782050868e-001, 1.3447278830863673e-002, 2.4255450466457243e-001}, {-8.7082927494022376e-003, 9.9974988338843274e-001, -2.0599424802792338e-002}, {-2.4277084396282392e-001, 1.7870124701864658e-002, 9.6991905639837694e-001} }; for (auto i = 0; i < r.rows; i++) for (auto j = 0; j < r.cols; j++) r.at<float>(i, j) = m0[i][j]; Mat t(1, 3, CV_32F); double m1[1][3] = { {-1.9511179496234658e+002, 1.2627509817628756e+001, -5.9345885017522171e+001} }; for (auto i = 0; i < t.rows; i++) for (auto j = 0; j < t.cols; j++) t.at<float>(i, j) = m1[i][j]; Mat kc(3, 3, CV_32F); double m2[3][3] = { {2.1536653255083029e+003, 0., 6.1886776197116581e+002}, {0., 2.1484363899666910e+003, 5.0694898820460787e+002}, {0., 0., 1.} }; for (auto i = 0; i < kc.rows; i++) for (auto j = 0; j < kc.cols; j++) kc.at<float>(i, j) = m2[i][j]; Mat kp(3, 3, CV_32F); double m3[3][3] = { {1.7235093158297350e+003, 0., 4.4128195628736904e+002}, {0., 3.4533404000869359e+003, 5.7316457428558715e+002}, {0., 0., 1.} }; for (auto i = 0; i < kp.rows; i++) for (auto j = 0; j < kp.cols; j++) kp.at<float>(i, j) = m3[i][j]; auto cArg = CameraArguments::getInstance(r, t, kc, kp); CoreAlgorithm testCase = CoreAlgorithm(path, cArg); testCase.run(); vector<Mat> coordinates=testCase.getCoordinates(); cloud->width = coordinates.size(); cloud->height = 1; cloud->is_dense = false; cloud->points.resize(cloud->width * cloud->height); auto index = 0; for (size_t i = 0; i < cloud->points.size(); ++i) { cloud->points[i].x = coordinates[index].at<float>(0, 0); cloud->points[i].y = coordinates[index].at<float>(0, 1); cloud->points[i].z = coordinates[index].at<float>(0, 2); index++; } auto pclData = PointCloudData::getInstance(*cloud); pclData->setCloud(*cloud); // cout << "over" << "\n"; } void YourThread::setPath(string pathArg) { path = pathArg; }
28.386667
80
0.629873
[ "vector" ]
da580bcfb6807bf09db6aa0cf19e16a5f7744cb9
3,516
cpp
C++
pj_tensorrt_depth_stereo_coex/image_processor/image_processor.cpp
Pandinosaurus/play_with_tensorrt
250bfaef2f880ea3131d6ddfcc4870140cc9964e
[ "Apache-2.0" ]
26
2020-09-07T09:18:50.000Z
2022-03-30T02:59:05.000Z
pj_tensorrt_depth_stereo_coex/image_processor/image_processor.cpp
Pandinosaurus/play_with_tensorrt
250bfaef2f880ea3131d6ddfcc4870140cc9964e
[ "Apache-2.0" ]
9
2021-11-16T07:41:52.000Z
2022-02-19T02:59:48.000Z
pj_tensorrt_depth_stereo_coex/image_processor/image_processor.cpp
Pandinosaurus/play_with_tensorrt
250bfaef2f880ea3131d6ddfcc4870140cc9964e
[ "Apache-2.0" ]
6
2020-12-29T09:46:12.000Z
2022-01-26T09:10:30.000Z
/*** Include ***/ /* for general */ #include <cstdint> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <vector> #include <array> #include <algorithm> #include <chrono> #include <fstream> #include <memory> /* for OpenCV */ #include <opencv2/opencv.hpp> /* for My modules */ #include "common_helper.h" #include "common_helper_cv.h" #include "depth_stereo_engine.h" #include "image_processor.h" /*** Macro ***/ #define TAG "ImageProcessor" #define PRINT(...) COMMON_HELPER_PRINT(TAG, __VA_ARGS__) #define PRINT_E(...) COMMON_HELPER_PRINT_E(TAG, __VA_ARGS__) /*** Global variable ***/ std::unique_ptr<DepthStereoEngine> s_engine; /*** Function ***/ static void DrawFps(cv::Mat& mat, double time_inference, cv::Point pos, double font_scale, int32_t thickness, cv::Scalar color_front, cv::Scalar color_back, bool is_text_on_rect = true) { char text[64]; static auto time_previous = std::chrono::steady_clock::now(); auto time_now = std::chrono::steady_clock::now(); double fps = 1e9 / (time_now - time_previous).count(); time_previous = time_now; snprintf(text, sizeof(text), "FPS: %.1f, Inference: %.1f [ms]", fps, time_inference); CommonHelper::DrawText(mat, text, cv::Point(0, 0), 0.5, 2, CommonHelper::CreateCvColor(0, 0, 0), CommonHelper::CreateCvColor(180, 180, 180), true); } int32_t ImageProcessor::Initialize(const InputParam& input_param) { if (s_engine) { PRINT_E("Already initialized\n"); return -1; } s_engine.reset(new DepthStereoEngine()); if (s_engine->Initialize(input_param.work_dir, input_param.num_threads) != DepthStereoEngine::kRetOk) { s_engine->Finalize(); s_engine.reset(); return -1; } return 0; } int32_t ImageProcessor::Finalize(void) { if (!s_engine) { PRINT_E("Not initialized\n"); return -1; } if (s_engine->Finalize() != DepthStereoEngine::kRetOk) { return -1; } return 0; } int32_t ImageProcessor::Command(int32_t cmd) { if (!s_engine) { PRINT_E("Not initialized\n"); return -1; } switch (cmd) { case 0: default: PRINT_E("command(%d) is not supported\n", cmd); return -1; } } int32_t ImageProcessor::Process(cv::Mat& mat_left, cv::Mat& mat_right, cv::Mat& mat_result, Result& result) { if (!s_engine) { PRINT_E("Not initialized\n"); return -1; } DepthStereoEngine::Result ss_result; if (s_engine->Process(mat_left, mat_right, ss_result) != DepthStereoEngine::kRetOk) { return -1; } /* Convert to colored depth map */ cv::Mat mat_depth; cv::applyColorMap(ss_result.image, mat_depth, cv::COLORMAP_JET); /* Create result image */ cv::Mat mat_new = cv::Mat::zeros(mat_left.size(), CV_8UC3); cv::Mat target = mat_new(cv::Rect(ss_result.crop.x, ss_result.crop.y, ss_result.crop.w, ss_result.crop.h)); cv::resize(mat_depth, target, target.size()); cv::vconcat(mat_left, mat_new, mat_result); // cv::resize(mat_result, mat_result, cv::Size(), 0.5, 0.5); // just to fit to my display DrawFps(mat_result, ss_result.time_inference, cv::Point(0, 0), 0.5, 2, CommonHelper::CreateCvColor(0, 0, 0), CommonHelper::CreateCvColor(180, 180, 180), true); /* Return the results */ result.time_pre_process = ss_result.time_pre_process; result.time_inference = ss_result.time_inference; result.time_post_process = ss_result.time_post_process; return 0; }
28.128
185
0.6624
[ "vector" ]
da5f3e852dc490966688043b3940f1a88f85ac26
2,844
cpp
C++
vowel-spellchecker.cpp
ensky/leetcode
c90e6f3819f90ce0806b5a9945eef695d48c6b88
[ "MIT" ]
null
null
null
vowel-spellchecker.cpp
ensky/leetcode
c90e6f3819f90ce0806b5a9945eef695d48c6b88
[ "MIT" ]
null
null
null
vowel-spellchecker.cpp
ensky/leetcode
c90e6f3819f90ce0806b5a9945eef695d48c6b88
[ "MIT" ]
null
null
null
/** * problem: https://leetcode.com/problems/vowel-spellchecker/ * result: * Runtime: 252 ms, faster than 28.99% of C++ online submissions for Vowel Spellchecker. * Memory Usage: 35.1 MB, less than 34.45% of C++ online submissions for Vowel Spellchecker. * used_time: 20min */ class Solution { public: vector<string> spellchecker(vector<string>& wordlist, vector<string>& queries) { this->prepareMatches(wordlist); return this->matchQueries(queries); } void prepareMatches(const vector<string>& wordlist) { this->wordlist = &wordlist; int idx = 0; for (const auto& word : wordlist) { this->updateMatch(this->exactMatch, word, idx); const string lower = this->toLower(word); this->updateMatch(this->caseMatch, lower, idx); this->updateMatch(this->vowelMatch, this->toVowel(lower), idx); idx++; } } vector<string> matchQueries(const vector<string>& queries) { vector<string> results; for (const auto &query : queries) { string result = this->matchResult(this->exactMatch, query); string lower; if (result.empty()) { lower = this->toLower(query); result = this->matchResult(this->caseMatch, lower); } if (result.empty()) { result = this->matchResult(this->vowelMatch, this->toVowel(lower)); } results.emplace_back(std::move(result)); } return results; } void updateMatch(unordered_map<string, int>& matchMap, const string& word, int idx) { if (matchMap.count(word) > 0) { return; } matchMap[word] = idx; } string matchResult(const unordered_map<string, int>& matchMap, const string& query) { auto it = matchMap.find(query); if (it == matchMap.end()) { return ""; } return this->wordlist->at(it->second); } string toLower(const std::string& str) { string result; std::transform(str.begin(), str.end(), std::back_inserter(result), [](char c ){ return std::tolower(c); }); return result; } string toVowel(const std::string& str) { string result; for (auto c : str) { if (this->isVowel(c)) { result.push_back('|'); } else { result.push_back(c); } } return result; } bool isVowel(char c) { return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'; } private: const vector<string>* wordlist; unordered_map<string, int> exactMatch; unordered_map<string, int> caseMatch; unordered_map<string, int> vowelMatch; };
30.913043
94
0.548875
[ "vector", "transform" ]
da774c883f4d852a075bf1cf8553ad0c76074947
3,419
cpp
C++
main.cpp
denizkenankilic/computerVision-basic-hough
f6c854d58c5293df370d7e98c4a9d80e832d5145
[ "MIT" ]
null
null
null
main.cpp
denizkenankilic/computerVision-basic-hough
f6c854d58c5293df370d7e98c4a9d80e832d5145
[ "MIT" ]
null
null
null
main.cpp
denizkenankilic/computerVision-basic-hough
f6c854d58c5293df370d7e98c4a9d80e832d5145
[ "MIT" ]
null
null
null
#include <stdio.h> #include "dirent.h" #include "unistd.h" #include <string> #include <map> #include <iostream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/core/core.hpp" #include "hough.h" //extern FILE *stdin; //extern FILE *stdout; //extern FILE *stderr; std::string img_path; int threshold = 0; const char* CW_IMG_ORIGINAL = "Result"; const char* CW_IMG_EDGE = "Canny Edge Detection"; const char* CW_ACCUMULATOR = "Accumulator"; void doTransform(std::string, int threshold); void usage(char * s) { fprintf(stderr, "\n"); fprintf(stderr, "%s -s <source file> [-t <threshold>] - hough transform. build: %s-%s \n", s, __DATE__, __TIME__); fprintf(stderr, " s: path image file\n"); fprintf(stderr, " t: hough threshold\n"); fprintf(stderr, "\nexample: ./hough -s ./img/image.jpg -t 195\n"); fprintf(stderr, "\n"); } int main(int argc, char** argv) { int c; while ((c = getopt()) != -1) { switch (c) { case 's': img_path = optarg; break; case 't': threshold = atoi(optarg); break; case '?': default: usage(argv[0]); return -1; } } if (img_path.empty()) { usage(argv[0]); return -1; } cv::namedWindow(CW_IMG_ORIGINAL, cv::WINDOW_AUTOSIZE); cv::namedWindow(CW_IMG_EDGE, cv::WINDOW_AUTOSIZE); cv::namedWindow(CW_ACCUMULATOR, cv::WINDOW_AUTOSIZE); cvMoveWindow(CW_IMG_ORIGINAL, 10, 10); cvMoveWindow(CW_IMG_EDGE, 680, 10); cvMoveWindow(CW_ACCUMULATOR, 1350, 10); doTransform(img_path, threshold); return 0; } void doTransform(std::string file_path, int threshold) { cv::Mat img_edge; cv::Mat img_blur; cv::Mat img_ori = cv::imread(file_path, 1); cv::blur(img_ori, img_blur, cv::Size(5, 5)); cv::Canny(img_blur, img_edge, 100, 150, 3); int w = img_edge.cols; int h = img_edge.rows; //Transform keymolen::Hough hough; hough.Transform(img_edge.data, w, h); if (threshold == 0) threshold = w>h ? w / 4 : h / 4; while (1) { cv::Mat img_res = img_ori.clone(); //Search the accumulator std::vector< std::pair< std::pair<int, int>, std::pair<int, int> > > lines = hough.GetLines(threshold); //Draw the results std::vector< std::pair< std::pair<int, int>, std::pair<int, int> > >::iterator it; for (it = lines.begin(); it != lines.end(); it++) { cv::line(img_res, cv::Point(it->first.first, it->first.second), cv::Point(it->second.first, it->second.second), cv::Scalar(0, 0, 255), 2, 8); } //Visualize all int aw, ah, maxa; aw = ah = maxa = 0; const unsigned int* accu = hough.GetAccu(&aw, &ah); for (int p = 0; p<(ah*aw); p++) { if ((int)accu[p] > maxa) maxa = accu[p]; } double contrast = 1.0; double coef = 255.0 / (double)maxa * contrast; cv::Mat img_accu(ah, aw, CV_8UC3); for (int p = 0; p<(ah*aw); p++) { unsigned char c = (double)accu[p] * coef < 255.0 ? (double)accu[p] * coef : 255.0; img_accu.data[(p * 3) + 0] = 255; img_accu.data[(p * 3) + 1] = 255 - c; img_accu.data[(p * 3) + 2] = 255 - c; } cv::imshow(CW_IMG_ORIGINAL, img_res); cv::imshow(CW_IMG_EDGE, img_edge); cv::imshow(CW_ACCUMULATOR, img_accu); char c = cv::waitKey(360000); if (c == '+') threshold += 5; if (c == '-') threshold -= 5; if (c == 27) break; } }
22.642384
145
0.598421
[ "vector", "transform" ]
da785e1281b9a311f746708aed5801c7916ec1d0
340
cpp
C++
src/Hello/Hello.cpp
NielsH12/cmake_template_project
cf7e28e44f9bdeaa6ac1ac5a6a38512b95795190
[ "MIT" ]
null
null
null
src/Hello/Hello.cpp
NielsH12/cmake_template_project
cf7e28e44f9bdeaa6ac1ac5a6a38512b95795190
[ "MIT" ]
null
null
null
src/Hello/Hello.cpp
NielsH12/cmake_template_project
cf7e28e44f9bdeaa6ac1ac5a6a38512b95795190
[ "MIT" ]
null
null
null
#include <iostream> #include <Math/Addition.hpp> #include <Math/Subtraction.hpp> #include <Transform/Transform.hpp> int main() { Transform t(2.0, 4.0, 5.0); std::cout << "Hello world 2" << std::endl; t.print(); std::cout << add(5,4) << std::endl; std::cout << subtract(5,4) << std::endl; return 0; }
18.888889
46
0.570588
[ "transform" ]
da79278ba44c5f8832d0f6412edabb3729332a9a
37,113
cxx
C++
com/ole32/stg/simp/simpstm.cxx
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
com/ole32/stg/simp/simpstm.cxx
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
com/ole32/stg/simp/simpstm.cxx
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
//+--------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1992 - 1994. // // File: simpstm.cxx // // Contents: CStdStream implementation // // Classes: // // Functions: // // History: 04-Aug-94 PhilipLa Created // //---------------------------------------------------------------------------- #include "simphead.cxx" #pragma hdrstop #include <ole.hxx> #include <logfile.hxx> #include <expparam.hxx> #if DBG == 1 && defined(SECURE_SIMPLE_MODE) void CSimpStream::CheckSeekPointer(void) { LONG lHighChk; ULONG ulLowChk; lHighChk = 0; ulLowChk = SetFilePointer(_hFile, 0, &lHighChk, FILE_CURRENT); if (ulLowChk == 0xFFFFFFFF) { //An error occurred while checking. simpDebugOut((DEB_ERROR, "SetFilePointer call failed with %lu\n", GetLastError())); } else if ((ulLowChk != _ulSeekPos) || (lHighChk != 0)) { simpDebugOut((DEB_ERROR, "Seek pointer mismatch." " Cached = %lu, Real = %lu, High = %lu\n", _ulSeekPos, ulLowChk, lHighChk)); simpAssert((ulLowChk == _ulSeekPos) && (lHighChk == 0)); } } #define CheckSeek() CheckSeekPointer() #else #define CheckSeek() #endif // DBG == 1 && defined(SECURE_SIMPLE_MODE) //+--------------------------------------------------------------------------- // // Member: CSimpStream::Init, public // // Synopsis: Initialize stream object // // Arguments: [pstgParent] -- Pointer to parent // [hFile] -- File handle for writes // [ulSeekStart] -- Beginning seek pointer // // Returns: Appropriate status code // // Modifies: // // History: 04-Aug-94 PhilipLa Created // // Notes: // //---------------------------------------------------------------------------- SCODE CSimpStream::Init( CSimpStorage *pstgParent, HANDLE hFile, ULONG ulSeekStart) { simpDebugOut((DEB_ITRACE, "In CSimpStream::Init:%p()\n", this)); _ulSeekStart = ulSeekStart; _hFile = hFile; _pstgParent = pstgParent; _cReferences = 1; #ifdef SECURE_SIMPLE_MODE _ulHighWater = ulSeekStart; #endif _ulSeekPos = ulSeekStart; if (SetFilePointer(_hFile, ulSeekStart, NULL, FILE_BEGIN) == 0xFFFFFFFF) { return STG_SCODE(GetLastError()); } CheckSeek(); if (!SetEndOfFile(_hFile)) { return STG_SCODE(GetLastError()); } simpDebugOut((DEB_ITRACE, "Out CSimpStream::Init\n")); return S_OK; } //+-------------------------------------------------------------- // // Member: CSimpStream::Read, public // // Synopsis: Read from a stream // // Arguments: [pb] - Buffer // [cb] - Count of bytes to read // [pcbRead] - Return number of bytes read // // Returns: Appropriate status code // // Modifies: [pcbRead] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Read(VOID HUGEP *pb, ULONG cb, ULONG *pcbRead) { ULONG cbRead; ULONG *pcb; SCODE sc; olLog(("%p::In CSimpStream::Read(%p, %lu, %p)\n", this, pb, cb, pcbRead)); SIMP_VALIDATE(Read(pb, cb, pcbRead)); pcb = (pcbRead != NULL) ? pcbRead : &cbRead; #ifdef SECURE_SIMPLE_MODE if (_ulSeekPos + cb > _ulHighWater) { ULONG cbTotalSize; cbTotalSize = GetFileSize(_hFile, NULL); if (_ulSeekPos + cb > cbTotalSize) { //Truncate. cb = (_ulSeekPos > cbTotalSize) ? 0 : cbTotalSize - _ulSeekPos; } //Part of this read would come from uninitialized space, so // we need to return zeroes instead. if (_ulSeekPos > _ulHighWater) { if (SetFilePointer(_hFile, _ulSeekPos + cb, NULL, FILE_BEGIN) == 0xFFFFFFFF) { //We can't get the seek pointer where it will need to // end up, so return zero bytes and be done with it. *pcb = 0; return S_OK; } //Actually, the whole thing is coming from uninitialized // space. Why someone would do this is a mystery, but // let's return zeroes anyway. memset(pb, SECURECHAR, cb); *pcb = cb; _ulSeekPos += cb; } else { ULONG cbBytesToRead = _ulHighWater - _ulSeekPos; if (FAILED(sc = Read(pb, cbBytesToRead, pcb))) { CheckSeek(); return sc; } cb -= *pcb; if ((*pcb != cbBytesToRead) || (SetFilePointer(_hFile, _ulSeekPos + cb, NULL, FILE_BEGIN) == 0xFFFFFFFF)) { //Either the Read call returned a weird number of bytes, // Or //We can't actually get the seek pointer where we need // it, so return fewer bytes than we normally would, // with a success code. CheckSeek(); return S_OK; } //Zero the rest of the buffer. memset((BYTE *)pb + *pcb, SECURECHAR, cb); *pcb += cb; _ulSeekPos += cb; } CheckSeek(); return S_OK; } #endif //Maps directly to ReadFile call BOOL f = ReadFile(_hFile, pb, cb, pcb, NULL); _ulSeekPos += *pcb; CheckSeek(); if (!f) return STG_SCODE(GetLastError()); olLog(("%p::Out CSimpStream::Read(). *pcbRead == %lu, ret = %lx\n", this, *pcb, S_OK)); return S_OK; } //+-------------------------------------------------------------- // // Member: CSimpStream::Write, public // // Synopsis: Write to a stream // // Arguments: [pb] - Buffer // [cb] - Count of bytes to write // [pcbWritten] - Return of bytes written // // Returns: Appropriate status code // // Modifies: [pcbWritten] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Write( VOID const HUGEP *pb, ULONG cb, ULONG *pcbWritten) { ULONG cbWritten; ULONG *pcb; BOOL f = TRUE; SCODE sc = S_OK; olLog(("%p::In CSimpStream::Write(%p, %lu, %p)\n", this, pb, cb, pcbWritten)); SIMP_VALIDATE(Write(pb, cb, pcbWritten)); pcb = (pcbWritten != NULL) ? pcbWritten : &cbWritten; if (_ulSeekPos + cb >= OLOCKREGIONBEGIN) return STG_E_DOCFILETOOLARGE; #ifdef SECURE_SIMPLE_MODE if (_ulSeekPos > _ulHighWater) { //We're leaving a gap in the file, so we need to fill in that // gap. Sad but true. ULONG cbBytesToWrite = _ulSeekPos - _ulHighWater; ULONG cbWrittenSecure; if (SetFilePointer(_hFile, _ulHighWater, NULL, FILE_BEGIN) != 0xFFFFFFFF) { while (cbBytesToWrite > 0) { if (!(f = WriteFile(_hFile, s_bufSecure, min(MINISTREAMSIZE, cbBytesToWrite), &cbWrittenSecure, NULL))) { break; } cbBytesToWrite -= cbWrittenSecure; } if ((!f) && (SetFilePointer(_hFile, _ulSeekPos, NULL, FILE_BEGIN) == 0xFFFFFFFF)) { return STG_SCODE(GetLastError()); } } CheckSeek(); } #endif //Maps directly to WriteFile call f = WriteFile(_hFile, pb, cb, pcb, NULL); _ulSeekPos += *pcb; #ifdef SECURE_SIMPLE_MODE if (_ulSeekPos > _ulHighWater) _ulHighWater = _ulSeekPos; #endif if (!f) { sc = STG_SCODE(GetLastError()); } CheckSeek(); olLog(("%p::Out CSimpStream::Write(). " "*pcbWritten == %lu, ret = %lx\n", this, *pcb, sc)); return sc; } //+-------------------------------------------------------------- // // Member: CSimpStream::Seek, public // // Synopsis: Seek to a point in a stream // // Arguments: [dlibMove] - Offset to move by // [dwOrigin] - SEEK_SET, SEEK_CUR, SEEK_END // [plibNewPosition] - Return of new offset // // Returns: Appropriate status code // // Modifies: [plibNewPosition] // // History: 04-Aug-94 PhilipLa Created // // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { SCODE sc = S_OK; LONG lMove; ULONG ulPos = 0; simpAssert((dwOrigin == STREAM_SEEK_SET) || (dwOrigin == STREAM_SEEK_CUR) || (dwOrigin == STREAM_SEEK_END)); olLog(("%p::In CSimpStream::Seek(%ld, %lu, %p)\n", this, LIGetLow(dlibMove), dwOrigin, plibNewPosition)); SIMP_VALIDATE(Seek(dlibMove, dwOrigin, plibNewPosition)); // Truncate dlibMove to 32 bits if (dwOrigin == STREAM_SEEK_SET) { // Make sure we don't seek too far if (LIGetHigh(dlibMove) != 0) LISet32(dlibMove, 0xffffffff); } else { // High dword must be zero for positive values or -1 for // negative values // Additionally, for negative values, the low dword can't // exceed -0x80000000 because the 32nd bit is the sign // bit if (LIGetHigh(dlibMove) > 0 || (LIGetHigh(dlibMove) == 0 && LIGetLow(dlibMove) >= 0x80000000)) LISet32(dlibMove, 0x7fffffff); else if (LIGetHigh(dlibMove) < -1 || (LIGetHigh(dlibMove) == -1 && LIGetLow(dlibMove) <= 0x7fffffff)) LISet32(dlibMove, 0x80000000); } lMove = (LONG)LIGetLow(dlibMove); switch(dwOrigin) { case STREAM_SEEK_SET: ulPos = _ulSeekStart + lMove; break; case STREAM_SEEK_END: ULONG cbSize; cbSize = GetFileSize(_hFile, NULL); if (lMove < 0) { if ((ULONG)(-lMove) > (cbSize - _ulSeekStart)) return STG_E_INVALIDFUNCTION; } ulPos = cbSize+lMove; break; case STREAM_SEEK_CUR: ulPos = SetFilePointer(_hFile, 0, NULL, FILE_CURRENT); if (lMove < 0) { if ((ULONG)(-lMove) > (ulPos - _ulSeekStart)) return STG_E_INVALIDFUNCTION; } ulPos += lMove; break; } ulPos = SetFilePointer(_hFile, ulPos, NULL, FILE_BEGIN); if (plibNewPosition != NULL) { ULISet32(*plibNewPosition, ulPos - _ulSeekStart); } _ulSeekPos = ulPos; CheckSeek(); olLog(("%p::Out CSimpStream::Seek(). ulPos == %lu, ret == %lx\n", this, ulPos, sc)); return sc; } //+-------------------------------------------------------------- // // Member: CSimpStream::SetSize, public // // Synopsis: Sets the size of a stream // // Arguments: [ulNewSize] - New size // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::SetSize(ULARGE_INTEGER ulNewSize) { ULONG ulCurrentPos; SCODE sc; olLog(("%p::In CSimpStream::SetSize(%lu)\n", this, ULIGetLow(ulNewSize))); SIMP_VALIDATE(SetSize(ulNewSize)); ulCurrentPos = SetFilePointer(_hFile, 0, NULL, FILE_CURRENT); if (ulCurrentPos == 0xFFFFFFFF) { return STG_SCODE(GetLastError()); } if (ULIGetHigh(ulNewSize) != 0 || ulCurrentPos + ULIGetLow(ulNewSize) >= OLOCKREGIONBEGIN) return STG_E_DOCFILETOOLARGE; if (SetFilePointer(_hFile, ULIGetLow(ulNewSize) + _ulSeekStart, NULL, FILE_BEGIN) == 0xFFFFFFFF) { CheckSeek(); return STG_SCODE(GetLastError()); } if (!SetEndOfFile(_hFile)) { SetFilePointer(_hFile, ulCurrentPos, NULL, FILE_BEGIN); CheckSeek(); return STG_SCODE(GetLastError()); } #ifdef SECURE_SIMPLE_MODE // if we are shrinking the stream below the highwater mark, reset it if (ULIGetLow(ulNewSize) + _ulSeekStart < _ulHighWater) { _ulHighWater = ULIGetLow(ulNewSize) + _ulSeekStart; } #endif if (SetFilePointer(_hFile, ulCurrentPos, NULL, FILE_BEGIN) == 0xFFFFFFFF) { _ulSeekPos = ULIGetLow(ulNewSize) + _ulSeekStart; CheckSeek(); return STG_SCODE(GetLastError()); } CheckSeek(); olLog(("%p::Out CSimpStream::SetSize(). ret == %lx\n", this, S_OK)); return S_OK; } //+-------------------------------------------------------------- // // Member: CSimpStream::CopyTo, public // // Synopsis: Copies information from one stream to another // // Arguments: [pstm] - Destination // [cb] - Number of bytes to copy // [pcbRead] - Return number of bytes read // [pcbWritten] - Return number of bytes written // // Returns: Appropriate status code // // Modifies: [pcbRead] // [pcbWritten] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) { simpDebugOut((DEB_TRACE, "In CSimpStream::CopyTo(" "%p, %lu, %p, %p)\n", pstm, ULIGetLow(cb), pcbRead, pcbWritten)); simpDebugOut((DEB_TRACE, "Out CSimpStream::CopyTo\n")); return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::Release, public // // Synopsis: Releases a stream // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP_(ULONG) CSimpStream::Release(void) { LONG lRet; olLog(("%p::In CSimpStream::Release()\n", this)); simpDebugOut((DEB_TRACE, "In CSimpStream::Release()\n")); simpAssert(_cReferences > 0); lRet = AtomicDec(&_cReferences); if (lRet == 0) { #ifdef SECURE_SIMPLE_MODE _pstgParent->ReleaseCurrentStream(_ulHighWater); #else _pstgParent->ReleaseCurrentStream(); #endif delete this; } else if (lRet < 0) lRet = 0; simpDebugOut((DEB_TRACE, "Out CSimpStream::Release\n")); olLog(("%p::Out CSimpStream::Release(). ret == %lu\n", this, lRet)); FreeLogFile(); return lRet; } //+-------------------------------------------------------------- // // Member: CSimpStream::Stat, public // // Synopsis: Fills in a buffer of information about this object // // Arguments: [pstatstg] - Buffer // // Returns: Appropriate status code // // Modifies: [pstatstg] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Stat(STATSTGW *pstatstg, DWORD grfStatFlag) { SCODE sc = S_OK; simpDebugOut((DEB_TRACE, "In CSimpStream::Stat(%p, %lu)\n", pstatstg, grfStatFlag)); SIMP_VALIDATE(Stat(pstatstg, grfStatFlag)); memset (pstatstg, 0, sizeof(STATSTG)); if (!(grfStatFlag & STATFLAG_NONAME)) { return STG_E_INVALIDFLAG; } pstatstg->cbSize.LowPart = _ulSeekPos - _ulSeekStart; pstatstg->cbSize.HighPart = 0; pstatstg->type = STGTY_STREAM; pstatstg->grfMode = STGM_READWRITE | STGM_SHARE_EXCLUSIVE; simpDebugOut((DEB_TRACE, "Out CSimpStream::Stat\n")); return sc; } //+-------------------------------------------------------------- // // Member: CSimpStream::Clone, public // // Synopsis: Clones a stream // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Clone(IStream **ppstm) { simpDebugOut((DEB_TRACE, "In CSimpStream::Clone(%p)\n", ppstm)); simpDebugOut((DEB_TRACE, "Out CSimpStream::Clone\n")); return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::AddRef, public // // Synopsis: Increments the ref count // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP_(ULONG) CSimpStream::AddRef(void) { ULONG ulRet; olLog(("%p::In CSimpStream::AddRef()\n", this)); simpDebugOut((DEB_TRACE, "In CSimpStream::AddRef()\n")); AtomicInc(&_cReferences); ulRet = _cReferences; simpDebugOut((DEB_TRACE, "Out CSimpStream::AddRef\n")); olLog(("%p::Out CSimpStream::AddRef(). ret == %lu\n", this, ulRet)); return ulRet; } //+-------------------------------------------------------------- // // Member: CSimpStream::LockRegion, public // // Synopsis: Nonfunctional // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { simpDebugOut((DEB_TRACE, "In CSimpStream::LockRegion(" "%lu, %lu\n", ULIGetLow(cb), dwLockType)); simpDebugOut((DEB_TRACE, "Out CSimpStream::LockRegion\n")); return ResultFromScode(STG_E_INVALIDFUNCTION); } //+-------------------------------------------------------------- // // Member: CSimpStream::UnlockRegion, public // // Synopsis: Nonfunctional // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { simpDebugOut((DEB_TRACE, "In CSimpStream::UnlockRegion(%lu, %lu)\n", ULIGetLow(cb), dwLockType)); simpDebugOut((DEB_TRACE, "Out CSimpStream::UnlockRegion\n")); return ResultFromScode(STG_E_INVALIDFUNCTION); } //+-------------------------------------------------------------- // // Member: CSimpStream::Commit, public // // Synopsis: No-op in current implementation // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Commit(DWORD grfCommitFlags) { simpDebugOut((DEB_TRACE, "In CSimpStream::Commit(%lu)\n", grfCommitFlags)); simpDebugOut((DEB_TRACE, "Out CSimpStream::Commit\n")); return STG_E_UNIMPLEMENTEDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::Revert, public // // Synopsis: No-op in current implementation // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::Revert(void) { simpDebugOut((DEB_TRACE, "In CSimpStream::Revert()\n")); simpDebugOut((DEB_TRACE, "Out CSimpStream::Revert\n")); return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::QueryInterface, public // // Synopsis: Returns an object for the requested interface // // Arguments: [iid] - Interface ID // [ppvObj] - Object return // // Returns: Appropriate status code // // Modifies: [ppvObj] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::QueryInterface(REFIID iid, void **ppvObj) { SCODE sc; olLog(("%p::In CSimpStream::QueryInterface(?, %p)\n", this, ppvObj)); simpDebugOut((DEB_TRACE, "In CSimpStream::QueryInterface(?, %p)\n", ppvObj)); SIMP_VALIDATE(QueryInterface(iid, ppvObj)); sc = S_OK; if (IsEqualIID(iid, IID_IStream) || IsEqualIID(iid, IID_IUnknown)) { *ppvObj = (IStream *)this; CSimpStream::AddRef(); } else if (IsEqualIID(iid, IID_IMarshal)) { *ppvObj = (IMarshal *)this; CSimpStream::AddRef(); } else sc = E_NOINTERFACE; simpDebugOut((DEB_TRACE, "Out CSimpStream::QueryInterface => %p\n", ppvObj)); olLog(("%p::Out CSimpStream::QueryInterface(). " "*ppvObj == %p, ret == %lx\n", this, *ppvObj, sc)); return ResultFromScode(sc); } //+-------------------------------------------------------------- // // Member: CSimpStream::GetUnmarshalClass, public // // Synopsis: Returns the class ID // // Arguments: [riid] - IID of object // [pv] - Unreferenced // [dwDestContext] - Unreferenced // [pvDestContext] - Unreferenced // [mshlflags] - Unreferenced // [pcid] - CLSID return // // Returns: Invalid function. // // Modifies: [pcid] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::GetUnmarshalClass(REFIID riid, void *pv, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPCLSID pcid) { return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::GetMarshalSizeMax, public // // Synopsis: Returns the size needed for the marshal buffer // // Arguments: [riid] - IID of object being marshaled // [pv] - Unreferenced // [dwDestContext] - Unreferenced // [pvDestContext] - Unreferenced // [mshlflags] - Unreferenced // [pcbSize] - Size return // // Returns: Appropriate status code // // Modifies: [pcbSize] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::GetMarshalSizeMax(REFIID riid, void *pv, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPDWORD pcbSize) { return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::MarshalInterface, public // // Synopsis: Marshals a given object // // Arguments: [pstStm] - Stream to write marshal data into // [riid] - Interface to marshal // [pv] - Unreferenced // [dwDestContext] - Unreferenced // [pvDestContext] - Unreferenced // [mshlflags] - Unreferenced // // Returns: Appropriate status code // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::MarshalInterface(IStream *pstStm, REFIID riid, void *pv, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags) { return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::UnmarshalInterface, public // // Synopsis: Non-functional // // Arguments: [pstStm] - // [riid] - // [ppvObj] - // // Returns: Appropriate status code // // Modifies: [ppvObj] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::UnmarshalInterface(IStream *pstStm, REFIID riid, void **ppvObj) { return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::ReleaseMarshalData, public // // Synopsis: Non-functional // // Arguments: [pstStm] - // // Returns: Appropriate status code // // History: 18-Sep-92 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::ReleaseMarshalData(IStream *pstStm) { return STG_E_INVALIDFUNCTION; } //+-------------------------------------------------------------- // // Member: CSimpStream::DisconnectObject, public // // Synopsis: Non-functional // // Arguments: [dwRevserved] - // // Returns: Appropriate status code // // History: 18-Sep-92 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStream::DisconnectObject(DWORD dwReserved) { return STG_E_INVALIDFUNCTION; } //+--------------------------------------------------------------------------- // // Member: CSimpStreamOpen::Init, public // // Synopsis: Initialize stream object for simple mode read // // Arguments: [pstgParent] -- Pointer to parent // [hFile] -- File handle for writes // [ulSeekStart] -- Beginning seek pointer // [grfMode] -- open mode of the stream // [pdfl] -- CDfNameList entry for this stream // // Returns: Appropriate status code // // History: 04-Jun-96 HenryLee Created // // Notes: // //---------------------------------------------------------------------------- SCODE CSimpStreamOpen::Init(CSimpStorageOpen *pstgParent, HANDLE hFile, ULONG ulSeekStart, DWORD grfMode, CDfNameList *pdfl) { simpDebugOut((DEB_ITRACE, "In CSimpStreamOpen::Init:%p()\n", this)); simpAssert (pdfl != NULL); _ulSeekStart = ulSeekStart; _pdfl = pdfl; _hFile = hFile; _pstgParent = pstgParent; _cReferences = 1; _grfMode = grfMode; if (SetFilePointer(_hFile, ulSeekStart, NULL, FILE_BEGIN) == 0xFFFFFFFF) { return HRESULT_FROM_WIN32(GetLastError()); } #ifdef SECURE_SIMPLE_MODE _ulHighWater = ulSeekStart + pdfl->GetSize(); #endif _ulSeekPos = ulSeekStart; simpDebugOut((DEB_ITRACE, "Out CSimpStreamOpen::Init\n")); return S_OK; } //+-------------------------------------------------------------- // // Member: CSimpStreamOpen::Read, public // // Synopsis: Read from a stream for simple mode open // // Arguments: [pb] - Buffer // [cb] - Count of bytes to read // [pcbRead] - Return of bytes written // // Returns: Appropriate status code // // Modifies: [pcbRead] // // History: 04-Aug-96 HenryLee Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStreamOpen::Read ( VOID *pb, ULONG cb, ULONG *pcbRead) { SCODE sc = S_OK; simpAssert (_pdfl != NULL); // cannot read past end of stream if (_ulSeekPos + cb > _ulSeekStart + _pdfl->GetSize()) cb = _ulSeekStart + _pdfl->GetSize() - _ulSeekPos; sc = CSimpStream::Read (pb, cb, pcbRead); return sc; } //+-------------------------------------------------------------- // // Member: CSimpStreamOpen::Write, public // // Synopsis: Write to a stream for simple mode open // // Arguments: [pb] - Buffer // [cb] - Count of bytes to write // [pcbWritten] - Return of bytes written // // Returns: Appropriate status code // // Modifies: [pcbWritten] // // History: 04-Jun-96 HenryLee Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStreamOpen::Write(VOID const *pb, ULONG cb, ULONG *pcbWritten) { SCODE sc = S_OK; simpAssert (_pdfl != NULL); if ((_grfMode & (STGM_READ|STGM_WRITE|STGM_READWRITE)) == STGM_READ) return STG_E_ACCESSDENIED; // cannot write past end of stream if (_ulSeekPos + cb > _ulSeekStart + _pdfl->GetSize()) return STG_E_WRITEFAULT; sc = CSimpStream::Write (pb, cb, pcbWritten); return sc; } //+-------------------------------------------------------------- // // Member: CSimpStreamOpen::SetSize, public // // Synopsis: Sets the size of a stream for simple mode read // // Arguments: [ulNewSize] - New size // // Returns: Appropriate status code // // History: 04-Jun-96 HenryLee Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStreamOpen::SetSize(ULARGE_INTEGER ulNewSize) { simpDebugOut((DEB_TRACE, "In CSimpStream2::SetSize()\n")); simpAssert (_pdfl != NULL); return STG_E_INVALIDFUNCTION; simpDebugOut((DEB_TRACE, "Out CSimpStreamOpen::SetSize\n")); } //+-------------------------------------------------------------- // // Member: CSimpStreamOpen::Release, public // // Synopsis: Releases a stream // // Returns: Appropriate status code // // History: 04-Jun-96 HenryLee Created // //--------------------------------------------------------------- STDMETHODIMP_(ULONG) CSimpStreamOpen::Release() { simpDebugOut((DEB_TRACE, "In CSimpStreamOpen::Release()\n")); simpAssert(_cReferences > 0); LONG lRet = AtomicDec(&_cReferences); if (lRet == 0) { ((CSimpStorageOpen *)_pstgParent)->ReleaseCurrentStream(); delete this; } else if (lRet < 0) lRet = 0; simpDebugOut((DEB_TRACE, "Out CSimpStreamOpen::Release\n")); return lRet; } //+-------------------------------------------------------------- // // Member: CSimpStreamOpen::Seek, public // // Synopsis: Seek to a point in a stream // // Arguments: [dlibMove] - Offset to move by // [dwOrigin] - SEEK_SET, SEEK_CUR, SEEK_END // [plibNewPosition] - Return of new offset // // Returns: Appropriate status code // // Modifies: [plibNewPosition] // // History: 04-Sep-96 HenryLee Created // // //--------------------------------------------------------------- STDMETHODIMP CSimpStreamOpen::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) { SCODE sc = S_OK; LONG lMove; ULONG ulPos = 0; simpDebugOut((DEB_TRACE, "%p::In CSimpStreamOpen::Seek(%ld, %lu, %p)\n", this, LIGetLow(dlibMove), dwOrigin, plibNewPosition)); SIMP_VALIDATE(Seek(dlibMove, dwOrigin, plibNewPosition)); // Truncate dlibMove to 32 bits if (dwOrigin == STREAM_SEEK_SET) { if (LIGetHigh(dlibMove) != 0) // Make sure we don't seek too far LISet32(dlibMove, 0xffffffff); } else { // High dword must be zero for positive values or -1 for // negative values // Additionally, for negative values, the low dword can't // exceed -0x80000000 because the 32nd bit is the sign // bit if (LIGetHigh(dlibMove) > 0 || (LIGetHigh(dlibMove) == 0 && LIGetLow(dlibMove) >= 0x80000000)) LISet32(dlibMove, 0x7fffffff); else if (LIGetHigh(dlibMove) < -1 || (LIGetHigh(dlibMove) == -1 && LIGetLow(dlibMove) <= 0x7fffffff)) LISet32(dlibMove, 0x80000000); } lMove = (LONG)LIGetLow(dlibMove); switch(dwOrigin) { case STREAM_SEEK_SET: if (lMove < 0 || (ULONG) lMove > _pdfl->GetSize()) return STG_E_INVALIDFUNCTION; ulPos = _ulSeekStart + lMove; break; case STREAM_SEEK_END: if (lMove > 0 || (lMove < 0 && (ULONG)(-lMove) > _pdfl->GetSize())) return STG_E_INVALIDFUNCTION; ulPos = _ulSeekStart + _pdfl->GetSize() + lMove; break; case STREAM_SEEK_CUR: ulPos = SetFilePointer(_hFile, 0, NULL, FILE_CURRENT); if ((ULONG) (ulPos + lMove) > _ulSeekStart + _pdfl->GetSize() || (LONG) (ulPos + lMove) < _ulSeekStart) return STG_E_INVALIDFUNCTION; ulPos += lMove; break; } ulPos = SetFilePointer(_hFile, ulPos, NULL, FILE_BEGIN); if (plibNewPosition != NULL) { ULISet32(*plibNewPosition, ulPos - _ulSeekStart); } _ulSeekPos = ulPos; simpDebugOut((DEB_TRACE, "%p::Out CSimpStreamOpen::Seek(). ulPos==%lu," " ret==%lx\n", this, ulPos, sc)); return sc; } //+-------------------------------------------------------------- // // Member: CSimpStreamOpen::Stat, public // // Synopsis: Fills in a buffer of information about this object // // Arguments: [pstatstg] - Buffer // // Returns: Appropriate status code // // Modifies: [pstatstg] // // History: 04-Aug-94 PhilipLa Created // //--------------------------------------------------------------- STDMETHODIMP CSimpStreamOpen::Stat(STATSTGW *pstatstg, DWORD grfStatFlag) { SCODE sc = S_OK; simpDebugOut((DEB_TRACE, "In CSimpStreamOpen::Stat(%p, %lu)\n", pstatstg, grfStatFlag)); SIMP_VALIDATE(Stat(pstatstg, grfStatFlag)); simpAssert (_pdfl != NULL); memset (pstatstg, 0, sizeof(STATSTG)); if (!(grfStatFlag & STATFLAG_NONAME)) { pstatstg->pwcsName = (WCHAR *) CoTaskMemAlloc ( _pdfl->GetName()->GetLength()+sizeof(WCHAR)); if (pstatstg->pwcsName) { memcpy (pstatstg->pwcsName, _pdfl->GetName()->GetBuffer(), _pdfl->GetName()->GetLength()); pstatstg->pwcsName[_pdfl->GetName()->GetLength()/sizeof(WCHAR)] = L'\0'; } else sc = STG_E_INSUFFICIENTMEMORY; } pstatstg->cbSize.LowPart = _pdfl->GetSize(); pstatstg->cbSize.HighPart = 0; pstatstg->type = STGTY_STREAM; pstatstg->grfMode = _grfMode; simpDebugOut((DEB_TRACE, "Out CSimpStreamOpen::Stat\n")); return sc; }
29.039906
81
0.47897
[ "object" ]
da7a52481e3bb1ce0678337cc9e739b4ac32ef52
1,697
cxx
C++
Testing/Code/Review/itkQuadEdgem_NoPointTest.cxx
kiranhs/ITKv4FEM-Kiran
0e4ab3b61b5fc4c736f04a73dd19e41390f20152
[ "BSD-3-Clause" ]
1
2018-04-15T13:32:43.000Z
2018-04-15T13:32:43.000Z
Testing/Code/Review/itkQuadEdgem_NoPointTest.cxx
kiranhs/ITKv4FEM-Kiran
0e4ab3b61b5fc4c736f04a73dd19e41390f20152
[ "BSD-3-Clause" ]
null
null
null
Testing/Code/Review/itkQuadEdgem_NoPointTest.cxx
kiranhs/ITKv4FEM-Kiran
0e4ab3b61b5fc4c736f04a73dd19e41390f20152
[ "BSD-3-Clause" ]
null
null
null
/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: itkQuadEdgem_NoPointTest.cxx Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) Insight Software Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #if defined(_MSC_VER) #pragma warning ( disable : 4786 ) #endif #include "itkQuadEdgeMesh.h" #include <iostream> #include <vcl_limits.h> int itkQuadEdgem_NoPointTest( int , char* [] ) { typedef itk::QuadEdgeMesh< double, 3 > MeshType; typedef MeshType::QEType QEType; typedef QEType::OriginRefType OriginRefType; OriginRefType VCL_LIMIT = vcl_numeric_limits< OriginRefType >::max( ); OriginRefType GQE_LIMIT = QEType::m_NoPoint; OriginRefType QEM_LIMIT = MeshType::m_NoPoint; std::cout << "VCL limit: " << VCL_LIMIT << std::endl; std::cout << "Geom QE limit: " << GQE_LIMIT << std::endl; std::cout << "QE mesh limit: " << QEM_LIMIT << std::endl; if( VCL_LIMIT != GQE_LIMIT ) return EXIT_FAILURE; if( VCL_LIMIT != QEM_LIMIT ) return EXIT_FAILURE; if( QEM_LIMIT != GQE_LIMIT ) return EXIT_FAILURE; if( VCL_LIMIT == 0 ) return EXIT_FAILURE; if( GQE_LIMIT == 0 ) return EXIT_FAILURE; if( QEM_LIMIT == 0 ) return EXIT_FAILURE; return EXIT_SUCCESS; }
34.632653
76
0.634649
[ "mesh" ]
da7d736df491ad34c290fb3488c082ddd5354710
3,301
cpp
C++
darkOsRsfs/darkOsRsfs/main.cpp
JeremyWildsmith/DCPUOS
6a2b893aebf0b38317fc4e2a403ff8020c99d202
[ "MIT" ]
3
2016-04-09T10:44:26.000Z
2018-09-29T08:34:52.000Z
darkOsRsfs/darkOsRsfs/main.cpp
ProjectStation13/DCPUOS
6a2b893aebf0b38317fc4e2a403ff8020c99d202
[ "MIT" ]
2
2017-06-24T06:37:21.000Z
2017-06-28T03:02:25.000Z
darkOsRsfs/darkOsRsfs/main.cpp
JeremyWildsmith/DCPUOS
6a2b893aebf0b38317fc4e2a403ff8020c99d202
[ "MIT" ]
1
2021-06-25T17:21:00.000Z
2021-06-25T17:21:00.000Z
// darkOsRsfs.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "DirectoryEntry.h" #include "FormattingException.h" #include "RsfsFormatter.h" #include "LafsFormatter.h" #include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <memory> #include <Windows.h> using namespace DarkOsFormat; void printUsage() { std::cout<<"Filesystem Image Creater."<<std::endl; std::cout<<"Written By Jeremy (0x10cforum.com)"<<std::endl<<std::endl; std::cout<<"Usage:"<<std::endl; std::cout<<"\t [rsfs|lafs] [dest image name] [source directory path]"<<std::endl<<std::endl; } void warning(const std::string sWarning) { std::cout<<"[WARNING] : "<<sWarning<<std::endl; } DirectoryEntry findFiles(const std::string sSourcePath, const std::string sDirName) { WIN32_FIND_DATAA fileDataBuffer; DirectoryEntry curDirectory(sDirName); HANDLE hFile = FindFirstFileA((sSourcePath + std::string("*")).c_str(), &fileDataBuffer); if(hFile == INVALID_HANDLE_VALUE) { if(GetLastError() != ERROR_FILE_NOT_FOUND) throw FormattingException(std::string("Invalid or inaccessible directory path: ").append(sSourcePath)); return curDirectory; } do { std::string sCurrentFileName = std::string(fileDataBuffer.cFileName); if(fileDataBuffer.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { //Avoid the . and .. directories (parent directory, and current directory description.) if(sCurrentFileName.find_first_of(".") != std::string::npos) continue; std::string sSubPath = std::string(std::string(fileDataBuffer.cFileName)); curDirectory.addDirectory(findFiles(sSourcePath + sSubPath + "\\", sSubPath)); }else { if(fileDataBuffer.nFileSizeHigh || fileDataBuffer.nFileSizeLow > 0xFFFF) warning(std::string("Skipped file, too large: ").append(std::string(fileDataBuffer.cFileName))); else curDirectory.addFile(FileEntry(sSourcePath + sCurrentFileName, sCurrentFileName, static_cast<WORD>(fileDataBuffer.nFileSizeLow))); } }while(FindNextFile(hFile, &fileDataBuffer)); FindClose(hFile); return curDirectory; } int _tmain(int argc, char* argv[]) { printUsage(); try { if(argc != 4) throw FormattingException("Invalid number of arguments. Please read usage."); std::auto_ptr<IFormatter> pFormatter(0); if(!strcmp(argv[1], "rsfs")) pFormatter = std::auto_ptr<IFormatter>(new RsfsFormatter()); else if(!strcmp(argv[1], "lafs")) pFormatter = std::auto_ptr<IFormatter>(new LafsFormatter()); else throw FormattingException("Unknown formatter specified."); std::string sSourcePath(argv[3]); std::cout<<"Creating image, with source as: "<<sSourcePath<<std::endl; if(sSourcePath.find_first_of('\\') != sSourcePath.length() - 1) sSourcePath += std::string("\\"); std::vector<DirectoryEntry> dirList; DirectoryEntry rootDir = findFiles(sSourcePath, std::string()); std::ofstream outFile(argv[2], std::ofstream::trunc | std::ofstream::binary); if(!outFile.is_open()) throw FormattingException("Error opening output file."); pFormatter.get()->create(outFile, rootDir); std::cout<<"Image compiled successfully."; }catch(FormattingException& ex) { std::cout<<std::string("Critical error occured: ")<<ex.getReason()<<std::endl; } }
27.739496
134
0.717358
[ "vector" ]
da89eb09e7c0afc2229719d81ad8ac552d6a5f70
17,099
cpp
C++
src/parsing/httpLexer.cpp
DataDriven-CAM/sylvan-pod-server
4e3d56d18d81e890782a39b04c38cc9788c2dfb8
[ "MIT" ]
null
null
null
src/parsing/httpLexer.cpp
DataDriven-CAM/sylvan-pod-server
4e3d56d18d81e890782a39b04c38cc9788c2dfb8
[ "MIT" ]
null
null
null
src/parsing/httpLexer.cpp
DataDriven-CAM/sylvan-pod-server
4e3d56d18d81e890782a39b04c38cc9788c2dfb8
[ "MIT" ]
null
null
null
// Generated from HTTP.g4 by ANTLR 4.8 #include "httpLexer.h" using namespace antlr4; using namespace sylvanmats; httpLexer::httpLexer(CharStream *input) : Lexer(input) { _interpreter = new atn::LexerATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache); } httpLexer::~httpLexer() { delete _interpreter; } std::string httpLexer::getGrammarFileName() const { return "HTTP.g4"; } const std::vector<std::string>& httpLexer::getRuleNames() const { return _ruleNames; } const std::vector<std::string>& httpLexer::getChannelNames() const { return _channelNames; } const std::vector<std::string>& httpLexer::getModeNames() const { return _modeNames; } const std::vector<std::string>& httpLexer::getTokenNames() const { return _tokenNames; } dfa::Vocabulary& httpLexer::getVocabulary() const { return _vocabulary; } const std::vector<uint16_t> httpLexer::getSerializedATN() const { return _serializedATN; } const atn::ATN& httpLexer::getATN() const { return _atn; } // Static vars and initialization. std::vector<dfa::DFA> httpLexer::_decisionToDFA; atn::PredictionContextCache httpLexer::_sharedContextCache; // We own the ATN which in turn owns the ATN states. atn::ATN httpLexer::_atn; std::vector<uint16_t> httpLexer::_serializedATN; std::vector<std::string> httpLexer::_ruleNames = { u8"T__0", u8"T__1", u8"T__2", u8"T__3", u8"T__4", u8"T__5", u8"T__6", u8"T__7", u8"T__8", u8"SP", u8"ALPHA", u8"DIGIT", u8"Pct_encoded", u8"HEXDIG", u8"LColumn", u8"RColumn", u8"SemiColon", u8"Equals", u8"Period", u8"CRLF", u8"Minus", u8"Dot", u8"Underscore", u8"Tilde", u8"QuestionMark", u8"Slash", u8"ExclamationMark", u8"Colon", u8"At", u8"DollarSign", u8"Hashtag", u8"Ampersand", u8"Percent", u8"SQuote", u8"Star", u8"Plus", u8"Caret", u8"BackQuote", u8"VBar", u8"OWS", u8"HTAB", u8"VCHAR", u8"OBS_TEXT" }; std::vector<std::string> httpLexer::_channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; std::vector<std::string> httpLexer::_modeNames = { u8"DEFAULT_MODE" }; std::vector<std::string> httpLexer::_literalNames = { "", u8"'GET'", u8"'HEAD'", u8"'POST'", u8"'PUT'", u8"'DELETE'", u8"'CONNECT'", u8"'OPTIONS'", u8"'TRACE'", u8"'HTTP/'", u8"' '", "", "", "", "", u8"'('", u8"')'", u8"';'", u8"'='", u8"','", u8"'\n'", u8"'-'", u8"'.'", u8"'_'", u8"'~'", u8"'\u003F'", u8"'/'", u8"'!'", u8"':'", u8"'@'", u8"'$'", u8"'#'", u8"'&'", u8"'%'", u8"'''", u8"'*'", u8"'+'", u8"'^'", u8"'`'", u8"'|'", "", u8"'\t'" }; std::vector<std::string> httpLexer::_symbolicNames = { "", "", "", "", "", "", "", "", "", "", u8"SP", u8"ALPHA", u8"DIGIT", u8"Pct_encoded", u8"HEXDIG", u8"LColumn", u8"RColumn", u8"SemiColon", u8"Equals", u8"Period", u8"CRLF", u8"Minus", u8"Dot", u8"Underscore", u8"Tilde", u8"QuestionMark", u8"Slash", u8"ExclamationMark", u8"Colon", u8"At", u8"DollarSign", u8"Hashtag", u8"Ampersand", u8"Percent", u8"SQuote", u8"Star", u8"Plus", u8"Caret", u8"BackQuote", u8"VBar", u8"OWS", u8"HTAB", u8"VCHAR", u8"OBS_TEXT" }; dfa::Vocabulary httpLexer::_vocabulary(_literalNames, _symbolicNames); std::vector<std::string> httpLexer::_tokenNames; httpLexer::Initializer::Initializer() { // This code could be in a static initializer lambda, but VS doesn't allow access to private class members from there. for (size_t i = 0; i < _symbolicNames.size(); ++i) { std::string name = _vocabulary.getLiteralName(i); if (name.empty()) { name = _vocabulary.getSymbolicName(i); } if (name.empty()) { _tokenNames.push_back("<INVALID>"); } else { _tokenNames.push_back(name); } } _serializedATN = { 0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964, 0x2, 0x2d, 0xf7, 0x8, 0x1, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 0x9, 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 0x7, 0x4, 0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 0x4, 0xb, 0x9, 0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, 0xd, 0x4, 0xe, 0x9, 0xe, 0x4, 0xf, 0x9, 0xf, 0x4, 0x10, 0x9, 0x10, 0x4, 0x11, 0x9, 0x11, 0x4, 0x12, 0x9, 0x12, 0x4, 0x13, 0x9, 0x13, 0x4, 0x14, 0x9, 0x14, 0x4, 0x15, 0x9, 0x15, 0x4, 0x16, 0x9, 0x16, 0x4, 0x17, 0x9, 0x17, 0x4, 0x18, 0x9, 0x18, 0x4, 0x19, 0x9, 0x19, 0x4, 0x1a, 0x9, 0x1a, 0x4, 0x1b, 0x9, 0x1b, 0x4, 0x1c, 0x9, 0x1c, 0x4, 0x1d, 0x9, 0x1d, 0x4, 0x1e, 0x9, 0x1e, 0x4, 0x1f, 0x9, 0x1f, 0x4, 0x20, 0x9, 0x20, 0x4, 0x21, 0x9, 0x21, 0x4, 0x22, 0x9, 0x22, 0x4, 0x23, 0x9, 0x23, 0x4, 0x24, 0x9, 0x24, 0x4, 0x25, 0x9, 0x25, 0x4, 0x26, 0x9, 0x26, 0x4, 0x27, 0x9, 0x27, 0x4, 0x28, 0x9, 0x28, 0x4, 0x29, 0x9, 0x29, 0x4, 0x2a, 0x9, 0x2a, 0x4, 0x2b, 0x9, 0x2b, 0x4, 0x2c, 0x9, 0x2c, 0x3, 0x2, 0x3, 0x2, 0x3, 0x2, 0x3, 0x2, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x5, 0x3, 0x5, 0x3, 0x5, 0x3, 0x5, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x3, 0x6, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x8, 0x3, 0x9, 0x3, 0x9, 0x3, 0x9, 0x3, 0x9, 0x3, 0x9, 0x3, 0x9, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xb, 0x3, 0xb, 0x3, 0xc, 0x3, 0xc, 0x3, 0xd, 0x3, 0xd, 0x3, 0xe, 0x3, 0xe, 0x3, 0xe, 0x3, 0xe, 0x3, 0xf, 0x3, 0xf, 0x5, 0xf, 0x9b, 0xa, 0xf, 0x3, 0x10, 0x3, 0x10, 0x3, 0x11, 0x3, 0x11, 0x3, 0x12, 0x3, 0x12, 0x3, 0x13, 0x3, 0x13, 0x3, 0x14, 0x3, 0x14, 0x3, 0x15, 0x3, 0x15, 0x3, 0x16, 0x3, 0x16, 0x3, 0x17, 0x3, 0x17, 0x3, 0x18, 0x3, 0x18, 0x3, 0x19, 0x3, 0x19, 0x3, 0x1a, 0x3, 0x1a, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1c, 0x3, 0x1c, 0x3, 0x1d, 0x3, 0x1d, 0x3, 0x1e, 0x3, 0x1e, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x20, 0x3, 0x20, 0x3, 0x21, 0x3, 0x21, 0x3, 0x22, 0x3, 0x22, 0x3, 0x23, 0x3, 0x23, 0x3, 0x24, 0x3, 0x24, 0x3, 0x25, 0x3, 0x25, 0x3, 0x26, 0x3, 0x26, 0x3, 0x27, 0x3, 0x27, 0x3, 0x28, 0x3, 0x28, 0x3, 0x29, 0x3, 0x29, 0x5, 0x29, 0xd1, 0xa, 0x29, 0x3, 0x2a, 0x3, 0x2a, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x5, 0x2b, 0xf4, 0xa, 0x2b, 0x3, 0x2c, 0x3, 0x2c, 0x2, 0x2, 0x2d, 0x3, 0x3, 0x5, 0x4, 0x7, 0x5, 0x9, 0x6, 0xb, 0x7, 0xd, 0x8, 0xf, 0x9, 0x11, 0xa, 0x13, 0xb, 0x15, 0xc, 0x17, 0xd, 0x19, 0xe, 0x1b, 0xf, 0x1d, 0x10, 0x1f, 0x11, 0x21, 0x12, 0x23, 0x13, 0x25, 0x14, 0x27, 0x15, 0x29, 0x16, 0x2b, 0x17, 0x2d, 0x18, 0x2f, 0x19, 0x31, 0x1a, 0x33, 0x1b, 0x35, 0x1c, 0x37, 0x1d, 0x39, 0x1e, 0x3b, 0x1f, 0x3d, 0x20, 0x3f, 0x21, 0x41, 0x22, 0x43, 0x23, 0x45, 0x24, 0x47, 0x25, 0x49, 0x26, 0x4b, 0x27, 0x4d, 0x28, 0x4f, 0x29, 0x51, 0x2a, 0x53, 0x2b, 0x55, 0x2c, 0x57, 0x2d, 0x3, 0x2, 0x5, 0x4, 0x2, 0x43, 0x5c, 0x63, 0x7c, 0x3, 0x2, 0x32, 0x3b, 0x4, 0x2, 0x7d, 0x7d, 0x7f, 0x7f, 0x2, 0x116, 0x2, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2, 0x5, 0x3, 0x2, 0x2, 0x2, 0x2, 0x7, 0x3, 0x2, 0x2, 0x2, 0x2, 0x9, 0x3, 0x2, 0x2, 0x2, 0x2, 0xb, 0x3, 0x2, 0x2, 0x2, 0x2, 0xd, 0x3, 0x2, 0x2, 0x2, 0x2, 0xf, 0x3, 0x2, 0x2, 0x2, 0x2, 0x11, 0x3, 0x2, 0x2, 0x2, 0x2, 0x13, 0x3, 0x2, 0x2, 0x2, 0x2, 0x15, 0x3, 0x2, 0x2, 0x2, 0x2, 0x17, 0x3, 0x2, 0x2, 0x2, 0x2, 0x19, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1b, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1d, 0x3, 0x2, 0x2, 0x2, 0x2, 0x1f, 0x3, 0x2, 0x2, 0x2, 0x2, 0x21, 0x3, 0x2, 0x2, 0x2, 0x2, 0x23, 0x3, 0x2, 0x2, 0x2, 0x2, 0x25, 0x3, 0x2, 0x2, 0x2, 0x2, 0x27, 0x3, 0x2, 0x2, 0x2, 0x2, 0x29, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2b, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2d, 0x3, 0x2, 0x2, 0x2, 0x2, 0x2f, 0x3, 0x2, 0x2, 0x2, 0x2, 0x31, 0x3, 0x2, 0x2, 0x2, 0x2, 0x33, 0x3, 0x2, 0x2, 0x2, 0x2, 0x35, 0x3, 0x2, 0x2, 0x2, 0x2, 0x37, 0x3, 0x2, 0x2, 0x2, 0x2, 0x39, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3b, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3d, 0x3, 0x2, 0x2, 0x2, 0x2, 0x3f, 0x3, 0x2, 0x2, 0x2, 0x2, 0x41, 0x3, 0x2, 0x2, 0x2, 0x2, 0x43, 0x3, 0x2, 0x2, 0x2, 0x2, 0x45, 0x3, 0x2, 0x2, 0x2, 0x2, 0x47, 0x3, 0x2, 0x2, 0x2, 0x2, 0x49, 0x3, 0x2, 0x2, 0x2, 0x2, 0x4b, 0x3, 0x2, 0x2, 0x2, 0x2, 0x4d, 0x3, 0x2, 0x2, 0x2, 0x2, 0x4f, 0x3, 0x2, 0x2, 0x2, 0x2, 0x51, 0x3, 0x2, 0x2, 0x2, 0x2, 0x53, 0x3, 0x2, 0x2, 0x2, 0x2, 0x55, 0x3, 0x2, 0x2, 0x2, 0x2, 0x57, 0x3, 0x2, 0x2, 0x2, 0x3, 0x59, 0x3, 0x2, 0x2, 0x2, 0x5, 0x5d, 0x3, 0x2, 0x2, 0x2, 0x7, 0x62, 0x3, 0x2, 0x2, 0x2, 0x9, 0x67, 0x3, 0x2, 0x2, 0x2, 0xb, 0x6b, 0x3, 0x2, 0x2, 0x2, 0xd, 0x72, 0x3, 0x2, 0x2, 0x2, 0xf, 0x7a, 0x3, 0x2, 0x2, 0x2, 0x11, 0x82, 0x3, 0x2, 0x2, 0x2, 0x13, 0x88, 0x3, 0x2, 0x2, 0x2, 0x15, 0x8e, 0x3, 0x2, 0x2, 0x2, 0x17, 0x90, 0x3, 0x2, 0x2, 0x2, 0x19, 0x92, 0x3, 0x2, 0x2, 0x2, 0x1b, 0x94, 0x3, 0x2, 0x2, 0x2, 0x1d, 0x9a, 0x3, 0x2, 0x2, 0x2, 0x1f, 0x9c, 0x3, 0x2, 0x2, 0x2, 0x21, 0x9e, 0x3, 0x2, 0x2, 0x2, 0x23, 0xa0, 0x3, 0x2, 0x2, 0x2, 0x25, 0xa2, 0x3, 0x2, 0x2, 0x2, 0x27, 0xa4, 0x3, 0x2, 0x2, 0x2, 0x29, 0xa6, 0x3, 0x2, 0x2, 0x2, 0x2b, 0xa8, 0x3, 0x2, 0x2, 0x2, 0x2d, 0xaa, 0x3, 0x2, 0x2, 0x2, 0x2f, 0xac, 0x3, 0x2, 0x2, 0x2, 0x31, 0xae, 0x3, 0x2, 0x2, 0x2, 0x33, 0xb0, 0x3, 0x2, 0x2, 0x2, 0x35, 0xb2, 0x3, 0x2, 0x2, 0x2, 0x37, 0xb4, 0x3, 0x2, 0x2, 0x2, 0x39, 0xb6, 0x3, 0x2, 0x2, 0x2, 0x3b, 0xb8, 0x3, 0x2, 0x2, 0x2, 0x3d, 0xba, 0x3, 0x2, 0x2, 0x2, 0x3f, 0xbc, 0x3, 0x2, 0x2, 0x2, 0x41, 0xbe, 0x3, 0x2, 0x2, 0x2, 0x43, 0xc0, 0x3, 0x2, 0x2, 0x2, 0x45, 0xc2, 0x3, 0x2, 0x2, 0x2, 0x47, 0xc4, 0x3, 0x2, 0x2, 0x2, 0x49, 0xc6, 0x3, 0x2, 0x2, 0x2, 0x4b, 0xc8, 0x3, 0x2, 0x2, 0x2, 0x4d, 0xca, 0x3, 0x2, 0x2, 0x2, 0x4f, 0xcc, 0x3, 0x2, 0x2, 0x2, 0x51, 0xd0, 0x3, 0x2, 0x2, 0x2, 0x53, 0xd2, 0x3, 0x2, 0x2, 0x2, 0x55, 0xf3, 0x3, 0x2, 0x2, 0x2, 0x57, 0xf5, 0x3, 0x2, 0x2, 0x2, 0x59, 0x5a, 0x7, 0x49, 0x2, 0x2, 0x5a, 0x5b, 0x7, 0x47, 0x2, 0x2, 0x5b, 0x5c, 0x7, 0x56, 0x2, 0x2, 0x5c, 0x4, 0x3, 0x2, 0x2, 0x2, 0x5d, 0x5e, 0x7, 0x4a, 0x2, 0x2, 0x5e, 0x5f, 0x7, 0x47, 0x2, 0x2, 0x5f, 0x60, 0x7, 0x43, 0x2, 0x2, 0x60, 0x61, 0x7, 0x46, 0x2, 0x2, 0x61, 0x6, 0x3, 0x2, 0x2, 0x2, 0x62, 0x63, 0x7, 0x52, 0x2, 0x2, 0x63, 0x64, 0x7, 0x51, 0x2, 0x2, 0x64, 0x65, 0x7, 0x55, 0x2, 0x2, 0x65, 0x66, 0x7, 0x56, 0x2, 0x2, 0x66, 0x8, 0x3, 0x2, 0x2, 0x2, 0x67, 0x68, 0x7, 0x52, 0x2, 0x2, 0x68, 0x69, 0x7, 0x57, 0x2, 0x2, 0x69, 0x6a, 0x7, 0x56, 0x2, 0x2, 0x6a, 0xa, 0x3, 0x2, 0x2, 0x2, 0x6b, 0x6c, 0x7, 0x46, 0x2, 0x2, 0x6c, 0x6d, 0x7, 0x47, 0x2, 0x2, 0x6d, 0x6e, 0x7, 0x4e, 0x2, 0x2, 0x6e, 0x6f, 0x7, 0x47, 0x2, 0x2, 0x6f, 0x70, 0x7, 0x56, 0x2, 0x2, 0x70, 0x71, 0x7, 0x47, 0x2, 0x2, 0x71, 0xc, 0x3, 0x2, 0x2, 0x2, 0x72, 0x73, 0x7, 0x45, 0x2, 0x2, 0x73, 0x74, 0x7, 0x51, 0x2, 0x2, 0x74, 0x75, 0x7, 0x50, 0x2, 0x2, 0x75, 0x76, 0x7, 0x50, 0x2, 0x2, 0x76, 0x77, 0x7, 0x47, 0x2, 0x2, 0x77, 0x78, 0x7, 0x45, 0x2, 0x2, 0x78, 0x79, 0x7, 0x56, 0x2, 0x2, 0x79, 0xe, 0x3, 0x2, 0x2, 0x2, 0x7a, 0x7b, 0x7, 0x51, 0x2, 0x2, 0x7b, 0x7c, 0x7, 0x52, 0x2, 0x2, 0x7c, 0x7d, 0x7, 0x56, 0x2, 0x2, 0x7d, 0x7e, 0x7, 0x4b, 0x2, 0x2, 0x7e, 0x7f, 0x7, 0x51, 0x2, 0x2, 0x7f, 0x80, 0x7, 0x50, 0x2, 0x2, 0x80, 0x81, 0x7, 0x55, 0x2, 0x2, 0x81, 0x10, 0x3, 0x2, 0x2, 0x2, 0x82, 0x83, 0x7, 0x56, 0x2, 0x2, 0x83, 0x84, 0x7, 0x54, 0x2, 0x2, 0x84, 0x85, 0x7, 0x43, 0x2, 0x2, 0x85, 0x86, 0x7, 0x45, 0x2, 0x2, 0x86, 0x87, 0x7, 0x47, 0x2, 0x2, 0x87, 0x12, 0x3, 0x2, 0x2, 0x2, 0x88, 0x89, 0x7, 0x4a, 0x2, 0x2, 0x89, 0x8a, 0x7, 0x56, 0x2, 0x2, 0x8a, 0x8b, 0x7, 0x56, 0x2, 0x2, 0x8b, 0x8c, 0x7, 0x52, 0x2, 0x2, 0x8c, 0x8d, 0x7, 0x31, 0x2, 0x2, 0x8d, 0x14, 0x3, 0x2, 0x2, 0x2, 0x8e, 0x8f, 0x7, 0x22, 0x2, 0x2, 0x8f, 0x16, 0x3, 0x2, 0x2, 0x2, 0x90, 0x91, 0x9, 0x2, 0x2, 0x2, 0x91, 0x18, 0x3, 0x2, 0x2, 0x2, 0x92, 0x93, 0x9, 0x3, 0x2, 0x2, 0x93, 0x1a, 0x3, 0x2, 0x2, 0x2, 0x94, 0x95, 0x5, 0x43, 0x22, 0x2, 0x95, 0x96, 0x5, 0x1d, 0xf, 0x2, 0x96, 0x97, 0x5, 0x1d, 0xf, 0x2, 0x97, 0x1c, 0x3, 0x2, 0x2, 0x2, 0x98, 0x9b, 0x5, 0x19, 0xd, 0x2, 0x99, 0x9b, 0x4, 0x43, 0x48, 0x2, 0x9a, 0x98, 0x3, 0x2, 0x2, 0x2, 0x9a, 0x99, 0x3, 0x2, 0x2, 0x2, 0x9b, 0x1e, 0x3, 0x2, 0x2, 0x2, 0x9c, 0x9d, 0x7, 0x2a, 0x2, 0x2, 0x9d, 0x20, 0x3, 0x2, 0x2, 0x2, 0x9e, 0x9f, 0x7, 0x2b, 0x2, 0x2, 0x9f, 0x22, 0x3, 0x2, 0x2, 0x2, 0xa0, 0xa1, 0x7, 0x3d, 0x2, 0x2, 0xa1, 0x24, 0x3, 0x2, 0x2, 0x2, 0xa2, 0xa3, 0x7, 0x3f, 0x2, 0x2, 0xa3, 0x26, 0x3, 0x2, 0x2, 0x2, 0xa4, 0xa5, 0x7, 0x2e, 0x2, 0x2, 0xa5, 0x28, 0x3, 0x2, 0x2, 0x2, 0xa6, 0xa7, 0x7, 0xc, 0x2, 0x2, 0xa7, 0x2a, 0x3, 0x2, 0x2, 0x2, 0xa8, 0xa9, 0x7, 0x2f, 0x2, 0x2, 0xa9, 0x2c, 0x3, 0x2, 0x2, 0x2, 0xaa, 0xab, 0x7, 0x30, 0x2, 0x2, 0xab, 0x2e, 0x3, 0x2, 0x2, 0x2, 0xac, 0xad, 0x7, 0x61, 0x2, 0x2, 0xad, 0x30, 0x3, 0x2, 0x2, 0x2, 0xae, 0xaf, 0x7, 0x80, 0x2, 0x2, 0xaf, 0x32, 0x3, 0x2, 0x2, 0x2, 0xb0, 0xb1, 0x7, 0x41, 0x2, 0x2, 0xb1, 0x34, 0x3, 0x2, 0x2, 0x2, 0xb2, 0xb3, 0x7, 0x31, 0x2, 0x2, 0xb3, 0x36, 0x3, 0x2, 0x2, 0x2, 0xb4, 0xb5, 0x7, 0x23, 0x2, 0x2, 0xb5, 0x38, 0x3, 0x2, 0x2, 0x2, 0xb6, 0xb7, 0x7, 0x3c, 0x2, 0x2, 0xb7, 0x3a, 0x3, 0x2, 0x2, 0x2, 0xb8, 0xb9, 0x7, 0x42, 0x2, 0x2, 0xb9, 0x3c, 0x3, 0x2, 0x2, 0x2, 0xba, 0xbb, 0x7, 0x26, 0x2, 0x2, 0xbb, 0x3e, 0x3, 0x2, 0x2, 0x2, 0xbc, 0xbd, 0x7, 0x25, 0x2, 0x2, 0xbd, 0x40, 0x3, 0x2, 0x2, 0x2, 0xbe, 0xbf, 0x7, 0x28, 0x2, 0x2, 0xbf, 0x42, 0x3, 0x2, 0x2, 0x2, 0xc0, 0xc1, 0x7, 0x27, 0x2, 0x2, 0xc1, 0x44, 0x3, 0x2, 0x2, 0x2, 0xc2, 0xc3, 0x7, 0x29, 0x2, 0x2, 0xc3, 0x46, 0x3, 0x2, 0x2, 0x2, 0xc4, 0xc5, 0x7, 0x2c, 0x2, 0x2, 0xc5, 0x48, 0x3, 0x2, 0x2, 0x2, 0xc6, 0xc7, 0x7, 0x2d, 0x2, 0x2, 0xc7, 0x4a, 0x3, 0x2, 0x2, 0x2, 0xc8, 0xc9, 0x7, 0x60, 0x2, 0x2, 0xc9, 0x4c, 0x3, 0x2, 0x2, 0x2, 0xca, 0xcb, 0x7, 0x62, 0x2, 0x2, 0xcb, 0x4e, 0x3, 0x2, 0x2, 0x2, 0xcc, 0xcd, 0x7, 0x7e, 0x2, 0x2, 0xcd, 0x50, 0x3, 0x2, 0x2, 0x2, 0xce, 0xd1, 0x5, 0x15, 0xb, 0x2, 0xcf, 0xd1, 0x5, 0x53, 0x2a, 0x2, 0xd0, 0xce, 0x3, 0x2, 0x2, 0x2, 0xd0, 0xcf, 0x3, 0x2, 0x2, 0x2, 0xd1, 0x52, 0x3, 0x2, 0x2, 0x2, 0xd2, 0xd3, 0x7, 0xb, 0x2, 0x2, 0xd3, 0x54, 0x3, 0x2, 0x2, 0x2, 0xd4, 0xf4, 0x5, 0x37, 0x1c, 0x2, 0xd5, 0xf4, 0x7, 0x24, 0x2, 0x2, 0xd6, 0xf4, 0x5, 0x3f, 0x20, 0x2, 0xd7, 0xf4, 0x5, 0x3d, 0x1f, 0x2, 0xd8, 0xf4, 0x5, 0x43, 0x22, 0x2, 0xd9, 0xf4, 0x5, 0x41, 0x21, 0x2, 0xda, 0xf4, 0x5, 0x45, 0x23, 0x2, 0xdb, 0xf4, 0x5, 0x1f, 0x10, 0x2, 0xdc, 0xf4, 0x5, 0x21, 0x11, 0x2, 0xdd, 0xf4, 0x5, 0x21, 0x11, 0x2, 0xde, 0xf4, 0x5, 0x47, 0x24, 0x2, 0xdf, 0xf4, 0x5, 0x49, 0x25, 0x2, 0xe0, 0xf4, 0x5, 0x27, 0x14, 0x2, 0xe1, 0xf4, 0x5, 0x2b, 0x16, 0x2, 0xe2, 0xf4, 0x5, 0x2d, 0x17, 0x2, 0xe3, 0xf4, 0x5, 0x35, 0x1b, 0x2, 0xe4, 0xf4, 0x5, 0x39, 0x1d, 0x2, 0xe5, 0xf4, 0x5, 0x23, 0x12, 0x2, 0xe6, 0xf4, 0x7, 0x3e, 0x2, 0x2, 0xe7, 0xf4, 0x5, 0x25, 0x13, 0x2, 0xe8, 0xf4, 0x7, 0x40, 0x2, 0x2, 0xe9, 0xf4, 0x5, 0x33, 0x1a, 0x2, 0xea, 0xf4, 0x5, 0x3b, 0x1e, 0x2, 0xeb, 0xf4, 0x4, 0x5d, 0x5e, 0x2, 0xec, 0xf4, 0x5, 0x4b, 0x26, 0x2, 0xed, 0xf4, 0x5, 0x2f, 0x18, 0x2, 0xee, 0xf4, 0x7, 0x5f, 0x2, 0x2, 0xef, 0xf4, 0x5, 0x4d, 0x27, 0x2, 0xf0, 0xf4, 0x9, 0x4, 0x2, 0x2, 0xf1, 0xf4, 0x5, 0x4f, 0x28, 0x2, 0xf2, 0xf4, 0x5, 0x31, 0x19, 0x2, 0xf3, 0xd4, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xd5, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xd6, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xd7, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xd8, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xd9, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xda, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xdb, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xdc, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xdd, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xde, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xdf, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe0, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe1, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe2, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe3, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe4, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe5, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe6, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe7, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe8, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xe9, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xea, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xeb, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xec, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xed, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xee, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xef, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xf0, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xf1, 0x3, 0x2, 0x2, 0x2, 0xf3, 0xf2, 0x3, 0x2, 0x2, 0x2, 0xf4, 0x56, 0x3, 0x2, 0x2, 0x2, 0xf5, 0xf6, 0x4, 0x82, 0x101, 0x2, 0xf6, 0x58, 0x3, 0x2, 0x2, 0x2, 0x6, 0x2, 0x9a, 0xd0, 0xf3, 0x2, }; atn::ATNDeserializer deserializer; _atn = deserializer.deserialize(_serializedATN); size_t count = _atn.getNumberOfDecisions(); _decisionToDFA.reserve(count); for (size_t i = 0; i < count; i++) { _decisionToDFA.emplace_back(_atn.getDecisionState(i), i); } } httpLexer::Initializer httpLexer::_init;
55.516234
120
0.601965
[ "vector" ]