hexsha
stringlengths
40
40
size
int64
7
1.05M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
269
max_stars_repo_name
stringlengths
5
108
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
int64
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
4
269
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
9
max_issues_count
int64
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
4
269
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
9
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
7
1.05M
avg_line_length
float64
1.21
330k
max_line_length
int64
6
990k
alphanum_fraction
float64
0.01
0.99
author_id
stringlengths
2
40
a68f0e6bd1de89dc081a4f309db3b7bf99110e6a
311
hpp
C++
include/pkg/path_not_a_directory_error.hpp
naughtybikergames/pkg
9a78380c6cf82c95dec3968a7ed69000b349113d
[ "MIT" ]
null
null
null
include/pkg/path_not_a_directory_error.hpp
naughtybikergames/pkg
9a78380c6cf82c95dec3968a7ed69000b349113d
[ "MIT" ]
null
null
null
include/pkg/path_not_a_directory_error.hpp
naughtybikergames/pkg
9a78380c6cf82c95dec3968a7ed69000b349113d
[ "MIT" ]
null
null
null
#ifndef PKG_PATH_NOT_A_DIRECTORY_ERROR_HPP #define PKG_PATH_NOT_A_DIRECTORY_ERROR_HPP #include "pkg_error.hpp" #include <string> namespace pkg { class path_not_a_directory_error : public pkg_error { public: path_not_a_directory_error(const std::string &path) throw(); }; } #endif
20.733333
72
0.73955
naughtybikergames
a69085a5f775e36aab2a0e12556d04173546c449
4,576
cc
C++
plugins/jml/jml/binary_symmetric.cc
kstepanmpmg/mldb
f78791cd34d01796705c0f173a14359ec1b2e021
[ "Apache-2.0" ]
665
2015-12-09T17:00:14.000Z
2022-03-25T07:46:46.000Z
plugins/jml/jml/binary_symmetric.cc
tomzhang/mldb
a09cf2d9ca454d1966b9e49ae69f2fe6bf571494
[ "Apache-2.0" ]
797
2015-12-09T19:48:19.000Z
2022-03-07T02:19:47.000Z
plugins/jml/jml/binary_symmetric.cc
matebestek/mldb
f78791cd34d01796705c0f173a14359ec1b2e021
[ "Apache-2.0" ]
103
2015-12-25T04:39:29.000Z
2022-02-03T02:55:22.000Z
// This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. /* binary_symmetric.cc Jeremy Barnes, 17 March 2006 Copyright (c) 2006 Jeremy Barnes. All rights reserved. $Source$ Functions to deal with binary symmetric data. */ #include "binary_symmetric.h" #include "training_data.h" #include "training_index.h" #include "mldb/plugins/jml/multi_array_utils.h" using namespace std; namespace ML { bool convert_bin_sym(boost::multi_array<float, 2> & weights, const Training_Data & data, const Feature & predicted, const vector<Feature> & features) { /* If we have a binary symmetric problem, then we reduce the weights down to just one column, since the second column would be the same as the first one. The bin_sym flag is true when all of the label weights will have the same value. This is only generally true in the binary classification case. It will be false when: 1. We learn a stump which updates the weights where */ int nl = data.label_count(predicted); bool bin_sym = false; int nx = weights.shape()[0]; //cerr << "convert_bin_sym" << endl; //cerr << "nl = " << nl << " nx = " << nx << endl; //cerr << "bin_sym: input: weights.shape()[1] = " // << weights.shape()[1] << endl; if (nl == 2) { bin_sym = true; /* Look at all of these features. If any don't have exactly_one true, then we are not binary symmetric. */ for (unsigned i = 0; i < features.size(); ++i) { if (!data.index().only_one(features[i])) { //cerr << "false due to feature " // << data.feature_space()->print(features[i]) // << endl; bin_sym = false; break; } } if (!bin_sym && weights.shape()[1] == 1) { /* Not bin sym for these features... expand them. */ //cerr << "expanding" << endl; boost::multi_array<float, 2> new_weights(boost::extents[nx][2]); for (unsigned x = 0; x < nx; ++x) new_weights[x][0] = new_weights[x][1] = weights[x][0]; swap_multi_arrays(weights, new_weights); } else if (bin_sym && weights.shape()[1] == 2) { for (unsigned x = 0; x < nx; ++x) { bin_sym = true; if (weights[x][0] != weights[x][1]) { bin_sym = false; //cerr << "false due to unequal weights " << endl; break; } } /* If we are binary symmetric, then we can reduce our weights array. */ if (bin_sym) { boost::multi_array<float, 2> new_weights(boost::extents[nx][1]); for (unsigned x = 0; x < nx; ++x) new_weights[x][0] = weights[x][0]; swap_multi_arrays(weights, new_weights); } } } //cerr << "bin_sym: returned " << bin_sym << " weights.shape()[1] = " // << weights.shape()[1] << endl; return bin_sym; } bool is_bin_sym(const boost::multi_array<float, 2> & weights, const Training_Data & data, const Feature & predicted, const vector<Feature> & features) { /* If we have a binary symmetric problem, then we reduce the weights down to just one column, since the second column would be the same as the first one. */ int nl = data.label_count(predicted); bool bin_sym = false; int nx = weights.shape()[0]; //cerr << "is_bin_sym" << endl; //cerr << "nl = " << nl << " nx = " << nx << endl; if (nl == 2) { if (weights.shape()[1] == 1) bin_sym = true; /* Look at all of these features. If any don't have exactly_one true, then we are not binary symmetric. */ for (unsigned i = 0; i < features.size(); ++i) { if (!data.index().only_one(features[i])) { bin_sym = false; break; } } if (bin_sym && weights.shape()[1] == 2) { for (unsigned x = 0; x < nx; ++x) { bin_sym = true; if (weights[x][0] != weights[x][1]) { bin_sym = false; break; } } } } //cerr << "is_bin_sym: returning " << bin_sym << endl; return bin_sym; } } // namespace ML
31.129252
84
0.513549
kstepanmpmg
a6919b45fc4615fc61c7921923382d38a0b13487
5,299
hpp
C++
src/allocator.hpp
Zoxc/mirb
14c2fe2d2a026fb3bb62c883e8839e1078ebc3b6
[ "BSD-3-Clause" ]
10
2016-10-06T06:22:20.000Z
2022-02-28T05:33:09.000Z
src/allocator.hpp
Zoxc/mirb
14c2fe2d2a026fb3bb62c883e8839e1078ebc3b6
[ "BSD-3-Clause" ]
null
null
null
src/allocator.hpp
Zoxc/mirb
14c2fe2d2a026fb3bb62c883e8839e1078ebc3b6
[ "BSD-3-Clause" ]
3
2018-01-08T03:34:34.000Z
2021-09-12T12:12:22.000Z
#pragma once #include "common.hpp" #include <Prelude/Allocator.hpp> #include <Prelude/LinkedList.hpp> #include "value.hpp" namespace Mirb { class Collector; // PinnedHeader are objects with a fixed memory address class PinnedHeader: public Value { private: #ifndef VALGRIND LinkedListEntry<PinnedHeader> entry; #endif friend class Collector; public: PinnedHeader(Type::Enum type) : Value(type) {} }; class VariableBlock: public PinnedHeader { private: public: VariableBlock(size_t bytes) : PinnedHeader(Type::InternalVariableBlock), bytes(bytes) {} static VariableBlock &from_memory(const void *memory) { auto result = (VariableBlock *)((const char_t *)memory - sizeof(VariableBlock)); result->assert_alive(); mirb_debug_assert(result->type() == Type::InternalVariableBlock); return *result; } void *data() { return (void *)((size_t)this + sizeof(VariableBlock)); } size_t bytes; template<typename F> void mark(F) { } }; class TupleBase { static Tuple<Value> *allocate_value_tuple(size_t size); static Tuple<Object> *allocate_tuple(size_t size); template<class T> friend struct TupleUtil; }; template<class T> struct TupleUtil { static const Type::Enum type = Type::InternalTuple; template<typename F> static void mark(F mark, T *&field) { if(field) mark(field); } static Tuple<T> *allocate(size_t size) { return (Tuple<T> *)TupleBase::allocate_tuple(size); } }; template<> struct TupleUtil<Value> { static const Type::Enum type = Type::InternalValueTuple; template<typename F> static void mark(F mark, Value *&field) { mark(field); } static Tuple<> *allocate(size_t size) { return TupleBase::allocate_value_tuple(size); } }; template<class T> class Tuple: public PinnedHeader { private: public: Tuple(size_t entries) : PinnedHeader(TupleUtil<T>::type), entries(entries) {} T *&operator[](size_t index) { #ifdef DEBUG if(this) mirb_debug_assert(index < entries); #endif return ((T **)((size_t)this + sizeof(Tuple)))[index]; } size_t entries; template<typename F> void mark(F mark) { for(size_t i = 0; i < entries; ++i) TupleUtil<T>::mark(mark, (*this)[i]); } Tuple *copy_and_prepend(T *value) { Tuple *result = allocate(entries + 1); for(size_t i = 0; i < entries; ++i) (*result)[i + 1] = (*this)[i]; (*result)[0] = value; return result; } T *first() { mirb_debug_assert(entries > 0); return (*this)[0]; } T *last() { mirb_debug_assert(entries > 0); return (*this)[entries - 1]; } static Tuple *allocate(size_t size) { return TupleUtil<T>::allocate(size); } }; typedef Prelude::Allocator::Standard AllocatorBase; class AllocatorPrivate { template<typename T> static Tuple<T> *allocate_tuple(size_t size); template<class A, class BaseAllocator> friend class Allocator; template<class T> struct Null { static const T value; }; }; template<> struct AllocatorPrivate::Null<value_t> { static const value_t value; }; template<class T> const T AllocatorPrivate::Null<T>::value = nullptr; template<class A, class BaseAllocator> class Allocator: public BaseAllocator::ReferenceBase { public: typedef BaseAllocator Base; typename Base::Reference reference() { return Base::default_reference; } static const bool null_references = true; typedef typename std::iterator_traits<A>::value_type ArrayBase; typedef Tuple<ArrayBase> TupleObj; class Storage { private: Storage(TupleObj *array) : array(array) {} friend class Allocator; public: TupleObj *array; Storage() { #ifdef DEBUG array = nullptr; #endif } Storage &operator =(decltype(nullptr) null prelude_unused) { mirb_debug_assert(null == nullptr); array = nullptr; return *this; } Storage &operator =(const Storage &other) { array = other.array; return *this; } operator bool() const { return array != 0; } A &operator [](size_t index) const { return (*array)[index]; } }; Allocator(typename Base::Reference = Base::default_reference) {} Allocator(const Allocator &) {} void null(A &ref) { ref = AllocatorPrivate::Null<A>::value; } Storage allocate(size_t size) { TupleObj &result = *TupleObj::allocate(size); for(size_t i = 0; i < size; ++i) result[i] = AllocatorPrivate::Null<A>::value; return Storage(&result); } Storage reallocate(const Storage &old, size_t old_size, size_t new_size) { TupleObj &result = *TupleObj::allocate(new_size); for(size_t i = 0; i < old_size; ++i) result[i] = (*old.array)[i]; for(size_t i = old_size; i < new_size; ++i) result[i] = AllocatorPrivate::Null<A>::value; return Storage(&result); } void free(const Storage &) {} }; extern Collector &collector; }; void *operator new(size_t bytes, Mirb::Collector &) throw(); void operator delete(void *, Mirb::Collector &) throw();
19.553506
91
0.628609
Zoxc
a693329ed8fec9fb0139ded22af46cc6556aabb3
628,759
cpp
C++
iOS/Classes/Native/Bulk_UnityEngine.UI_1.cpp
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "MIT" ]
11
2016-07-22T19:58:09.000Z
2021-09-21T12:51:40.000Z
iOS/Classes/Native/Bulk_UnityEngine.UI_1.cpp
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "MIT" ]
1
2018-05-07T14:32:13.000Z
2018-05-08T09:15:30.000Z
iOS/Classes/Native/Bulk_UnityEngine.UI_1.cpp
mopsicus/unity-share-plugin-ios-android
3ee99aef36034a1e4d7b156172953f9b4dfa696f
[ "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> // UnityEngine.UI.MaskableGraphic struct MaskableGraphic_t3186046376; // UnityEngine.UI.MaskableGraphic/CullStateChangedEvent struct CullStateChangedEvent_t2290505109; // UnityEngine.Material struct Material_t3870600107; // UnityEngine.UI.Mask struct Mask_t8826680; // System.Object struct Il2CppObject; // UnityEngine.RectTransform struct RectTransform_t972643934; // UnityEngine.UI.MaskUtilities struct MaskUtilities_t3879688356; // UnityEngine.Component struct Component_t3501516275; // System.Collections.Generic.List`1<UnityEngine.Component> struct List_1_t574734531; // System.Collections.Generic.List`1<System.Object> struct List_1_t1244034627; // UnityEngine.Transform struct Transform_t1659122786; // System.Collections.Generic.List`1<UnityEngine.Canvas> struct List_1_t4095326316; // System.Collections.Generic.List`1<UnityEngine.UI.Mask> struct List_1_t1377012232; // UnityEngine.UI.RectMask2D struct RectMask2D_t3357079374; // UnityEngine.UI.IClippable struct IClippable_t502791197; // System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D> struct List_1_t430297630; // UnityEngine.Object struct Object_t3071478659; // UnityEngine.UI.Selectable struct Selectable_t1885181538; // UnityEngine.UI.Outline struct Outline_t3745177896; // UnityEngine.UI.VertexHelper struct VertexHelper_t3377436606; // UnityEngine.UI.PositionAsUV1 struct PositionAsUV1_t4062429115; // UnityEngine.UI.RawImage struct RawImage_t821930207; // UnityEngine.Texture struct Texture_t2526458961; // UnityEngine.UI.RectangularVertexClipper struct RectangularVertexClipper_t1294793591; // UnityEngine.Canvas struct Canvas_t2727140764; // UnityEngine.Camera struct Camera_t2727095145; // UnityEngine.UI.Scrollbar struct Scrollbar_t2601556940; // UnityEngine.UI.Scrollbar/ScrollEvent struct ScrollEvent_t3541123425; // UnityEngine.EventSystems.PointerEventData struct PointerEventData_t1848751023; // System.Collections.IEnumerator struct IEnumerator_t3464575207; // UnityEngine.EventSystems.AxisEventData struct AxisEventData_t3355659985; // UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5 struct U3CClickRepeatU3Ec__Iterator5_t99988271; // UnityEngine.UI.ScrollRect struct ScrollRect_t3606982749; // UnityEngine.UI.ScrollRect/ScrollRectEvent struct ScrollRectEvent_t1643322606; // System.Collections.Generic.List`1<UnityEngine.UI.Selectable> struct List_1_t3253367090; // UnityEngine.UI.AnimationTriggers struct AnimationTriggers_t115197445; // UnityEngine.UI.Graphic struct Graphic_t836799438; // UnityEngine.UI.Image struct Image_t538875265; // UnityEngine.Animator struct Animator_t2776330603; // System.Collections.Generic.List`1<UnityEngine.CanvasGroup> struct List_1_t775636365; // UnityEngine.Sprite struct Sprite_t3199167241; // System.String struct String_t; // UnityEngine.EventSystems.BaseEventData struct BaseEventData_t2054899105; // UnityEngine.UI.Shadow struct Shadow_t75537580; // System.Collections.Generic.List`1<UnityEngine.UIVertex> struct List_1_t1317283468; // UnityEngine.UI.Slider struct Slider_t79469677; // UnityEngine.UI.Slider/SliderEvent struct SliderEvent_t2627072750; // UnityEngine.UI.StencilMaterial/MatEntry struct MatEntry_t1574154081; // UnityEngine.UI.Text struct Text_t9039225; // UnityEngine.TextGenerator struct TextGenerator_t538854556; // UnityEngine.Font struct Font_t4241557075; // UnityEngine.UI.Toggle struct Toggle_t110812896; // UnityEngine.UI.ToggleGroup struct ToggleGroup_t1990156785; // UnityEngine.UI.Toggle/ToggleEvent struct ToggleEvent_t2331340366; // System.Collections.Generic.IEnumerable`1<UnityEngine.UI.Toggle> struct IEnumerable_1_t3411725853; // System.Func`2<UnityEngine.UI.Toggle,System.Boolean> struct Func_2_t3137578243; // System.Collections.Generic.IEnumerable`1<System.Object> struct IEnumerable_1_t3176762032; // System.Func`2<System.Object,System.Boolean> struct Func_2_t785513668; // UnityEngine.Mesh struct Mesh_t4241756145; // UnityEngine.UIVertex[] struct UIVertexU5BU5D_t1796391381; // System.Collections.Generic.List`1<System.Int32> struct List_1_t2522024052; // UnityEngine.UI.VerticalLayoutGroup struct VerticalLayoutGroup_t423167365; #include "class-internals.h" #include "codegen/il2cpp-codegen.h" #include "mscorlib_System_Array1146569071.h" #include "UnityEngine_UI_UnityEngine_UI_MaskableGraphic3186046376.h" #include "UnityEngine_UI_UnityEngine_UI_MaskableGraphic3186046376MethodDeclarations.h" #include "mscorlib_System_Void2863195528.h" #include "UnityEngine_UI_UnityEngine_UI_MaskableGraphic_Cull2290505109MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Graphic836799438MethodDeclarations.h" #include "mscorlib_System_Boolean476798718.h" #include "UnityEngine_UI_UnityEngine_UI_MaskableGraphic_Cull2290505109.h" #include "UnityEngine_ArrayTypes.h" #include "UnityEngine_UnityEngine_Vector34282066566.h" #include "UnityEngine_UI_UnityEngine_UI_Graphic836799438.h" #include "UnityEngine_UnityEngine_Material3870600107.h" #include "UnityEngine_UnityEngine_Component3501516275MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_MaskUtilities3879688356MethodDeclarations.h" #include "UnityEngine_UnityEngine_Object3071478659MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_StencilMaterial639665897MethodDeclarations.h" #include "UnityEngine_UnityEngine_Transform1659122786.h" #include "mscorlib_System_Int321153838500.h" #include "UnityEngine_UI_UnityEngine_UI_Mask8826680.h" #include "UnityEngine_UnityEngine_Component3501516275.h" #include "UnityEngine_UnityEngine_Object3071478659.h" #include "UnityEngine_UnityEngine_Rendering_StencilOp3324967291.h" #include "UnityEngine_UnityEngine_Rendering_CompareFunction2661816155.h" #include "UnityEngine_UnityEngine_Rendering_ColorWriteMask3214369688.h" #include "UnityEngine_UnityEngine_Rect4241904616.h" #include "UnityEngine_UnityEngine_CanvasRenderer3950887807MethodDeclarations.h" #include "UnityEngine_UnityEngine_Rect4241904616MethodDeclarations.h" #include "UnityEngine_UnityEngine_CanvasRenderer3950887807.h" #include "UnityEngine_UnityEngine_Events_UnityEvent_1_gen663396231MethodDeclarations.h" #include "UnityEngine_UnityEngine_Behaviour200106419MethodDeclarations.h" #include "UnityEngine_UnityEngine_RectTransform972643934MethodDeclarations.h" #include "UnityEngine_UnityEngine_Canvas2727140764MethodDeclarations.h" #include "UnityEngine_UnityEngine_Transform1659122786MethodDeclarations.h" #include "UnityEngine_UnityEngine_Canvas2727140764.h" #include "UnityEngine_UnityEngine_RectTransform972643934.h" #include "mscorlib_System_Single4291918972.h" #include "UnityEngine_UI_UnityEngine_UI_RectMask2D3357079374MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_RectMask2D3357079374.h" #include "UnityEngine_UI_UnityEngine_EventSystems_UIBehaviou2511441271MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_EventSystems_UIBehaviou2511441271.h" #include "UnityEngine_UI_UnityEngine_UI_MaskUtilities3879688356.h" #include "mscorlib_System_Object4170816371MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen2599153559MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen574734531MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen574734531.h" #include "UnityEngine_UnityEngine_GameObject3674682005.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen1824778048MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen4095326316MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen4095326316.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen3401431260MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1377012232MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Mask8826680MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1377012232.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen2454716658MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen430297630MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen430297630.h" #include "UnityEngine_UI_UnityEngine_UI_Misc8834360.h" #include "UnityEngine_UI_UnityEngine_UI_Misc8834360MethodDeclarations.h" #include "UnityEngine_UnityEngine_Application2856536070MethodDeclarations.h" #include "UnityEngine_UnityEngine_GameObject3674682005MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Navigation1108456480.h" #include "UnityEngine_UI_UnityEngine_UI_Navigation1108456480MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Navigation_Mode356329147.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable1885181538.h" #include "UnityEngine_UI_UnityEngine_UI_Navigation_Mode356329147MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Outline3745177896.h" #include "UnityEngine_UI_UnityEngine_UI_Outline3745177896MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Shadow75537580MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_VertexHelper3377436606.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen3341702496MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_VertexHelper3377436606MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1317283468MethodDeclarations.h" #include "UnityEngine_UnityEngine_Color32598853688MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1317283468.h" #include "UnityEngine_UnityEngine_Vector24282066565.h" #include "UnityEngine_UnityEngine_Color4194546905.h" #include "UnityEngine_UnityEngine_Color32598853688.h" #include "UnityEngine_UI_UnityEngine_UI_PositionAsUV14062429115.h" #include "UnityEngine_UI_UnityEngine_UI_PositionAsUV14062429115MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_BaseMeshEffect2306480155MethodDeclarations.h" #include "UnityEngine_UnityEngine_Vector24282066565MethodDeclarations.h" #include "UnityEngine_UnityEngine_UIVertex4244065212.h" #include "UnityEngine_UI_UnityEngine_UI_RawImage821930207.h" #include "UnityEngine_UI_UnityEngine_UI_RawImage821930207MethodDeclarations.h" #include "UnityEngine_UnityEngine_Texture2526458961.h" #include "UnityEngine_UnityEngine_Material3870600107MethodDeclarations.h" #include "UnityEngine_UnityEngine_Texture2D3884108195.h" #include "UnityEngine_UnityEngine_Mathf4203372500MethodDeclarations.h" #include "UnityEngine_UnityEngine_Texture2526458961MethodDeclarations.h" #include "UnityEngine_UnityEngine_Vector44282066567MethodDeclarations.h" #include "UnityEngine_UnityEngine_Vector34282066566MethodDeclarations.h" #include "UnityEngine_UnityEngine_Vector44282066567.h" #include "UnityEngine_UI_UnityEngine_UI_RectangularVertexCli1294793591.h" #include "UnityEngine_UI_UnityEngine_UI_RectangularVertexCli1294793591MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1870976749MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1870976749.h" #include "UnityEngine_UI_UnityEngine_UI_ClipperRegistry1074114320MethodDeclarations.h" #include "UnityEngine_UnityEngine_Camera2727095145.h" #include "UnityEngine_UnityEngine_RectTransformUtility3025555048MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Clipping1257491342MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar2601556940.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar2601556940MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_ScrollEven3541123425MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable1885181538MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_ScrollEven3541123425.h" #include "UnityEngine_UI_UnityEngine_UI_SetPropertyUtility1171612705MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_SetPropertyUtility1171612705.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_Direction522766867.h" #include "UnityEngine_UI_UnityEngine_UI_CanvasUpdate2847075725.h" #include "UnityEngine_UnityEngine_DrivenRectTransformTracker4185719096MethodDeclarations.h" #include "UnityEngine_UnityEngine_DrivenRectTransformTracker4185719096.h" #include "UnityEngine_UnityEngine_Events_UnityEvent_1_gen183549189MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_Axis4294105229.h" #include "UnityEngine_UnityEngine_DrivenTransformProperties624110065.h" #include "UnityEngine_UI_UnityEngine_EventSystems_PointerEve1848751023.h" #include "UnityEngine_UI_UnityEngine_EventSystems_PointerEve1848751023MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_EventSystems_PointerEven384979233.h" #include "UnityEngine_UnityEngine_MonoBehaviour667441552MethodDeclarations.h" #include "UnityEngine_UnityEngine_Coroutine3621161934.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_U3CClickRepe99988271MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_U3CClickRepe99988271.h" #include "UnityEngine_UI_UnityEngine_EventSystems_AxisEventD3355659985.h" #include "UnityEngine_UI_UnityEngine_EventSystems_AxisEventD3355659985MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_EventSystems_MoveDirect2840182460.h" #include "mscorlib_System_Object4170816371.h" #include "UnityEngine_UnityEngine_WaitForEndOfFrame2372756133MethodDeclarations.h" #include "mscorlib_System_UInt3224667981.h" #include "UnityEngine_UnityEngine_WaitForEndOfFrame2372756133.h" #include "mscorlib_System_NotSupportedException1732551818MethodDeclarations.h" #include "mscorlib_System_NotSupportedException1732551818.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_Axis4294105229MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Scrollbar_Direction522766867MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect3606982749.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect3606982749MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_ScrollRec1643322606MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_MovementTy300513412.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_ScrollRec1643322606.h" #include "UnityEngine_UnityEngine_Events_UnityAction_1_gen4186098975MethodDeclarations.h" #include "UnityEngine_UnityEngine_Events_UnityAction_1_gen4186098975.h" #include "mscorlib_System_IntPtr4010401971.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_ScrollbarV184977789.h" #include "UnityEngine_UI_UnityEngine_UI_CanvasUpdateRegistry192658922MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_LayoutRebuilder1942933988MethodDeclarations.h" #include "UnityEngine_UnityEngine_Bounds2711641849MethodDeclarations.h" #include "UnityEngine_UnityEngine_Bounds2711641849.h" #include "UnityEngine_UnityEngine_Time4241968337MethodDeclarations.h" #include "UnityEngine_UnityEngine_Events_UnityEvent_1_gen173696782MethodDeclarations.h" #include "UnityEngine_UnityEngine_Matrix4x41651859333MethodDeclarations.h" #include "UnityEngine_UnityEngine_Matrix4x41651859333.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_MovementTy300513412MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ScrollRect_ScrollbarV184977789MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ColorBlock508458230MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_AnimationTriggers115197445MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen775636365MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable_Transitio1922345195.h" #include "UnityEngine_UI_UnityEngine_UI_ColorBlock508458230.h" #include "UnityEngine_UI_UnityEngine_UI_AnimationTriggers115197445.h" #include "mscorlib_System_Collections_Generic_List_1_gen775636365.h" #include "mscorlib_System_Collections_Generic_List_1_gen3253367090MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen3253367090.h" #include "UnityEngine_UI_UnityEngine_UI_SpriteState2895308594.h" #include "UnityEngine_UI_UnityEngine_EventSystems_EventSyste2276120119MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_EventSystems_EventSyste2276120119.h" #include "UnityEngine_UI_UnityEngine_UI_Image538875265.h" #include "UnityEngine_UnityEngine_Animator2776330603.h" #include "UnityEngine_UnityEngine_CanvasGroup3702418109MethodDeclarations.h" #include "UnityEngine_UnityEngine_CanvasGroup3702418109.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable_Selection1293548283.h" #include "UnityEngine_UnityEngine_Color4194546905MethodDeclarations.h" #include "mscorlib_System_String7231557.h" #include "UnityEngine_UnityEngine_Sprite3199167241.h" #include "UnityEngine_UI_UnityEngine_UI_SpriteState2895308594MethodDeclarations.h" #include "mscorlib_System_String7231557MethodDeclarations.h" #include "UnityEngine_UnityEngine_Quaternion1553702882MethodDeclarations.h" #include "UnityEngine_UnityEngine_Quaternion1553702882.h" #include "UnityEngine_UI_UnityEngine_EventSystems_BaseEventD2054899105MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Image538875265MethodDeclarations.h" #include "UnityEngine_UnityEngine_Animator2776330603MethodDeclarations.h" #include "UnityEngine_UnityEngine_RuntimeAnimatorController274649809.h" #include "UnityEngine_UI_UnityEngine_EventSystems_BaseEventD2054899105.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable_Selection1293548283MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Selectable_Transitio1922345195MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Shadow75537580.h" #include "mscorlib_System_Byte2862609660.h" #include "UnityEngine_UI_UnityEngine_UI_Slider79469677.h" #include "UnityEngine_UI_UnityEngine_UI_Slider79469677MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_SliderEvent2627072750MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_SliderEvent2627072750.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_Direction94975348.h" #include "UnityEngine_UI_UnityEngine_UI_Image_Type3063828369.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_Axis3565360268.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_Axis3565360268MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Slider_Direction94975348MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_StencilMaterial639665897.h" #include "mscorlib_System_Collections_Generic_List_1_gen2942339633MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen2942339633.h" #include "UnityEngine_UnityEngine_Debug4195163081MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_StencilMaterial_MatE1574154081MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_StencilMaterial_MatE1574154081.h" #include "UnityEngine_UnityEngine_HideFlags1436803931.h" #include "mscorlib_ArrayTypes.h" #include "UnityEngine_UI_UnityEngine_UI_Text9039225.h" #include "UnityEngine_UI_UnityEngine_UI_Text9039225MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_FontData704020325MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_FontData704020325.h" #include "UnityEngine_UnityEngine_TextGenerator538854556.h" #include "UnityEngine_UnityEngine_TextGenerator538854556MethodDeclarations.h" #include "UnityEngine_UnityEngine_Font4241557075MethodDeclarations.h" #include "UnityEngine_UnityEngine_Font4241557075.h" #include "UnityEngine_UI_UnityEngine_UI_FontUpdateTracker340588230MethodDeclarations.h" #include "UnityEngine_UnityEngine_TextAnchor213922566.h" #include "UnityEngine_UnityEngine_HorizontalWrapMode2918974229.h" #include "UnityEngine_UnityEngine_VerticalWrapMode1147493927.h" #include "UnityEngine_UnityEngine_FontStyle3350479768.h" #include "UnityEngine_UnityEngine_TextGenerationSettings1923005356.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle110812896.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle110812896MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle_ToggleEvent2331340366MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle_ToggleTransit2757337633.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle_ToggleEvent2331340366.h" #include "UnityEngine_UI_UnityEngine_UI_ToggleGroup1990156785.h" #include "UnityEngine_UI_UnityEngine_UI_ToggleGroup1990156785MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_Toggle_ToggleTransit2757337633MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1478998448MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1478998448.h" #include "mscorlib_System_ArgumentException928607144MethodDeclarations.h" #include "mscorlib_System_ArgumentException928607144.h" #include "mscorlib_System_Predicate_1_gen4016837075MethodDeclarations.h" #include "mscorlib_System_Predicate_1_gen4016837075.h" #include "System_Core_System_Func_2_gen3137578243MethodDeclarations.h" #include "System_Core_System_Linq_Enumerable839044124MethodDeclarations.h" #include "System_Core_System_Func_2_gen3137578243.h" #include "System_Core_System_Linq_Enumerable839044124.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen3379703850MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen3991458268MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen3379703849MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen3379703851MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_ListPool_1_gen251475784MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1355284822.h" #include "mscorlib_System_Collections_Generic_List_1_gen1967039240.h" #include "mscorlib_System_Collections_Generic_List_1_gen1355284821.h" #include "mscorlib_System_Collections_Generic_List_1_gen1355284823.h" #include "mscorlib_System_Collections_Generic_List_1_gen2522024052.h" #include "UnityEngine_UnityEngine_Mesh4241756145.h" #include "UnityEngine_UnityEngine_Mesh4241756145MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1355284822MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1967039240MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1355284821MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen1355284823MethodDeclarations.h" #include "mscorlib_System_Collections_Generic_List_1_gen2522024052MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_VerticalLayoutGroup423167365.h" #include "UnityEngine_UI_UnityEngine_UI_VerticalLayoutGroup423167365MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_HorizontalOrVertical2052396382MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_LayoutGroup352294875MethodDeclarations.h" #include "UnityEngine_UI_UnityEngine_UI_LayoutGroup352294875.h" // !!0 UnityEngine.Component::GetComponent<System.Object>() extern "C" Il2CppObject * Component_GetComponent_TisIl2CppObject_m267839954_gshared (Component_t3501516275 * __this, const MethodInfo* method); #define Component_GetComponent_TisIl2CppObject_m267839954(__this, method) (( Il2CppObject * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, method) // !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Mask>() #define Component_GetComponent_TisMask_t8826680_m433240493(__this, method) (( Mask_t8826680 * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, method) // System.Void UnityEngine.Component::GetComponentsInChildren<System.Object>(System.Collections.Generic.List`1<!!0>) extern "C" void Component_GetComponentsInChildren_TisIl2CppObject_m434699324_gshared (Component_t3501516275 * __this, List_1_t1244034627 * p0, const MethodInfo* method); #define Component_GetComponentsInChildren_TisIl2CppObject_m434699324(__this, p0, method) (( void (*) (Component_t3501516275 *, List_1_t1244034627 *, const MethodInfo*))Component_GetComponentsInChildren_TisIl2CppObject_m434699324_gshared)(__this, p0, method) // System.Void UnityEngine.Component::GetComponentsInChildren<UnityEngine.Component>(System.Collections.Generic.List`1<!!0>) #define Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020(__this, p0, method) (( void (*) (Component_t3501516275 *, List_1_t574734531 *, const MethodInfo*))Component_GetComponentsInChildren_TisIl2CppObject_m434699324_gshared)(__this, p0, method) // System.Void UnityEngine.Component::GetComponentsInParent<System.Object>(System.Boolean,System.Collections.Generic.List`1<!!0>) extern "C" void Component_GetComponentsInParent_TisIl2CppObject_m101791494_gshared (Component_t3501516275 * __this, bool p0, List_1_t1244034627 * p1, const MethodInfo* method); #define Component_GetComponentsInParent_TisIl2CppObject_m101791494(__this, p0, p1, method) (( void (*) (Component_t3501516275 *, bool, List_1_t1244034627 *, const MethodInfo*))Component_GetComponentsInParent_TisIl2CppObject_m101791494_gshared)(__this, p0, p1, method) // System.Void UnityEngine.Component::GetComponentsInParent<UnityEngine.Canvas>(System.Boolean,System.Collections.Generic.List`1<!!0>) #define Component_GetComponentsInParent_TisCanvas_t2727140764_m2636073967(__this, p0, p1, method) (( void (*) (Component_t3501516275 *, bool, List_1_t4095326316 *, const MethodInfo*))Component_GetComponentsInParent_TisIl2CppObject_m101791494_gshared)(__this, p0, p1, method) // System.Void UnityEngine.Component::GetComponents<System.Object>(System.Collections.Generic.List`1<!!0>) extern "C" void Component_GetComponents_TisIl2CppObject_m4263137760_gshared (Component_t3501516275 * __this, List_1_t1244034627 * p0, const MethodInfo* method); #define Component_GetComponents_TisIl2CppObject_m4263137760(__this, p0, method) (( void (*) (Component_t3501516275 *, List_1_t1244034627 *, const MethodInfo*))Component_GetComponents_TisIl2CppObject_m4263137760_gshared)(__this, p0, method) // System.Void UnityEngine.Component::GetComponents<UnityEngine.UI.Mask>(System.Collections.Generic.List`1<!!0>) #define Component_GetComponents_TisMask_t8826680_m956513135(__this, p0, method) (( void (*) (Component_t3501516275 *, List_1_t1377012232 *, const MethodInfo*))Component_GetComponents_TisIl2CppObject_m4263137760_gshared)(__this, p0, method) // System.Void UnityEngine.Component::GetComponentsInParent<UnityEngine.UI.RectMask2D>(System.Boolean,System.Collections.Generic.List`1<!!0>) #define Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525(__this, p0, p1, method) (( void (*) (Component_t3501516275 *, bool, List_1_t430297630 *, const MethodInfo*))Component_GetComponentsInParent_TisIl2CppObject_m101791494_gshared)(__this, p0, p1, method) // !!0 UnityEngine.Component::GetComponent<UnityEngine.Transform>() #define Component_GetComponent_TisTransform_t1659122786_m811718087(__this, method) (( Transform_t1659122786 * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, method) // System.Void UnityEngine.GameObject::GetComponentsInParent<System.Object>(System.Boolean,System.Collections.Generic.List`1<!!0>) extern "C" void GameObject_GetComponentsInParent_TisIl2CppObject_m3568912686_gshared (GameObject_t3674682005 * __this, bool p0, List_1_t1244034627 * p1, const MethodInfo* method); #define GameObject_GetComponentsInParent_TisIl2CppObject_m3568912686(__this, p0, p1, method) (( void (*) (GameObject_t3674682005 *, bool, List_1_t1244034627 *, const MethodInfo*))GameObject_GetComponentsInParent_TisIl2CppObject_m3568912686_gshared)(__this, p0, p1, method) // System.Void UnityEngine.GameObject::GetComponentsInParent<UnityEngine.Canvas>(System.Boolean,System.Collections.Generic.List`1<!!0>) #define GameObject_GetComponentsInParent_TisCanvas_t2727140764_m3002356423(__this, p0, p1, method) (( void (*) (GameObject_t3674682005 *, bool, List_1_t4095326316 *, const MethodInfo*))GameObject_GetComponentsInParent_TisIl2CppObject_m3568912686_gshared)(__this, p0, p1, method) // !!0 UnityEngine.Component::GetComponent<UnityEngine.RectTransform>() #define Component_GetComponent_TisRectTransform_t972643934_m1940403147(__this, method) (( RectTransform_t972643934 * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<System.Object>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetClass_TisIl2CppObject_m3004757678_gshared (Il2CppObject * __this /* static, unused */, Il2CppObject ** p0, Il2CppObject * p1, const MethodInfo* method); #define SetPropertyUtility_SetClass_TisIl2CppObject_m3004757678(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, Il2CppObject **, Il2CppObject *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m3004757678_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<UnityEngine.RectTransform>(!!0&,!!0) #define SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, RectTransform_t972643934 **, RectTransform_t972643934 *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m3004757678_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Scrollbar/Direction>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetStruct_TisDirection_t522766867_m1391770542_gshared (Il2CppObject * __this /* static, unused */, int32_t* p0, int32_t p1, const MethodInfo* method); #define SetPropertyUtility_SetStruct_TisDirection_t522766867_m1391770542(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisDirection_t522766867_m1391770542_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Single>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_gshared (Il2CppObject * __this /* static, unused */, float* p0, float p1, const MethodInfo* method); #define SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, float*, float, const MethodInfo*))SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Int32>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetStruct_TisInt32_t1153838500_m3219417906_gshared (Il2CppObject * __this /* static, unused */, int32_t* p0, int32_t p1, const MethodInfo* method); #define SetPropertyUtility_SetStruct_TisInt32_t1153838500_m3219417906(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisInt32_t1153838500_m3219417906_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetEquatableStruct<UnityEngine.UI.Navigation>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetEquatableStruct_TisNavigation_t1108456480_m3717372898_gshared (Il2CppObject * __this /* static, unused */, Navigation_t1108456480 * p0, Navigation_t1108456480 p1, const MethodInfo* method); #define SetPropertyUtility_SetEquatableStruct_TisNavigation_t1108456480_m3717372898(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, Navigation_t1108456480 *, Navigation_t1108456480 , const MethodInfo*))SetPropertyUtility_SetEquatableStruct_TisNavigation_t1108456480_m3717372898_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Selectable/Transition>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetStruct_TisTransition_t1922345195_m697175766_gshared (Il2CppObject * __this /* static, unused */, int32_t* p0, int32_t p1, const MethodInfo* method); #define SetPropertyUtility_SetStruct_TisTransition_t1922345195_m697175766(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisTransition_t1922345195_m697175766_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetEquatableStruct<UnityEngine.UI.ColorBlock>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetEquatableStruct_TisColorBlock_t508458230_m3999144268_gshared (Il2CppObject * __this /* static, unused */, ColorBlock_t508458230 * p0, ColorBlock_t508458230 p1, const MethodInfo* method); #define SetPropertyUtility_SetEquatableStruct_TisColorBlock_t508458230_m3999144268(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, ColorBlock_t508458230 *, ColorBlock_t508458230 , const MethodInfo*))SetPropertyUtility_SetEquatableStruct_TisColorBlock_t508458230_m3999144268_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetEquatableStruct<UnityEngine.UI.SpriteState>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetEquatableStruct_TisSpriteState_t2895308594_m1850844776_gshared (Il2CppObject * __this /* static, unused */, SpriteState_t2895308594 * p0, SpriteState_t2895308594 p1, const MethodInfo* method); #define SetPropertyUtility_SetEquatableStruct_TisSpriteState_t2895308594_m1850844776(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, SpriteState_t2895308594 *, SpriteState_t2895308594 , const MethodInfo*))SetPropertyUtility_SetEquatableStruct_TisSpriteState_t2895308594_m1850844776_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<UnityEngine.UI.AnimationTriggers>(!!0&,!!0) #define SetPropertyUtility_SetClass_TisAnimationTriggers_t115197445_m2237051106(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, AnimationTriggers_t115197445 **, AnimationTriggers_t115197445 *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m3004757678_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetClass<UnityEngine.UI.Graphic>(!!0&,!!0) #define SetPropertyUtility_SetClass_TisGraphic_t836799438_m4232752825(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, Graphic_t836799438 **, Graphic_t836799438 *, const MethodInfo*))SetPropertyUtility_SetClass_TisIl2CppObject_m3004757678_gshared)(__this /* static, unused */, p0, p1, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<System.Boolean>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768_gshared (Il2CppObject * __this /* static, unused */, bool* p0, bool p1, const MethodInfo* method); #define SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, bool*, bool, const MethodInfo*))SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768_gshared)(__this /* static, unused */, p0, p1, method) // !!0 UnityEngine.Component::GetComponent<UnityEngine.Animator>() #define Component_GetComponent_TisAnimator_t2776330603_m4147395588(__this, method) (( Animator_t2776330603 * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, method) // !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Graphic>() #define Component_GetComponent_TisGraphic_t836799438_m908906813(__this, method) (( Graphic_t836799438 * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, method) // System.Void UnityEngine.Component::GetComponents<UnityEngine.CanvasGroup>(System.Collections.Generic.List`1<!!0>) #define Component_GetComponents_TisCanvasGroup_t3702418109_m4244188622(__this, p0, method) (( void (*) (Component_t3501516275 *, List_1_t775636365 *, const MethodInfo*))Component_GetComponents_TisIl2CppObject_m4263137760_gshared)(__this, p0, method) // System.Boolean UnityEngine.UI.SetPropertyUtility::SetStruct<UnityEngine.UI.Slider/Direction>(!!0&,!!0) extern "C" bool SetPropertyUtility_SetStruct_TisDirection_t94975348_m2722180853_gshared (Il2CppObject * __this /* static, unused */, int32_t* p0, int32_t p1, const MethodInfo* method); #define SetPropertyUtility_SetStruct_TisDirection_t94975348_m2722180853(__this /* static, unused */, p0, p1, method) (( bool (*) (Il2CppObject * /* static, unused */, int32_t*, int32_t, const MethodInfo*))SetPropertyUtility_SetStruct_TisDirection_t94975348_m2722180853_gshared)(__this /* static, unused */, p0, p1, method) // !!0 UnityEngine.Component::GetComponent<UnityEngine.UI.Image>() #define Component_GetComponent_TisImage_t538875265_m3706520426(__this, method) (( Image_t538875265 * (*) (Component_t3501516275 *, const MethodInfo*))Component_GetComponent_TisIl2CppObject_m267839954_gshared)(__this, 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_m3480373697_gshared (Il2CppObject * __this /* static, unused */, Il2CppObject* p0, Func_2_t785513668 * p1, const MethodInfo* method); #define Enumerable_Where_TisIl2CppObject_m3480373697(__this /* static, unused */, p0, p1, method) (( Il2CppObject* (*) (Il2CppObject * /* static, unused */, Il2CppObject*, Func_2_t785513668 *, const MethodInfo*))Enumerable_Where_TisIl2CppObject_m3480373697_gshared)(__this /* static, unused */, 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_t110812896_m1098047866(__this /* static, unused */, p0, p1, method) (( Il2CppObject* (*) (Il2CppObject * /* static, unused */, Il2CppObject*, Func_2_t3137578243 *, const MethodInfo*))Enumerable_Where_TisIl2CppObject_m3480373697_gshared)(__this /* static, unused */, p0, p1, method) #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.UI.MaskableGraphic::.ctor() extern Il2CppClass* CullStateChangedEvent_t2290505109_il2cpp_TypeInfo_var; extern Il2CppClass* Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var; extern Il2CppClass* Graphic_t836799438_il2cpp_TypeInfo_var; extern const uint32_t MaskableGraphic__ctor_m3514233785_MetadataUsageId; extern "C" void MaskableGraphic__ctor_m3514233785 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskableGraphic__ctor_m3514233785_MetadataUsageId); s_Il2CppMethodIntialized = true; } { __this->set_m_ShouldRecalculateStencil_19((bool)1); __this->set_m_Maskable_22((bool)1); CullStateChangedEvent_t2290505109 * L_0 = (CullStateChangedEvent_t2290505109 *)il2cpp_codegen_object_new(CullStateChangedEvent_t2290505109_il2cpp_TypeInfo_var); CullStateChangedEvent__ctor_m2540235971(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_t215400611*)SZArrayNew(Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var, (uint32_t)4))); IL2CPP_RUNTIME_CLASS_INIT(Graphic_t836799438_il2cpp_TypeInfo_var); Graphic__ctor_m4066569555(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.MaskableGraphic/CullStateChangedEvent UnityEngine.UI.MaskableGraphic::get_onCullStateChanged() extern "C" CullStateChangedEvent_t2290505109 * MaskableGraphic_get_onCullStateChanged_m2293098922 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { CullStateChangedEvent_t2290505109 * L_0 = __this->get_m_OnCullStateChanged_24(); return L_0; } } // System.Void UnityEngine.UI.MaskableGraphic::set_onCullStateChanged(UnityEngine.UI.MaskableGraphic/CullStateChangedEvent) extern "C" void MaskableGraphic_set_onCullStateChanged_m1901835143 (MaskableGraphic_t3186046376 * __this, CullStateChangedEvent_t2290505109 * ___value0, const MethodInfo* method) { { CullStateChangedEvent_t2290505109 * L_0 = ___value0; __this->set_m_OnCullStateChanged_24(L_0); return; } } // System.Boolean UnityEngine.UI.MaskableGraphic::get_maskable() extern "C" bool MaskableGraphic_get_maskable_m2226181992 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_Maskable_22(); return L_0; } } // System.Void UnityEngine.UI.MaskableGraphic::set_maskable(System.Boolean) extern "C" void MaskableGraphic_set_maskable_m3088187909 (MaskableGraphic_t3186046376 * __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_000d; } } { return; } IL_000d: { bool L_2 = ___value0; __this->set_m_Maskable_22(L_2); __this->set_m_ShouldRecalculateStencil_19((bool)1); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); return; } } // UnityEngine.Material UnityEngine.UI.MaskableGraphic::GetModifiedMaterial(UnityEngine.Material) extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern const MethodInfo* Component_GetComponent_TisMask_t8826680_m433240493_MethodInfo_var; extern const uint32_t MaskableGraphic_GetModifiedMaterial_m2422156902_MetadataUsageId; extern "C" Material_t3870600107 * MaskableGraphic_GetModifiedMaterial_m2422156902 (MaskableGraphic_t3186046376 * __this, Material_t3870600107 * ___baseMaterial0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskableGraphic_GetModifiedMaterial_m2422156902_MetadataUsageId); s_Il2CppMethodIntialized = true; } Material_t3870600107 * V_0 = NULL; Transform_t1659122786 * V_1 = NULL; Material_t3870600107 * V_2 = NULL; MaskableGraphic_t3186046376 * G_B3_0 = NULL; MaskableGraphic_t3186046376 * G_B2_0 = NULL; int32_t G_B4_0 = 0; MaskableGraphic_t3186046376 * G_B4_1 = NULL; { Material_t3870600107 * L_0 = ___baseMaterial0; V_0 = L_0; bool L_1 = __this->get_m_ShouldRecalculateStencil_19(); if (!L_1) { goto IL_0043; } } { Transform_t1659122786 * L_2 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); Transform_t1659122786 * L_3 = MaskUtilities_FindRootSortOverrideCanvas_m4219954651(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); V_1 = L_3; bool L_4 = MaskableGraphic_get_maskable_m2226181992(__this, /*hidden argument*/NULL); G_B2_0 = __this; if (!L_4) { G_B3_0 = __this; goto IL_0036; } } { Transform_t1659122786 * L_5 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); Transform_t1659122786 * L_6 = V_1; int32_t L_7 = MaskUtilities_GetStencilDepth_m2786493988(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); G_B4_0 = L_7; G_B4_1 = G_B2_0; goto IL_0037; } IL_0036: { G_B4_0 = 0; G_B4_1 = G_B3_0; } IL_0037: { NullCheck(G_B4_1); G_B4_1->set_m_StencilValue_26(G_B4_0); __this->set_m_ShouldRecalculateStencil_19((bool)0); } IL_0043: { int32_t L_8 = __this->get_m_StencilValue_26(); if ((((int32_t)L_8) <= ((int32_t)0))) { goto IL_009f; } } { Mask_t8826680 * L_9 = Component_GetComponent_TisMask_t8826680_m433240493(__this, /*hidden argument*/Component_GetComponent_TisMask_t8826680_m433240493_MethodInfo_var); bool L_10 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_9, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_10) { goto IL_009f; } } { Material_t3870600107 * L_11 = V_0; int32_t L_12 = __this->get_m_StencilValue_26(); int32_t L_13 = __this->get_m_StencilValue_26(); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); Material_t3870600107 * L_14 = StencilMaterial_Add_m264449278(NULL /*static, unused*/, L_11, ((int32_t)((int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)L_12&(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_13&(int32_t)((int32_t)31)))))-(int32_t)1)), 0, /*hidden argument*/NULL); V_2 = L_14; Material_t3870600107 * L_15 = __this->get_m_MaskMaterial_20(); StencilMaterial_Remove_m1013236306(NULL /*static, unused*/, L_15, /*hidden argument*/NULL); Material_t3870600107 * L_16 = V_2; __this->set_m_MaskMaterial_20(L_16); Material_t3870600107 * L_17 = __this->get_m_MaskMaterial_20(); V_0 = L_17; } IL_009f: { Material_t3870600107 * L_18 = V_0; return L_18; } } // System.Void UnityEngine.UI.MaskableGraphic::Cull(UnityEngine.Rect,System.Boolean) extern "C" void MaskableGraphic_Cull_m1710243867 (MaskableGraphic_t3186046376 * __this, Rect_t4241904616 ___clipRect0, bool ___validRect1, const MethodInfo* method) { bool V_0 = false; int32_t G_B5_0 = 0; { CanvasRenderer_t3950887807 * L_0 = Graphic_get_canvasRenderer_m184553434(__this, /*hidden argument*/NULL); NullCheck(L_0); bool L_1 = CanvasRenderer_get_hasMoved_m1392755130(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0011; } } { return; } IL_0011: { bool L_2 = ___validRect1; if (!L_2) { goto IL_002a; } } { Rect_t4241904616 L_3 = MaskableGraphic_get_rootCanvasRect_m40685262(__this, /*hidden argument*/NULL); bool L_4 = Rect_Overlaps_m2751672171((&___clipRect0), L_3, (bool)1, /*hidden argument*/NULL); G_B5_0 = ((((int32_t)L_4) == ((int32_t)0))? 1 : 0); goto IL_002b; } IL_002a: { G_B5_0 = 1; } IL_002b: { V_0 = (bool)G_B5_0; bool L_5 = V_0; MaskableGraphic_UpdateCull_m3192993021(__this, L_5, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.MaskableGraphic::UpdateCull(System.Boolean) extern const MethodInfo* UnityEvent_1_Invoke_m4200629676_MethodInfo_var; extern const uint32_t MaskableGraphic_UpdateCull_m3192993021_MetadataUsageId; extern "C" void MaskableGraphic_UpdateCull_m3192993021 (MaskableGraphic_t3186046376 * __this, bool ___cull0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskableGraphic_UpdateCull_m3192993021_MetadataUsageId); s_Il2CppMethodIntialized = true; } bool V_0 = false; { CanvasRenderer_t3950887807 * L_0 = Graphic_get_canvasRenderer_m184553434(__this, /*hidden argument*/NULL); NullCheck(L_0); bool L_1 = CanvasRenderer_get_cull_m3343855795(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_t3950887807 * L_3 = Graphic_get_canvasRenderer_m184553434(__this, /*hidden argument*/NULL); bool L_4 = ___cull0; NullCheck(L_3); CanvasRenderer_set_cull_m3433952120(L_3, L_4, /*hidden argument*/NULL); bool L_5 = V_0; if (!L_5) { goto IL_0036; } } { CullStateChangedEvent_t2290505109 * L_6 = __this->get_m_OnCullStateChanged_24(); bool L_7 = ___cull0; NullCheck(L_6); UnityEvent_1_Invoke_m4200629676(L_6, L_7, /*hidden argument*/UnityEvent_1_Invoke_m4200629676_MethodInfo_var); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); } IL_0036: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::SetClipRect(UnityEngine.Rect,System.Boolean) extern "C" void MaskableGraphic_SetClipRect_m3970693835 (MaskableGraphic_t3186046376 * __this, Rect_t4241904616 ___clipRect0, bool ___validRect1, const MethodInfo* method) { { bool L_0 = ___validRect1; if (!L_0) { goto IL_0017; } } { CanvasRenderer_t3950887807 * L_1 = Graphic_get_canvasRenderer_m184553434(__this, /*hidden argument*/NULL); Rect_t4241904616 L_2 = ___clipRect0; NullCheck(L_1); CanvasRenderer_EnableRectClipping_m896218272(L_1, L_2, /*hidden argument*/NULL); goto IL_0022; } IL_0017: { CanvasRenderer_t3950887807 * L_3 = Graphic_get_canvasRenderer_m184553434(__this, /*hidden argument*/NULL); NullCheck(L_3); CanvasRenderer_DisableRectClipping_m2654388030(L_3, /*hidden argument*/NULL); } IL_0022: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnEnable() extern const MethodInfo* Component_GetComponent_TisMask_t8826680_m433240493_MethodInfo_var; extern const uint32_t MaskableGraphic_OnEnable_m487460141_MetadataUsageId; extern "C" void MaskableGraphic_OnEnable_m487460141 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskableGraphic_OnEnable_m487460141_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Graphic_OnEnable_m1102673235(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateStencil_19((bool)1); MaskableGraphic_UpdateClipParent_m2337272942(__this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); Mask_t8826680 * L_0 = Component_GetComponent_TisMask_t8826680_m433240493(__this, /*hidden argument*/Component_GetComponent_TisMask_t8826680_m433240493_MethodInfo_var); bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0030; } } { MaskUtilities_NotifyStencilStateChanged_m2159873435(NULL /*static, unused*/, __this, /*hidden argument*/NULL); } IL_0030: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnDisable() extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern const MethodInfo* Component_GetComponent_TisMask_t8826680_m433240493_MethodInfo_var; extern const uint32_t MaskableGraphic_OnDisable_m2667299744_MetadataUsageId; extern "C" void MaskableGraphic_OnDisable_m2667299744 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskableGraphic_OnDisable_m2667299744_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Graphic_OnDisable_m264069178(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateStencil_19((bool)1); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); MaskableGraphic_UpdateClipParent_m2337272942(__this, /*hidden argument*/NULL); Material_t3870600107 * L_0 = __this->get_m_MaskMaterial_20(); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); StencilMaterial_Remove_m1013236306(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); __this->set_m_MaskMaterial_20((Material_t3870600107 *)NULL); Mask_t8826680 * L_1 = Component_GetComponent_TisMask_t8826680_m433240493(__this, /*hidden argument*/Component_GetComponent_TisMask_t8826680_m433240493_MethodInfo_var); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0042; } } { MaskUtilities_NotifyStencilStateChanged_m2159873435(NULL /*static, unused*/, __this, /*hidden argument*/NULL); } IL_0042: { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnTransformParentChanged() extern "C" void MaskableGraphic_OnTransformParentChanged_m2836893064 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { Graphic_OnTransformParentChanged_m321513902(__this, /*hidden argument*/NULL); bool L_0 = Behaviour_get_isActiveAndEnabled_m210167461(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0012; } } { return; } IL_0012: { __this->set_m_ShouldRecalculateStencil_19((bool)1); MaskableGraphic_UpdateClipParent_m2337272942(__this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); return; } } // System.Void UnityEngine.UI.MaskableGraphic::ParentMaskStateChanged() extern "C" void MaskableGraphic_ParentMaskStateChanged_m3501359204 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.MaskableGraphic::OnCanvasHierarchyChanged() extern "C" void MaskableGraphic_OnCanvasHierarchyChanged_m3030160609 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { Graphic_OnCanvasHierarchyChanged_m514781447(__this, /*hidden argument*/NULL); bool L_0 = Behaviour_get_isActiveAndEnabled_m210167461(__this, /*hidden argument*/NULL); if (L_0) { goto IL_0012; } } { return; } IL_0012: { __this->set_m_ShouldRecalculateStencil_19((bool)1); MaskableGraphic_UpdateClipParent_m2337272942(__this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); return; } } // UnityEngine.Rect UnityEngine.UI.MaskableGraphic::get_rootCanvasRect() extern "C" Rect_t4241904616 MaskableGraphic_get_rootCanvasRect_m40685262 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { Canvas_t2727140764 * V_0 = NULL; int32_t V_1 = 0; { RectTransform_t972643934 * L_0 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); Vector3U5BU5D_t215400611* L_1 = __this->get_m_Corners_27(); NullCheck(L_0); RectTransform_GetWorldCorners_m1829917190(L_0, L_1, /*hidden argument*/NULL); Canvas_t2727140764 * L_2 = Graphic_get_canvas_m4291384250(__this, /*hidden argument*/NULL); bool L_3 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_006c; } } { Canvas_t2727140764 * L_4 = Graphic_get_canvas_m4291384250(__this, /*hidden argument*/NULL); NullCheck(L_4); Canvas_t2727140764 * L_5 = Canvas_get_rootCanvas_m3652460242(L_4, /*hidden argument*/NULL); V_0 = L_5; V_1 = 0; goto IL_0065; } IL_0034: { Vector3U5BU5D_t215400611* L_6 = __this->get_m_Corners_27(); int32_t L_7 = V_1; NullCheck(L_6); IL2CPP_ARRAY_BOUNDS_CHECK(L_6, L_7); Canvas_t2727140764 * L_8 = V_0; NullCheck(L_8); Transform_t1659122786 * L_9 = Component_get_transform_m4257140443(L_8, /*hidden argument*/NULL); Vector3U5BU5D_t215400611* L_10 = __this->get_m_Corners_27(); int32_t L_11 = V_1; NullCheck(L_10); IL2CPP_ARRAY_BOUNDS_CHECK(L_10, L_11); NullCheck(L_9); Vector3_t4282066566 L_12 = Transform_InverseTransformPoint_m1626812000(L_9, (*(Vector3_t4282066566 *)((L_10)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_11)))), /*hidden argument*/NULL); (*(Vector3_t4282066566 *)((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_0065: { int32_t L_14 = V_1; if ((((int32_t)L_14) < ((int32_t)4))) { goto IL_0034; } } IL_006c: { Vector3U5BU5D_t215400611* L_15 = __this->get_m_Corners_27(); NullCheck(L_15); IL2CPP_ARRAY_BOUNDS_CHECK(L_15, 0); float L_16 = ((L_15)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t215400611* L_17 = __this->get_m_Corners_27(); NullCheck(L_17); IL2CPP_ARRAY_BOUNDS_CHECK(L_17, 0); float L_18 = ((L_17)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Vector3U5BU5D_t215400611* L_19 = __this->get_m_Corners_27(); NullCheck(L_19); IL2CPP_ARRAY_BOUNDS_CHECK(L_19, 2); float L_20 = ((L_19)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_x_1(); Vector3U5BU5D_t215400611* L_21 = __this->get_m_Corners_27(); NullCheck(L_21); IL2CPP_ARRAY_BOUNDS_CHECK(L_21, 0); float L_22 = ((L_21)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t215400611* L_23 = __this->get_m_Corners_27(); NullCheck(L_23); IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 2); float L_24 = ((L_23)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_y_2(); Vector3U5BU5D_t215400611* L_25 = __this->get_m_Corners_27(); NullCheck(L_25); IL2CPP_ARRAY_BOUNDS_CHECK(L_25, 0); float L_26 = ((L_25)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Rect_t4241904616 L_27; memset(&L_27, 0, sizeof(L_27)); Rect__ctor_m3291325233(&L_27, L_16, L_18, ((float)((float)L_20-(float)L_22)), ((float)((float)L_24-(float)L_26)), /*hidden argument*/NULL); return L_27; } } // System.Void UnityEngine.UI.MaskableGraphic::UpdateClipParent() extern "C" void MaskableGraphic_UpdateClipParent_m2337272942 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { RectMask2D_t3357079374 * V_0 = NULL; RectMask2D_t3357079374 * G_B4_0 = NULL; { bool L_0 = MaskableGraphic_get_maskable_m2226181992(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0021; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_1) { goto IL_0021; } } { RectMask2D_t3357079374 * L_2 = MaskUtilities_GetRectMaskForClippable_m396614586(NULL /*static, unused*/, __this, /*hidden argument*/NULL); G_B4_0 = L_2; goto IL_0022; } IL_0021: { G_B4_0 = ((RectMask2D_t3357079374 *)(NULL)); } IL_0022: { V_0 = G_B4_0; RectMask2D_t3357079374 * L_3 = V_0; RectMask2D_t3357079374 * L_4 = __this->get_m_ParentMask_21(); bool L_5 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_0058; } } { RectMask2D_t3357079374 * L_6 = __this->get_m_ParentMask_21(); bool L_7 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_6, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_7) { goto IL_0058; } } { RectMask2D_t3357079374 * L_8 = __this->get_m_ParentMask_21(); NullCheck(L_8); RectMask2D_RemoveClippable_m2506427137(L_8, __this, /*hidden argument*/NULL); MaskableGraphic_UpdateCull_m3192993021(__this, (bool)0, /*hidden argument*/NULL); } IL_0058: { RectMask2D_t3357079374 * L_9 = V_0; bool L_10 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_9, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_10) { goto IL_006b; } } { RectMask2D_t3357079374 * L_11 = V_0; NullCheck(L_11); RectMask2D_AddClippable_m3020362282(L_11, __this, /*hidden argument*/NULL); } IL_006b: { RectMask2D_t3357079374 * L_12 = V_0; __this->set_m_ParentMask_21(L_12); return; } } // System.Void UnityEngine.UI.MaskableGraphic::RecalculateClipping() extern "C" void MaskableGraphic_RecalculateClipping_m400162188 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { MaskableGraphic_UpdateClipParent_m2337272942(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.MaskableGraphic::RecalculateMasking() extern "C" void MaskableGraphic_RecalculateMasking_m2250524558 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { __this->set_m_ShouldRecalculateStencil_19((bool)1); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); return; } } // UnityEngine.RectTransform UnityEngine.UI.MaskableGraphic::UnityEngine.UI.IClippable.get_rectTransform() extern "C" RectTransform_t972643934 * MaskableGraphic_UnityEngine_UI_IClippable_get_rectTransform_m3856601786 (MaskableGraphic_t3186046376 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.MaskableGraphic/CullStateChangedEvent::.ctor() extern const MethodInfo* UnityEvent_1__ctor_m1579102881_MethodInfo_var; extern const uint32_t CullStateChangedEvent__ctor_m2540235971_MetadataUsageId; extern "C" void CullStateChangedEvent__ctor_m2540235971 (CullStateChangedEvent_t2290505109 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (CullStateChangedEvent__ctor_m2540235971_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UnityEvent_1__ctor_m1579102881(__this, /*hidden argument*/UnityEvent_1__ctor_m1579102881_MethodInfo_var); return; } } // System.Void UnityEngine.UI.MaskUtilities::.ctor() extern "C" void MaskUtilities__ctor_m1166009725 (MaskUtilities_t3879688356 * __this, const MethodInfo* method) { { Object__ctor_m1772956182(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.MaskUtilities::Notify2DMaskStateChanged(UnityEngine.Component) extern Il2CppClass* ListPool_1_t2599153559_il2cpp_TypeInfo_var; extern Il2CppClass* IClippable_t502791197_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m2014868279_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1226401687_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1104343294_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m2849004751_MethodInfo_var; extern const uint32_t MaskUtilities_Notify2DMaskStateChanged_m2199550555_MetadataUsageId; extern "C" void MaskUtilities_Notify2DMaskStateChanged_m2199550555 (Il2CppObject * __this /* static, unused */, Component_t3501516275 * ___mask0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskUtilities_Notify2DMaskStateChanged_m2199550555_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t574734531 * V_0 = NULL; int32_t V_1 = 0; Il2CppObject * V_2 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2599153559_il2cpp_TypeInfo_var); List_1_t574734531 * L_0 = ListPool_1_Get_m2014868279(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2014868279_MethodInfo_var); V_0 = L_0; Component_t3501516275 * L_1 = ___mask0; List_1_t574734531 * L_2 = V_0; NullCheck(L_1); Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020(L_1, L_2, /*hidden argument*/Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020_MethodInfo_var); V_1 = 0; goto IL_0064; } IL_0014: { List_1_t574734531 * L_3 = V_0; int32_t L_4 = V_1; NullCheck(L_3); Component_t3501516275 * L_5 = List_1_get_Item_m1226401687(L_3, L_4, /*hidden argument*/List_1_get_Item_m1226401687_MethodInfo_var); bool L_6 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_6) { goto IL_0042; } } { List_1_t574734531 * L_7 = V_0; int32_t L_8 = V_1; NullCheck(L_7); Component_t3501516275 * L_9 = List_1_get_Item_m1226401687(L_7, L_8, /*hidden argument*/List_1_get_Item_m1226401687_MethodInfo_var); NullCheck(L_9); GameObject_t3674682005 * L_10 = Component_get_gameObject_m1170635899(L_9, /*hidden argument*/NULL); Component_t3501516275 * L_11 = ___mask0; NullCheck(L_11); GameObject_t3674682005 * L_12 = Component_get_gameObject_m1170635899(L_11, /*hidden argument*/NULL); bool L_13 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_10, L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0047; } } IL_0042: { goto IL_0060; } IL_0047: { List_1_t574734531 * L_14 = V_0; int32_t L_15 = V_1; NullCheck(L_14); Component_t3501516275 * L_16 = List_1_get_Item_m1226401687(L_14, L_15, /*hidden argument*/List_1_get_Item_m1226401687_MethodInfo_var); V_2 = ((Il2CppObject *)IsInst(L_16, IClippable_t502791197_il2cpp_TypeInfo_var)); Il2CppObject * L_17 = V_2; if (!L_17) { goto IL_0060; } } { Il2CppObject * L_18 = V_2; NullCheck(L_18); InterfaceActionInvoker0::Invoke(0 /* System.Void UnityEngine.UI.IClippable::RecalculateClipping() */, IClippable_t502791197_il2cpp_TypeInfo_var, L_18); } IL_0060: { int32_t L_19 = V_1; V_1 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0064: { int32_t L_20 = V_1; List_1_t574734531 * L_21 = V_0; NullCheck(L_21); int32_t L_22 = List_1_get_Count_m1104343294(L_21, /*hidden argument*/List_1_get_Count_m1104343294_MethodInfo_var); if ((((int32_t)L_20) < ((int32_t)L_22))) { goto IL_0014; } } { List_1_t574734531 * L_23 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2599153559_il2cpp_TypeInfo_var); ListPool_1_Release_m2849004751(NULL /*static, unused*/, L_23, /*hidden argument*/ListPool_1_Release_m2849004751_MethodInfo_var); return; } } // System.Void UnityEngine.UI.MaskUtilities::NotifyStencilStateChanged(UnityEngine.Component) extern Il2CppClass* ListPool_1_t2599153559_il2cpp_TypeInfo_var; extern Il2CppClass* IMaskable_t1719715701_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m2014868279_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1226401687_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1104343294_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m2849004751_MethodInfo_var; extern const uint32_t MaskUtilities_NotifyStencilStateChanged_m2159873435_MetadataUsageId; extern "C" void MaskUtilities_NotifyStencilStateChanged_m2159873435 (Il2CppObject * __this /* static, unused */, Component_t3501516275 * ___mask0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskUtilities_NotifyStencilStateChanged_m2159873435_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t574734531 * V_0 = NULL; int32_t V_1 = 0; Il2CppObject * V_2 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2599153559_il2cpp_TypeInfo_var); List_1_t574734531 * L_0 = ListPool_1_Get_m2014868279(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2014868279_MethodInfo_var); V_0 = L_0; Component_t3501516275 * L_1 = ___mask0; List_1_t574734531 * L_2 = V_0; NullCheck(L_1); Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020(L_1, L_2, /*hidden argument*/Component_GetComponentsInChildren_TisComponent_t3501516275_m1080956020_MethodInfo_var); V_1 = 0; goto IL_0064; } IL_0014: { List_1_t574734531 * L_3 = V_0; int32_t L_4 = V_1; NullCheck(L_3); Component_t3501516275 * L_5 = List_1_get_Item_m1226401687(L_3, L_4, /*hidden argument*/List_1_get_Item_m1226401687_MethodInfo_var); bool L_6 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_6) { goto IL_0042; } } { List_1_t574734531 * L_7 = V_0; int32_t L_8 = V_1; NullCheck(L_7); Component_t3501516275 * L_9 = List_1_get_Item_m1226401687(L_7, L_8, /*hidden argument*/List_1_get_Item_m1226401687_MethodInfo_var); NullCheck(L_9); GameObject_t3674682005 * L_10 = Component_get_gameObject_m1170635899(L_9, /*hidden argument*/NULL); Component_t3501516275 * L_11 = ___mask0; NullCheck(L_11); GameObject_t3674682005 * L_12 = Component_get_gameObject_m1170635899(L_11, /*hidden argument*/NULL); bool L_13 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_10, L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_0047; } } IL_0042: { goto IL_0060; } IL_0047: { List_1_t574734531 * L_14 = V_0; int32_t L_15 = V_1; NullCheck(L_14); Component_t3501516275 * L_16 = List_1_get_Item_m1226401687(L_14, L_15, /*hidden argument*/List_1_get_Item_m1226401687_MethodInfo_var); V_2 = ((Il2CppObject *)IsInst(L_16, IMaskable_t1719715701_il2cpp_TypeInfo_var)); Il2CppObject * L_17 = V_2; if (!L_17) { goto IL_0060; } } { Il2CppObject * L_18 = V_2; NullCheck(L_18); InterfaceActionInvoker0::Invoke(0 /* System.Void UnityEngine.UI.IMaskable::RecalculateMasking() */, IMaskable_t1719715701_il2cpp_TypeInfo_var, L_18); } IL_0060: { int32_t L_19 = V_1; V_1 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_0064: { int32_t L_20 = V_1; List_1_t574734531 * L_21 = V_0; NullCheck(L_21); int32_t L_22 = List_1_get_Count_m1104343294(L_21, /*hidden argument*/List_1_get_Count_m1104343294_MethodInfo_var); if ((((int32_t)L_20) < ((int32_t)L_22))) { goto IL_0014; } } { List_1_t574734531 * L_23 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2599153559_il2cpp_TypeInfo_var); ListPool_1_Release_m2849004751(NULL /*static, unused*/, L_23, /*hidden argument*/ListPool_1_Release_m2849004751_MethodInfo_var); return; } } // UnityEngine.Transform UnityEngine.UI.MaskUtilities::FindRootSortOverrideCanvas(UnityEngine.Transform) extern Il2CppClass* ListPool_1_t1824778048_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m3707028656_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInParent_TisCanvas_t2727140764_m2636073967_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m3400185932_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1137691305_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3200393738_MethodInfo_var; extern const uint32_t MaskUtilities_FindRootSortOverrideCanvas_m4219954651_MetadataUsageId; extern "C" Transform_t1659122786 * MaskUtilities_FindRootSortOverrideCanvas_m4219954651 (Il2CppObject * __this /* static, unused */, Transform_t1659122786 * ___start0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskUtilities_FindRootSortOverrideCanvas_m4219954651_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t4095326316 * V_0 = NULL; Canvas_t2727140764 * V_1 = NULL; int32_t V_2 = 0; Transform_t1659122786 * G_B8_0 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t1824778048_il2cpp_TypeInfo_var); List_1_t4095326316 * L_0 = ListPool_1_Get_m3707028656(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3707028656_MethodInfo_var); V_0 = L_0; Transform_t1659122786 * L_1 = ___start0; List_1_t4095326316 * L_2 = V_0; NullCheck(L_1); Component_GetComponentsInParent_TisCanvas_t2727140764_m2636073967(L_1, (bool)0, L_2, /*hidden argument*/Component_GetComponentsInParent_TisCanvas_t2727140764_m2636073967_MethodInfo_var); V_1 = (Canvas_t2727140764 *)NULL; V_2 = 0; goto IL_0033; } IL_0017: { List_1_t4095326316 * L_3 = V_0; int32_t L_4 = V_2; NullCheck(L_3); Canvas_t2727140764 * L_5 = List_1_get_Item_m3400185932(L_3, L_4, /*hidden argument*/List_1_get_Item_m3400185932_MethodInfo_var); V_1 = L_5; Canvas_t2727140764 * L_6 = V_1; NullCheck(L_6); bool L_7 = Canvas_get_overrideSorting_m3812884636(L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_002f; } } { goto IL_003f; } IL_002f: { int32_t L_8 = V_2; V_2 = ((int32_t)((int32_t)L_8+(int32_t)1)); } IL_0033: { int32_t L_9 = V_2; List_1_t4095326316 * L_10 = V_0; NullCheck(L_10); int32_t L_11 = List_1_get_Count_m1137691305(L_10, /*hidden argument*/List_1_get_Count_m1137691305_MethodInfo_var); if ((((int32_t)L_9) < ((int32_t)L_11))) { goto IL_0017; } } IL_003f: { List_1_t4095326316 * L_12 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t1824778048_il2cpp_TypeInfo_var); ListPool_1_Release_m3200393738(NULL /*static, unused*/, L_12, /*hidden argument*/ListPool_1_Release_m3200393738_MethodInfo_var); Canvas_t2727140764 * L_13 = V_1; bool L_14 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_13, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_14) { goto IL_005c; } } { Canvas_t2727140764 * L_15 = V_1; NullCheck(L_15); Transform_t1659122786 * L_16 = Component_get_transform_m4257140443(L_15, /*hidden argument*/NULL); G_B8_0 = L_16; goto IL_005d; } IL_005c: { G_B8_0 = ((Transform_t1659122786 *)(NULL)); } IL_005d: { return G_B8_0; } } // System.Int32 UnityEngine.UI.MaskUtilities::GetStencilDepth(UnityEngine.Transform,UnityEngine.Transform) extern Il2CppClass* ListPool_1_t3401431260_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m2713847744_MethodInfo_var; extern const MethodInfo* Component_GetComponents_TisMask_t8826680_m956513135_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1125069934_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m3001244807_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3569998872_MethodInfo_var; extern const uint32_t MaskUtilities_GetStencilDepth_m2786493988_MetadataUsageId; extern "C" int32_t MaskUtilities_GetStencilDepth_m2786493988 (Il2CppObject * __this /* static, unused */, Transform_t1659122786 * ___transform0, Transform_t1659122786 * ___stopAfter1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskUtilities_GetStencilDepth_m2786493988_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; Transform_t1659122786 * V_1 = NULL; List_1_t1377012232 * V_2 = NULL; int32_t V_3 = 0; { V_0 = 0; Transform_t1659122786 * L_0 = ___transform0; Transform_t1659122786 * L_1 = ___stopAfter1; bool L_2 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0010; } } { int32_t L_3 = V_0; return L_3; } IL_0010: { Transform_t1659122786 * L_4 = ___transform0; NullCheck(L_4); Transform_t1659122786 * L_5 = Transform_get_parent_m2236876972(L_4, /*hidden argument*/NULL); V_1 = L_5; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3401431260_il2cpp_TypeInfo_var); List_1_t1377012232 * L_6 = ListPool_1_Get_m2713847744(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2713847744_MethodInfo_var); V_2 = L_6; goto IL_00b1; } IL_0022: { Transform_t1659122786 * L_7 = V_1; List_1_t1377012232 * L_8 = V_2; NullCheck(L_7); Component_GetComponents_TisMask_t8826680_m956513135(L_7, L_8, /*hidden argument*/Component_GetComponents_TisMask_t8826680_m956513135_MethodInfo_var); V_3 = 0; goto IL_008d; } IL_0030: { List_1_t1377012232 * L_9 = V_2; int32_t L_10 = V_3; NullCheck(L_9); Mask_t8826680 * L_11 = List_1_get_Item_m1125069934(L_9, L_10, /*hidden argument*/List_1_get_Item_m1125069934_MethodInfo_var); bool L_12 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_11, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_12) { goto IL_0089; } } { List_1_t1377012232 * L_13 = V_2; int32_t L_14 = V_3; NullCheck(L_13); Mask_t8826680 * L_15 = List_1_get_Item_m1125069934(L_13, L_14, /*hidden argument*/List_1_get_Item_m1125069934_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_0089; } } { List_1_t1377012232 * L_17 = V_2; int32_t L_18 = V_3; NullCheck(L_17); Mask_t8826680 * L_19 = List_1_get_Item_m1125069934(L_17, L_18, /*hidden argument*/List_1_get_Item_m1125069934_MethodInfo_var); NullCheck(L_19); Graphic_t836799438 * L_20 = Mask_get_graphic_m2101144526(L_19, /*hidden argument*/NULL); bool L_21 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_20, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_21) { goto IL_0089; } } { List_1_t1377012232 * L_22 = V_2; int32_t L_23 = V_3; NullCheck(L_22); Mask_t8826680 * L_24 = List_1_get_Item_m1125069934(L_22, L_23, /*hidden argument*/List_1_get_Item_m1125069934_MethodInfo_var); NullCheck(L_24); Graphic_t836799438 * L_25 = Mask_get_graphic_m2101144526(L_24, /*hidden argument*/NULL); NullCheck(L_25); bool L_26 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, L_25); if (!L_26) { goto IL_0089; } } { int32_t L_27 = V_0; V_0 = ((int32_t)((int32_t)L_27+(int32_t)1)); goto IL_0099; } IL_0089: { int32_t L_28 = V_3; V_3 = ((int32_t)((int32_t)L_28+(int32_t)1)); } IL_008d: { int32_t L_29 = V_3; List_1_t1377012232 * L_30 = V_2; NullCheck(L_30); int32_t L_31 = List_1_get_Count_m3001244807(L_30, /*hidden argument*/List_1_get_Count_m3001244807_MethodInfo_var); if ((((int32_t)L_29) < ((int32_t)L_31))) { goto IL_0030; } } IL_0099: { Transform_t1659122786 * L_32 = V_1; Transform_t1659122786 * L_33 = ___stopAfter1; bool L_34 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_32, L_33, /*hidden argument*/NULL); if (!L_34) { goto IL_00aa; } } { goto IL_00bd; } IL_00aa: { Transform_t1659122786 * L_35 = V_1; NullCheck(L_35); Transform_t1659122786 * L_36 = Transform_get_parent_m2236876972(L_35, /*hidden argument*/NULL); V_1 = L_36; } IL_00b1: { Transform_t1659122786 * L_37 = V_1; bool L_38 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_37, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_38) { goto IL_0022; } } IL_00bd: { List_1_t1377012232 * L_39 = V_2; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3401431260_il2cpp_TypeInfo_var); ListPool_1_Release_m3569998872(NULL /*static, unused*/, L_39, /*hidden argument*/ListPool_1_Release_m3569998872_MethodInfo_var); int32_t L_40 = V_0; return L_40; } } // UnityEngine.UI.RectMask2D UnityEngine.UI.MaskUtilities::GetRectMaskForClippable(UnityEngine.UI.IClippable) extern Il2CppClass* ListPool_1_t2454716658_il2cpp_TypeInfo_var; extern Il2CppClass* IClippable_t502791197_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m2190567382_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1145814749_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m1186224216_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3441100526_MethodInfo_var; extern const uint32_t MaskUtilities_GetRectMaskForClippable_m396614586_MetadataUsageId; extern "C" RectMask2D_t3357079374 * MaskUtilities_GetRectMaskForClippable_m396614586 (Il2CppObject * __this /* static, unused */, Il2CppObject * ___transform0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskUtilities_GetRectMaskForClippable_m396614586_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t430297630 * V_0 = NULL; RectMask2D_t3357079374 * V_1 = NULL; { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2454716658_il2cpp_TypeInfo_var); List_1_t430297630 * L_0 = ListPool_1_Get_m2190567382(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2190567382_MethodInfo_var); V_0 = L_0; V_1 = (RectMask2D_t3357079374 *)NULL; Il2CppObject * L_1 = ___transform0; NullCheck(L_1); RectTransform_t972643934 * L_2 = InterfaceFuncInvoker0< RectTransform_t972643934 * >::Invoke(1 /* UnityEngine.RectTransform UnityEngine.UI.IClippable::get_rectTransform() */, IClippable_t502791197_il2cpp_TypeInfo_var, L_1); List_1_t430297630 * L_3 = V_0; NullCheck(L_2); Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525(L_2, (bool)0, L_3, /*hidden argument*/Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525_MethodInfo_var); List_1_t430297630 * L_4 = V_0; NullCheck(L_4); int32_t L_5 = List_1_get_Count_m1145814749(L_4, /*hidden argument*/List_1_get_Count_m1145814749_MethodInfo_var); if ((((int32_t)L_5) <= ((int32_t)0))) { goto IL_0029; } } { List_1_t430297630 * L_6 = V_0; NullCheck(L_6); RectMask2D_t3357079374 * L_7 = List_1_get_Item_m1186224216(L_6, 0, /*hidden argument*/List_1_get_Item_m1186224216_MethodInfo_var); V_1 = L_7; } IL_0029: { List_1_t430297630 * L_8 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t2454716658_il2cpp_TypeInfo_var); ListPool_1_Release_m3441100526(NULL /*static, unused*/, L_8, /*hidden argument*/ListPool_1_Release_m3441100526_MethodInfo_var); RectMask2D_t3357079374 * L_9 = V_1; return L_9; } } // System.Void UnityEngine.UI.MaskUtilities::GetRectMasksForClip(UnityEngine.UI.RectMask2D,System.Collections.Generic.List`1<UnityEngine.UI.RectMask2D>) extern const MethodInfo* List_1_Clear_m3930129260_MethodInfo_var; extern const MethodInfo* Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525_MethodInfo_var; extern const uint32_t MaskUtilities_GetRectMasksForClip_m447525417_MetadataUsageId; extern "C" void MaskUtilities_GetRectMasksForClip_m447525417 (Il2CppObject * __this /* static, unused */, RectMask2D_t3357079374 * ___clipper0, List_1_t430297630 * ___masks1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (MaskUtilities_GetRectMasksForClip_m447525417_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t430297630 * L_0 = ___masks1; NullCheck(L_0); List_1_Clear_m3930129260(L_0, /*hidden argument*/List_1_Clear_m3930129260_MethodInfo_var); RectMask2D_t3357079374 * L_1 = ___clipper0; NullCheck(L_1); Transform_t1659122786 * L_2 = Component_get_transform_m4257140443(L_1, /*hidden argument*/NULL); List_1_t430297630 * L_3 = ___masks1; NullCheck(L_2); Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525(L_2, (bool)0, L_3, /*hidden argument*/Component_GetComponentsInParent_TisRectMask2D_t3357079374_m2818396525_MethodInfo_var); return; } } // System.Void UnityEngine.UI.Misc::Destroy(UnityEngine.Object) extern Il2CppClass* GameObject_t3674682005_il2cpp_TypeInfo_var; extern const uint32_t Misc_Destroy_m612433153_MetadataUsageId; extern "C" void Misc_Destroy_m612433153 (Il2CppObject * __this /* static, unused */, Object_t3071478659 * ___obj0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Misc_Destroy_m612433153_MetadataUsageId); s_Il2CppMethodIntialized = true; } GameObject_t3674682005 * V_0 = NULL; { Object_t3071478659 * L_0 = ___obj0; bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0045; } } { bool L_2 = Application_get_isPlaying_m987993960(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_2) { goto IL_003f; } } { Object_t3071478659 * L_3 = ___obj0; if (!((GameObject_t3674682005 *)IsInstSealed(L_3, GameObject_t3674682005_il2cpp_TypeInfo_var))) { goto IL_0034; } } { Object_t3071478659 * L_4 = ___obj0; V_0 = ((GameObject_t3674682005 *)IsInstSealed(L_4, GameObject_t3674682005_il2cpp_TypeInfo_var)); GameObject_t3674682005 * L_5 = V_0; NullCheck(L_5); Transform_t1659122786 * L_6 = GameObject_get_transform_m1278640159(L_5, /*hidden argument*/NULL); NullCheck(L_6); Transform_set_parent_m3231272063(L_6, (Transform_t1659122786 *)NULL, /*hidden argument*/NULL); } IL_0034: { Object_t3071478659 * L_7 = ___obj0; Object_Destroy_m176400816(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); goto IL_0045; } IL_003f: { Object_t3071478659 * L_8 = ___obj0; Object_DestroyImmediate_m349958679(NULL /*static, unused*/, L_8, /*hidden argument*/NULL); } IL_0045: { return; } } // System.Void UnityEngine.UI.Misc::DestroyImmediate(UnityEngine.Object) extern "C" void Misc_DestroyImmediate_m40421862 (Il2CppObject * __this /* static, unused */, Object_t3071478659 * ___obj0, const MethodInfo* method) { { Object_t3071478659 * L_0 = ___obj0; bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0027; } } { bool L_2 = Application_get_isEditor_m1279348309(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_2) { goto IL_0021; } } { Object_t3071478659 * L_3 = ___obj0; Object_DestroyImmediate_m349958679(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); goto IL_0027; } IL_0021: { Object_t3071478659 * L_4 = ___obj0; Object_Destroy_m176400816(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); } IL_0027: { return; } } // UnityEngine.UI.Navigation/Mode UnityEngine.UI.Navigation::get_mode() extern "C" int32_t Navigation_get_mode_m721480509 (Navigation_t1108456480 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_Mode_0(); return L_0; } } extern "C" int32_t Navigation_get_mode_m721480509_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); return Navigation_get_mode_m721480509(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_mode(UnityEngine.UI.Navigation/Mode) extern "C" void Navigation_set_mode_m1506614802 (Navigation_t1108456480 * __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_m1506614802_AdjustorThunk (Il2CppObject * __this, int32_t ___value0, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); Navigation_set_mode_m1506614802(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnUp() extern "C" Selectable_t1885181538 * Navigation_get_selectOnUp_m2566832818 (Navigation_t1108456480 * __this, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = __this->get_m_SelectOnUp_1(); return L_0; } } extern "C" Selectable_t1885181538 * Navigation_get_selectOnUp_m2566832818_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); return Navigation_get_selectOnUp_m2566832818(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnUp(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnUp_m2875366329 (Navigation_t1108456480 * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = ___value0; __this->set_m_SelectOnUp_1(L_0); return; } } extern "C" void Navigation_set_selectOnUp_m2875366329_AdjustorThunk (Il2CppObject * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); Navigation_set_selectOnUp_m2875366329(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnDown() extern "C" Selectable_t1885181538 * Navigation_get_selectOnDown_m929912185 (Navigation_t1108456480 * __this, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = __this->get_m_SelectOnDown_2(); return L_0; } } extern "C" Selectable_t1885181538 * Navigation_get_selectOnDown_m929912185_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); return Navigation_get_selectOnDown_m929912185(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnDown(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnDown_m2647056978 (Navigation_t1108456480 * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = ___value0; __this->set_m_SelectOnDown_2(L_0); return; } } extern "C" void Navigation_set_selectOnDown_m2647056978_AdjustorThunk (Il2CppObject * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); Navigation_set_selectOnDown_m2647056978(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnLeft() extern "C" Selectable_t1885181538 * Navigation_get_selectOnLeft_m1149209502 (Navigation_t1108456480 * __this, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = __this->get_m_SelectOnLeft_3(); return L_0; } } extern "C" Selectable_t1885181538 * Navigation_get_selectOnLeft_m1149209502_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); return Navigation_get_selectOnLeft_m1149209502(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnLeft(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnLeft_m619081677 (Navigation_t1108456480 * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = ___value0; __this->set_m_SelectOnLeft_3(L_0); return; } } extern "C" void Navigation_set_selectOnLeft_m619081677_AdjustorThunk (Il2CppObject * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); Navigation_set_selectOnLeft_m619081677(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Selectable UnityEngine.UI.Navigation::get_selectOnRight() extern "C" Selectable_t1885181538 * Navigation_get_selectOnRight_m2410966663 (Navigation_t1108456480 * __this, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = __this->get_m_SelectOnRight_4(); return L_0; } } extern "C" Selectable_t1885181538 * Navigation_get_selectOnRight_m2410966663_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); return Navigation_get_selectOnRight_m2410966663(_thisAdjusted, method); } // System.Void UnityEngine.UI.Navigation::set_selectOnRight(UnityEngine.UI.Selectable) extern "C" void Navigation_set_selectOnRight_m1544013280 (Navigation_t1108456480 * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = ___value0; __this->set_m_SelectOnRight_4(L_0); return; } } extern "C" void Navigation_set_selectOnRight_m1544013280_AdjustorThunk (Il2CppObject * __this, Selectable_t1885181538 * ___value0, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); Navigation_set_selectOnRight_m1544013280(_thisAdjusted, ___value0, method); } // UnityEngine.UI.Navigation UnityEngine.UI.Navigation::get_defaultNavigation() extern Il2CppClass* Navigation_t1108456480_il2cpp_TypeInfo_var; extern const uint32_t Navigation_get_defaultNavigation_m492829917_MetadataUsageId; extern "C" Navigation_t1108456480 Navigation_get_defaultNavigation_m492829917 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Navigation_get_defaultNavigation_m492829917_MetadataUsageId); s_Il2CppMethodIntialized = true; } Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Initobj (Navigation_t1108456480_il2cpp_TypeInfo_var, (&V_0)); (&V_0)->set_m_Mode_0(3); Navigation_t1108456480 L_0 = V_0; return L_0; } } // System.Boolean UnityEngine.UI.Navigation::Equals(UnityEngine.UI.Navigation) extern "C" bool Navigation_Equals_m3278735261 (Navigation_t1108456480 * __this, Navigation_t1108456480 ___other0, const MethodInfo* method) { int32_t G_B6_0 = 0; { int32_t L_0 = Navigation_get_mode_m721480509(__this, /*hidden argument*/NULL); int32_t L_1 = Navigation_get_mode_m721480509((&___other0), /*hidden argument*/NULL); if ((!(((uint32_t)L_0) == ((uint32_t)L_1)))) { goto IL_006b; } } { Selectable_t1885181538 * L_2 = Navigation_get_selectOnUp_m2566832818(__this, /*hidden argument*/NULL); Selectable_t1885181538 * L_3 = Navigation_get_selectOnUp_m2566832818((&___other0), /*hidden argument*/NULL); bool L_4 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_2, L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_006b; } } { Selectable_t1885181538 * L_5 = Navigation_get_selectOnDown_m929912185(__this, /*hidden argument*/NULL); Selectable_t1885181538 * L_6 = Navigation_get_selectOnDown_m929912185((&___other0), /*hidden argument*/NULL); bool L_7 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_006b; } } { Selectable_t1885181538 * L_8 = Navigation_get_selectOnLeft_m1149209502(__this, /*hidden argument*/NULL); Selectable_t1885181538 * L_9 = Navigation_get_selectOnLeft_m1149209502((&___other0), /*hidden argument*/NULL); bool L_10 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_006b; } } { Selectable_t1885181538 * L_11 = Navigation_get_selectOnRight_m2410966663(__this, /*hidden argument*/NULL); Selectable_t1885181538 * L_12 = Navigation_get_selectOnRight_m2410966663((&___other0), /*hidden argument*/NULL); bool L_13 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_11, L_12, /*hidden argument*/NULL); G_B6_0 = ((int32_t)(L_13)); goto IL_006c; } IL_006b: { G_B6_0 = 0; } IL_006c: { return (bool)G_B6_0; } } extern "C" bool Navigation_Equals_m3278735261_AdjustorThunk (Il2CppObject * __this, Navigation_t1108456480 ___other0, const MethodInfo* method) { Navigation_t1108456480 * _thisAdjusted = reinterpret_cast<Navigation_t1108456480 *>(__this + 1); return Navigation_Equals_m3278735261(_thisAdjusted, ___other0, method); } // Conversion methods for marshalling of: UnityEngine.UI.Navigation extern "C" void Navigation_t1108456480_marshal_pinvoke(const Navigation_t1108456480& unmarshaled, Navigation_t1108456480_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_t1108456480_marshal_pinvoke_back(const Navigation_t1108456480_marshaled_pinvoke& marshaled, Navigation_t1108456480& 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_t1108456480_marshal_pinvoke_cleanup(Navigation_t1108456480_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.UI.Navigation extern "C" void Navigation_t1108456480_marshal_com(const Navigation_t1108456480& unmarshaled, Navigation_t1108456480_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_t1108456480_marshal_com_back(const Navigation_t1108456480_marshaled_com& marshaled, Navigation_t1108456480& 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_t1108456480_marshal_com_cleanup(Navigation_t1108456480_marshaled_com& marshaled) { } // System.Void UnityEngine.UI.Outline::.ctor() extern "C" void Outline__ctor_m4004117817 (Outline_t3745177896 * __this, const MethodInfo* method) { { Shadow__ctor_m2944649643(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Outline::ModifyMesh(UnityEngine.UI.VertexHelper) extern Il2CppClass* ListPool_1_t3341702496_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m3130095824_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m4277682313_MethodInfo_var; extern const MethodInfo* List_1_get_Capacity_m792627810_MethodInfo_var; extern const MethodInfo* List_1_set_Capacity_m3820333071_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m2709067242_MethodInfo_var; extern const uint32_t Outline_ModifyMesh_m4125422123_MetadataUsageId; extern "C" void Outline_ModifyMesh_m4125422123 (Outline_t3745177896 * __this, VertexHelper_t3377436606 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Outline_ModifyMesh_m4125422123_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t1317283468 * V_0 = NULL; int32_t V_1 = 0; int32_t V_2 = 0; int32_t V_3 = 0; Vector2_t4282066565 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t4282066565 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t4282066565 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t4282066565 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t4282066565 V_8; memset(&V_8, 0, sizeof(V_8)); Vector2_t4282066565 V_9; memset(&V_9, 0, sizeof(V_9)); Vector2_t4282066565 V_10; memset(&V_10, 0, sizeof(V_10)); Vector2_t4282066565 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_000c; } } { return; } IL_000c: { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3341702496_il2cpp_TypeInfo_var); List_1_t1317283468 * L_1 = ListPool_1_Get_m3130095824(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3130095824_MethodInfo_var); V_0 = L_1; VertexHelper_t3377436606 * L_2 = ___vh0; List_1_t1317283468 * L_3 = V_0; NullCheck(L_2); VertexHelper_GetUIVertexStream_m1078623420(L_2, L_3, /*hidden argument*/NULL); List_1_t1317283468 * L_4 = V_0; NullCheck(L_4); int32_t L_5 = List_1_get_Count_m4277682313(L_4, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); V_1 = ((int32_t)((int32_t)L_5*(int32_t)5)); List_1_t1317283468 * L_6 = V_0; NullCheck(L_6); int32_t L_7 = List_1_get_Capacity_m792627810(L_6, /*hidden argument*/List_1_get_Capacity_m792627810_MethodInfo_var); int32_t L_8 = V_1; if ((((int32_t)L_7) >= ((int32_t)L_8))) { goto IL_0035; } } { List_1_t1317283468 * L_9 = V_0; int32_t L_10 = V_1; NullCheck(L_9); List_1_set_Capacity_m3820333071(L_9, L_10, /*hidden argument*/List_1_set_Capacity_m3820333071_MethodInfo_var); } IL_0035: { V_2 = 0; List_1_t1317283468 * L_11 = V_0; NullCheck(L_11); int32_t L_12 = List_1_get_Count_m4277682313(L_11, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); V_3 = L_12; List_1_t1317283468 * L_13 = V_0; Color_t4194546905 L_14 = Shadow_get_effectColor_m2953989785(__this, /*hidden argument*/NULL); Color32_t598853688 L_15 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_14, /*hidden argument*/NULL); int32_t L_16 = V_2; List_1_t1317283468 * L_17 = V_0; NullCheck(L_17); int32_t L_18 = List_1_get_Count_m4277682313(L_17, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); Vector2_t4282066565 L_19 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_4 = L_19; float L_20 = (&V_4)->get_x_1(); Vector2_t4282066565 L_21 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_5 = L_21; float L_22 = (&V_5)->get_y_2(); Shadow_ApplyShadowZeroAlloc_m338158484(__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_t1317283468 * L_24 = V_0; NullCheck(L_24); int32_t L_25 = List_1_get_Count_m4277682313(L_24, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); V_3 = L_25; List_1_t1317283468 * L_26 = V_0; Color_t4194546905 L_27 = Shadow_get_effectColor_m2953989785(__this, /*hidden argument*/NULL); Color32_t598853688 L_28 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_27, /*hidden argument*/NULL); int32_t L_29 = V_2; List_1_t1317283468 * L_30 = V_0; NullCheck(L_30); int32_t L_31 = List_1_get_Count_m4277682313(L_30, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); Vector2_t4282066565 L_32 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_6 = L_32; float L_33 = (&V_6)->get_x_1(); Vector2_t4282066565 L_34 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_7 = L_34; float L_35 = (&V_7)->get_y_2(); Shadow_ApplyShadowZeroAlloc_m338158484(__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_t1317283468 * L_37 = V_0; NullCheck(L_37); int32_t L_38 = List_1_get_Count_m4277682313(L_37, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); V_3 = L_38; List_1_t1317283468 * L_39 = V_0; Color_t4194546905 L_40 = Shadow_get_effectColor_m2953989785(__this, /*hidden argument*/NULL); Color32_t598853688 L_41 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_40, /*hidden argument*/NULL); int32_t L_42 = V_2; List_1_t1317283468 * L_43 = V_0; NullCheck(L_43); int32_t L_44 = List_1_get_Count_m4277682313(L_43, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); Vector2_t4282066565 L_45 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_8 = L_45; float L_46 = (&V_8)->get_x_1(); Vector2_t4282066565 L_47 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_9 = L_47; float L_48 = (&V_9)->get_y_2(); Shadow_ApplyShadowZeroAlloc_m338158484(__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_t1317283468 * L_50 = V_0; NullCheck(L_50); int32_t L_51 = List_1_get_Count_m4277682313(L_50, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); V_3 = L_51; List_1_t1317283468 * L_52 = V_0; Color_t4194546905 L_53 = Shadow_get_effectColor_m2953989785(__this, /*hidden argument*/NULL); Color32_t598853688 L_54 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_53, /*hidden argument*/NULL); int32_t L_55 = V_2; List_1_t1317283468 * L_56 = V_0; NullCheck(L_56); int32_t L_57 = List_1_get_Count_m4277682313(L_56, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); Vector2_t4282066565 L_58 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_10 = L_58; float L_59 = (&V_10)->get_x_1(); Vector2_t4282066565 L_60 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_11 = L_60; float L_61 = (&V_11)->get_y_2(); Shadow_ApplyShadowZeroAlloc_m338158484(__this, L_52, L_54, L_55, L_57, ((-L_59)), ((-L_61)), /*hidden argument*/NULL); VertexHelper_t3377436606 * L_62 = ___vh0; NullCheck(L_62); VertexHelper_Clear_m412394180(L_62, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_63 = ___vh0; List_1_t1317283468 * L_64 = V_0; NullCheck(L_63); VertexHelper_AddUIVertexTriangleStream_m1263262953(L_63, L_64, /*hidden argument*/NULL); List_1_t1317283468 * L_65 = V_0; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3341702496_il2cpp_TypeInfo_var); ListPool_1_Release_m2709067242(NULL /*static, unused*/, L_65, /*hidden argument*/ListPool_1_Release_m2709067242_MethodInfo_var); return; } } // System.Void UnityEngine.UI.PositionAsUV1::.ctor() extern "C" void PositionAsUV1__ctor_m3124267078 (PositionAsUV1_t4062429115 * __this, const MethodInfo* method) { { BaseMeshEffect__ctor_m2332499996(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.PositionAsUV1::ModifyMesh(UnityEngine.UI.VertexHelper) extern Il2CppClass* UIVertex_t4244065212_il2cpp_TypeInfo_var; extern const uint32_t PositionAsUV1_ModifyMesh_m2424047928_MetadataUsageId; extern "C" void PositionAsUV1_ModifyMesh_m2424047928 (PositionAsUV1_t4062429115 * __this, VertexHelper_t3377436606 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (PositionAsUV1_ModifyMesh_m2424047928_MetadataUsageId); s_Il2CppMethodIntialized = true; } UIVertex_t4244065212 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t V_1 = 0; { Initobj (UIVertex_t4244065212_il2cpp_TypeInfo_var, (&V_0)); V_1 = 0; goto IL_0048; } IL_000f: { VertexHelper_t3377436606 * L_0 = ___vh0; int32_t L_1 = V_1; NullCheck(L_0); VertexHelper_PopulateUIVertex_m910319817(L_0, (&V_0), L_1, /*hidden argument*/NULL); Vector3_t4282066566 * L_2 = (&V_0)->get_address_of_position_0(); float L_3 = L_2->get_x_1(); Vector3_t4282066566 * L_4 = (&V_0)->get_address_of_position_0(); float L_5 = L_4->get_y_2(); Vector2_t4282066565 L_6; memset(&L_6, 0, sizeof(L_6)); Vector2__ctor_m1517109030(&L_6, L_3, L_5, /*hidden argument*/NULL); (&V_0)->set_uv1_4(L_6); VertexHelper_t3377436606 * L_7 = ___vh0; UIVertex_t4244065212 L_8 = V_0; int32_t L_9 = V_1; NullCheck(L_7); VertexHelper_SetUIVertex_m3429482805(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_0048: { int32_t L_11 = V_1; VertexHelper_t3377436606 * L_12 = ___vh0; NullCheck(L_12); int32_t L_13 = VertexHelper_get_currentVertCount_m3425330353(L_12, /*hidden argument*/NULL); if ((((int32_t)L_11) < ((int32_t)L_13))) { goto IL_000f; } } { return; } } // System.Void UnityEngine.UI.RawImage::.ctor() extern "C" void RawImage__ctor_m3149617176 (RawImage_t821930207 * __this, const MethodInfo* method) { { Rect_t4241904616 L_0; memset(&L_0, 0, sizeof(L_0)); Rect__ctor_m3291325233(&L_0, (0.0f), (0.0f), (1.0f), (1.0f), /*hidden argument*/NULL); __this->set_m_UVRect_29(L_0); MaskableGraphic__ctor_m3514233785(__this, /*hidden argument*/NULL); Graphic_set_useLegacyMeshGeneration_m693817504(__this, (bool)0, /*hidden argument*/NULL); return; } } // UnityEngine.Texture UnityEngine.UI.RawImage::get_mainTexture() extern Il2CppClass* Graphic_t836799438_il2cpp_TypeInfo_var; extern const uint32_t RawImage_get_mainTexture_m3607327198_MetadataUsageId; extern "C" Texture_t2526458961 * RawImage_get_mainTexture_m3607327198 (RawImage_t821930207 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RawImage_get_mainTexture_m3607327198_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Texture_t2526458961 * L_0 = __this->get_m_Texture_28(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_004a; } } { Material_t3870600107 * L_2 = VirtFuncInvoker0< Material_t3870600107 * >::Invoke(26 /* UnityEngine.Material UnityEngine.UI.Graphic::get_material() */, __this); bool L_3 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_2, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0044; } } { Material_t3870600107 * L_4 = VirtFuncInvoker0< Material_t3870600107 * >::Invoke(26 /* UnityEngine.Material UnityEngine.UI.Graphic::get_material() */, __this); NullCheck(L_4); Texture_t2526458961 * L_5 = Material_get_mainTexture_m1012267054(L_4, /*hidden argument*/NULL); bool L_6 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_0044; } } { Material_t3870600107 * L_7 = VirtFuncInvoker0< Material_t3870600107 * >::Invoke(26 /* UnityEngine.Material UnityEngine.UI.Graphic::get_material() */, __this); NullCheck(L_7); Texture_t2526458961 * L_8 = Material_get_mainTexture_m1012267054(L_7, /*hidden argument*/NULL); return L_8; } IL_0044: { IL2CPP_RUNTIME_CLASS_INIT(Graphic_t836799438_il2cpp_TypeInfo_var); Texture2D_t3884108195 * L_9 = ((Graphic_t836799438_StaticFields*)Graphic_t836799438_il2cpp_TypeInfo_var->static_fields)->get_s_WhiteTexture_3(); return L_9; } IL_004a: { Texture_t2526458961 * L_10 = __this->get_m_Texture_28(); return L_10; } } // UnityEngine.Texture UnityEngine.UI.RawImage::get_texture() extern "C" Texture_t2526458961 * RawImage_get_texture_m2545896727 (RawImage_t821930207 * __this, const MethodInfo* method) { { Texture_t2526458961 * L_0 = __this->get_m_Texture_28(); return L_0; } } // System.Void UnityEngine.UI.RawImage::set_texture(UnityEngine.Texture) extern "C" void RawImage_set_texture_m153141914 (RawImage_t821930207 * __this, Texture_t2526458961 * ___value0, const MethodInfo* method) { { Texture_t2526458961 * L_0 = __this->get_m_Texture_28(); Texture_t2526458961 * L_1 = ___value0; bool L_2 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0012; } } { return; } IL_0012: { Texture_t2526458961 * L_3 = ___value0; __this->set_m_Texture_28(L_3); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Graphic::SetMaterialDirty() */, __this); return; } } // UnityEngine.Rect UnityEngine.UI.RawImage::get_uvRect() extern "C" Rect_t4241904616 RawImage_get_uvRect_m605244702 (RawImage_t821930207 * __this, const MethodInfo* method) { { Rect_t4241904616 L_0 = __this->get_m_UVRect_29(); return L_0; } } // System.Void UnityEngine.UI.RawImage::set_uvRect(UnityEngine.Rect) extern "C" void RawImage_set_uvRect_m1381047731 (RawImage_t821930207 * __this, Rect_t4241904616 ___value0, const MethodInfo* method) { { Rect_t4241904616 L_0 = __this->get_m_UVRect_29(); Rect_t4241904616 L_1 = ___value0; bool L_2 = Rect_op_Equality_m1552341101(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0012; } } { return; } IL_0012: { Rect_t4241904616 L_3 = ___value0; __this->set_m_UVRect_29(L_3); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); return; } } // System.Void UnityEngine.UI.RawImage::SetNativeSize() extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t RawImage_SetNativeSize_m131446896_MetadataUsageId; extern "C" void RawImage_SetNativeSize_m131446896 (RawImage_t821930207 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RawImage_SetNativeSize_m131446896_MetadataUsageId); s_Il2CppMethodIntialized = true; } Texture_t2526458961 * V_0 = NULL; int32_t V_1 = 0; int32_t V_2 = 0; Rect_t4241904616 V_3; memset(&V_3, 0, sizeof(V_3)); Rect_t4241904616 V_4; memset(&V_4, 0, sizeof(V_4)); { Texture_t2526458961 * L_0 = VirtFuncInvoker0< Texture_t2526458961 * >::Invoke(29 /* UnityEngine.Texture UnityEngine.UI.RawImage::get_mainTexture() */, __this); V_0 = L_0; Texture_t2526458961 * L_1 = V_0; bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0076; } } { Texture_t2526458961 * 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_t4241904616 L_5 = RawImage_get_uvRect_m605244702(__this, /*hidden argument*/NULL); V_3 = L_5; float L_6 = Rect_get_width_m2824209432((&V_3), /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); int32_t L_7 = Mathf_RoundToInt_m3163545820(NULL /*static, unused*/, ((float)((float)(((float)((float)L_4)))*(float)L_6)), /*hidden argument*/NULL); V_1 = L_7; Texture_t2526458961 * L_8 = V_0; NullCheck(L_8); int32_t L_9 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 UnityEngine.Texture::get_height() */, L_8); Rect_t4241904616 L_10 = RawImage_get_uvRect_m605244702(__this, /*hidden argument*/NULL); V_4 = L_10; float L_11 = Rect_get_height_m2154960823((&V_4), /*hidden argument*/NULL); int32_t L_12 = Mathf_RoundToInt_m3163545820(NULL /*static, unused*/, ((float)((float)(((float)((float)L_9)))*(float)L_11)), /*hidden argument*/NULL); V_2 = L_12; RectTransform_t972643934 * L_13 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); RectTransform_t972643934 * L_14 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); NullCheck(L_14); Vector2_t4282066565 L_15 = RectTransform_get_anchorMin_m688674174(L_14, /*hidden argument*/NULL); NullCheck(L_13); RectTransform_set_anchorMax_m715345817(L_13, L_15, /*hidden argument*/NULL); RectTransform_t972643934 * L_16 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); int32_t L_17 = V_1; int32_t L_18 = V_2; Vector2_t4282066565 L_19; memset(&L_19, 0, sizeof(L_19)); Vector2__ctor_m1517109030(&L_19, (((float)((float)L_17))), (((float)((float)L_18))), /*hidden argument*/NULL); NullCheck(L_16); RectTransform_set_sizeDelta_m1223846609(L_16, L_19, /*hidden argument*/NULL); } IL_0076: { return; } } // System.Void UnityEngine.UI.RawImage::OnPopulateMesh(UnityEngine.UI.VertexHelper) extern "C" void RawImage_OnPopulateMesh_m1483685179 (RawImage_t821930207 * __this, VertexHelper_t3377436606 * ___vh0, const MethodInfo* method) { Texture_t2526458961 * V_0 = NULL; Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); Vector4_t4282066567 V_2; memset(&V_2, 0, sizeof(V_2)); Color_t4194546905 V_3; memset(&V_3, 0, sizeof(V_3)); { Texture_t2526458961 * L_0 = VirtFuncInvoker0< Texture_t2526458961 * >::Invoke(29 /* UnityEngine.Texture UnityEngine.UI.RawImage::get_mainTexture() */, __this); V_0 = L_0; VertexHelper_t3377436606 * L_1 = ___vh0; NullCheck(L_1); VertexHelper_Clear_m412394180(L_1, /*hidden argument*/NULL); Texture_t2526458961 * L_2 = V_0; bool L_3 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_2, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0154; } } { Rect_t4241904616 L_4 = Graphic_GetPixelAdjustedRect_m517144655(__this, /*hidden argument*/NULL); V_1 = L_4; float L_5 = Rect_get_x_m982385354((&V_1), /*hidden argument*/NULL); float L_6 = Rect_get_y_m982386315((&V_1), /*hidden argument*/NULL); float L_7 = Rect_get_x_m982385354((&V_1), /*hidden argument*/NULL); float L_8 = Rect_get_width_m2824209432((&V_1), /*hidden argument*/NULL); float L_9 = Rect_get_y_m982386315((&V_1), /*hidden argument*/NULL); float L_10 = Rect_get_height_m2154960823((&V_1), /*hidden argument*/NULL); Vector4__ctor_m2441427762((&V_2), L_5, L_6, ((float)((float)L_7+(float)L_8)), ((float)((float)L_9+(float)L_10)), /*hidden argument*/NULL); Color_t4194546905 L_11 = Graphic_get_color_m2048831972(__this, /*hidden argument*/NULL); V_3 = L_11; VertexHelper_t3377436606 * L_12 = ___vh0; float L_13 = (&V_2)->get_x_1(); float L_14 = (&V_2)->get_y_2(); Vector3_t4282066566 L_15; memset(&L_15, 0, sizeof(L_15)); Vector3__ctor_m1846874791(&L_15, L_13, L_14, /*hidden argument*/NULL); Color_t4194546905 L_16 = V_3; Color32_t598853688 L_17 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_16, /*hidden argument*/NULL); Rect_t4241904616 * L_18 = __this->get_address_of_m_UVRect_29(); float L_19 = Rect_get_xMin_m371109962(L_18, /*hidden argument*/NULL); Rect_t4241904616 * L_20 = __this->get_address_of_m_UVRect_29(); float L_21 = Rect_get_yMin_m399739113(L_20, /*hidden argument*/NULL); Vector2_t4282066565 L_22; memset(&L_22, 0, sizeof(L_22)); Vector2__ctor_m1517109030(&L_22, L_19, L_21, /*hidden argument*/NULL); NullCheck(L_12); VertexHelper_AddVert_m1490065189(L_12, L_15, L_17, L_22, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_23 = ___vh0; float L_24 = (&V_2)->get_x_1(); float L_25 = (&V_2)->get_w_4(); Vector3_t4282066566 L_26; memset(&L_26, 0, sizeof(L_26)); Vector3__ctor_m1846874791(&L_26, L_24, L_25, /*hidden argument*/NULL); Color_t4194546905 L_27 = V_3; Color32_t598853688 L_28 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_27, /*hidden argument*/NULL); Rect_t4241904616 * L_29 = __this->get_address_of_m_UVRect_29(); float L_30 = Rect_get_xMin_m371109962(L_29, /*hidden argument*/NULL); Rect_t4241904616 * L_31 = __this->get_address_of_m_UVRect_29(); float L_32 = Rect_get_yMax_m399510395(L_31, /*hidden argument*/NULL); Vector2_t4282066565 L_33; memset(&L_33, 0, sizeof(L_33)); Vector2__ctor_m1517109030(&L_33, L_30, L_32, /*hidden argument*/NULL); NullCheck(L_23); VertexHelper_AddVert_m1490065189(L_23, L_26, L_28, L_33, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_34 = ___vh0; float L_35 = (&V_2)->get_z_3(); float L_36 = (&V_2)->get_w_4(); Vector3_t4282066566 L_37; memset(&L_37, 0, sizeof(L_37)); Vector3__ctor_m1846874791(&L_37, L_35, L_36, /*hidden argument*/NULL); Color_t4194546905 L_38 = V_3; Color32_t598853688 L_39 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_38, /*hidden argument*/NULL); Rect_t4241904616 * L_40 = __this->get_address_of_m_UVRect_29(); float L_41 = Rect_get_xMax_m370881244(L_40, /*hidden argument*/NULL); Rect_t4241904616 * L_42 = __this->get_address_of_m_UVRect_29(); float L_43 = Rect_get_yMax_m399510395(L_42, /*hidden argument*/NULL); Vector2_t4282066565 L_44; memset(&L_44, 0, sizeof(L_44)); Vector2__ctor_m1517109030(&L_44, L_41, L_43, /*hidden argument*/NULL); NullCheck(L_34); VertexHelper_AddVert_m1490065189(L_34, L_37, L_39, L_44, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_45 = ___vh0; float L_46 = (&V_2)->get_z_3(); float L_47 = (&V_2)->get_y_2(); Vector3_t4282066566 L_48; memset(&L_48, 0, sizeof(L_48)); Vector3__ctor_m1846874791(&L_48, L_46, L_47, /*hidden argument*/NULL); Color_t4194546905 L_49 = V_3; Color32_t598853688 L_50 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_49, /*hidden argument*/NULL); Rect_t4241904616 * L_51 = __this->get_address_of_m_UVRect_29(); float L_52 = Rect_get_xMax_m370881244(L_51, /*hidden argument*/NULL); Rect_t4241904616 * L_53 = __this->get_address_of_m_UVRect_29(); float L_54 = Rect_get_yMin_m399739113(L_53, /*hidden argument*/NULL); Vector2_t4282066565 L_55; memset(&L_55, 0, sizeof(L_55)); Vector2__ctor_m1517109030(&L_55, L_52, L_54, /*hidden argument*/NULL); NullCheck(L_45); VertexHelper_AddVert_m1490065189(L_45, L_48, L_50, L_55, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_56 = ___vh0; NullCheck(L_56); VertexHelper_AddTriangle_m514578993(L_56, 0, 1, 2, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_57 = ___vh0; NullCheck(L_57); VertexHelper_AddTriangle_m514578993(L_57, 2, 3, 0, /*hidden argument*/NULL); } IL_0154: { return; } } // System.Void UnityEngine.UI.RectangularVertexClipper::.ctor() extern Il2CppClass* Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var; extern const uint32_t RectangularVertexClipper__ctor_m1771616896_MetadataUsageId; extern "C" void RectangularVertexClipper__ctor_m1771616896 (RectangularVertexClipper_t1294793591 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectangularVertexClipper__ctor_m1771616896_MetadataUsageId); s_Il2CppMethodIntialized = true; } { __this->set_m_WorldCorners_0(((Vector3U5BU5D_t215400611*)SZArrayNew(Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var, (uint32_t)4))); __this->set_m_CanvasCorners_1(((Vector3U5BU5D_t215400611*)SZArrayNew(Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var, (uint32_t)4))); Object__ctor_m1772956182(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Rect UnityEngine.UI.RectangularVertexClipper::GetCanvasRect(UnityEngine.RectTransform,UnityEngine.Canvas) extern const MethodInfo* Component_GetComponent_TisTransform_t1659122786_m811718087_MethodInfo_var; extern const uint32_t RectangularVertexClipper_GetCanvasRect_m4121299266_MetadataUsageId; extern "C" Rect_t4241904616 RectangularVertexClipper_GetCanvasRect_m4121299266 (RectangularVertexClipper_t1294793591 * __this, RectTransform_t972643934 * ___t0, Canvas_t2727140764 * ___c1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectangularVertexClipper_GetCanvasRect_m4121299266_MetadataUsageId); s_Il2CppMethodIntialized = true; } Transform_t1659122786 * V_0 = NULL; int32_t V_1 = 0; { RectTransform_t972643934 * L_0 = ___t0; Vector3U5BU5D_t215400611* L_1 = __this->get_m_WorldCorners_0(); NullCheck(L_0); RectTransform_GetWorldCorners_m1829917190(L_0, L_1, /*hidden argument*/NULL); Canvas_t2727140764 * L_2 = ___c1; NullCheck(L_2); Transform_t1659122786 * L_3 = Component_GetComponent_TisTransform_t1659122786_m811718087(L_2, /*hidden argument*/Component_GetComponent_TisTransform_t1659122786_m811718087_MethodInfo_var); V_0 = L_3; V_1 = 0; goto IL_0046; } IL_001a: { Vector3U5BU5D_t215400611* L_4 = __this->get_m_CanvasCorners_1(); int32_t L_5 = V_1; NullCheck(L_4); IL2CPP_ARRAY_BOUNDS_CHECK(L_4, L_5); Transform_t1659122786 * L_6 = V_0; Vector3U5BU5D_t215400611* L_7 = __this->get_m_WorldCorners_0(); int32_t L_8 = V_1; NullCheck(L_7); IL2CPP_ARRAY_BOUNDS_CHECK(L_7, L_8); NullCheck(L_6); Vector3_t4282066566 L_9 = Transform_InverseTransformPoint_m1626812000(L_6, (*(Vector3_t4282066566 *)((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8)))), /*hidden argument*/NULL); (*(Vector3_t4282066566 *)((L_4)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_5)))) = L_9; int32_t L_10 = V_1; V_1 = ((int32_t)((int32_t)L_10+(int32_t)1)); } IL_0046: { int32_t L_11 = V_1; if ((((int32_t)L_11) < ((int32_t)4))) { goto IL_001a; } } { Vector3U5BU5D_t215400611* L_12 = __this->get_m_CanvasCorners_1(); NullCheck(L_12); IL2CPP_ARRAY_BOUNDS_CHECK(L_12, 0); float L_13 = ((L_12)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t215400611* L_14 = __this->get_m_CanvasCorners_1(); NullCheck(L_14); IL2CPP_ARRAY_BOUNDS_CHECK(L_14, 0); float L_15 = ((L_14)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Vector3U5BU5D_t215400611* L_16 = __this->get_m_CanvasCorners_1(); NullCheck(L_16); IL2CPP_ARRAY_BOUNDS_CHECK(L_16, 2); float L_17 = ((L_16)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_x_1(); Vector3U5BU5D_t215400611* L_18 = __this->get_m_CanvasCorners_1(); NullCheck(L_18); IL2CPP_ARRAY_BOUNDS_CHECK(L_18, 0); float L_19 = ((L_18)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_x_1(); Vector3U5BU5D_t215400611* L_20 = __this->get_m_CanvasCorners_1(); NullCheck(L_20); IL2CPP_ARRAY_BOUNDS_CHECK(L_20, 2); float L_21 = ((L_20)->GetAddressAt(static_cast<il2cpp_array_size_t>(2)))->get_y_2(); Vector3U5BU5D_t215400611* L_22 = __this->get_m_CanvasCorners_1(); NullCheck(L_22); IL2CPP_ARRAY_BOUNDS_CHECK(L_22, 0); float L_23 = ((L_22)->GetAddressAt(static_cast<il2cpp_array_size_t>(0)))->get_y_2(); Rect_t4241904616 L_24; memset(&L_24, 0, sizeof(L_24)); Rect__ctor_m3291325233(&L_24, L_13, L_15, ((float)((float)L_17-(float)L_19)), ((float)((float)L_21-(float)L_23)), /*hidden argument*/NULL); return L_24; } } // System.Void UnityEngine.UI.RectMask2D::.ctor() extern Il2CppClass* RectangularVertexClipper_t1294793591_il2cpp_TypeInfo_var; extern Il2CppClass* List_1_t1870976749_il2cpp_TypeInfo_var; extern Il2CppClass* List_1_t430297630_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m1202902352_MethodInfo_var; extern const MethodInfo* List_1__ctor_m2229028673_MethodInfo_var; extern const uint32_t RectMask2D__ctor_m743839689_MetadataUsageId; extern "C" void RectMask2D__ctor_m743839689 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D__ctor_m743839689_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectangularVertexClipper_t1294793591 * L_0 = (RectangularVertexClipper_t1294793591 *)il2cpp_codegen_object_new(RectangularVertexClipper_t1294793591_il2cpp_TypeInfo_var); RectangularVertexClipper__ctor_m1771616896(L_0, /*hidden argument*/NULL); __this->set_m_VertexClipper_2(L_0); List_1_t1870976749 * L_1 = (List_1_t1870976749 *)il2cpp_codegen_object_new(List_1_t1870976749_il2cpp_TypeInfo_var); List_1__ctor_m1202902352(L_1, /*hidden argument*/List_1__ctor_m1202902352_MethodInfo_var); __this->set_m_ClipTargets_4(L_1); List_1_t430297630 * L_2 = (List_1_t430297630 *)il2cpp_codegen_object_new(List_1_t430297630_il2cpp_TypeInfo_var); List_1__ctor_m2229028673(L_2, /*hidden argument*/List_1__ctor_m2229028673_MethodInfo_var); __this->set_m_Clippers_6(L_2); UIBehaviour__ctor_m1261553468(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Rect UnityEngine.UI.RectMask2D::get_canvasRect() extern Il2CppClass* ListPool_1_t1824778048_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m3707028656_MethodInfo_var; extern const MethodInfo* GameObject_GetComponentsInParent_TisCanvas_t2727140764_m3002356423_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1137691305_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m3400185932_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3200393738_MethodInfo_var; extern const uint32_t RectMask2D_get_canvasRect_m3883544836_MetadataUsageId; extern "C" Rect_t4241904616 RectMask2D_get_canvasRect_m3883544836 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_get_canvasRect_m3883544836_MetadataUsageId); s_Il2CppMethodIntialized = true; } Canvas_t2727140764 * V_0 = NULL; List_1_t4095326316 * V_1 = NULL; { V_0 = (Canvas_t2727140764 *)NULL; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t1824778048_il2cpp_TypeInfo_var); List_1_t4095326316 * L_0 = ListPool_1_Get_m3707028656(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3707028656_MethodInfo_var); V_1 = L_0; GameObject_t3674682005 * L_1 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); List_1_t4095326316 * L_2 = V_1; NullCheck(L_1); GameObject_GetComponentsInParent_TisCanvas_t2727140764_m3002356423(L_1, (bool)0, L_2, /*hidden argument*/GameObject_GetComponentsInParent_TisCanvas_t2727140764_m3002356423_MethodInfo_var); List_1_t4095326316 * L_3 = V_1; NullCheck(L_3); int32_t L_4 = List_1_get_Count_m1137691305(L_3, /*hidden argument*/List_1_get_Count_m1137691305_MethodInfo_var); if ((((int32_t)L_4) <= ((int32_t)0))) { goto IL_0030; } } { List_1_t4095326316 * L_5 = V_1; List_1_t4095326316 * L_6 = V_1; NullCheck(L_6); int32_t L_7 = List_1_get_Count_m1137691305(L_6, /*hidden argument*/List_1_get_Count_m1137691305_MethodInfo_var); NullCheck(L_5); Canvas_t2727140764 * L_8 = List_1_get_Item_m3400185932(L_5, ((int32_t)((int32_t)L_7-(int32_t)1)), /*hidden argument*/List_1_get_Item_m3400185932_MethodInfo_var); V_0 = L_8; } IL_0030: { List_1_t4095326316 * L_9 = V_1; IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t1824778048_il2cpp_TypeInfo_var); ListPool_1_Release_m3200393738(NULL /*static, unused*/, L_9, /*hidden argument*/ListPool_1_Release_m3200393738_MethodInfo_var); RectangularVertexClipper_t1294793591 * L_10 = __this->get_m_VertexClipper_2(); RectTransform_t972643934 * L_11 = RectMask2D_get_rectTransform_m3879504040(__this, /*hidden argument*/NULL); Canvas_t2727140764 * L_12 = V_0; NullCheck(L_10); Rect_t4241904616 L_13 = RectangularVertexClipper_GetCanvasRect_m4121299266(L_10, L_11, L_12, /*hidden argument*/NULL); return L_13; } } // UnityEngine.RectTransform UnityEngine.UI.RectMask2D::get_rectTransform() extern const MethodInfo* Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var; extern const uint32_t RectMask2D_get_rectTransform_m3879504040_MetadataUsageId; extern "C" RectTransform_t972643934 * RectMask2D_get_rectTransform_m3879504040 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_get_rectTransform_m3879504040_MetadataUsageId); s_Il2CppMethodIntialized = true; } RectTransform_t972643934 * V_0 = NULL; RectTransform_t972643934 * G_B2_0 = NULL; RectTransform_t972643934 * G_B1_0 = NULL; { RectTransform_t972643934 * L_0 = __this->get_m_RectTransform_3(); RectTransform_t972643934 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_001c; } } { RectTransform_t972643934 * L_2 = Component_GetComponent_TisRectTransform_t972643934_m1940403147(__this, /*hidden argument*/Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var); RectTransform_t972643934 * L_3 = L_2; V_0 = L_3; __this->set_m_RectTransform_3(L_3); RectTransform_t972643934 * L_4 = V_0; G_B2_0 = L_4; } IL_001c: { return G_B2_0; } } // System.Void UnityEngine.UI.RectMask2D::OnEnable() extern "C" void RectMask2D_OnEnable_m4063473437 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { { UIBehaviour_OnEnable_m4047103690(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)1); ClipperRegistry_Register_m2777461237(NULL /*static, unused*/, __this, /*hidden argument*/NULL); MaskUtilities_Notify2DMaskStateChanged_m2199550555(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.RectMask2D::OnDisable() extern const MethodInfo* List_1_Clear_m2904002939_MethodInfo_var; extern const MethodInfo* List_1_Clear_m3930129260_MethodInfo_var; extern const uint32_t RectMask2D_OnDisable_m1854562224_MetadataUsageId; extern "C" void RectMask2D_OnDisable_m1854562224 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_OnDisable_m1854562224_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UIBehaviour_OnDisable_m1347100067(__this, /*hidden argument*/NULL); List_1_t1870976749 * L_0 = __this->get_m_ClipTargets_4(); NullCheck(L_0); List_1_Clear_m2904002939(L_0, /*hidden argument*/List_1_Clear_m2904002939_MethodInfo_var); List_1_t430297630 * L_1 = __this->get_m_Clippers_6(); NullCheck(L_1); List_1_Clear_m3930129260(L_1, /*hidden argument*/List_1_Clear_m3930129260_MethodInfo_var); ClipperRegistry_Unregister_m926013180(NULL /*static, unused*/, __this, /*hidden argument*/NULL); MaskUtilities_Notify2DMaskStateChanged_m2199550555(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.RectMask2D::IsRaycastLocationValid(UnityEngine.Vector2,UnityEngine.Camera) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t RectMask2D_IsRaycastLocationValid_m3081840229_MetadataUsageId; extern "C" bool RectMask2D_IsRaycastLocationValid_m3081840229 (RectMask2D_t3357079374 * __this, Vector2_t4282066565 ___sp0, Camera_t2727095145 * ___eventCamera1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_IsRaycastLocationValid_m3081840229_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = Behaviour_get_isActiveAndEnabled_m210167461(__this, /*hidden argument*/NULL); if (L_0) { goto IL_000d; } } { return (bool)1; } IL_000d: { RectTransform_t972643934 * L_1 = RectMask2D_get_rectTransform_m3879504040(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_2 = ___sp0; Camera_t2727095145 * L_3 = ___eventCamera1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_4 = RectTransformUtility_RectangleContainsScreenPoint_m1460676684(NULL /*static, unused*/, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } } // System.Void UnityEngine.UI.RectMask2D::PerformClipping() extern Il2CppClass* IClippable_t502791197_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Item_m3720088169_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m2113842540_MethodInfo_var; extern const uint32_t RectMask2D_PerformClipping_m2105337834_MetadataUsageId; extern "C" void RectMask2D_PerformClipping_m2105337834 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_PerformClipping_m2105337834_MetadataUsageId); s_Il2CppMethodIntialized = true; } bool V_0 = false; Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); int32_t V_2 = 0; int32_t V_3 = 0; { bool L_0 = __this->get_m_ShouldRecalculateClipRects_5(); if (!L_0) { goto IL_001e; } } { List_1_t430297630 * L_1 = __this->get_m_Clippers_6(); MaskUtilities_GetRectMasksForClip_m447525417(NULL /*static, unused*/, __this, L_1, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)0); } IL_001e: { V_0 = (bool)1; List_1_t430297630 * L_2 = __this->get_m_Clippers_6(); Rect_t4241904616 L_3 = Clipping_FindCullAndClipWorldRect_m3007966961(NULL /*static, unused*/, L_2, (&V_0), /*hidden argument*/NULL); V_1 = L_3; Rect_t4241904616 L_4 = V_1; Rect_t4241904616 L_5 = __this->get_m_LastClipRectCanvasSpace_7(); bool L_6 = Rect_op_Inequality_m2236552616(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); if (L_6) { goto IL_004a; } } { bool L_7 = __this->get_m_ForceClip_9(); if (!L_7) { goto IL_0087; } } IL_004a: { V_2 = 0; goto IL_0068; } IL_0051: { List_1_t1870976749 * L_8 = __this->get_m_ClipTargets_4(); int32_t L_9 = V_2; NullCheck(L_8); Il2CppObject * L_10 = List_1_get_Item_m3720088169(L_8, L_9, /*hidden argument*/List_1_get_Item_m3720088169_MethodInfo_var); Rect_t4241904616 L_11 = V_1; bool L_12 = V_0; NullCheck(L_10); InterfaceActionInvoker2< Rect_t4241904616 , bool >::Invoke(3 /* System.Void UnityEngine.UI.IClippable::SetClipRect(UnityEngine.Rect,System.Boolean) */, IClippable_t502791197_il2cpp_TypeInfo_var, L_10, L_11, L_12); int32_t L_13 = V_2; V_2 = ((int32_t)((int32_t)L_13+(int32_t)1)); } IL_0068: { int32_t L_14 = V_2; List_1_t1870976749 * L_15 = __this->get_m_ClipTargets_4(); NullCheck(L_15); int32_t L_16 = List_1_get_Count_m2113842540(L_15, /*hidden argument*/List_1_get_Count_m2113842540_MethodInfo_var); if ((((int32_t)L_14) < ((int32_t)L_16))) { goto IL_0051; } } { Rect_t4241904616 L_17 = V_1; __this->set_m_LastClipRectCanvasSpace_7(L_17); bool L_18 = V_0; __this->set_m_LastValidClipRect_8(L_18); } IL_0087: { V_3 = 0; goto IL_00af; } IL_008e: { List_1_t1870976749 * L_19 = __this->get_m_ClipTargets_4(); int32_t L_20 = V_3; NullCheck(L_19); Il2CppObject * L_21 = List_1_get_Item_m3720088169(L_19, L_20, /*hidden argument*/List_1_get_Item_m3720088169_MethodInfo_var); Rect_t4241904616 L_22 = __this->get_m_LastClipRectCanvasSpace_7(); bool L_23 = __this->get_m_LastValidClipRect_8(); NullCheck(L_21); InterfaceActionInvoker2< Rect_t4241904616 , bool >::Invoke(2 /* System.Void UnityEngine.UI.IClippable::Cull(UnityEngine.Rect,System.Boolean) */, IClippable_t502791197_il2cpp_TypeInfo_var, L_21, L_22, L_23); int32_t L_24 = V_3; V_3 = ((int32_t)((int32_t)L_24+(int32_t)1)); } IL_00af: { int32_t L_25 = V_3; List_1_t1870976749 * L_26 = __this->get_m_ClipTargets_4(); NullCheck(L_26); int32_t L_27 = List_1_get_Count_m2113842540(L_26, /*hidden argument*/List_1_get_Count_m2113842540_MethodInfo_var); if ((((int32_t)L_25) < ((int32_t)L_27))) { goto IL_008e; } } { return; } } // System.Void UnityEngine.UI.RectMask2D::AddClippable(UnityEngine.UI.IClippable) extern const MethodInfo* List_1_Contains_m1912443602_MethodInfo_var; extern const MethodInfo* List_1_Add_m897263168_MethodInfo_var; extern const uint32_t RectMask2D_AddClippable_m3020362282_MetadataUsageId; extern "C" void RectMask2D_AddClippable_m3020362282 (RectMask2D_t3357079374 * __this, Il2CppObject * ___clippable0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_AddClippable_m3020362282_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Il2CppObject * L_0 = ___clippable0; if (L_0) { goto IL_0007; } } { return; } IL_0007: { List_1_t1870976749 * L_1 = __this->get_m_ClipTargets_4(); Il2CppObject * L_2 = ___clippable0; NullCheck(L_1); bool L_3 = List_1_Contains_m1912443602(L_1, L_2, /*hidden argument*/List_1_Contains_m1912443602_MethodInfo_var); if (L_3) { goto IL_0024; } } { List_1_t1870976749 * L_4 = __this->get_m_ClipTargets_4(); Il2CppObject * L_5 = ___clippable0; NullCheck(L_4); List_1_Add_m897263168(L_4, L_5, /*hidden argument*/List_1_Add_m897263168_MethodInfo_var); } IL_0024: { __this->set_m_ForceClip_9((bool)1); return; } } // System.Void UnityEngine.UI.RectMask2D::RemoveClippable(UnityEngine.UI.IClippable) extern Il2CppClass* Rect_t4241904616_il2cpp_TypeInfo_var; extern Il2CppClass* IClippable_t502791197_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_Remove_m372918007_MethodInfo_var; extern const uint32_t RectMask2D_RemoveClippable_m2506427137_MetadataUsageId; extern "C" void RectMask2D_RemoveClippable_m2506427137 (RectMask2D_t3357079374 * __this, Il2CppObject * ___clippable0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (RectMask2D_RemoveClippable_m2506427137_MetadataUsageId); s_Il2CppMethodIntialized = true; } Rect_t4241904616 V_0; memset(&V_0, 0, sizeof(V_0)); { Il2CppObject * L_0 = ___clippable0; if (L_0) { goto IL_0007; } } { return; } IL_0007: { Il2CppObject * L_1 = ___clippable0; Initobj (Rect_t4241904616_il2cpp_TypeInfo_var, (&V_0)); Rect_t4241904616 L_2 = V_0; NullCheck(L_1); InterfaceActionInvoker2< Rect_t4241904616 , bool >::Invoke(3 /* System.Void UnityEngine.UI.IClippable::SetClipRect(UnityEngine.Rect,System.Boolean) */, IClippable_t502791197_il2cpp_TypeInfo_var, L_1, L_2, (bool)0); List_1_t1870976749 * L_3 = __this->get_m_ClipTargets_4(); Il2CppObject * L_4 = ___clippable0; NullCheck(L_3); List_1_Remove_m372918007(L_3, L_4, /*hidden argument*/List_1_Remove_m372918007_MethodInfo_var); __this->set_m_ForceClip_9((bool)1); return; } } // System.Void UnityEngine.UI.RectMask2D::OnTransformParentChanged() extern "C" void RectMask2D_OnTransformParentChanged_m136007544 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { { UIBehaviour_OnTransformParentChanged_m1017023781(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)1); return; } } // System.Void UnityEngine.UI.RectMask2D::OnCanvasHierarchyChanged() extern "C" void RectMask2D_OnCanvasHierarchyChanged_m329275089 (RectMask2D_t3357079374 * __this, const MethodInfo* method) { { UIBehaviour_OnCanvasHierarchyChanged_m1210291326(__this, /*hidden argument*/NULL); __this->set_m_ShouldRecalculateClipRects_5((bool)1); return; } } // System.Void UnityEngine.UI.Scrollbar::.ctor() extern Il2CppClass* ScrollEvent_t3541123425_il2cpp_TypeInfo_var; extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar__ctor_m842961365_MetadataUsageId; extern "C" void Scrollbar__ctor_m842961365 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar__ctor_m842961365_MetadataUsageId); s_Il2CppMethodIntialized = true; } { __this->set_m_Size_19((0.2f)); ScrollEvent_t3541123425 * L_0 = (ScrollEvent_t3541123425 *)il2cpp_codegen_object_new(ScrollEvent_t3541123425_il2cpp_TypeInfo_var); ScrollEvent__ctor_m2724827255(L_0, /*hidden argument*/NULL); __this->set_m_OnValueChanged_21(L_0); Vector2_t4282066565 L_1 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_23(L_1); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); Selectable__ctor_m1133588277(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.Scrollbar::get_handleRect() extern "C" RectTransform_t972643934 * Scrollbar_get_handleRect_m2010533702 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = __this->get_m_HandleRect_16(); return L_0; } } // System.Void UnityEngine.UI.Scrollbar::set_handleRect(UnityEngine.RectTransform) extern const MethodInfo* SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323_MethodInfo_var; extern const uint32_t Scrollbar_set_handleRect_m2375555625_MetadataUsageId; extern "C" void Scrollbar_set_handleRect_m2375555625 (Scrollbar_t2601556940 * __this, RectTransform_t972643934 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_set_handleRect_m2375555625_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 ** L_0 = __this->get_address_of_m_HandleRect_16(); RectTransform_t972643934 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323_MethodInfo_var); if (!L_2) { goto IL_001d; } } { Scrollbar_UpdateCachedReferences_m1478280386(__this, /*hidden argument*/NULL); Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); } IL_001d: { return; } } // UnityEngine.UI.Scrollbar/Direction UnityEngine.UI.Scrollbar::get_direction() extern "C" int32_t Scrollbar_get_direction_m2158550533 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_Direction_17(); return L_0; } } // System.Void UnityEngine.UI.Scrollbar::set_direction(UnityEngine.UI.Scrollbar/Direction) extern const MethodInfo* SetPropertyUtility_SetStruct_TisDirection_t522766867_m1391770542_MethodInfo_var; extern const uint32_t Scrollbar_set_direction_m1167543746_MetadataUsageId; extern "C" void Scrollbar_set_direction_m1167543746 (Scrollbar_t2601556940 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_set_direction_m1167543746_MetadataUsageId); s_Il2CppMethodIntialized = true; } { int32_t* L_0 = __this->get_address_of_m_Direction_17(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisDirection_t522766867_m1391770542(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisDirection_t522766867_m1391770542_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // System.Single UnityEngine.UI.Scrollbar::get_value() extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_get_value_m3398262479_MetadataUsageId; extern "C" float Scrollbar_get_value_m3398262479 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_get_value_m3398262479_MetadataUsageId); s_Il2CppMethodIntialized = true; } float V_0 = 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_002e; } } { float L_2 = V_0; int32_t L_3 = __this->get_m_NumberOfSteps_20(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_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_002e: { float L_6 = V_0; return L_6; } } // System.Void UnityEngine.UI.Scrollbar::set_value(System.Single) extern "C" void Scrollbar_set_value_m1765490852 (Scrollbar_t2601556940 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; Scrollbar_Set_m2588040310(__this, L_0, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.Scrollbar::get_size() extern "C" float Scrollbar_get_size_m1139900549 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_Size_19(); return L_0; } } // System.Void UnityEngine.UI.Scrollbar::set_size(System.Single) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const MethodInfo* SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_MethodInfo_var; extern const uint32_t Scrollbar_set_size_m298852062_MetadataUsageId; extern "C" void Scrollbar_set_size_m298852062 (Scrollbar_t2601556940 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_set_size_m298852062_MetadataUsageId); s_Il2CppMethodIntialized = true; } { float* L_0 = __this->get_address_of_m_Size_19(); float L_1 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_2 = Mathf_Clamp01_m2272733930(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); bool L_3 = SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650(NULL /*static, unused*/, L_0, L_2, /*hidden argument*/SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_MethodInfo_var); if (!L_3) { goto IL_001c; } } { Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); } IL_001c: { return; } } // System.Int32 UnityEngine.UI.Scrollbar::get_numberOfSteps() extern "C" int32_t Scrollbar_get_numberOfSteps_m1873821577 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_NumberOfSteps_20(); return L_0; } } // System.Void UnityEngine.UI.Scrollbar::set_numberOfSteps(System.Int32) extern const MethodInfo* SetPropertyUtility_SetStruct_TisInt32_t1153838500_m3219417906_MethodInfo_var; extern const uint32_t Scrollbar_set_numberOfSteps_m2505501262_MetadataUsageId; extern "C" void Scrollbar_set_numberOfSteps_m2505501262 (Scrollbar_t2601556940 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_set_numberOfSteps_m2505501262_MetadataUsageId); s_Il2CppMethodIntialized = true; } { int32_t* L_0 = __this->get_address_of_m_NumberOfSteps_20(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisInt32_t1153838500_m3219417906(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisInt32_t1153838500_m3219417906_MethodInfo_var); if (!L_2) { goto IL_0023; } } { float L_3 = __this->get_m_Value_18(); Scrollbar_Set_m2588040310(__this, L_3, /*hidden argument*/NULL); Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); } IL_0023: { return; } } // UnityEngine.UI.Scrollbar/ScrollEvent UnityEngine.UI.Scrollbar::get_onValueChanged() extern "C" ScrollEvent_t3541123425 * Scrollbar_get_onValueChanged_m312588368 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { ScrollEvent_t3541123425 * L_0 = __this->get_m_OnValueChanged_21(); return L_0; } } // System.Void UnityEngine.UI.Scrollbar::set_onValueChanged(UnityEngine.UI.Scrollbar/ScrollEvent) extern "C" void Scrollbar_set_onValueChanged_m2941912493 (Scrollbar_t2601556940 * __this, ScrollEvent_t3541123425 * ___value0, const MethodInfo* method) { { ScrollEvent_t3541123425 * L_0 = ___value0; __this->set_m_OnValueChanged_21(L_0); return; } } // System.Single UnityEngine.UI.Scrollbar::get_stepSize() extern "C" float Scrollbar_get_stepSize_m1660915953 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { 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_0020; } } { 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_0025; } IL_0020: { G_B3_0 = (0.1f); } IL_0025: { return G_B3_0; } } // System.Void UnityEngine.UI.Scrollbar::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void Scrollbar_Rebuild_m36029024 (Scrollbar_t2601556940 * __this, int32_t ___executing0, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Scrollbar::LayoutComplete() extern "C" void Scrollbar_LayoutComplete_m4096546066 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Scrollbar::GraphicUpdateComplete() extern "C" void Scrollbar_GraphicUpdateComplete_m3945082525 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Scrollbar::OnEnable() extern "C" void Scrollbar_OnEnable_m2059823505 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { Selectable_OnEnable_m1472090161(__this, /*hidden argument*/NULL); Scrollbar_UpdateCachedReferences_m1478280386(__this, /*hidden argument*/NULL); float L_0 = __this->get_m_Value_18(); Scrollbar_Set_m3384196167(__this, L_0, (bool)0, /*hidden argument*/NULL); Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::OnDisable() extern "C" void Scrollbar_OnDisable_m4165923772 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { DrivenRectTransformTracker_t4185719096 * L_0 = __this->get_address_of_m_Tracker_24(); DrivenRectTransformTracker_Clear_m309315364(L_0, /*hidden argument*/NULL); Selectable_OnDisable_m3126059292(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::UpdateCachedReferences() extern const MethodInfo* Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var; extern const uint32_t Scrollbar_UpdateCachedReferences_m1478280386_MetadataUsageId; extern "C" void Scrollbar_UpdateCachedReferences_m1478280386 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_UpdateCachedReferences_m1478280386_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 * L_0 = __this->get_m_HandleRect_16(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0041; } } { RectTransform_t972643934 * L_2 = __this->get_m_HandleRect_16(); NullCheck(L_2); Transform_t1659122786 * L_3 = Transform_get_parent_m2236876972(L_2, /*hidden argument*/NULL); bool L_4 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_3, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0041; } } { RectTransform_t972643934 * L_5 = __this->get_m_HandleRect_16(); NullCheck(L_5); Transform_t1659122786 * L_6 = Transform_get_parent_m2236876972(L_5, /*hidden argument*/NULL); NullCheck(L_6); RectTransform_t972643934 * L_7 = Component_GetComponent_TisRectTransform_t972643934_m1940403147(L_6, /*hidden argument*/Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var); __this->set_m_ContainerRect_22(L_7); goto IL_0048; } IL_0041: { __this->set_m_ContainerRect_22((RectTransform_t972643934 *)NULL); } IL_0048: { return; } } // System.Void UnityEngine.UI.Scrollbar::Set(System.Single) extern "C" void Scrollbar_Set_m2588040310 (Scrollbar_t2601556940 * __this, float ___input0, const MethodInfo* method) { { float L_0 = ___input0; Scrollbar_Set_m3384196167(__this, L_0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::Set(System.Single,System.Boolean) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const MethodInfo* UnityEvent_1_Invoke_m3551800820_MethodInfo_var; extern const uint32_t Scrollbar_Set_m3384196167_MetadataUsageId; extern "C" void Scrollbar_Set_m3384196167 (Scrollbar_t2601556940 * __this, float ___input0, bool ___sendCallback1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_Set_m3384196167_MetadataUsageId); s_Il2CppMethodIntialized = 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_t4203372500_il2cpp_TypeInfo_var); float L_2 = Mathf_Clamp01_m2272733930(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_m3398262479(__this, /*hidden argument*/NULL); if ((!(((float)L_3) == ((float)L_4)))) { goto IL_0020; } } { return; } IL_0020: { Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); bool L_5 = ___sendCallback1; if (!L_5) { goto IL_003d; } } { ScrollEvent_t3541123425 * L_6 = __this->get_m_OnValueChanged_21(); float L_7 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); NullCheck(L_6); UnityEvent_1_Invoke_m3551800820(L_6, L_7, /*hidden argument*/UnityEvent_1_Invoke_m3551800820_MethodInfo_var); } IL_003d: { return; } } // System.Void UnityEngine.UI.Scrollbar::OnRectTransformDimensionsChange() extern "C" void Scrollbar_OnRectTransformDimensionsChange_m1089670457 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { UIBehaviour_OnRectTransformDimensionsChange_m406568928(__this, /*hidden argument*/NULL); bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0012; } } { return; } IL_0012: { Scrollbar_UpdateVisuals_m2753592989(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Scrollbar/Axis UnityEngine.UI.Scrollbar::get_axis() extern "C" int32_t Scrollbar_get_axis_m3425831999 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { int32_t G_B4_0 = 0; { int32_t L_0 = __this->get_m_Direction_17(); if (!L_0) { goto IL_0017; } } { int32_t L_1 = __this->get_m_Direction_17(); if ((!(((uint32_t)L_1) == ((uint32_t)1)))) { goto IL_001d; } } IL_0017: { G_B4_0 = 0; goto IL_001e; } IL_001d: { G_B4_0 = 1; } IL_001e: { return (int32_t)(G_B4_0); } } // System.Boolean UnityEngine.UI.Scrollbar::get_reverseValue() extern "C" bool Scrollbar_get_reverseValue_m581327093 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { 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_0017; } } { int32_t L_1 = __this->get_m_Direction_17(); G_B3_0 = ((((int32_t)L_1) == ((int32_t)3))? 1 : 0); goto IL_0018; } IL_0017: { G_B3_0 = 1; } IL_0018: { return (bool)G_B3_0; } } // System.Void UnityEngine.UI.Scrollbar::UpdateVisuals() extern "C" void Scrollbar_UpdateVisuals_m2753592989 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; { DrivenRectTransformTracker_t4185719096 * L_0 = __this->get_address_of_m_Tracker_24(); DrivenRectTransformTracker_Clear_m309315364(L_0, /*hidden argument*/NULL); RectTransform_t972643934 * L_1 = __this->get_m_ContainerRect_22(); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_00cd; } } { DrivenRectTransformTracker_t4185719096 * L_3 = __this->get_address_of_m_Tracker_24(); RectTransform_t972643934 * L_4 = __this->get_m_HandleRect_16(); DrivenRectTransformTracker_Add_m3461523141(L_3, __this, L_4, ((int32_t)3840), /*hidden argument*/NULL); Vector2_t4282066565 L_5 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_5; Vector2_t4282066565 L_6 = Vector2_get_one_m2767488832(NULL /*static, unused*/, /*hidden argument*/NULL); V_1 = L_6; float L_7 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_8 = Scrollbar_get_size_m1139900549(__this, /*hidden argument*/NULL); V_2 = ((float)((float)L_7*(float)((float)((float)(1.0f)-(float)L_8)))); bool L_9 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); if (!L_9) { goto IL_0092; } } { int32_t L_10 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); float L_11 = V_2; float L_12 = Scrollbar_get_size_m1139900549(__this, /*hidden argument*/NULL); Vector2_set_Item_m2767519328((&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_m3425831999(__this, /*hidden argument*/NULL); float L_14 = V_2; Vector2_set_Item_m2767519328((&V_1), L_13, ((float)((float)(1.0f)-(float)L_14)), /*hidden argument*/NULL); goto IL_00b5; } IL_0092: { int32_t L_15 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); float L_16 = V_2; Vector2_set_Item_m2767519328((&V_0), L_15, L_16, /*hidden argument*/NULL); int32_t L_17 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); float L_18 = V_2; float L_19 = Scrollbar_get_size_m1139900549(__this, /*hidden argument*/NULL); Vector2_set_Item_m2767519328((&V_1), L_17, ((float)((float)L_18+(float)L_19)), /*hidden argument*/NULL); } IL_00b5: { RectTransform_t972643934 * L_20 = __this->get_m_HandleRect_16(); Vector2_t4282066565 L_21 = V_0; NullCheck(L_20); RectTransform_set_anchorMin_m989253483(L_20, L_21, /*hidden argument*/NULL); RectTransform_t972643934 * L_22 = __this->get_m_HandleRect_16(); Vector2_t4282066565 L_23 = V_1; NullCheck(L_22); RectTransform_set_anchorMax_m715345817(L_22, L_23, /*hidden argument*/NULL); } IL_00cd: { return; } } // System.Void UnityEngine.UI.Scrollbar::UpdateDrag(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_UpdateDrag_m494154322_MetadataUsageId; extern "C" void Scrollbar_UpdateDrag_m494154322 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_UpdateDrag_m494154322_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); float V_3 = 0.0f; float V_4 = 0.0f; Rect_t4241904616 V_5; memset(&V_5, 0, sizeof(V_5)); Rect_t4241904616 V_6; memset(&V_6, 0, sizeof(V_6)); Rect_t4241904616 V_7; memset(&V_7, 0, sizeof(V_7)); Rect_t4241904616 V_8; memset(&V_8, 0, sizeof(V_8)); int32_t V_9 = 0; float G_B9_0 = 0.0f; { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { RectTransform_t972643934 * L_2 = __this->get_m_ContainerRect_22(); bool L_3 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_2, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_001e; } } { return; } IL_001e: { RectTransform_t972643934 * L_4 = __this->get_m_ContainerRect_22(); PointerEventData_t1848751023 * L_5 = ___eventData0; NullCheck(L_5); Vector2_t4282066565 L_6 = PointerEventData_get_position_m2263123361(L_5, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_7 = ___eventData0; NullCheck(L_7); Camera_t2727095145 * L_8 = PointerEventData_get_pressEventCamera_m2764092724(L_7, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_9 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_4, L_6, L_8, (&V_0), /*hidden argument*/NULL); if (L_9) { goto IL_003d; } } { return; } IL_003d: { Vector2_t4282066565 L_10 = V_0; Vector2_t4282066565 L_11 = __this->get_m_Offset_23(); Vector2_t4282066565 L_12 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL); RectTransform_t972643934 * L_13 = __this->get_m_ContainerRect_22(); NullCheck(L_13); Rect_t4241904616 L_14 = RectTransform_get_rect_m1566017036(L_13, /*hidden argument*/NULL); V_5 = L_14; Vector2_t4282066565 L_15 = Rect_get_position_m2933356232((&V_5), /*hidden argument*/NULL); Vector2_t4282066565 L_16 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_12, L_15, /*hidden argument*/NULL); V_1 = L_16; Vector2_t4282066565 L_17 = V_1; RectTransform_t972643934 * L_18 = __this->get_m_HandleRect_16(); NullCheck(L_18); Rect_t4241904616 L_19 = RectTransform_get_rect_m1566017036(L_18, /*hidden argument*/NULL); V_6 = L_19; Vector2_t4282066565 L_20 = Rect_get_size_m136480416((&V_6), /*hidden argument*/NULL); RectTransform_t972643934 * L_21 = __this->get_m_HandleRect_16(); NullCheck(L_21); Vector2_t4282066565 L_22 = RectTransform_get_sizeDelta_m4279424984(L_21, /*hidden argument*/NULL); Vector2_t4282066565 L_23 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_20, L_22, /*hidden argument*/NULL); Vector2_t4282066565 L_24 = Vector2_op_Multiply_m1738245082(NULL /*static, unused*/, L_23, (0.5f), /*hidden argument*/NULL); Vector2_t4282066565 L_25 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_17, L_24, /*hidden argument*/NULL); V_2 = L_25; int32_t L_26 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if (L_26) { goto IL_00bc; } } { RectTransform_t972643934 * L_27 = __this->get_m_ContainerRect_22(); NullCheck(L_27); Rect_t4241904616 L_28 = RectTransform_get_rect_m1566017036(L_27, /*hidden argument*/NULL); V_7 = L_28; float L_29 = Rect_get_width_m2824209432((&V_7), /*hidden argument*/NULL); G_B9_0 = L_29; goto IL_00d0; } IL_00bc: { RectTransform_t972643934 * L_30 = __this->get_m_ContainerRect_22(); NullCheck(L_30); Rect_t4241904616 L_31 = RectTransform_get_rect_m1566017036(L_30, /*hidden argument*/NULL); V_8 = L_31; float L_32 = Rect_get_height_m2154960823((&V_8), /*hidden argument*/NULL); G_B9_0 = L_32; } IL_00d0: { V_3 = G_B9_0; float L_33 = V_3; float L_34 = Scrollbar_get_size_m1139900549(__this, /*hidden argument*/NULL); V_4 = ((float)((float)L_33*(float)((float)((float)(1.0f)-(float)L_34)))); float L_35 = V_4; if ((!(((float)L_35) <= ((float)(0.0f))))) { goto IL_00ee; } } { return; } IL_00ee: { int32_t L_36 = __this->get_m_Direction_17(); V_9 = L_36; int32_t L_37 = V_9; if (L_37 == 0) { goto IL_0112; } if (L_37 == 1) { goto IL_0127; } if (L_37 == 2) { goto IL_0142; } if (L_37 == 3) { goto IL_0157; } } { goto IL_0172; } IL_0112: { float L_38 = (&V_2)->get_x_1(); float L_39 = V_4; Scrollbar_Set_m2588040310(__this, ((float)((float)L_38/(float)L_39)), /*hidden argument*/NULL); goto IL_0172; } IL_0127: { float L_40 = (&V_2)->get_x_1(); float L_41 = V_4; Scrollbar_Set_m2588040310(__this, ((float)((float)(1.0f)-(float)((float)((float)L_40/(float)L_41)))), /*hidden argument*/NULL); goto IL_0172; } IL_0142: { float L_42 = (&V_2)->get_y_2(); float L_43 = V_4; Scrollbar_Set_m2588040310(__this, ((float)((float)L_42/(float)L_43)), /*hidden argument*/NULL); goto IL_0172; } IL_0157: { float L_44 = (&V_2)->get_y_2(); float L_45 = V_4; Scrollbar_Set_m2588040310(__this, ((float)((float)(1.0f)-(float)((float)((float)L_44/(float)L_45)))), /*hidden argument*/NULL); goto IL_0172; } IL_0172: { return; } } // System.Boolean UnityEngine.UI.Scrollbar::MayDrag(UnityEngine.EventSystems.PointerEventData) extern "C" bool Scrollbar_MayDrag_m2868972512 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { 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_0021; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (!L_1) { goto IL_0021; } } { PointerEventData_t1848751023 * L_2 = ___eventData0; NullCheck(L_2); int32_t L_3 = PointerEventData_get_button_m796143251(L_2, /*hidden argument*/NULL); G_B4_0 = ((((int32_t)L_3) == ((int32_t)0))? 1 : 0); goto IL_0022; } IL_0021: { G_B4_0 = 0; } IL_0022: { return (bool)G_B4_0; } } // System.Void UnityEngine.UI.Scrollbar::OnBeginDrag(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_OnBeginDrag_m1703358541_MetadataUsageId; extern "C" void Scrollbar_OnBeginDrag_m1703358541 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_OnBeginDrag_m1703358541_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); { __this->set_isPointerDownAndNotDragging_26((bool)0); PointerEventData_t1848751023 * L_0 = ___eventData0; bool L_1 = Scrollbar_MayDrag_m2868972512(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0014; } } { return; } IL_0014: { RectTransform_t972643934 * L_2 = __this->get_m_ContainerRect_22(); bool L_3 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_2, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0026; } } { return; } IL_0026: { Vector2_t4282066565 L_4 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_23(L_4); RectTransform_t972643934 * L_5 = __this->get_m_HandleRect_16(); PointerEventData_t1848751023 * L_6 = ___eventData0; NullCheck(L_6); Vector2_t4282066565 L_7 = PointerEventData_get_position_m2263123361(L_6, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_8 = ___eventData0; NullCheck(L_8); Camera_t2727095145 * L_9 = PointerEventData_get_enterEventCamera_m1535306943(L_8, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_10 = RectTransformUtility_RectangleContainsScreenPoint_m1460676684(NULL /*static, unused*/, L_5, L_7, L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_008a; } } { RectTransform_t972643934 * L_11 = __this->get_m_HandleRect_16(); PointerEventData_t1848751023 * L_12 = ___eventData0; NullCheck(L_12); Vector2_t4282066565 L_13 = PointerEventData_get_position_m2263123361(L_12, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_14 = ___eventData0; NullCheck(L_14); Camera_t2727095145 * L_15 = PointerEventData_get_pressEventCamera_m2764092724(L_14, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_16 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_11, L_13, L_15, (&V_0), /*hidden argument*/NULL); if (!L_16) { goto IL_008a; } } { Vector2_t4282066565 L_17 = V_0; RectTransform_t972643934 * L_18 = __this->get_m_HandleRect_16(); NullCheck(L_18); Rect_t4241904616 L_19 = RectTransform_get_rect_m1566017036(L_18, /*hidden argument*/NULL); V_1 = L_19; Vector2_t4282066565 L_20 = Rect_get_center_m610643572((&V_1), /*hidden argument*/NULL); Vector2_t4282066565 L_21 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_17, L_20, /*hidden argument*/NULL); __this->set_m_Offset_23(L_21); } IL_008a: { return; } } // System.Void UnityEngine.UI.Scrollbar::OnDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnDrag_m4023431036 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; bool L_1 = Scrollbar_MayDrag_m2868972512(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000d; } } { return; } IL_000d: { RectTransform_t972643934 * L_2 = __this->get_m_ContainerRect_22(); bool L_3 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_2, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_0025; } } { PointerEventData_t1848751023 * L_4 = ___eventData0; Scrollbar_UpdateDrag_m494154322(__this, L_4, /*hidden argument*/NULL); } IL_0025: { return; } } // System.Void UnityEngine.UI.Scrollbar::OnPointerDown(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnPointerDown_m984641739 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; bool L_1 = Scrollbar_MayDrag_m2868972512(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000d; } } { return; } IL_000d: { PointerEventData_t1848751023 * L_2 = ___eventData0; Selectable_OnPointerDown_m706592619(__this, L_2, /*hidden argument*/NULL); __this->set_isPointerDownAndNotDragging_26((bool)1); PointerEventData_t1848751023 * L_3 = ___eventData0; Il2CppObject * L_4 = Scrollbar_ClickRepeat_m1553202218(__this, L_3, /*hidden argument*/NULL); Coroutine_t3621161934 * L_5 = MonoBehaviour_StartCoroutine_m2135303124(__this, L_4, /*hidden argument*/NULL); __this->set_m_PointerDownRepeat_25(L_5); return; } } // System.Collections.IEnumerator UnityEngine.UI.Scrollbar::ClickRepeat(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* U3CClickRepeatU3Ec__Iterator5_t99988271_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_ClickRepeat_m1553202218_MetadataUsageId; extern "C" Il2CppObject * Scrollbar_ClickRepeat_m1553202218 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_ClickRepeat_m1553202218_MetadataUsageId); s_Il2CppMethodIntialized = true; } U3CClickRepeatU3Ec__Iterator5_t99988271 * V_0 = NULL; { U3CClickRepeatU3Ec__Iterator5_t99988271 * L_0 = (U3CClickRepeatU3Ec__Iterator5_t99988271 *)il2cpp_codegen_object_new(U3CClickRepeatU3Ec__Iterator5_t99988271_il2cpp_TypeInfo_var); U3CClickRepeatU3Ec__Iterator5__ctor_m46482857(L_0, /*hidden argument*/NULL); V_0 = L_0; U3CClickRepeatU3Ec__Iterator5_t99988271 * L_1 = V_0; PointerEventData_t1848751023 * L_2 = ___eventData0; NullCheck(L_1); L_1->set_eventData_0(L_2); U3CClickRepeatU3Ec__Iterator5_t99988271 * L_3 = V_0; PointerEventData_t1848751023 * L_4 = ___eventData0; NullCheck(L_3); L_3->set_U3CU24U3EeventData_5(L_4); U3CClickRepeatU3Ec__Iterator5_t99988271 * L_5 = V_0; NullCheck(L_5); L_5->set_U3CU3Ef__this_6(__this); U3CClickRepeatU3Ec__Iterator5_t99988271 * L_6 = V_0; return L_6; } } // System.Void UnityEngine.UI.Scrollbar::OnPointerUp(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnPointerUp_m2249681202 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; Selectable_OnPointerUp_m533192658(__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_m2506066825 (Scrollbar_t2601556940 * __this, AxisEventData_t3355659985 * ___eventData0, const MethodInfo* method) { int32_t V_0 = 0; Scrollbar_t2601556940 * G_B9_0 = NULL; Scrollbar_t2601556940 * G_B8_0 = NULL; float G_B10_0 = 0.0f; Scrollbar_t2601556940 * G_B10_1 = NULL; Scrollbar_t2601556940 * G_B17_0 = NULL; Scrollbar_t2601556940 * G_B16_0 = NULL; float G_B18_0 = 0.0f; Scrollbar_t2601556940 * G_B18_1 = NULL; Scrollbar_t2601556940 * G_B25_0 = NULL; Scrollbar_t2601556940 * G_B24_0 = NULL; float G_B26_0 = 0.0f; Scrollbar_t2601556940 * G_B26_1 = NULL; Scrollbar_t2601556940 * G_B33_0 = NULL; Scrollbar_t2601556940 * G_B32_0 = NULL; float G_B34_0 = 0.0f; Scrollbar_t2601556940 * G_B34_1 = NULL; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0016; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_001e; } } IL_0016: { AxisEventData_t3355659985 * L_2 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_2, /*hidden argument*/NULL); return; } IL_001e: { AxisEventData_t3355659985 * L_3 = ___eventData0; NullCheck(L_3); int32_t L_4 = AxisEventData_get_moveDir_m2739466109(L_3, /*hidden argument*/NULL); V_0 = L_4; int32_t L_5 = V_0; if (L_5 == 0) { goto IL_0040; } if (L_5 == 1) { goto IL_00fa; } if (L_5 == 2) { goto IL_009d; } if (L_5 == 3) { goto IL_0158; } } { goto IL_01b6; } IL_0040: { int32_t L_6 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if (L_6) { goto IL_0091; } } { Selectable_t1885181538 * L_7 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(26 /* UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnLeft() */, __this); bool L_8 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_7, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0091; } } { bool L_9 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); G_B8_0 = __this; if (!L_9) { G_B9_0 = __this; goto IL_007a; } } { float L_10 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_11 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_10+(float)L_11)); G_B10_1 = G_B8_0; goto IL_0087; } IL_007a: { float L_12 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_13 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_12-(float)L_13)); G_B10_1 = G_B9_0; } IL_0087: { NullCheck(G_B10_1); Scrollbar_Set_m2588040310(G_B10_1, G_B10_0, /*hidden argument*/NULL); goto IL_0098; } IL_0091: { AxisEventData_t3355659985 * L_14 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_14, /*hidden argument*/NULL); } IL_0098: { goto IL_01b6; } IL_009d: { int32_t L_15 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if (L_15) { goto IL_00ee; } } { Selectable_t1885181538 * L_16 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(27 /* UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnRight() */, __this); bool L_17 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_16, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_17) { goto IL_00ee; } } { bool L_18 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); G_B16_0 = __this; if (!L_18) { G_B17_0 = __this; goto IL_00d7; } } { float L_19 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_20 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_19-(float)L_20)); G_B18_1 = G_B16_0; goto IL_00e4; } IL_00d7: { float L_21 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_22 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_21+(float)L_22)); G_B18_1 = G_B17_0; } IL_00e4: { NullCheck(G_B18_1); Scrollbar_Set_m2588040310(G_B18_1, G_B18_0, /*hidden argument*/NULL); goto IL_00f5; } IL_00ee: { AxisEventData_t3355659985 * L_23 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_23, /*hidden argument*/NULL); } IL_00f5: { goto IL_01b6; } IL_00fa: { int32_t L_24 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_24) == ((uint32_t)1)))) { goto IL_014c; } } { Selectable_t1885181538 * L_25 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(28 /* UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnUp() */, __this); bool L_26 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_25, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_26) { goto IL_014c; } } { bool L_27 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); G_B24_0 = __this; if (!L_27) { G_B25_0 = __this; goto IL_0135; } } { float L_28 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_29 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_28-(float)L_29)); G_B26_1 = G_B24_0; goto IL_0142; } IL_0135: { float L_30 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_31 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_30+(float)L_31)); G_B26_1 = G_B25_0; } IL_0142: { NullCheck(G_B26_1); Scrollbar_Set_m2588040310(G_B26_1, G_B26_0, /*hidden argument*/NULL); goto IL_0153; } IL_014c: { AxisEventData_t3355659985 * L_32 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_32, /*hidden argument*/NULL); } IL_0153: { goto IL_01b6; } IL_0158: { int32_t L_33 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_33) == ((uint32_t)1)))) { goto IL_01aa; } } { Selectable_t1885181538 * L_34 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(29 /* UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnDown() */, __this); bool L_35 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_34, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_35) { goto IL_01aa; } } { bool L_36 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); G_B32_0 = __this; if (!L_36) { G_B33_0 = __this; goto IL_0193; } } { float L_37 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_38 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_37+(float)L_38)); G_B34_1 = G_B32_0; goto IL_01a0; } IL_0193: { float L_39 = Scrollbar_get_value_m3398262479(__this, /*hidden argument*/NULL); float L_40 = Scrollbar_get_stepSize_m1660915953(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_39-(float)L_40)); G_B34_1 = G_B33_0; } IL_01a0: { NullCheck(G_B34_1); Scrollbar_Set_m2588040310(G_B34_1, G_B34_0, /*hidden argument*/NULL); goto IL_01b1; } IL_01aa: { AxisEventData_t3355659985 * L_41 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_41, /*hidden argument*/NULL); } IL_01b1: { goto IL_01b6; } IL_01b6: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnLeft() extern "C" Selectable_t1885181538 * Scrollbar_FindSelectableOnLeft_m976215998 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0021; } } { int32_t L_2 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0021; } } { return (Selectable_t1885181538 *)NULL; } IL_0021: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnLeft_m3101734378(__this, /*hidden argument*/NULL); return L_3; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnRight() extern "C" Selectable_t1885181538 * Scrollbar_FindSelectableOnRight_m1343135335 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0021; } } { int32_t L_2 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0021; } } { return (Selectable_t1885181538 *)NULL; } IL_0021: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnRight_m2809695675(__this, /*hidden argument*/NULL); return L_3; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnUp() extern "C" Selectable_t1885181538 * Scrollbar_FindSelectableOnUp_m2968886994 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0022; } } { int32_t L_2 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0022; } } { return (Selectable_t1885181538 *)NULL; } IL_0022: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnUp_m3489533950(__this, /*hidden argument*/NULL); return L_3; } } // UnityEngine.UI.Selectable UnityEngine.UI.Scrollbar::FindSelectableOnDown() extern "C" Selectable_t1885181538 * Scrollbar_FindSelectableOnDown_m756918681 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0022; } } { int32_t L_2 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0022; } } { return (Selectable_t1885181538 *)NULL; } IL_0022: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnDown_m2882437061(__this, /*hidden argument*/NULL); return L_3; } } // System.Void UnityEngine.UI.Scrollbar::OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Scrollbar_OnInitializePotentialDrag_m2407430440 (Scrollbar_t2601556940 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); PointerEventData_set_useDragThreshold_m2530254510(L_0, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Scrollbar::SetDirection(UnityEngine.UI.Scrollbar/Direction,System.Boolean) extern Il2CppClass* RectTransform_t972643934_il2cpp_TypeInfo_var; extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t Scrollbar_SetDirection_m826288644_MetadataUsageId; extern "C" void Scrollbar_SetDirection_m826288644 (Scrollbar_t2601556940 * __this, int32_t ___direction0, bool ___includeRectLayouts1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Scrollbar_SetDirection_m826288644_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; bool V_1 = false; { int32_t L_0 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); V_0 = L_0; bool L_1 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); V_1 = L_1; int32_t L_2 = ___direction0; Scrollbar_set_direction_m1167543746(__this, L_2, /*hidden argument*/NULL); bool L_3 = ___includeRectLayouts1; if (L_3) { goto IL_001c; } } { return; } IL_001c: { int32_t L_4 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); int32_t L_5 = V_0; if ((((int32_t)L_4) == ((int32_t)L_5))) { goto IL_003a; } } { Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutAxes_m2163490602(NULL /*static, unused*/, ((RectTransform_t972643934 *)IsInstSealed(L_6, RectTransform_t972643934_il2cpp_TypeInfo_var)), (bool)1, (bool)1, /*hidden argument*/NULL); } IL_003a: { bool L_7 = Scrollbar_get_reverseValue_m581327093(__this, /*hidden argument*/NULL); bool L_8 = V_1; if ((((int32_t)L_7) == ((int32_t)L_8))) { goto IL_005e; } } { Transform_t1659122786 * L_9 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); int32_t L_10 = Scrollbar_get_axis_m3425831999(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutOnAxis_m3487429352(NULL /*static, unused*/, ((RectTransform_t972643934 *)IsInstSealed(L_9, RectTransform_t972643934_il2cpp_TypeInfo_var)), L_10, (bool)1, (bool)1, /*hidden argument*/NULL); } IL_005e: { return; } } // System.Boolean UnityEngine.UI.Scrollbar::UnityEngine.UI.ICanvasElement.IsDestroyed() extern "C" bool Scrollbar_UnityEngine_UI_ICanvasElement_IsDestroyed_m3229708772 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { bool L_0 = UIBehaviour_IsDestroyed_m3027499227(__this, /*hidden argument*/NULL); return L_0; } } // UnityEngine.Transform UnityEngine.UI.Scrollbar::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t1659122786 * Scrollbar_UnityEngine_UI_ICanvasElement_get_transform_m1065549160 (Scrollbar_t2601556940 * __this, const MethodInfo* method) { { Transform_t1659122786 * L_0 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5::.ctor() extern "C" void U3CClickRepeatU3Ec__Iterator5__ctor_m46482857 (U3CClickRepeatU3Ec__Iterator5_t99988271 * __this, const MethodInfo* method) { { Object__ctor_m1772956182(__this, /*hidden argument*/NULL); return; } } // System.Object UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5::System.Collections.Generic.IEnumerator<object>.get_Current() extern "C" Il2CppObject * U3CClickRepeatU3Ec__Iterator5_System_Collections_Generic_IEnumeratorU3CobjectU3E_get_Current_m1538503635 (U3CClickRepeatU3Ec__Iterator5_t99988271 * __this, const MethodInfo* method) { { Il2CppObject * L_0 = __this->get_U24current_4(); return L_0; } } // System.Object UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5::System.Collections.IEnumerator.get_Current() extern "C" Il2CppObject * U3CClickRepeatU3Ec__Iterator5_System_Collections_IEnumerator_get_Current_m1635106151 (U3CClickRepeatU3Ec__Iterator5_t99988271 * __this, const MethodInfo* method) { { Il2CppObject * L_0 = __this->get_U24current_4(); return L_0; } } // System.Boolean UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5::MoveNext() extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern Il2CppClass* WaitForEndOfFrame_t2372756133_il2cpp_TypeInfo_var; extern const uint32_t U3CClickRepeatU3Ec__Iterator5_MoveNext_m451466413_MetadataUsageId; extern "C" bool U3CClickRepeatU3Ec__Iterator5_MoveNext_m451466413 (U3CClickRepeatU3Ec__Iterator5_t99988271 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (U3CClickRepeatU3Ec__Iterator5_MoveNext_m451466413_MetadataUsageId); s_Il2CppMethodIntialized = true; } uint32_t V_0 = 0; bool V_1 = false; U3CClickRepeatU3Ec__Iterator5_t99988271 * G_B7_0 = NULL; U3CClickRepeatU3Ec__Iterator5_t99988271 * G_B6_0 = NULL; float G_B8_0 = 0.0f; U3CClickRepeatU3Ec__Iterator5_t99988271 * G_B8_1 = NULL; { int32_t L_0 = __this->get_U24PC_3(); V_0 = L_0; __this->set_U24PC_3((-1)); uint32_t L_1 = V_0; if (L_1 == 0) { goto IL_0021; } if (L_1 == 1) { goto IL_0119; } } { goto IL_0146; } IL_0021: { goto IL_0119; } IL_0026: { Scrollbar_t2601556940 * L_2 = __this->get_U3CU3Ef__this_6(); NullCheck(L_2); RectTransform_t972643934 * L_3 = L_2->get_m_HandleRect_16(); PointerEventData_t1848751023 * L_4 = __this->get_eventData_0(); NullCheck(L_4); Vector2_t4282066565 L_5 = PointerEventData_get_position_m2263123361(L_4, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_6 = __this->get_eventData_0(); NullCheck(L_6); Camera_t2727095145 * L_7 = PointerEventData_get_enterEventCamera_m1535306943(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_8 = RectTransformUtility_RectangleContainsScreenPoint_m1460676684(NULL /*static, unused*/, L_3, L_5, L_7, /*hidden argument*/NULL); if (L_8) { goto IL_0102; } } { Scrollbar_t2601556940 * L_9 = __this->get_U3CU3Ef__this_6(); NullCheck(L_9); RectTransform_t972643934 * L_10 = L_9->get_m_HandleRect_16(); PointerEventData_t1848751023 * L_11 = __this->get_eventData_0(); NullCheck(L_11); Vector2_t4282066565 L_12 = PointerEventData_get_position_m2263123361(L_11, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_13 = __this->get_eventData_0(); NullCheck(L_13); Camera_t2727095145 * L_14 = PointerEventData_get_pressEventCamera_m2764092724(L_13, /*hidden argument*/NULL); Vector2_t4282066565 * L_15 = __this->get_address_of_U3ClocalMousePosU3E__0_1(); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_16 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_10, L_12, L_14, L_15, /*hidden argument*/NULL); if (!L_16) { goto IL_0102; } } { Scrollbar_t2601556940 * L_17 = __this->get_U3CU3Ef__this_6(); NullCheck(L_17); int32_t L_18 = Scrollbar_get_axis_m3425831999(L_17, /*hidden argument*/NULL); G_B6_0 = __this; if (L_18) { G_B7_0 = __this; goto IL_00a3; } } { Vector2_t4282066565 * L_19 = __this->get_address_of_U3ClocalMousePosU3E__0_1(); float L_20 = L_19->get_x_1(); G_B8_0 = L_20; G_B8_1 = G_B6_0; goto IL_00ae; } IL_00a3: { Vector2_t4282066565 * L_21 = __this->get_address_of_U3ClocalMousePosU3E__0_1(); float L_22 = L_21->get_y_2(); G_B8_0 = L_22; G_B8_1 = G_B7_0; } IL_00ae: { NullCheck(G_B8_1); G_B8_1->set_U3CaxisCoordinateU3E__1_2(G_B8_0); float L_23 = __this->get_U3CaxisCoordinateU3E__1_2(); if ((!(((float)L_23) < ((float)(0.0f))))) { goto IL_00e5; } } { Scrollbar_t2601556940 * L_24 = __this->get_U3CU3Ef__this_6(); Scrollbar_t2601556940 * L_25 = L_24; NullCheck(L_25); float L_26 = Scrollbar_get_value_m3398262479(L_25, /*hidden argument*/NULL); Scrollbar_t2601556940 * L_27 = __this->get_U3CU3Ef__this_6(); NullCheck(L_27); float L_28 = Scrollbar_get_size_m1139900549(L_27, /*hidden argument*/NULL); NullCheck(L_25); Scrollbar_set_value_m1765490852(L_25, ((float)((float)L_26-(float)L_28)), /*hidden argument*/NULL); goto IL_0102; } IL_00e5: { Scrollbar_t2601556940 * L_29 = __this->get_U3CU3Ef__this_6(); Scrollbar_t2601556940 * L_30 = L_29; NullCheck(L_30); float L_31 = Scrollbar_get_value_m3398262479(L_30, /*hidden argument*/NULL); Scrollbar_t2601556940 * L_32 = __this->get_U3CU3Ef__this_6(); NullCheck(L_32); float L_33 = Scrollbar_get_size_m1139900549(L_32, /*hidden argument*/NULL); NullCheck(L_30); Scrollbar_set_value_m1765490852(L_30, ((float)((float)L_31+(float)L_33)), /*hidden argument*/NULL); } IL_0102: { WaitForEndOfFrame_t2372756133 * L_34 = (WaitForEndOfFrame_t2372756133 *)il2cpp_codegen_object_new(WaitForEndOfFrame_t2372756133_il2cpp_TypeInfo_var); WaitForEndOfFrame__ctor_m4124201226(L_34, /*hidden argument*/NULL); __this->set_U24current_4(L_34); __this->set_U24PC_3(1); goto IL_0148; } IL_0119: { Scrollbar_t2601556940 * L_35 = __this->get_U3CU3Ef__this_6(); NullCheck(L_35); bool L_36 = L_35->get_isPointerDownAndNotDragging_26(); if (L_36) { goto IL_0026; } } { Scrollbar_t2601556940 * L_37 = __this->get_U3CU3Ef__this_6(); Scrollbar_t2601556940 * L_38 = __this->get_U3CU3Ef__this_6(); NullCheck(L_38); Coroutine_t3621161934 * L_39 = L_38->get_m_PointerDownRepeat_25(); NullCheck(L_37); MonoBehaviour_StopCoroutine_m1762309278(L_37, L_39, /*hidden argument*/NULL); __this->set_U24PC_3((-1)); } IL_0146: { return (bool)0; } IL_0148: { return (bool)1; } // Dead block : IL_014a: ldloc.1 } // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5::Dispose() extern "C" void U3CClickRepeatU3Ec__Iterator5_Dispose_m1618635686 (U3CClickRepeatU3Ec__Iterator5_t99988271 * __this, const MethodInfo* method) { { __this->set_U24PC_3((-1)); return; } } // System.Void UnityEngine.UI.Scrollbar/<ClickRepeat>c__Iterator5::Reset() extern Il2CppClass* NotSupportedException_t1732551818_il2cpp_TypeInfo_var; extern const uint32_t U3CClickRepeatU3Ec__Iterator5_Reset_m1987883094_MetadataUsageId; extern "C" void U3CClickRepeatU3Ec__Iterator5_Reset_m1987883094 (U3CClickRepeatU3Ec__Iterator5_t99988271 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (U3CClickRepeatU3Ec__Iterator5_Reset_m1987883094_MetadataUsageId); s_Il2CppMethodIntialized = true; } { NotSupportedException_t1732551818 * L_0 = (NotSupportedException_t1732551818 *)il2cpp_codegen_object_new(NotSupportedException_t1732551818_il2cpp_TypeInfo_var); NotSupportedException__ctor_m149930845(L_0, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } } // System.Void UnityEngine.UI.Scrollbar/ScrollEvent::.ctor() extern const MethodInfo* UnityEvent_1__ctor_m1354608473_MethodInfo_var; extern const uint32_t ScrollEvent__ctor_m2724827255_MetadataUsageId; extern "C" void ScrollEvent__ctor_m2724827255 (ScrollEvent_t3541123425 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollEvent__ctor_m2724827255_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UnityEvent_1__ctor_m1354608473(__this, /*hidden argument*/UnityEvent_1__ctor_m1354608473_MethodInfo_var); return; } } // System.Void UnityEngine.UI.ScrollRect::.ctor() extern Il2CppClass* ScrollRectEvent_t1643322606_il2cpp_TypeInfo_var; extern Il2CppClass* Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect__ctor_m3113131930_MetadataUsageId; extern "C" void ScrollRect__ctor_m3113131930 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect__ctor_m3113131930_MetadataUsageId); s_Il2CppMethodIntialized = 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_t1643322606 * L_0 = (ScrollRectEvent_t1643322606 *)il2cpp_codegen_object_new(ScrollRectEvent_t1643322606_il2cpp_TypeInfo_var); ScrollRectEvent__ctor_m985343040(L_0, /*hidden argument*/NULL); __this->set_m_OnValueChanged_17(L_0); Vector2_t4282066565 L_1 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PointerStartLocalCursor_18(L_1); Vector2_t4282066565 L_2 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_ContentStartPosition_19(L_2); Vector2_t4282066565 L_3 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PrevPosition_25(L_3); __this->set_m_Corners_37(((Vector3U5BU5D_t215400611*)SZArrayNew(Vector3U5BU5D_t215400611_il2cpp_TypeInfo_var, (uint32_t)4))); UIBehaviour__ctor_m1261553468(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_content() extern "C" RectTransform_t972643934 * ScrollRect_get_content_m3701632330 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = __this->get_m_Content_2(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_content(UnityEngine.RectTransform) extern "C" void ScrollRect_set_content_m234982541 (ScrollRect_t3606982749 * __this, RectTransform_t972643934 * ___value0, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = ___value0; __this->set_m_Content_2(L_0); return; } } // System.Boolean UnityEngine.UI.ScrollRect::get_horizontal() extern "C" bool ScrollRect_get_horizontal_m3680042345 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_Horizontal_3(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontal(System.Boolean) extern "C" void ScrollRect_set_horizontal_m943369506 (ScrollRect_t3606982749 * __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_m135712059 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_Vertical_4(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_vertical(System.Boolean) extern "C" void ScrollRect_set_vertical_m3763666420 (ScrollRect_t3606982749 * __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_m4014199657 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_MovementType_5(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_movementType(UnityEngine.UI.ScrollRect/MovementType) extern "C" void ScrollRect_set_movementType_m4233390924 (ScrollRect_t3606982749 * __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_m1540742464 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_Elasticity_6(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_elasticity(System.Single) extern "C" void ScrollRect_set_elasticity_m957382251 (ScrollRect_t3606982749 * __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_m723925623 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_Inertia_7(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_inertia(System.Boolean) extern "C" void ScrollRect_set_inertia_m4277812460 (ScrollRect_t3606982749 * __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_m2763364646 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_DecelerationRate_8(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_decelerationRate(System.Single) extern "C" void ScrollRect_set_decelerationRate_m1911965765 (ScrollRect_t3606982749 * __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_m1352024717 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_ScrollSensitivity_9(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_scrollSensitivity(System.Single) extern "C" void ScrollRect_set_scrollSensitivity_m310245950 (ScrollRect_t3606982749 * __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_t972643934 * ScrollRect_get_viewport_m1780465687 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = __this->get_m_Viewport_10(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_viewport(UnityEngine.RectTransform) extern "C" void ScrollRect_set_viewport_m1031184500 (ScrollRect_t3606982749 * __this, RectTransform_t972643934 * ___value0, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = ___value0; __this->set_m_Viewport_10(L_0); ScrollRect_SetDirtyCaching_m4215531847(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Scrollbar UnityEngine.UI.ScrollRect::get_horizontalScrollbar() extern "C" Scrollbar_t2601556940 * ScrollRect_get_horizontalScrollbar_m2383265157 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { Scrollbar_t2601556940 * L_0 = __this->get_m_HorizontalScrollbar_11(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalScrollbar(UnityEngine.UI.Scrollbar) extern Il2CppClass* UnityAction_1_t4186098975_il2cpp_TypeInfo_var; extern const MethodInfo* ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var; extern const MethodInfo* UnityAction_1__ctor_m480548041_MethodInfo_var; extern const MethodInfo* UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var; extern const MethodInfo* UnityEvent_1_AddListener_m994670587_MethodInfo_var; extern const uint32_t ScrollRect_set_horizontalScrollbar_m2130920826_MetadataUsageId; extern "C" void ScrollRect_set_horizontalScrollbar_m2130920826 (ScrollRect_t3606982749 * __this, Scrollbar_t2601556940 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_set_horizontalScrollbar_m2130920826_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Scrollbar_t2601556940 * L_0 = __this->get_m_HorizontalScrollbar_11(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_002c; } } { Scrollbar_t2601556940 * L_2 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_2); ScrollEvent_t3541123425 * L_3 = Scrollbar_get_onValueChanged_m312588368(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var); UnityAction_1_t4186098975 * L_5 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_3); UnityEvent_1_RemoveListener_m1402724082(L_3, L_5, /*hidden argument*/UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var); } IL_002c: { Scrollbar_t2601556940 * L_6 = ___value0; __this->set_m_HorizontalScrollbar_11(L_6); Scrollbar_t2601556940 * L_7 = __this->get_m_HorizontalScrollbar_11(); bool L_8 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_005f; } } { Scrollbar_t2601556940 * L_9 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_9); ScrollEvent_t3541123425 * L_10 = Scrollbar_get_onValueChanged_m312588368(L_9, /*hidden argument*/NULL); IntPtr_t L_11; L_11.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var); UnityAction_1_t4186098975 * L_12 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_12, __this, L_11, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_10); UnityEvent_1_AddListener_m994670587(L_10, L_12, /*hidden argument*/UnityEvent_1_AddListener_m994670587_MethodInfo_var); } IL_005f: { ScrollRect_SetDirtyCaching_m4215531847(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Scrollbar UnityEngine.UI.ScrollRect::get_verticalScrollbar() extern "C" Scrollbar_t2601556940 * ScrollRect_get_verticalScrollbar_m801913715 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { Scrollbar_t2601556940 * L_0 = __this->get_m_VerticalScrollbar_12(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalScrollbar(UnityEngine.UI.Scrollbar) extern Il2CppClass* UnityAction_1_t4186098975_il2cpp_TypeInfo_var; extern const MethodInfo* ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var; extern const MethodInfo* UnityAction_1__ctor_m480548041_MethodInfo_var; extern const MethodInfo* UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var; extern const MethodInfo* UnityEvent_1_AddListener_m994670587_MethodInfo_var; extern const uint32_t ScrollRect_set_verticalScrollbar_m845729640_MetadataUsageId; extern "C" void ScrollRect_set_verticalScrollbar_m845729640 (ScrollRect_t3606982749 * __this, Scrollbar_t2601556940 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_set_verticalScrollbar_m845729640_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Scrollbar_t2601556940 * L_0 = __this->get_m_VerticalScrollbar_12(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_002c; } } { Scrollbar_t2601556940 * L_2 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_2); ScrollEvent_t3541123425 * L_3 = Scrollbar_get_onValueChanged_m312588368(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var); UnityAction_1_t4186098975 * L_5 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_3); UnityEvent_1_RemoveListener_m1402724082(L_3, L_5, /*hidden argument*/UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var); } IL_002c: { Scrollbar_t2601556940 * L_6 = ___value0; __this->set_m_VerticalScrollbar_12(L_6); Scrollbar_t2601556940 * L_7 = __this->get_m_VerticalScrollbar_12(); bool L_8 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_005f; } } { Scrollbar_t2601556940 * L_9 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_9); ScrollEvent_t3541123425 * L_10 = Scrollbar_get_onValueChanged_m312588368(L_9, /*hidden argument*/NULL); IntPtr_t L_11; L_11.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var); UnityAction_1_t4186098975 * L_12 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_12, __this, L_11, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_10); UnityEvent_1_AddListener_m994670587(L_10, L_12, /*hidden argument*/UnityEvent_1_AddListener_m994670587_MethodInfo_var); } IL_005f: { ScrollRect_SetDirtyCaching_m4215531847(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ScrollRect/ScrollbarVisibility UnityEngine.UI.ScrollRect::get_horizontalScrollbarVisibility() extern "C" int32_t ScrollRect_get_horizontalScrollbarVisibility_m2805283129 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_HorizontalScrollbarVisibility_13(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalScrollbarVisibility(UnityEngine.UI.ScrollRect/ScrollbarVisibility) extern "C" void ScrollRect_set_horizontalScrollbarVisibility_m1831067046 (ScrollRect_t3606982749 * __this, int32_t ___value0, const MethodInfo* method) { { int32_t L_0 = ___value0; __this->set_m_HorizontalScrollbarVisibility_13(L_0); ScrollRect_SetDirtyCaching_m4215531847(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ScrollRect/ScrollbarVisibility UnityEngine.UI.ScrollRect::get_verticalScrollbarVisibility() extern "C" int32_t ScrollRect_get_verticalScrollbarVisibility_m1678458407 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_VerticalScrollbarVisibility_14(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalScrollbarVisibility(UnityEngine.UI.ScrollRect/ScrollbarVisibility) extern "C" void ScrollRect_set_verticalScrollbarVisibility_m4230518264 (ScrollRect_t3606982749 * __this, int32_t ___value0, const MethodInfo* method) { { int32_t L_0 = ___value0; __this->set_m_VerticalScrollbarVisibility_14(L_0); ScrollRect_SetDirtyCaching_m4215531847(__this, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.ScrollRect::get_horizontalScrollbarSpacing() extern "C" float ScrollRect_get_horizontalScrollbarSpacing_m2867145992 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_HorizontalScrollbarSpacing_15(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalScrollbarSpacing(System.Single) extern "C" void ScrollRect_set_horizontalScrollbarSpacing_m1996166051 (ScrollRect_t3606982749 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_HorizontalScrollbarSpacing_15(L_0); ScrollRect_SetDirty_m93607546(__this, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.ScrollRect::get_verticalScrollbarSpacing() extern "C" float ScrollRect_get_verticalScrollbarSpacing_m1095438682 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_VerticalScrollbarSpacing_16(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_verticalScrollbarSpacing(System.Single) extern "C" void ScrollRect_set_verticalScrollbarSpacing_m4137600145 (ScrollRect_t3606982749 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; __this->set_m_VerticalScrollbarSpacing_16(L_0); ScrollRect_SetDirty_m93607546(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ScrollRect/ScrollRectEvent UnityEngine.UI.ScrollRect::get_onValueChanged() extern "C" ScrollRectEvent_t1643322606 * ScrollRect_get_onValueChanged_m4119396560 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { ScrollRectEvent_t1643322606 * L_0 = __this->get_m_OnValueChanged_17(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_onValueChanged(UnityEngine.UI.ScrollRect/ScrollRectEvent) extern "C" void ScrollRect_set_onValueChanged_m499269979 (ScrollRect_t3606982749 * __this, ScrollRectEvent_t1643322606 * ___value0, const MethodInfo* method) { { ScrollRectEvent_t1643322606 * L_0 = ___value0; __this->set_m_OnValueChanged_17(L_0); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_viewRect() extern Il2CppClass* RectTransform_t972643934_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_get_viewRect_m911909082_MetadataUsageId; extern "C" RectTransform_t972643934 * ScrollRect_get_viewRect_m911909082 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_get_viewRect_m911909082_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 * L_0 = __this->get_m_ViewRect_20(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001d; } } { RectTransform_t972643934 * L_2 = __this->get_m_Viewport_10(); __this->set_m_ViewRect_20(L_2); } IL_001d: { RectTransform_t972643934 * L_3 = __this->get_m_ViewRect_20(); bool L_4 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_3, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_003f; } } { Transform_t1659122786 * L_5 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); __this->set_m_ViewRect_20(((RectTransform_t972643934 *)CastclassSealed(L_5, RectTransform_t972643934_il2cpp_TypeInfo_var))); } IL_003f: { RectTransform_t972643934 * L_6 = __this->get_m_ViewRect_20(); return L_6; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::get_velocity() extern "C" Vector2_t4282066565 ScrollRect_get_velocity_m4218059637 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { Vector2_t4282066565 L_0 = __this->get_m_Velocity_23(); return L_0; } } // System.Void UnityEngine.UI.ScrollRect::set_velocity(UnityEngine.Vector2) extern "C" void ScrollRect_set_velocity_m4003401302 (ScrollRect_t3606982749 * __this, Vector2_t4282066565 ___value0, const MethodInfo* method) { { Vector2_t4282066565 L_0 = ___value0; __this->set_m_Velocity_23(L_0); return; } } // UnityEngine.RectTransform UnityEngine.UI.ScrollRect::get_rectTransform() extern const MethodInfo* Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var; extern const uint32_t ScrollRect_get_rectTransform_m836427513_MetadataUsageId; extern "C" RectTransform_t972643934 * ScrollRect_get_rectTransform_m836427513 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_get_rectTransform_m836427513_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 * L_0 = __this->get_m_Rect_33(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001d; } } { RectTransform_t972643934 * L_2 = Component_GetComponent_TisRectTransform_t972643934_m1940403147(__this, /*hidden argument*/Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var); __this->set_m_Rect_33(L_2); } IL_001d: { RectTransform_t972643934 * L_3 = __this->get_m_Rect_33(); return L_3; } } // System.Void UnityEngine.UI.ScrollRect::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void ScrollRect_Rebuild_m3329025723 (ScrollRect_t3606982749 * __this, int32_t ___executing0, const MethodInfo* method) { { int32_t L_0 = ___executing0; if (L_0) { goto IL_000c; } } { ScrollRect_UpdateCachedData_m4281892159(__this, /*hidden argument*/NULL); } IL_000c: { int32_t L_1 = ___executing0; if ((!(((uint32_t)L_1) == ((uint32_t)2)))) { goto IL_0031; } } { ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_2 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); ScrollRect_UpdateScrollbars_m2912536474(__this, L_2, /*hidden argument*/NULL); ScrollRect_UpdatePrevData_m454081040(__this, /*hidden argument*/NULL); __this->set_m_HasRebuiltLayout_28((bool)1); } IL_0031: { return; } } // System.Void UnityEngine.UI.ScrollRect::LayoutComplete() extern "C" void ScrollRect_LayoutComplete_m1579087085 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.ScrollRect::GraphicUpdateComplete() extern "C" void ScrollRect_GraphicUpdateComplete_m2238911074 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateCachedData() extern Il2CppClass* RectTransform_t972643934_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_UpdateCachedData_m4281892159_MetadataUsageId; extern "C" void ScrollRect_UpdateCachedData_m4281892159 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateCachedData_m4281892159_MetadataUsageId); s_Il2CppMethodIntialized = true; } Transform_t1659122786 * V_0 = NULL; bool V_1 = false; bool V_2 = false; bool V_3 = false; bool V_4 = false; Rect_t4241904616 V_5; memset(&V_5, 0, sizeof(V_5)); Rect_t4241904616 V_6; memset(&V_6, 0, sizeof(V_6)); ScrollRect_t3606982749 * G_B2_0 = NULL; ScrollRect_t3606982749 * G_B1_0 = NULL; RectTransform_t972643934 * G_B3_0 = NULL; ScrollRect_t3606982749 * G_B3_1 = NULL; ScrollRect_t3606982749 * G_B5_0 = NULL; ScrollRect_t3606982749 * G_B4_0 = NULL; RectTransform_t972643934 * G_B6_0 = NULL; ScrollRect_t3606982749 * G_B6_1 = NULL; int32_t G_B9_0 = 0; int32_t G_B12_0 = 0; int32_t G_B16_0 = 0; ScrollRect_t3606982749 * G_B19_0 = NULL; ScrollRect_t3606982749 * G_B17_0 = NULL; ScrollRect_t3606982749 * G_B18_0 = NULL; int32_t G_B20_0 = 0; ScrollRect_t3606982749 * G_B20_1 = NULL; ScrollRect_t3606982749 * G_B23_0 = NULL; ScrollRect_t3606982749 * G_B21_0 = NULL; ScrollRect_t3606982749 * G_B22_0 = NULL; int32_t G_B24_0 = 0; ScrollRect_t3606982749 * G_B24_1 = NULL; ScrollRect_t3606982749 * G_B26_0 = NULL; ScrollRect_t3606982749 * G_B25_0 = NULL; float G_B27_0 = 0.0f; ScrollRect_t3606982749 * G_B27_1 = NULL; ScrollRect_t3606982749 * G_B29_0 = NULL; ScrollRect_t3606982749 * G_B28_0 = NULL; float G_B30_0 = 0.0f; ScrollRect_t3606982749 * G_B30_1 = NULL; { Transform_t1659122786 * L_0 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); V_0 = L_0; Scrollbar_t2601556940 * L_1 = __this->get_m_HorizontalScrollbar_11(); bool L_2 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); G_B1_0 = __this; if (!L_2) { G_B2_0 = __this; goto IL_001f; } } { G_B3_0 = ((RectTransform_t972643934 *)(NULL)); G_B3_1 = G_B1_0; goto IL_002f; } IL_001f: { Scrollbar_t2601556940 * L_3 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_3); Transform_t1659122786 * L_4 = Component_get_transform_m4257140443(L_3, /*hidden argument*/NULL); G_B3_0 = ((RectTransform_t972643934 *)IsInstSealed(L_4, RectTransform_t972643934_il2cpp_TypeInfo_var)); G_B3_1 = G_B2_0; } IL_002f: { NullCheck(G_B3_1); G_B3_1->set_m_HorizontalScrollbarRect_34(G_B3_0); Scrollbar_t2601556940 * L_5 = __this->get_m_VerticalScrollbar_12(); bool L_6 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); G_B4_0 = __this; if (!L_6) { G_B5_0 = __this; goto IL_004c; } } { G_B6_0 = ((RectTransform_t972643934 *)(NULL)); G_B6_1 = G_B4_0; goto IL_005c; } IL_004c: { Scrollbar_t2601556940 * L_7 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_7); Transform_t1659122786 * L_8 = Component_get_transform_m4257140443(L_7, /*hidden argument*/NULL); G_B6_0 = ((RectTransform_t972643934 *)IsInstSealed(L_8, RectTransform_t972643934_il2cpp_TypeInfo_var)); G_B6_1 = G_B5_0; } IL_005c: { NullCheck(G_B6_1); G_B6_1->set_m_VerticalScrollbarRect_35(G_B6_0); RectTransform_t972643934 * L_9 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_9); Transform_t1659122786 * L_10 = Transform_get_parent_m2236876972(L_9, /*hidden argument*/NULL); Transform_t1659122786 * L_11 = V_0; bool L_12 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL); V_1 = L_12; RectTransform_t972643934 * L_13 = __this->get_m_HorizontalScrollbarRect_34(); bool L_14 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0096; } } { RectTransform_t972643934 * L_15 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_15); Transform_t1659122786 * L_16 = Transform_get_parent_m2236876972(L_15, /*hidden argument*/NULL); Transform_t1659122786 * L_17 = V_0; bool L_18 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_16, L_17, /*hidden argument*/NULL); G_B9_0 = ((int32_t)(L_18)); goto IL_0097; } IL_0096: { G_B9_0 = 1; } IL_0097: { V_2 = (bool)G_B9_0; RectTransform_t972643934 * L_19 = __this->get_m_VerticalScrollbarRect_35(); bool L_20 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_19, /*hidden argument*/NULL); if (!L_20) { goto IL_00bb; } } { RectTransform_t972643934 * L_21 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_21); Transform_t1659122786 * L_22 = Transform_get_parent_m2236876972(L_21, /*hidden argument*/NULL); Transform_t1659122786 * L_23 = V_0; bool L_24 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_22, L_23, /*hidden argument*/NULL); G_B12_0 = ((int32_t)(L_24)); goto IL_00bc; } IL_00bb: { G_B12_0 = 1; } IL_00bc: { V_3 = (bool)G_B12_0; bool L_25 = V_1; if (!L_25) { goto IL_00cc; } } { bool L_26 = V_2; if (!L_26) { goto IL_00cc; } } { bool L_27 = V_3; G_B16_0 = ((int32_t)(L_27)); goto IL_00cd; } IL_00cc: { G_B16_0 = 0; } IL_00cd: { V_4 = (bool)G_B16_0; bool L_28 = V_4; G_B17_0 = __this; if (!L_28) { G_B19_0 = __this; goto IL_00f2; } } { RectTransform_t972643934 * L_29 = __this->get_m_HorizontalScrollbarRect_34(); bool L_30 = Object_op_Implicit_m2106766291(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_00f2; } } { int32_t L_31 = ScrollRect_get_horizontalScrollbarVisibility_m2805283129(__this, /*hidden argument*/NULL); G_B20_0 = ((((int32_t)L_31) == ((int32_t)2))? 1 : 0); G_B20_1 = G_B18_0; goto IL_00f3; } IL_00f2: { G_B20_0 = 0; G_B20_1 = G_B19_0; } IL_00f3: { 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_011b; } } { RectTransform_t972643934 * L_33 = __this->get_m_VerticalScrollbarRect_35(); bool L_34 = Object_op_Implicit_m2106766291(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_011b; } } { int32_t L_35 = ScrollRect_get_verticalScrollbarVisibility_m1678458407(__this, /*hidden argument*/NULL); G_B24_0 = ((((int32_t)L_35) == ((int32_t)2))? 1 : 0); G_B24_1 = G_B22_0; goto IL_011c; } IL_011b: { G_B24_0 = 0; G_B24_1 = G_B23_0; } IL_011c: { NullCheck(G_B24_1); G_B24_1->set_m_VSliderExpand_30((bool)G_B24_0); RectTransform_t972643934 * L_36 = __this->get_m_HorizontalScrollbarRect_34(); bool L_37 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_36, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); G_B25_0 = __this; if (!L_37) { G_B26_0 = __this; goto IL_013d; } } { G_B27_0 = (0.0f); G_B27_1 = G_B25_0; goto IL_0151; } IL_013d: { RectTransform_t972643934 * L_38 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_38); Rect_t4241904616 L_39 = RectTransform_get_rect_m1566017036(L_38, /*hidden argument*/NULL); V_5 = L_39; float L_40 = Rect_get_height_m2154960823((&V_5), /*hidden argument*/NULL); G_B27_0 = L_40; G_B27_1 = G_B26_0; } IL_0151: { NullCheck(G_B27_1); G_B27_1->set_m_HSliderHeight_31(G_B27_0); RectTransform_t972643934 * L_41 = __this->get_m_VerticalScrollbarRect_35(); bool L_42 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_41, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); G_B28_0 = __this; if (!L_42) { G_B29_0 = __this; goto IL_0172; } } { G_B30_0 = (0.0f); G_B30_1 = G_B28_0; goto IL_0186; } IL_0172: { RectTransform_t972643934 * L_43 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_43); Rect_t4241904616 L_44 = RectTransform_get_rect_m1566017036(L_43, /*hidden argument*/NULL); V_6 = L_44; float L_45 = Rect_get_width_m2824209432((&V_6), /*hidden argument*/NULL); G_B30_0 = L_45; G_B30_1 = G_B29_0; } IL_0186: { NullCheck(G_B30_1); G_B30_1->set_m_VSliderWidth_32(G_B30_0); return; } } // System.Void UnityEngine.UI.ScrollRect::OnEnable() extern Il2CppClass* UnityAction_1_t4186098975_il2cpp_TypeInfo_var; extern Il2CppClass* CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var; extern const MethodInfo* ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var; extern const MethodInfo* UnityAction_1__ctor_m480548041_MethodInfo_var; extern const MethodInfo* UnityEvent_1_AddListener_m994670587_MethodInfo_var; extern const MethodInfo* ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var; extern const uint32_t ScrollRect_OnEnable_m4156082604_MetadataUsageId; extern "C" void ScrollRect_OnEnable_m4156082604 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_OnEnable_m4156082604_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UIBehaviour_OnEnable_m4047103690(__this, /*hidden argument*/NULL); Scrollbar_t2601556940 * L_0 = __this->get_m_HorizontalScrollbar_11(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0032; } } { Scrollbar_t2601556940 * L_2 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_2); ScrollEvent_t3541123425 * L_3 = Scrollbar_get_onValueChanged_m312588368(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var); UnityAction_1_t4186098975 * L_5 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_3); UnityEvent_1_AddListener_m994670587(L_3, L_5, /*hidden argument*/UnityEvent_1_AddListener_m994670587_MethodInfo_var); } IL_0032: { Scrollbar_t2601556940 * L_6 = __this->get_m_VerticalScrollbar_12(); bool L_7 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_005e; } } { Scrollbar_t2601556940 * L_8 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_8); ScrollEvent_t3541123425 * L_9 = Scrollbar_get_onValueChanged_m312588368(L_8, /*hidden argument*/NULL); IntPtr_t L_10; L_10.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var); UnityAction_1_t4186098975 * L_11 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_11, __this, L_10, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_9); UnityEvent_1_AddListener_m994670587(L_9, L_11, /*hidden argument*/UnityEvent_1_AddListener_m994670587_MethodInfo_var); } IL_005e: { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var); CanvasUpdateRegistry_RegisterCanvasElementForLayoutRebuild_m1282865408(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::OnDisable() extern Il2CppClass* CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var; extern Il2CppClass* UnityAction_1_t4186098975_il2cpp_TypeInfo_var; extern Il2CppClass* LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var; extern const MethodInfo* ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var; extern const MethodInfo* UnityAction_1__ctor_m480548041_MethodInfo_var; extern const MethodInfo* UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var; extern const MethodInfo* ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var; extern const uint32_t ScrollRect_OnDisable_m430479105_MetadataUsageId; extern "C" void ScrollRect_OnDisable_m430479105 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_OnDisable_m430479105_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var); CanvasUpdateRegistry_UnRegisterCanvasElementForRebuild_m2188113711(NULL /*static, unused*/, __this, /*hidden argument*/NULL); Scrollbar_t2601556940 * L_0 = __this->get_m_HorizontalScrollbar_11(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0032; } } { Scrollbar_t2601556940 * L_2 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_2); ScrollEvent_t3541123425 * L_3 = Scrollbar_get_onValueChanged_m312588368(L_2, /*hidden argument*/NULL); IntPtr_t L_4; L_4.set_m_value_0((void*)(void*)ScrollRect_SetHorizontalNormalizedPosition_m653475821_MethodInfo_var); UnityAction_1_t4186098975 * L_5 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_5, __this, L_4, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_3); UnityEvent_1_RemoveListener_m1402724082(L_3, L_5, /*hidden argument*/UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var); } IL_0032: { Scrollbar_t2601556940 * L_6 = __this->get_m_VerticalScrollbar_12(); bool L_7 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_005e; } } { Scrollbar_t2601556940 * L_8 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_8); ScrollEvent_t3541123425 * L_9 = Scrollbar_get_onValueChanged_m312588368(L_8, /*hidden argument*/NULL); IntPtr_t L_10; L_10.set_m_value_0((void*)(void*)ScrollRect_SetVerticalNormalizedPosition_m3957527707_MethodInfo_var); UnityAction_1_t4186098975 * L_11 = (UnityAction_1_t4186098975 *)il2cpp_codegen_object_new(UnityAction_1_t4186098975_il2cpp_TypeInfo_var); UnityAction_1__ctor_m480548041(L_11, __this, L_10, /*hidden argument*/UnityAction_1__ctor_m480548041_MethodInfo_var); NullCheck(L_9); UnityEvent_1_RemoveListener_m1402724082(L_9, L_11, /*hidden argument*/UnityEvent_1_RemoveListener_m1402724082_MethodInfo_var); } IL_005e: { __this->set_m_HasRebuiltLayout_28((bool)0); DrivenRectTransformTracker_t4185719096 * L_12 = __this->get_address_of_m_Tracker_36(); DrivenRectTransformTracker_Clear_m309315364(L_12, /*hidden argument*/NULL); Vector2_t4282066565 L_13 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_13); RectTransform_t972643934 * L_14 = ScrollRect_get_rectTransform_m836427513(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var); LayoutRebuilder_MarkLayoutForRebuild_m901621521(NULL /*static, unused*/, L_14, /*hidden argument*/NULL); UIBehaviour_OnDisable_m1347100067(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ScrollRect::IsActive() extern "C" bool ScrollRect_IsActive_m1128064300 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { int32_t G_B3_0 = 0; { bool L_0 = UIBehaviour_IsActive_m3417391654(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0019; } } { RectTransform_t972643934 * L_1 = __this->get_m_Content_2(); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); G_B3_0 = ((int32_t)(L_2)); goto IL_001a; } IL_0019: { G_B3_0 = 0; } IL_001a: { return (bool)G_B3_0; } } // System.Void UnityEngine.UI.ScrollRect::EnsureLayoutHasRebuilt() extern Il2CppClass* CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_EnsureLayoutHasRebuilt_m1972800323_MetadataUsageId; extern "C" void ScrollRect_EnsureLayoutHasRebuilt_m1972800323 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_EnsureLayoutHasRebuilt_m1972800323_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = __this->get_m_HasRebuiltLayout_28(); if (L_0) { goto IL_001a; } } { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var); bool L_1 = CanvasUpdateRegistry_IsRebuildingLayout_m1167551012(NULL /*static, unused*/, /*hidden argument*/NULL); if (L_1) { goto IL_001a; } } { Canvas_ForceUpdateCanvases_m1970133101(NULL /*static, unused*/, /*hidden argument*/NULL); } IL_001a: { return; } } // System.Void UnityEngine.UI.ScrollRect::StopMovement() extern "C" void ScrollRect_StopMovement_m4209251323 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { Vector2_t4282066565 L_0 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_0); return; } } // System.Void UnityEngine.UI.ScrollRect::OnScroll(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_OnScroll_m2633232840_MetadataUsageId; extern "C" void ScrollRect_OnScroll_m2633232840 (ScrollRect_t3606982749 * __this, PointerEventData_t1848751023 * ___data0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_OnScroll_m2633232840_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.UI.ScrollRect::IsActive() */, __this); if (L_0) { goto IL_000c; } } { return; } IL_000c: { ScrollRect_EnsureLayoutHasRebuilt_m1972800323(__this, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_1 = ___data0; NullCheck(L_1); Vector2_t4282066565 L_2 = PointerEventData_get_scrollDelta_m3602781717(L_1, /*hidden argument*/NULL); V_0 = L_2; Vector2_t4282066565 * L_3 = (&V_0); float L_4 = L_3->get_y_2(); L_3->set_y_2(((float)((float)L_4*(float)(-1.0f)))); bool L_5 = ScrollRect_get_vertical_m135712059(__this, /*hidden argument*/NULL); if (!L_5) { goto IL_007f; } } { bool L_6 = ScrollRect_get_horizontal_m3680042345(__this, /*hidden argument*/NULL); if (L_6) { goto IL_007f; } } { float L_7 = (&V_0)->get_x_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_8 = fabsf(L_7); float L_9 = (&V_0)->get_y_2(); float L_10 = fabsf(L_9); if ((!(((float)L_8) > ((float)L_10)))) { goto IL_0073; } } { float L_11 = (&V_0)->get_x_1(); (&V_0)->set_y_2(L_11); } IL_0073: { (&V_0)->set_x_1((0.0f)); } IL_007f: { bool L_12 = ScrollRect_get_horizontal_m3680042345(__this, /*hidden argument*/NULL); if (!L_12) { goto IL_00cc; } } { bool L_13 = ScrollRect_get_vertical_m135712059(__this, /*hidden argument*/NULL); if (L_13) { goto IL_00cc; } } { float L_14 = (&V_0)->get_y_2(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_15 = fabsf(L_14); float L_16 = (&V_0)->get_x_1(); float L_17 = fabsf(L_16); if ((!(((float)L_15) > ((float)L_17)))) { goto IL_00c0; } } { float L_18 = (&V_0)->get_y_2(); (&V_0)->set_x_1(L_18); } IL_00c0: { (&V_0)->set_y_2((0.0f)); } IL_00cc: { RectTransform_t972643934 * L_19 = __this->get_m_Content_2(); NullCheck(L_19); Vector2_t4282066565 L_20 = RectTransform_get_anchoredPosition_m2318455998(L_19, /*hidden argument*/NULL); V_1 = L_20; Vector2_t4282066565 L_21 = V_1; Vector2_t4282066565 L_22 = V_0; float L_23 = __this->get_m_ScrollSensitivity_9(); Vector2_t4282066565 L_24 = Vector2_op_Multiply_m1738245082(NULL /*static, unused*/, L_22, L_23, /*hidden argument*/NULL); Vector2_t4282066565 L_25 = Vector2_op_Addition_m1173049553(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_0115; } } { Vector2_t4282066565 L_27 = V_1; Vector2_t4282066565 L_28 = V_1; RectTransform_t972643934 * L_29 = __this->get_m_Content_2(); NullCheck(L_29); Vector2_t4282066565 L_30 = RectTransform_get_anchoredPosition_m2318455998(L_29, /*hidden argument*/NULL); Vector2_t4282066565 L_31 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_28, L_30, /*hidden argument*/NULL); Vector2_t4282066565 L_32 = ScrollRect_CalculateOffset_m224839950(__this, L_31, /*hidden argument*/NULL); Vector2_t4282066565 L_33 = Vector2_op_Addition_m1173049553(NULL /*static, unused*/, L_27, L_32, /*hidden argument*/NULL); V_1 = L_33; } IL_0115: { Vector2_t4282066565 L_34 = V_1; VirtActionInvoker1< Vector2_t4282066565 >::Invoke(46 /* System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) */, __this, L_34); ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnInitializePotentialDrag_m2313515395 (ScrollRect_t3606982749 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { Vector2_t4282066565 L_2 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_2); return; } } // System.Void UnityEngine.UI.ScrollRect::OnBeginDrag(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_OnBeginDrag_m1465783272_MetadataUsageId; extern "C" void ScrollRect_OnBeginDrag_m1465783272 (ScrollRect_t3606982749 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_OnBeginDrag_m1465783272_MetadataUsageId); s_Il2CppMethodIntialized = true; } { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { bool L_2 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.UI.ScrollRect::IsActive() */, __this); if (L_2) { goto IL_0018; } } { return; } IL_0018: { ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_3 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PointerStartLocalCursor_18(L_3); RectTransform_t972643934 * L_4 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_5 = ___eventData0; NullCheck(L_5); Vector2_t4282066565 L_6 = PointerEventData_get_position_m2263123361(L_5, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_7 = ___eventData0; NullCheck(L_7); Camera_t2727095145 * L_8 = PointerEventData_get_pressEventCamera_m2764092724(L_7, /*hidden argument*/NULL); Vector2_t4282066565 * L_9 = __this->get_address_of_m_PointerStartLocalCursor_18(); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_4, L_6, L_8, L_9, /*hidden argument*/NULL); RectTransform_t972643934 * L_10 = __this->get_m_Content_2(); NullCheck(L_10); Vector2_t4282066565 L_11 = RectTransform_get_anchoredPosition_m2318455998(L_10, /*hidden argument*/NULL); __this->set_m_ContentStartPosition_19(L_11); __this->set_m_Dragging_24((bool)1); return; } } // System.Void UnityEngine.UI.ScrollRect::OnEndDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void ScrollRect_OnEndDrag_m1604287350 (ScrollRect_t3606982749 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { __this->set_m_Dragging_24((bool)0); return; } } // System.Void UnityEngine.UI.ScrollRect::OnDrag(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_OnDrag_m286963457_MetadataUsageId; extern "C" void ScrollRect_OnDrag_m286963457 (ScrollRect_t3606982749 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_OnDrag_m286963457_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t4282066565 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { bool L_2 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.UI.ScrollRect::IsActive() */, __this); if (L_2) { goto IL_0018; } } { return; } IL_0018: { RectTransform_t972643934 * L_3 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_4 = ___eventData0; NullCheck(L_4); Vector2_t4282066565 L_5 = PointerEventData_get_position_m2263123361(L_4, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_6 = ___eventData0; NullCheck(L_6); Camera_t2727095145 * L_7 = PointerEventData_get_pressEventCamera_m2764092724(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_8 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_3, L_5, L_7, (&V_0), /*hidden argument*/NULL); if (L_8) { goto IL_0037; } } { return; } IL_0037: { ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_9 = V_0; Vector2_t4282066565 L_10 = __this->get_m_PointerStartLocalCursor_18(); Vector2_t4282066565 L_11 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); V_1 = L_11; Vector2_t4282066565 L_12 = __this->get_m_ContentStartPosition_19(); Vector2_t4282066565 L_13 = V_1; Vector2_t4282066565 L_14 = Vector2_op_Addition_m1173049553(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL); V_2 = L_14; Vector2_t4282066565 L_15 = V_2; RectTransform_t972643934 * L_16 = __this->get_m_Content_2(); NullCheck(L_16); Vector2_t4282066565 L_17 = RectTransform_get_anchoredPosition_m2318455998(L_16, /*hidden argument*/NULL); Vector2_t4282066565 L_18 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_15, L_17, /*hidden argument*/NULL); Vector2_t4282066565 L_19 = ScrollRect_CalculateOffset_m224839950(__this, L_18, /*hidden argument*/NULL); V_3 = L_19; Vector2_t4282066565 L_20 = V_2; Vector2_t4282066565 L_21 = V_3; Vector2_t4282066565 L_22 = Vector2_op_Addition_m1173049553(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_0103; } } { float L_24 = (&V_3)->get_x_1(); if ((((float)L_24) == ((float)(0.0f)))) { goto IL_00c3; } } { float L_25 = (&V_2)->get_x_1(); float L_26 = (&V_3)->get_x_1(); Bounds_t2711641849 * L_27 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_28 = Bounds_get_size_m3666348432(L_27, /*hidden argument*/NULL); V_4 = L_28; float L_29 = (&V_4)->get_x_1(); float L_30 = ScrollRect_RubberDelta_m403235940(NULL /*static, unused*/, L_26, L_29, /*hidden argument*/NULL); (&V_2)->set_x_1(((float)((float)L_25-(float)L_30))); } IL_00c3: { float L_31 = (&V_3)->get_y_2(); if ((((float)L_31) == ((float)(0.0f)))) { goto IL_0103; } } { float L_32 = (&V_2)->get_y_2(); float L_33 = (&V_3)->get_y_2(); Bounds_t2711641849 * L_34 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_35 = Bounds_get_size_m3666348432(L_34, /*hidden argument*/NULL); V_5 = L_35; float L_36 = (&V_5)->get_y_2(); float L_37 = ScrollRect_RubberDelta_m403235940(NULL /*static, unused*/, L_33, L_36, /*hidden argument*/NULL); (&V_2)->set_y_2(((float)((float)L_32-(float)L_37))); } IL_0103: { Vector2_t4282066565 L_38 = V_2; VirtActionInvoker1< Vector2_t4282066565 >::Invoke(46 /* System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) */, __this, L_38); return; } } // System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) extern "C" void ScrollRect_SetContentAnchoredPosition_m716182300 (ScrollRect_t3606982749 * __this, Vector2_t4282066565 ___position0, const MethodInfo* method) { Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); { bool L_0 = __this->get_m_Horizontal_3(); if (L_0) { goto IL_0025; } } { RectTransform_t972643934 * L_1 = __this->get_m_Content_2(); NullCheck(L_1); Vector2_t4282066565 L_2 = RectTransform_get_anchoredPosition_m2318455998(L_1, /*hidden argument*/NULL); V_0 = L_2; float L_3 = (&V_0)->get_x_1(); (&___position0)->set_x_1(L_3); } IL_0025: { bool L_4 = __this->get_m_Vertical_4(); if (L_4) { goto IL_004a; } } { RectTransform_t972643934 * L_5 = __this->get_m_Content_2(); NullCheck(L_5); Vector2_t4282066565 L_6 = RectTransform_get_anchoredPosition_m2318455998(L_5, /*hidden argument*/NULL); V_1 = L_6; float L_7 = (&V_1)->get_y_2(); (&___position0)->set_y_2(L_7); } IL_004a: { Vector2_t4282066565 L_8 = ___position0; RectTransform_t972643934 * L_9 = __this->get_m_Content_2(); NullCheck(L_9); Vector2_t4282066565 L_10 = RectTransform_get_anchoredPosition_m2318455998(L_9, /*hidden argument*/NULL); bool L_11 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_8, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0072; } } { RectTransform_t972643934 * L_12 = __this->get_m_Content_2(); Vector2_t4282066565 L_13 = ___position0; NullCheck(L_12); RectTransform_set_anchoredPosition_m1498949997(L_12, L_13, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); } IL_0072: { return; } } // System.Void UnityEngine.UI.ScrollRect::LateUpdate() extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const MethodInfo* UnityEvent_1_Invoke_m3332953603_MethodInfo_var; extern const uint32_t ScrollRect_LateUpdate_m3780926201_MetadataUsageId; extern "C" void ScrollRect_LateUpdate_m3780926201 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_LateUpdate_m3780926201_MetadataUsageId); s_Il2CppMethodIntialized = true; } float V_0 = 0.0f; Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); int32_t V_3 = 0; float V_4 = 0.0f; Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t4282066565 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t4282066565 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t4282066565 * V_8 = NULL; int32_t V_9 = 0; float V_10 = 0.0f; Vector2_t4282066565 * V_11 = NULL; { RectTransform_t972643934 * L_0 = __this->get_m_Content_2(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_0011; } } { return; } IL_0011: { ScrollRect_EnsureLayoutHasRebuilt_m1972800323(__this, /*hidden argument*/NULL); ScrollRect_UpdateScrollbarVisibility_m2808994247(__this, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); float L_2 = Time_get_unscaledDeltaTime_m285638843(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_2; Vector2_t4282066565 L_3 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); Vector2_t4282066565 L_4 = ScrollRect_CalculateOffset_m224839950(__this, L_3, /*hidden argument*/NULL); V_1 = L_4; bool L_5 = __this->get_m_Dragging_24(); if (L_5) { goto IL_01fb; } } { Vector2_t4282066565 L_6 = V_1; Vector2_t4282066565 L_7 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_8 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL); if (L_8) { goto IL_0065; } } { Vector2_t4282066565 L_9 = __this->get_m_Velocity_23(); Vector2_t4282066565 L_10 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_11 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_01fb; } } IL_0065: { RectTransform_t972643934 * L_12 = __this->get_m_Content_2(); NullCheck(L_12); Vector2_t4282066565 L_13 = RectTransform_get_anchoredPosition_m2318455998(L_12, /*hidden argument*/NULL); V_2 = L_13; V_3 = 0; goto IL_01ac; } IL_0078: { int32_t L_14 = __this->get_m_MovementType_5(); if ((!(((uint32_t)L_14) == ((uint32_t)1)))) { goto IL_0105; } } { int32_t L_15 = V_3; float L_16 = Vector2_get_Item_m2185542843((&V_1), L_15, /*hidden argument*/NULL); if ((((float)L_16) == ((float)(0.0f)))) { goto IL_0105; } } { Vector2_t4282066565 * L_17 = __this->get_address_of_m_Velocity_23(); int32_t L_18 = V_3; float L_19 = Vector2_get_Item_m2185542843(L_17, L_18, /*hidden argument*/NULL); V_4 = L_19; int32_t L_20 = V_3; RectTransform_t972643934 * L_21 = __this->get_m_Content_2(); NullCheck(L_21); Vector2_t4282066565 L_22 = RectTransform_get_anchoredPosition_m2318455998(L_21, /*hidden argument*/NULL); V_6 = L_22; int32_t L_23 = V_3; float L_24 = Vector2_get_Item_m2185542843((&V_6), L_23, /*hidden argument*/NULL); RectTransform_t972643934 * L_25 = __this->get_m_Content_2(); NullCheck(L_25); Vector2_t4282066565 L_26 = RectTransform_get_anchoredPosition_m2318455998(L_25, /*hidden argument*/NULL); V_7 = L_26; int32_t L_27 = V_3; float L_28 = Vector2_get_Item_m2185542843((&V_7), L_27, /*hidden argument*/NULL); int32_t L_29 = V_3; float L_30 = Vector2_get_Item_m2185542843((&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_t4203372500_il2cpp_TypeInfo_var); float L_33 = Mathf_SmoothDamp_m779170481(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_m2767519328((&V_2), L_20, L_33, /*hidden argument*/NULL); Vector2_t4282066565 * L_34 = __this->get_address_of_m_Velocity_23(); int32_t L_35 = V_3; float L_36 = V_4; Vector2_set_Item_m2767519328(L_34, L_35, L_36, /*hidden argument*/NULL); goto IL_01a8; } IL_0105: { bool L_37 = __this->get_m_Inertia_7(); if (!L_37) { goto IL_0197; } } { Vector2_t4282066565 * L_38 = __this->get_address_of_m_Velocity_23(); Vector2_t4282066565 * L_39 = L_38; V_8 = (Vector2_t4282066565 *)L_39; int32_t L_40 = V_3; int32_t L_41 = L_40; V_9 = L_41; Vector2_t4282066565 * L_42 = V_8; int32_t L_43 = V_9; float L_44 = Vector2_get_Item_m2185542843(L_42, L_43, /*hidden argument*/NULL); V_10 = L_44; float L_45 = V_10; float L_46 = __this->get_m_DecelerationRate_8(); float L_47 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_48 = powf(L_46, L_47); Vector2_set_Item_m2767519328(L_39, L_41, ((float)((float)L_45*(float)L_48)), /*hidden argument*/NULL); Vector2_t4282066565 * L_49 = __this->get_address_of_m_Velocity_23(); int32_t L_50 = V_3; float L_51 = Vector2_get_Item_m2185542843(L_49, L_50, /*hidden argument*/NULL); float L_52 = fabsf(L_51); if ((!(((float)L_52) < ((float)(1.0f))))) { goto IL_0168; } } { Vector2_t4282066565 * L_53 = __this->get_address_of_m_Velocity_23(); int32_t L_54 = V_3; Vector2_set_Item_m2767519328(L_53, L_54, (0.0f), /*hidden argument*/NULL); } IL_0168: { Vector2_t4282066565 * L_55 = (&V_2); V_11 = (Vector2_t4282066565 *)L_55; int32_t L_56 = V_3; int32_t L_57 = L_56; V_9 = L_57; Vector2_t4282066565 * L_58 = V_11; int32_t L_59 = V_9; float L_60 = Vector2_get_Item_m2185542843(L_58, L_59, /*hidden argument*/NULL); V_10 = L_60; float L_61 = V_10; Vector2_t4282066565 * L_62 = __this->get_address_of_m_Velocity_23(); int32_t L_63 = V_3; float L_64 = Vector2_get_Item_m2185542843(L_62, L_63, /*hidden argument*/NULL); float L_65 = V_0; Vector2_set_Item_m2767519328(L_55, L_57, ((float)((float)L_61+(float)((float)((float)L_64*(float)L_65)))), /*hidden argument*/NULL); goto IL_01a8; } IL_0197: { Vector2_t4282066565 * L_66 = __this->get_address_of_m_Velocity_23(); int32_t L_67 = V_3; Vector2_set_Item_m2767519328(L_66, L_67, (0.0f), /*hidden argument*/NULL); } IL_01a8: { int32_t L_68 = V_3; V_3 = ((int32_t)((int32_t)L_68+(int32_t)1)); } IL_01ac: { int32_t L_69 = V_3; if ((((int32_t)L_69) < ((int32_t)2))) { goto IL_0078; } } { Vector2_t4282066565 L_70 = __this->get_m_Velocity_23(); Vector2_t4282066565 L_71 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_72 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_70, L_71, /*hidden argument*/NULL); if (!L_72) { goto IL_01fb; } } { int32_t L_73 = __this->get_m_MovementType_5(); if ((!(((uint32_t)L_73) == ((uint32_t)2)))) { goto IL_01f4; } } { Vector2_t4282066565 L_74 = V_2; RectTransform_t972643934 * L_75 = __this->get_m_Content_2(); NullCheck(L_75); Vector2_t4282066565 L_76 = RectTransform_get_anchoredPosition_m2318455998(L_75, /*hidden argument*/NULL); Vector2_t4282066565 L_77 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_74, L_76, /*hidden argument*/NULL); Vector2_t4282066565 L_78 = ScrollRect_CalculateOffset_m224839950(__this, L_77, /*hidden argument*/NULL); V_1 = L_78; Vector2_t4282066565 L_79 = V_2; Vector2_t4282066565 L_80 = V_1; Vector2_t4282066565 L_81 = Vector2_op_Addition_m1173049553(NULL /*static, unused*/, L_79, L_80, /*hidden argument*/NULL); V_2 = L_81; } IL_01f4: { Vector2_t4282066565 L_82 = V_2; VirtActionInvoker1< Vector2_t4282066565 >::Invoke(46 /* System.Void UnityEngine.UI.ScrollRect::SetContentAnchoredPosition(UnityEngine.Vector2) */, __this, L_82); } IL_01fb: { bool L_83 = __this->get_m_Dragging_24(); if (!L_83) { goto IL_0258; } } { bool L_84 = __this->get_m_Inertia_7(); if (!L_84) { goto IL_0258; } } { RectTransform_t972643934 * L_85 = __this->get_m_Content_2(); NullCheck(L_85); Vector2_t4282066565 L_86 = RectTransform_get_anchoredPosition_m2318455998(L_85, /*hidden argument*/NULL); Vector2_t4282066565 L_87 = __this->get_m_PrevPosition_25(); Vector2_t4282066565 L_88 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_86, L_87, /*hidden argument*/NULL); float L_89 = V_0; Vector2_t4282066565 L_90 = Vector2_op_Division_m747627697(NULL /*static, unused*/, L_88, L_89, /*hidden argument*/NULL); Vector3_t4282066566 L_91 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_90, /*hidden argument*/NULL); V_5 = L_91; Vector2_t4282066565 L_92 = __this->get_m_Velocity_23(); Vector3_t4282066566 L_93 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_92, /*hidden argument*/NULL); Vector3_t4282066566 L_94 = V_5; float L_95 = V_0; Vector3_t4282066566 L_96 = Vector3_Lerp_m650470329(NULL /*static, unused*/, L_93, L_94, ((float)((float)L_95*(float)(10.0f))), /*hidden argument*/NULL); Vector2_t4282066565 L_97 = Vector2_op_Implicit_m4083860659(NULL /*static, unused*/, L_96, /*hidden argument*/NULL); __this->set_m_Velocity_23(L_97); } IL_0258: { Bounds_t2711641849 L_98 = __this->get_m_ViewBounds_22(); Bounds_t2711641849 L_99 = __this->get_m_PrevViewBounds_27(); bool L_100 = Bounds_op_Inequality_m4292292377(NULL /*static, unused*/, L_98, L_99, /*hidden argument*/NULL); if (L_100) { goto IL_029f; } } { Bounds_t2711641849 L_101 = __this->get_m_ContentBounds_21(); Bounds_t2711641849 L_102 = __this->get_m_PrevContentBounds_26(); bool L_103 = Bounds_op_Inequality_m4292292377(NULL /*static, unused*/, L_101, L_102, /*hidden argument*/NULL); if (L_103) { goto IL_029f; } } { RectTransform_t972643934 * L_104 = __this->get_m_Content_2(); NullCheck(L_104); Vector2_t4282066565 L_105 = RectTransform_get_anchoredPosition_m2318455998(L_104, /*hidden argument*/NULL); Vector2_t4282066565 L_106 = __this->get_m_PrevPosition_25(); bool L_107 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_105, L_106, /*hidden argument*/NULL); if (!L_107) { goto IL_02bd; } } IL_029f: { Vector2_t4282066565 L_108 = V_1; ScrollRect_UpdateScrollbars_m2912536474(__this, L_108, /*hidden argument*/NULL); ScrollRectEvent_t1643322606 * L_109 = __this->get_m_OnValueChanged_17(); Vector2_t4282066565 L_110 = ScrollRect_get_normalizedPosition_m1721330264(__this, /*hidden argument*/NULL); NullCheck(L_109); UnityEvent_1_Invoke_m3332953603(L_109, L_110, /*hidden argument*/UnityEvent_1_Invoke_m3332953603_MethodInfo_var); ScrollRect_UpdatePrevData_m454081040(__this, /*hidden argument*/NULL); } IL_02bd: { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdatePrevData() extern "C" void ScrollRect_UpdatePrevData_m454081040 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = __this->get_m_Content_2(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0021; } } { Vector2_t4282066565 L_2 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_PrevPosition_25(L_2); goto IL_0032; } IL_0021: { RectTransform_t972643934 * L_3 = __this->get_m_Content_2(); NullCheck(L_3); Vector2_t4282066565 L_4 = RectTransform_get_anchoredPosition_m2318455998(L_3, /*hidden argument*/NULL); __this->set_m_PrevPosition_25(L_4); } IL_0032: { Bounds_t2711641849 L_5 = __this->get_m_ViewBounds_22(); __this->set_m_PrevViewBounds_27(L_5); Bounds_t2711641849 L_6 = __this->get_m_ContentBounds_21(); __this->set_m_PrevContentBounds_26(L_6); return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbars(UnityEngine.Vector2) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_UpdateScrollbars_m2912536474_MetadataUsageId; extern "C" void ScrollRect_UpdateScrollbars_m2912536474 (ScrollRect_t3606982749 * __this, Vector2_t4282066565 ___offset0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_UpdateScrollbars_m2912536474_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t4282066566 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t4282066566 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); { Scrollbar_t2601556940 * L_0 = __this->get_m_HorizontalScrollbar_11(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0097; } } { Bounds_t2711641849 * L_2 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_3 = Bounds_get_size_m3666348432(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_0076; } } { Scrollbar_t2601556940 * L_5 = __this->get_m_HorizontalScrollbar_11(); Bounds_t2711641849 * L_6 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_7 = Bounds_get_size_m3666348432(L_6, /*hidden argument*/NULL); V_1 = L_7; float L_8 = (&V_1)->get_x_1(); float L_9 = (&___offset0)->get_x_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_10 = fabsf(L_9); Bounds_t2711641849 * L_11 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_12 = Bounds_get_size_m3666348432(L_11, /*hidden argument*/NULL); V_2 = L_12; float L_13 = (&V_2)->get_x_1(); float L_14 = Mathf_Clamp01_m2272733930(NULL /*static, unused*/, ((float)((float)((float)((float)L_8-(float)L_10))/(float)L_13)), /*hidden argument*/NULL); NullCheck(L_5); Scrollbar_set_size_m298852062(L_5, L_14, /*hidden argument*/NULL); goto IL_0086; } IL_0076: { Scrollbar_t2601556940 * L_15 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_15); Scrollbar_set_size_m298852062(L_15, (1.0f), /*hidden argument*/NULL); } IL_0086: { Scrollbar_t2601556940 * L_16 = __this->get_m_HorizontalScrollbar_11(); float L_17 = ScrollRect_get_horizontalNormalizedPosition_m1672288203(__this, /*hidden argument*/NULL); NullCheck(L_16); Scrollbar_set_value_m1765490852(L_16, L_17, /*hidden argument*/NULL); } IL_0097: { Scrollbar_t2601556940 * L_18 = __this->get_m_VerticalScrollbar_12(); bool L_19 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_18, /*hidden argument*/NULL); if (!L_19) { goto IL_0130; } } { Bounds_t2711641849 * L_20 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_21 = Bounds_get_size_m3666348432(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_010f; } } { Scrollbar_t2601556940 * L_23 = __this->get_m_VerticalScrollbar_12(); Bounds_t2711641849 * L_24 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_25 = Bounds_get_size_m3666348432(L_24, /*hidden argument*/NULL); V_4 = L_25; float L_26 = (&V_4)->get_y_2(); float L_27 = (&___offset0)->get_y_2(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_28 = fabsf(L_27); Bounds_t2711641849 * L_29 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_30 = Bounds_get_size_m3666348432(L_29, /*hidden argument*/NULL); V_5 = L_30; float L_31 = (&V_5)->get_y_2(); float L_32 = Mathf_Clamp01_m2272733930(NULL /*static, unused*/, ((float)((float)((float)((float)L_26-(float)L_28))/(float)L_31)), /*hidden argument*/NULL); NullCheck(L_23); Scrollbar_set_size_m298852062(L_23, L_32, /*hidden argument*/NULL); goto IL_011f; } IL_010f: { Scrollbar_t2601556940 * L_33 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_33); Scrollbar_set_size_m298852062(L_33, (1.0f), /*hidden argument*/NULL); } IL_011f: { Scrollbar_t2601556940 * L_34 = __this->get_m_VerticalScrollbar_12(); float L_35 = ScrollRect_get_verticalNormalizedPosition_m4163579805(__this, /*hidden argument*/NULL); NullCheck(L_34); Scrollbar_set_value_m1765490852(L_34, L_35, /*hidden argument*/NULL); } IL_0130: { return; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::get_normalizedPosition() extern "C" Vector2_t4282066565 ScrollRect_get_normalizedPosition_m1721330264 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { float L_0 = ScrollRect_get_horizontalNormalizedPosition_m1672288203(__this, /*hidden argument*/NULL); float L_1 = ScrollRect_get_verticalNormalizedPosition_m4163579805(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_2; memset(&L_2, 0, sizeof(L_2)); Vector2__ctor_m1517109030(&L_2, L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void UnityEngine.UI.ScrollRect::set_normalizedPosition(UnityEngine.Vector2) extern "C" void ScrollRect_set_normalizedPosition_m2973019475 (ScrollRect_t3606982749 * __this, Vector2_t4282066565 ___value0, const MethodInfo* method) { { float L_0 = (&___value0)->get_x_1(); ScrollRect_SetNormalizedPosition_m4196700166(__this, L_0, 0, /*hidden argument*/NULL); float L_1 = (&___value0)->get_y_2(); ScrollRect_SetNormalizedPosition_m4196700166(__this, L_1, 1, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.ScrollRect::get_horizontalNormalizedPosition() extern "C" float ScrollRect_get_horizontalNormalizedPosition_m1672288203 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t4282066566 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t4282066566 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t4282066566 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t4282066566 V_7; memset(&V_7, 0, sizeof(V_7)); int32_t G_B4_0 = 0; { ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); Bounds_t2711641849 * L_0 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_1 = Bounds_get_size_m3666348432(L_0, /*hidden argument*/NULL); V_0 = L_1; float L_2 = (&V_0)->get_x_1(); Bounds_t2711641849 * L_3 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_4 = Bounds_get_size_m3666348432(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_0065; } } { Bounds_t2711641849 * L_6 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_7 = Bounds_get_min_m2329472069(L_6, /*hidden argument*/NULL); V_2 = L_7; float L_8 = (&V_2)->get_x_1(); Bounds_t2711641849 * L_9 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_10 = Bounds_get_min_m2329472069(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_0062; } } { G_B4_0 = 1; goto IL_0063; } IL_0062: { G_B4_0 = 0; } IL_0063: { return (((float)((float)G_B4_0))); } IL_0065: { Bounds_t2711641849 * L_12 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_13 = Bounds_get_min_m2329472069(L_12, /*hidden argument*/NULL); V_4 = L_13; float L_14 = (&V_4)->get_x_1(); Bounds_t2711641849 * L_15 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_16 = Bounds_get_min_m2329472069(L_15, /*hidden argument*/NULL); V_5 = L_16; float L_17 = (&V_5)->get_x_1(); Bounds_t2711641849 * L_18 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_19 = Bounds_get_size_m3666348432(L_18, /*hidden argument*/NULL); V_6 = L_19; float L_20 = (&V_6)->get_x_1(); Bounds_t2711641849 * L_21 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_22 = Bounds_get_size_m3666348432(L_21, /*hidden argument*/NULL); V_7 = L_22; float L_23 = (&V_7)->get_x_1(); return ((float)((float)((float)((float)L_14-(float)L_17))/(float)((float)((float)L_20-(float)L_23)))); } } // System.Void UnityEngine.UI.ScrollRect::set_horizontalNormalizedPosition(System.Single) extern "C" void ScrollRect_set_horizontalNormalizedPosition_m2007203264 (ScrollRect_t3606982749 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; ScrollRect_SetNormalizedPosition_m4196700166(__this, L_0, 0, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.ScrollRect::get_verticalNormalizedPosition() extern "C" float ScrollRect_get_verticalNormalizedPosition_m4163579805 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t4282066566 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t4282066566 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t4282066566 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t4282066566 V_7; memset(&V_7, 0, sizeof(V_7)); int32_t G_B4_0 = 0; { ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); Bounds_t2711641849 * L_0 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_1 = Bounds_get_size_m3666348432(L_0, /*hidden argument*/NULL); V_0 = L_1; float L_2 = (&V_0)->get_y_2(); Bounds_t2711641849 * L_3 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_4 = Bounds_get_size_m3666348432(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_0065; } } { Bounds_t2711641849 * L_6 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_7 = Bounds_get_min_m2329472069(L_6, /*hidden argument*/NULL); V_2 = L_7; float L_8 = (&V_2)->get_y_2(); Bounds_t2711641849 * L_9 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_10 = Bounds_get_min_m2329472069(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_0062; } } { G_B4_0 = 1; goto IL_0063; } IL_0062: { G_B4_0 = 0; } IL_0063: { return (((float)((float)G_B4_0))); } IL_0065: { Bounds_t2711641849 * L_12 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_13 = Bounds_get_min_m2329472069(L_12, /*hidden argument*/NULL); V_4 = L_13; float L_14 = (&V_4)->get_y_2(); Bounds_t2711641849 * L_15 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_16 = Bounds_get_min_m2329472069(L_15, /*hidden argument*/NULL); V_5 = L_16; float L_17 = (&V_5)->get_y_2(); Bounds_t2711641849 * L_18 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_19 = Bounds_get_size_m3666348432(L_18, /*hidden argument*/NULL); V_6 = L_19; float L_20 = (&V_6)->get_y_2(); Bounds_t2711641849 * L_21 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_22 = Bounds_get_size_m3666348432(L_21, /*hidden argument*/NULL); V_7 = L_22; float L_23 = (&V_7)->get_y_2(); return ((float)((float)((float)((float)L_14-(float)L_17))/(float)((float)((float)L_20-(float)L_23)))); } } // System.Void UnityEngine.UI.ScrollRect::set_verticalNormalizedPosition(System.Single) extern "C" void ScrollRect_set_verticalNormalizedPosition_m2636032814 (ScrollRect_t3606982749 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; ScrollRect_SetNormalizedPosition_m4196700166(__this, L_0, 1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::SetHorizontalNormalizedPosition(System.Single) extern "C" void ScrollRect_SetHorizontalNormalizedPosition_m653475821 (ScrollRect_t3606982749 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; ScrollRect_SetNormalizedPosition_m4196700166(__this, L_0, 0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::SetVerticalNormalizedPosition(System.Single) extern "C" void ScrollRect_SetVerticalNormalizedPosition_m3957527707 (ScrollRect_t3606982749 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; ScrollRect_SetNormalizedPosition_m4196700166(__this, L_0, 1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::SetNormalizedPosition(System.Single,System.Int32) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_SetNormalizedPosition_m4196700166_MetadataUsageId; extern "C" void ScrollRect_SetNormalizedPosition_m4196700166 (ScrollRect_t3606982749 * __this, float ___value0, int32_t ___axis1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_SetNormalizedPosition_m4196700166_MetadataUsageId); s_Il2CppMethodIntialized = true; } float V_0 = 0.0f; float V_1 = 0.0f; float V_2 = 0.0f; Vector3_t4282066566 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t4282066566 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t4282066566 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t4282066566 V_8; memset(&V_8, 0, sizeof(V_8)); { ScrollRect_EnsureLayoutHasRebuilt_m1972800323(__this, /*hidden argument*/NULL); ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); Bounds_t2711641849 * L_0 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_1 = Bounds_get_size_m3666348432(L_0, /*hidden argument*/NULL); V_4 = L_1; int32_t L_2 = ___axis1; float L_3 = Vector3_get_Item_m108333500((&V_4), L_2, /*hidden argument*/NULL); Bounds_t2711641849 * L_4 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_5 = Bounds_get_size_m3666348432(L_4, /*hidden argument*/NULL); V_5 = L_5; int32_t L_6 = ___axis1; float L_7 = Vector3_get_Item_m108333500((&V_5), L_6, /*hidden argument*/NULL); V_0 = ((float)((float)L_3-(float)L_7)); Bounds_t2711641849 * L_8 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_9 = Bounds_get_min_m2329472069(L_8, /*hidden argument*/NULL); V_6 = L_9; int32_t L_10 = ___axis1; float L_11 = Vector3_get_Item_m108333500((&V_6), L_10, /*hidden argument*/NULL); float L_12 = ___value0; float L_13 = V_0; V_1 = ((float)((float)L_11-(float)((float)((float)L_12*(float)L_13)))); RectTransform_t972643934 * L_14 = __this->get_m_Content_2(); NullCheck(L_14); Vector3_t4282066566 L_15 = Transform_get_localPosition_m668140784(L_14, /*hidden argument*/NULL); V_7 = L_15; int32_t L_16 = ___axis1; float L_17 = Vector3_get_Item_m108333500((&V_7), L_16, /*hidden argument*/NULL); float L_18 = V_1; Bounds_t2711641849 * L_19 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_20 = Bounds_get_min_m2329472069(L_19, /*hidden argument*/NULL); V_8 = L_20; int32_t L_21 = ___axis1; float L_22 = Vector3_get_Item_m108333500((&V_8), L_21, /*hidden argument*/NULL); V_2 = ((float)((float)((float)((float)L_17+(float)L_18))-(float)L_22)); RectTransform_t972643934 * L_23 = __this->get_m_Content_2(); NullCheck(L_23); Vector3_t4282066566 L_24 = Transform_get_localPosition_m668140784(L_23, /*hidden argument*/NULL); V_3 = L_24; int32_t L_25 = ___axis1; float L_26 = Vector3_get_Item_m108333500((&V_3), L_25, /*hidden argument*/NULL); float L_27 = V_2; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_28 = fabsf(((float)((float)L_26-(float)L_27))); if ((!(((float)L_28) > ((float)(0.01f))))) { goto IL_00d1; } } { int32_t L_29 = ___axis1; float L_30 = V_2; Vector3_set_Item_m1844835745((&V_3), L_29, L_30, /*hidden argument*/NULL); RectTransform_t972643934 * L_31 = __this->get_m_Content_2(); Vector3_t4282066566 L_32 = V_3; NullCheck(L_31); Transform_set_localPosition_m3504330903(L_31, L_32, /*hidden argument*/NULL); Vector2_t4282066565 * L_33 = __this->get_address_of_m_Velocity_23(); int32_t L_34 = ___axis1; Vector2_set_Item_m2767519328(L_33, L_34, (0.0f), /*hidden argument*/NULL); ScrollRect_UpdateBounds_m1752242888(__this, /*hidden argument*/NULL); } IL_00d1: { return; } } // System.Single UnityEngine.UI.ScrollRect::RubberDelta(System.Single,System.Single) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_RubberDelta_m403235940_MetadataUsageId; extern "C" float ScrollRect_RubberDelta_m403235940 (Il2CppObject * __this /* static, unused */, float ___overStretching0, float ___viewSize1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_RubberDelta_m403235940_MetadataUsageId); s_Il2CppMethodIntialized = true; } { float L_0 = ___overStretching0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_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_m4040614993(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); return ((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)); } } // System.Void UnityEngine.UI.ScrollRect::OnRectTransformDimensionsChange() extern "C" void ScrollRect_OnRectTransformDimensionsChange_m2105458366 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { ScrollRect_SetDirty_m93607546(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ScrollRect::get_hScrollingNeeded() extern "C" bool ScrollRect_get_hScrollingNeeded_m1668641607 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); { bool L_0 = Application_get_isPlaying_m987993960(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_0) { goto IL_0039; } } { Bounds_t2711641849 * L_1 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_2 = Bounds_get_size_m3666348432(L_1, /*hidden argument*/NULL); V_0 = L_2; float L_3 = (&V_0)->get_x_1(); Bounds_t2711641849 * L_4 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_5 = Bounds_get_size_m3666348432(L_4, /*hidden argument*/NULL); V_1 = L_5; float L_6 = (&V_1)->get_x_1(); return (bool)((((float)L_3) > ((float)((float)((float)L_6+(float)(0.01f)))))? 1 : 0); } IL_0039: { return (bool)1; } } // System.Boolean UnityEngine.UI.ScrollRect::get_vScrollingNeeded() extern "C" bool ScrollRect_get_vScrollingNeeded_m594530553 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); { bool L_0 = Application_get_isPlaying_m987993960(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_0) { goto IL_0039; } } { Bounds_t2711641849 * L_1 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_2 = Bounds_get_size_m3666348432(L_1, /*hidden argument*/NULL); V_0 = L_2; float L_3 = (&V_0)->get_y_2(); Bounds_t2711641849 * L_4 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_5 = Bounds_get_size_m3666348432(L_4, /*hidden argument*/NULL); V_1 = L_5; float L_6 = (&V_1)->get_y_2(); return (bool)((((float)L_3) > ((float)((float)((float)L_6+(float)(0.01f)))))? 1 : 0); } IL_0039: { return (bool)1; } } // System.Void UnityEngine.UI.ScrollRect::CalculateLayoutInputHorizontal() extern "C" void ScrollRect_CalculateLayoutInputHorizontal_m4036022504 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.ScrollRect::CalculateLayoutInputVertical() extern "C" void ScrollRect_CalculateLayoutInputVertical_m4225463418 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return; } } // System.Single UnityEngine.UI.ScrollRect::get_minWidth() extern "C" float ScrollRect_get_minWidth_m525847771 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Single UnityEngine.UI.ScrollRect::get_preferredWidth() extern "C" float ScrollRect_get_preferredWidth_m2213910348 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Single UnityEngine.UI.ScrollRect::get_flexibleWidth() extern "C" float ScrollRect_get_flexibleWidth_m2753178742 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Single UnityEngine.UI.ScrollRect::get_minHeight() extern "C" float ScrollRect_get_minHeight_m3920193364 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Single UnityEngine.UI.ScrollRect::get_preferredHeight() extern "C" float ScrollRect_get_preferredHeight_m415558403 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Single UnityEngine.UI.ScrollRect::get_flexibleHeight() extern "C" float ScrollRect_get_flexibleHeight_m4247976729 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Int32 UnityEngine.UI.ScrollRect::get_layoutPriority() extern "C" int32_t ScrollRect_get_layoutPriority_m3681037785 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { return (-1); } } // System.Void UnityEngine.UI.ScrollRect::SetLayoutHorizontal() extern Il2CppClass* LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_SetLayoutHorizontal_m1751158760_MetadataUsageId; extern "C" void ScrollRect_SetLayoutHorizontal_m1751158760 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_SetLayoutHorizontal_m1751158760_MetadataUsageId); s_Il2CppMethodIntialized = true; } Rect_t4241904616 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); Rect_t4241904616 V_3; memset(&V_3, 0, sizeof(V_3)); Rect_t4241904616 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t4282066565 V_5; memset(&V_5, 0, sizeof(V_5)); Rect_t4241904616 V_6; memset(&V_6, 0, sizeof(V_6)); Rect_t4241904616 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t4282066565 V_8; memset(&V_8, 0, sizeof(V_8)); Vector2_t4282066565 V_9; memset(&V_9, 0, sizeof(V_9)); Vector2_t4282066565 V_10; memset(&V_10, 0, sizeof(V_10)); { DrivenRectTransformTracker_t4185719096 * L_0 = __this->get_address_of_m_Tracker_36(); DrivenRectTransformTracker_Clear_m309315364(L_0, /*hidden argument*/NULL); bool L_1 = __this->get_m_HSliderExpand_29(); if (L_1) { goto IL_0021; } } { bool L_2 = __this->get_m_VSliderExpand_30(); if (!L_2) { goto IL_00ca; } } IL_0021: { DrivenRectTransformTracker_t4185719096 * L_3 = __this->get_address_of_m_Tracker_36(); RectTransform_t972643934 * L_4 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); DrivenRectTransformTracker_Add_m3461523141(L_3, __this, L_4, ((int32_t)16134), /*hidden argument*/NULL); RectTransform_t972643934 * L_5 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_6 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_5); RectTransform_set_anchorMin_m989253483(L_5, L_6, /*hidden argument*/NULL); RectTransform_t972643934 * L_7 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_8 = Vector2_get_one_m2767488832(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_7); RectTransform_set_anchorMax_m715345817(L_7, L_8, /*hidden argument*/NULL); RectTransform_t972643934 * L_9 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_10 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_9); RectTransform_set_sizeDelta_m1223846609(L_9, L_10, /*hidden argument*/NULL); RectTransform_t972643934 * L_11 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); Vector2_t4282066565 L_12 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_11); RectTransform_set_anchoredPosition_m1498949997(L_11, L_12, /*hidden argument*/NULL); RectTransform_t972643934 * L_13 = ScrollRect_get_content_m3701632330(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var); LayoutRebuilder_ForceRebuildLayoutImmediate_m3701079759(NULL /*static, unused*/, L_13, /*hidden argument*/NULL); RectTransform_t972643934 * L_14 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_14); Rect_t4241904616 L_15 = RectTransform_get_rect_m1566017036(L_14, /*hidden argument*/NULL); V_0 = L_15; Vector2_t4282066565 L_16 = Rect_get_center_m610643572((&V_0), /*hidden argument*/NULL); Vector3_t4282066566 L_17 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_16, /*hidden argument*/NULL); RectTransform_t972643934 * L_18 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_18); Rect_t4241904616 L_19 = RectTransform_get_rect_m1566017036(L_18, /*hidden argument*/NULL); V_1 = L_19; Vector2_t4282066565 L_20 = Rect_get_size_m136480416((&V_1), /*hidden argument*/NULL); Vector3_t4282066566 L_21 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_20, /*hidden argument*/NULL); Bounds_t2711641849 L_22; memset(&L_22, 0, sizeof(L_22)); Bounds__ctor_m4160293652(&L_22, L_17, L_21, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_22); Bounds_t2711641849 L_23 = ScrollRect_GetBounds_m1535126094(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_23); } IL_00ca: { bool L_24 = __this->get_m_VSliderExpand_30(); if (!L_24) { goto IL_0164; } } { bool L_25 = ScrollRect_get_vScrollingNeeded_m594530553(__this, /*hidden argument*/NULL); if (!L_25) { goto IL_0164; } } { RectTransform_t972643934 * L_26 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); float L_27 = __this->get_m_VSliderWidth_32(); float L_28 = __this->get_m_VerticalScrollbarSpacing_16(); RectTransform_t972643934 * L_29 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_29); Vector2_t4282066565 L_30 = RectTransform_get_sizeDelta_m4279424984(L_29, /*hidden argument*/NULL); V_2 = L_30; float L_31 = (&V_2)->get_y_2(); Vector2_t4282066565 L_32; memset(&L_32, 0, sizeof(L_32)); Vector2__ctor_m1517109030(&L_32, ((-((float)((float)L_27+(float)L_28)))), L_31, /*hidden argument*/NULL); NullCheck(L_26); RectTransform_set_sizeDelta_m1223846609(L_26, L_32, /*hidden argument*/NULL); RectTransform_t972643934 * L_33 = ScrollRect_get_content_m3701632330(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var); LayoutRebuilder_ForceRebuildLayoutImmediate_m3701079759(NULL /*static, unused*/, L_33, /*hidden argument*/NULL); RectTransform_t972643934 * L_34 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_34); Rect_t4241904616 L_35 = RectTransform_get_rect_m1566017036(L_34, /*hidden argument*/NULL); V_3 = L_35; Vector2_t4282066565 L_36 = Rect_get_center_m610643572((&V_3), /*hidden argument*/NULL); Vector3_t4282066566 L_37 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_36, /*hidden argument*/NULL); RectTransform_t972643934 * L_38 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_38); Rect_t4241904616 L_39 = RectTransform_get_rect_m1566017036(L_38, /*hidden argument*/NULL); V_4 = L_39; Vector2_t4282066565 L_40 = Rect_get_size_m136480416((&V_4), /*hidden argument*/NULL); Vector3_t4282066566 L_41 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_40, /*hidden argument*/NULL); Bounds_t2711641849 L_42; memset(&L_42, 0, sizeof(L_42)); Bounds__ctor_m4160293652(&L_42, L_37, L_41, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_42); Bounds_t2711641849 L_43 = ScrollRect_GetBounds_m1535126094(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_43); } IL_0164: { bool L_44 = __this->get_m_HSliderExpand_29(); if (!L_44) { goto IL_01f5; } } { bool L_45 = ScrollRect_get_hScrollingNeeded_m1668641607(__this, /*hidden argument*/NULL); if (!L_45) { goto IL_01f5; } } { RectTransform_t972643934 * L_46 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); RectTransform_t972643934 * L_47 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_47); Vector2_t4282066565 L_48 = RectTransform_get_sizeDelta_m4279424984(L_47, /*hidden argument*/NULL); V_5 = L_48; float L_49 = (&V_5)->get_x_1(); float L_50 = __this->get_m_HSliderHeight_31(); float L_51 = __this->get_m_HorizontalScrollbarSpacing_15(); Vector2_t4282066565 L_52; memset(&L_52, 0, sizeof(L_52)); Vector2__ctor_m1517109030(&L_52, L_49, ((-((float)((float)L_50+(float)L_51)))), /*hidden argument*/NULL); NullCheck(L_46); RectTransform_set_sizeDelta_m1223846609(L_46, L_52, /*hidden argument*/NULL); RectTransform_t972643934 * L_53 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_53); Rect_t4241904616 L_54 = RectTransform_get_rect_m1566017036(L_53, /*hidden argument*/NULL); V_6 = L_54; Vector2_t4282066565 L_55 = Rect_get_center_m610643572((&V_6), /*hidden argument*/NULL); Vector3_t4282066566 L_56 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_55, /*hidden argument*/NULL); RectTransform_t972643934 * L_57 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_57); Rect_t4241904616 L_58 = RectTransform_get_rect_m1566017036(L_57, /*hidden argument*/NULL); V_7 = L_58; Vector2_t4282066565 L_59 = Rect_get_size_m136480416((&V_7), /*hidden argument*/NULL); Vector3_t4282066566 L_60 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_59, /*hidden argument*/NULL); Bounds_t2711641849 L_61; memset(&L_61, 0, sizeof(L_61)); Bounds__ctor_m4160293652(&L_61, L_56, L_60, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_61); Bounds_t2711641849 L_62 = ScrollRect_GetBounds_m1535126094(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_62); } IL_01f5: { bool L_63 = __this->get_m_VSliderExpand_30(); if (!L_63) { goto IL_0279; } } { bool L_64 = ScrollRect_get_vScrollingNeeded_m594530553(__this, /*hidden argument*/NULL); if (!L_64) { goto IL_0279; } } { RectTransform_t972643934 * L_65 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_65); Vector2_t4282066565 L_66 = RectTransform_get_sizeDelta_m4279424984(L_65, /*hidden argument*/NULL); V_8 = L_66; float L_67 = (&V_8)->get_x_1(); if ((!(((float)L_67) == ((float)(0.0f))))) { goto IL_0279; } } { RectTransform_t972643934 * L_68 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_68); Vector2_t4282066565 L_69 = RectTransform_get_sizeDelta_m4279424984(L_68, /*hidden argument*/NULL); V_9 = L_69; float L_70 = (&V_9)->get_y_2(); if ((!(((float)L_70) < ((float)(0.0f))))) { goto IL_0279; } } { RectTransform_t972643934 * L_71 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); float L_72 = __this->get_m_VSliderWidth_32(); float L_73 = __this->get_m_VerticalScrollbarSpacing_16(); RectTransform_t972643934 * L_74 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_74); Vector2_t4282066565 L_75 = RectTransform_get_sizeDelta_m4279424984(L_74, /*hidden argument*/NULL); V_10 = L_75; float L_76 = (&V_10)->get_y_2(); Vector2_t4282066565 L_77; memset(&L_77, 0, sizeof(L_77)); Vector2__ctor_m1517109030(&L_77, ((-((float)((float)L_72+(float)L_73)))), L_76, /*hidden argument*/NULL); NullCheck(L_71); RectTransform_set_sizeDelta_m1223846609(L_71, L_77, /*hidden argument*/NULL); } IL_0279: { return; } } // System.Void UnityEngine.UI.ScrollRect::SetLayoutVertical() extern "C" void ScrollRect_SetLayoutVertical_m1385100154 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Rect_t4241904616 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); { ScrollRect_UpdateScrollbarLayout_m2579760607(__this, /*hidden argument*/NULL); RectTransform_t972643934 * L_0 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_0); Rect_t4241904616 L_1 = RectTransform_get_rect_m1566017036(L_0, /*hidden argument*/NULL); V_0 = L_1; Vector2_t4282066565 L_2 = Rect_get_center_m610643572((&V_0), /*hidden argument*/NULL); Vector3_t4282066566 L_3 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); RectTransform_t972643934 * L_4 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_4); Rect_t4241904616 L_5 = RectTransform_get_rect_m1566017036(L_4, /*hidden argument*/NULL); V_1 = L_5; Vector2_t4282066565 L_6 = Rect_get_size_m136480416((&V_1), /*hidden argument*/NULL); Vector3_t4282066566 L_7 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); Bounds_t2711641849 L_8; memset(&L_8, 0, sizeof(L_8)); Bounds__ctor_m4160293652(&L_8, L_3, L_7, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_8); Bounds_t2711641849 L_9 = ScrollRect_GetBounds_m1535126094(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_9); return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbarVisibility() extern "C" void ScrollRect_UpdateScrollbarVisibility_m2808994247 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { Scrollbar_t2601556940 * L_0 = __this->get_m_VerticalScrollbar_12(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_004c; } } { int32_t L_2 = __this->get_m_VerticalScrollbarVisibility_14(); if (!L_2) { goto IL_004c; } } { Scrollbar_t2601556940 * L_3 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_3); GameObject_t3674682005 * L_4 = Component_get_gameObject_m1170635899(L_3, /*hidden argument*/NULL); NullCheck(L_4); bool L_5 = GameObject_get_activeSelf_m3858025161(L_4, /*hidden argument*/NULL); bool L_6 = ScrollRect_get_vScrollingNeeded_m594530553(__this, /*hidden argument*/NULL); if ((((int32_t)L_5) == ((int32_t)L_6))) { goto IL_004c; } } { Scrollbar_t2601556940 * L_7 = __this->get_m_VerticalScrollbar_12(); NullCheck(L_7); GameObject_t3674682005 * L_8 = Component_get_gameObject_m1170635899(L_7, /*hidden argument*/NULL); bool L_9 = ScrollRect_get_vScrollingNeeded_m594530553(__this, /*hidden argument*/NULL); NullCheck(L_8); GameObject_SetActive_m3538205401(L_8, L_9, /*hidden argument*/NULL); } IL_004c: { Scrollbar_t2601556940 * L_10 = __this->get_m_HorizontalScrollbar_11(); bool L_11 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0098; } } { int32_t L_12 = __this->get_m_HorizontalScrollbarVisibility_13(); if (!L_12) { goto IL_0098; } } { Scrollbar_t2601556940 * L_13 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_13); GameObject_t3674682005 * L_14 = Component_get_gameObject_m1170635899(L_13, /*hidden argument*/NULL); NullCheck(L_14); bool L_15 = GameObject_get_activeSelf_m3858025161(L_14, /*hidden argument*/NULL); bool L_16 = ScrollRect_get_hScrollingNeeded_m1668641607(__this, /*hidden argument*/NULL); if ((((int32_t)L_15) == ((int32_t)L_16))) { goto IL_0098; } } { Scrollbar_t2601556940 * L_17 = __this->get_m_HorizontalScrollbar_11(); NullCheck(L_17); GameObject_t3674682005 * L_18 = Component_get_gameObject_m1170635899(L_17, /*hidden argument*/NULL); bool L_19 = ScrollRect_get_hScrollingNeeded_m1668641607(__this, /*hidden argument*/NULL); NullCheck(L_18); GameObject_SetActive_m3538205401(L_18, L_19, /*hidden argument*/NULL); } IL_0098: { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateScrollbarLayout() extern "C" void ScrollRect_UpdateScrollbarLayout_m2579760607 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t4282066565 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t4282066565 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t4282066565 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t4282066565 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t4282066565 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t4282066565 V_8; memset(&V_8, 0, sizeof(V_8)); Vector2_t4282066565 V_9; memset(&V_9, 0, sizeof(V_9)); { bool L_0 = __this->get_m_VSliderExpand_30(); if (!L_0) { goto IL_0114; } } { Scrollbar_t2601556940 * L_1 = __this->get_m_HorizontalScrollbar_11(); bool L_2 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0114; } } { DrivenRectTransformTracker_t4185719096 * L_3 = __this->get_address_of_m_Tracker_36(); RectTransform_t972643934 * L_4 = __this->get_m_HorizontalScrollbarRect_34(); DrivenRectTransformTracker_Add_m3461523141(L_3, __this, L_4, ((int32_t)5378), /*hidden argument*/NULL); RectTransform_t972643934 * L_5 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t972643934 * L_6 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_6); Vector2_t4282066565 L_7 = RectTransform_get_anchorMin_m688674174(L_6, /*hidden argument*/NULL); V_0 = L_7; float L_8 = (&V_0)->get_y_2(); Vector2_t4282066565 L_9; memset(&L_9, 0, sizeof(L_9)); Vector2__ctor_m1517109030(&L_9, (0.0f), L_8, /*hidden argument*/NULL); NullCheck(L_5); RectTransform_set_anchorMin_m989253483(L_5, L_9, /*hidden argument*/NULL); RectTransform_t972643934 * L_10 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t972643934 * L_11 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_11); Vector2_t4282066565 L_12 = RectTransform_get_anchorMax_m688445456(L_11, /*hidden argument*/NULL); V_1 = L_12; float L_13 = (&V_1)->get_y_2(); Vector2_t4282066565 L_14; memset(&L_14, 0, sizeof(L_14)); Vector2__ctor_m1517109030(&L_14, (1.0f), L_13, /*hidden argument*/NULL); NullCheck(L_10); RectTransform_set_anchorMax_m715345817(L_10, L_14, /*hidden argument*/NULL); RectTransform_t972643934 * L_15 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t972643934 * L_16 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_16); Vector2_t4282066565 L_17 = RectTransform_get_anchoredPosition_m2318455998(L_16, /*hidden argument*/NULL); V_2 = L_17; float L_18 = (&V_2)->get_y_2(); Vector2_t4282066565 L_19; memset(&L_19, 0, sizeof(L_19)); Vector2__ctor_m1517109030(&L_19, (0.0f), L_18, /*hidden argument*/NULL); NullCheck(L_15); RectTransform_set_anchoredPosition_m1498949997(L_15, L_19, /*hidden argument*/NULL); bool L_20 = ScrollRect_get_vScrollingNeeded_m594530553(__this, /*hidden argument*/NULL); if (!L_20) { goto IL_00eb; } } { RectTransform_t972643934 * L_21 = __this->get_m_HorizontalScrollbarRect_34(); float L_22 = __this->get_m_VSliderWidth_32(); float L_23 = __this->get_m_VerticalScrollbarSpacing_16(); RectTransform_t972643934 * L_24 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_24); Vector2_t4282066565 L_25 = RectTransform_get_sizeDelta_m4279424984(L_24, /*hidden argument*/NULL); V_3 = L_25; float L_26 = (&V_3)->get_y_2(); Vector2_t4282066565 L_27; memset(&L_27, 0, sizeof(L_27)); Vector2__ctor_m1517109030(&L_27, ((-((float)((float)L_22+(float)L_23)))), L_26, /*hidden argument*/NULL); NullCheck(L_21); RectTransform_set_sizeDelta_m1223846609(L_21, L_27, /*hidden argument*/NULL); goto IL_0114; } IL_00eb: { RectTransform_t972643934 * L_28 = __this->get_m_HorizontalScrollbarRect_34(); RectTransform_t972643934 * L_29 = __this->get_m_HorizontalScrollbarRect_34(); NullCheck(L_29); Vector2_t4282066565 L_30 = RectTransform_get_sizeDelta_m4279424984(L_29, /*hidden argument*/NULL); V_4 = L_30; float L_31 = (&V_4)->get_y_2(); Vector2_t4282066565 L_32; memset(&L_32, 0, sizeof(L_32)); Vector2__ctor_m1517109030(&L_32, (0.0f), L_31, /*hidden argument*/NULL); NullCheck(L_28); RectTransform_set_sizeDelta_m1223846609(L_28, L_32, /*hidden argument*/NULL); } IL_0114: { bool L_33 = __this->get_m_HSliderExpand_29(); if (!L_33) { goto IL_022c; } } { Scrollbar_t2601556940 * L_34 = __this->get_m_VerticalScrollbar_12(); bool L_35 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_34, /*hidden argument*/NULL); if (!L_35) { goto IL_022c; } } { DrivenRectTransformTracker_t4185719096 * L_36 = __this->get_address_of_m_Tracker_36(); RectTransform_t972643934 * L_37 = __this->get_m_VerticalScrollbarRect_35(); DrivenRectTransformTracker_Add_m3461523141(L_36, __this, L_37, ((int32_t)10756), /*hidden argument*/NULL); RectTransform_t972643934 * L_38 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t972643934 * L_39 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_39); Vector2_t4282066565 L_40 = RectTransform_get_anchorMin_m688674174(L_39, /*hidden argument*/NULL); V_5 = L_40; float L_41 = (&V_5)->get_x_1(); Vector2_t4282066565 L_42; memset(&L_42, 0, sizeof(L_42)); Vector2__ctor_m1517109030(&L_42, L_41, (0.0f), /*hidden argument*/NULL); NullCheck(L_38); RectTransform_set_anchorMin_m989253483(L_38, L_42, /*hidden argument*/NULL); RectTransform_t972643934 * L_43 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t972643934 * L_44 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_44); Vector2_t4282066565 L_45 = RectTransform_get_anchorMax_m688445456(L_44, /*hidden argument*/NULL); V_6 = L_45; float L_46 = (&V_6)->get_x_1(); Vector2_t4282066565 L_47; memset(&L_47, 0, sizeof(L_47)); Vector2__ctor_m1517109030(&L_47, L_46, (1.0f), /*hidden argument*/NULL); NullCheck(L_43); RectTransform_set_anchorMax_m715345817(L_43, L_47, /*hidden argument*/NULL); RectTransform_t972643934 * L_48 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t972643934 * L_49 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_49); Vector2_t4282066565 L_50 = RectTransform_get_anchoredPosition_m2318455998(L_49, /*hidden argument*/NULL); V_7 = L_50; float L_51 = (&V_7)->get_x_1(); Vector2_t4282066565 L_52; memset(&L_52, 0, sizeof(L_52)); Vector2__ctor_m1517109030(&L_52, L_51, (0.0f), /*hidden argument*/NULL); NullCheck(L_48); RectTransform_set_anchoredPosition_m1498949997(L_48, L_52, /*hidden argument*/NULL); bool L_53 = ScrollRect_get_hScrollingNeeded_m1668641607(__this, /*hidden argument*/NULL); if (!L_53) { goto IL_0203; } } { RectTransform_t972643934 * L_54 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t972643934 * L_55 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_55); Vector2_t4282066565 L_56 = RectTransform_get_sizeDelta_m4279424984(L_55, /*hidden argument*/NULL); V_8 = L_56; float L_57 = (&V_8)->get_x_1(); float L_58 = __this->get_m_HSliderHeight_31(); float L_59 = __this->get_m_HorizontalScrollbarSpacing_15(); Vector2_t4282066565 L_60; memset(&L_60, 0, sizeof(L_60)); Vector2__ctor_m1517109030(&L_60, L_57, ((-((float)((float)L_58+(float)L_59)))), /*hidden argument*/NULL); NullCheck(L_54); RectTransform_set_sizeDelta_m1223846609(L_54, L_60, /*hidden argument*/NULL); goto IL_022c; } IL_0203: { RectTransform_t972643934 * L_61 = __this->get_m_VerticalScrollbarRect_35(); RectTransform_t972643934 * L_62 = __this->get_m_VerticalScrollbarRect_35(); NullCheck(L_62); Vector2_t4282066565 L_63 = RectTransform_get_sizeDelta_m4279424984(L_62, /*hidden argument*/NULL); V_9 = L_63; float L_64 = (&V_9)->get_x_1(); Vector2_t4282066565 L_65; memset(&L_65, 0, sizeof(L_65)); Vector2__ctor_m1517109030(&L_65, L_64, (0.0f), /*hidden argument*/NULL); NullCheck(L_61); RectTransform_set_sizeDelta_m1223846609(L_61, L_65, /*hidden argument*/NULL); } IL_022c: { return; } } // System.Void UnityEngine.UI.ScrollRect::UpdateBounds() extern "C" void ScrollRect_UpdateBounds_m1752242888 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); Vector3_t4282066566 V_2; memset(&V_2, 0, sizeof(V_2)); Rect_t4241904616 V_3; memset(&V_3, 0, sizeof(V_3)); Rect_t4241904616 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t4282066565 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t4282066566 V_6; memset(&V_6, 0, sizeof(V_6)); Vector2_t4282066565 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t4282066566 V_8; memset(&V_8, 0, sizeof(V_8)); { RectTransform_t972643934 * L_0 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_0); Rect_t4241904616 L_1 = RectTransform_get_rect_m1566017036(L_0, /*hidden argument*/NULL); V_3 = L_1; Vector2_t4282066565 L_2 = Rect_get_center_m610643572((&V_3), /*hidden argument*/NULL); Vector3_t4282066566 L_3 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); RectTransform_t972643934 * L_4 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_4); Rect_t4241904616 L_5 = RectTransform_get_rect_m1566017036(L_4, /*hidden argument*/NULL); V_4 = L_5; Vector2_t4282066565 L_6 = Rect_get_size_m136480416((&V_4), /*hidden argument*/NULL); Vector3_t4282066566 L_7 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_6, /*hidden argument*/NULL); Bounds_t2711641849 L_8; memset(&L_8, 0, sizeof(L_8)); Bounds__ctor_m4160293652(&L_8, L_3, L_7, /*hidden argument*/NULL); __this->set_m_ViewBounds_22(L_8); Bounds_t2711641849 L_9 = ScrollRect_GetBounds_m1535126094(__this, /*hidden argument*/NULL); __this->set_m_ContentBounds_21(L_9); RectTransform_t972643934 * L_10 = __this->get_m_Content_2(); bool L_11 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_10, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_11) { goto IL_005a; } } { return; } IL_005a: { Bounds_t2711641849 * L_12 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_13 = Bounds_get_size_m3666348432(L_12, /*hidden argument*/NULL); V_0 = L_13; Bounds_t2711641849 * L_14 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_15 = Bounds_get_center_m4084610404(L_14, /*hidden argument*/NULL); V_1 = L_15; Bounds_t2711641849 * L_16 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_17 = Bounds_get_size_m3666348432(L_16, /*hidden argument*/NULL); Vector3_t4282066566 L_18 = V_0; Vector3_t4282066566 L_19 = Vector3_op_Subtraction_m2842958165(NULL /*static, unused*/, L_17, L_18, /*hidden argument*/NULL); V_2 = L_19; float L_20 = (&V_2)->get_x_1(); if ((!(((float)L_20) > ((float)(0.0f))))) { goto IL_00e0; } } { Vector3_t4282066566 * L_21 = (&V_1); float L_22 = L_21->get_x_1(); float L_23 = (&V_2)->get_x_1(); RectTransform_t972643934 * L_24 = __this->get_m_Content_2(); NullCheck(L_24); Vector2_t4282066565 L_25 = RectTransform_get_pivot_m3785570595(L_24, /*hidden argument*/NULL); V_5 = L_25; float L_26 = (&V_5)->get_x_1(); L_21->set_x_1(((float)((float)L_22-(float)((float)((float)L_23*(float)((float)((float)L_26-(float)(0.5f)))))))); Bounds_t2711641849 * L_27 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_28 = Bounds_get_size_m3666348432(L_27, /*hidden argument*/NULL); V_6 = L_28; float L_29 = (&V_6)->get_x_1(); (&V_0)->set_x_1(L_29); } IL_00e0: { float L_30 = (&V_2)->get_y_2(); if ((!(((float)L_30) > ((float)(0.0f))))) { goto IL_013c; } } { Vector3_t4282066566 * L_31 = (&V_1); float L_32 = L_31->get_y_2(); float L_33 = (&V_2)->get_y_2(); RectTransform_t972643934 * L_34 = __this->get_m_Content_2(); NullCheck(L_34); Vector2_t4282066565 L_35 = RectTransform_get_pivot_m3785570595(L_34, /*hidden argument*/NULL); V_7 = L_35; float L_36 = (&V_7)->get_y_2(); L_31->set_y_2(((float)((float)L_32-(float)((float)((float)L_33*(float)((float)((float)L_36-(float)(0.5f)))))))); Bounds_t2711641849 * L_37 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_38 = Bounds_get_size_m3666348432(L_37, /*hidden argument*/NULL); V_8 = L_38; float L_39 = (&V_8)->get_y_2(); (&V_0)->set_y_2(L_39); } IL_013c: { Bounds_t2711641849 * L_40 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_41 = V_0; Bounds_set_size_m4109809039(L_40, L_41, /*hidden argument*/NULL); Bounds_t2711641849 * L_42 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_43 = V_1; Bounds_set_center_m2605643707(L_42, L_43, /*hidden argument*/NULL); return; } } // UnityEngine.Bounds UnityEngine.UI.ScrollRect::GetBounds() extern Il2CppClass* Bounds_t2711641849_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_GetBounds_m1535126094_MetadataUsageId; extern "C" Bounds_t2711641849 ScrollRect_GetBounds_m1535126094 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_GetBounds_m1535126094_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); Matrix4x4_t1651859333 V_2; memset(&V_2, 0, sizeof(V_2)); int32_t V_3 = 0; Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Bounds_t2711641849 V_5; memset(&V_5, 0, sizeof(V_5)); Bounds_t2711641849 V_6; memset(&V_6, 0, sizeof(V_6)); { RectTransform_t972643934 * L_0 = __this->get_m_Content_2(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001c; } } { Initobj (Bounds_t2711641849_il2cpp_TypeInfo_var, (&V_6)); Bounds_t2711641849 L_2 = V_6; return L_2; } IL_001c: { Vector3__ctor_m2926210380((&V_0), (std::numeric_limits<float>::max()), (std::numeric_limits<float>::max()), (std::numeric_limits<float>::max()), /*hidden argument*/NULL); Vector3__ctor_m2926210380((&V_1), (-std::numeric_limits<float>::max()), (-std::numeric_limits<float>::max()), (-std::numeric_limits<float>::max()), /*hidden argument*/NULL); RectTransform_t972643934 * L_3 = ScrollRect_get_viewRect_m911909082(__this, /*hidden argument*/NULL); NullCheck(L_3); Matrix4x4_t1651859333 L_4 = Transform_get_worldToLocalMatrix_m3792395652(L_3, /*hidden argument*/NULL); V_2 = L_4; RectTransform_t972643934 * L_5 = __this->get_m_Content_2(); Vector3U5BU5D_t215400611* L_6 = __this->get_m_Corners_37(); NullCheck(L_5); RectTransform_GetWorldCorners_m1829917190(L_5, L_6, /*hidden argument*/NULL); V_3 = 0; goto IL_009c; } IL_006c: { Vector3U5BU5D_t215400611* L_7 = __this->get_m_Corners_37(); int32_t L_8 = V_3; NullCheck(L_7); IL2CPP_ARRAY_BOUNDS_CHECK(L_7, L_8); Vector3_t4282066566 L_9 = Matrix4x4_MultiplyPoint3x4_m2198174902((&V_2), (*(Vector3_t4282066566 *)((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8)))), /*hidden argument*/NULL); V_4 = L_9; Vector3_t4282066566 L_10 = V_4; Vector3_t4282066566 L_11 = V_0; Vector3_t4282066566 L_12 = Vector3_Min_m10392601(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL); V_0 = L_12; Vector3_t4282066566 L_13 = V_4; Vector3_t4282066566 L_14 = V_1; Vector3_t4282066566 L_15 = Vector3_Max_m545730887(NULL /*static, unused*/, L_13, L_14, /*hidden argument*/NULL); V_1 = L_15; int32_t L_16 = V_3; V_3 = ((int32_t)((int32_t)L_16+(int32_t)1)); } IL_009c: { int32_t L_17 = V_3; if ((((int32_t)L_17) < ((int32_t)4))) { goto IL_006c; } } { Vector3_t4282066566 L_18 = V_0; Vector3_t4282066566 L_19 = Vector3_get_zero_m2017759730(NULL /*static, unused*/, /*hidden argument*/NULL); Bounds__ctor_m4160293652((&V_5), L_18, L_19, /*hidden argument*/NULL); Vector3_t4282066566 L_20 = V_1; Bounds_Encapsulate_m3624685234((&V_5), L_20, /*hidden argument*/NULL); Bounds_t2711641849 L_21 = V_5; return L_21; } } // UnityEngine.Vector2 UnityEngine.UI.ScrollRect::CalculateOffset(UnityEngine.Vector2) extern "C" Vector2_t4282066565 ScrollRect_CalculateOffset_m224839950 (ScrollRect_t3606982749 * __this, Vector2_t4282066565 ___delta0, const MethodInfo* method) { Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); Vector3_t4282066566 V_3; memset(&V_3, 0, sizeof(V_3)); Vector3_t4282066566 V_4; memset(&V_4, 0, sizeof(V_4)); Vector3_t4282066566 V_5; memset(&V_5, 0, sizeof(V_5)); Vector3_t4282066566 V_6; memset(&V_6, 0, sizeof(V_6)); Vector3_t4282066566 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t4282066566 V_8; memset(&V_8, 0, sizeof(V_8)); Vector3_t4282066566 V_9; memset(&V_9, 0, sizeof(V_9)); Vector3_t4282066566 V_10; memset(&V_10, 0, sizeof(V_10)); { Vector2_t4282066565 L_0 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = __this->get_m_MovementType_5(); if (L_1) { goto IL_0013; } } { Vector2_t4282066565 L_2 = V_0; return L_2; } IL_0013: { Bounds_t2711641849 * L_3 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_4 = Bounds_get_min_m2329472069(L_3, /*hidden argument*/NULL); Vector2_t4282066565 L_5 = Vector2_op_Implicit_m4083860659(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); V_1 = L_5; Bounds_t2711641849 * L_6 = __this->get_address_of_m_ContentBounds_21(); Vector3_t4282066566 L_7 = Bounds_get_max_m2329243351(L_6, /*hidden argument*/NULL); Vector2_t4282066565 L_8 = Vector2_op_Implicit_m4083860659(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); V_2 = L_8; bool L_9 = __this->get_m_Horizontal_3(); if (!L_9) { goto IL_00f4; } } { Vector2_t4282066565 * L_10 = (&V_1); float L_11 = L_10->get_x_1(); float L_12 = (&___delta0)->get_x_1(); L_10->set_x_1(((float)((float)L_11+(float)L_12))); Vector2_t4282066565 * L_13 = (&V_2); float L_14 = L_13->get_x_1(); float L_15 = (&___delta0)->get_x_1(); L_13->set_x_1(((float)((float)L_14+(float)L_15))); float L_16 = (&V_1)->get_x_1(); Bounds_t2711641849 * L_17 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_18 = Bounds_get_min_m2329472069(L_17, /*hidden argument*/NULL); V_3 = L_18; float L_19 = (&V_3)->get_x_1(); if ((!(((float)L_16) > ((float)L_19)))) { goto IL_00b1; } } { Bounds_t2711641849 * L_20 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_21 = Bounds_get_min_m2329472069(L_20, /*hidden argument*/NULL); V_4 = L_21; float L_22 = (&V_4)->get_x_1(); float L_23 = (&V_1)->get_x_1(); (&V_0)->set_x_1(((float)((float)L_22-(float)L_23))); goto IL_00f4; } IL_00b1: { float L_24 = (&V_2)->get_x_1(); Bounds_t2711641849 * L_25 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_26 = Bounds_get_max_m2329243351(L_25, /*hidden argument*/NULL); V_5 = L_26; float L_27 = (&V_5)->get_x_1(); if ((!(((float)L_24) < ((float)L_27)))) { goto IL_00f4; } } { Bounds_t2711641849 * L_28 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_29 = Bounds_get_max_m2329243351(L_28, /*hidden argument*/NULL); V_6 = L_29; float L_30 = (&V_6)->get_x_1(); float L_31 = (&V_2)->get_x_1(); (&V_0)->set_x_1(((float)((float)L_30-(float)L_31))); } IL_00f4: { bool L_32 = __this->get_m_Vertical_4(); if (!L_32) { goto IL_01b4; } } { Vector2_t4282066565 * L_33 = (&V_1); float L_34 = L_33->get_y_2(); float L_35 = (&___delta0)->get_y_2(); L_33->set_y_2(((float)((float)L_34+(float)L_35))); Vector2_t4282066565 * L_36 = (&V_2); float L_37 = L_36->get_y_2(); float L_38 = (&___delta0)->get_y_2(); L_36->set_y_2(((float)((float)L_37+(float)L_38))); float L_39 = (&V_2)->get_y_2(); Bounds_t2711641849 * L_40 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_41 = Bounds_get_max_m2329243351(L_40, /*hidden argument*/NULL); V_7 = L_41; float L_42 = (&V_7)->get_y_2(); if ((!(((float)L_39) < ((float)L_42)))) { goto IL_0171; } } { Bounds_t2711641849 * L_43 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_44 = Bounds_get_max_m2329243351(L_43, /*hidden argument*/NULL); V_8 = L_44; float L_45 = (&V_8)->get_y_2(); float L_46 = (&V_2)->get_y_2(); (&V_0)->set_y_2(((float)((float)L_45-(float)L_46))); goto IL_01b4; } IL_0171: { float L_47 = (&V_1)->get_y_2(); Bounds_t2711641849 * L_48 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_49 = Bounds_get_min_m2329472069(L_48, /*hidden argument*/NULL); V_9 = L_49; float L_50 = (&V_9)->get_y_2(); if ((!(((float)L_47) > ((float)L_50)))) { goto IL_01b4; } } { Bounds_t2711641849 * L_51 = __this->get_address_of_m_ViewBounds_22(); Vector3_t4282066566 L_52 = Bounds_get_min_m2329472069(L_51, /*hidden argument*/NULL); V_10 = L_52; float L_53 = (&V_10)->get_y_2(); float L_54 = (&V_1)->get_y_2(); (&V_0)->set_y_2(((float)((float)L_53-(float)L_54))); } IL_01b4: { Vector2_t4282066565 L_55 = V_0; return L_55; } } // System.Void UnityEngine.UI.ScrollRect::SetDirty() extern Il2CppClass* LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_SetDirty_m93607546_MetadataUsageId; extern "C" void ScrollRect_SetDirty_m93607546 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_SetDirty_m93607546_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.UI.ScrollRect::IsActive() */, __this); if (L_0) { goto IL_000c; } } { return; } IL_000c: { RectTransform_t972643934 * L_1 = ScrollRect_get_rectTransform_m836427513(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var); LayoutRebuilder_MarkLayoutForRebuild_m901621521(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.ScrollRect::SetDirtyCaching() extern Il2CppClass* CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var; extern Il2CppClass* LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var; extern const uint32_t ScrollRect_SetDirtyCaching_m4215531847_MetadataUsageId; extern "C" void ScrollRect_SetDirtyCaching_m4215531847 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRect_SetDirtyCaching_m4215531847_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.UI.ScrollRect::IsActive() */, __this); if (L_0) { goto IL_000c; } } { return; } IL_000c: { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var); CanvasUpdateRegistry_RegisterCanvasElementForLayoutRebuild_m1282865408(NULL /*static, unused*/, __this, /*hidden argument*/NULL); RectTransform_t972643934 * L_1 = ScrollRect_get_rectTransform_m836427513(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(LayoutRebuilder_t1942933988_il2cpp_TypeInfo_var); LayoutRebuilder_MarkLayoutForRebuild_m901621521(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ScrollRect::UnityEngine.UI.ICanvasElement.IsDestroyed() extern "C" bool ScrollRect_UnityEngine_UI_ICanvasElement_IsDestroyed_m1861319301 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { bool L_0 = UIBehaviour_IsDestroyed_m3027499227(__this, /*hidden argument*/NULL); return L_0; } } // UnityEngine.Transform UnityEngine.UI.ScrollRect::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t1659122786 * ScrollRect_UnityEngine_UI_ICanvasElement_get_transform_m3316531305 (ScrollRect_t3606982749 * __this, const MethodInfo* method) { { Transform_t1659122786 * L_0 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.ScrollRect/ScrollRectEvent::.ctor() extern const MethodInfo* UnityEvent_1__ctor_m99457450_MethodInfo_var; extern const uint32_t ScrollRectEvent__ctor_m985343040_MetadataUsageId; extern "C" void ScrollRectEvent__ctor_m985343040 (ScrollRectEvent_t1643322606 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ScrollRectEvent__ctor_m985343040_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UnityEvent_1__ctor_m99457450(__this, /*hidden argument*/UnityEvent_1__ctor_m99457450_MethodInfo_var); return; } } // System.Void UnityEngine.UI.Selectable::.ctor() extern Il2CppClass* AnimationTriggers_t115197445_il2cpp_TypeInfo_var; extern Il2CppClass* List_1_t775636365_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m3058885740_MethodInfo_var; extern const uint32_t Selectable__ctor_m1133588277_MetadataUsageId; extern "C" void Selectable__ctor_m1133588277 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable__ctor_m1133588277_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Navigation_t1108456480 L_0 = Navigation_get_defaultNavigation_m492829917(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Navigation_3(L_0); __this->set_m_Transition_4(1); ColorBlock_t508458230 L_1 = ColorBlock_get_defaultColorBlock_m533915527(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Colors_5(L_1); AnimationTriggers_t115197445 * L_2 = (AnimationTriggers_t115197445 *)il2cpp_codegen_object_new(AnimationTriggers_t115197445_il2cpp_TypeInfo_var); AnimationTriggers__ctor_m4034548412(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_t775636365 * L_3 = (List_1_t775636365 *)il2cpp_codegen_object_new(List_1_t775636365_il2cpp_TypeInfo_var); List_1__ctor_m3058885740(L_3, /*hidden argument*/List_1__ctor_m3058885740_MethodInfo_var); __this->set_m_CanvasGroupCache_12(L_3); UIBehaviour__ctor_m1261553468(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::.cctor() extern Il2CppClass* List_1_t3253367090_il2cpp_TypeInfo_var; extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m1426333013_MethodInfo_var; extern const uint32_t Selectable__cctor_m299402008_MetadataUsageId; extern "C" void Selectable__cctor_m299402008 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable__cctor_m299402008_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t3253367090 * L_0 = (List_1_t3253367090 *)il2cpp_codegen_object_new(List_1_t3253367090_il2cpp_TypeInfo_var); List_1__ctor_m1426333013(L_0, /*hidden argument*/List_1__ctor_m1426333013_MethodInfo_var); ((Selectable_t1885181538_StaticFields*)Selectable_t1885181538_il2cpp_TypeInfo_var->static_fields)->set_s_List_2(L_0); return; } } // System.Collections.Generic.List`1<UnityEngine.UI.Selectable> UnityEngine.UI.Selectable::get_allSelectables() extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const uint32_t Selectable_get_allSelectables_m476416992_MetadataUsageId; extern "C" List_1_t3253367090 * Selectable_get_allSelectables_m476416992 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_get_allSelectables_m476416992_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); List_1_t3253367090 * L_0 = ((Selectable_t1885181538_StaticFields*)Selectable_t1885181538_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); return L_0; } } // UnityEngine.UI.Navigation UnityEngine.UI.Selectable::get_navigation() extern "C" Navigation_t1108456480 Selectable_get_navigation_m3138151376 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Navigation_t1108456480 L_0 = __this->get_m_Navigation_3(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_navigation(UnityEngine.UI.Navigation) extern const MethodInfo* SetPropertyUtility_SetEquatableStruct_TisNavigation_t1108456480_m3717372898_MethodInfo_var; extern const uint32_t Selectable_set_navigation_m3946690907_MetadataUsageId; extern "C" void Selectable_set_navigation_m3946690907 (Selectable_t1885181538 * __this, Navigation_t1108456480 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_navigation_m3946690907_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Navigation_t1108456480 * L_0 = __this->get_address_of_m_Navigation_3(); Navigation_t1108456480 L_1 = ___value0; bool L_2 = SetPropertyUtility_SetEquatableStruct_TisNavigation_t1108456480_m3717372898(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetEquatableStruct_TisNavigation_t1108456480_m3717372898_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // UnityEngine.UI.Selectable/Transition UnityEngine.UI.Selectable::get_transition() extern "C" int32_t Selectable_get_transition_m4100650273 (Selectable_t1885181538 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_Transition_4(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_transition(UnityEngine.UI.Selectable/Transition) extern const MethodInfo* SetPropertyUtility_SetStruct_TisTransition_t1922345195_m697175766_MethodInfo_var; extern const uint32_t Selectable_set_transition_m1538436886_MetadataUsageId; extern "C" void Selectable_set_transition_m1538436886 (Selectable_t1885181538 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_transition_m1538436886_MetadataUsageId); s_Il2CppMethodIntialized = true; } { int32_t* L_0 = __this->get_address_of_m_Transition_4(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisTransition_t1922345195_m697175766(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisTransition_t1922345195_m697175766_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // UnityEngine.UI.ColorBlock UnityEngine.UI.Selectable::get_colors() extern "C" ColorBlock_t508458230 Selectable_get_colors_m2926475394 (Selectable_t1885181538 * __this, const MethodInfo* method) { { ColorBlock_t508458230 L_0 = __this->get_m_Colors_5(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_colors(UnityEngine.UI.ColorBlock) extern const MethodInfo* SetPropertyUtility_SetEquatableStruct_TisColorBlock_t508458230_m3999144268_MethodInfo_var; extern const uint32_t Selectable_set_colors_m2365118697_MetadataUsageId; extern "C" void Selectable_set_colors_m2365118697 (Selectable_t1885181538 * __this, ColorBlock_t508458230 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_colors_m2365118697_MetadataUsageId); s_Il2CppMethodIntialized = true; } { ColorBlock_t508458230 * L_0 = __this->get_address_of_m_Colors_5(); ColorBlock_t508458230 L_1 = ___value0; bool L_2 = SetPropertyUtility_SetEquatableStruct_TisColorBlock_t508458230_m3999144268(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetEquatableStruct_TisColorBlock_t508458230_m3999144268_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // UnityEngine.UI.SpriteState UnityEngine.UI.Selectable::get_spriteState() extern "C" SpriteState_t2895308594 Selectable_get_spriteState_m102480676 (Selectable_t1885181538 * __this, const MethodInfo* method) { { SpriteState_t2895308594 L_0 = __this->get_m_SpriteState_6(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_spriteState(UnityEngine.UI.SpriteState) extern const MethodInfo* SetPropertyUtility_SetEquatableStruct_TisSpriteState_t2895308594_m1850844776_MethodInfo_var; extern const uint32_t Selectable_set_spriteState_m3715637593_MetadataUsageId; extern "C" void Selectable_set_spriteState_m3715637593 (Selectable_t1885181538 * __this, SpriteState_t2895308594 ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_spriteState_m3715637593_MetadataUsageId); s_Il2CppMethodIntialized = true; } { SpriteState_t2895308594 * L_0 = __this->get_address_of_m_SpriteState_6(); SpriteState_t2895308594 L_1 = ___value0; bool L_2 = SetPropertyUtility_SetEquatableStruct_TisSpriteState_t2895308594_m1850844776(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetEquatableStruct_TisSpriteState_t2895308594_m1850844776_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // UnityEngine.UI.AnimationTriggers UnityEngine.UI.Selectable::get_animationTriggers() extern "C" AnimationTriggers_t115197445 * Selectable_get_animationTriggers_m4030265988 (Selectable_t1885181538 * __this, const MethodInfo* method) { { AnimationTriggers_t115197445 * L_0 = __this->get_m_AnimationTriggers_7(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_animationTriggers(UnityEngine.UI.AnimationTriggers) extern const MethodInfo* SetPropertyUtility_SetClass_TisAnimationTriggers_t115197445_m2237051106_MethodInfo_var; extern const uint32_t Selectable_set_animationTriggers_m1859718713_MetadataUsageId; extern "C" void Selectable_set_animationTriggers_m1859718713 (Selectable_t1885181538 * __this, AnimationTriggers_t115197445 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_animationTriggers_m1859718713_MetadataUsageId); s_Il2CppMethodIntialized = true; } { AnimationTriggers_t115197445 ** L_0 = __this->get_address_of_m_AnimationTriggers_7(); AnimationTriggers_t115197445 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisAnimationTriggers_t115197445_m2237051106(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisAnimationTriggers_t115197445_m2237051106_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // UnityEngine.UI.Graphic UnityEngine.UI.Selectable::get_targetGraphic() extern "C" Graphic_t836799438 * Selectable_get_targetGraphic_m1206082259 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Graphic_t836799438 * L_0 = __this->get_m_TargetGraphic_9(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_targetGraphic(UnityEngine.UI.Graphic) extern const MethodInfo* SetPropertyUtility_SetClass_TisGraphic_t836799438_m4232752825_MethodInfo_var; extern const uint32_t Selectable_set_targetGraphic_m54088136_MetadataUsageId; extern "C" void Selectable_set_targetGraphic_m54088136 (Selectable_t1885181538 * __this, Graphic_t836799438 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_targetGraphic_m54088136_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Graphic_t836799438 ** L_0 = __this->get_address_of_m_TargetGraphic_9(); Graphic_t836799438 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisGraphic_t836799438_m4232752825(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisGraphic_t836799438_m4232752825_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // System.Boolean UnityEngine.UI.Selectable::get_interactable() extern "C" bool Selectable_get_interactable_m1204033370 (Selectable_t1885181538 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_Interactable_8(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_interactable(System.Boolean) extern Il2CppClass* EventSystem_t2276120119_il2cpp_TypeInfo_var; extern const MethodInfo* SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768_MethodInfo_var; extern const uint32_t Selectable_set_interactable_m2686686419_MetadataUsageId; extern "C" void Selectable_set_interactable_m2686686419 (Selectable_t1885181538 * __this, bool ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_set_interactable_m2686686419_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool* L_0 = __this->get_address_of_m_Interactable_8(); bool L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768_MethodInfo_var); if (!L_2) { goto IL_0057; } } { bool L_3 = __this->get_m_Interactable_8(); if (!L_3) { goto IL_0051; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_4 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_5 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_4, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_5) { goto IL_0051; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_6 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_6); GameObject_t3674682005 * L_7 = EventSystem_get_currentSelectedGameObject_m4236083783(L_6, /*hidden argument*/NULL); GameObject_t3674682005 * L_8 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); bool L_9 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); if (!L_9) { goto IL_0051; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_10 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_10); EventSystem_SetSelectedGameObject_m1869236832(L_10, (GameObject_t3674682005 *)NULL, /*hidden argument*/NULL); } IL_0051: { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_0057: { return; } } // System.Boolean UnityEngine.UI.Selectable::get_isPointerInside() extern "C" bool Selectable_get_isPointerInside_m3778852455 (Selectable_t1885181538 * __this, const MethodInfo* method) { { bool L_0 = __this->get_U3CisPointerInsideU3Ek__BackingField_13(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_isPointerInside(System.Boolean) extern "C" void Selectable_set_isPointerInside_m1584068316 (Selectable_t1885181538 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_U3CisPointerInsideU3Ek__BackingField_13(L_0); return; } } // System.Boolean UnityEngine.UI.Selectable::get_isPointerDown() extern "C" bool Selectable_get_isPointerDown_m451775501 (Selectable_t1885181538 * __this, const MethodInfo* method) { { bool L_0 = __this->get_U3CisPointerDownU3Ek__BackingField_14(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_isPointerDown(System.Boolean) extern "C" void Selectable_set_isPointerDown_m2193598850 (Selectable_t1885181538 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_U3CisPointerDownU3Ek__BackingField_14(L_0); return; } } // System.Boolean UnityEngine.UI.Selectable::get_hasSelection() extern "C" bool Selectable_get_hasSelection_m771189340 (Selectable_t1885181538 * __this, const MethodInfo* method) { { bool L_0 = __this->get_U3ChasSelectionU3Ek__BackingField_15(); return L_0; } } // System.Void UnityEngine.UI.Selectable::set_hasSelection(System.Boolean) extern "C" void Selectable_set_hasSelection_m138443861 (Selectable_t1885181538 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_U3ChasSelectionU3Ek__BackingField_15(L_0); return; } } // UnityEngine.UI.Image UnityEngine.UI.Selectable::get_image() extern Il2CppClass* Image_t538875265_il2cpp_TypeInfo_var; extern const uint32_t Selectable_get_image_m978701700_MetadataUsageId; extern "C" Image_t538875265 * Selectable_get_image_m978701700 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_get_image_m978701700_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Graphic_t836799438 * L_0 = __this->get_m_TargetGraphic_9(); return ((Image_t538875265 *)IsInstClass(L_0, Image_t538875265_il2cpp_TypeInfo_var)); } } // System.Void UnityEngine.UI.Selectable::set_image(UnityEngine.UI.Image) extern "C" void Selectable_set_image_m4179082937 (Selectable_t1885181538 * __this, Image_t538875265 * ___value0, const MethodInfo* method) { { Image_t538875265 * L_0 = ___value0; __this->set_m_TargetGraphic_9(L_0); return; } } // UnityEngine.Animator UnityEngine.UI.Selectable::get_animator() extern const MethodInfo* Component_GetComponent_TisAnimator_t2776330603_m4147395588_MethodInfo_var; extern const uint32_t Selectable_get_animator_m1533578598_MetadataUsageId; extern "C" Animator_t2776330603 * Selectable_get_animator_m1533578598 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_get_animator_m1533578598_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Animator_t2776330603 * L_0 = Component_GetComponent_TisAnimator_t2776330603_m4147395588(__this, /*hidden argument*/Component_GetComponent_TisAnimator_t2776330603_m4147395588_MethodInfo_var); return L_0; } } // System.Void UnityEngine.UI.Selectable::Awake() extern const MethodInfo* Component_GetComponent_TisGraphic_t836799438_m908906813_MethodInfo_var; extern const uint32_t Selectable_Awake_m1371193496_MetadataUsageId; extern "C" void Selectable_Awake_m1371193496 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_Awake_m1371193496_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Graphic_t836799438 * L_0 = __this->get_m_TargetGraphic_9(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001d; } } { Graphic_t836799438 * L_2 = Component_GetComponent_TisGraphic_t836799438_m908906813(__this, /*hidden argument*/Component_GetComponent_TisGraphic_t836799438_m908906813_MethodInfo_var); __this->set_m_TargetGraphic_9(L_2); } IL_001d: { return; } } // System.Void UnityEngine.UI.Selectable::OnCanvasGroupChanged() extern const MethodInfo* Component_GetComponents_TisCanvasGroup_t3702418109_m4244188622_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m2330399181_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1898509448_MethodInfo_var; extern const uint32_t Selectable_OnCanvasGroupChanged_m4067350875_MetadataUsageId; extern "C" void Selectable_OnCanvasGroupChanged_m4067350875 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_OnCanvasGroupChanged_m4067350875_MetadataUsageId); s_Il2CppMethodIntialized = true; } bool V_0 = false; Transform_t1659122786 * V_1 = NULL; bool V_2 = false; int32_t V_3 = 0; { V_0 = (bool)1; Transform_t1659122786 * L_0 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); V_1 = L_0; goto IL_007c; } IL_000e: { Transform_t1659122786 * L_1 = V_1; List_1_t775636365 * L_2 = __this->get_m_CanvasGroupCache_12(); NullCheck(L_1); Component_GetComponents_TisCanvasGroup_t3702418109_m4244188622(L_1, L_2, /*hidden argument*/Component_GetComponents_TisCanvasGroup_t3702418109_m4244188622_MethodInfo_var); V_2 = (bool)0; V_3 = 0; goto IL_0059; } IL_0023: { List_1_t775636365 * L_3 = __this->get_m_CanvasGroupCache_12(); int32_t L_4 = V_3; NullCheck(L_3); CanvasGroup_t3702418109 * L_5 = List_1_get_Item_m2330399181(L_3, L_4, /*hidden argument*/List_1_get_Item_m2330399181_MethodInfo_var); NullCheck(L_5); bool L_6 = CanvasGroup_get_interactable_m2411844645(L_5, /*hidden argument*/NULL); if (L_6) { goto IL_003d; } } { V_0 = (bool)0; V_2 = (bool)1; } IL_003d: { List_1_t775636365 * L_7 = __this->get_m_CanvasGroupCache_12(); int32_t L_8 = V_3; NullCheck(L_7); CanvasGroup_t3702418109 * L_9 = List_1_get_Item_m2330399181(L_7, L_8, /*hidden argument*/List_1_get_Item_m2330399181_MethodInfo_var); NullCheck(L_9); bool L_10 = CanvasGroup_get_ignoreParentGroups_m1831887525(L_9, /*hidden argument*/NULL); if (!L_10) { goto IL_0055; } } { V_2 = (bool)1; } IL_0055: { int32_t L_11 = V_3; V_3 = ((int32_t)((int32_t)L_11+(int32_t)1)); } IL_0059: { int32_t L_12 = V_3; List_1_t775636365 * L_13 = __this->get_m_CanvasGroupCache_12(); NullCheck(L_13); int32_t L_14 = List_1_get_Count_m1898509448(L_13, /*hidden argument*/List_1_get_Count_m1898509448_MethodInfo_var); if ((((int32_t)L_12) < ((int32_t)L_14))) { goto IL_0023; } } { bool L_15 = V_2; if (!L_15) { goto IL_0075; } } { goto IL_0088; } IL_0075: { Transform_t1659122786 * L_16 = V_1; NullCheck(L_16); Transform_t1659122786 * L_17 = Transform_get_parent_m2236876972(L_16, /*hidden argument*/NULL); V_1 = L_17; } IL_007c: { Transform_t1659122786 * L_18 = V_1; bool L_19 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_18, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_19) { goto IL_000e; } } IL_0088: { bool L_20 = V_0; bool L_21 = __this->get_m_GroupsAllowInteraction_10(); if ((((int32_t)L_20) == ((int32_t)L_21))) { goto IL_00a1; } } { bool L_22 = V_0; __this->set_m_GroupsAllowInteraction_10(L_22); Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); } IL_00a1: { return; } } // System.Boolean UnityEngine.UI.Selectable::IsInteractable() extern "C" bool Selectable_IsInteractable_m1810942779 (Selectable_t1885181538 * __this, const MethodInfo* method) { int32_t G_B3_0 = 0; { bool L_0 = __this->get_m_GroupsAllowInteraction_10(); if (!L_0) { goto IL_0013; } } { bool L_1 = __this->get_m_Interactable_8(); G_B3_0 = ((int32_t)(L_1)); goto IL_0014; } IL_0013: { G_B3_0 = 0; } IL_0014: { return (bool)G_B3_0; } } // System.Void UnityEngine.UI.Selectable::OnDidApplyAnimationProperties() extern "C" void Selectable_OnDidApplyAnimationProperties_m4092978140 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Selectable_OnSetProperty_m571656523(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnEnable() extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_Add_m1120693829_MethodInfo_var; extern const uint32_t Selectable_OnEnable_m1472090161_MetadataUsageId; extern "C" void Selectable_OnEnable_m1472090161 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_OnEnable_m1472090161_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; { UIBehaviour_OnEnable_m4047103690(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); List_1_t3253367090 * L_0 = ((Selectable_t1885181538_StaticFields*)Selectable_t1885181538_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); NullCheck(L_0); List_1_Add_m1120693829(L_0, __this, /*hidden argument*/List_1_Add_m1120693829_MethodInfo_var); V_0 = 0; bool L_1 = Selectable_get_hasSelection_m771189340(__this, /*hidden argument*/NULL); if (!L_1) { goto IL_0020; } } { V_0 = 1; } IL_0020: { int32_t L_2 = V_0; __this->set_m_CurrentSelectionState_11(L_2); Selectable_InternalEvaluateAndTransitionToSelectionState_m543442976(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnSetProperty() extern "C" void Selectable_OnSetProperty_m571656523 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Selectable_InternalEvaluateAndTransitionToSelectionState_m543442976(__this, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnDisable() extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_Remove_m3691398354_MethodInfo_var; extern const uint32_t Selectable_OnDisable_m3126059292_MetadataUsageId; extern "C" void Selectable_OnDisable_m3126059292 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_OnDisable_m3126059292_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); List_1_t3253367090 * L_0 = ((Selectable_t1885181538_StaticFields*)Selectable_t1885181538_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); NullCheck(L_0); List_1_Remove_m3691398354(L_0, __this, /*hidden argument*/List_1_Remove_m3691398354_MethodInfo_var); VirtActionInvoker0::Invoke(24 /* System.Void UnityEngine.UI.Selectable::InstantClearState() */, __this); UIBehaviour_OnDisable_m1347100067(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Selectable/SelectionState UnityEngine.UI.Selectable::get_currentSelectionState() extern "C" int32_t Selectable_get_currentSelectionState_m730905540 (Selectable_t1885181538 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_CurrentSelectionState_11(); return L_0; } } // System.Void UnityEngine.UI.Selectable::InstantClearState() extern "C" void Selectable_InstantClearState_m1586585368 (Selectable_t1885181538 * __this, const MethodInfo* method) { String_t* V_0 = NULL; int32_t V_1 = 0; { AnimationTriggers_t115197445 * L_0 = __this->get_m_AnimationTriggers_7(); NullCheck(L_0); String_t* L_1 = AnimationTriggers_get_normalTrigger_m326085791(L_0, /*hidden argument*/NULL); V_0 = L_1; Selectable_set_isPointerInside_m1584068316(__this, (bool)0, /*hidden argument*/NULL); Selectable_set_isPointerDown_m2193598850(__this, (bool)0, /*hidden argument*/NULL); Selectable_set_hasSelection_m138443861(__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)((int32_t)L_3-(int32_t)1)) == 0) { goto IL_0041; } if (((int32_t)((int32_t)L_3-(int32_t)1)) == 1) { goto IL_0052; } if (((int32_t)((int32_t)L_3-(int32_t)1)) == 2) { goto IL_005e; } } { goto IL_006a; } IL_0041: { Color_t4194546905 L_4 = Color_get_white_m3038282331(NULL /*static, unused*/, /*hidden argument*/NULL); Selectable_StartColorTween_m2559093428(__this, L_4, (bool)1, /*hidden argument*/NULL); goto IL_006a; } IL_0052: { Selectable_DoSpriteSwap_m1929545238(__this, (Sprite_t3199167241 *)NULL, /*hidden argument*/NULL); goto IL_006a; } IL_005e: { String_t* L_5 = V_0; Selectable_TriggerAnimation_m2433448647(__this, L_5, /*hidden argument*/NULL); goto IL_006a; } IL_006a: { return; } } // System.Void UnityEngine.UI.Selectable::DoStateTransition(UnityEngine.UI.Selectable/SelectionState,System.Boolean) extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern const uint32_t Selectable_DoStateTransition_m1211483242_MetadataUsageId; extern "C" void Selectable_DoStateTransition_m1211483242 (Selectable_t1885181538 * __this, int32_t ___state0, bool ___instant1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_DoStateTransition_m1211483242_MetadataUsageId); s_Il2CppMethodIntialized = true; } Color_t4194546905 V_0; memset(&V_0, 0, sizeof(V_0)); Sprite_t3199167241 * V_1 = NULL; String_t* V_2 = NULL; int32_t V_3 = 0; int32_t V_4 = 0; { int32_t L_0 = ___state0; V_3 = L_0; int32_t L_1 = V_3; if (L_1 == 0) { goto IL_001d; } if (L_1 == 1) { goto IL_003c; } if (L_1 == 2) { goto IL_0065; } if (L_1 == 3) { goto IL_008e; } } { goto IL_00b7; } IL_001d: { ColorBlock_t508458230 * L_2 = __this->get_address_of_m_Colors_5(); Color_t4194546905 L_3 = ColorBlock_get_normalColor_m1021113593(L_2, /*hidden argument*/NULL); V_0 = L_3; V_1 = (Sprite_t3199167241 *)NULL; AnimationTriggers_t115197445 * L_4 = __this->get_m_AnimationTriggers_7(); NullCheck(L_4); String_t* L_5 = AnimationTriggers_get_normalTrigger_m326085791(L_4, /*hidden argument*/NULL); V_2 = L_5; goto IL_00ca; } IL_003c: { ColorBlock_t508458230 * L_6 = __this->get_address_of_m_Colors_5(); Color_t4194546905 L_7 = ColorBlock_get_highlightedColor_m2834784533(L_6, /*hidden argument*/NULL); V_0 = L_7; SpriteState_t2895308594 * L_8 = __this->get_address_of_m_SpriteState_6(); Sprite_t3199167241 * L_9 = SpriteState_get_highlightedSprite_m2511270273(L_8, /*hidden argument*/NULL); V_1 = L_9; AnimationTriggers_t115197445 * L_10 = __this->get_m_AnimationTriggers_7(); NullCheck(L_10); String_t* L_11 = AnimationTriggers_get_highlightedTrigger_m1862702265(L_10, /*hidden argument*/NULL); V_2 = L_11; goto IL_00ca; } IL_0065: { ColorBlock_t508458230 * L_12 = __this->get_address_of_m_Colors_5(); Color_t4194546905 L_13 = ColorBlock_get_pressedColor_m2014354534(L_12, /*hidden argument*/NULL); V_0 = L_13; SpriteState_t2895308594 * L_14 = __this->get_address_of_m_SpriteState_6(); Sprite_t3199167241 * L_15 = SpriteState_get_pressedSprite_m591013456(L_14, /*hidden argument*/NULL); V_1 = L_15; AnimationTriggers_t115197445 * L_16 = __this->get_m_AnimationTriggers_7(); NullCheck(L_16); String_t* L_17 = AnimationTriggers_get_pressedTrigger_m3081240394(L_16, /*hidden argument*/NULL); V_2 = L_17; goto IL_00ca; } IL_008e: { ColorBlock_t508458230 * L_18 = __this->get_address_of_m_Colors_5(); Color_t4194546905 L_19 = ColorBlock_get_disabledColor_m2484721348(L_18, /*hidden argument*/NULL); V_0 = L_19; SpriteState_t2895308594 * L_20 = __this->get_address_of_m_SpriteState_6(); Sprite_t3199167241 * L_21 = SpriteState_get_disabledSprite_m1512804506(L_20, /*hidden argument*/NULL); V_1 = L_21; AnimationTriggers_t115197445 * L_22 = __this->get_m_AnimationTriggers_7(); NullCheck(L_22); String_t* L_23 = AnimationTriggers_get_disabledTrigger_m2031458154(L_22, /*hidden argument*/NULL); V_2 = L_23; goto IL_00ca; } IL_00b7: { Color_t4194546905 L_24 = Color_get_black_m1687201969(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_24; V_1 = (Sprite_t3199167241 *)NULL; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_25 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); V_2 = L_25; goto IL_00ca; } IL_00ca: { GameObject_t3674682005 * L_26 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); NullCheck(L_26); bool L_27 = GameObject_get_activeInHierarchy_m612450965(L_26, /*hidden argument*/NULL); if (!L_27) { goto IL_0131; } } { int32_t L_28 = __this->get_m_Transition_4(); V_4 = L_28; int32_t L_29 = V_4; if (((int32_t)((int32_t)L_29-(int32_t)1)) == 0) { goto IL_00fc; } if (((int32_t)((int32_t)L_29-(int32_t)1)) == 1) { goto IL_0119; } if (((int32_t)((int32_t)L_29-(int32_t)1)) == 2) { goto IL_0125; } } { goto IL_0131; } IL_00fc: { Color_t4194546905 L_30 = V_0; ColorBlock_t508458230 * L_31 = __this->get_address_of_m_Colors_5(); float L_32 = ColorBlock_get_colorMultiplier_m2799886278(L_31, /*hidden argument*/NULL); Color_t4194546905 L_33 = Color_op_Multiply_m204757678(NULL /*static, unused*/, L_30, L_32, /*hidden argument*/NULL); bool L_34 = ___instant1; Selectable_StartColorTween_m2559093428(__this, L_33, L_34, /*hidden argument*/NULL); goto IL_0131; } IL_0119: { Sprite_t3199167241 * L_35 = V_1; Selectable_DoSpriteSwap_m1929545238(__this, L_35, /*hidden argument*/NULL); goto IL_0131; } IL_0125: { String_t* L_36 = V_2; Selectable_TriggerAnimation_m2433448647(__this, L_36, /*hidden argument*/NULL); goto IL_0131; } IL_0131: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectable(UnityEngine.Vector3) extern Il2CppClass* RectTransform_t972643934_il2cpp_TypeInfo_var; extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Item_m3532330948_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1907518193_MethodInfo_var; extern const uint32_t Selectable_FindSelectable_m1109039701_MetadataUsageId; extern "C" Selectable_t1885181538 * Selectable_FindSelectable_m1109039701 (Selectable_t1885181538 * __this, Vector3_t4282066566 ___dir0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_FindSelectable_m1109039701_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector3_t4282066566 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_t4282066566 V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; Selectable_t1885181538 * V_3 = NULL; int32_t V_4 = 0; Selectable_t1885181538 * V_5 = NULL; RectTransform_t972643934 * V_6 = NULL; Vector3_t4282066566 V_7; memset(&V_7, 0, sizeof(V_7)); Vector3_t4282066566 V_8; memset(&V_8, 0, sizeof(V_8)); float V_9 = 0.0f; float V_10 = 0.0f; Navigation_t1108456480 V_11; memset(&V_11, 0, sizeof(V_11)); Rect_t4241904616 V_12; memset(&V_12, 0, sizeof(V_12)); Vector3_t4282066566 G_B10_0; memset(&G_B10_0, 0, sizeof(G_B10_0)); { Vector3_t4282066566 L_0 = Vector3_get_normalized_m2650940353((&___dir0), /*hidden argument*/NULL); ___dir0 = L_0; Transform_t1659122786 * L_1 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); NullCheck(L_1); Quaternion_t1553702882 L_2 = Transform_get_rotation_m11483428(L_1, /*hidden argument*/NULL); Quaternion_t1553702882 L_3 = Quaternion_Inverse_m3542515566(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); Vector3_t4282066566 L_4 = ___dir0; Vector3_t4282066566 L_5 = Quaternion_op_Multiply_m3771288979(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); V_0 = L_5; Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); Transform_t1659122786 * L_7 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); Vector3_t4282066566 L_8 = V_0; Vector2_t4282066565 L_9 = Vector2_op_Implicit_m4083860659(NULL /*static, unused*/, L_8, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); Vector3_t4282066566 L_10 = Selectable_GetPointOnRectEdge_m371681446(NULL /*static, unused*/, ((RectTransform_t972643934 *)IsInstSealed(L_7, RectTransform_t972643934_il2cpp_TypeInfo_var)), L_9, /*hidden argument*/NULL); NullCheck(L_6); Vector3_t4282066566 L_11 = Transform_TransformPoint_m437395512(L_6, L_10, /*hidden argument*/NULL); V_1 = L_11; V_2 = (-std::numeric_limits<float>::infinity()); V_3 = (Selectable_t1885181538 *)NULL; V_4 = 0; goto IL_0132; } IL_0052: { IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); List_1_t3253367090 * L_12 = ((Selectable_t1885181538_StaticFields*)Selectable_t1885181538_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); int32_t L_13 = V_4; NullCheck(L_12); Selectable_t1885181538 * L_14 = List_1_get_Item_m3532330948(L_12, L_13, /*hidden argument*/List_1_get_Item_m3532330948_MethodInfo_var); V_5 = L_14; Selectable_t1885181538 * L_15 = V_5; bool L_16 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_15, __this, /*hidden argument*/NULL); if (L_16) { goto IL_007a; } } { Selectable_t1885181538 * L_17 = V_5; bool L_18 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_17, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_18) { goto IL_007f; } } IL_007a: { goto IL_012c; } IL_007f: { Selectable_t1885181538 * L_19 = V_5; NullCheck(L_19); bool L_20 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, L_19); if (!L_20) { goto IL_00a0; } } { Selectable_t1885181538 * L_21 = V_5; NullCheck(L_21); Navigation_t1108456480 L_22 = Selectable_get_navigation_m3138151376(L_21, /*hidden argument*/NULL); V_11 = L_22; int32_t L_23 = Navigation_get_mode_m721480509((&V_11), /*hidden argument*/NULL); if (L_23) { goto IL_00a5; } } IL_00a0: { goto IL_012c; } IL_00a5: { Selectable_t1885181538 * L_24 = V_5; NullCheck(L_24); Transform_t1659122786 * L_25 = Component_get_transform_m4257140443(L_24, /*hidden argument*/NULL); V_6 = ((RectTransform_t972643934 *)IsInstSealed(L_25, RectTransform_t972643934_il2cpp_TypeInfo_var)); RectTransform_t972643934 * L_26 = V_6; bool L_27 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_26, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_27) { goto IL_00da; } } { RectTransform_t972643934 * L_28 = V_6; NullCheck(L_28); Rect_t4241904616 L_29 = RectTransform_get_rect_m1566017036(L_28, /*hidden argument*/NULL); V_12 = L_29; Vector2_t4282066565 L_30 = Rect_get_center_m610643572((&V_12), /*hidden argument*/NULL); Vector3_t4282066566 L_31 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_30, /*hidden argument*/NULL); G_B10_0 = L_31; goto IL_00df; } IL_00da: { Vector3_t4282066566 L_32 = Vector3_get_zero_m2017759730(NULL /*static, unused*/, /*hidden argument*/NULL); G_B10_0 = L_32; } IL_00df: { V_7 = G_B10_0; Selectable_t1885181538 * L_33 = V_5; NullCheck(L_33); Transform_t1659122786 * L_34 = Component_get_transform_m4257140443(L_33, /*hidden argument*/NULL); Vector3_t4282066566 L_35 = V_7; NullCheck(L_34); Vector3_t4282066566 L_36 = Transform_TransformPoint_m437395512(L_34, L_35, /*hidden argument*/NULL); Vector3_t4282066566 L_37 = V_1; Vector3_t4282066566 L_38 = Vector3_op_Subtraction_m2842958165(NULL /*static, unused*/, L_36, L_37, /*hidden argument*/NULL); V_8 = L_38; Vector3_t4282066566 L_39 = ___dir0; Vector3_t4282066566 L_40 = V_8; float L_41 = Vector3_Dot_m2370485424(NULL /*static, unused*/, L_39, L_40, /*hidden argument*/NULL); V_9 = L_41; float L_42 = V_9; if ((!(((float)L_42) <= ((float)(0.0f))))) { goto IL_0112; } } { goto IL_012c; } IL_0112: { float L_43 = V_9; float L_44 = Vector3_get_sqrMagnitude_m1207423764((&V_8), /*hidden argument*/NULL); V_10 = ((float)((float)L_43/(float)L_44)); float L_45 = V_10; float L_46 = V_2; if ((!(((float)L_45) > ((float)L_46)))) { goto IL_012c; } } { float L_47 = V_10; V_2 = L_47; Selectable_t1885181538 * L_48 = V_5; V_3 = L_48; } IL_012c: { int32_t L_49 = V_4; V_4 = ((int32_t)((int32_t)L_49+(int32_t)1)); } IL_0132: { int32_t L_50 = V_4; IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); List_1_t3253367090 * L_51 = ((Selectable_t1885181538_StaticFields*)Selectable_t1885181538_il2cpp_TypeInfo_var->static_fields)->get_s_List_2(); NullCheck(L_51); int32_t L_52 = List_1_get_Count_m1907518193(L_51, /*hidden argument*/List_1_get_Count_m1907518193_MethodInfo_var); if ((((int32_t)L_50) < ((int32_t)L_52))) { goto IL_0052; } } { Selectable_t1885181538 * L_53 = V_3; return L_53; } } // UnityEngine.Vector3 UnityEngine.UI.Selectable::GetPointOnRectEdge(UnityEngine.RectTransform,UnityEngine.Vector2) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Selectable_GetPointOnRectEdge_m371681446_MetadataUsageId; extern "C" Vector3_t4282066566 Selectable_GetPointOnRectEdge_m371681446 (Il2CppObject * __this /* static, unused */, RectTransform_t972643934 * ___rect0, Vector2_t4282066565 ___dir1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_GetPointOnRectEdge_m371681446_MetadataUsageId); s_Il2CppMethodIntialized = true; } Rect_t4241904616 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); { RectTransform_t972643934 * L_0 = ___rect0; bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { Vector3_t4282066566 L_2 = Vector3_get_zero_m2017759730(NULL /*static, unused*/, /*hidden argument*/NULL); return L_2; } IL_0012: { Vector2_t4282066565 L_3 = ___dir1; Vector2_t4282066565 L_4 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_5 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_0047; } } { Vector2_t4282066565 L_6 = ___dir1; float L_7 = (&___dir1)->get_x_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_8 = fabsf(L_7); float L_9 = (&___dir1)->get_y_2(); float L_10 = fabsf(L_9); float L_11 = Mathf_Max_m3923796455(NULL /*static, unused*/, L_8, L_10, /*hidden argument*/NULL); Vector2_t4282066565 L_12 = Vector2_op_Division_m747627697(NULL /*static, unused*/, L_6, L_11, /*hidden argument*/NULL); ___dir1 = L_12; } IL_0047: { RectTransform_t972643934 * L_13 = ___rect0; NullCheck(L_13); Rect_t4241904616 L_14 = RectTransform_get_rect_m1566017036(L_13, /*hidden argument*/NULL); V_0 = L_14; Vector2_t4282066565 L_15 = Rect_get_center_m610643572((&V_0), /*hidden argument*/NULL); RectTransform_t972643934 * L_16 = ___rect0; NullCheck(L_16); Rect_t4241904616 L_17 = RectTransform_get_rect_m1566017036(L_16, /*hidden argument*/NULL); V_1 = L_17; Vector2_t4282066565 L_18 = Rect_get_size_m136480416((&V_1), /*hidden argument*/NULL); Vector2_t4282066565 L_19 = ___dir1; Vector2_t4282066565 L_20 = Vector2_op_Multiply_m1738245082(NULL /*static, unused*/, L_19, (0.5f), /*hidden argument*/NULL); Vector2_t4282066565 L_21 = Vector2_Scale_m1743563745(NULL /*static, unused*/, L_18, L_20, /*hidden argument*/NULL); Vector2_t4282066565 L_22 = Vector2_op_Addition_m1173049553(NULL /*static, unused*/, L_15, L_21, /*hidden argument*/NULL); ___dir1 = L_22; Vector2_t4282066565 L_23 = ___dir1; Vector3_t4282066566 L_24 = Vector2_op_Implicit_m482286037(NULL /*static, unused*/, L_23, /*hidden argument*/NULL); return L_24; } } // System.Void UnityEngine.UI.Selectable::Navigate(UnityEngine.EventSystems.AxisEventData,UnityEngine.UI.Selectable) extern "C" void Selectable_Navigate_m2039225725 (Selectable_t1885181538 * __this, AxisEventData_t3355659985 * ___eventData0, Selectable_t1885181538 * ___sel1, const MethodInfo* method) { { Selectable_t1885181538 * L_0 = ___sel1; bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0023; } } { Selectable_t1885181538 * 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_0023; } } { AxisEventData_t3355659985 * L_4 = ___eventData0; Selectable_t1885181538 * L_5 = ___sel1; NullCheck(L_5); GameObject_t3674682005 * L_6 = Component_get_gameObject_m1170635899(L_5, /*hidden argument*/NULL); NullCheck(L_4); BaseEventData_set_selectedObject_m3912430657(L_4, L_6, /*hidden argument*/NULL); } IL_0023: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() extern "C" Selectable_t1885181538 * Selectable_FindSelectableOnLeft_m3101734378 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Navigation_t1108456480 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m721480509(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_001d; } } { Navigation_t1108456480 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t1885181538 * L_3 = Navigation_get_selectOnLeft_m1149209502(L_2, /*hidden argument*/NULL); return L_3; } IL_001d: { Navigation_t1108456480 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m721480509(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)1))) { goto IL_004b; } } { Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t1553702882 L_7 = Transform_get_rotation_m11483428(L_6, /*hidden argument*/NULL); Vector3_t4282066566 L_8 = Vector3_get_left_m1616598929(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t4282066566 L_9 = Quaternion_op_Multiply_m3771288979(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t1885181538 * L_10 = Selectable_FindSelectable_m1109039701(__this, L_9, /*hidden argument*/NULL); return L_10; } IL_004b: { return (Selectable_t1885181538 *)NULL; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() extern "C" Selectable_t1885181538 * Selectable_FindSelectableOnRight_m2809695675 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Navigation_t1108456480 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m721480509(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_001d; } } { Navigation_t1108456480 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t1885181538 * L_3 = Navigation_get_selectOnRight_m2410966663(L_2, /*hidden argument*/NULL); return L_3; } IL_001d: { Navigation_t1108456480 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m721480509(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)1))) { goto IL_004b; } } { Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t1553702882 L_7 = Transform_get_rotation_m11483428(L_6, /*hidden argument*/NULL); Vector3_t4282066566 L_8 = Vector3_get_right_m4015137012(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t4282066566 L_9 = Quaternion_op_Multiply_m3771288979(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t1885181538 * L_10 = Selectable_FindSelectable_m1109039701(__this, L_9, /*hidden argument*/NULL); return L_10; } IL_004b: { return (Selectable_t1885181538 *)NULL; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() extern "C" Selectable_t1885181538 * Selectable_FindSelectableOnUp_m3489533950 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Navigation_t1108456480 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m721480509(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_001d; } } { Navigation_t1108456480 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t1885181538 * L_3 = Navigation_get_selectOnUp_m2566832818(L_2, /*hidden argument*/NULL); return L_3; } IL_001d: { Navigation_t1108456480 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m721480509(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)2))) { goto IL_004b; } } { Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t1553702882 L_7 = Transform_get_rotation_m11483428(L_6, /*hidden argument*/NULL); Vector3_t4282066566 L_8 = Vector3_get_up_m4046647141(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t4282066566 L_9 = Quaternion_op_Multiply_m3771288979(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t1885181538 * L_10 = Selectable_FindSelectable_m1109039701(__this, L_9, /*hidden argument*/NULL); return L_10; } IL_004b: { return (Selectable_t1885181538 *)NULL; } } // UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() extern "C" Selectable_t1885181538 * Selectable_FindSelectableOnDown_m2882437061 (Selectable_t1885181538 * __this, const MethodInfo* method) { { Navigation_t1108456480 * L_0 = __this->get_address_of_m_Navigation_3(); int32_t L_1 = Navigation_get_mode_m721480509(L_0, /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)4)))) { goto IL_001d; } } { Navigation_t1108456480 * L_2 = __this->get_address_of_m_Navigation_3(); Selectable_t1885181538 * L_3 = Navigation_get_selectOnDown_m929912185(L_2, /*hidden argument*/NULL); return L_3; } IL_001d: { Navigation_t1108456480 * L_4 = __this->get_address_of_m_Navigation_3(); int32_t L_5 = Navigation_get_mode_m721480509(L_4, /*hidden argument*/NULL); if (!((int32_t)((int32_t)L_5&(int32_t)2))) { goto IL_004b; } } { Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); NullCheck(L_6); Quaternion_t1553702882 L_7 = Transform_get_rotation_m11483428(L_6, /*hidden argument*/NULL); Vector3_t4282066566 L_8 = Vector3_get_down_m1397301612(NULL /*static, unused*/, /*hidden argument*/NULL); Vector3_t4282066566 L_9 = Quaternion_op_Multiply_m3771288979(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL); Selectable_t1885181538 * L_10 = Selectable_FindSelectable_m1109039701(__this, L_9, /*hidden argument*/NULL); return L_10; } IL_004b: { return (Selectable_t1885181538 *)NULL; } } // System.Void UnityEngine.UI.Selectable::OnMove(UnityEngine.EventSystems.AxisEventData) extern "C" void Selectable_OnMove_m2478875177 (Selectable_t1885181538 * __this, AxisEventData_t3355659985 * ___eventData0, const MethodInfo* method) { int32_t V_0 = 0; { AxisEventData_t3355659985 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = AxisEventData_get_moveDir_m2739466109(L_0, /*hidden argument*/NULL); V_0 = L_1; int32_t L_2 = V_0; if (L_2 == 0) { goto IL_0046; } if (L_2 == 1) { goto IL_0034; } if (L_2 == 2) { goto IL_0022; } if (L_2 == 3) { goto IL_0058; } } { goto IL_006a; } IL_0022: { AxisEventData_t3355659985 * L_3 = ___eventData0; Selectable_t1885181538 * L_4 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(27 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnRight() */, __this); Selectable_Navigate_m2039225725(__this, L_3, L_4, /*hidden argument*/NULL); goto IL_006a; } IL_0034: { AxisEventData_t3355659985 * L_5 = ___eventData0; Selectable_t1885181538 * L_6 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(28 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnUp() */, __this); Selectable_Navigate_m2039225725(__this, L_5, L_6, /*hidden argument*/NULL); goto IL_006a; } IL_0046: { AxisEventData_t3355659985 * L_7 = ___eventData0; Selectable_t1885181538 * L_8 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(26 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnLeft() */, __this); Selectable_Navigate_m2039225725(__this, L_7, L_8, /*hidden argument*/NULL); goto IL_006a; } IL_0058: { AxisEventData_t3355659985 * L_9 = ___eventData0; Selectable_t1885181538 * L_10 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(29 /* UnityEngine.UI.Selectable UnityEngine.UI.Selectable::FindSelectableOnDown() */, __this); Selectable_Navigate_m2039225725(__this, L_9, L_10, /*hidden argument*/NULL); goto IL_006a; } IL_006a: { return; } } // System.Void UnityEngine.UI.Selectable::StartColorTween(UnityEngine.Color,System.Boolean) extern "C" void Selectable_StartColorTween_m2559093428 (Selectable_t1885181538 * __this, Color_t4194546905 ___targetColor0, bool ___instant1, const MethodInfo* method) { Color_t4194546905 G_B4_0; memset(&G_B4_0, 0, sizeof(G_B4_0)); Graphic_t836799438 * G_B4_1 = NULL; Color_t4194546905 G_B3_0; memset(&G_B3_0, 0, sizeof(G_B3_0)); Graphic_t836799438 * G_B3_1 = NULL; float G_B5_0 = 0.0f; Color_t4194546905 G_B5_1; memset(&G_B5_1, 0, sizeof(G_B5_1)); Graphic_t836799438 * G_B5_2 = NULL; { Graphic_t836799438 * L_0 = __this->get_m_TargetGraphic_9(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { return; } IL_0012: { Graphic_t836799438 * L_2 = __this->get_m_TargetGraphic_9(); Color_t4194546905 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_0029; } } { G_B5_0 = (0.0f); G_B5_1 = G_B3_0; G_B5_2 = G_B3_1; goto IL_0034; } IL_0029: { ColorBlock_t508458230 * L_5 = __this->get_address_of_m_Colors_5(); float L_6 = ColorBlock_get_fadeDuration_m2386809488(L_5, /*hidden argument*/NULL); G_B5_0 = L_6; G_B5_1 = G_B4_0; G_B5_2 = G_B4_1; } IL_0034: { NullCheck(G_B5_2); Graphic_CrossFadeColor_m3194947827(G_B5_2, G_B5_1, G_B5_0, (bool)1, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::DoSpriteSwap(UnityEngine.Sprite) extern "C" void Selectable_DoSpriteSwap_m1929545238 (Selectable_t1885181538 * __this, Sprite_t3199167241 * ___newSprite0, const MethodInfo* method) { { Image_t538875265 * L_0 = Selectable_get_image_m978701700(__this, /*hidden argument*/NULL); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { return; } IL_0012: { Image_t538875265 * L_2 = Selectable_get_image_m978701700(__this, /*hidden argument*/NULL); Sprite_t3199167241 * L_3 = ___newSprite0; NullCheck(L_2); Image_set_overrideSprite_m129622486(L_2, L_3, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::TriggerAnimation(System.String) extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern const uint32_t Selectable_TriggerAnimation_m2433448647_MetadataUsageId; extern "C" void Selectable_TriggerAnimation_m2433448647 (Selectable_t1885181538 * __this, String_t* ___triggername0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_TriggerAnimation_m2433448647_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Animator_t2776330603 * L_0 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_1) { goto IL_0042; } } { Animator_t2776330603 * L_2 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); NullCheck(L_2); bool L_3 = Behaviour_get_isActiveAndEnabled_m210167461(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0042; } } { Animator_t2776330603 * L_4 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); NullCheck(L_4); RuntimeAnimatorController_t274649809 * L_5 = Animator_get_runtimeAnimatorController_m1822082727(L_4, /*hidden argument*/NULL); bool L_6 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_6) { goto IL_0042; } } { String_t* L_7 = ___triggername0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_8 = String_IsNullOrEmpty_m1256468773(NULL /*static, unused*/, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_0043; } } IL_0042: { return; } IL_0043: { Animator_t2776330603 * L_9 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); AnimationTriggers_t115197445 * L_10 = __this->get_m_AnimationTriggers_7(); NullCheck(L_10); String_t* L_11 = AnimationTriggers_get_normalTrigger_m326085791(L_10, /*hidden argument*/NULL); NullCheck(L_9); Animator_ResetTrigger_m4152421915(L_9, L_11, /*hidden argument*/NULL); Animator_t2776330603 * L_12 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); AnimationTriggers_t115197445 * L_13 = __this->get_m_AnimationTriggers_7(); NullCheck(L_13); String_t* L_14 = AnimationTriggers_get_pressedTrigger_m3081240394(L_13, /*hidden argument*/NULL); NullCheck(L_12); Animator_ResetTrigger_m4152421915(L_12, L_14, /*hidden argument*/NULL); Animator_t2776330603 * L_15 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); AnimationTriggers_t115197445 * L_16 = __this->get_m_AnimationTriggers_7(); NullCheck(L_16); String_t* L_17 = AnimationTriggers_get_highlightedTrigger_m1862702265(L_16, /*hidden argument*/NULL); NullCheck(L_15); Animator_ResetTrigger_m4152421915(L_15, L_17, /*hidden argument*/NULL); Animator_t2776330603 * L_18 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); AnimationTriggers_t115197445 * L_19 = __this->get_m_AnimationTriggers_7(); NullCheck(L_19); String_t* L_20 = AnimationTriggers_get_disabledTrigger_m2031458154(L_19, /*hidden argument*/NULL); NullCheck(L_18); Animator_ResetTrigger_m4152421915(L_18, L_20, /*hidden argument*/NULL); Animator_t2776330603 * L_21 = Selectable_get_animator_m1533578598(__this, /*hidden argument*/NULL); String_t* L_22 = ___triggername0; NullCheck(L_21); Animator_SetTrigger_m514363822(L_21, L_22, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.Selectable::IsHighlighted(UnityEngine.EventSystems.BaseEventData) extern Il2CppClass* PointerEventData_t1848751023_il2cpp_TypeInfo_var; extern const uint32_t Selectable_IsHighlighted_m4047826052_MetadataUsageId; extern "C" bool Selectable_IsHighlighted_m4047826052 (Selectable_t1885181538 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_IsHighlighted_m4047826052_MetadataUsageId); s_Il2CppMethodIntialized = true; } bool V_0 = false; PointerEventData_t1848751023 * V_1 = 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_000d; } } { return (bool)0; } IL_000d: { bool L_1 = Selectable_IsPressed_m2192098489(__this, /*hidden argument*/NULL); if (!L_1) { goto IL_001a; } } { return (bool)0; } IL_001a: { bool L_2 = Selectable_get_hasSelection_m771189340(__this, /*hidden argument*/NULL); V_0 = L_2; BaseEventData_t2054899105 * L_3 = ___eventData0; if (!((PointerEventData_t1848751023 *)IsInstClass(L_3, PointerEventData_t1848751023_il2cpp_TypeInfo_var))) { goto IL_00bb; } } { BaseEventData_t2054899105 * L_4 = ___eventData0; V_1 = ((PointerEventData_t1848751023 *)IsInstClass(L_4, PointerEventData_t1848751023_il2cpp_TypeInfo_var)); bool L_5 = V_0; bool L_6 = Selectable_get_isPointerDown_m451775501(__this, /*hidden argument*/NULL); G_B6_0 = L_5; if (!L_6) { G_B8_0 = L_5; goto IL_0060; } } { bool L_7 = Selectable_get_isPointerInside_m3778852455(__this, /*hidden argument*/NULL); G_B7_0 = G_B6_0; if (L_7) { G_B8_0 = G_B6_0; goto IL_0060; } } { PointerEventData_t1848751023 * L_8 = V_1; NullCheck(L_8); GameObject_t3674682005 * L_9 = PointerEventData_get_pointerPress_m3028028234(L_8, /*hidden argument*/NULL); GameObject_t3674682005 * L_10 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); bool L_11 = Object_op_Equality_m3964590952(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_00b3; } } IL_0060: { bool L_12 = Selectable_get_isPointerDown_m451775501(__this, /*hidden argument*/NULL); G_B9_0 = G_B8_0; if (L_12) { G_B11_0 = G_B8_0; goto IL_008c; } } { bool L_13 = Selectable_get_isPointerInside_m3778852455(__this, /*hidden argument*/NULL); G_B10_0 = G_B9_0; if (!L_13) { G_B11_0 = G_B9_0; goto IL_008c; } } { PointerEventData_t1848751023 * L_14 = V_1; NullCheck(L_14); GameObject_t3674682005 * L_15 = PointerEventData_get_pointerPress_m3028028234(L_14, /*hidden argument*/NULL); GameObject_t3674682005 * L_16 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); bool L_17 = Object_op_Equality_m3964590952(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_00b3; } } IL_008c: { bool L_18 = Selectable_get_isPointerDown_m451775501(__this, /*hidden argument*/NULL); G_B12_0 = G_B11_0; if (L_18) { G_B14_0 = G_B11_0; goto IL_00b0; } } { bool L_19 = Selectable_get_isPointerInside_m3778852455(__this, /*hidden argument*/NULL); G_B13_0 = G_B12_0; if (!L_19) { G_B14_0 = G_B12_0; goto IL_00b0; } } { PointerEventData_t1848751023 * L_20 = V_1; NullCheck(L_20); GameObject_t3674682005 * L_21 = PointerEventData_get_pointerPress_m3028028234(L_20, /*hidden argument*/NULL); bool L_22 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_21, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); G_B15_0 = ((int32_t)(L_22)); G_B15_1 = G_B13_0; goto IL_00b1; } IL_00b0: { G_B15_0 = 0; G_B15_1 = G_B14_0; } IL_00b1: { G_B17_0 = G_B15_0; G_B17_1 = G_B15_1; goto IL_00b4; } IL_00b3: { G_B17_0 = 1; G_B17_1 = G_B16_0; } IL_00b4: { V_0 = (bool)((int32_t)((int32_t)G_B17_1|(int32_t)G_B17_0)); goto IL_00c4; } IL_00bb: { bool L_23 = V_0; bool L_24 = Selectable_get_isPointerInside_m3778852455(__this, /*hidden argument*/NULL); V_0 = (bool)((int32_t)((int32_t)L_23|(int32_t)L_24)); } IL_00c4: { bool L_25 = V_0; return L_25; } } // System.Boolean UnityEngine.UI.Selectable::IsPressed(UnityEngine.EventSystems.BaseEventData) extern "C" bool Selectable_IsPressed_m3407797331 (Selectable_t1885181538 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { { bool L_0 = Selectable_IsPressed_m2192098489(__this, /*hidden argument*/NULL); return L_0; } } // System.Boolean UnityEngine.UI.Selectable::IsPressed() extern "C" bool Selectable_IsPressed_m2192098489 (Selectable_t1885181538 * __this, const MethodInfo* method) { 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_000d; } } { return (bool)0; } IL_000d: { bool L_1 = Selectable_get_isPointerInside_m3778852455(__this, /*hidden argument*/NULL); if (!L_1) { goto IL_0020; } } { bool L_2 = Selectable_get_isPointerDown_m451775501(__this, /*hidden argument*/NULL); G_B5_0 = ((int32_t)(L_2)); goto IL_0021; } IL_0020: { G_B5_0 = 0; } IL_0021: { return (bool)G_B5_0; } } // System.Void UnityEngine.UI.Selectable::UpdateSelectionState(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_UpdateSelectionState_m2602683415 (Selectable_t1885181538 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { { bool L_0 = Selectable_IsPressed_m2192098489(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0013; } } { __this->set_m_CurrentSelectionState_11(2); return; } IL_0013: { BaseEventData_t2054899105 * L_1 = ___eventData0; bool L_2 = Selectable_IsHighlighted_m4047826052(__this, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0027; } } { __this->set_m_CurrentSelectionState_11(1); return; } IL_0027: { __this->set_m_CurrentSelectionState_11(0); return; } } // System.Void UnityEngine.UI.Selectable::EvaluateAndTransitionToSelectionState(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_EvaluateAndTransitionToSelectionState_m2419808192 (Selectable_t1885181538 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_000c; } } { return; } IL_000c: { BaseEventData_t2054899105 * L_1 = ___eventData0; Selectable_UpdateSelectionState_m2602683415(__this, L_1, /*hidden argument*/NULL); Selectable_InternalEvaluateAndTransitionToSelectionState_m543442976(__this, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::InternalEvaluateAndTransitionToSelectionState(System.Boolean) extern "C" void Selectable_InternalEvaluateAndTransitionToSelectionState_m543442976 (Selectable_t1885181538 * __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_001f; } } { bool L_2 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_2) { goto IL_001f; } } { V_0 = 3; } IL_001f: { int32_t L_3 = V_0; bool L_4 = ___instant0; VirtActionInvoker2< int32_t, bool >::Invoke(25 /* 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 Il2CppClass* EventSystem_t2276120119_il2cpp_TypeInfo_var; extern const uint32_t Selectable_OnPointerDown_m706592619_MetadataUsageId; extern "C" void Selectable_OnPointerDown_m706592619 (Selectable_t1885181538 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_OnPointerDown_m706592619_MetadataUsageId); s_Il2CppMethodIntialized = true; } Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { bool L_2 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (!L_2) { goto IL_004b; } } { Navigation_t1108456480 L_3 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_3; int32_t L_4 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if (!L_4) { goto IL_004b; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_5 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_6 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_004b; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_7 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); GameObject_t3674682005 * L_8 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_9 = ___eventData0; NullCheck(L_7); EventSystem_SetSelectedGameObject_m2116591616(L_7, L_8, L_9, /*hidden argument*/NULL); } IL_004b: { Selectable_set_isPointerDown_m2193598850(__this, (bool)1, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_10 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m2419808192(__this, L_10, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnPointerUp(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerUp_m533192658 (Selectable_t1885181538 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { Selectable_set_isPointerDown_m2193598850(__this, (bool)0, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_2 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m2419808192(__this, L_2, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnPointerEnter(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerEnter_m1831644693 (Selectable_t1885181538 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { Selectable_set_isPointerInside_m1584068316(__this, (bool)1, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m2419808192(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnPointerExit(UnityEngine.EventSystems.PointerEventData) extern "C" void Selectable_OnPointerExit_m1099674991 (Selectable_t1885181538 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { Selectable_set_isPointerInside_m1584068316(__this, (bool)0, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m2419808192(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnSelect(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_OnSelect_m2798350404 (Selectable_t1885181538 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { { Selectable_set_hasSelection_m138443861(__this, (bool)1, /*hidden argument*/NULL); BaseEventData_t2054899105 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m2419808192(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::OnDeselect(UnityEngine.EventSystems.BaseEventData) extern "C" void Selectable_OnDeselect_m4120267717 (Selectable_t1885181538 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { { Selectable_set_hasSelection_m138443861(__this, (bool)0, /*hidden argument*/NULL); BaseEventData_t2054899105 * L_0 = ___eventData0; Selectable_EvaluateAndTransitionToSelectionState_m2419808192(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Selectable::Select() extern Il2CppClass* EventSystem_t2276120119_il2cpp_TypeInfo_var; extern const uint32_t Selectable_Select_m2377336299_MetadataUsageId; extern "C" void Selectable_Select_m2377336299 (Selectable_t1885181538 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Selectable_Select_m2377336299_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_0 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_1) { goto IL_001f; } } { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_2 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); NullCheck(L_2); bool L_3 = EventSystem_get_alreadySelecting_m3074958957(L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0020; } } IL_001f: { return; } IL_0020: { IL2CPP_RUNTIME_CLASS_INIT(EventSystem_t2276120119_il2cpp_TypeInfo_var); EventSystem_t2276120119 * L_4 = EventSystem_get_current_m3483537871(NULL /*static, unused*/, /*hidden argument*/NULL); GameObject_t3674682005 * L_5 = Component_get_gameObject_m1170635899(__this, /*hidden argument*/NULL); NullCheck(L_4); EventSystem_SetSelectedGameObject_m1869236832(L_4, L_5, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.SetPropertyUtility::SetColor(UnityEngine.Color&,UnityEngine.Color) extern "C" bool SetPropertyUtility_SetColor_m4210708935 (Il2CppObject * __this /* static, unused */, Color_t4194546905 * ___currentValue0, Color_t4194546905 ___newValue1, const MethodInfo* method) { { Color_t4194546905 * 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_004a; } } { Color_t4194546905 * 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_004a; } } { Color_t4194546905 * 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_004a; } } { Color_t4194546905 * 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_004a; } } { return (bool)0; } IL_004a: { Color_t4194546905 * L_12 = ___currentValue0; Color_t4194546905 L_13 = ___newValue1; (*(Color_t4194546905 *)L_12) = L_13; return (bool)1; } } // System.Void UnityEngine.UI.Shadow::.ctor() extern "C" void Shadow__ctor_m2944649643 (Shadow_t75537580 * __this, const MethodInfo* method) { { Color_t4194546905 L_0; memset(&L_0, 0, sizeof(L_0)); Color__ctor_m2252924356(&L_0, (0.0f), (0.0f), (0.0f), (0.5f), /*hidden argument*/NULL); __this->set_m_EffectColor_4(L_0); Vector2_t4282066565 L_1; memset(&L_1, 0, sizeof(L_1)); Vector2__ctor_m1517109030(&L_1, (1.0f), (-1.0f), /*hidden argument*/NULL); __this->set_m_EffectDistance_5(L_1); __this->set_m_UseGraphicAlpha_6((bool)1); BaseMeshEffect__ctor_m2332499996(__this, /*hidden argument*/NULL); return; } } // UnityEngine.Color UnityEngine.UI.Shadow::get_effectColor() extern "C" Color_t4194546905 Shadow_get_effectColor_m2953989785 (Shadow_t75537580 * __this, const MethodInfo* method) { { Color_t4194546905 L_0 = __this->get_m_EffectColor_4(); return L_0; } } // System.Void UnityEngine.UI.Shadow::set_effectColor(UnityEngine.Color) extern "C" void Shadow_set_effectColor_m1407835720 (Shadow_t75537580 * __this, Color_t4194546905 ___value0, const MethodInfo* method) { { Color_t4194546905 L_0 = ___value0; __this->set_m_EffectColor_4(L_0); Graphic_t836799438 * L_1 = BaseMeshEffect_get_graphic_m2567098443(__this, /*hidden argument*/NULL); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0023; } } { Graphic_t836799438 * L_3 = BaseMeshEffect_get_graphic_m2567098443(__this, /*hidden argument*/NULL); NullCheck(L_3); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, L_3); } IL_0023: { return; } } // UnityEngine.Vector2 UnityEngine.UI.Shadow::get_effectDistance() extern "C" Vector2_t4282066565 Shadow_get_effectDistance_m1102454733 (Shadow_t75537580 * __this, const MethodInfo* method) { { Vector2_t4282066565 L_0 = __this->get_m_EffectDistance_5(); return L_0; } } // System.Void UnityEngine.UI.Shadow::set_effectDistance(UnityEngine.Vector2) extern "C" void Shadow_set_effectDistance_m192801982 (Shadow_t75537580 * __this, Vector2_t4282066565 ___value0, const MethodInfo* method) { { float L_0 = (&___value0)->get_x_1(); if ((!(((float)L_0) > ((float)(600.0f))))) { goto IL_001d; } } { (&___value0)->set_x_1((600.0f)); } IL_001d: { float L_1 = (&___value0)->get_x_1(); if ((!(((float)L_1) < ((float)(-600.0f))))) { goto IL_003a; } } { (&___value0)->set_x_1((-600.0f)); } IL_003a: { float L_2 = (&___value0)->get_y_2(); if ((!(((float)L_2) > ((float)(600.0f))))) { goto IL_0057; } } { (&___value0)->set_y_2((600.0f)); } IL_0057: { float L_3 = (&___value0)->get_y_2(); if ((!(((float)L_3) < ((float)(-600.0f))))) { goto IL_0074; } } { (&___value0)->set_y_2((-600.0f)); } IL_0074: { Vector2_t4282066565 L_4 = __this->get_m_EffectDistance_5(); Vector2_t4282066565 L_5 = ___value0; bool L_6 = Vector2_op_Equality_m1927481448(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_0086; } } { return; } IL_0086: { Vector2_t4282066565 L_7 = ___value0; __this->set_m_EffectDistance_5(L_7); Graphic_t836799438 * L_8 = BaseMeshEffect_get_graphic_m2567098443(__this, /*hidden argument*/NULL); bool L_9 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_8, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_9) { goto IL_00a9; } } { Graphic_t836799438 * L_10 = BaseMeshEffect_get_graphic_m2567098443(__this, /*hidden argument*/NULL); NullCheck(L_10); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, L_10); } IL_00a9: { return; } } // System.Boolean UnityEngine.UI.Shadow::get_useGraphicAlpha() extern "C" bool Shadow_get_useGraphicAlpha_m3687634123 (Shadow_t75537580 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_UseGraphicAlpha_6(); return L_0; } } // System.Void UnityEngine.UI.Shadow::set_useGraphicAlpha(System.Boolean) extern "C" void Shadow_set_useGraphicAlpha_m3814129472 (Shadow_t75537580 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; __this->set_m_UseGraphicAlpha_6(L_0); Graphic_t836799438 * L_1 = BaseMeshEffect_get_graphic_m2567098443(__this, /*hidden argument*/NULL); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0023; } } { Graphic_t836799438 * L_3 = BaseMeshEffect_get_graphic_m2567098443(__this, /*hidden argument*/NULL); NullCheck(L_3); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, L_3); } IL_0023: { 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 const MethodInfo* List_1_get_Count_m4277682313_MethodInfo_var; extern const MethodInfo* List_1_get_Capacity_m792627810_MethodInfo_var; extern const MethodInfo* List_1_set_Capacity_m3820333071_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m3329257068_MethodInfo_var; extern const MethodInfo* List_1_Add_m3128100621_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m1239619023_MethodInfo_var; extern const uint32_t Shadow_ApplyShadowZeroAlloc_m338158484_MetadataUsageId; extern "C" void Shadow_ApplyShadowZeroAlloc_m338158484 (Shadow_t75537580 * __this, List_1_t1317283468 * ___verts0, Color32_t598853688 ___color1, int32_t ___start2, int32_t ___end3, float ___x4, float ___y5, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Shadow_ApplyShadowZeroAlloc_m338158484_MetadataUsageId); s_Il2CppMethodIntialized = true; } UIVertex_t4244065212 V_0; memset(&V_0, 0, sizeof(V_0)); int32_t V_1 = 0; int32_t V_2 = 0; Vector3_t4282066566 V_3; memset(&V_3, 0, sizeof(V_3)); Color32_t598853688 V_4; memset(&V_4, 0, sizeof(V_4)); UIVertex_t4244065212 V_5; memset(&V_5, 0, sizeof(V_5)); { List_1_t1317283468 * L_0 = ___verts0; NullCheck(L_0); int32_t L_1 = List_1_get_Count_m4277682313(L_0, /*hidden argument*/List_1_get_Count_m4277682313_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_t1317283468 * L_4 = ___verts0; NullCheck(L_4); int32_t L_5 = List_1_get_Capacity_m792627810(L_4, /*hidden argument*/List_1_get_Capacity_m792627810_MethodInfo_var); int32_t L_6 = V_1; if ((((int32_t)L_5) >= ((int32_t)L_6))) { goto IL_001f; } } { List_1_t1317283468 * L_7 = ___verts0; int32_t L_8 = V_1; NullCheck(L_7); List_1_set_Capacity_m3820333071(L_7, L_8, /*hidden argument*/List_1_set_Capacity_m3820333071_MethodInfo_var); } IL_001f: { int32_t L_9 = ___start2; V_2 = L_9; goto IL_00b3; } IL_0026: { List_1_t1317283468 * L_10 = ___verts0; int32_t L_11 = V_2; NullCheck(L_10); UIVertex_t4244065212 L_12 = List_1_get_Item_m3329257068(L_10, L_11, /*hidden argument*/List_1_get_Item_m3329257068_MethodInfo_var); V_0 = L_12; List_1_t1317283468 * L_13 = ___verts0; UIVertex_t4244065212 L_14 = V_0; NullCheck(L_13); List_1_Add_m3128100621(L_13, L_14, /*hidden argument*/List_1_Add_m3128100621_MethodInfo_var); Vector3_t4282066566 L_15 = (&V_0)->get_position_0(); V_3 = L_15; Vector3_t4282066566 * 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_t4282066566 * 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_t4282066566 L_22 = V_3; (&V_0)->set_position_0(L_22); Color32_t598853688 L_23 = ___color1; V_4 = L_23; bool L_24 = __this->get_m_UseGraphicAlpha_6(); if (!L_24) { goto IL_009e; } } { uint8_t L_25 = (&V_4)->get_a_3(); List_1_t1317283468 * L_26 = ___verts0; int32_t L_27 = V_2; NullCheck(L_26); UIVertex_t4244065212 L_28 = List_1_get_Item_m3329257068(L_26, L_27, /*hidden argument*/List_1_get_Item_m3329257068_MethodInfo_var); V_5 = L_28; Color32_t598853688 * L_29 = (&V_5)->get_address_of_color_2(); uint8_t L_30 = L_29->get_a_3(); (&V_4)->set_a_3((((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_25*(int32_t)L_30))/(int32_t)((int32_t)255))))))); } IL_009e: { Color32_t598853688 L_31 = V_4; (&V_0)->set_color_2(L_31); List_1_t1317283468 * L_32 = ___verts0; int32_t L_33 = V_2; UIVertex_t4244065212 L_34 = V_0; NullCheck(L_32); List_1_set_Item_m1239619023(L_32, L_33, L_34, /*hidden argument*/List_1_set_Item_m1239619023_MethodInfo_var); int32_t L_35 = V_2; V_2 = ((int32_t)((int32_t)L_35+(int32_t)1)); } IL_00b3: { int32_t L_36 = V_2; int32_t L_37 = ___end3; if ((((int32_t)L_36) < ((int32_t)L_37))) { goto IL_0026; } } { 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_m3534003541 (Shadow_t75537580 * __this, List_1_t1317283468 * ___verts0, Color32_t598853688 ___color1, int32_t ___start2, int32_t ___end3, float ___x4, float ___y5, const MethodInfo* method) { { List_1_t1317283468 * L_0 = ___verts0; Color32_t598853688 L_1 = ___color1; int32_t L_2 = ___start2; int32_t L_3 = ___end3; float L_4 = ___x4; float L_5 = ___y5; Shadow_ApplyShadowZeroAlloc_m338158484(__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 Il2CppClass* ListPool_1_t3341702496_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m3130095824_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m4277682313_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m2709067242_MethodInfo_var; extern const uint32_t Shadow_ModifyMesh_m111179421_MetadataUsageId; extern "C" void Shadow_ModifyMesh_m111179421 (Shadow_t75537580 * __this, VertexHelper_t3377436606 * ___vh0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Shadow_ModifyMesh_m111179421_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t1317283468 * V_0 = NULL; Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 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_000c; } } { return; } IL_000c: { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3341702496_il2cpp_TypeInfo_var); List_1_t1317283468 * L_1 = ListPool_1_Get_m3130095824(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m3130095824_MethodInfo_var); V_0 = L_1; VertexHelper_t3377436606 * L_2 = ___vh0; List_1_t1317283468 * L_3 = V_0; NullCheck(L_2); VertexHelper_GetUIVertexStream_m1078623420(L_2, L_3, /*hidden argument*/NULL); List_1_t1317283468 * L_4 = V_0; Color_t4194546905 L_5 = Shadow_get_effectColor_m2953989785(__this, /*hidden argument*/NULL); Color32_t598853688 L_6 = Color32_op_Implicit_m3684884838(NULL /*static, unused*/, L_5, /*hidden argument*/NULL); List_1_t1317283468 * L_7 = V_0; NullCheck(L_7); int32_t L_8 = List_1_get_Count_m4277682313(L_7, /*hidden argument*/List_1_get_Count_m4277682313_MethodInfo_var); Vector2_t4282066565 L_9 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_1 = L_9; float L_10 = (&V_1)->get_x_1(); Vector2_t4282066565 L_11 = Shadow_get_effectDistance_m1102454733(__this, /*hidden argument*/NULL); V_2 = L_11; float L_12 = (&V_2)->get_y_2(); Shadow_ApplyShadow_m3534003541(__this, L_4, L_6, 0, L_8, L_10, L_12, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_13 = ___vh0; NullCheck(L_13); VertexHelper_Clear_m412394180(L_13, /*hidden argument*/NULL); VertexHelper_t3377436606 * L_14 = ___vh0; List_1_t1317283468 * L_15 = V_0; NullCheck(L_14); VertexHelper_AddUIVertexTriangleStream_m1263262953(L_14, L_15, /*hidden argument*/NULL); List_1_t1317283468 * L_16 = V_0; ListPool_1_Release_m2709067242(NULL /*static, unused*/, L_16, /*hidden argument*/ListPool_1_Release_m2709067242_MethodInfo_var); return; } } // System.Void UnityEngine.UI.Slider::.ctor() extern Il2CppClass* SliderEvent_t2627072750_il2cpp_TypeInfo_var; extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const uint32_t Slider__ctor_m347403018_MetadataUsageId; extern "C" void Slider__ctor_m347403018 (Slider_t79469677 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider__ctor_m347403018_MetadataUsageId); s_Il2CppMethodIntialized = true; } { __this->set_m_MaxValue_20((1.0f)); SliderEvent_t2627072750 * L_0 = (SliderEvent_t2627072750 *)il2cpp_codegen_object_new(SliderEvent_t2627072750_il2cpp_TypeInfo_var); SliderEvent__ctor_m1429088576(L_0, /*hidden argument*/NULL); __this->set_m_OnValueChanged_23(L_0); Vector2_t4282066565 L_1 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_29(L_1); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); Selectable__ctor_m1133588277(__this, /*hidden argument*/NULL); return; } } // UnityEngine.RectTransform UnityEngine.UI.Slider::get_fillRect() extern "C" RectTransform_t972643934 * Slider_get_fillRect_m2450877128 (Slider_t79469677 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = __this->get_m_FillRect_16(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_fillRect(UnityEngine.RectTransform) extern const MethodInfo* SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323_MethodInfo_var; extern const uint32_t Slider_set_fillRect_m3297119715_MetadataUsageId; extern "C" void Slider_set_fillRect_m3297119715 (Slider_t79469677 * __this, RectTransform_t972643934 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_fillRect_m3297119715_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 ** L_0 = __this->get_address_of_m_FillRect_16(); RectTransform_t972643934 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323_MethodInfo_var); if (!L_2) { goto IL_001d; } } { Slider_UpdateCachedReferences_m3913831469(__this, /*hidden argument*/NULL); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); } IL_001d: { return; } } // UnityEngine.RectTransform UnityEngine.UI.Slider::get_handleRect() extern "C" RectTransform_t972643934 * Slider_get_handleRect_m2151134125 (Slider_t79469677 * __this, const MethodInfo* method) { { RectTransform_t972643934 * L_0 = __this->get_m_HandleRect_17(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_handleRect(UnityEngine.RectTransform) extern const MethodInfo* SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323_MethodInfo_var; extern const uint32_t Slider_set_handleRect_m3189108254_MetadataUsageId; extern "C" void Slider_set_handleRect_m3189108254 (Slider_t79469677 * __this, RectTransform_t972643934 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_handleRect_m3189108254_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 ** L_0 = __this->get_address_of_m_HandleRect_17(); RectTransform_t972643934 * L_1 = ___value0; bool L_2 = SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetClass_TisRectTransform_t972643934_m3898551323_MethodInfo_var); if (!L_2) { goto IL_001d; } } { Slider_UpdateCachedReferences_m3913831469(__this, /*hidden argument*/NULL); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); } IL_001d: { return; } } // UnityEngine.UI.Slider/Direction UnityEngine.UI.Slider::get_direction() extern "C" int32_t Slider_get_direction_m2329138173 (Slider_t79469677 * __this, const MethodInfo* method) { { int32_t L_0 = __this->get_m_Direction_18(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_direction(UnityEngine.UI.Slider/Direction) extern const MethodInfo* SetPropertyUtility_SetStruct_TisDirection_t94975348_m2722180853_MethodInfo_var; extern const uint32_t Slider_set_direction_m1506600084_MetadataUsageId; extern "C" void Slider_set_direction_m1506600084 (Slider_t79469677 * __this, int32_t ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_direction_m1506600084_MetadataUsageId); s_Il2CppMethodIntialized = true; } { int32_t* L_0 = __this->get_address_of_m_Direction_18(); int32_t L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisDirection_t94975348_m2722180853(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisDirection_t94975348_m2722180853_MethodInfo_var); if (!L_2) { goto IL_0017; } } { Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // System.Single UnityEngine.UI.Slider::get_minValue() extern "C" float Slider_get_minValue_m84589142 (Slider_t79469677 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_MinValue_19(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_minValue(System.Single) extern const MethodInfo* SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_MethodInfo_var; extern const uint32_t Slider_set_minValue_m3023646485_MetadataUsageId; extern "C" void Slider_set_minValue_m3023646485 (Slider_t79469677 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_minValue_m3023646485_MetadataUsageId); s_Il2CppMethodIntialized = true; } { float* L_0 = __this->get_address_of_m_MinValue_19(); float L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_MethodInfo_var); if (!L_2) { goto IL_0023; } } { float L_3 = __this->get_m_Value_22(); Slider_Set_m2575079457(__this, L_3, /*hidden argument*/NULL); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); } IL_0023: { return; } } // System.Single UnityEngine.UI.Slider::get_maxValue() extern "C" float Slider_get_maxValue_m1907557124 (Slider_t79469677 * __this, const MethodInfo* method) { { float L_0 = __this->get_m_MaxValue_20(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_maxValue(System.Single) extern const MethodInfo* SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_MethodInfo_var; extern const uint32_t Slider_set_maxValue_m4261736743_MetadataUsageId; extern "C" void Slider_set_maxValue_m4261736743 (Slider_t79469677 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_maxValue_m4261736743_MetadataUsageId); s_Il2CppMethodIntialized = true; } { float* L_0 = __this->get_address_of_m_MaxValue_20(); float L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisSingle_t4291918972_m1643007650_MethodInfo_var); if (!L_2) { goto IL_0023; } } { float L_3 = __this->get_m_Value_22(); Slider_Set_m2575079457(__this, L_3, /*hidden argument*/NULL); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); } IL_0023: { return; } } // System.Boolean UnityEngine.UI.Slider::get_wholeNumbers() extern "C" bool Slider_get_wholeNumbers_m3990960296 (Slider_t79469677 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_WholeNumbers_21(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_wholeNumbers(System.Boolean) extern const MethodInfo* SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768_MethodInfo_var; extern const uint32_t Slider_set_wholeNumbers_m3974827169_MetadataUsageId; extern "C" void Slider_set_wholeNumbers_m3974827169 (Slider_t79469677 * __this, bool ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_wholeNumbers_m3974827169_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool* L_0 = __this->get_address_of_m_WholeNumbers_21(); bool L_1 = ___value0; bool L_2 = SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/SetPropertyUtility_SetStruct_TisBoolean_t476798718_m1242031768_MethodInfo_var); if (!L_2) { goto IL_0023; } } { float L_3 = __this->get_m_Value_22(); Slider_Set_m2575079457(__this, L_3, /*hidden argument*/NULL); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); } IL_0023: { return; } } // System.Single UnityEngine.UI.Slider::get_value() extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Slider_get_value_m2021634844_MetadataUsageId; extern "C" float Slider_get_value_m2021634844 (Slider_t79469677 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_get_value_m2021634844_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = Slider_get_wholeNumbers_m3990960296(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0017; } } { float L_1 = __this->get_m_Value_22(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_2 = bankers_roundf(L_1); return L_2; } IL_0017: { float L_3 = __this->get_m_Value_22(); return L_3; } } // System.Void UnityEngine.UI.Slider::set_value(System.Single) extern "C" void Slider_set_value_m4201041935 (Slider_t79469677 * __this, float ___value0, const MethodInfo* method) { { float L_0 = ___value0; Slider_Set_m2575079457(__this, L_0, /*hidden argument*/NULL); return; } } // System.Single UnityEngine.UI.Slider::get_normalizedValue() extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Slider_get_normalizedValue_m2918004645_MetadataUsageId; extern "C" float Slider_get_normalizedValue_m2918004645 (Slider_t79469677 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_get_normalizedValue_m2918004645_MetadataUsageId); s_Il2CppMethodIntialized = true; } { float L_0 = Slider_get_minValue_m84589142(__this, /*hidden argument*/NULL); float L_1 = Slider_get_maxValue_m1907557124(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); bool L_2 = Mathf_Approximately_m1395529776(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_001c; } } { return (0.0f); } IL_001c: { float L_3 = Slider_get_minValue_m84589142(__this, /*hidden argument*/NULL); float L_4 = Slider_get_maxValue_m1907557124(__this, /*hidden argument*/NULL); float L_5 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_6 = Mathf_InverseLerp_m152689993(NULL /*static, unused*/, L_3, L_4, L_5, /*hidden argument*/NULL); return L_6; } } // System.Void UnityEngine.UI.Slider::set_normalizedValue(System.Single) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Slider_set_normalizedValue_m3382161958_MetadataUsageId; extern "C" void Slider_set_normalizedValue_m3382161958 (Slider_t79469677 * __this, float ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_set_normalizedValue_m3382161958_MetadataUsageId); s_Il2CppMethodIntialized = true; } { float L_0 = Slider_get_minValue_m84589142(__this, /*hidden argument*/NULL); float L_1 = Slider_get_maxValue_m1907557124(__this, /*hidden argument*/NULL); float L_2 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_3 = Mathf_Lerp_m3257777633(NULL /*static, unused*/, L_0, L_1, L_2, /*hidden argument*/NULL); VirtActionInvoker1< float >::Invoke(46 /* 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_t2627072750 * Slider_get_onValueChanged_m3585429728 (Slider_t79469677 * __this, const MethodInfo* method) { { SliderEvent_t2627072750 * L_0 = __this->get_m_OnValueChanged_23(); return L_0; } } // System.Void UnityEngine.UI.Slider::set_onValueChanged(UnityEngine.UI.Slider/SliderEvent) extern "C" void Slider_set_onValueChanged_m544103115 (Slider_t79469677 * __this, SliderEvent_t2627072750 * ___value0, const MethodInfo* method) { { SliderEvent_t2627072750 * L_0 = ___value0; __this->set_m_OnValueChanged_23(L_0); return; } } // System.Single UnityEngine.UI.Slider::get_stepSize() extern "C" float Slider_get_stepSize_m3189751172 (Slider_t79469677 * __this, const MethodInfo* method) { float G_B3_0 = 0.0f; { bool L_0 = Slider_get_wholeNumbers_m3990960296(__this, /*hidden argument*/NULL); if (!L_0) { goto IL_0015; } } { G_B3_0 = (1.0f); goto IL_0028; } IL_0015: { float L_1 = Slider_get_maxValue_m1907557124(__this, /*hidden argument*/NULL); float L_2 = Slider_get_minValue_m84589142(__this, /*hidden argument*/NULL); G_B3_0 = ((float)((float)((float)((float)L_1-(float)L_2))*(float)(0.1f))); } IL_0028: { return G_B3_0; } } // System.Void UnityEngine.UI.Slider::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void Slider_Rebuild_m204900683 (Slider_t79469677 * __this, int32_t ___executing0, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Slider::LayoutComplete() extern "C" void Slider_LayoutComplete_m3716644733 (Slider_t79469677 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Slider::GraphicUpdateComplete() extern "C" void Slider_GraphicUpdateComplete_m837060050 (Slider_t79469677 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Slider::OnEnable() extern "C" void Slider_OnEnable_m683704380 (Slider_t79469677 * __this, const MethodInfo* method) { { Selectable_OnEnable_m1472090161(__this, /*hidden argument*/NULL); Slider_UpdateCachedReferences_m3913831469(__this, /*hidden argument*/NULL); float L_0 = __this->get_m_Value_22(); VirtActionInvoker2< float, bool >::Invoke(50 /* System.Void UnityEngine.UI.Slider::Set(System.Single,System.Boolean) */, __this, L_0, (bool)0); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::OnDisable() extern "C" void Slider_OnDisable_m160936561 (Slider_t79469677 * __this, const MethodInfo* method) { { DrivenRectTransformTracker_t4185719096 * L_0 = __this->get_address_of_m_Tracker_30(); DrivenRectTransformTracker_Clear_m309315364(L_0, /*hidden argument*/NULL); Selectable_OnDisable_m3126059292(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::OnDidApplyAnimationProperties() extern const MethodInfo* UnityEvent_1_Invoke_m3551800820_MethodInfo_var; extern const uint32_t Slider_OnDidApplyAnimationProperties_m317765809_MetadataUsageId; extern "C" void Slider_OnDidApplyAnimationProperties_m317765809 (Slider_t79469677 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_OnDidApplyAnimationProperties_m317765809_MetadataUsageId); s_Il2CppMethodIntialized = true; } float V_0 = 0.0f; Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t4282066565 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t4282066565 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_m4124802439(__this, L_0, /*hidden argument*/NULL); __this->set_m_Value_22(L_1); float L_2 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); V_0 = L_2; RectTransform_t972643934 * L_3 = __this->get_m_FillContainerRect_26(); bool L_4 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_3, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_00ab; } } { Image_t538875265 * L_5 = __this->get_m_FillImage_24(); bool L_6 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_6) { goto IL_005d; } } { Image_t538875265 * L_7 = __this->get_m_FillImage_24(); NullCheck(L_7); int32_t L_8 = Image_get_type_m1778977993(L_7, /*hidden argument*/NULL); if ((!(((uint32_t)L_8) == ((uint32_t)3)))) { goto IL_005d; } } { Image_t538875265 * L_9 = __this->get_m_FillImage_24(); NullCheck(L_9); float L_10 = Image_get_fillAmount_m3193252212(L_9, /*hidden argument*/NULL); V_0 = L_10; goto IL_00a6; } IL_005d: { bool L_11 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); if (!L_11) { goto IL_008c; } } { RectTransform_t972643934 * L_12 = __this->get_m_FillRect_16(); NullCheck(L_12); Vector2_t4282066565 L_13 = RectTransform_get_anchorMin_m688674174(L_12, /*hidden argument*/NULL); V_1 = L_13; int32_t L_14 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_15 = Vector2_get_Item_m2185542843((&V_1), L_14, /*hidden argument*/NULL); G_B7_0 = ((float)((float)(1.0f)-(float)L_15)); goto IL_00a5; } IL_008c: { RectTransform_t972643934 * L_16 = __this->get_m_FillRect_16(); NullCheck(L_16); Vector2_t4282066565 L_17 = RectTransform_get_anchorMax_m688445456(L_16, /*hidden argument*/NULL); V_2 = L_17; int32_t L_18 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_19 = Vector2_get_Item_m2185542843((&V_2), L_18, /*hidden argument*/NULL); G_B7_0 = L_19; } IL_00a5: { V_0 = G_B7_0; } IL_00a6: { goto IL_0106; } IL_00ab: { RectTransform_t972643934 * L_20 = __this->get_m_HandleContainerRect_28(); bool L_21 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_20, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_21) { goto IL_0106; } } { bool L_22 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); if (!L_22) { goto IL_00eb; } } { RectTransform_t972643934 * L_23 = __this->get_m_HandleRect_17(); NullCheck(L_23); Vector2_t4282066565 L_24 = RectTransform_get_anchorMin_m688674174(L_23, /*hidden argument*/NULL); V_3 = L_24; int32_t L_25 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_26 = Vector2_get_Item_m2185542843((&V_3), L_25, /*hidden argument*/NULL); G_B13_0 = ((float)((float)(1.0f)-(float)L_26)); goto IL_0105; } IL_00eb: { RectTransform_t972643934 * L_27 = __this->get_m_HandleRect_17(); NullCheck(L_27); Vector2_t4282066565 L_28 = RectTransform_get_anchorMin_m688674174(L_27, /*hidden argument*/NULL); V_4 = L_28; int32_t L_29 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_30 = Vector2_get_Item_m2185542843((&V_4), L_29, /*hidden argument*/NULL); G_B13_0 = L_30; } IL_0105: { V_0 = G_B13_0; } IL_0106: { Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); float L_31 = V_0; float L_32 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); if ((((float)L_31) == ((float)L_32))) { goto IL_0129; } } { SliderEvent_t2627072750 * L_33 = Slider_get_onValueChanged_m3585429728(__this, /*hidden argument*/NULL); float L_34 = __this->get_m_Value_22(); NullCheck(L_33); UnityEvent_1_Invoke_m3551800820(L_33, L_34, /*hidden argument*/UnityEvent_1_Invoke_m3551800820_MethodInfo_var); } IL_0129: { return; } } // System.Void UnityEngine.UI.Slider::UpdateCachedReferences() extern const MethodInfo* Component_GetComponent_TisImage_t538875265_m3706520426_MethodInfo_var; extern const MethodInfo* Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var; extern const uint32_t Slider_UpdateCachedReferences_m3913831469_MetadataUsageId; extern "C" void Slider_UpdateCachedReferences_m3913831469 (Slider_t79469677 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_UpdateCachedReferences_m3913831469_MetadataUsageId); s_Il2CppMethodIntialized = true; } { RectTransform_t972643934 * L_0 = __this->get_m_FillRect_16(); bool L_1 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0063; } } { RectTransform_t972643934 * L_2 = __this->get_m_FillRect_16(); NullCheck(L_2); Transform_t1659122786 * L_3 = Component_get_transform_m4257140443(L_2, /*hidden argument*/NULL); __this->set_m_FillTransform_25(L_3); RectTransform_t972643934 * L_4 = __this->get_m_FillRect_16(); NullCheck(L_4); Image_t538875265 * L_5 = Component_GetComponent_TisImage_t538875265_m3706520426(L_4, /*hidden argument*/Component_GetComponent_TisImage_t538875265_m3706520426_MethodInfo_var); __this->set_m_FillImage_24(L_5); Transform_t1659122786 * L_6 = __this->get_m_FillTransform_25(); NullCheck(L_6); Transform_t1659122786 * L_7 = Transform_get_parent_m2236876972(L_6, /*hidden argument*/NULL); bool L_8 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_7, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_005e; } } { Transform_t1659122786 * L_9 = __this->get_m_FillTransform_25(); NullCheck(L_9); Transform_t1659122786 * L_10 = Transform_get_parent_m2236876972(L_9, /*hidden argument*/NULL); NullCheck(L_10); RectTransform_t972643934 * L_11 = Component_GetComponent_TisRectTransform_t972643934_m1940403147(L_10, /*hidden argument*/Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var); __this->set_m_FillContainerRect_26(L_11); } IL_005e: { goto IL_0071; } IL_0063: { __this->set_m_FillContainerRect_26((RectTransform_t972643934 *)NULL); __this->set_m_FillImage_24((Image_t538875265 *)NULL); } IL_0071: { RectTransform_t972643934 * L_12 = __this->get_m_HandleRect_17(); bool L_13 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_12, /*hidden argument*/NULL); if (!L_13) { goto IL_00c3; } } { RectTransform_t972643934 * L_14 = __this->get_m_HandleRect_17(); NullCheck(L_14); Transform_t1659122786 * L_15 = Component_get_transform_m4257140443(L_14, /*hidden argument*/NULL); __this->set_m_HandleTransform_27(L_15); Transform_t1659122786 * L_16 = __this->get_m_HandleTransform_27(); NullCheck(L_16); Transform_t1659122786 * L_17 = Transform_get_parent_m2236876972(L_16, /*hidden argument*/NULL); bool L_18 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_17, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_18) { goto IL_00be; } } { Transform_t1659122786 * L_19 = __this->get_m_HandleTransform_27(); NullCheck(L_19); Transform_t1659122786 * L_20 = Transform_get_parent_m2236876972(L_19, /*hidden argument*/NULL); NullCheck(L_20); RectTransform_t972643934 * L_21 = Component_GetComponent_TisRectTransform_t972643934_m1940403147(L_20, /*hidden argument*/Component_GetComponent_TisRectTransform_t972643934_m1940403147_MethodInfo_var); __this->set_m_HandleContainerRect_28(L_21); } IL_00be: { goto IL_00ca; } IL_00c3: { __this->set_m_HandleContainerRect_28((RectTransform_t972643934 *)NULL); } IL_00ca: { return; } } // System.Single UnityEngine.UI.Slider::ClampValue(System.Single) extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Slider_ClampValue_m4124802439_MetadataUsageId; extern "C" float Slider_ClampValue_m4124802439 (Slider_t79469677 * __this, float ___input0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_ClampValue_m4124802439_MetadataUsageId); s_Il2CppMethodIntialized = true; } float V_0 = 0.0f; { float L_0 = ___input0; float L_1 = Slider_get_minValue_m84589142(__this, /*hidden argument*/NULL); float L_2 = Slider_get_maxValue_m1907557124(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_3 = Mathf_Clamp_m3872743893(NULL /*static, unused*/, L_0, L_1, L_2, /*hidden argument*/NULL); V_0 = L_3; bool L_4 = Slider_get_wholeNumbers_m3990960296(__this, /*hidden argument*/NULL); if (!L_4) { goto IL_0025; } } { float L_5 = V_0; IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_6 = bankers_roundf(L_5); V_0 = L_6; } IL_0025: { float L_7 = V_0; return L_7; } } // System.Void UnityEngine.UI.Slider::Set(System.Single) extern "C" void Slider_Set_m2575079457 (Slider_t79469677 * __this, float ___input0, const MethodInfo* method) { { float L_0 = ___input0; VirtActionInvoker2< float, bool >::Invoke(50 /* 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 const MethodInfo* UnityEvent_1_Invoke_m3551800820_MethodInfo_var; extern const uint32_t Slider_Set_m2043565372_MetadataUsageId; extern "C" void Slider_Set_m2043565372 (Slider_t79469677 * __this, float ___input0, bool ___sendCallback1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_Set_m2043565372_MetadataUsageId); s_Il2CppMethodIntialized = true; } float V_0 = 0.0f; { float L_0 = ___input0; float L_1 = Slider_ClampValue_m4124802439(__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_0015; } } { return; } IL_0015: { float L_4 = V_0; __this->set_m_Value_22(L_4); Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); bool L_5 = ___sendCallback1; if (!L_5) { goto IL_0034; } } { SliderEvent_t2627072750 * L_6 = __this->get_m_OnValueChanged_23(); float L_7 = V_0; NullCheck(L_6); UnityEvent_1_Invoke_m3551800820(L_6, L_7, /*hidden argument*/UnityEvent_1_Invoke_m3551800820_MethodInfo_var); } IL_0034: { return; } } // System.Void UnityEngine.UI.Slider::OnRectTransformDimensionsChange() extern "C" void Slider_OnRectTransformDimensionsChange_m4044006958 (Slider_t79469677 * __this, const MethodInfo* method) { { UIBehaviour_OnRectTransformDimensionsChange_m406568928(__this, /*hidden argument*/NULL); bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_0) { goto IL_0012; } } { return; } IL_0012: { Slider_UpdateVisuals_m1355864786(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.Slider/Axis UnityEngine.UI.Slider::get_axis() extern "C" int32_t Slider_get_axis_m591825817 (Slider_t79469677 * __this, const MethodInfo* method) { int32_t G_B4_0 = 0; { int32_t L_0 = __this->get_m_Direction_18(); if (!L_0) { goto IL_0017; } } { int32_t L_1 = __this->get_m_Direction_18(); if ((!(((uint32_t)L_1) == ((uint32_t)1)))) { goto IL_001d; } } IL_0017: { G_B4_0 = 0; goto IL_001e; } IL_001d: { G_B4_0 = 1; } IL_001e: { return (int32_t)(G_B4_0); } } // System.Boolean UnityEngine.UI.Slider::get_reverseValue() extern "C" bool Slider_get_reverseValue_m1915319492 (Slider_t79469677 * __this, const MethodInfo* method) { 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_0017; } } { int32_t L_1 = __this->get_m_Direction_18(); G_B3_0 = ((((int32_t)L_1) == ((int32_t)3))? 1 : 0); goto IL_0018; } IL_0017: { G_B3_0 = 1; } IL_0018: { return (bool)G_B3_0; } } // System.Void UnityEngine.UI.Slider::UpdateVisuals() extern "C" void Slider_UpdateVisuals_m1355864786 (Slider_t79469677 * __this, const MethodInfo* method) { Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t4282066565 V_3; memset(&V_3, 0, sizeof(V_3)); float V_4 = 0.0f; int32_t G_B11_0 = 0; Vector2_t4282066565 * G_B11_1 = NULL; int32_t G_B10_0 = 0; Vector2_t4282066565 * G_B10_1 = NULL; float G_B12_0 = 0.0f; int32_t G_B12_1 = 0; Vector2_t4282066565 * G_B12_2 = NULL; { DrivenRectTransformTracker_t4185719096 * L_0 = __this->get_address_of_m_Tracker_30(); DrivenRectTransformTracker_Clear_m309315364(L_0, /*hidden argument*/NULL); RectTransform_t972643934 * L_1 = __this->get_m_FillContainerRect_26(); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_00cb; } } { DrivenRectTransformTracker_t4185719096 * L_3 = __this->get_address_of_m_Tracker_30(); RectTransform_t972643934 * L_4 = __this->get_m_FillRect_16(); DrivenRectTransformTracker_Add_m3461523141(L_3, __this, L_4, ((int32_t)3840), /*hidden argument*/NULL); Vector2_t4282066565 L_5 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); V_0 = L_5; Vector2_t4282066565 L_6 = Vector2_get_one_m2767488832(NULL /*static, unused*/, /*hidden argument*/NULL); V_1 = L_6; Image_t538875265 * L_7 = __this->get_m_FillImage_24(); bool L_8 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_7, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0077; } } { Image_t538875265 * L_9 = __this->get_m_FillImage_24(); NullCheck(L_9); int32_t L_10 = Image_get_type_m1778977993(L_9, /*hidden argument*/NULL); if ((!(((uint32_t)L_10) == ((uint32_t)3)))) { goto IL_0077; } } { Image_t538875265 * L_11 = __this->get_m_FillImage_24(); float L_12 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); NullCheck(L_11); Image_set_fillAmount_m1583793743(L_11, L_12, /*hidden argument*/NULL); goto IL_00b3; } IL_0077: { bool L_13 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); if (!L_13) { goto IL_00a0; } } { int32_t L_14 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_15 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); Vector2_set_Item_m2767519328((&V_0), L_14, ((float)((float)(1.0f)-(float)L_15)), /*hidden argument*/NULL); goto IL_00b3; } IL_00a0: { int32_t L_16 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_17 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); Vector2_set_Item_m2767519328((&V_1), L_16, L_17, /*hidden argument*/NULL); } IL_00b3: { RectTransform_t972643934 * L_18 = __this->get_m_FillRect_16(); Vector2_t4282066565 L_19 = V_0; NullCheck(L_18); RectTransform_set_anchorMin_m989253483(L_18, L_19, /*hidden argument*/NULL); RectTransform_t972643934 * L_20 = __this->get_m_FillRect_16(); Vector2_t4282066565 L_21 = V_1; NullCheck(L_20); RectTransform_set_anchorMax_m715345817(L_20, L_21, /*hidden argument*/NULL); } IL_00cb: { RectTransform_t972643934 * L_22 = __this->get_m_HandleContainerRect_28(); bool L_23 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_22, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_23) { goto IL_0159; } } { DrivenRectTransformTracker_t4185719096 * L_24 = __this->get_address_of_m_Tracker_30(); RectTransform_t972643934 * L_25 = __this->get_m_HandleRect_17(); DrivenRectTransformTracker_Add_m3461523141(L_24, __this, L_25, ((int32_t)3840), /*hidden argument*/NULL); Vector2_t4282066565 L_26 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); V_2 = L_26; Vector2_t4282066565 L_27 = Vector2_get_one_m2767488832(NULL /*static, unused*/, /*hidden argument*/NULL); V_3 = L_27; int32_t L_28 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); bool L_29 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); G_B10_0 = L_28; G_B10_1 = (&V_2); if (!L_29) { G_B11_0 = L_28; G_B11_1 = (&V_2); goto IL_0123; } } { float L_30 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); G_B12_0 = ((float)((float)(1.0f)-(float)L_30)); G_B12_1 = G_B10_0; G_B12_2 = G_B10_1; goto IL_0129; } IL_0123: { float L_31 = Slider_get_normalizedValue_m2918004645(__this, /*hidden argument*/NULL); G_B12_0 = L_31; G_B12_1 = G_B11_0; G_B12_2 = G_B11_1; } IL_0129: { V_4 = G_B12_0; int32_t L_32 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_33 = V_4; Vector2_set_Item_m2767519328((&V_3), L_32, L_33, /*hidden argument*/NULL); float L_34 = V_4; Vector2_set_Item_m2767519328(G_B12_2, G_B12_1, L_34, /*hidden argument*/NULL); RectTransform_t972643934 * L_35 = __this->get_m_HandleRect_17(); Vector2_t4282066565 L_36 = V_2; NullCheck(L_35); RectTransform_set_anchorMin_m989253483(L_35, L_36, /*hidden argument*/NULL); RectTransform_t972643934 * L_37 = __this->get_m_HandleRect_17(); Vector2_t4282066565 L_38 = V_3; NullCheck(L_37); RectTransform_set_anchorMax_m715345817(L_37, L_38, /*hidden argument*/NULL); } IL_0159: { return; } } // System.Void UnityEngine.UI.Slider::UpdateDrag(UnityEngine.EventSystems.PointerEventData,UnityEngine.Camera) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Slider_UpdateDrag_m913163651_MetadataUsageId; extern "C" void Slider_UpdateDrag_m913163651 (Slider_t79469677 * __this, PointerEventData_t1848751023 * ___eventData0, Camera_t2727095145 * ___cam1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_UpdateDrag_m913163651_MetadataUsageId); s_Il2CppMethodIntialized = true; } RectTransform_t972643934 * V_0 = NULL; Vector2_t4282066565 V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; Rect_t4241904616 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t4282066565 V_4; memset(&V_4, 0, sizeof(V_4)); Rect_t4241904616 V_5; memset(&V_5, 0, sizeof(V_5)); Vector2_t4282066565 V_6; memset(&V_6, 0, sizeof(V_6)); Rect_t4241904616 V_7; memset(&V_7, 0, sizeof(V_7)); Vector2_t4282066565 V_8; memset(&V_8, 0, sizeof(V_8)); RectTransform_t972643934 * G_B2_0 = NULL; RectTransform_t972643934 * G_B1_0 = NULL; Slider_t79469677 * G_B8_0 = NULL; Slider_t79469677 * G_B7_0 = NULL; float G_B9_0 = 0.0f; Slider_t79469677 * G_B9_1 = NULL; { RectTransform_t972643934 * L_0 = __this->get_m_HandleContainerRect_28(); RectTransform_t972643934 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_0013; } } { RectTransform_t972643934 * L_2 = __this->get_m_FillContainerRect_26(); G_B2_0 = L_2; } IL_0013: { V_0 = G_B2_0; RectTransform_t972643934 * L_3 = V_0; bool L_4 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_3, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_00d0; } } { RectTransform_t972643934 * L_5 = V_0; NullCheck(L_5); Rect_t4241904616 L_6 = RectTransform_get_rect_m1566017036(L_5, /*hidden argument*/NULL); V_3 = L_6; Vector2_t4282066565 L_7 = Rect_get_size_m136480416((&V_3), /*hidden argument*/NULL); V_4 = L_7; int32_t L_8 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_9 = Vector2_get_Item_m2185542843((&V_4), L_8, /*hidden argument*/NULL); if ((!(((float)L_9) > ((float)(0.0f))))) { goto IL_00d0; } } { RectTransform_t972643934 * L_10 = V_0; PointerEventData_t1848751023 * L_11 = ___eventData0; NullCheck(L_11); Vector2_t4282066565 L_12 = PointerEventData_get_position_m2263123361(L_11, /*hidden argument*/NULL); Camera_t2727095145 * L_13 = ___cam1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_14 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_10, L_12, L_13, (&V_1), /*hidden argument*/NULL); if (L_14) { goto IL_005c; } } { return; } IL_005c: { Vector2_t4282066565 L_15 = V_1; RectTransform_t972643934 * L_16 = V_0; NullCheck(L_16); Rect_t4241904616 L_17 = RectTransform_get_rect_m1566017036(L_16, /*hidden argument*/NULL); V_5 = L_17; Vector2_t4282066565 L_18 = Rect_get_position_m2933356232((&V_5), /*hidden argument*/NULL); Vector2_t4282066565 L_19 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_15, L_18, /*hidden argument*/NULL); V_1 = L_19; Vector2_t4282066565 L_20 = V_1; Vector2_t4282066565 L_21 = __this->get_m_Offset_29(); Vector2_t4282066565 L_22 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_20, L_21, /*hidden argument*/NULL); V_6 = L_22; int32_t L_23 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_24 = Vector2_get_Item_m2185542843((&V_6), L_23, /*hidden argument*/NULL); RectTransform_t972643934 * L_25 = V_0; NullCheck(L_25); Rect_t4241904616 L_26 = RectTransform_get_rect_m1566017036(L_25, /*hidden argument*/NULL); V_7 = L_26; Vector2_t4282066565 L_27 = Rect_get_size_m136480416((&V_7), /*hidden argument*/NULL); V_8 = L_27; int32_t L_28 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); float L_29 = Vector2_get_Item_m2185542843((&V_8), L_28, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_30 = Mathf_Clamp01_m2272733930(NULL /*static, unused*/, ((float)((float)L_24/(float)L_29)), /*hidden argument*/NULL); V_2 = L_30; bool L_31 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); G_B7_0 = __this; if (!L_31) { G_B8_0 = __this; goto IL_00ca; } } { float L_32 = V_2; G_B9_0 = ((float)((float)(1.0f)-(float)L_32)); G_B9_1 = G_B7_0; goto IL_00cb; } IL_00ca: { float L_33 = V_2; G_B9_0 = L_33; G_B9_1 = G_B8_0; } IL_00cb: { NullCheck(G_B9_1); Slider_set_normalizedValue_m3382161958(G_B9_1, G_B9_0, /*hidden argument*/NULL); } IL_00d0: { return; } } // System.Boolean UnityEngine.UI.Slider::MayDrag(UnityEngine.EventSystems.PointerEventData) extern "C" bool Slider_MayDrag_m2965973935 (Slider_t79469677 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { 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_0021; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (!L_1) { goto IL_0021; } } { PointerEventData_t1848751023 * L_2 = ___eventData0; NullCheck(L_2); int32_t L_3 = PointerEventData_get_button_m796143251(L_2, /*hidden argument*/NULL); G_B4_0 = ((((int32_t)L_3) == ((int32_t)0))? 1 : 0); goto IL_0022; } IL_0021: { G_B4_0 = 0; } IL_0022: { return (bool)G_B4_0; } } // System.Void UnityEngine.UI.Slider::OnPointerDown(UnityEngine.EventSystems.PointerEventData) extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t Slider_OnPointerDown_m2064356406_MetadataUsageId; extern "C" void Slider_OnPointerDown_m2064356406 (Slider_t79469677 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_OnPointerDown_m2064356406_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); { PointerEventData_t1848751023 * L_0 = ___eventData0; bool L_1 = Slider_MayDrag_m2965973935(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000d; } } { return; } IL_000d: { PointerEventData_t1848751023 * L_2 = ___eventData0; Selectable_OnPointerDown_m706592619(__this, L_2, /*hidden argument*/NULL); Vector2_t4282066565 L_3 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); __this->set_m_Offset_29(L_3); RectTransform_t972643934 * L_4 = __this->get_m_HandleContainerRect_28(); bool L_5 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_4, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_5) { goto IL_0076; } } { RectTransform_t972643934 * L_6 = __this->get_m_HandleRect_17(); PointerEventData_t1848751023 * L_7 = ___eventData0; NullCheck(L_7); Vector2_t4282066565 L_8 = PointerEventData_get_position_m2263123361(L_7, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_9 = ___eventData0; NullCheck(L_9); Camera_t2727095145 * L_10 = PointerEventData_get_enterEventCamera_m1535306943(L_9, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_11 = RectTransformUtility_RectangleContainsScreenPoint_m1460676684(NULL /*static, unused*/, L_6, L_8, L_10, /*hidden argument*/NULL); if (!L_11) { goto IL_0076; } } { RectTransform_t972643934 * L_12 = __this->get_m_HandleRect_17(); PointerEventData_t1848751023 * L_13 = ___eventData0; NullCheck(L_13); Vector2_t4282066565 L_14 = PointerEventData_get_position_m2263123361(L_13, /*hidden argument*/NULL); PointerEventData_t1848751023 * L_15 = ___eventData0; NullCheck(L_15); Camera_t2727095145 * L_16 = PointerEventData_get_pressEventCamera_m2764092724(L_15, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); bool L_17 = RectTransformUtility_ScreenPointToLocalPointInRectangle_m666650172(NULL /*static, unused*/, L_12, L_14, L_16, (&V_0), /*hidden argument*/NULL); if (!L_17) { goto IL_0071; } } { Vector2_t4282066565 L_18 = V_0; __this->set_m_Offset_29(L_18); } IL_0071: { goto IL_0083; } IL_0076: { PointerEventData_t1848751023 * L_19 = ___eventData0; PointerEventData_t1848751023 * L_20 = ___eventData0; NullCheck(L_20); Camera_t2727095145 * L_21 = PointerEventData_get_pressEventCamera_m2764092724(L_20, /*hidden argument*/NULL); Slider_UpdateDrag_m913163651(__this, L_19, L_21, /*hidden argument*/NULL); } IL_0083: { return; } } // System.Void UnityEngine.UI.Slider::OnDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Slider_OnDrag_m2689187441 (Slider_t79469677 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; bool L_1 = Slider_MayDrag_m2965973935(__this, L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000d; } } { return; } IL_000d: { PointerEventData_t1848751023 * L_2 = ___eventData0; PointerEventData_t1848751023 * L_3 = ___eventData0; NullCheck(L_3); Camera_t2727095145 * L_4 = PointerEventData_get_pressEventCamera_m2764092724(L_3, /*hidden argument*/NULL); Slider_UpdateDrag_m913163651(__this, L_2, L_4, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::OnMove(UnityEngine.EventSystems.AxisEventData) extern "C" void Slider_OnMove_m3684755636 (Slider_t79469677 * __this, AxisEventData_t3355659985 * ___eventData0, const MethodInfo* method) { int32_t V_0 = 0; Slider_t79469677 * G_B9_0 = NULL; Slider_t79469677 * G_B8_0 = NULL; float G_B10_0 = 0.0f; Slider_t79469677 * G_B10_1 = NULL; Slider_t79469677 * G_B17_0 = NULL; Slider_t79469677 * G_B16_0 = NULL; float G_B18_0 = 0.0f; Slider_t79469677 * G_B18_1 = NULL; Slider_t79469677 * G_B25_0 = NULL; Slider_t79469677 * G_B24_0 = NULL; float G_B26_0 = 0.0f; Slider_t79469677 * G_B26_1 = NULL; Slider_t79469677 * G_B33_0 = NULL; Slider_t79469677 * G_B32_0 = NULL; float G_B34_0 = 0.0f; Slider_t79469677 * G_B34_1 = NULL; { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0016; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_001e; } } IL_0016: { AxisEventData_t3355659985 * L_2 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_2, /*hidden argument*/NULL); return; } IL_001e: { AxisEventData_t3355659985 * L_3 = ___eventData0; NullCheck(L_3); int32_t L_4 = AxisEventData_get_moveDir_m2739466109(L_3, /*hidden argument*/NULL); V_0 = L_4; int32_t L_5 = V_0; if (L_5 == 0) { goto IL_0040; } if (L_5 == 1) { goto IL_00fa; } if (L_5 == 2) { goto IL_009d; } if (L_5 == 3) { goto IL_0158; } } { goto IL_01b6; } IL_0040: { int32_t L_6 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if (L_6) { goto IL_0091; } } { Selectable_t1885181538 * L_7 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(26 /* UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnLeft() */, __this); bool L_8 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_7, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0091; } } { bool L_9 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); G_B8_0 = __this; if (!L_9) { G_B9_0 = __this; goto IL_007a; } } { float L_10 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_11 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_10+(float)L_11)); G_B10_1 = G_B8_0; goto IL_0087; } IL_007a: { float L_12 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_13 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B10_0 = ((float)((float)L_12-(float)L_13)); G_B10_1 = G_B9_0; } IL_0087: { NullCheck(G_B10_1); Slider_Set_m2575079457(G_B10_1, G_B10_0, /*hidden argument*/NULL); goto IL_0098; } IL_0091: { AxisEventData_t3355659985 * L_14 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_14, /*hidden argument*/NULL); } IL_0098: { goto IL_01b6; } IL_009d: { int32_t L_15 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if (L_15) { goto IL_00ee; } } { Selectable_t1885181538 * L_16 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(27 /* UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnRight() */, __this); bool L_17 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_16, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_17) { goto IL_00ee; } } { bool L_18 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); G_B16_0 = __this; if (!L_18) { G_B17_0 = __this; goto IL_00d7; } } { float L_19 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_20 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_19-(float)L_20)); G_B18_1 = G_B16_0; goto IL_00e4; } IL_00d7: { float L_21 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_22 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B18_0 = ((float)((float)L_21+(float)L_22)); G_B18_1 = G_B17_0; } IL_00e4: { NullCheck(G_B18_1); Slider_Set_m2575079457(G_B18_1, G_B18_0, /*hidden argument*/NULL); goto IL_00f5; } IL_00ee: { AxisEventData_t3355659985 * L_23 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_23, /*hidden argument*/NULL); } IL_00f5: { goto IL_01b6; } IL_00fa: { int32_t L_24 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_24) == ((uint32_t)1)))) { goto IL_014c; } } { Selectable_t1885181538 * L_25 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(28 /* UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnUp() */, __this); bool L_26 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_25, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_26) { goto IL_014c; } } { bool L_27 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); G_B24_0 = __this; if (!L_27) { G_B25_0 = __this; goto IL_0135; } } { float L_28 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_29 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_28-(float)L_29)); G_B26_1 = G_B24_0; goto IL_0142; } IL_0135: { float L_30 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_31 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B26_0 = ((float)((float)L_30+(float)L_31)); G_B26_1 = G_B25_0; } IL_0142: { NullCheck(G_B26_1); Slider_Set_m2575079457(G_B26_1, G_B26_0, /*hidden argument*/NULL); goto IL_0153; } IL_014c: { AxisEventData_t3355659985 * L_32 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_32, /*hidden argument*/NULL); } IL_0153: { goto IL_01b6; } IL_0158: { int32_t L_33 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_33) == ((uint32_t)1)))) { goto IL_01aa; } } { Selectable_t1885181538 * L_34 = VirtFuncInvoker0< Selectable_t1885181538 * >::Invoke(29 /* UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnDown() */, __this); bool L_35 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_34, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_35) { goto IL_01aa; } } { bool L_36 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); G_B32_0 = __this; if (!L_36) { G_B33_0 = __this; goto IL_0193; } } { float L_37 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_38 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_37+(float)L_38)); G_B34_1 = G_B32_0; goto IL_01a0; } IL_0193: { float L_39 = VirtFuncInvoker0< float >::Invoke(45 /* System.Single UnityEngine.UI.Slider::get_value() */, __this); float L_40 = Slider_get_stepSize_m3189751172(__this, /*hidden argument*/NULL); G_B34_0 = ((float)((float)L_39-(float)L_40)); G_B34_1 = G_B33_0; } IL_01a0: { NullCheck(G_B34_1); Slider_Set_m2575079457(G_B34_1, G_B34_0, /*hidden argument*/NULL); goto IL_01b1; } IL_01aa: { AxisEventData_t3355659985 * L_41 = ___eventData0; Selectable_OnMove_m2478875177(__this, L_41, /*hidden argument*/NULL); } IL_01b1: { goto IL_01b6; } IL_01b6: { return; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnLeft() extern "C" Selectable_t1885181538 * Slider_FindSelectableOnLeft_m601280629 (Slider_t79469677 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0021; } } { int32_t L_2 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0021; } } { return (Selectable_t1885181538 *)NULL; } IL_0021: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnLeft_m3101734378(__this, /*hidden argument*/NULL); return L_3; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnRight() extern "C" Selectable_t1885181538 * Slider_FindSelectableOnRight_m2605040784 (Slider_t79469677 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0021; } } { int32_t L_2 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if (L_2) { goto IL_0021; } } { return (Selectable_t1885181538 *)NULL; } IL_0021: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnRight_m2809695675(__this, /*hidden argument*/NULL); return L_3; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnUp() extern "C" Selectable_t1885181538 * Slider_FindSelectableOnUp_m3326038345 (Slider_t79469677 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0022; } } { int32_t L_2 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0022; } } { return (Selectable_t1885181538 *)NULL; } IL_0022: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnUp_m3489533950(__this, /*hidden argument*/NULL); return L_3; } } // UnityEngine.UI.Selectable UnityEngine.UI.Slider::FindSelectableOnDown() extern "C" Selectable_t1885181538 * Slider_FindSelectableOnDown_m381983312 (Slider_t79469677 * __this, const MethodInfo* method) { Navigation_t1108456480 V_0; memset(&V_0, 0, sizeof(V_0)); { Navigation_t1108456480 L_0 = Selectable_get_navigation_m3138151376(__this, /*hidden argument*/NULL); V_0 = L_0; int32_t L_1 = Navigation_get_mode_m721480509((&V_0), /*hidden argument*/NULL); if ((!(((uint32_t)L_1) == ((uint32_t)3)))) { goto IL_0022; } } { int32_t L_2 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); if ((!(((uint32_t)L_2) == ((uint32_t)1)))) { goto IL_0022; } } { return (Selectable_t1885181538 *)NULL; } IL_0022: { Selectable_t1885181538 * L_3 = Selectable_FindSelectableOnDown_m2882437061(__this, /*hidden argument*/NULL); return L_3; } } // System.Void UnityEngine.UI.Slider::OnInitializePotentialDrag(UnityEngine.EventSystems.PointerEventData) extern "C" void Slider_OnInitializePotentialDrag_m3120616467 (Slider_t79469677 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); PointerEventData_set_useDragThreshold_m2530254510(L_0, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Slider::SetDirection(UnityEngine.UI.Slider/Direction,System.Boolean) extern Il2CppClass* RectTransform_t972643934_il2cpp_TypeInfo_var; extern Il2CppClass* RectTransformUtility_t3025555048_il2cpp_TypeInfo_var; extern const uint32_t Slider_SetDirection_m1955116790_MetadataUsageId; extern "C" void Slider_SetDirection_m1955116790 (Slider_t79469677 * __this, int32_t ___direction0, bool ___includeRectLayouts1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Slider_SetDirection_m1955116790_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; bool V_1 = false; { int32_t L_0 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); V_0 = L_0; bool L_1 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); V_1 = L_1; int32_t L_2 = ___direction0; Slider_set_direction_m1506600084(__this, L_2, /*hidden argument*/NULL); bool L_3 = ___includeRectLayouts1; if (L_3) { goto IL_001c; } } { return; } IL_001c: { int32_t L_4 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); int32_t L_5 = V_0; if ((((int32_t)L_4) == ((int32_t)L_5))) { goto IL_003a; } } { Transform_t1659122786 * L_6 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutAxes_m2163490602(NULL /*static, unused*/, ((RectTransform_t972643934 *)IsInstSealed(L_6, RectTransform_t972643934_il2cpp_TypeInfo_var)), (bool)1, (bool)1, /*hidden argument*/NULL); } IL_003a: { bool L_7 = Slider_get_reverseValue_m1915319492(__this, /*hidden argument*/NULL); bool L_8 = V_1; if ((((int32_t)L_7) == ((int32_t)L_8))) { goto IL_005e; } } { Transform_t1659122786 * L_9 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); int32_t L_10 = Slider_get_axis_m591825817(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t3025555048_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutOnAxis_m3487429352(NULL /*static, unused*/, ((RectTransform_t972643934 *)IsInstSealed(L_9, RectTransform_t972643934_il2cpp_TypeInfo_var)), L_10, (bool)1, (bool)1, /*hidden argument*/NULL); } IL_005e: { return; } } // System.Boolean UnityEngine.UI.Slider::UnityEngine.UI.ICanvasElement.IsDestroyed() extern "C" bool Slider_UnityEngine_UI_ICanvasElement_IsDestroyed_m1155329269 (Slider_t79469677 * __this, const MethodInfo* method) { { bool L_0 = UIBehaviour_IsDestroyed_m3027499227(__this, /*hidden argument*/NULL); return L_0; } } // UnityEngine.Transform UnityEngine.UI.Slider::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t1659122786 * Slider_UnityEngine_UI_ICanvasElement_get_transform_m2086174425 (Slider_t79469677 * __this, const MethodInfo* method) { { Transform_t1659122786 * L_0 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.Slider/SliderEvent::.ctor() extern const MethodInfo* UnityEvent_1__ctor_m1354608473_MethodInfo_var; extern const uint32_t SliderEvent__ctor_m1429088576_MetadataUsageId; extern "C" void SliderEvent__ctor_m1429088576 (SliderEvent_t2627072750 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (SliderEvent__ctor_m1429088576_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UnityEvent_1__ctor_m1354608473(__this, /*hidden argument*/UnityEvent_1__ctor_m1354608473_MethodInfo_var); return; } } // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_highlightedSprite() extern "C" Sprite_t3199167241 * SpriteState_get_highlightedSprite_m2511270273 (SpriteState_t2895308594 * __this, const MethodInfo* method) { { Sprite_t3199167241 * L_0 = __this->get_m_HighlightedSprite_0(); return L_0; } } extern "C" Sprite_t3199167241 * SpriteState_get_highlightedSprite_m2511270273_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); return SpriteState_get_highlightedSprite_m2511270273(_thisAdjusted, method); } // System.Void UnityEngine.UI.SpriteState::set_highlightedSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_highlightedSprite_m2778751948 (SpriteState_t2895308594 * __this, Sprite_t3199167241 * ___value0, const MethodInfo* method) { { Sprite_t3199167241 * L_0 = ___value0; __this->set_m_HighlightedSprite_0(L_0); return; } } extern "C" void SpriteState_set_highlightedSprite_m2778751948_AdjustorThunk (Il2CppObject * __this, Sprite_t3199167241 * ___value0, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); SpriteState_set_highlightedSprite_m2778751948(_thisAdjusted, ___value0, method); } // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_pressedSprite() extern "C" Sprite_t3199167241 * SpriteState_get_pressedSprite_m591013456 (SpriteState_t2895308594 * __this, const MethodInfo* method) { { Sprite_t3199167241 * L_0 = __this->get_m_PressedSprite_1(); return L_0; } } extern "C" Sprite_t3199167241 * SpriteState_get_pressedSprite_m591013456_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); return SpriteState_get_pressedSprite_m591013456(_thisAdjusted, method); } // System.Void UnityEngine.UI.SpriteState::set_pressedSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_pressedSprite_m2255650395 (SpriteState_t2895308594 * __this, Sprite_t3199167241 * ___value0, const MethodInfo* method) { { Sprite_t3199167241 * L_0 = ___value0; __this->set_m_PressedSprite_1(L_0); return; } } extern "C" void SpriteState_set_pressedSprite_m2255650395_AdjustorThunk (Il2CppObject * __this, Sprite_t3199167241 * ___value0, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); SpriteState_set_pressedSprite_m2255650395(_thisAdjusted, ___value0, method); } // UnityEngine.Sprite UnityEngine.UI.SpriteState::get_disabledSprite() extern "C" Sprite_t3199167241 * SpriteState_get_disabledSprite_m1512804506 (SpriteState_t2895308594 * __this, const MethodInfo* method) { { Sprite_t3199167241 * L_0 = __this->get_m_DisabledSprite_2(); return L_0; } } extern "C" Sprite_t3199167241 * SpriteState_get_disabledSprite_m1512804506_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); return SpriteState_get_disabledSprite_m1512804506(_thisAdjusted, method); } // System.Void UnityEngine.UI.SpriteState::set_disabledSprite(UnityEngine.Sprite) extern "C" void SpriteState_set_disabledSprite_m1447937271 (SpriteState_t2895308594 * __this, Sprite_t3199167241 * ___value0, const MethodInfo* method) { { Sprite_t3199167241 * L_0 = ___value0; __this->set_m_DisabledSprite_2(L_0); return; } } extern "C" void SpriteState_set_disabledSprite_m1447937271_AdjustorThunk (Il2CppObject * __this, Sprite_t3199167241 * ___value0, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); SpriteState_set_disabledSprite_m1447937271(_thisAdjusted, ___value0, method); } // System.Boolean UnityEngine.UI.SpriteState::Equals(UnityEngine.UI.SpriteState) extern "C" bool SpriteState_Equals_m895455353 (SpriteState_t2895308594 * __this, SpriteState_t2895308594 ___other0, const MethodInfo* method) { int32_t G_B4_0 = 0; { Sprite_t3199167241 * L_0 = SpriteState_get_highlightedSprite_m2511270273(__this, /*hidden argument*/NULL); Sprite_t3199167241 * L_1 = SpriteState_get_highlightedSprite_m2511270273((&___other0), /*hidden argument*/NULL); bool L_2 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL); if (!L_2) { goto IL_0042; } } { Sprite_t3199167241 * L_3 = SpriteState_get_pressedSprite_m591013456(__this, /*hidden argument*/NULL); Sprite_t3199167241 * L_4 = SpriteState_get_pressedSprite_m591013456((&___other0), /*hidden argument*/NULL); bool L_5 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_0042; } } { Sprite_t3199167241 * L_6 = SpriteState_get_disabledSprite_m1512804506(__this, /*hidden argument*/NULL); Sprite_t3199167241 * L_7 = SpriteState_get_disabledSprite_m1512804506((&___other0), /*hidden argument*/NULL); bool L_8 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL); G_B4_0 = ((int32_t)(L_8)); goto IL_0043; } IL_0042: { G_B4_0 = 0; } IL_0043: { return (bool)G_B4_0; } } extern "C" bool SpriteState_Equals_m895455353_AdjustorThunk (Il2CppObject * __this, SpriteState_t2895308594 ___other0, const MethodInfo* method) { SpriteState_t2895308594 * _thisAdjusted = reinterpret_cast<SpriteState_t2895308594 *>(__this + 1); return SpriteState_Equals_m895455353(_thisAdjusted, ___other0, method); } // Conversion methods for marshalling of: UnityEngine.UI.SpriteState extern "C" void SpriteState_t2895308594_marshal_pinvoke(const SpriteState_t2895308594& unmarshaled, SpriteState_t2895308594_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_t2895308594_marshal_pinvoke_back(const SpriteState_t2895308594_marshaled_pinvoke& marshaled, SpriteState_t2895308594& 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_t2895308594_marshal_pinvoke_cleanup(SpriteState_t2895308594_marshaled_pinvoke& marshaled) { } // Conversion methods for marshalling of: UnityEngine.UI.SpriteState extern "C" void SpriteState_t2895308594_marshal_com(const SpriteState_t2895308594& unmarshaled, SpriteState_t2895308594_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_t2895308594_marshal_com_back(const SpriteState_t2895308594_marshaled_com& marshaled, SpriteState_t2895308594& 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_t2895308594_marshal_com_cleanup(SpriteState_t2895308594_marshaled_com& marshaled) { } // System.Void UnityEngine.UI.StencilMaterial::.cctor() extern Il2CppClass* List_1_t2942339633_il2cpp_TypeInfo_var; extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m577177117_MethodInfo_var; extern const uint32_t StencilMaterial__cctor_m2688860949_MetadataUsageId; extern "C" void StencilMaterial__cctor_m2688860949 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (StencilMaterial__cctor_m2688860949_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t2942339633 * L_0 = (List_1_t2942339633 *)il2cpp_codegen_object_new(List_1_t2942339633_il2cpp_TypeInfo_var); List_1__ctor_m577177117(L_0, /*hidden argument*/List_1__ctor_m577177117_MethodInfo_var); ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->set_m_List_0(L_0); return; } } // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32) extern "C" Material_t3870600107 * StencilMaterial_Add_m1399519863 (Il2CppObject * __this /* static, unused */, Material_t3870600107 * ___baseMat0, int32_t ___stencilID1, const MethodInfo* method) { { return (Material_t3870600107 *)NULL; } } // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32,UnityEngine.Rendering.StencilOp,UnityEngine.Rendering.CompareFunction,UnityEngine.Rendering.ColorWriteMask) extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern const uint32_t StencilMaterial_Add_m310944030_MetadataUsageId; extern "C" Material_t3870600107 * StencilMaterial_Add_m310944030 (Il2CppObject * __this /* static, unused */, Material_t3870600107 * ___baseMat0, int32_t ___stencilID1, int32_t ___operation2, int32_t ___compareFunction3, int32_t ___colorWriteMask4, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (StencilMaterial_Add_m310944030_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Material_t3870600107 * 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_t639665897_il2cpp_TypeInfo_var); Material_t3870600107 * L_5 = StencilMaterial_Add_m264449278(NULL /*static, unused*/, L_0, L_1, L_2, L_3, L_4, ((int32_t)255), ((int32_t)255), /*hidden argument*/NULL); return L_5; } } // UnityEngine.Material UnityEngine.UI.StencilMaterial::Add(UnityEngine.Material,System.Int32,UnityEngine.Rendering.StencilOp,UnityEngine.Rendering.CompareFunction,UnityEngine.Rendering.ColorWriteMask,System.Int32,System.Int32) extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern Il2CppClass* Debug_t4195163081_il2cpp_TypeInfo_var; extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern Il2CppClass* MatEntry_t1574154081_il2cpp_TypeInfo_var; extern Il2CppClass* Material_t3870600107_il2cpp_TypeInfo_var; extern Il2CppClass* ObjectU5BU5D_t1108656482_il2cpp_TypeInfo_var; extern Il2CppClass* Int32_t1153838500_il2cpp_TypeInfo_var; extern Il2CppClass* StencilOp_t3324967291_il2cpp_TypeInfo_var; extern Il2CppClass* CompareFunction_t2661816155_il2cpp_TypeInfo_var; extern Il2CppClass* ColorWriteMask_t3214369688_il2cpp_TypeInfo_var; extern Il2CppClass* Boolean_t476798718_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Item_m185575420_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1970513337_MethodInfo_var; extern const MethodInfo* List_1_Add_m271537933_MethodInfo_var; extern Il2CppCodeGenString* _stringLiteral2129251421; extern Il2CppCodeGenString* _stringLiteral2685099961; extern Il2CppCodeGenString* _stringLiteral2725507710; extern Il2CppCodeGenString* _stringLiteral1806185246; extern Il2CppCodeGenString* _stringLiteral2414713693; extern Il2CppCodeGenString* _stringLiteral576878860; extern Il2CppCodeGenString* _stringLiteral1117226927; extern Il2CppCodeGenString* _stringLiteral3143343391; extern Il2CppCodeGenString* _stringLiteral176305660; extern Il2CppCodeGenString* _stringLiteral2427202721; extern Il2CppCodeGenString* _stringLiteral2495765328; extern Il2CppCodeGenString* _stringLiteral874023787; extern Il2CppCodeGenString* _stringLiteral2870969510; extern Il2CppCodeGenString* _stringLiteral2678437774; extern Il2CppCodeGenString* _stringLiteral2824423942; extern Il2CppCodeGenString* _stringLiteral3702767181; extern const uint32_t StencilMaterial_Add_m264449278_MetadataUsageId; extern "C" Material_t3870600107 * StencilMaterial_Add_m264449278 (Il2CppObject * __this /* static, unused */, Material_t3870600107 * ___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_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (StencilMaterial_Add_m264449278_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; MatEntry_t1574154081 * V_1 = NULL; MatEntry_t1574154081 * V_2 = NULL; MatEntry_t1574154081 * G_B29_0 = NULL; MatEntry_t1574154081 * G_B28_0 = NULL; int32_t G_B30_0 = 0; MatEntry_t1574154081 * G_B30_1 = NULL; String_t* G_B33_0 = NULL; Material_t3870600107 * G_B33_1 = NULL; String_t* G_B32_0 = NULL; Material_t3870600107 * G_B32_1 = NULL; int32_t G_B34_0 = 0; String_t* G_B34_1 = NULL; Material_t3870600107 * G_B34_2 = NULL; { int32_t L_0 = ___stencilID1; if ((((int32_t)L_0) > ((int32_t)0))) { goto IL_0010; } } { int32_t L_1 = ___colorWriteMask4; if ((((int32_t)L_1) == ((int32_t)((int32_t)15)))) { goto IL_001c; } } IL_0010: { Material_t3870600107 * L_2 = ___baseMat0; bool L_3 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_2, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_3) { goto IL_001e; } } IL_001c: { Material_t3870600107 * L_4 = ___baseMat0; return L_4; } IL_001e: { Material_t3870600107 * L_5 = ___baseMat0; NullCheck(L_5); bool L_6 = Material_HasProperty_m2077312757(L_5, _stringLiteral2129251421, /*hidden argument*/NULL); if (L_6) { goto IL_004b; } } { Material_t3870600107 * L_7 = ___baseMat0; NullCheck(L_7); String_t* L_8 = Object_get_name_m3709440845(L_7, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_9 = String_Concat_m1825781833(NULL /*static, unused*/, _stringLiteral2685099961, L_8, _stringLiteral2725507710, /*hidden argument*/NULL); Material_t3870600107 * L_10 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t4195163081_il2cpp_TypeInfo_var); Debug_LogWarning_m4097176146(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL); Material_t3870600107 * L_11 = ___baseMat0; return L_11; } IL_004b: { Material_t3870600107 * L_12 = ___baseMat0; NullCheck(L_12); bool L_13 = Material_HasProperty_m2077312757(L_12, _stringLiteral1806185246, /*hidden argument*/NULL); if (L_13) { goto IL_0078; } } { Material_t3870600107 * L_14 = ___baseMat0; NullCheck(L_14); String_t* L_15 = Object_get_name_m3709440845(L_14, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_16 = String_Concat_m1825781833(NULL /*static, unused*/, _stringLiteral2685099961, L_15, _stringLiteral2414713693, /*hidden argument*/NULL); Material_t3870600107 * L_17 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t4195163081_il2cpp_TypeInfo_var); Debug_LogWarning_m4097176146(NULL /*static, unused*/, L_16, L_17, /*hidden argument*/NULL); Material_t3870600107 * L_18 = ___baseMat0; return L_18; } IL_0078: { Material_t3870600107 * L_19 = ___baseMat0; NullCheck(L_19); bool L_20 = Material_HasProperty_m2077312757(L_19, _stringLiteral576878860, /*hidden argument*/NULL); if (L_20) { goto IL_00a5; } } { Material_t3870600107 * L_21 = ___baseMat0; NullCheck(L_21); String_t* L_22 = Object_get_name_m3709440845(L_21, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_23 = String_Concat_m1825781833(NULL /*static, unused*/, _stringLiteral2685099961, L_22, _stringLiteral1117226927, /*hidden argument*/NULL); Material_t3870600107 * L_24 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t4195163081_il2cpp_TypeInfo_var); Debug_LogWarning_m4097176146(NULL /*static, unused*/, L_23, L_24, /*hidden argument*/NULL); Material_t3870600107 * L_25 = ___baseMat0; return L_25; } IL_00a5: { Material_t3870600107 * L_26 = ___baseMat0; NullCheck(L_26); bool L_27 = Material_HasProperty_m2077312757(L_26, _stringLiteral3143343391, /*hidden argument*/NULL); if (L_27) { goto IL_00d2; } } { Material_t3870600107 * L_28 = ___baseMat0; NullCheck(L_28); String_t* L_29 = Object_get_name_m3709440845(L_28, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_30 = String_Concat_m1825781833(NULL /*static, unused*/, _stringLiteral2685099961, L_29, _stringLiteral176305660, /*hidden argument*/NULL); Material_t3870600107 * L_31 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t4195163081_il2cpp_TypeInfo_var); Debug_LogWarning_m4097176146(NULL /*static, unused*/, L_30, L_31, /*hidden argument*/NULL); Material_t3870600107 * L_32 = ___baseMat0; return L_32; } IL_00d2: { Material_t3870600107 * L_33 = ___baseMat0; NullCheck(L_33); bool L_34 = Material_HasProperty_m2077312757(L_33, _stringLiteral3143343391, /*hidden argument*/NULL); if (L_34) { goto IL_00ff; } } { Material_t3870600107 * L_35 = ___baseMat0; NullCheck(L_35); String_t* L_36 = Object_get_name_m3709440845(L_35, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_37 = String_Concat_m1825781833(NULL /*static, unused*/, _stringLiteral2685099961, L_36, _stringLiteral2427202721, /*hidden argument*/NULL); Material_t3870600107 * L_38 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t4195163081_il2cpp_TypeInfo_var); Debug_LogWarning_m4097176146(NULL /*static, unused*/, L_37, L_38, /*hidden argument*/NULL); Material_t3870600107 * L_39 = ___baseMat0; return L_39; } IL_00ff: { Material_t3870600107 * L_40 = ___baseMat0; NullCheck(L_40); bool L_41 = Material_HasProperty_m2077312757(L_40, _stringLiteral2495765328, /*hidden argument*/NULL); if (L_41) { goto IL_012c; } } { Material_t3870600107 * L_42 = ___baseMat0; NullCheck(L_42); String_t* L_43 = Object_get_name_m3709440845(L_42, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_44 = String_Concat_m1825781833(NULL /*static, unused*/, _stringLiteral2685099961, L_43, _stringLiteral874023787, /*hidden argument*/NULL); Material_t3870600107 * L_45 = ___baseMat0; IL2CPP_RUNTIME_CLASS_INIT(Debug_t4195163081_il2cpp_TypeInfo_var); Debug_LogWarning_m4097176146(NULL /*static, unused*/, L_44, L_45, /*hidden argument*/NULL); Material_t3870600107 * L_46 = ___baseMat0; return L_46; } IL_012c: { V_0 = 0; goto IL_01b4; } IL_0133: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_47 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_48 = V_0; NullCheck(L_47); MatEntry_t1574154081 * L_49 = List_1_get_Item_m185575420(L_47, L_48, /*hidden argument*/List_1_get_Item_m185575420_MethodInfo_var); V_1 = L_49; MatEntry_t1574154081 * L_50 = V_1; NullCheck(L_50); Material_t3870600107 * L_51 = L_50->get_baseMat_0(); Material_t3870600107 * L_52 = ___baseMat0; bool L_53 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_51, L_52, /*hidden argument*/NULL); if (!L_53) { goto IL_01b0; } } { MatEntry_t1574154081 * L_54 = V_1; 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_01b0; } } { MatEntry_t1574154081 * L_57 = V_1; 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_01b0; } } { MatEntry_t1574154081 * L_60 = V_1; 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_01b0; } } { MatEntry_t1574154081 * L_63 = V_1; 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_01b0; } } { MatEntry_t1574154081 * L_66 = V_1; 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_01b0; } } { MatEntry_t1574154081 * L_69 = V_1; 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_01b0; } } { MatEntry_t1574154081 * L_72 = V_1; MatEntry_t1574154081 * 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_t1574154081 * L_75 = V_1; NullCheck(L_75); Material_t3870600107 * L_76 = L_75->get_customMat_1(); return L_76; } IL_01b0: { int32_t L_77 = V_0; V_0 = ((int32_t)((int32_t)L_77+(int32_t)1)); } IL_01b4: { int32_t L_78 = V_0; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_79 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_79); int32_t L_80 = List_1_get_Count_m1970513337(L_79, /*hidden argument*/List_1_get_Count_m1970513337_MethodInfo_var); if ((((int32_t)L_78) < ((int32_t)L_80))) { goto IL_0133; } } { MatEntry_t1574154081 * L_81 = (MatEntry_t1574154081 *)il2cpp_codegen_object_new(MatEntry_t1574154081_il2cpp_TypeInfo_var); MatEntry__ctor_m3447775725(L_81, /*hidden argument*/NULL); V_2 = L_81; MatEntry_t1574154081 * L_82 = V_2; NullCheck(L_82); L_82->set_count_2(1); MatEntry_t1574154081 * L_83 = V_2; Material_t3870600107 * L_84 = ___baseMat0; NullCheck(L_83); L_83->set_baseMat_0(L_84); MatEntry_t1574154081 * L_85 = V_2; Material_t3870600107 * L_86 = ___baseMat0; Material_t3870600107 * L_87 = (Material_t3870600107 *)il2cpp_codegen_object_new(Material_t3870600107_il2cpp_TypeInfo_var); Material__ctor_m2546967560(L_87, L_86, /*hidden argument*/NULL); NullCheck(L_85); L_85->set_customMat_1(L_87); MatEntry_t1574154081 * L_88 = V_2; NullCheck(L_88); Material_t3870600107 * L_89 = L_88->get_customMat_1(); NullCheck(L_89); Object_set_hideFlags_m41317712(L_89, ((int32_t)61), /*hidden argument*/NULL); MatEntry_t1574154081 * L_90 = V_2; int32_t L_91 = ___stencilID1; NullCheck(L_90); L_90->set_stencilId_3(L_91); MatEntry_t1574154081 * L_92 = V_2; int32_t L_93 = ___operation2; NullCheck(L_92); L_92->set_operation_4(L_93); MatEntry_t1574154081 * L_94 = V_2; int32_t L_95 = ___compareFunction3; NullCheck(L_94); L_94->set_compareFunction_5(L_95); MatEntry_t1574154081 * L_96 = V_2; int32_t L_97 = ___readMask5; NullCheck(L_96); L_96->set_readMask_6(L_97); MatEntry_t1574154081 * L_98 = V_2; int32_t L_99 = ___writeMask6; NullCheck(L_98); L_98->set_writeMask_7(L_99); MatEntry_t1574154081 * L_100 = V_2; int32_t L_101 = ___colorWriteMask4; NullCheck(L_100); L_100->set_colorMask_9(L_101); MatEntry_t1574154081 * L_102 = V_2; int32_t L_103 = ___operation2; G_B28_0 = L_102; if (!L_103) { G_B29_0 = L_102; goto IL_022c; } } { 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_022d; } IL_022c: { G_B30_0 = 0; G_B30_1 = G_B29_0; } IL_022d: { NullCheck(G_B30_1); G_B30_1->set_useAlphaClip_8((bool)G_B30_0); MatEntry_t1574154081 * L_105 = V_2; NullCheck(L_105); Material_t3870600107 * L_106 = L_105->get_customMat_1(); ObjectU5BU5D_t1108656482* L_107 = ((ObjectU5BU5D_t1108656482*)SZArrayNew(ObjectU5BU5D_t1108656482_il2cpp_TypeInfo_var, (uint32_t)8)); int32_t L_108 = ___stencilID1; int32_t L_109 = L_108; Il2CppObject * L_110 = Box(Int32_t1153838500_il2cpp_TypeInfo_var, &L_109); NullCheck(L_107); IL2CPP_ARRAY_BOUNDS_CHECK(L_107, 0); ArrayElementTypeCheck (L_107, L_110); (L_107)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)L_110); ObjectU5BU5D_t1108656482* L_111 = L_107; int32_t L_112 = ___operation2; int32_t L_113 = L_112; Il2CppObject * L_114 = Box(StencilOp_t3324967291_il2cpp_TypeInfo_var, &L_113); NullCheck(L_111); IL2CPP_ARRAY_BOUNDS_CHECK(L_111, 1); ArrayElementTypeCheck (L_111, L_114); (L_111)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_114); ObjectU5BU5D_t1108656482* L_115 = L_111; int32_t L_116 = ___compareFunction3; int32_t L_117 = L_116; Il2CppObject * L_118 = Box(CompareFunction_t2661816155_il2cpp_TypeInfo_var, &L_117); NullCheck(L_115); IL2CPP_ARRAY_BOUNDS_CHECK(L_115, 2); ArrayElementTypeCheck (L_115, L_118); (L_115)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)L_118); ObjectU5BU5D_t1108656482* L_119 = L_115; int32_t L_120 = ___writeMask6; int32_t L_121 = L_120; Il2CppObject * L_122 = Box(Int32_t1153838500_il2cpp_TypeInfo_var, &L_121); NullCheck(L_119); IL2CPP_ARRAY_BOUNDS_CHECK(L_119, 3); ArrayElementTypeCheck (L_119, L_122); (L_119)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_122); ObjectU5BU5D_t1108656482* L_123 = L_119; int32_t L_124 = ___readMask5; int32_t L_125 = L_124; Il2CppObject * L_126 = Box(Int32_t1153838500_il2cpp_TypeInfo_var, &L_125); NullCheck(L_123); IL2CPP_ARRAY_BOUNDS_CHECK(L_123, 4); ArrayElementTypeCheck (L_123, L_126); (L_123)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)L_126); ObjectU5BU5D_t1108656482* L_127 = L_123; int32_t L_128 = ___colorWriteMask4; int32_t L_129 = L_128; Il2CppObject * L_130 = Box(ColorWriteMask_t3214369688_il2cpp_TypeInfo_var, &L_129); NullCheck(L_127); IL2CPP_ARRAY_BOUNDS_CHECK(L_127, 5); ArrayElementTypeCheck (L_127, L_130); (L_127)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_130); ObjectU5BU5D_t1108656482* L_131 = L_127; MatEntry_t1574154081 * L_132 = V_2; NullCheck(L_132); bool L_133 = L_132->get_useAlphaClip_8(); bool L_134 = L_133; Il2CppObject * L_135 = Box(Boolean_t476798718_il2cpp_TypeInfo_var, &L_134); NullCheck(L_131); IL2CPP_ARRAY_BOUNDS_CHECK(L_131, 6); ArrayElementTypeCheck (L_131, L_135); (L_131)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)L_135); ObjectU5BU5D_t1108656482* L_136 = L_131; Material_t3870600107 * L_137 = ___baseMat0; NullCheck(L_137); String_t* L_138 = Object_get_name_m3709440845(L_137, /*hidden argument*/NULL); NullCheck(L_136); IL2CPP_ARRAY_BOUNDS_CHECK(L_136, 7); 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_m4050103162(NULL /*static, unused*/, _stringLiteral2870969510, L_136, /*hidden argument*/NULL); NullCheck(L_106); Object_set_name_m1123518500(L_106, L_139, /*hidden argument*/NULL); MatEntry_t1574154081 * L_140 = V_2; NullCheck(L_140); Material_t3870600107 * L_141 = L_140->get_customMat_1(); int32_t L_142 = ___stencilID1; NullCheck(L_141); Material_SetInt_m2649395040(L_141, _stringLiteral2129251421, L_142, /*hidden argument*/NULL); MatEntry_t1574154081 * L_143 = V_2; NullCheck(L_143); Material_t3870600107 * L_144 = L_143->get_customMat_1(); int32_t L_145 = ___operation2; NullCheck(L_144); Material_SetInt_m2649395040(L_144, _stringLiteral1806185246, L_145, /*hidden argument*/NULL); MatEntry_t1574154081 * L_146 = V_2; NullCheck(L_146); Material_t3870600107 * L_147 = L_146->get_customMat_1(); int32_t L_148 = ___compareFunction3; NullCheck(L_147); Material_SetInt_m2649395040(L_147, _stringLiteral576878860, L_148, /*hidden argument*/NULL); MatEntry_t1574154081 * L_149 = V_2; NullCheck(L_149); Material_t3870600107 * L_150 = L_149->get_customMat_1(); int32_t L_151 = ___readMask5; NullCheck(L_150); Material_SetInt_m2649395040(L_150, _stringLiteral3143343391, L_151, /*hidden argument*/NULL); MatEntry_t1574154081 * L_152 = V_2; NullCheck(L_152); Material_t3870600107 * L_153 = L_152->get_customMat_1(); int32_t L_154 = ___writeMask6; NullCheck(L_153); Material_SetInt_m2649395040(L_153, _stringLiteral2678437774, L_154, /*hidden argument*/NULL); MatEntry_t1574154081 * L_155 = V_2; NullCheck(L_155); Material_t3870600107 * L_156 = L_155->get_customMat_1(); int32_t L_157 = ___colorWriteMask4; NullCheck(L_156); Material_SetInt_m2649395040(L_156, _stringLiteral2495765328, L_157, /*hidden argument*/NULL); MatEntry_t1574154081 * L_158 = V_2; NullCheck(L_158); Material_t3870600107 * L_159 = L_158->get_customMat_1(); NullCheck(L_159); bool L_160 = Material_HasProperty_m2077312757(L_159, _stringLiteral2824423942, /*hidden argument*/NULL); if (!L_160) { goto IL_033d; } } { MatEntry_t1574154081 * L_161 = V_2; NullCheck(L_161); Material_t3870600107 * L_162 = L_161->get_customMat_1(); MatEntry_t1574154081 * L_163 = V_2; NullCheck(L_163); bool L_164 = L_163->get_useAlphaClip_8(); G_B32_0 = _stringLiteral2824423942; G_B32_1 = L_162; if (!L_164) { G_B33_0 = _stringLiteral2824423942; G_B33_1 = L_162; goto IL_0337; } } { G_B34_0 = 1; G_B34_1 = G_B32_0; G_B34_2 = G_B32_1; goto IL_0338; } IL_0337: { G_B34_0 = 0; G_B34_1 = G_B33_0; G_B34_2 = G_B33_1; } IL_0338: { NullCheck(G_B34_2); Material_SetInt_m2649395040(G_B34_2, G_B34_1, G_B34_0, /*hidden argument*/NULL); } IL_033d: { MatEntry_t1574154081 * L_165 = V_2; NullCheck(L_165); bool L_166 = L_165->get_useAlphaClip_8(); if (!L_166) { goto IL_035d; } } { MatEntry_t1574154081 * L_167 = V_2; NullCheck(L_167); Material_t3870600107 * L_168 = L_167->get_customMat_1(); NullCheck(L_168); Material_EnableKeyword_m3802712984(L_168, _stringLiteral3702767181, /*hidden argument*/NULL); goto IL_036d; } IL_035d: { MatEntry_t1574154081 * L_169 = V_2; NullCheck(L_169); Material_t3870600107 * L_170 = L_169->get_customMat_1(); NullCheck(L_170); Material_DisableKeyword_m572736419(L_170, _stringLiteral3702767181, /*hidden argument*/NULL); } IL_036d: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_171 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); MatEntry_t1574154081 * L_172 = V_2; NullCheck(L_171); List_1_Add_m271537933(L_171, L_172, /*hidden argument*/List_1_Add_m271537933_MethodInfo_var); MatEntry_t1574154081 * L_173 = V_2; NullCheck(L_173); Material_t3870600107 * L_174 = L_173->get_customMat_1(); return L_174; } } // System.Void UnityEngine.UI.StencilMaterial::Remove(UnityEngine.Material) extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Item_m185575420_MethodInfo_var; extern const MethodInfo* List_1_RemoveAt_m1175538415_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1970513337_MethodInfo_var; extern const uint32_t StencilMaterial_Remove_m1013236306_MetadataUsageId; extern "C" void StencilMaterial_Remove_m1013236306 (Il2CppObject * __this /* static, unused */, Material_t3870600107 * ___customMat0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (StencilMaterial_Remove_m1013236306_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; MatEntry_t1574154081 * V_1 = NULL; int32_t V_2 = 0; { Material_t3870600107 * L_0 = ___customMat0; bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_000d; } } { return; } IL_000d: { V_0 = 0; goto IL_006e; } IL_0014: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_2 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_3 = V_0; NullCheck(L_2); MatEntry_t1574154081 * L_4 = List_1_get_Item_m185575420(L_2, L_3, /*hidden argument*/List_1_get_Item_m185575420_MethodInfo_var); V_1 = L_4; MatEntry_t1574154081 * L_5 = V_1; NullCheck(L_5); Material_t3870600107 * L_6 = L_5->get_customMat_1(); Material_t3870600107 * L_7 = ___customMat0; bool L_8 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL); if (!L_8) { goto IL_0036; } } { goto IL_006a; } IL_0036: { MatEntry_t1574154081 * L_9 = V_1; MatEntry_t1574154081 * 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_0069; } } { MatEntry_t1574154081 * L_14 = V_1; NullCheck(L_14); Material_t3870600107 * L_15 = L_14->get_customMat_1(); Misc_DestroyImmediate_m40421862(NULL /*static, unused*/, L_15, /*hidden argument*/NULL); MatEntry_t1574154081 * L_16 = V_1; NullCheck(L_16); L_16->set_baseMat_0((Material_t3870600107 *)NULL); IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_17 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_18 = V_0; NullCheck(L_17); List_1_RemoveAt_m1175538415(L_17, L_18, /*hidden argument*/List_1_RemoveAt_m1175538415_MethodInfo_var); } IL_0069: { return; } IL_006a: { int32_t L_19 = V_0; V_0 = ((int32_t)((int32_t)L_19+(int32_t)1)); } IL_006e: { int32_t L_20 = V_0; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_21 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_21); int32_t L_22 = List_1_get_Count_m1970513337(L_21, /*hidden argument*/List_1_get_Count_m1970513337_MethodInfo_var); if ((((int32_t)L_20) < ((int32_t)L_22))) { goto IL_0014; } } { return; } } // System.Void UnityEngine.UI.StencilMaterial::ClearAll() extern Il2CppClass* StencilMaterial_t639665897_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Item_m185575420_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1970513337_MethodInfo_var; extern const MethodInfo* List_1_Clear_m2278277704_MethodInfo_var; extern const uint32_t StencilMaterial_ClearAll_m3351668800_MetadataUsageId; extern "C" void StencilMaterial_ClearAll_m3351668800 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (StencilMaterial_ClearAll_m3351668800_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; MatEntry_t1574154081 * V_1 = NULL; { V_0 = 0; goto IL_0029; } IL_0007: { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_0 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); int32_t L_1 = V_0; NullCheck(L_0); MatEntry_t1574154081 * L_2 = List_1_get_Item_m185575420(L_0, L_1, /*hidden argument*/List_1_get_Item_m185575420_MethodInfo_var); V_1 = L_2; MatEntry_t1574154081 * L_3 = V_1; NullCheck(L_3); Material_t3870600107 * L_4 = L_3->get_customMat_1(); Misc_DestroyImmediate_m40421862(NULL /*static, unused*/, L_4, /*hidden argument*/NULL); MatEntry_t1574154081 * L_5 = V_1; NullCheck(L_5); L_5->set_baseMat_0((Material_t3870600107 *)NULL); int32_t L_6 = V_0; V_0 = ((int32_t)((int32_t)L_6+(int32_t)1)); } IL_0029: { int32_t L_7 = V_0; IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_8 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_8); int32_t L_9 = List_1_get_Count_m1970513337(L_8, /*hidden argument*/List_1_get_Count_m1970513337_MethodInfo_var); if ((((int32_t)L_7) < ((int32_t)L_9))) { goto IL_0007; } } { IL2CPP_RUNTIME_CLASS_INIT(StencilMaterial_t639665897_il2cpp_TypeInfo_var); List_1_t2942339633 * L_10 = ((StencilMaterial_t639665897_StaticFields*)StencilMaterial_t639665897_il2cpp_TypeInfo_var->static_fields)->get_m_List_0(); NullCheck(L_10); List_1_Clear_m2278277704(L_10, /*hidden argument*/List_1_Clear_m2278277704_MethodInfo_var); return; } } // System.Void UnityEngine.UI.StencilMaterial/MatEntry::.ctor() extern "C" void MatEntry__ctor_m3447775725 (MatEntry_t1574154081 * __this, const MethodInfo* method) { { __this->set_compareFunction_5(8); Object__ctor_m1772956182(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::.ctor() extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern Il2CppClass* UIVertexU5BU5D_t1796391381_il2cpp_TypeInfo_var; extern const uint32_t Text__ctor_m216739390_MetadataUsageId; extern "C" void Text__ctor_m216739390 (Text_t9039225 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text__ctor_m216739390_MetadataUsageId); s_Il2CppMethodIntialized = true; } { FontData_t704020325 * L_0 = FontData_get_defaultFontData_m3606420120(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_TempVerts_34(((UIVertexU5BU5D_t1796391381*)SZArrayNew(UIVertexU5BU5D_t1796391381_il2cpp_TypeInfo_var, (uint32_t)4))); MaskableGraphic__ctor_m3514233785(__this, /*hidden argument*/NULL); Graphic_set_useLegacyMeshGeneration_m693817504(__this, (bool)0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::.cctor() extern "C" void Text__cctor_m1941857583 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { { return; } } // UnityEngine.TextGenerator UnityEngine.UI.Text::get_cachedTextGenerator() extern Il2CppClass* TextGenerator_t538854556_il2cpp_TypeInfo_var; extern const uint32_t Text_get_cachedTextGenerator_m337653083_MetadataUsageId; extern "C" TextGenerator_t538854556 * Text_get_cachedTextGenerator_m337653083 (Text_t9039225 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_get_cachedTextGenerator_m337653083_MetadataUsageId); s_Il2CppMethodIntialized = true; } TextGenerator_t538854556 * V_0 = NULL; TextGenerator_t538854556 * G_B5_0 = NULL; TextGenerator_t538854556 * G_B1_0 = NULL; Text_t9039225 * G_B3_0 = NULL; Text_t9039225 * G_B2_0 = NULL; TextGenerator_t538854556 * G_B4_0 = NULL; Text_t9039225 * G_B4_1 = NULL; { TextGenerator_t538854556 * L_0 = __this->get_m_TextCache_30(); TextGenerator_t538854556 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B5_0 = L_1; goto IL_0040; } } { String_t* L_2 = __this->get_m_Text_29(); NullCheck(L_2); int32_t L_3 = String_get_Length_m2979997331(L_2, /*hidden argument*/NULL); G_B2_0 = __this; if (!L_3) { G_B3_0 = __this; goto IL_0033; } } { String_t* L_4 = __this->get_m_Text_29(); NullCheck(L_4); int32_t L_5 = String_get_Length_m2979997331(L_4, /*hidden argument*/NULL); TextGenerator_t538854556 * L_6 = (TextGenerator_t538854556 *)il2cpp_codegen_object_new(TextGenerator_t538854556_il2cpp_TypeInfo_var); TextGenerator__ctor_m1563237700(L_6, L_5, /*hidden argument*/NULL); G_B4_0 = L_6; G_B4_1 = G_B2_0; goto IL_0038; } IL_0033: { TextGenerator_t538854556 * L_7 = (TextGenerator_t538854556 *)il2cpp_codegen_object_new(TextGenerator_t538854556_il2cpp_TypeInfo_var); TextGenerator__ctor_m3994909811(L_7, /*hidden argument*/NULL); G_B4_0 = L_7; G_B4_1 = G_B3_0; } IL_0038: { TextGenerator_t538854556 * L_8 = G_B4_0; V_0 = L_8; NullCheck(G_B4_1); G_B4_1->set_m_TextCache_30(L_8); TextGenerator_t538854556 * L_9 = V_0; G_B5_0 = L_9; } IL_0040: { return G_B5_0; } } // UnityEngine.TextGenerator UnityEngine.UI.Text::get_cachedTextGeneratorForLayout() extern Il2CppClass* TextGenerator_t538854556_il2cpp_TypeInfo_var; extern const uint32_t Text_get_cachedTextGeneratorForLayout_m1260141146_MetadataUsageId; extern "C" TextGenerator_t538854556 * Text_get_cachedTextGeneratorForLayout_m1260141146 (Text_t9039225 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_get_cachedTextGeneratorForLayout_m1260141146_MetadataUsageId); s_Il2CppMethodIntialized = true; } TextGenerator_t538854556 * V_0 = NULL; TextGenerator_t538854556 * G_B2_0 = NULL; TextGenerator_t538854556 * G_B1_0 = NULL; { TextGenerator_t538854556 * L_0 = __this->get_m_TextCacheForLayout_31(); TextGenerator_t538854556 * L_1 = L_0; G_B1_0 = L_1; if (L_1) { G_B2_0 = L_1; goto IL_001b; } } { TextGenerator_t538854556 * L_2 = (TextGenerator_t538854556 *)il2cpp_codegen_object_new(TextGenerator_t538854556_il2cpp_TypeInfo_var); TextGenerator__ctor_m3994909811(L_2, /*hidden argument*/NULL); TextGenerator_t538854556 * L_3 = L_2; V_0 = L_3; __this->set_m_TextCacheForLayout_31(L_3); TextGenerator_t538854556 * L_4 = V_0; G_B2_0 = L_4; } IL_001b: { return G_B2_0; } } // UnityEngine.Texture UnityEngine.UI.Text::get_mainTexture() extern "C" Texture_t2526458961 * Text_get_mainTexture_m718426116 (Text_t9039225 * __this, const MethodInfo* method) { { Font_t4241557075 * L_0 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0053; } } { Font_t4241557075 * L_2 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_2); Material_t3870600107 * L_3 = Font_get_material_m2407307367(L_2, /*hidden argument*/NULL); bool L_4 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_3, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_0053; } } { Font_t4241557075 * L_5 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_5); Material_t3870600107 * L_6 = Font_get_material_m2407307367(L_5, /*hidden argument*/NULL); NullCheck(L_6); Texture_t2526458961 * L_7 = Material_get_mainTexture_m1012267054(L_6, /*hidden argument*/NULL); bool L_8 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_7, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_8) { goto IL_0053; } } { Font_t4241557075 * L_9 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_9); Material_t3870600107 * L_10 = Font_get_material_m2407307367(L_9, /*hidden argument*/NULL); NullCheck(L_10); Texture_t2526458961 * L_11 = Material_get_mainTexture_m1012267054(L_10, /*hidden argument*/NULL); return L_11; } IL_0053: { Material_t3870600107 * L_12 = ((Graphic_t836799438 *)__this)->get_m_Material_4(); bool L_13 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_12, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_13) { goto IL_0070; } } { Material_t3870600107 * L_14 = ((Graphic_t836799438 *)__this)->get_m_Material_4(); NullCheck(L_14); Texture_t2526458961 * L_15 = Material_get_mainTexture_m1012267054(L_14, /*hidden argument*/NULL); return L_15; } IL_0070: { Texture_t2526458961 * L_16 = Graphic_get_mainTexture_m2936700123(__this, /*hidden argument*/NULL); return L_16; } } // System.Void UnityEngine.UI.Text::FontTextureChanged() extern Il2CppClass* FontUpdateTracker_t340588230_il2cpp_TypeInfo_var; extern Il2CppClass* CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var; extern const uint32_t Text_FontTextureChanged_m740758478_MetadataUsageId; extern "C" void Text_FontTextureChanged_m740758478 (Text_t9039225 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_FontTextureChanged_m740758478_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, __this, /*hidden argument*/NULL); if (L_0) { goto IL_0012; } } { IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t340588230_il2cpp_TypeInfo_var); FontUpdateTracker_UntrackText_m1952028010(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } IL_0012: { bool L_1 = __this->get_m_DisableFontTextureRebuiltCallback_33(); if (!L_1) { goto IL_001e; } } { return; } IL_001e: { TextGenerator_t538854556 * L_2 = Text_get_cachedTextGenerator_m337653083(__this, /*hidden argument*/NULL); NullCheck(L_2); TextGenerator_Invalidate_m620450028(L_2, /*hidden argument*/NULL); bool L_3 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (L_3) { goto IL_0035; } } { return; } IL_0035: { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var); bool L_4 = CanvasUpdateRegistry_IsRebuildingGraphics_m2979891973(NULL /*static, unused*/, /*hidden argument*/NULL); if (L_4) { goto IL_0049; } } { IL2CPP_RUNTIME_CLASS_INIT(CanvasUpdateRegistry_t192658922_il2cpp_TypeInfo_var); bool L_5 = CanvasUpdateRegistry_IsRebuildingLayout_m1167551012(NULL /*static, unused*/, /*hidden argument*/NULL); if (!L_5) { goto IL_0054; } } IL_0049: { VirtActionInvoker0::Invoke(34 /* System.Void UnityEngine.UI.Text::UpdateGeometry() */, __this); goto IL_005a; } IL_0054: { VirtActionInvoker0::Invoke(21 /* System.Void UnityEngine.UI.Graphic::SetAllDirty() */, __this); } IL_005a: { return; } } // UnityEngine.Font UnityEngine.UI.Text::get_font() extern "C" Font_t4241557075 * Text_get_font_m2437753165 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); Font_t4241557075 * L_1 = FontData_get_font_m3285096249(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_font(UnityEngine.Font) extern Il2CppClass* FontUpdateTracker_t340588230_il2cpp_TypeInfo_var; extern const uint32_t Text_set_font_m1978976364_MetadataUsageId; extern "C" void Text_set_font_m1978976364 (Text_t9039225 * __this, Font_t4241557075 * ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_set_font_m1978976364_MetadataUsageId); s_Il2CppMethodIntialized = true; } { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); Font_t4241557075 * L_1 = FontData_get_font_m3285096249(L_0, /*hidden argument*/NULL); Font_t4241557075 * L_2 = ___value0; bool L_3 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_1, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_0017; } } { return; } IL_0017: { IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t340588230_il2cpp_TypeInfo_var); FontUpdateTracker_UntrackText_m1952028010(NULL /*static, unused*/, __this, /*hidden argument*/NULL); FontData_t704020325 * L_4 = __this->get_m_FontData_28(); Font_t4241557075 * L_5 = ___value0; NullCheck(L_4); FontData_set_font_m504888792(L_4, L_5, /*hidden argument*/NULL); FontUpdateTracker_TrackText_m1576315537(NULL /*static, unused*/, __this, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(21 /* System.Void UnityEngine.UI.Graphic::SetAllDirty() */, __this); return; } } // System.String UnityEngine.UI.Text::get_text() extern "C" String_t* Text_get_text_m3833038297 (Text_t9039225 * __this, const MethodInfo* method) { { String_t* L_0 = __this->get_m_Text_29(); return L_0; } } // System.Void UnityEngine.UI.Text::set_text(System.String) extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern const uint32_t Text_set_text_m302679026_MetadataUsageId; extern "C" void Text_set_text_m302679026 (Text_t9039225 * __this, String_t* ___value0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_set_text_m302679026_MetadataUsageId); s_Il2CppMethodIntialized = true; } { String_t* L_0 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_1 = String_IsNullOrEmpty_m1256468773(NULL /*static, unused*/, L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_0032; } } { String_t* L_2 = __this->get_m_Text_29(); IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_3 = String_IsNullOrEmpty_m1256468773(NULL /*static, unused*/, L_2, /*hidden argument*/NULL); if (!L_3) { goto IL_001c; } } { return; } IL_001c: { IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); String_t* L_4 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2(); __this->set_m_Text_29(L_4); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); goto IL_0056; } IL_0032: { String_t* L_5 = __this->get_m_Text_29(); String_t* L_6 = ___value0; IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var); bool L_7 = String_op_Inequality_m2125462205(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL); if (!L_7) { goto IL_0056; } } { String_t* L_8 = ___value0; __this->set_m_Text_29(L_8); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); } IL_0056: { return; } } // System.Boolean UnityEngine.UI.Text::get_supportRichText() extern "C" bool Text_get_supportRichText_m226316153 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_richText_m3819861494(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_supportRichText(System.Boolean) extern "C" void Text_set_supportRichText_m1299469806 (Text_t9039225 * __this, bool ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_richText_m3819861494(L_0, /*hidden argument*/NULL); bool L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); bool L_4 = ___value0; NullCheck(L_3); FontData_set_richText_m2399891183(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // System.Boolean UnityEngine.UI.Text::get_resizeTextForBestFit() extern "C" bool Text_get_resizeTextForBestFit_m3751631302 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_bestFit_m4181968066(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_resizeTextForBestFit(System.Boolean) extern "C" void Text_set_resizeTextForBestFit_m241625791 (Text_t9039225 * __this, bool ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_bestFit_m4181968066(L_0, /*hidden argument*/NULL); bool L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); bool L_4 = ___value0; NullCheck(L_3); FontData_set_bestFit_m408210551(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // System.Int32 UnityEngine.UI.Text::get_resizeTextMinSize() extern "C" int32_t Text_get_resizeTextMinSize_m557265325 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_minSize_m3681174594(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_resizeTextMinSize(System.Int32) extern "C" void Text_set_resizeTextMinSize_m3506017186 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_minSize_m3681174594(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_minSize_m3139125175(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // System.Int32 UnityEngine.UI.Text::get_resizeTextMaxSize() extern "C" int32_t Text_get_resizeTextMaxSize_m4079754047 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_maxSize_m2908696020(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_resizeTextMaxSize(System.Int32) extern "C" void Text_set_resizeTextMaxSize_m2626859572 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_maxSize_m2908696020(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_maxSize_m2259967561(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // UnityEngine.TextAnchor UnityEngine.UI.Text::get_alignment() extern "C" int32_t Text_get_alignment_m2624482868 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_alignment_m3864278344(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_alignment(UnityEngine.TextAnchor) extern "C" void Text_set_alignment_m4246723817 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_alignment_m3864278344(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_alignment_m4148907005(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // System.Boolean UnityEngine.UI.Text::get_alignByGeometry() extern "C" bool Text_get_alignByGeometry_m3404407727 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_alignByGeometry_m1074013123(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_alignByGeometry(System.Boolean) extern "C" void Text_set_alignByGeometry_m812094372 (Text_t9039225 * __this, bool ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); bool L_1 = FontData_get_alignByGeometry_m1074013123(L_0, /*hidden argument*/NULL); bool L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); bool L_4 = ___value0; NullCheck(L_3); FontData_set_alignByGeometry_m1124841400(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); return; } } // System.Int32 UnityEngine.UI.Text::get_fontSize() extern "C" int32_t Text_get_fontSize_m2862645687 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontSize_m146058531(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_fontSize(System.Int32) extern "C" void Text_set_fontSize_m2013207524 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontSize_m146058531(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_fontSize_m539119952(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // UnityEngine.HorizontalWrapMode UnityEngine.UI.Text::get_horizontalOverflow() extern "C" int32_t Text_get_horizontalOverflow_m428751238 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_horizontalOverflow_m1371187570(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_horizontalOverflow(UnityEngine.HorizontalWrapMode) extern "C" void Text_set_horizontalOverflow_m1764021409 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_horizontalOverflow_m1371187570(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_horizontalOverflow_m1187704845(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // UnityEngine.VerticalWrapMode UnityEngine.UI.Text::get_verticalOverflow() extern "C" int32_t Text_get_verticalOverflow_m4214690218 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_verticalOverflow_m1971090326(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_verticalOverflow(UnityEngine.VerticalWrapMode) extern "C" void Text_set_verticalOverflow_m1954003489 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_verticalOverflow_m1971090326(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_verticalOverflow_m1743547277(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // System.Single UnityEngine.UI.Text::get_lineSpacing() extern "C" float Text_get_lineSpacing_m2968404366 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); float L_1 = FontData_get_lineSpacing_m3558513826(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_lineSpacing(System.Single) extern "C" void Text_set_lineSpacing_m3440093 (Text_t9039225 * __this, float ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); float L_1 = FontData_get_lineSpacing_m3558513826(L_0, /*hidden argument*/NULL); float L_2 = ___value0; if ((!(((float)L_1) == ((float)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); float L_4 = ___value0; NullCheck(L_3); FontData_set_lineSpacing_m3483835721(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // UnityEngine.FontStyle UnityEngine.UI.Text::get_fontStyle() extern "C" int32_t Text_get_fontStyle_m1258883933 (Text_t9039225 * __this, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontStyle_m2936188273(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.Text::set_fontStyle(UnityEngine.FontStyle) extern "C" void Text_set_fontStyle_m2882242342 (Text_t9039225 * __this, int32_t ___value0, const MethodInfo* method) { { FontData_t704020325 * L_0 = __this->get_m_FontData_28(); NullCheck(L_0); int32_t L_1 = FontData_get_fontStyle_m2936188273(L_0, /*hidden argument*/NULL); int32_t L_2 = ___value0; if ((!(((uint32_t)L_1) == ((uint32_t)L_2)))) { goto IL_0012; } } { return; } IL_0012: { FontData_t704020325 * L_3 = __this->get_m_FontData_28(); int32_t L_4 = ___value0; NullCheck(L_3); FontData_set_fontStyle_m3987465618(L_3, L_4, /*hidden argument*/NULL); VirtActionInvoker0::Invoke(23 /* System.Void UnityEngine.UI.Graphic::SetVerticesDirty() */, __this); VirtActionInvoker0::Invoke(22 /* System.Void UnityEngine.UI.Graphic::SetLayoutDirty() */, __this); return; } } // System.Single UnityEngine.UI.Text::get_pixelsPerUnit() extern "C" float Text_get_pixelsPerUnit_m4148756467 (Text_t9039225 * __this, const MethodInfo* method) { Canvas_t2727140764 * V_0 = NULL; { Canvas_t2727140764 * L_0 = Graphic_get_canvas_m4291384250(__this, /*hidden argument*/NULL); V_0 = L_0; Canvas_t2727140764 * L_1 = V_0; bool L_2 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_1, /*hidden argument*/NULL); if (L_2) { goto IL_0018; } } { return (1.0f); } IL_0018: { Font_t4241557075 * L_3 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); bool L_4 = Object_op_Implicit_m2106766291(NULL /*static, unused*/, L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_0038; } } { Font_t4241557075 * L_5 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_5); bool L_6 = Font_get_dynamic_m3880144684(L_5, /*hidden argument*/NULL); if (!L_6) { goto IL_003f; } } IL_0038: { Canvas_t2727140764 * L_7 = V_0; NullCheck(L_7); float L_8 = Canvas_get_scaleFactor_m1187077271(L_7, /*hidden argument*/NULL); return L_8; } IL_003f: { FontData_t704020325 * L_9 = __this->get_m_FontData_28(); NullCheck(L_9); int32_t L_10 = FontData_get_fontSize_m146058531(L_9, /*hidden argument*/NULL); if ((((int32_t)L_10) <= ((int32_t)0))) { goto IL_0061; } } { Font_t4241557075 * L_11 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_11); int32_t L_12 = Font_get_fontSize_m3025810271(L_11, /*hidden argument*/NULL); if ((((int32_t)L_12) > ((int32_t)0))) { goto IL_0067; } } IL_0061: { return (1.0f); } IL_0067: { Font_t4241557075 * L_13 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_13); int32_t L_14 = Font_get_fontSize_m3025810271(L_13, /*hidden argument*/NULL); FontData_t704020325 * L_15 = __this->get_m_FontData_28(); NullCheck(L_15); int32_t L_16 = FontData_get_fontSize_m146058531(L_15, /*hidden argument*/NULL); return ((float)((float)(((float)((float)L_14)))/(float)(((float)((float)L_16))))); } } // System.Void UnityEngine.UI.Text::OnEnable() extern Il2CppClass* FontUpdateTracker_t340588230_il2cpp_TypeInfo_var; extern const uint32_t Text_OnEnable_m3618900104_MetadataUsageId; extern "C" void Text_OnEnable_m3618900104 (Text_t9039225 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_OnEnable_m3618900104_MetadataUsageId); s_Il2CppMethodIntialized = true; } { MaskableGraphic_OnEnable_m487460141(__this, /*hidden argument*/NULL); TextGenerator_t538854556 * L_0 = Text_get_cachedTextGenerator_m337653083(__this, /*hidden argument*/NULL); NullCheck(L_0); TextGenerator_Invalidate_m620450028(L_0, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t340588230_il2cpp_TypeInfo_var); FontUpdateTracker_TrackText_m1576315537(NULL /*static, unused*/, __this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::OnDisable() extern Il2CppClass* FontUpdateTracker_t340588230_il2cpp_TypeInfo_var; extern const uint32_t Text_OnDisable_m957690789_MetadataUsageId; extern "C" void Text_OnDisable_m957690789 (Text_t9039225 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_OnDisable_m957690789_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(FontUpdateTracker_t340588230_il2cpp_TypeInfo_var); FontUpdateTracker_UntrackText_m1952028010(NULL /*static, unused*/, __this, /*hidden argument*/NULL); MaskableGraphic_OnDisable_m2667299744(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Text::UpdateGeometry() extern "C" void Text_UpdateGeometry_m1493208737 (Text_t9039225 * __this, const MethodInfo* method) { { Font_t4241557075 * L_0 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0017; } } { Graphic_UpdateGeometry_m2127951660(__this, /*hidden argument*/NULL); } IL_0017: { return; } } // UnityEngine.TextGenerationSettings UnityEngine.UI.Text::GetGenerationSettings(UnityEngine.Vector2) extern Il2CppClass* TextGenerationSettings_t1923005356_il2cpp_TypeInfo_var; extern const uint32_t Text_GetGenerationSettings_m554596117_MetadataUsageId; extern "C" TextGenerationSettings_t1923005356 Text_GetGenerationSettings_m554596117 (Text_t9039225 * __this, Vector2_t4282066565 ___extents0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_GetGenerationSettings_m554596117_MetadataUsageId); s_Il2CppMethodIntialized = true; } TextGenerationSettings_t1923005356 V_0; memset(&V_0, 0, sizeof(V_0)); { Initobj (TextGenerationSettings_t1923005356_il2cpp_TypeInfo_var, (&V_0)); Vector2_t4282066565 L_0 = ___extents0; (&V_0)->set_generationExtents_15(L_0); Font_t4241557075 * L_1 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0067; } } { Font_t4241557075 * L_3 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); NullCheck(L_3); bool L_4 = Font_get_dynamic_m3880144684(L_3, /*hidden argument*/NULL); if (!L_4) { goto IL_0067; } } { FontData_t704020325 * L_5 = __this->get_m_FontData_28(); NullCheck(L_5); int32_t L_6 = FontData_get_fontSize_m146058531(L_5, /*hidden argument*/NULL); (&V_0)->set_fontSize_2(L_6); FontData_t704020325 * L_7 = __this->get_m_FontData_28(); NullCheck(L_7); int32_t L_8 = FontData_get_minSize_m3681174594(L_7, /*hidden argument*/NULL); (&V_0)->set_resizeTextMinSize_10(L_8); FontData_t704020325 * L_9 = __this->get_m_FontData_28(); NullCheck(L_9); int32_t L_10 = FontData_get_maxSize_m2908696020(L_9, /*hidden argument*/NULL); (&V_0)->set_resizeTextMaxSize_11(L_10); } IL_0067: { FontData_t704020325 * L_11 = __this->get_m_FontData_28(); NullCheck(L_11); int32_t L_12 = FontData_get_alignment_m3864278344(L_11, /*hidden argument*/NULL); (&V_0)->set_textAnchor_7(L_12); FontData_t704020325 * L_13 = __this->get_m_FontData_28(); NullCheck(L_13); bool L_14 = FontData_get_alignByGeometry_m1074013123(L_13, /*hidden argument*/NULL); (&V_0)->set_alignByGeometry_8(L_14); float L_15 = Text_get_pixelsPerUnit_m4148756467(__this, /*hidden argument*/NULL); (&V_0)->set_scaleFactor_5(L_15); Color_t4194546905 L_16 = Graphic_get_color_m2048831972(__this, /*hidden argument*/NULL); (&V_0)->set_color_1(L_16); Font_t4241557075 * L_17 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); (&V_0)->set_font_0(L_17); RectTransform_t972643934 * L_18 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); NullCheck(L_18); Vector2_t4282066565 L_19 = RectTransform_get_pivot_m3785570595(L_18, /*hidden argument*/NULL); (&V_0)->set_pivot_16(L_19); FontData_t704020325 * L_20 = __this->get_m_FontData_28(); NullCheck(L_20); bool L_21 = FontData_get_richText_m3819861494(L_20, /*hidden argument*/NULL); (&V_0)->set_richText_4(L_21); FontData_t704020325 * L_22 = __this->get_m_FontData_28(); NullCheck(L_22); float L_23 = FontData_get_lineSpacing_m3558513826(L_22, /*hidden argument*/NULL); (&V_0)->set_lineSpacing_3(L_23); FontData_t704020325 * L_24 = __this->get_m_FontData_28(); NullCheck(L_24); int32_t L_25 = FontData_get_fontStyle_m2936188273(L_24, /*hidden argument*/NULL); (&V_0)->set_fontStyle_6(L_25); FontData_t704020325 * L_26 = __this->get_m_FontData_28(); NullCheck(L_26); bool L_27 = FontData_get_bestFit_m4181968066(L_26, /*hidden argument*/NULL); (&V_0)->set_resizeTextForBestFit_9(L_27); (&V_0)->set_updateBounds_12((bool)0); FontData_t704020325 * L_28 = __this->get_m_FontData_28(); NullCheck(L_28); int32_t L_29 = FontData_get_horizontalOverflow_m1371187570(L_28, /*hidden argument*/NULL); (&V_0)->set_horizontalOverflow_14(L_29); FontData_t704020325 * L_30 = __this->get_m_FontData_28(); NullCheck(L_30); int32_t L_31 = FontData_get_verticalOverflow_m1971090326(L_30, /*hidden argument*/NULL); (&V_0)->set_verticalOverflow_13(L_31); TextGenerationSettings_t1923005356 L_32 = V_0; return L_32; } } // UnityEngine.Vector2 UnityEngine.UI.Text::GetTextAnchorPivot(UnityEngine.TextAnchor) extern "C" Vector2_t4282066565 Text_GetTextAnchorPivot_m7192668 (Il2CppObject * __this /* static, unused */, int32_t ___anchor0, const MethodInfo* method) { int32_t V_0 = 0; { int32_t L_0 = ___anchor0; V_0 = L_0; int32_t L_1 = V_0; if (L_1 == 0) { goto IL_0091; } if (L_1 == 1) { goto IL_00a1; } if (L_1 == 2) { goto IL_00b1; } if (L_1 == 3) { goto IL_0061; } if (L_1 == 4) { goto IL_0071; } if (L_1 == 5) { goto IL_0081; } if (L_1 == 6) { goto IL_0031; } if (L_1 == 7) { goto IL_0041; } if (L_1 == 8) { goto IL_0051; } } { goto IL_00c1; } IL_0031: { Vector2_t4282066565 L_2; memset(&L_2, 0, sizeof(L_2)); Vector2__ctor_m1517109030(&L_2, (0.0f), (0.0f), /*hidden argument*/NULL); return L_2; } IL_0041: { Vector2_t4282066565 L_3; memset(&L_3, 0, sizeof(L_3)); Vector2__ctor_m1517109030(&L_3, (0.5f), (0.0f), /*hidden argument*/NULL); return L_3; } IL_0051: { Vector2_t4282066565 L_4; memset(&L_4, 0, sizeof(L_4)); Vector2__ctor_m1517109030(&L_4, (1.0f), (0.0f), /*hidden argument*/NULL); return L_4; } IL_0061: { Vector2_t4282066565 L_5; memset(&L_5, 0, sizeof(L_5)); Vector2__ctor_m1517109030(&L_5, (0.0f), (0.5f), /*hidden argument*/NULL); return L_5; } IL_0071: { Vector2_t4282066565 L_6; memset(&L_6, 0, sizeof(L_6)); Vector2__ctor_m1517109030(&L_6, (0.5f), (0.5f), /*hidden argument*/NULL); return L_6; } IL_0081: { Vector2_t4282066565 L_7; memset(&L_7, 0, sizeof(L_7)); Vector2__ctor_m1517109030(&L_7, (1.0f), (0.5f), /*hidden argument*/NULL); return L_7; } IL_0091: { Vector2_t4282066565 L_8; memset(&L_8, 0, sizeof(L_8)); Vector2__ctor_m1517109030(&L_8, (0.0f), (1.0f), /*hidden argument*/NULL); return L_8; } IL_00a1: { Vector2_t4282066565 L_9; memset(&L_9, 0, sizeof(L_9)); Vector2__ctor_m1517109030(&L_9, (0.5f), (1.0f), /*hidden argument*/NULL); return L_9; } IL_00b1: { Vector2_t4282066565 L_10; memset(&L_10, 0, sizeof(L_10)); Vector2__ctor_m1517109030(&L_10, (1.0f), (1.0f), /*hidden argument*/NULL); return L_10; } IL_00c1: { Vector2_t4282066565 L_11 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); return L_11; } } // System.Void UnityEngine.UI.Text::OnPopulateMesh(UnityEngine.UI.VertexHelper) extern Il2CppClass* Text_t9039225_il2cpp_TypeInfo_var; extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern Il2CppClass* ICollection_1_t843687903_il2cpp_TypeInfo_var; extern Il2CppClass* IList_1_t2643745119_il2cpp_TypeInfo_var; extern const uint32_t Text_OnPopulateMesh_m869628001_MetadataUsageId; extern "C" void Text_OnPopulateMesh_m869628001 (Text_t9039225 * __this, VertexHelper_t3377436606 * ___toFill0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Text_OnPopulateMesh_m869628001_MetadataUsageId); s_Il2CppMethodIntialized = true; } Vector2_t4282066565 V_0; memset(&V_0, 0, sizeof(V_0)); TextGenerationSettings_t1923005356 V_1; memset(&V_1, 0, sizeof(V_1)); Rect_t4241904616 V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_t4282066565 V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_t4282066565 V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_t4282066565 V_5; memset(&V_5, 0, sizeof(V_5)); Il2CppObject* V_6 = NULL; float V_7 = 0.0f; int32_t V_8 = 0; int32_t V_9 = 0; int32_t V_10 = 0; int32_t V_11 = 0; int32_t V_12 = 0; Rect_t4241904616 V_13; memset(&V_13, 0, sizeof(V_13)); { Font_t4241557075 * L_0 = Text_get_font_m2437753165(__this, /*hidden argument*/NULL); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { return; } IL_0012: { __this->set_m_DisableFontTextureRebuiltCallback_33((bool)1); RectTransform_t972643934 * L_2 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); NullCheck(L_2); Rect_t4241904616 L_3 = RectTransform_get_rect_m1566017036(L_2, /*hidden argument*/NULL); V_13 = L_3; Vector2_t4282066565 L_4 = Rect_get_size_m136480416((&V_13), /*hidden argument*/NULL); V_0 = L_4; Vector2_t4282066565 L_5 = V_0; TextGenerationSettings_t1923005356 L_6 = Text_GetGenerationSettings_m554596117(__this, L_5, /*hidden argument*/NULL); V_1 = L_6; TextGenerator_t538854556 * L_7 = Text_get_cachedTextGenerator_m337653083(__this, /*hidden argument*/NULL); String_t* L_8 = VirtFuncInvoker0< String_t* >::Invoke(64 /* System.String UnityEngine.UI.Text::get_text() */, __this); TextGenerationSettings_t1923005356 L_9 = V_1; NullCheck(L_7); TextGenerator_Populate_m953583418(L_7, L_8, L_9, /*hidden argument*/NULL); RectTransform_t972643934 * L_10 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); NullCheck(L_10); Rect_t4241904616 L_11 = RectTransform_get_rect_m1566017036(L_10, /*hidden argument*/NULL); V_2 = L_11; FontData_t704020325 * L_12 = __this->get_m_FontData_28(); NullCheck(L_12); int32_t L_13 = FontData_get_alignment_m3864278344(L_12, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Text_t9039225_il2cpp_TypeInfo_var); Vector2_t4282066565 L_14 = Text_GetTextAnchorPivot_m7192668(NULL /*static, unused*/, L_13, /*hidden argument*/NULL); V_3 = L_14; Vector2_t4282066565 L_15 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); V_4 = L_15; float L_16 = Rect_get_xMin_m371109962((&V_2), /*hidden argument*/NULL); float L_17 = Rect_get_xMax_m370881244((&V_2), /*hidden argument*/NULL); float L_18 = (&V_3)->get_x_1(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); float L_19 = Mathf_Lerp_m3257777633(NULL /*static, unused*/, L_16, L_17, L_18, /*hidden argument*/NULL); (&V_4)->set_x_1(L_19); float L_20 = Rect_get_yMin_m399739113((&V_2), /*hidden argument*/NULL); float L_21 = Rect_get_yMax_m399510395((&V_2), /*hidden argument*/NULL); float L_22 = (&V_3)->get_y_2(); float L_23 = Mathf_Lerp_m3257777633(NULL /*static, unused*/, L_20, L_21, L_22, /*hidden argument*/NULL); (&V_4)->set_y_2(L_23); Vector2_t4282066565 L_24 = V_4; Vector2_t4282066565 L_25 = Graphic_PixelAdjustPoint_m440199187(__this, L_24, /*hidden argument*/NULL); Vector2_t4282066565 L_26 = V_4; Vector2_t4282066565 L_27 = Vector2_op_Subtraction_m2097149401(NULL /*static, unused*/, L_25, L_26, /*hidden argument*/NULL); V_5 = L_27; TextGenerator_t538854556 * L_28 = Text_get_cachedTextGenerator_m337653083(__this, /*hidden argument*/NULL); NullCheck(L_28); Il2CppObject* L_29 = TextGenerator_get_verts_m1179011229(L_28, /*hidden argument*/NULL); V_6 = L_29; float L_30 = Text_get_pixelsPerUnit_m4148756467(__this, /*hidden argument*/NULL); V_7 = ((float)((float)(1.0f)/(float)L_30)); Il2CppObject* L_31 = V_6; NullCheck(L_31); int32_t L_32 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<UnityEngine.UIVertex>::get_Count() */, ICollection_1_t843687903_il2cpp_TypeInfo_var, L_31); V_8 = ((int32_t)((int32_t)L_32-(int32_t)4)); VertexHelper_t3377436606 * L_33 = ___toFill0; NullCheck(L_33); VertexHelper_Clear_m412394180(L_33, /*hidden argument*/NULL); Vector2_t4282066565 L_34 = V_5; Vector2_t4282066565 L_35 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); bool L_36 = Vector2_op_Inequality_m1638984867(NULL /*static, unused*/, L_34, L_35, /*hidden argument*/NULL); if (!L_36) { goto IL_01b7; } } { V_9 = 0; goto IL_01a9; } IL_0105: { int32_t L_37 = V_9; V_10 = ((int32_t)((int32_t)L_37&(int32_t)3)); UIVertexU5BU5D_t1796391381* L_38 = __this->get_m_TempVerts_34(); int32_t L_39 = V_10; NullCheck(L_38); IL2CPP_ARRAY_BOUNDS_CHECK(L_38, L_39); Il2CppObject* L_40 = V_6; int32_t L_41 = V_9; NullCheck(L_40); UIVertex_t4244065212 L_42 = InterfaceFuncInvoker1< UIVertex_t4244065212 , int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<UnityEngine.UIVertex>::get_Item(System.Int32) */, IList_1_t2643745119_il2cpp_TypeInfo_var, L_40, L_41); (*(UIVertex_t4244065212 *)((L_38)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_39)))) = L_42; UIVertexU5BU5D_t1796391381* L_43 = __this->get_m_TempVerts_34(); int32_t L_44 = V_10; NullCheck(L_43); IL2CPP_ARRAY_BOUNDS_CHECK(L_43, L_44); UIVertex_t4244065212 * L_45 = ((L_43)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_44))); Vector3_t4282066566 L_46 = L_45->get_position_0(); float L_47 = V_7; Vector3_t4282066566 L_48 = Vector3_op_Multiply_m973638459(NULL /*static, unused*/, L_46, L_47, /*hidden argument*/NULL); L_45->set_position_0(L_48); UIVertexU5BU5D_t1796391381* L_49 = __this->get_m_TempVerts_34(); int32_t L_50 = V_10; NullCheck(L_49); IL2CPP_ARRAY_BOUNDS_CHECK(L_49, L_50); Vector3_t4282066566 * L_51 = ((L_49)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_50)))->get_address_of_position_0(); Vector3_t4282066566 * L_52 = L_51; float L_53 = L_52->get_x_1(); float L_54 = (&V_5)->get_x_1(); L_52->set_x_1(((float)((float)L_53+(float)L_54))); UIVertexU5BU5D_t1796391381* L_55 = __this->get_m_TempVerts_34(); int32_t L_56 = V_10; NullCheck(L_55); IL2CPP_ARRAY_BOUNDS_CHECK(L_55, L_56); Vector3_t4282066566 * L_57 = ((L_55)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_56)))->get_address_of_position_0(); Vector3_t4282066566 * L_58 = L_57; float L_59 = L_58->get_y_2(); float L_60 = (&V_5)->get_y_2(); L_58->set_y_2(((float)((float)L_59+(float)L_60))); int32_t L_61 = V_10; if ((!(((uint32_t)L_61) == ((uint32_t)3)))) { goto IL_01a3; } } { VertexHelper_t3377436606 * L_62 = ___toFill0; UIVertexU5BU5D_t1796391381* L_63 = __this->get_m_TempVerts_34(); NullCheck(L_62); VertexHelper_AddUIVertexQuad_m765809318(L_62, L_63, /*hidden argument*/NULL); } IL_01a3: { int32_t L_64 = V_9; V_9 = ((int32_t)((int32_t)L_64+(int32_t)1)); } IL_01a9: { int32_t L_65 = V_9; int32_t L_66 = V_8; if ((((int32_t)L_65) < ((int32_t)L_66))) { goto IL_0105; } } { goto IL_0222; } IL_01b7: { V_11 = 0; goto IL_0219; } IL_01bf: { int32_t L_67 = V_11; V_12 = ((int32_t)((int32_t)L_67&(int32_t)3)); UIVertexU5BU5D_t1796391381* L_68 = __this->get_m_TempVerts_34(); int32_t L_69 = V_12; NullCheck(L_68); IL2CPP_ARRAY_BOUNDS_CHECK(L_68, L_69); Il2CppObject* L_70 = V_6; int32_t L_71 = V_11; NullCheck(L_70); UIVertex_t4244065212 L_72 = InterfaceFuncInvoker1< UIVertex_t4244065212 , int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<UnityEngine.UIVertex>::get_Item(System.Int32) */, IList_1_t2643745119_il2cpp_TypeInfo_var, L_70, L_71); (*(UIVertex_t4244065212 *)((L_68)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_69)))) = L_72; UIVertexU5BU5D_t1796391381* L_73 = __this->get_m_TempVerts_34(); int32_t L_74 = V_12; NullCheck(L_73); IL2CPP_ARRAY_BOUNDS_CHECK(L_73, L_74); UIVertex_t4244065212 * L_75 = ((L_73)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_74))); Vector3_t4282066566 L_76 = L_75->get_position_0(); float L_77 = V_7; Vector3_t4282066566 L_78 = Vector3_op_Multiply_m973638459(NULL /*static, unused*/, L_76, L_77, /*hidden argument*/NULL); L_75->set_position_0(L_78); int32_t L_79 = V_12; if ((!(((uint32_t)L_79) == ((uint32_t)3)))) { goto IL_0213; } } { VertexHelper_t3377436606 * L_80 = ___toFill0; UIVertexU5BU5D_t1796391381* L_81 = __this->get_m_TempVerts_34(); NullCheck(L_80); VertexHelper_AddUIVertexQuad_m765809318(L_80, L_81, /*hidden argument*/NULL); } IL_0213: { int32_t L_82 = V_11; V_11 = ((int32_t)((int32_t)L_82+(int32_t)1)); } IL_0219: { int32_t L_83 = V_11; int32_t L_84 = V_8; if ((((int32_t)L_83) < ((int32_t)L_84))) { goto IL_01bf; } } IL_0222: { __this->set_m_DisableFontTextureRebuiltCallback_33((bool)0); return; } } // System.Void UnityEngine.UI.Text::CalculateLayoutInputHorizontal() extern "C" void Text_CalculateLayoutInputHorizontal_m2550743748 (Text_t9039225 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Text::CalculateLayoutInputVertical() extern "C" void Text_CalculateLayoutInputVertical_m4013862230 (Text_t9039225 * __this, const MethodInfo* method) { { return; } } // System.Single UnityEngine.UI.Text::get_minWidth() extern "C" float Text_get_minWidth_m1415472311 (Text_t9039225 * __this, const MethodInfo* method) { { return (0.0f); } } // System.Single UnityEngine.UI.Text::get_preferredWidth() extern "C" float Text_get_preferredWidth_m2672417320 (Text_t9039225 * __this, const MethodInfo* method) { TextGenerationSettings_t1923005356 V_0; memset(&V_0, 0, sizeof(V_0)); { Vector2_t4282066565 L_0 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); TextGenerationSettings_t1923005356 L_1 = Text_GetGenerationSettings_m554596117(__this, L_0, /*hidden argument*/NULL); V_0 = L_1; TextGenerator_t538854556 * L_2 = Text_get_cachedTextGeneratorForLayout_m1260141146(__this, /*hidden argument*/NULL); String_t* L_3 = __this->get_m_Text_29(); TextGenerationSettings_t1923005356 L_4 = V_0; NullCheck(L_2); float L_5 = TextGenerator_GetPreferredWidth_m1618543389(L_2, L_3, L_4, /*hidden argument*/NULL); float L_6 = Text_get_pixelsPerUnit_m4148756467(__this, /*hidden argument*/NULL); return ((float)((float)L_5/(float)L_6)); } } // System.Single UnityEngine.UI.Text::get_flexibleWidth() extern "C" float Text_get_flexibleWidth_m3322158618 (Text_t9039225 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Single UnityEngine.UI.Text::get_minHeight() extern "C" float Text_get_minHeight_m1433783032 (Text_t9039225 * __this, const MethodInfo* method) { { return (0.0f); } } // System.Single UnityEngine.UI.Text::get_preferredHeight() extern "C" float Text_get_preferredHeight_m1744372647 (Text_t9039225 * __this, const MethodInfo* method) { TextGenerationSettings_t1923005356 V_0; memset(&V_0, 0, sizeof(V_0)); Rect_t4241904616 V_1; memset(&V_1, 0, sizeof(V_1)); Vector2_t4282066565 V_2; memset(&V_2, 0, sizeof(V_2)); { RectTransform_t972643934 * L_0 = Graphic_get_rectTransform_m4017371950(__this, /*hidden argument*/NULL); NullCheck(L_0); Rect_t4241904616 L_1 = RectTransform_get_rect_m1566017036(L_0, /*hidden argument*/NULL); V_1 = L_1; Vector2_t4282066565 L_2 = Rect_get_size_m136480416((&V_1), /*hidden argument*/NULL); V_2 = L_2; float L_3 = (&V_2)->get_x_1(); Vector2_t4282066565 L_4; memset(&L_4, 0, sizeof(L_4)); Vector2__ctor_m1517109030(&L_4, L_3, (0.0f), /*hidden argument*/NULL); TextGenerationSettings_t1923005356 L_5 = Text_GetGenerationSettings_m554596117(__this, L_4, /*hidden argument*/NULL); V_0 = L_5; TextGenerator_t538854556 * L_6 = Text_get_cachedTextGeneratorForLayout_m1260141146(__this, /*hidden argument*/NULL); String_t* L_7 = __this->get_m_Text_29(); TextGenerationSettings_t1923005356 L_8 = V_0; NullCheck(L_6); float L_9 = TextGenerator_GetPreferredHeight_m1770778044(L_6, L_7, L_8, /*hidden argument*/NULL); float L_10 = Text_get_pixelsPerUnit_m4148756467(__this, /*hidden argument*/NULL); return ((float)((float)L_9/(float)L_10)); } } // System.Single UnityEngine.UI.Text::get_flexibleHeight() extern "C" float Text_get_flexibleHeight_m411516405 (Text_t9039225 * __this, const MethodInfo* method) { { return (-1.0f); } } // System.Int32 UnityEngine.UI.Text::get_layoutPriority() extern "C" int32_t Text_get_layoutPriority_m4042521525 (Text_t9039225 * __this, const MethodInfo* method) { { return 0; } } // System.Void UnityEngine.UI.Toggle::.ctor() extern Il2CppClass* ToggleEvent_t2331340366_il2cpp_TypeInfo_var; extern Il2CppClass* Selectable_t1885181538_il2cpp_TypeInfo_var; extern const uint32_t Toggle__ctor_m4173251063_MetadataUsageId; extern "C" void Toggle__ctor_m4173251063 (Toggle_t110812896 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Toggle__ctor_m4173251063_MetadataUsageId); s_Il2CppMethodIntialized = true; } { __this->set_toggleTransition_16(1); ToggleEvent_t2331340366 * L_0 = (ToggleEvent_t2331340366 *)il2cpp_codegen_object_new(ToggleEvent_t2331340366_il2cpp_TypeInfo_var); ToggleEvent__ctor_m110328288(L_0, /*hidden argument*/NULL); __this->set_onValueChanged_19(L_0); IL2CPP_RUNTIME_CLASS_INIT(Selectable_t1885181538_il2cpp_TypeInfo_var); Selectable__ctor_m1133588277(__this, /*hidden argument*/NULL); return; } } // UnityEngine.UI.ToggleGroup UnityEngine.UI.Toggle::get_group() extern "C" ToggleGroup_t1990156785 * Toggle_get_group_m514230010 (Toggle_t110812896 * __this, const MethodInfo* method) { { ToggleGroup_t1990156785 * L_0 = __this->get_m_Group_18(); return L_0; } } // System.Void UnityEngine.UI.Toggle::set_group(UnityEngine.UI.ToggleGroup) extern "C" void Toggle_set_group_m4294827183 (Toggle_t110812896 * __this, ToggleGroup_t1990156785 * ___value0, const MethodInfo* method) { { ToggleGroup_t1990156785 * L_0 = ___value0; __this->set_m_Group_18(L_0); ToggleGroup_t1990156785 * L_1 = __this->get_m_Group_18(); Toggle_SetToggleGroup_m4196871663(__this, L_1, (bool)1, /*hidden argument*/NULL); Toggle_PlayEffect_m2897367561(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Rebuild(UnityEngine.UI.CanvasUpdate) extern "C" void Toggle_Rebuild_m1120034174 (Toggle_t110812896 * __this, int32_t ___executing0, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Toggle::LayoutComplete() extern "C" void Toggle_LayoutComplete_m3030592304 (Toggle_t110812896 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Toggle::GraphicUpdateComplete() extern "C" void Toggle_GraphicUpdateComplete_m1104468671 (Toggle_t110812896 * __this, const MethodInfo* method) { { return; } } // System.Void UnityEngine.UI.Toggle::OnEnable() extern "C" void Toggle_OnEnable_m975679023 (Toggle_t110812896 * __this, const MethodInfo* method) { { Selectable_OnEnable_m1472090161(__this, /*hidden argument*/NULL); ToggleGroup_t1990156785 * L_0 = __this->get_m_Group_18(); Toggle_SetToggleGroup_m4196871663(__this, L_0, (bool)0, /*hidden argument*/NULL); Toggle_PlayEffect_m2897367561(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::OnDisable() extern "C" void Toggle_OnDisable_m622215902 (Toggle_t110812896 * __this, const MethodInfo* method) { { Toggle_SetToggleGroup_m4196871663(__this, (ToggleGroup_t1990156785 *)NULL, (bool)0, /*hidden argument*/NULL); Selectable_OnDisable_m3126059292(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::OnDidApplyAnimationProperties() extern Il2CppClass* Mathf_t4203372500_il2cpp_TypeInfo_var; extern const uint32_t Toggle_OnDidApplyAnimationProperties_m3936866462_MetadataUsageId; extern "C" void Toggle_OnDidApplyAnimationProperties_m3936866462 (Toggle_t110812896 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Toggle_OnDidApplyAnimationProperties_m3936866462_MetadataUsageId); s_Il2CppMethodIntialized = true; } bool V_0 = false; Color_t4194546905 V_1; memset(&V_1, 0, sizeof(V_1)); { Graphic_t836799438 * L_0 = __this->get_graphic_17(); bool L_1 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0054; } } { Graphic_t836799438 * L_2 = __this->get_graphic_17(); NullCheck(L_2); CanvasRenderer_t3950887807 * L_3 = Graphic_get_canvasRenderer_m184553434(L_2, /*hidden argument*/NULL); NullCheck(L_3); Color_t4194546905 L_4 = CanvasRenderer_GetColor_m3075393702(L_3, /*hidden argument*/NULL); V_1 = L_4; float L_5 = (&V_1)->get_a_3(); IL2CPP_RUNTIME_CLASS_INIT(Mathf_t4203372500_il2cpp_TypeInfo_var); bool L_6 = Mathf_Approximately_m1395529776(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_0054; } } { bool L_9 = V_0; __this->set_m_IsOn_20(L_9); bool L_10 = V_0; Toggle_Set_m1284620590(__this, (bool)((((int32_t)L_10) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL); } IL_0054: { Selectable_OnDidApplyAnimationProperties_m4092978140(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::SetToggleGroup(UnityEngine.UI.ToggleGroup,System.Boolean) extern "C" void Toggle_SetToggleGroup_m4196871663 (Toggle_t110812896 * __this, ToggleGroup_t1990156785 * ___newGroup0, bool ___setMemberValue1, const MethodInfo* method) { ToggleGroup_t1990156785 * V_0 = NULL; { ToggleGroup_t1990156785 * L_0 = __this->get_m_Group_18(); V_0 = L_0; ToggleGroup_t1990156785 * L_1 = __this->get_m_Group_18(); bool L_2 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_1, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_2) { goto IL_0024; } } { ToggleGroup_t1990156785 * L_3 = __this->get_m_Group_18(); NullCheck(L_3); ToggleGroup_UnregisterToggle_m451307479(L_3, __this, /*hidden argument*/NULL); } IL_0024: { bool L_4 = ___setMemberValue1; if (!L_4) { goto IL_0031; } } { ToggleGroup_t1990156785 * L_5 = ___newGroup0; __this->set_m_Group_18(L_5); } IL_0031: { ToggleGroup_t1990156785 * L_6 = __this->get_m_Group_18(); bool L_7 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_6, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_7) { goto IL_0059; } } { bool L_8 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_8) { goto IL_0059; } } { ToggleGroup_t1990156785 * L_9 = __this->get_m_Group_18(); NullCheck(L_9); ToggleGroup_RegisterToggle_m2622505488(L_9, __this, /*hidden argument*/NULL); } IL_0059: { ToggleGroup_t1990156785 * L_10 = ___newGroup0; bool L_11 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_10, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_11) { goto IL_0093; } } { ToggleGroup_t1990156785 * L_12 = ___newGroup0; ToggleGroup_t1990156785 * L_13 = V_0; bool L_14 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL); if (!L_14) { goto IL_0093; } } { bool L_15 = Toggle_get_isOn_m2105608497(__this, /*hidden argument*/NULL); if (!L_15) { goto IL_0093; } } { bool L_16 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_16) { goto IL_0093; } } { ToggleGroup_t1990156785 * L_17 = __this->get_m_Group_18(); NullCheck(L_17); ToggleGroup_NotifyToggleOn_m2022309259(L_17, __this, /*hidden argument*/NULL); } IL_0093: { return; } } // System.Boolean UnityEngine.UI.Toggle::get_isOn() extern "C" bool Toggle_get_isOn_m2105608497 (Toggle_t110812896 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_IsOn_20(); return L_0; } } // System.Void UnityEngine.UI.Toggle::set_isOn(System.Boolean) extern "C" void Toggle_set_isOn_m3467664234 (Toggle_t110812896 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; Toggle_Set_m1284620590(__this, L_0, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Set(System.Boolean) extern "C" void Toggle_Set_m1284620590 (Toggle_t110812896 * __this, bool ___value0, const MethodInfo* method) { { bool L_0 = ___value0; Toggle_Set_m1795838095(__this, L_0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Set(System.Boolean,System.Boolean) extern const MethodInfo* UnityEvent_1_Invoke_m4200629676_MethodInfo_var; extern const uint32_t Toggle_Set_m1795838095_MetadataUsageId; extern "C" void Toggle_Set_m1795838095 (Toggle_t110812896 * __this, bool ___value0, bool ___sendCallback1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (Toggle_Set_m1795838095_MetadataUsageId); s_Il2CppMethodIntialized = true; } { bool L_0 = __this->get_m_IsOn_20(); bool L_1 = ___value0; if ((!(((uint32_t)L_0) == ((uint32_t)L_1)))) { goto IL_000d; } } { return; } IL_000d: { bool L_2 = ___value0; __this->set_m_IsOn_20(L_2); ToggleGroup_t1990156785 * L_3 = __this->get_m_Group_18(); bool L_4 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_3, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_4) { goto IL_006e; } } { bool L_5 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_5) { goto IL_006e; } } { bool L_6 = __this->get_m_IsOn_20(); if (L_6) { goto IL_005b; } } { ToggleGroup_t1990156785 * L_7 = __this->get_m_Group_18(); NullCheck(L_7); bool L_8 = ToggleGroup_AnyTogglesOn_m401060308(L_7, /*hidden argument*/NULL); if (L_8) { goto IL_006e; } } { ToggleGroup_t1990156785 * L_9 = __this->get_m_Group_18(); NullCheck(L_9); bool L_10 = ToggleGroup_get_allowSwitchOff_m1895769533(L_9, /*hidden argument*/NULL); if (L_10) { goto IL_006e; } } IL_005b: { __this->set_m_IsOn_20((bool)1); ToggleGroup_t1990156785 * L_11 = __this->get_m_Group_18(); NullCheck(L_11); ToggleGroup_NotifyToggleOn_m2022309259(L_11, __this, /*hidden argument*/NULL); } IL_006e: { int32_t L_12 = __this->get_toggleTransition_16(); Toggle_PlayEffect_m2897367561(__this, (bool)((((int32_t)L_12) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL); bool L_13 = ___sendCallback1; if (!L_13) { goto IL_0094; } } { ToggleEvent_t2331340366 * L_14 = __this->get_onValueChanged_19(); bool L_15 = __this->get_m_IsOn_20(); NullCheck(L_14); UnityEvent_1_Invoke_m4200629676(L_14, L_15, /*hidden argument*/UnityEvent_1_Invoke_m4200629676_MethodInfo_var); } IL_0094: { return; } } // System.Void UnityEngine.UI.Toggle::PlayEffect(System.Boolean) extern "C" void Toggle_PlayEffect_m2897367561 (Toggle_t110812896 * __this, bool ___instant0, const MethodInfo* method) { Graphic_t836799438 * G_B4_0 = NULL; Graphic_t836799438 * G_B3_0 = NULL; float G_B5_0 = 0.0f; Graphic_t836799438 * G_B5_1 = NULL; float G_B7_0 = 0.0f; Graphic_t836799438 * G_B7_1 = NULL; float G_B6_0 = 0.0f; Graphic_t836799438 * G_B6_1 = NULL; float G_B8_0 = 0.0f; float G_B8_1 = 0.0f; Graphic_t836799438 * G_B8_2 = NULL; { Graphic_t836799438 * L_0 = __this->get_graphic_17(); bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { return; } IL_0012: { Graphic_t836799438 * 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_002d; } } { G_B5_0 = (1.0f); G_B5_1 = G_B3_0; goto IL_0032; } IL_002d: { G_B5_0 = (0.0f); G_B5_1 = G_B4_0; } IL_0032: { 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_0042; } } { G_B8_0 = (0.0f); G_B8_1 = G_B6_0; G_B8_2 = G_B6_1; goto IL_0047; } IL_0042: { G_B8_0 = (0.1f); G_B8_1 = G_B7_0; G_B8_2 = G_B7_1; } IL_0047: { NullCheck(G_B8_2); Graphic_CrossFadeAlpha_m157692256(G_B8_2, G_B8_1, G_B8_0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::Start() extern "C" void Toggle_Start_m3120388855 (Toggle_t110812896 * __this, const MethodInfo* method) { { Toggle_PlayEffect_m2897367561(__this, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::InternalToggle() extern "C" void Toggle_InternalToggle_m3534245278 (Toggle_t110812896 * __this, const MethodInfo* method) { { bool L_0 = VirtFuncInvoker0< bool >::Invoke(9 /* System.Boolean UnityEngine.EventSystems.UIBehaviour::IsActive() */, __this); if (!L_0) { goto IL_0016; } } { bool L_1 = VirtFuncInvoker0< bool >::Invoke(23 /* System.Boolean UnityEngine.UI.Selectable::IsInteractable() */, __this); if (L_1) { goto IL_0017; } } IL_0016: { return; } IL_0017: { bool L_2 = Toggle_get_isOn_m2105608497(__this, /*hidden argument*/NULL); Toggle_set_isOn_m3467664234(__this, (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::OnPointerClick(UnityEngine.EventSystems.PointerEventData) extern "C" void Toggle_OnPointerClick_m3273211815 (Toggle_t110812896 * __this, PointerEventData_t1848751023 * ___eventData0, const MethodInfo* method) { { PointerEventData_t1848751023 * L_0 = ___eventData0; NullCheck(L_0); int32_t L_1 = PointerEventData_get_button_m796143251(L_0, /*hidden argument*/NULL); if (!L_1) { goto IL_000c; } } { return; } IL_000c: { Toggle_InternalToggle_m3534245278(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.Toggle::OnSubmit(UnityEngine.EventSystems.BaseEventData) extern "C" void Toggle_OnSubmit_m2658606814 (Toggle_t110812896 * __this, BaseEventData_t2054899105 * ___eventData0, const MethodInfo* method) { { Toggle_InternalToggle_m3534245278(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.Toggle::UnityEngine.UI.ICanvasElement.IsDestroyed() extern "C" bool Toggle_UnityEngine_UI_ICanvasElement_IsDestroyed_m3606481250 (Toggle_t110812896 * __this, const MethodInfo* method) { { bool L_0 = UIBehaviour_IsDestroyed_m3027499227(__this, /*hidden argument*/NULL); return L_0; } } // UnityEngine.Transform UnityEngine.UI.Toggle::UnityEngine.UI.ICanvasElement.get_transform() extern "C" Transform_t1659122786 * Toggle_UnityEngine_UI_ICanvasElement_get_transform_m4001149958 (Toggle_t110812896 * __this, const MethodInfo* method) { { Transform_t1659122786 * L_0 = Component_get_transform_m4257140443(__this, /*hidden argument*/NULL); return L_0; } } // System.Void UnityEngine.UI.Toggle/ToggleEvent::.ctor() extern const MethodInfo* UnityEvent_1__ctor_m1579102881_MethodInfo_var; extern const uint32_t ToggleEvent__ctor_m110328288_MetadataUsageId; extern "C" void ToggleEvent__ctor_m110328288 (ToggleEvent_t2331340366 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleEvent__ctor_m110328288_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UnityEvent_1__ctor_m1579102881(__this, /*hidden argument*/UnityEvent_1__ctor_m1579102881_MethodInfo_var); return; } } // System.Void UnityEngine.UI.ToggleGroup::.ctor() extern Il2CppClass* List_1_t1478998448_il2cpp_TypeInfo_var; extern const MethodInfo* List_1__ctor_m2087916499_MethodInfo_var; extern const uint32_t ToggleGroup__ctor_m1179503632_MetadataUsageId; extern "C" void ToggleGroup__ctor_m1179503632 (ToggleGroup_t1990156785 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup__ctor_m1179503632_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1478998448 * L_0 = (List_1_t1478998448 *)il2cpp_codegen_object_new(List_1_t1478998448_il2cpp_TypeInfo_var); List_1__ctor_m2087916499(L_0, /*hidden argument*/List_1__ctor_m2087916499_MethodInfo_var); __this->set_m_Toggles_3(L_0); UIBehaviour__ctor_m1261553468(__this, /*hidden argument*/NULL); return; } } // System.Boolean UnityEngine.UI.ToggleGroup::get_allowSwitchOff() extern "C" bool ToggleGroup_get_allowSwitchOff_m1895769533 (ToggleGroup_t1990156785 * __this, const MethodInfo* method) { { bool L_0 = __this->get_m_AllowSwitchOff_2(); return L_0; } } // System.Void UnityEngine.UI.ToggleGroup::set_allowSwitchOff(System.Boolean) extern "C" void ToggleGroup_set_allowSwitchOff_m2429094938 (ToggleGroup_t1990156785 * __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 Il2CppClass* ObjectU5BU5D_t1108656482_il2cpp_TypeInfo_var; extern Il2CppClass* String_t_il2cpp_TypeInfo_var; extern Il2CppClass* ArgumentException_t928607144_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_Contains_m3844179247_MethodInfo_var; extern Il2CppCodeGenString* _stringLiteral3714673143; extern const uint32_t ToggleGroup_ValidateToggleIsInGroup_m1953593831_MetadataUsageId; extern "C" void ToggleGroup_ValidateToggleIsInGroup_m1953593831 (ToggleGroup_t1990156785 * __this, Toggle_t110812896 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_ValidateToggleIsInGroup_m1953593831_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Toggle_t110812896 * L_0 = ___toggle0; bool L_1 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_0, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); if (L_1) { goto IL_001d; } } { List_1_t1478998448 * L_2 = __this->get_m_Toggles_3(); Toggle_t110812896 * L_3 = ___toggle0; NullCheck(L_2); bool L_4 = List_1_Contains_m3844179247(L_2, L_3, /*hidden argument*/List_1_Contains_m3844179247_MethodInfo_var); if (L_4) { goto IL_003b; } } IL_001d: { ObjectU5BU5D_t1108656482* L_5 = ((ObjectU5BU5D_t1108656482*)SZArrayNew(ObjectU5BU5D_t1108656482_il2cpp_TypeInfo_var, (uint32_t)2)); Toggle_t110812896 * L_6 = ___toggle0; NullCheck(L_5); IL2CPP_ARRAY_BOUNDS_CHECK(L_5, 0); ArrayElementTypeCheck (L_5, L_6); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)L_6); ObjectU5BU5D_t1108656482* L_7 = L_5; NullCheck(L_7); IL2CPP_ARRAY_BOUNDS_CHECK(L_7, 1); 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_m4050103162(NULL /*static, unused*/, _stringLiteral3714673143, L_7, /*hidden argument*/NULL); ArgumentException_t928607144 * L_9 = (ArgumentException_t928607144 *)il2cpp_codegen_object_new(ArgumentException_t928607144_il2cpp_TypeInfo_var); ArgumentException__ctor_m3544856547(L_9, L_8, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_9); } IL_003b: { return; } } // System.Void UnityEngine.UI.ToggleGroup::NotifyToggleOn(UnityEngine.UI.Toggle) extern const MethodInfo* List_1_get_Item_m1276017030_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1282784879_MethodInfo_var; extern const uint32_t ToggleGroup_NotifyToggleOn_m2022309259_MetadataUsageId; extern "C" void ToggleGroup_NotifyToggleOn_m2022309259 (ToggleGroup_t1990156785 * __this, Toggle_t110812896 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_NotifyToggleOn_m2022309259_MetadataUsageId); s_Il2CppMethodIntialized = true; } int32_t V_0 = 0; { Toggle_t110812896 * L_0 = ___toggle0; ToggleGroup_ValidateToggleIsInGroup_m1953593831(__this, L_0, /*hidden argument*/NULL); V_0 = 0; goto IL_0040; } IL_000e: { List_1_t1478998448 * L_1 = __this->get_m_Toggles_3(); int32_t L_2 = V_0; NullCheck(L_1); Toggle_t110812896 * L_3 = List_1_get_Item_m1276017030(L_1, L_2, /*hidden argument*/List_1_get_Item_m1276017030_MethodInfo_var); Toggle_t110812896 * L_4 = ___toggle0; bool L_5 = Object_op_Equality_m3964590952(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL); if (!L_5) { goto IL_002a; } } { goto IL_003c; } IL_002a: { List_1_t1478998448 * L_6 = __this->get_m_Toggles_3(); int32_t L_7 = V_0; NullCheck(L_6); Toggle_t110812896 * L_8 = List_1_get_Item_m1276017030(L_6, L_7, /*hidden argument*/List_1_get_Item_m1276017030_MethodInfo_var); NullCheck(L_8); Toggle_set_isOn_m3467664234(L_8, (bool)0, /*hidden argument*/NULL); } IL_003c: { int32_t L_9 = V_0; V_0 = ((int32_t)((int32_t)L_9+(int32_t)1)); } IL_0040: { int32_t L_10 = V_0; List_1_t1478998448 * L_11 = __this->get_m_Toggles_3(); NullCheck(L_11); int32_t L_12 = List_1_get_Count_m1282784879(L_11, /*hidden argument*/List_1_get_Count_m1282784879_MethodInfo_var); if ((((int32_t)L_10) < ((int32_t)L_12))) { goto IL_000e; } } { return; } } // System.Void UnityEngine.UI.ToggleGroup::UnregisterToggle(UnityEngine.UI.Toggle) extern const MethodInfo* List_1_Contains_m3844179247_MethodInfo_var; extern const MethodInfo* List_1_Remove_m3212913812_MethodInfo_var; extern const uint32_t ToggleGroup_UnregisterToggle_m451307479_MetadataUsageId; extern "C" void ToggleGroup_UnregisterToggle_m451307479 (ToggleGroup_t1990156785 * __this, Toggle_t110812896 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_UnregisterToggle_m451307479_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1478998448 * L_0 = __this->get_m_Toggles_3(); Toggle_t110812896 * L_1 = ___toggle0; NullCheck(L_0); bool L_2 = List_1_Contains_m3844179247(L_0, L_1, /*hidden argument*/List_1_Contains_m3844179247_MethodInfo_var); if (!L_2) { goto IL_001e; } } { List_1_t1478998448 * L_3 = __this->get_m_Toggles_3(); Toggle_t110812896 * L_4 = ___toggle0; NullCheck(L_3); List_1_Remove_m3212913812(L_3, L_4, /*hidden argument*/List_1_Remove_m3212913812_MethodInfo_var); } IL_001e: { return; } } // System.Void UnityEngine.UI.ToggleGroup::RegisterToggle(UnityEngine.UI.Toggle) extern const MethodInfo* List_1_Contains_m3844179247_MethodInfo_var; extern const MethodInfo* List_1_Add_m1782277315_MethodInfo_var; extern const uint32_t ToggleGroup_RegisterToggle_m2622505488_MetadataUsageId; extern "C" void ToggleGroup_RegisterToggle_m2622505488 (ToggleGroup_t1990156785 * __this, Toggle_t110812896 * ___toggle0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_RegisterToggle_m2622505488_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1478998448 * L_0 = __this->get_m_Toggles_3(); Toggle_t110812896 * L_1 = ___toggle0; NullCheck(L_0); bool L_2 = List_1_Contains_m3844179247(L_0, L_1, /*hidden argument*/List_1_Contains_m3844179247_MethodInfo_var); if (L_2) { goto IL_001d; } } { List_1_t1478998448 * L_3 = __this->get_m_Toggles_3(); Toggle_t110812896 * L_4 = ___toggle0; NullCheck(L_3); List_1_Add_m1782277315(L_3, L_4, /*hidden argument*/List_1_Add_m1782277315_MethodInfo_var); } IL_001d: { return; } } // System.Boolean UnityEngine.UI.ToggleGroup::AnyTogglesOn() extern Il2CppClass* ToggleGroup_t1990156785_il2cpp_TypeInfo_var; extern Il2CppClass* Predicate_1_t4016837075_il2cpp_TypeInfo_var; extern const MethodInfo* ToggleGroup_U3CAnyTogglesOnU3Em__4_m3428369122_MethodInfo_var; extern const MethodInfo* Predicate_1__ctor_m1841483214_MethodInfo_var; extern const MethodInfo* List_1_Find_m168248406_MethodInfo_var; extern const uint32_t ToggleGroup_AnyTogglesOn_m401060308_MetadataUsageId; extern "C" bool ToggleGroup_AnyTogglesOn_m401060308 (ToggleGroup_t1990156785 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_AnyTogglesOn_m401060308_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t1478998448 * G_B2_0 = NULL; List_1_t1478998448 * G_B1_0 = NULL; { List_1_t1478998448 * L_0 = __this->get_m_Toggles_3(); Predicate_1_t4016837075 * L_1 = ((ToggleGroup_t1990156785_StaticFields*)ToggleGroup_t1990156785_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache2_4(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001e; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)ToggleGroup_U3CAnyTogglesOnU3Em__4_m3428369122_MethodInfo_var); Predicate_1_t4016837075 * L_3 = (Predicate_1_t4016837075 *)il2cpp_codegen_object_new(Predicate_1_t4016837075_il2cpp_TypeInfo_var); Predicate_1__ctor_m1841483214(L_3, NULL, L_2, /*hidden argument*/Predicate_1__ctor_m1841483214_MethodInfo_var); ((ToggleGroup_t1990156785_StaticFields*)ToggleGroup_t1990156785_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache2_4(L_3); G_B2_0 = G_B1_0; } IL_001e: { Predicate_1_t4016837075 * L_4 = ((ToggleGroup_t1990156785_StaticFields*)ToggleGroup_t1990156785_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache2_4(); NullCheck(G_B2_0); Toggle_t110812896 * L_5 = List_1_Find_m168248406(G_B2_0, L_4, /*hidden argument*/List_1_Find_m168248406_MethodInfo_var); bool L_6 = Object_op_Inequality_m1296218211(NULL /*static, unused*/, L_5, (Object_t3071478659 *)NULL, /*hidden argument*/NULL); return L_6; } } // System.Collections.Generic.IEnumerable`1<UnityEngine.UI.Toggle> UnityEngine.UI.ToggleGroup::ActiveToggles() extern Il2CppClass* ToggleGroup_t1990156785_il2cpp_TypeInfo_var; extern Il2CppClass* Func_2_t3137578243_il2cpp_TypeInfo_var; extern const MethodInfo* ToggleGroup_U3CActiveTogglesU3Em__5_m3656404306_MethodInfo_var; extern const MethodInfo* Func_2__ctor_m140354061_MethodInfo_var; extern const MethodInfo* Enumerable_Where_TisToggle_t110812896_m1098047866_MethodInfo_var; extern const uint32_t ToggleGroup_ActiveToggles_m1762871396_MetadataUsageId; extern "C" Il2CppObject* ToggleGroup_ActiveToggles_m1762871396 (ToggleGroup_t1990156785 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_ActiveToggles_m1762871396_MetadataUsageId); s_Il2CppMethodIntialized = true; } List_1_t1478998448 * G_B2_0 = NULL; List_1_t1478998448 * G_B1_0 = NULL; { List_1_t1478998448 * L_0 = __this->get_m_Toggles_3(); Func_2_t3137578243 * L_1 = ((ToggleGroup_t1990156785_StaticFields*)ToggleGroup_t1990156785_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache3_5(); G_B1_0 = L_0; if (L_1) { G_B2_0 = L_0; goto IL_001e; } } { IntPtr_t L_2; L_2.set_m_value_0((void*)(void*)ToggleGroup_U3CActiveTogglesU3Em__5_m3656404306_MethodInfo_var); Func_2_t3137578243 * L_3 = (Func_2_t3137578243 *)il2cpp_codegen_object_new(Func_2_t3137578243_il2cpp_TypeInfo_var); Func_2__ctor_m140354061(L_3, NULL, L_2, /*hidden argument*/Func_2__ctor_m140354061_MethodInfo_var); ((ToggleGroup_t1990156785_StaticFields*)ToggleGroup_t1990156785_il2cpp_TypeInfo_var->static_fields)->set_U3CU3Ef__amU24cache3_5(L_3); G_B2_0 = G_B1_0; } IL_001e: { Func_2_t3137578243 * L_4 = ((ToggleGroup_t1990156785_StaticFields*)ToggleGroup_t1990156785_il2cpp_TypeInfo_var->static_fields)->get_U3CU3Ef__amU24cache3_5(); Il2CppObject* L_5 = Enumerable_Where_TisToggle_t110812896_m1098047866(NULL /*static, unused*/, G_B2_0, L_4, /*hidden argument*/Enumerable_Where_TisToggle_t110812896_m1098047866_MethodInfo_var); return L_5; } } // System.Void UnityEngine.UI.ToggleGroup::SetAllTogglesOff() extern const MethodInfo* List_1_get_Item_m1276017030_MethodInfo_var; extern const MethodInfo* List_1_get_Count_m1282784879_MethodInfo_var; extern const uint32_t ToggleGroup_SetAllTogglesOff_m4240216963_MetadataUsageId; extern "C" void ToggleGroup_SetAllTogglesOff_m4240216963 (ToggleGroup_t1990156785 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (ToggleGroup_SetAllTogglesOff_m4240216963_MetadataUsageId); s_Il2CppMethodIntialized = 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_002b; } IL_0015: { List_1_t1478998448 * L_1 = __this->get_m_Toggles_3(); int32_t L_2 = V_1; NullCheck(L_1); Toggle_t110812896 * L_3 = List_1_get_Item_m1276017030(L_1, L_2, /*hidden argument*/List_1_get_Item_m1276017030_MethodInfo_var); NullCheck(L_3); Toggle_set_isOn_m3467664234(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_002b: { int32_t L_5 = V_1; List_1_t1478998448 * L_6 = __this->get_m_Toggles_3(); NullCheck(L_6); int32_t L_7 = List_1_get_Count_m1282784879(L_6, /*hidden argument*/List_1_get_Count_m1282784879_MethodInfo_var); if ((((int32_t)L_5) < ((int32_t)L_7))) { goto IL_0015; } } { bool L_8 = V_0; __this->set_m_AllowSwitchOff_2(L_8); return; } } // System.Boolean UnityEngine.UI.ToggleGroup::<AnyTogglesOn>m__4(UnityEngine.UI.Toggle) extern "C" bool ToggleGroup_U3CAnyTogglesOnU3Em__4_m3428369122 (Il2CppObject * __this /* static, unused */, Toggle_t110812896 * ___x0, const MethodInfo* method) { { Toggle_t110812896 * L_0 = ___x0; NullCheck(L_0); bool L_1 = Toggle_get_isOn_m2105608497(L_0, /*hidden argument*/NULL); return L_1; } } // System.Boolean UnityEngine.UI.ToggleGroup::<ActiveToggles>m__5(UnityEngine.UI.Toggle) extern "C" bool ToggleGroup_U3CActiveTogglesU3Em__5_m3656404306 (Il2CppObject * __this /* static, unused */, Toggle_t110812896 * ___x0, const MethodInfo* method) { { Toggle_t110812896 * L_0 = ___x0; NullCheck(L_0); bool L_1 = Toggle_get_isOn_m2105608497(L_0, /*hidden argument*/NULL); return L_1; } } // System.Void UnityEngine.UI.VertexHelper::.ctor() extern Il2CppClass* ListPool_1_t3379703850_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3991458268_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3379703849_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3379703851_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t251475784_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m4266661578_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m1848305276_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m1779148745_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m2459207115_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m1671355248_MethodInfo_var; extern const uint32_t VertexHelper__ctor_m3006260889_MetadataUsageId; extern "C" void VertexHelper__ctor_m3006260889 (VertexHelper_t3377436606 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper__ctor_m3006260889_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703850_il2cpp_TypeInfo_var); List_1_t1355284822 * L_0 = ListPool_1_Get_m4266661578(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m4266661578_MethodInfo_var); __this->set_m_Positions_0(L_0); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3991458268_il2cpp_TypeInfo_var); List_1_t1967039240 * L_1 = ListPool_1_Get_m1848305276(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1848305276_MethodInfo_var); __this->set_m_Colors_1(L_1); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703849_il2cpp_TypeInfo_var); List_1_t1355284821 * L_2 = ListPool_1_Get_m1779148745(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1779148745_MethodInfo_var); __this->set_m_Uv0S_2(L_2); List_1_t1355284821 * L_3 = ListPool_1_Get_m1779148745(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1779148745_MethodInfo_var); __this->set_m_Uv1S_3(L_3); List_1_t1355284822 * L_4 = ListPool_1_Get_m4266661578(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m4266661578_MethodInfo_var); __this->set_m_Normals_4(L_4); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703851_il2cpp_TypeInfo_var); List_1_t1355284823 * L_5 = ListPool_1_Get_m2459207115(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2459207115_MethodInfo_var); __this->set_m_Tangents_5(L_5); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t251475784_il2cpp_TypeInfo_var); List_1_t2522024052 * L_6 = ListPool_1_Get_m1671355248(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1671355248_MethodInfo_var); __this->set_m_Indices_6(L_6); Object__ctor_m1772956182(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::.ctor(UnityEngine.Mesh) extern Il2CppClass* ListPool_1_t3379703850_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3991458268_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3379703849_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3379703851_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t251475784_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Get_m4266661578_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m1848305276_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m1779148745_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m2459207115_MethodInfo_var; extern const MethodInfo* ListPool_1_Get_m1671355248_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m747416421_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m1228619251_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m2678035526_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m3111764612_MethodInfo_var; extern const MethodInfo* List_1_AddRange_m1640324381_MethodInfo_var; extern const uint32_t VertexHelper__ctor_m4240166773_MetadataUsageId; extern "C" void VertexHelper__ctor_m4240166773 (VertexHelper_t3377436606 * __this, Mesh_t4241756145 * ___m0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper__ctor_m4240166773_MetadataUsageId); s_Il2CppMethodIntialized = true; } { IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703850_il2cpp_TypeInfo_var); List_1_t1355284822 * L_0 = ListPool_1_Get_m4266661578(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m4266661578_MethodInfo_var); __this->set_m_Positions_0(L_0); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3991458268_il2cpp_TypeInfo_var); List_1_t1967039240 * L_1 = ListPool_1_Get_m1848305276(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1848305276_MethodInfo_var); __this->set_m_Colors_1(L_1); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703849_il2cpp_TypeInfo_var); List_1_t1355284821 * L_2 = ListPool_1_Get_m1779148745(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1779148745_MethodInfo_var); __this->set_m_Uv0S_2(L_2); List_1_t1355284821 * L_3 = ListPool_1_Get_m1779148745(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1779148745_MethodInfo_var); __this->set_m_Uv1S_3(L_3); List_1_t1355284822 * L_4 = ListPool_1_Get_m4266661578(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m4266661578_MethodInfo_var); __this->set_m_Normals_4(L_4); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703851_il2cpp_TypeInfo_var); List_1_t1355284823 * L_5 = ListPool_1_Get_m2459207115(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m2459207115_MethodInfo_var); __this->set_m_Tangents_5(L_5); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t251475784_il2cpp_TypeInfo_var); List_1_t2522024052 * L_6 = ListPool_1_Get_m1671355248(NULL /*static, unused*/, /*hidden argument*/ListPool_1_Get_m1671355248_MethodInfo_var); __this->set_m_Indices_6(L_6); Object__ctor_m1772956182(__this, /*hidden argument*/NULL); List_1_t1355284822 * L_7 = __this->get_m_Positions_0(); Mesh_t4241756145 * L_8 = ___m0; NullCheck(L_8); Vector3U5BU5D_t215400611* L_9 = Mesh_get_vertices_m3685486174(L_8, /*hidden argument*/NULL); NullCheck(L_7); List_1_AddRange_m747416421(L_7, (Il2CppObject*)(Il2CppObject*)L_9, /*hidden argument*/List_1_AddRange_m747416421_MethodInfo_var); List_1_t1967039240 * L_10 = __this->get_m_Colors_1(); Mesh_t4241756145 * L_11 = ___m0; NullCheck(L_11); Color32U5BU5D_t2960766953* L_12 = Mesh_get_colors32_m192356802(L_11, /*hidden argument*/NULL); NullCheck(L_10); List_1_AddRange_m1228619251(L_10, (Il2CppObject*)(Il2CppObject*)L_12, /*hidden argument*/List_1_AddRange_m1228619251_MethodInfo_var); List_1_t1355284821 * L_13 = __this->get_m_Uv0S_2(); Mesh_t4241756145 * L_14 = ___m0; NullCheck(L_14); Vector2U5BU5D_t4024180168* L_15 = Mesh_get_uv_m558008935(L_14, /*hidden argument*/NULL); NullCheck(L_13); List_1_AddRange_m2678035526(L_13, (Il2CppObject*)(Il2CppObject*)L_15, /*hidden argument*/List_1_AddRange_m2678035526_MethodInfo_var); List_1_t1355284821 * L_16 = __this->get_m_Uv1S_3(); Mesh_t4241756145 * L_17 = ___m0; NullCheck(L_17); Vector2U5BU5D_t4024180168* L_18 = Mesh_get_uv2_m118417421(L_17, /*hidden argument*/NULL); NullCheck(L_16); List_1_AddRange_m2678035526(L_16, (Il2CppObject*)(Il2CppObject*)L_18, /*hidden argument*/List_1_AddRange_m2678035526_MethodInfo_var); List_1_t1355284822 * L_19 = __this->get_m_Normals_4(); Mesh_t4241756145 * L_20 = ___m0; NullCheck(L_20); Vector3U5BU5D_t215400611* L_21 = Mesh_get_normals_m3396909641(L_20, /*hidden argument*/NULL); NullCheck(L_19); List_1_AddRange_m747416421(L_19, (Il2CppObject*)(Il2CppObject*)L_21, /*hidden argument*/List_1_AddRange_m747416421_MethodInfo_var); List_1_t1355284823 * L_22 = __this->get_m_Tangents_5(); Mesh_t4241756145 * L_23 = ___m0; NullCheck(L_23); Vector4U5BU5D_t701588350* L_24 = Mesh_get_tangents_m3235865682(L_23, /*hidden argument*/NULL); NullCheck(L_22); List_1_AddRange_m3111764612(L_22, (Il2CppObject*)(Il2CppObject*)L_24, /*hidden argument*/List_1_AddRange_m3111764612_MethodInfo_var); List_1_t2522024052 * L_25 = __this->get_m_Indices_6(); Mesh_t4241756145 * L_26 = ___m0; NullCheck(L_26); Int32U5BU5D_t3230847821* L_27 = Mesh_GetIndices_m637494532(L_26, 0, /*hidden argument*/NULL); NullCheck(L_25); List_1_AddRange_m1640324381(L_25, (Il2CppObject*)(Il2CppObject*)L_27, /*hidden argument*/List_1_AddRange_m1640324381_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::.cctor() extern Il2CppClass* VertexHelper_t3377436606_il2cpp_TypeInfo_var; extern const uint32_t VertexHelper__cctor_m2517678132_MetadataUsageId; extern "C" void VertexHelper__cctor_m2517678132 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper__cctor_m2517678132_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Vector4_t4282066567 L_0; memset(&L_0, 0, sizeof(L_0)); Vector4__ctor_m2441427762(&L_0, (1.0f), (0.0f), (0.0f), (-1.0f), /*hidden argument*/NULL); ((VertexHelper_t3377436606_StaticFields*)VertexHelper_t3377436606_il2cpp_TypeInfo_var->static_fields)->set_s_DefaultTangent_7(L_0); Vector3_t4282066566 L_1 = Vector3_get_back_m1326515313(NULL /*static, unused*/, /*hidden argument*/NULL); ((VertexHelper_t3377436606_StaticFields*)VertexHelper_t3377436606_il2cpp_TypeInfo_var->static_fields)->set_s_DefaultNormal_8(L_1); return; } } // System.Void UnityEngine.UI.VertexHelper::Clear() extern const MethodInfo* List_1_Clear_m3327756448_MethodInfo_var; extern const MethodInfo* List_1_Clear_m2864657362_MethodInfo_var; extern const MethodInfo* List_1_Clear_m829740511_MethodInfo_var; extern const MethodInfo* List_1_Clear_m1530805089_MethodInfo_var; extern const MethodInfo* List_1_Clear_m2359410152_MethodInfo_var; extern const uint32_t VertexHelper_Clear_m412394180_MetadataUsageId; extern "C" void VertexHelper_Clear_m412394180 (VertexHelper_t3377436606 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_Clear_m412394180_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1355284822 * L_0 = __this->get_m_Positions_0(); NullCheck(L_0); List_1_Clear_m3327756448(L_0, /*hidden argument*/List_1_Clear_m3327756448_MethodInfo_var); List_1_t1967039240 * L_1 = __this->get_m_Colors_1(); NullCheck(L_1); List_1_Clear_m2864657362(L_1, /*hidden argument*/List_1_Clear_m2864657362_MethodInfo_var); List_1_t1355284821 * L_2 = __this->get_m_Uv0S_2(); NullCheck(L_2); List_1_Clear_m829740511(L_2, /*hidden argument*/List_1_Clear_m829740511_MethodInfo_var); List_1_t1355284821 * L_3 = __this->get_m_Uv1S_3(); NullCheck(L_3); List_1_Clear_m829740511(L_3, /*hidden argument*/List_1_Clear_m829740511_MethodInfo_var); List_1_t1355284822 * L_4 = __this->get_m_Normals_4(); NullCheck(L_4); List_1_Clear_m3327756448(L_4, /*hidden argument*/List_1_Clear_m3327756448_MethodInfo_var); List_1_t1355284823 * L_5 = __this->get_m_Tangents_5(); NullCheck(L_5); List_1_Clear_m1530805089(L_5, /*hidden argument*/List_1_Clear_m1530805089_MethodInfo_var); List_1_t2522024052 * L_6 = __this->get_m_Indices_6(); NullCheck(L_6); List_1_Clear_m2359410152(L_6, /*hidden argument*/List_1_Clear_m2359410152_MethodInfo_var); return; } } // System.Int32 UnityEngine.UI.VertexHelper::get_currentVertCount() extern const MethodInfo* List_1_get_Count_m2070445073_MethodInfo_var; extern const uint32_t VertexHelper_get_currentVertCount_m3425330353_MetadataUsageId; extern "C" int32_t VertexHelper_get_currentVertCount_m3425330353 (VertexHelper_t3377436606 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_get_currentVertCount_m3425330353_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1355284822 * L_0 = __this->get_m_Positions_0(); NullCheck(L_0); int32_t L_1 = List_1_get_Count_m2070445073(L_0, /*hidden argument*/List_1_get_Count_m2070445073_MethodInfo_var); return L_1; } } // System.Int32 UnityEngine.UI.VertexHelper::get_currentIndexCount() extern const MethodInfo* List_1_get_Count_m766977065_MethodInfo_var; extern const uint32_t VertexHelper_get_currentIndexCount_m3847254668_MetadataUsageId; extern "C" int32_t VertexHelper_get_currentIndexCount_m3847254668 (VertexHelper_t3377436606 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_get_currentIndexCount_m3847254668_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t2522024052 * L_0 = __this->get_m_Indices_6(); NullCheck(L_0); int32_t L_1 = List_1_get_Count_m766977065(L_0, /*hidden argument*/List_1_get_Count_m766977065_MethodInfo_var); return L_1; } } // System.Void UnityEngine.UI.VertexHelper::PopulateUIVertex(UnityEngine.UIVertex&,System.Int32) extern const MethodInfo* List_1_get_Item_m238279332_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m2967479602_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m207259525_MethodInfo_var; extern const MethodInfo* List_1_get_Item_m269299139_MethodInfo_var; extern const uint32_t VertexHelper_PopulateUIVertex_m910319817_MetadataUsageId; extern "C" void VertexHelper_PopulateUIVertex_m910319817 (VertexHelper_t3377436606 * __this, UIVertex_t4244065212 * ___vertex0, int32_t ___i1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_PopulateUIVertex_m910319817_MetadataUsageId); s_Il2CppMethodIntialized = true; } { UIVertex_t4244065212 * L_0 = ___vertex0; List_1_t1355284822 * L_1 = __this->get_m_Positions_0(); int32_t L_2 = ___i1; NullCheck(L_1); Vector3_t4282066566 L_3 = List_1_get_Item_m238279332(L_1, L_2, /*hidden argument*/List_1_get_Item_m238279332_MethodInfo_var); L_0->set_position_0(L_3); UIVertex_t4244065212 * L_4 = ___vertex0; List_1_t1967039240 * L_5 = __this->get_m_Colors_1(); int32_t L_6 = ___i1; NullCheck(L_5); Color32_t598853688 L_7 = List_1_get_Item_m2967479602(L_5, L_6, /*hidden argument*/List_1_get_Item_m2967479602_MethodInfo_var); L_4->set_color_2(L_7); UIVertex_t4244065212 * L_8 = ___vertex0; List_1_t1355284821 * L_9 = __this->get_m_Uv0S_2(); int32_t L_10 = ___i1; NullCheck(L_9); Vector2_t4282066565 L_11 = List_1_get_Item_m207259525(L_9, L_10, /*hidden argument*/List_1_get_Item_m207259525_MethodInfo_var); L_8->set_uv0_3(L_11); UIVertex_t4244065212 * L_12 = ___vertex0; List_1_t1355284821 * L_13 = __this->get_m_Uv1S_3(); int32_t L_14 = ___i1; NullCheck(L_13); Vector2_t4282066565 L_15 = List_1_get_Item_m207259525(L_13, L_14, /*hidden argument*/List_1_get_Item_m207259525_MethodInfo_var); L_12->set_uv1_4(L_15); UIVertex_t4244065212 * L_16 = ___vertex0; List_1_t1355284822 * L_17 = __this->get_m_Normals_4(); int32_t L_18 = ___i1; NullCheck(L_17); Vector3_t4282066566 L_19 = List_1_get_Item_m238279332(L_17, L_18, /*hidden argument*/List_1_get_Item_m238279332_MethodInfo_var); L_16->set_normal_1(L_19); UIVertex_t4244065212 * L_20 = ___vertex0; List_1_t1355284823 * L_21 = __this->get_m_Tangents_5(); int32_t L_22 = ___i1; NullCheck(L_21); Vector4_t4282066567 L_23 = List_1_get_Item_m269299139(L_21, L_22, /*hidden argument*/List_1_get_Item_m269299139_MethodInfo_var); L_20->set_tangent_5(L_23); return; } } // System.Void UnityEngine.UI.VertexHelper::SetUIVertex(UnityEngine.UIVertex,System.Int32) extern const MethodInfo* List_1_set_Item_m1990542887_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m3864873177_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m1297441190_MethodInfo_var; extern const MethodInfo* List_1_set_Item_m2683644584_MethodInfo_var; extern const uint32_t VertexHelper_SetUIVertex_m3429482805_MetadataUsageId; extern "C" void VertexHelper_SetUIVertex_m3429482805 (VertexHelper_t3377436606 * __this, UIVertex_t4244065212 ___vertex0, int32_t ___i1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_SetUIVertex_m3429482805_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1355284822 * L_0 = __this->get_m_Positions_0(); int32_t L_1 = ___i1; Vector3_t4282066566 L_2 = (&___vertex0)->get_position_0(); NullCheck(L_0); List_1_set_Item_m1990542887(L_0, L_1, L_2, /*hidden argument*/List_1_set_Item_m1990542887_MethodInfo_var); List_1_t1967039240 * L_3 = __this->get_m_Colors_1(); int32_t L_4 = ___i1; Color32_t598853688 L_5 = (&___vertex0)->get_color_2(); NullCheck(L_3); List_1_set_Item_m3864873177(L_3, L_4, L_5, /*hidden argument*/List_1_set_Item_m3864873177_MethodInfo_var); List_1_t1355284821 * L_6 = __this->get_m_Uv0S_2(); int32_t L_7 = ___i1; Vector2_t4282066565 L_8 = (&___vertex0)->get_uv0_3(); NullCheck(L_6); List_1_set_Item_m1297441190(L_6, L_7, L_8, /*hidden argument*/List_1_set_Item_m1297441190_MethodInfo_var); List_1_t1355284821 * L_9 = __this->get_m_Uv1S_3(); int32_t L_10 = ___i1; Vector2_t4282066565 L_11 = (&___vertex0)->get_uv1_4(); NullCheck(L_9); List_1_set_Item_m1297441190(L_9, L_10, L_11, /*hidden argument*/List_1_set_Item_m1297441190_MethodInfo_var); List_1_t1355284822 * L_12 = __this->get_m_Normals_4(); int32_t L_13 = ___i1; Vector3_t4282066566 L_14 = (&___vertex0)->get_normal_1(); NullCheck(L_12); List_1_set_Item_m1990542887(L_12, L_13, L_14, /*hidden argument*/List_1_set_Item_m1990542887_MethodInfo_var); List_1_t1355284823 * L_15 = __this->get_m_Tangents_5(); int32_t L_16 = ___i1; Vector4_t4282066567 L_17 = (&___vertex0)->get_tangent_5(); NullCheck(L_15); List_1_set_Item_m2683644584(L_15, L_16, L_17, /*hidden argument*/List_1_set_Item_m2683644584_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::FillMesh(UnityEngine.Mesh) extern Il2CppClass* ArgumentException_t928607144_il2cpp_TypeInfo_var; extern const MethodInfo* List_1_get_Count_m2070445073_MethodInfo_var; extern Il2CppCodeGenString* _stringLiteral3668213316; extern const uint32_t VertexHelper_FillMesh_m2371101047_MetadataUsageId; extern "C" void VertexHelper_FillMesh_m2371101047 (VertexHelper_t3377436606 * __this, Mesh_t4241756145 * ___mesh0, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_FillMesh_m2371101047_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Mesh_t4241756145 * L_0 = ___mesh0; NullCheck(L_0); Mesh_Clear_m90337099(L_0, /*hidden argument*/NULL); List_1_t1355284822 * L_1 = __this->get_m_Positions_0(); NullCheck(L_1); int32_t L_2 = List_1_get_Count_m2070445073(L_1, /*hidden argument*/List_1_get_Count_m2070445073_MethodInfo_var); if ((((int32_t)L_2) < ((int32_t)((int32_t)65000)))) { goto IL_0026; } } { ArgumentException_t928607144 * L_3 = (ArgumentException_t928607144 *)il2cpp_codegen_object_new(ArgumentException_t928607144_il2cpp_TypeInfo_var); ArgumentException__ctor_m3544856547(L_3, _stringLiteral3668213316, /*hidden argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_3); } IL_0026: { Mesh_t4241756145 * L_4 = ___mesh0; List_1_t1355284822 * L_5 = __this->get_m_Positions_0(); NullCheck(L_4); Mesh_SetVertices_m701834806(L_4, L_5, /*hidden argument*/NULL); Mesh_t4241756145 * L_6 = ___mesh0; List_1_t1967039240 * L_7 = __this->get_m_Colors_1(); NullCheck(L_6); Mesh_SetColors_m3313707935(L_6, L_7, /*hidden argument*/NULL); Mesh_t4241756145 * L_8 = ___mesh0; List_1_t1355284821 * L_9 = __this->get_m_Uv0S_2(); NullCheck(L_8); Mesh_SetUVs_m116216925(L_8, 0, L_9, /*hidden argument*/NULL); Mesh_t4241756145 * L_10 = ___mesh0; List_1_t1355284821 * L_11 = __this->get_m_Uv1S_3(); NullCheck(L_10); Mesh_SetUVs_m116216925(L_10, 1, L_11, /*hidden argument*/NULL); Mesh_t4241756145 * L_12 = ___mesh0; List_1_t1355284822 * L_13 = __this->get_m_Normals_4(); NullCheck(L_12); Mesh_SetNormals_m2039144779(L_12, L_13, /*hidden argument*/NULL); Mesh_t4241756145 * L_14 = ___mesh0; List_1_t1355284823 * L_15 = __this->get_m_Tangents_5(); NullCheck(L_14); Mesh_SetTangents_m2005345740(L_14, L_15, /*hidden argument*/NULL); Mesh_t4241756145 * L_16 = ___mesh0; List_1_t2522024052 * L_17 = __this->get_m_Indices_6(); NullCheck(L_16); Mesh_SetTriangles_m456382467(L_16, L_17, 0, /*hidden argument*/NULL); Mesh_t4241756145 * L_18 = ___mesh0; NullCheck(L_18); Mesh_RecalculateBounds_m3754336742(L_18, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::Dispose() extern Il2CppClass* ListPool_1_t3379703850_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3991458268_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3379703849_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t3379703851_il2cpp_TypeInfo_var; extern Il2CppClass* ListPool_1_t251475784_il2cpp_TypeInfo_var; extern const MethodInfo* ListPool_1_Release_m3961428258_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m1142705876_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3969187617_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m3953668899_MethodInfo_var; extern const MethodInfo* ListPool_1_Release_m1485191562_MethodInfo_var; extern const uint32_t VertexHelper_Dispose_m2696974486_MetadataUsageId; extern "C" void VertexHelper_Dispose_m2696974486 (VertexHelper_t3377436606 * __this, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_Dispose_m2696974486_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1355284822 * L_0 = __this->get_m_Positions_0(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703850_il2cpp_TypeInfo_var); ListPool_1_Release_m3961428258(NULL /*static, unused*/, L_0, /*hidden argument*/ListPool_1_Release_m3961428258_MethodInfo_var); List_1_t1967039240 * L_1 = __this->get_m_Colors_1(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3991458268_il2cpp_TypeInfo_var); ListPool_1_Release_m1142705876(NULL /*static, unused*/, L_1, /*hidden argument*/ListPool_1_Release_m1142705876_MethodInfo_var); List_1_t1355284821 * L_2 = __this->get_m_Uv0S_2(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703849_il2cpp_TypeInfo_var); ListPool_1_Release_m3969187617(NULL /*static, unused*/, L_2, /*hidden argument*/ListPool_1_Release_m3969187617_MethodInfo_var); List_1_t1355284821 * L_3 = __this->get_m_Uv1S_3(); ListPool_1_Release_m3969187617(NULL /*static, unused*/, L_3, /*hidden argument*/ListPool_1_Release_m3969187617_MethodInfo_var); List_1_t1355284822 * L_4 = __this->get_m_Normals_4(); ListPool_1_Release_m3961428258(NULL /*static, unused*/, L_4, /*hidden argument*/ListPool_1_Release_m3961428258_MethodInfo_var); List_1_t1355284823 * L_5 = __this->get_m_Tangents_5(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t3379703851_il2cpp_TypeInfo_var); ListPool_1_Release_m3953668899(NULL /*static, unused*/, L_5, /*hidden argument*/ListPool_1_Release_m3953668899_MethodInfo_var); List_1_t2522024052 * L_6 = __this->get_m_Indices_6(); IL2CPP_RUNTIME_CLASS_INIT(ListPool_1_t251475784_il2cpp_TypeInfo_var); ListPool_1_Release_m1485191562(NULL /*static, unused*/, L_6, /*hidden argument*/ListPool_1_Release_m1485191562_MethodInfo_var); __this->set_m_Positions_0((List_1_t1355284822 *)NULL); __this->set_m_Colors_1((List_1_t1967039240 *)NULL); __this->set_m_Uv0S_2((List_1_t1355284821 *)NULL); __this->set_m_Uv1S_3((List_1_t1355284821 *)NULL); __this->set_m_Normals_4((List_1_t1355284822 *)NULL); __this->set_m_Tangents_5((List_1_t1355284823 *)NULL); __this->set_m_Indices_6((List_1_t2522024052 *)NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.Vector3,UnityEngine.Color32,UnityEngine.Vector2,UnityEngine.Vector2,UnityEngine.Vector3,UnityEngine.Vector4) extern const MethodInfo* List_1_Add_m1321016677_MethodInfo_var; extern const MethodInfo* List_1_Add_m857917591_MethodInfo_var; extern const MethodInfo* List_1_Add_m3117968036_MethodInfo_var; extern const MethodInfo* List_1_Add_m3819032614_MethodInfo_var; extern const uint32_t VertexHelper_AddVert_m1784639198_MetadataUsageId; extern "C" void VertexHelper_AddVert_m1784639198 (VertexHelper_t3377436606 * __this, Vector3_t4282066566 ___position0, Color32_t598853688 ___color1, Vector2_t4282066565 ___uv02, Vector2_t4282066565 ___uv13, Vector3_t4282066566 ___normal4, Vector4_t4282066567 ___tangent5, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_AddVert_m1784639198_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1355284822 * L_0 = __this->get_m_Positions_0(); Vector3_t4282066566 L_1 = ___position0; NullCheck(L_0); List_1_Add_m1321016677(L_0, L_1, /*hidden argument*/List_1_Add_m1321016677_MethodInfo_var); List_1_t1967039240 * L_2 = __this->get_m_Colors_1(); Color32_t598853688 L_3 = ___color1; NullCheck(L_2); List_1_Add_m857917591(L_2, L_3, /*hidden argument*/List_1_Add_m857917591_MethodInfo_var); List_1_t1355284821 * L_4 = __this->get_m_Uv0S_2(); Vector2_t4282066565 L_5 = ___uv02; NullCheck(L_4); List_1_Add_m3117968036(L_4, L_5, /*hidden argument*/List_1_Add_m3117968036_MethodInfo_var); List_1_t1355284821 * L_6 = __this->get_m_Uv1S_3(); Vector2_t4282066565 L_7 = ___uv13; NullCheck(L_6); List_1_Add_m3117968036(L_6, L_7, /*hidden argument*/List_1_Add_m3117968036_MethodInfo_var); List_1_t1355284822 * L_8 = __this->get_m_Normals_4(); Vector3_t4282066566 L_9 = ___normal4; NullCheck(L_8); List_1_Add_m1321016677(L_8, L_9, /*hidden argument*/List_1_Add_m1321016677_MethodInfo_var); List_1_t1355284823 * L_10 = __this->get_m_Tangents_5(); Vector4_t4282066567 L_11 = ___tangent5; NullCheck(L_10); List_1_Add_m3819032614(L_10, L_11, /*hidden argument*/List_1_Add_m3819032614_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::AddVert(UnityEngine.Vector3,UnityEngine.Color32,UnityEngine.Vector2) extern Il2CppClass* VertexHelper_t3377436606_il2cpp_TypeInfo_var; extern const uint32_t VertexHelper_AddVert_m1490065189_MetadataUsageId; extern "C" void VertexHelper_AddVert_m1490065189 (VertexHelper_t3377436606 * __this, Vector3_t4282066566 ___position0, Color32_t598853688 ___color1, Vector2_t4282066565 ___uv02, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_AddVert_m1490065189_MetadataUsageId); s_Il2CppMethodIntialized = true; } { Vector3_t4282066566 L_0 = ___position0; Color32_t598853688 L_1 = ___color1; Vector2_t4282066565 L_2 = ___uv02; Vector2_t4282066565 L_3 = Vector2_get_zero_m199872368(NULL /*static, unused*/, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(VertexHelper_t3377436606_il2cpp_TypeInfo_var); Vector3_t4282066566 L_4 = ((VertexHelper_t3377436606_StaticFields*)VertexHelper_t3377436606_il2cpp_TypeInfo_var->static_fields)->get_s_DefaultNormal_8(); Vector4_t4282066567 L_5 = ((VertexHelper_t3377436606_StaticFields*)VertexHelper_t3377436606_il2cpp_TypeInfo_var->static_fields)->get_s_DefaultTangent_7(); VertexHelper_AddVert_m1784639198(__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_m1127238042 (VertexHelper_t3377436606 * __this, UIVertex_t4244065212 ___v0, const MethodInfo* method) { { Vector3_t4282066566 L_0 = (&___v0)->get_position_0(); Color32_t598853688 L_1 = (&___v0)->get_color_2(); Vector2_t4282066565 L_2 = (&___v0)->get_uv0_3(); Vector2_t4282066565 L_3 = (&___v0)->get_uv1_4(); Vector3_t4282066566 L_4 = (&___v0)->get_normal_1(); Vector4_t4282066567 L_5 = (&___v0)->get_tangent_5(); VertexHelper_AddVert_m1784639198(__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 const MethodInfo* List_1_Add_m352670381_MethodInfo_var; extern const uint32_t VertexHelper_AddTriangle_m514578993_MetadataUsageId; extern "C" void VertexHelper_AddTriangle_m514578993 (VertexHelper_t3377436606 * __this, int32_t ___idx00, int32_t ___idx11, int32_t ___idx22, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_AddTriangle_m514578993_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t2522024052 * L_0 = __this->get_m_Indices_6(); int32_t L_1 = ___idx00; NullCheck(L_0); List_1_Add_m352670381(L_0, L_1, /*hidden argument*/List_1_Add_m352670381_MethodInfo_var); List_1_t2522024052 * L_2 = __this->get_m_Indices_6(); int32_t L_3 = ___idx11; NullCheck(L_2); List_1_Add_m352670381(L_2, L_3, /*hidden argument*/List_1_Add_m352670381_MethodInfo_var); List_1_t2522024052 * L_4 = __this->get_m_Indices_6(); int32_t L_5 = ___idx22; NullCheck(L_4); List_1_Add_m352670381(L_4, L_5, /*hidden argument*/List_1_Add_m352670381_MethodInfo_var); return; } } // System.Void UnityEngine.UI.VertexHelper::AddUIVertexQuad(UnityEngine.UIVertex[]) extern "C" void VertexHelper_AddUIVertexQuad_m765809318 (VertexHelper_t3377436606 * __this, UIVertexU5BU5D_t1796391381* ___verts0, const MethodInfo* method) { int32_t V_0 = 0; int32_t V_1 = 0; { int32_t L_0 = VertexHelper_get_currentVertCount_m3425330353(__this, /*hidden argument*/NULL); V_0 = L_0; V_1 = 0; goto IL_0060; } IL_000e: { UIVertexU5BU5D_t1796391381* L_1 = ___verts0; int32_t L_2 = V_1; NullCheck(L_1); IL2CPP_ARRAY_BOUNDS_CHECK(L_1, L_2); Vector3_t4282066566 L_3 = ((L_1)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_2)))->get_position_0(); UIVertexU5BU5D_t1796391381* L_4 = ___verts0; int32_t L_5 = V_1; NullCheck(L_4); IL2CPP_ARRAY_BOUNDS_CHECK(L_4, L_5); Color32_t598853688 L_6 = ((L_4)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_5)))->get_color_2(); UIVertexU5BU5D_t1796391381* L_7 = ___verts0; int32_t L_8 = V_1; NullCheck(L_7); IL2CPP_ARRAY_BOUNDS_CHECK(L_7, L_8); Vector2_t4282066565 L_9 = ((L_7)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_8)))->get_uv0_3(); UIVertexU5BU5D_t1796391381* L_10 = ___verts0; int32_t L_11 = V_1; NullCheck(L_10); IL2CPP_ARRAY_BOUNDS_CHECK(L_10, L_11); Vector2_t4282066565 L_12 = ((L_10)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_11)))->get_uv1_4(); UIVertexU5BU5D_t1796391381* L_13 = ___verts0; int32_t L_14 = V_1; NullCheck(L_13); IL2CPP_ARRAY_BOUNDS_CHECK(L_13, L_14); Vector3_t4282066566 L_15 = ((L_13)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_14)))->get_normal_1(); UIVertexU5BU5D_t1796391381* L_16 = ___verts0; int32_t L_17 = V_1; NullCheck(L_16); IL2CPP_ARRAY_BOUNDS_CHECK(L_16, L_17); Vector4_t4282066567 L_18 = ((L_16)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_17)))->get_tangent_5(); VertexHelper_AddVert_m1784639198(__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_0060: { int32_t L_20 = V_1; if ((((int32_t)L_20) < ((int32_t)4))) { goto IL_000e; } } { int32_t L_21 = V_0; int32_t L_22 = V_0; int32_t L_23 = V_0; VertexHelper_AddTriangle_m514578993(__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_m514578993(__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 const MethodInfo* List_1_AddRange_m1640324381_MethodInfo_var; extern const uint32_t VertexHelper_AddUIVertexStream_m1704624332_MetadataUsageId; extern "C" void VertexHelper_AddUIVertexStream_m1704624332 (VertexHelper_t3377436606 * __this, List_1_t1317283468 * ___verts0, List_1_t2522024052 * ___indices1, const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if (!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method (VertexHelper_AddUIVertexStream_m1704624332_MetadataUsageId); s_Il2CppMethodIntialized = true; } { List_1_t1317283468 * L_0 = ___verts0; if (!L_0) { goto IL_0030; } } { List_1_t1317283468 * L_1 = ___verts0; List_1_t1355284822 * L_2 = __this->get_m_Positions_0(); List_1_t1967039240 * L_3 = __this->get_m_Colors_1(); List_1_t1355284821 * L_4 = __this->get_m_Uv0S_2(); List_1_t1355284821 * L_5 = __this->get_m_Uv1S_3(); List_1_t1355284822 * L_6 = __this->get_m_Normals_4(); List_1_t1355284823 * L_7 = __this->get_m_Tangents_5(); CanvasRenderer_AddUIVertexStream_m1865056747(NULL /*static, unused*/, L_1, L_2, L_3, L_4, L_5, L_6, L_7, /*hidden argument*/NULL); } IL_0030: { List_1_t2522024052 * L_8 = ___indices1; if (!L_8) { goto IL_0042; } } { List_1_t2522024052 * L_9 = __this->get_m_Indices_6(); List_1_t2522024052 * L_10 = ___indices1; NullCheck(L_9); List_1_AddRange_m1640324381(L_9, L_10, /*hidden argument*/List_1_AddRange_m1640324381_MethodInfo_var); } IL_0042: { return; } } // System.Void UnityEngine.UI.VertexHelper::AddUIVertexTriangleStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" void VertexHelper_AddUIVertexTriangleStream_m1263262953 (VertexHelper_t3377436606 * __this, List_1_t1317283468 * ___verts0, const MethodInfo* method) { { List_1_t1317283468 * L_0 = ___verts0; if (L_0) { goto IL_0007; } } { return; } IL_0007: { List_1_t1317283468 * L_1 = ___verts0; List_1_t1355284822 * L_2 = __this->get_m_Positions_0(); List_1_t1967039240 * L_3 = __this->get_m_Colors_1(); List_1_t1355284821 * L_4 = __this->get_m_Uv0S_2(); List_1_t1355284821 * L_5 = __this->get_m_Uv1S_3(); List_1_t1355284822 * L_6 = __this->get_m_Normals_4(); List_1_t1355284823 * L_7 = __this->get_m_Tangents_5(); List_1_t2522024052 * L_8 = __this->get_m_Indices_6(); CanvasRenderer_SplitUIVertexStreams_m4126093916(NULL /*static, unused*/, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VertexHelper::GetUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>) extern "C" void VertexHelper_GetUIVertexStream_m1078623420 (VertexHelper_t3377436606 * __this, List_1_t1317283468 * ___stream0, const MethodInfo* method) { { List_1_t1317283468 * L_0 = ___stream0; if (L_0) { goto IL_0007; } } { return; } IL_0007: { List_1_t1317283468 * L_1 = ___stream0; List_1_t1355284822 * L_2 = __this->get_m_Positions_0(); List_1_t1967039240 * L_3 = __this->get_m_Colors_1(); List_1_t1355284821 * L_4 = __this->get_m_Uv0S_2(); List_1_t1355284821 * L_5 = __this->get_m_Uv1S_3(); List_1_t1355284822 * L_6 = __this->get_m_Normals_4(); List_1_t1355284823 * L_7 = __this->get_m_Tangents_5(); List_1_t2522024052 * L_8 = __this->get_m_Indices_6(); CanvasRenderer_CreateUIVertexStream_m2702356137(NULL /*static, unused*/, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::.ctor() extern "C" void VerticalLayoutGroup__ctor_m2648549884 (VerticalLayoutGroup_t423167365 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup__ctor_m258856643(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::CalculateLayoutInputHorizontal() extern "C" void VerticalLayoutGroup_CalculateLayoutInputHorizontal_m1704122566 (VerticalLayoutGroup_t423167365 * __this, const MethodInfo* method) { { LayoutGroup_CalculateLayoutInputHorizontal_m89763996(__this, /*hidden argument*/NULL); HorizontalOrVerticalLayoutGroup_CalcAlongAxis_m423831906(__this, 0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::CalculateLayoutInputVertical() extern "C" void VerticalLayoutGroup_CalculateLayoutInputVertical_m920247256 (VerticalLayoutGroup_t423167365 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup_CalcAlongAxis_m423831906(__this, 1, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::SetLayoutHorizontal() extern "C" void VerticalLayoutGroup_SetLayoutHorizontal_m244631242 (VerticalLayoutGroup_t423167365 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup_SetChildrenAlongAxis_m3440700494(__this, 0, (bool)1, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.UI.VerticalLayoutGroup::SetLayoutVertical() extern "C" void VerticalLayoutGroup_SetLayoutVertical_m2764536540 (VerticalLayoutGroup_t423167365 * __this, const MethodInfo* method) { { HorizontalOrVerticalLayoutGroup_SetChildrenAlongAxis_m3440700494(__this, 1, (bool)1, /*hidden argument*/NULL); return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif
36.46248
383
0.772309
mopsicus
a69651305b83b8ad3b329222b9eba940f29a8639
1,219
cpp
C++
OpenGL-Sandbox/src/Paddle.cpp
j-delrosario/pong
f9d79f65e1a64bcee193da2ca00f731c762a6512
[ "Apache-2.0" ]
null
null
null
OpenGL-Sandbox/src/Paddle.cpp
j-delrosario/pong
f9d79f65e1a64bcee193da2ca00f731c762a6512
[ "Apache-2.0" ]
null
null
null
OpenGL-Sandbox/src/Paddle.cpp
j-delrosario/pong
f9d79f65e1a64bcee193da2ca00f731c762a6512
[ "Apache-2.0" ]
null
null
null
#include "Paddle.h" #include "GLCore/Core/KeyCodes.h" #pragma once using namespace GLCore; using namespace GLCore::Utils; Paddle::Paddle(float direction, float speed, glm::vec2 size, glm::vec2 position, glm::vec4 color) : m_Active(false), m_Direction(direction), m_Speed(speed), m_Size(size), m_Position(position), m_Color(color) { } Paddle::~Paddle() { } void Paddle::Draw() { Renderer::DrawQuad(m_Position, m_Size, m_Color); } void Paddle::Update(GLCore::Timestep ts) { if (!m_Active) return; if (m_Direction < 0) { if (Input::IsKeyPressed(HZ_KEY_W)) { m_Position.y += m_Speed * (float)ts; } else if (Input::IsKeyPressed(HZ_KEY_S)) { m_Position.y -= m_Speed * (float)ts; } } if (m_Direction > 0) { if (Input::IsKeyPressed(HZ_KEY_UP)) { m_Position.y += m_Speed * (float)ts; } else if (Input::IsKeyPressed(HZ_KEY_DOWN)) { m_Position.y -= m_Speed * (float)ts; } } if (m_Position.y + m_Size.y > 1.0f) m_Position.y = m_Size.y; else if (m_Position.y < -1.0f) m_Position.y = -1.0f; } void Paddle::Reset() { if (m_Direction < 0.0f) m_Position = { -1.5f - m_Size.x / 2, -m_Size.y / 2 }; else m_Position = { 1.4f - m_Size.x / 2, -m_Size.y / 2 }; m_Active = false; }
19.983607
110
0.652994
j-delrosario
a6988cf2b31d1880b1b18bccce8a3f990d061071
3,824
cc
C++
src/plugin/scripting/pythonmodule/src/module.cc
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
4
2015-05-13T16:28:36.000Z
2017-05-24T15:34:14.000Z
src/plugin/scripting/pythonmodule/src/module.cc
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
null
null
null
src/plugin/scripting/pythonmodule/src/module.cc
bugengine/BugEngine
1b3831d494ee06b0bd74a8227c939dd774b91226
[ "BSD-3-Clause" ]
1
2017-03-21T08:28:07.000Z
2017-03-21T08:28:07.000Z
#include <bugengine/plugin.scripting.pythonlib/stdafx.h> #include <bugengine/core/environment.hh> #include <bugengine/core/logger.hh> #include <bugengine/plugin.scripting.pythonlib/pythonlib.hh> #include <unistd.h> class ConsoleLogListener : public BugEngine::ILogListener { private: minitl::AssertionCallback_t m_previousCallback; public: ConsoleLogListener() { m_previousCallback = minitl::setAssertionCallback(&onAssert); } ~ConsoleLogListener() { minitl::setAssertionCallback(m_previousCallback); } private: static minitl::AssertionResult onAssert(const char* file, int line, const char* expr, const char* message) { be_fatal("%s:%d Assertion failed: %s\n\t%s" | file | line | expr | message); return minitl::Break; } protected: virtual bool log(const BugEngine::istring& logname, BugEngine::LogLevel level, const char* filename, int line, const char* thread, const char* msg) const { #ifdef BE_PLATFORM_WIN32 minitl::format< 1024u > message = minitl::format< 1024u >("%s(%d): %s\t(%s) %s%s") | filename | line | logname.c_str() | getLogLevelName(level) | msg | (msg[strlen(msg) - 1] == '\n' ? "" : "\n"); OutputDebugString(message); # define isatty(x) 1 #endif static const char* term = BugEngine::Environment::getEnvironment().getEnvironmentVariable("TERM"); static const char* colors[] = {isatty(1) && term ? "\x1b[0m" : "", isatty(1) && term ? "\x1b[01;1m" : "", isatty(1) && term ? "\x1b[36m" : "", isatty(1) && term ? "\x1b[32m" : "", isatty(1) && term ? "\x1b[33m" : "", isatty(1) && term ? "\x1b[31m" : "", isatty(1) && term ? "\x1b[1;31m" : ""}; #ifdef BE_PLATFORM_WIN32 # undef isatty #endif const char* color = colors[0]; switch(level) { case BugEngine::logDebug: color = colors[2]; break; case BugEngine::logInfo: color = colors[3]; break; case BugEngine::logWarning: color = colors[4]; break; case BugEngine::logError: color = colors[5]; break; case BugEngine::logFatal: color = colors[6]; break; case BugEngine::logSpam: default: break; } const char* normal = colors[0]; fprintf(stdout, "[%s%s%s] %s%s(%s)%s: %s", color, getLogLevelName(level), normal, colors[1], logname.c_str(), thread, normal, // filename, line, msg); fflush(stdout); be_forceuse(filename); be_forceuse(line); if(msg[strlen(msg) - 1] != '\n') fprintf(stdout, "\n"); return true; } }; BugEngine::ScopedLogListener console(scoped< ConsoleLogListener >::create(BugEngine::Arena::debug())); extern "C" BE_EXPORT void initpy_bugengine() { using namespace BugEngine; using namespace BugEngine::Python; /* python 2.x module initialisation */ Environment::getEnvironment().init(); be_info("loading module py_bugengine (Python 2)"); static ref< PythonLibrary > s_loadedLibrary = ref< PythonLibrary >::create(Arena::general(), (const char*)0); setCurrentContext(s_loadedLibrary); init2_py_bugengine(false); } extern "C" BE_EXPORT BugEngine::Python::PyObject* PyInit_py_bugengine() { using namespace BugEngine; using namespace BugEngine::Python; /* python 3.x module initialisation */ Environment::getEnvironment().init(); static ref< PythonLibrary > s_loadedLibrary = ref< PythonLibrary >::create(Arena::general(), (const char*)0); setCurrentContext(s_loadedLibrary); be_info("loading module py_bugengine (Python 3)"); PyObject* module = init3_py_bugengine(false); return module; }
36.419048
100
0.617155
bugengine
a69bb072d6b540f4e7ab6525067e285506ba7750
17,855
cpp
C++
src/lower/index_expressions/lower_scatter_workspace.cpp
huangjd/simit-staging
6a1d7946e88c7bf383abe800ee835d3680e86559
[ "MIT" ]
null
null
null
src/lower/index_expressions/lower_scatter_workspace.cpp
huangjd/simit-staging
6a1d7946e88c7bf383abe800ee835d3680e86559
[ "MIT" ]
null
null
null
src/lower/index_expressions/lower_scatter_workspace.cpp
huangjd/simit-staging
6a1d7946e88c7bf383abe800ee835d3680e86559
[ "MIT" ]
null
null
null
#include "lower_scatter_workspace.h" #include <vector> #include <set> #include <map> #include <string> #include "loops.h" #include "lower_tensor_utils.h" #include "indexvar.h" #include "ir.h" #include "ir_visitor.h" #include "ir_printer.h" #include "ir_codegen.h" #include "substitute.h" #include "path_expressions.h" #include "util/util.h" #include "util/collections.h" using namespace std; namespace simit { namespace ir { typedef vector<IndexVar> IndexTuple; typedef map<IndexTuple, vector<const IndexedTensor *>> IndexTupleUses; typedef map<IndexVar, vector<IndexVar>> IndexVarGraph; inline ostream &operator<<(ostream &os, const IndexVarGraph &ivGraph) { os << "Index Variable Graph:" << endl; for (auto &ij : ivGraph) { auto i = ij.first; os << i; if (ij.second.size() > 0) { os << " -> "; os << util::join(ij.second, ","); } os << endl; } return os; } /// Build a map from index variable tuples to the IndexTensors they access: /// - B+C (i,j) -> B(i,j), C(i,j) /// - B+C' (i,j) -> B(i,j) /// (j,i) -> C(j,i) /// - B*C: (i,k) -> B(i,k) /// (k,j) -> C(k,j) static IndexTupleUses getIndexTupleUses(const IndexExpr *indexExpr) { struct GetIndexTupleUsesVisitor : public IRVisitor { IndexTupleUses indexTupleUses; void visit(const IndexedTensor *indexedTensor) { indexTupleUses[indexedTensor->indexVars].push_back(indexedTensor); } }; GetIndexTupleUsesVisitor visitor; indexExpr->accept(&visitor); return visitor.indexTupleUses; } /// Build a map from index variables to index variables they can reach through /// a usage. This map encodes a directed index variable graph where vertices /// are index variables, and where there exist an edge (i,j) if i and j are /// ever used together to index a tensor that has an index from i to j. For now /// we will assume we always have available all indices, but we may later want /// to optimize for memory by computing a minimum set of indices we need. /// - B+C: i -> j and j -> i /// - B*C: i -> k and k -> i /// k -> j and j -> k static IndexVarGraph createIndexVarGraph(const IndexExpr *indexExpression) { IndexTupleUses indexTupleUses = getIndexTupleUses(indexExpression); IndexVarGraph indexVarGraph; for (auto &itu : indexTupleUses) { IndexTuple indexTuple = itu.first; for (auto& index : indexTuple) { indexVarGraph.insert({index, vector<IndexVar>()}); } // Add edges between all index variables present in the same tuple for (size_t i=0; i < indexTuple.size() - 1; ++i) { for (size_t j=i+1; j < indexTuple.size(); ++j) { indexVarGraph.at(indexTuple[i]).push_back(indexTuple[j]); indexVarGraph.at(indexTuple[j]).push_back(indexTuple[i]); } } } return indexVarGraph; } static void createLoopNest(const IndexVarGraph &ivGraph, const IndexVariableLoop &linkedLoop, set<IndexVar> *visited, vector<IndexVariableLoop> *loops) { iassert(util::contains(ivGraph, linkedLoop.getIndexVar())); for (const IndexVar &sink : ivGraph.at(linkedLoop.getIndexVar())) { if (!util::contains(*visited, sink)) { visited->insert(sink); loops->push_back(IndexVariableLoop(sink, linkedLoop)); createLoopNest(ivGraph, sink, visited, loops); } } } /// Order the index variables into one loop per index variable, by traversing /// the index variable graph static vector<IndexVariableLoop> createLoopNest(const IndexVarGraph &ivGraph, const vector<IndexVar> &sources){ vector<IndexVariableLoop> loops; set<IndexVar> visited; for (auto &source : sources) { if (!util::contains(visited, source)) { visited.insert(source); IndexVariableLoop loop(source); loops.push_back(loop); createLoopNest(ivGraph, loop, &visited, &loops); } } return loops; } static vector<IndexVariableLoop> createLoopNest(const IndexExpr *indexExpr) { IndexVarGraph indexVariableGraph = createIndexVarGraph(indexExpr); return createLoopNest(indexVariableGraph, indexExpr->resultVars); } static Expr compareToNextIndexLocation(const TensorIndexVar &inductionVar) { return Lt::make(inductionVar.getCoordVar(), inductionVar.loadCoord(1)); } /// Create sparse while loop condition. Sparse while loops simultaneously /// iterate over the coordinate variables of one or more tensors static Expr subsetLoopCondition(const vector<TensorIndexVar> &inductionVars) { auto it = inductionVars.begin(); auto end = inductionVars.end(); Expr condition = compareToNextIndexLocation(*it++); for (; it != end; ++it) { condition = And::make(condition, compareToNextIndexLocation(*it)); } return condition; } static Stmt updateSinkInductionVars(const vector<TensorIndexVar> &tensorIndexVars) { vector<Stmt> initSinkInductionVarStmts; for (const TensorIndexVar &tensorIndexVar : tensorIndexVars) { initSinkInductionVarStmts.push_back(tensorIndexVar.initSinkVar()); } return Block::make(initSinkInductionVarStmts); } static Stmt createFastForwardLoop(const TensorIndexVar &tensorIndexVar, Var inductionVar) { Var sinkVar = tensorIndexVar.getSinkVar(); Expr fastForwardCondition = Lt::make(sinkVar, inductionVar); Expr fastForwardLoopCondition = And::make(fastForwardCondition, compareToNextIndexLocation(tensorIndexVar)); Stmt incrementCoordVar = increment(tensorIndexVar.getCoordVar()); Stmt initSinkVar = tensorIndexVar.initSinkVar(); Stmt stepCoordAndSinkVars = Block::make(incrementCoordVar, initSinkVar); // Poor man's do-while loop Stmt fastForwardLoop = Block::make(stepCoordAndSinkVars, While::make(fastForwardLoopCondition, stepCoordAndSinkVars)); return Comment::make("fastforward "+sinkVar.getName(), fastForwardLoop); } /// @param body A statement that is evaluated for every inductionVar value /// of the intersection between the tensorIndexVars. static Stmt createSubsetLoopStmt(const Var &inductionVar, const vector<TensorIndexVar> &tensorIndexVars, Stmt body) { iassert(tensorIndexVars.size() > 0); Stmt loop; // Only one TensorIndexVar so we emit a for loop over a range. if (tensorIndexVars.size() == 1) { const TensorIndexVar& tensorIndexVar = tensorIndexVars[0]; body = Block::make(tensorIndexVars[0].initSinkVar(inductionVar), body); loop = ForRange::make(tensorIndexVar.getCoordVar(), tensorIndexVar.loadCoord(), tensorIndexVar.loadCoord(1), body); } // Two or more TensorIndexVars so we merge their iteration space with a while else { // Emit the code to execute at the intersection Stmt intersectionStmt; // Init induction variable (at the intersection all sink vars are the same) Var firstSinkVar = tensorIndexVars[0].getSinkVar(); Stmt initInductionVar = AssignStmt::make(inductionVar, firstSinkVar); intersectionStmt = Block::make(intersectionStmt, initInductionVar); // Append caller-provided loop body intersectionStmt = Block::make(intersectionStmt, body); // Increment each coordinate var for (auto& tensorIndexVar : tensorIndexVars) { Stmt incrementCoordVar = increment(tensorIndexVar.getCoordVar()); intersectionStmt = Block::make(intersectionStmt, incrementCoordVar); } // Update the sink induction variables Stmt updateSinkVars = updateSinkInductionVars(tensorIndexVars); intersectionStmt = Block::make(intersectionStmt, updateSinkVars); // Emit the code to execute outside the intersection Stmt notIntersectionStmt; function<Expr(TensorIndexVar)> getSinkVarFunc = [](const TensorIndexVar &t){return t.getSinkVar();}; vector<Expr> sinkVars = util::map(tensorIndexVars, getSinkVarFunc); // The loop induction variable is the min of the tensor index variables initInductionVar = max(inductionVar, sinkVars); notIntersectionStmt = Block::make(notIntersectionStmt, initInductionVar); // Emit one fast forward loop per tensor index variable if (tensorIndexVars.size() == 2) { Var sinkVar0 = tensorIndexVars[0].getSinkVar(); Expr fastForwardCondition = Lt::make(sinkVar0, inductionVar); Stmt fastForwardSinkVar0 = createFastForwardLoop(tensorIndexVars[0], inductionVar); Stmt fastForwardSinkVar1 = createFastForwardLoop(tensorIndexVars[1], inductionVar); Stmt fastForwardIfLess = IfThenElse::make(fastForwardCondition, fastForwardSinkVar0, fastForwardSinkVar1); notIntersectionStmt = Block::make(notIntersectionStmt, fastForwardIfLess); } else { vector<Stmt> fastForwardLoops; for (auto& tensorIndexVar : tensorIndexVars) { Var sinkVar = tensorIndexVar.getSinkVar(); Expr fastForwardCondition = Lt::make(sinkVar, inductionVar); Stmt fastForwardSinkVar = createFastForwardLoop(tensorIndexVar, inductionVar); Stmt fastForwardIfLess = IfThenElse::make(fastForwardCondition, fastForwardSinkVar); fastForwardLoops.push_back(fastForwardIfLess); } Stmt fastForwardLoopsStmt = Block::make(fastForwardLoops); notIntersectionStmt = Block::make(notIntersectionStmt, fastForwardLoopsStmt); } // Check whether we are at the intersection of the tensor index sink vars Expr intersectionCondition = compare(sinkVars); // Create the loop body Stmt loopBody = IfThenElse::make(intersectionCondition, intersectionStmt, notIntersectionStmt); vector<Stmt> declAndInitStmts; // Declare and initialize coordinate induction variables for (auto &inductionVar : tensorIndexVars) { declAndInitStmts.push_back(VarDecl::make(inductionVar.getCoordVar())); declAndInitStmts.push_back(inductionVar.initCoordVar()); } // Declare and initialize sink induction variables for (auto &inductionVar : tensorIndexVars) { declAndInitStmts.push_back(VarDecl::make(inductionVar.getSinkVar())); declAndInitStmts.push_back(inductionVar.initSinkVar()); } Stmt initCoordAndSinkVars = Block::make(declAndInitStmts); // Create sparse while loop Expr loopCondition = subsetLoopCondition(tensorIndexVars); loop = Block::make(initCoordAndSinkVars, While::make(loopCondition,loopBody)); } iassert(loop.defined()); return loop; } static Stmt createSubsetLoopStmt(const Var& target, const Var& inductionVar, Expr blockSize, const SubsetLoop& subsetLoop, Environment* environment) { Stmt computeStmt = Store::make(target, inductionVar, subsetLoop.getComputeExpression(), subsetLoop.getCompoundOperator()); iassert(target.getType().isTensor()); Type blockType = target.getType().toTensor()->getBlockType(); const TensorType* btype = blockType.toTensor(); if (btype->order() > 0) { vector<Var> inductionVars; inductionVars.push_back(inductionVar); for (auto& tiv : subsetLoop.getTensorIndexVars()) { inductionVars.push_back(tiv.getCoordVar()); } computeStmt = rewriteToBlocked(computeStmt, inductionVars, blockSize); } return createSubsetLoopStmt(inductionVar, subsetLoop.getTensorIndexVars(), computeStmt); } static string tensorSliceString(const vector<IndexVar> &vars, const IndexVar &sliceVar) { unsigned sliceDimension = util::locate(vars, sliceVar); string result = "("; for (size_t i=0; i < vars.size(); ++i) { result += (i == sliceDimension) ? ":" : toString(vars[i]); if (i < vars.size()-1) { result += ","; } } result += ")"; return result; } static string tensorSliceString(const Expr &expr, const IndexVar &sliceVar) { class SlicePrinter : public IRPrinter { public: SlicePrinter(const IndexVar &sliceVar) : IRPrinter(ss), sliceVar(sliceVar){} string toString(const Expr &expr) { skipTopExprParenthesis(); print(expr); return ss.str(); } private: stringstream ss; const IndexVar &sliceVar; void visit(const IndexedTensor *indexedTensor) { ss << indexedTensor->tensor << tensorSliceString(indexedTensor->indexVars, sliceVar); } }; return SlicePrinter(sliceVar).toString(expr);; } static Stmt copyFromWorkspace(Var target, Expr targetIndex, Var workspace, Expr workspaceIndex) { ScalarType workspaceCType = workspace.getType().toTensor()->getComponentType(); Stmt copyFromWorkspace = Store::make(target, targetIndex, Load::make(workspace, workspaceIndex)); Expr resetVal = Literal::make(TensorType::make(workspaceCType)); Stmt resetWorkspace = Store::make(workspace, workspaceIndex, resetVal); return Block::make(copyFromWorkspace, resetWorkspace); } Stmt lowerScatterWorkspace(Var target, const IndexExpr* indexExpression, Environment* environment, Storage* storage) { iassert(target.getType().isTensor()); const TensorType* type = target.getType().toTensor(); tassert(type->order() <= 2) << "lowerScatterWorkspace does not support higher-order tensors"; Type blockType = type->getBlockType(); const TensorType* btype = blockType.toTensor(); Expr blockSize = (int)btype->size(); // Create loops vector<IndexVariableLoop> loops = createLoopNest(indexExpression); // Emit loops Stmt loopNest; for (IndexVariableLoop &loop : util::reverse(loops)) { IndexVar indexVar = loop.getIndexVar(); Var inductionVar = loop.getInductionVar(); // Dense loops if (!loop.isLinked()) { const IndexSet &indexSet = indexVar.getDomain().getIndexSets()[0]; loopNest = For::make(inductionVar, indexSet, loopNest); } // Sparse/linked loops else { IndexVar linkedIndexVar = loop.getLinkedLoop().getIndexVar(); Var linkedInductionVar = loop.getLinkedLoop().getInductionVar(); vector<SubsetLoop> subsetLoops = createSubsetLoops(indexExpression, loop, environment, storage); // Create workspace on target ScalarType workspaceCType = type->getComponentType(); Var workspace; if (type->order() < 2) { workspace = target; } else { // Sparse output IndexDomain workspaceDomain = type->getDimensions()[1]; // Row workspace Type workspaceType = TensorType::make(workspaceCType,{workspaceDomain}); workspace = environment->createTemporary(workspaceType, INTERNAL_PREFIX("workspace")); environment->addTemporary(workspace); storage->add(workspace, TensorStorage::Kind::Dense); } iassert(workspace.defined()); vector<Stmt> loopStatements; // Create induction var decl Stmt inductionVarDecl = VarDecl::make(inductionVar); loopStatements.push_back(inductionVarDecl); // Create each subset loop and add their results to the workspace for (const SubsetLoop& subsetLoop : subsetLoops) { Stmt loopStmt = createSubsetLoopStmt(workspace, inductionVar, blockSize, subsetLoop, environment); string comment = workspace.getName() + " " + util::toString(subsetLoop.getCompoundOperator())+"= " + tensorSliceString(subsetLoop.getIndexExpression(), indexVar); loopStatements.push_back(Comment::make(comment, loopStmt, false, true)); } iassert(loops.size() > 0); // Create the loop that copies the workspace to the target auto& resultVars = indexExpression->resultVars; TensorStorage& ts = storage->getStorage(target); TensorIndex ti; if (!ts.hasTensorIndex() && environment->hasExtern(target.getName())) { ts.setTensorIndex(target); ti = ts.getTensorIndex(); environment->addExternMapping(target, ti.getRowptrArray()); environment->addExternMapping(target, ti.getColidxArray()); } else { ti = ts.getTensorIndex(); } TensorIndexVar resultIndexVar(inductionVar.getName(), target.getName(), linkedInductionVar, ti); Stmt body; body = copyFromWorkspace(target, resultIndexVar.getCoordVar(), workspace, inductionVar); if (btype->order() > 0) { const Var& coordVar = resultIndexVar.getCoordVar(); body = rewriteToBlocked(body, {inductionVar, coordVar}, blockSize); } Stmt loopStmt = createSubsetLoopStmt(inductionVar, {resultIndexVar},body); string comment = toString(target) + tensorSliceString(resultVars, loop.getIndexVar()) + " = " + workspace.getName(); loopStatements.push_back(Comment::make(comment, loopStmt, false, true)); loopNest = Block::make(loopStatements); } } stringstream comment; comment << util::toString(target) << "(" + util::join(indexExpression->resultVars, ",") << ") = "; IRPrinter printer(comment); printer.skipTopExprParenthesis(); printer.print(indexExpression->value); return Comment::make(comment.str(), loopNest, true); } }}
38.151709
82
0.662504
huangjd
a69c9430522117866ce02715f08c106547005393
574
cpp
C++
ProWorld/Concept.cpp
JosepContact/ProWorld
194a38a0f8358e7bd5e89a8e517e87b91dd6e517
[ "MIT" ]
null
null
null
ProWorld/Concept.cpp
JosepContact/ProWorld
194a38a0f8358e7bd5e89a8e517e87b91dd6e517
[ "MIT" ]
null
null
null
ProWorld/Concept.cpp
JosepContact/ProWorld
194a38a0f8358e7bd5e89a8e517e87b91dd6e517
[ "MIT" ]
null
null
null
#include "Concept.h" using namespace std; Concept::Concept() { type = UnkownConcept; } Concept::Concept(std::string argword, std::string argplural, ConceptType argtype) : word(argword), plural(argplural), type(argtype) { } Concept::~Concept() { } void Concept::SetWord(string name, string plural) { this->word = name; this->plural = plural; } std::string Concept::GetWord() { return word; } std::string Concept::GetPlural() { return plural; } const char * Concept::GetChar() { return word.c_str(); } void Concept::SetID(unsigned int argid) { id = argid; }
12.755556
131
0.688153
JosepContact
a6a03a520e00ba4e13a0052b9639605639bc76da
11,678
hpp
C++
src/libraries/lagrangian/spray/submodels/BreakupModel/SHF/SHF.hpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
src/libraries/lagrangian/spray/submodels/BreakupModel/SHF/SHF.hpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
src/libraries/lagrangian/spray/submodels/BreakupModel/SHF/SHF.hpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
/*---------------------------------------------------------------------------*\ Copyright (C) 2011-2018 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of CAELUS. CAELUS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CAELUS 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 GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CAELUS. If not, see <http://www.gnu.org/licenses/>. Class CML::SHF Description Secondary Breakup Model to take account of the different breakup regimes, bag, molutimode, shear.... Accurate description in @verbatim R. Schmehl, G. Maier, S. Witting "CFD Analysis of Fuel Atomization, Secondary Droplet Breakup and Spray Dispersion in the Premix Duct of a LPP Combustor". Eight International Conference on Liquid Atomization and Spray Systems, 2000 @endverbatim \*---------------------------------------------------------------------------*/ #ifndef SHF_H #define SHF_H #include "BreakupModel.hpp" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace CML { /*---------------------------------------------------------------------------*\ Class SHF Declaration \*---------------------------------------------------------------------------*/ template<class CloudType> class SHF : public BreakupModel<CloudType> { private: // Private data // Model constants scalar weCorrCoeff_; scalar weBuCrit_; scalar weBuBag_; scalar weBuMM_; scalar ohnCoeffCrit_; scalar ohnCoeffBag_; scalar ohnCoeffMM_; scalar ohnExpCrit_; scalar ohnExpBag_; scalar ohnExpMM_; scalar cInit_; scalar c1_; scalar c2_; scalar c3_; scalar cExp1_; scalar cExp2_; scalar cExp3_; scalar weConst_; scalar weCrit1_; scalar weCrit2_; scalar coeffD_; scalar onExpD_; scalar weExpD_; scalar mu_; scalar sigma_; scalar d32Coeff_; scalar cDmaxBM_; scalar cDmaxS_; scalar corePerc_; public: //- Runtime type information TypeName("SHF"); // Constructors //- Construct from dictionary SHF(const dictionary&, CloudType&); //- Construct copy SHF(const SHF<CloudType>& bum); //- Construct and return a clone virtual autoPtr<BreakupModel<CloudType> > clone() const { return autoPtr<BreakupModel<CloudType> > ( new SHF<CloudType>(*this) ); } //- Destructor virtual ~SHF(); // Member Functions //- Update the parcel properties virtual bool update ( const scalar dt, const vector& g, scalar& d, scalar& tc, scalar& ms, scalar& nParticle, scalar& KHindex, scalar& y, scalar& yDot, const scalar d0, const scalar rho, const scalar mu, const scalar sigma, const vector& U, const scalar rhoc, const scalar muc, const vector& Urel, const scalar Urmag, const scalar tMom, scalar& dChild, scalar& massChild ); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace CML // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template <class CloudType> CML::SHF<CloudType>::SHF ( const dictionary& dict, CloudType& owner ) : BreakupModel<CloudType>(dict, owner, typeName), weCorrCoeff_(readScalar(this->coeffDict().lookup("weCorrCoeff"))), weBuCrit_(readScalar(this->coeffDict().lookup("weBuCrit"))), weBuBag_(readScalar(this->coeffDict().lookup("weBuBag"))), weBuMM_(readScalar(this->coeffDict().lookup("weBuMM"))), ohnCoeffCrit_(readScalar(this->coeffDict().lookup("ohnCoeffCrit"))), ohnCoeffBag_(readScalar(this->coeffDict().lookup("ohnCoeffBag"))), ohnCoeffMM_(readScalar(this->coeffDict().lookup("ohnCoeffMM"))), ohnExpCrit_(readScalar(this->coeffDict().lookup("ohnExpCrit"))), ohnExpBag_(readScalar(this->coeffDict().lookup("ohnExpBag"))), ohnExpMM_(readScalar(this->coeffDict().lookup("ohnExpMM"))), cInit_(readScalar(this->coeffDict().lookup("Cinit"))), c1_(readScalar(this->coeffDict().lookup("C1"))), c2_(readScalar(this->coeffDict().lookup("C2"))), c3_(readScalar(this->coeffDict().lookup("C3"))), cExp1_(readScalar(this->coeffDict().lookup("Cexp1"))), cExp2_(readScalar(this->coeffDict().lookup("Cexp2"))), cExp3_(readScalar(this->coeffDict().lookup("Cexp3"))), weConst_(readScalar(this->coeffDict().lookup("Weconst"))), weCrit1_(readScalar(this->coeffDict().lookup("Wecrit1"))), weCrit2_(readScalar(this->coeffDict().lookup("Wecrit2"))), coeffD_(readScalar(this->coeffDict().lookup("CoeffD"))), onExpD_(readScalar(this->coeffDict().lookup("OnExpD"))), weExpD_(readScalar(this->coeffDict().lookup("WeExpD"))), mu_(readScalar(this->coeffDict().lookup("mu"))), sigma_(readScalar(this->coeffDict().lookup("sigma"))), d32Coeff_(readScalar(this->coeffDict().lookup("d32Coeff"))), cDmaxBM_(readScalar(this->coeffDict().lookup("cDmaxBM"))), cDmaxS_(readScalar(this->coeffDict().lookup("cDmaxS"))), corePerc_(readScalar(this->coeffDict().lookup("corePerc"))) {} template<class CloudType> CML::SHF<CloudType>::SHF(const SHF<CloudType>& bum) : BreakupModel<CloudType>(bum), weCorrCoeff_(bum.weCorrCoeff_), weBuCrit_(bum.weBuCrit_), weBuBag_(bum.weBuBag_), weBuMM_(bum.weBuMM_), ohnCoeffCrit_(bum.ohnCoeffCrit_), ohnCoeffBag_(bum.ohnCoeffBag_), ohnCoeffMM_(bum.ohnCoeffMM_), ohnExpCrit_(bum.ohnExpCrit_), ohnExpBag_(bum.ohnExpBag_), ohnExpMM_(bum.ohnExpMM_), cInit_(bum.cInit_), c1_(bum.c1_), c2_(bum.c2_), c3_(bum.c3_), cExp1_(bum.cExp1_), cExp2_(bum.cExp2_), cExp3_(bum.cExp3_), weConst_(bum.weConst_), weCrit1_(bum.weCrit1_), weCrit2_(bum.weCrit2_), coeffD_(bum.coeffD_), onExpD_(bum.onExpD_), weExpD_(bum.weExpD_), mu_(bum.mu_), sigma_(bum.sigma_), d32Coeff_(bum.d32Coeff_), cDmaxBM_(bum.cDmaxBM_), cDmaxS_(bum.cDmaxS_), corePerc_(bum.corePerc_) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class CloudType> CML::SHF<CloudType>::~SHF() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class CloudType> bool CML::SHF<CloudType>::update ( const scalar dt, const vector& g, scalar& d, scalar& tc, scalar& ms, scalar& nParticle, scalar& KHindex, scalar& y, scalar& yDot, const scalar d0, const scalar rho, const scalar mu, const scalar sigma, const vector& U, const scalar rhoc, const scalar muc, const vector& Urel, const scalar Urmag, const scalar tMom, scalar& dChild, scalar& massChild ) { Random& rndGen = this->owner().rndGen(); bool addChild = false; scalar d03 = pow3(d); scalar rhopi6 = rho*constant::mathematical::pi/6.0; scalar mass0 = nParticle*rhopi6*d03; scalar mass = mass0; scalar weGas = 0.5*rhoc*sqr(Urmag)*d/sigma; scalar weLiquid = 0.5*rho*sqr(Urmag)*d/sigma; // correct the Reynolds number. Reitz is using radius instead of diameter scalar reLiquid = 0.5*Urmag*d/mu; scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL); scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge); // droplet deformation characteristic time scalar tChar = d/Urmag*sqrt(rho/rhoc); scalar tFirst = cInit_*tChar; scalar tSecond = 0; scalar tCharSecond = 0; bool bag = false; bool multimode = false; bool shear = false; bool success = false; // update the droplet characteristic time tc += dt; if (weGas > weConst_) { if (weGas < weCrit1_) { tCharSecond = c1_*pow((weGas - weConst_), cExp1_); } else if (weGas >= weCrit1_ && weGas <= weCrit2_) { tCharSecond = c2_*pow((weGas - weConst_), cExp2_); } else { tCharSecond = c3_*pow((weGas - weConst_), cExp3_); } } scalar weC = weBuCrit_*(1.0 + ohnCoeffCrit_*pow(ohnesorge, ohnExpCrit_)); scalar weB = weBuBag_*(1.0 + ohnCoeffBag_*pow(ohnesorge, ohnExpBag_)); scalar weMM = weBuMM_*(1.0 + ohnCoeffMM_*pow(ohnesorge, ohnExpMM_)); if (weGas > weC && weGas < weB) { bag = true; } if (weGas >= weB && weGas <= weMM) { multimode = true; } if (weGas > weMM) { shear = true; } tSecond = tCharSecond*tChar; scalar tBreakUP = tFirst + tSecond; if (tc > tBreakUP) { scalar d32 = coeffD_*d*pow(ohnesorge, onExpD_)*pow(weGasCorr, weExpD_); if (bag || multimode) { scalar d05 = d32Coeff_ * d32; scalar x = 0.0; scalar yGuess = 0.0; scalar dGuess = 0.0; while(!success) { x = cDmaxBM_*rndGen.sample01<scalar>(); dGuess = sqr(x)*d05; yGuess = rndGen.sample01<scalar>(); scalar p = x /(2.0*sqrt(constant::mathematical::twoPi)*sigma_) *exp(-0.5*sqr((x - mu_)/sigma_)); if (yGuess < p) { success = true; } } d = dGuess; tc = 0.0; } if (shear) { scalar dC = weConst_*sigma/(rhoc*sqr(Urmag)); scalar d32Red = 4.0*(d32*dC)/(5.0*dC - d32); scalar d05 = d32Coeff_ * d32Red; scalar x = 0.0; scalar yGuess = 0.0; scalar dGuess = 0.0; while(!success) { x = cDmaxS_*rndGen.sample01<scalar>(); dGuess = sqr(x)*d05; yGuess = rndGen.sample01<scalar>(); scalar p = x /(2.0*sqrt(constant::mathematical::twoPi)*sigma_) *exp(-0.5*sqr((x - mu_)/sigma_)); if (yGuess<p) { success = true; } } d = dC; dChild = dGuess; massChild = corePerc_*mass0; mass -= massChild; addChild = true; // reset timer tc = 0.0; } // correct nParticle to conserve mass nParticle = mass/(rhopi6*pow3(d)); } return addChild; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //
26.723112
80
0.531769
MrAwesomeRocks
a6a3cae4906a8d13958367a7fd522bf17b99d33e
1,094
hpp
C++
include/Game.hpp
smalls12/blokus
33141e55a613c5b74ac5c5ac8807d1972269d788
[ "Apache-2.0" ]
1
2018-12-28T00:06:30.000Z
2018-12-28T00:06:30.000Z
include/Game.hpp
smalls12/blokus
33141e55a613c5b74ac5c5ac8807d1972269d788
[ "Apache-2.0" ]
1
2020-02-07T17:46:26.000Z
2020-02-07T18:12:07.000Z
include/Game.hpp
smalls12/blokus
33141e55a613c5b74ac5c5ac8807d1972269d788
[ "Apache-2.0" ]
null
null
null
#pragma once #include "IGameSettings.hpp" #include "GameMode.hpp" #include "GameConfiguration.hpp" #include "spdlog/spdlog.h" class Game : public IGameSettings { public: Game(); ~Game(); void SetGameMode(GameMode mode) { mMode = mode; } GameMode GetGameMode() { return mMode; } void SetGameConfiguration(GameConfiguration configuration) { mConfiguration = configuration; } GameConfiguration GetGameConfiguration() { return mConfiguration; } void SetUsername(std::string username) { mUsername = username; } std::string GetUsername() { return mUsername; } void SetGameName(std::string gameName) { mGameName = gameName; } std::string GetGameName() { return mGameName; } void SetServer(std::string server) { mServer = server; } std::string GetServer() { return mServer; } private: GameMode mMode; GameConfiguration mConfiguration; std::string mUsername; std::string mGameName; std::string mServer; };
30.388889
102
0.627971
smalls12
a6a723b5fb244ce092beb83baa19a24b6d1f0c4b
11,168
hpp
C++
3rdParty/occa/include/occa/lang/primitive.hpp
krowe-alcf/nekBench
d314ca6b942076620dd7dab8f11df97be977c5db
[ "BSD-3-Clause" ]
null
null
null
3rdParty/occa/include/occa/lang/primitive.hpp
krowe-alcf/nekBench
d314ca6b942076620dd7dab8f11df97be977c5db
[ "BSD-3-Clause" ]
null
null
null
3rdParty/occa/include/occa/lang/primitive.hpp
krowe-alcf/nekBench
d314ca6b942076620dd7dab8f11df97be977c5db
[ "BSD-3-Clause" ]
null
null
null
#ifndef OCCA_LANG_PRIMITIVE_HEADER #define OCCA_LANG_PRIMITIVE_HEADER #include <iostream> #include <sstream> #include <iomanip> #include <stdint.h> #include <stdlib.h> #include <occa/defines.hpp> #include <occa/io/output.hpp> #include <occa/tools/string.hpp> #include <occa/tools/sys.hpp> namespace occa { //---[ Primitive Type ]--------------- namespace primitiveType { static const int none = (1 << 0); static const int bool_ = (1 << 1); static const int int8_ = (1 << 2); static const int uint8_ = (1 << 3); static const int int16_ = (1 << 4); static const int uint16_ = (1 << 5); static const int int32_ = (1 << 6); static const int uint32_ = (1 << 7); static const int int64_ = (1 << 8); static const int uint64_ = (1 << 9); static const int isSigned = (int8_ | int16_ | int32_ | int64_); static const int isUnsigned = (uint8_ | uint16_ | uint32_ | uint64_); static const int isInteger = (isSigned | isUnsigned); static const int float_ = (1 << 10); static const int double_ = (1 << 11); static const int isFloat = (float_ | double_); static const int ptr = (1 << 12); } //==================================== class primitive { public: int type; union { bool bool_; uint8_t uint8_; uint16_t uint16_; uint32_t uint32_; uint64_t uint64_; int8_t int8_; int16_t int16_; int32_t int32_; int64_t int64_; float float_; double double_; char* ptr; } value; inline primitive() : type(primitiveType::none) { value.ptr = NULL; } inline primitive(const primitive &p) : type(p.type) { value.ptr = p.value.ptr; } primitive(const char *c); primitive(const std::string &s); inline primitive(const bool value_) { type = primitiveType::bool_; value.bool_ = (bool) value_; } inline primitive(const uint8_t value_) { type = primitiveType::uint8_; value.uint8_ = (uint8_t) value_; } inline primitive(const uint16_t value_) { type = primitiveType::uint16_; value.uint16_ = (uint16_t) value_; } inline primitive(const uint32_t value_) { type = primitiveType::uint32_; value.uint32_ = (uint32_t) value_; } inline primitive(const uint64_t value_) { type = primitiveType::uint64_; value.uint64_ = (uint64_t) value_; } inline primitive(const int8_t value_) { type = primitiveType::int8_; value.int8_ = (int8_t) value_; } inline primitive(const int16_t value_) { type = primitiveType::int16_; value.int16_ = (int16_t) value_; } inline primitive(const int32_t value_) { type = primitiveType::int32_; value.int32_ = (int32_t) value_; } inline primitive(const int64_t value_) { type = primitiveType::int64_; value.int64_ = (int64_t) value_; } inline primitive(const float value_) { type = primitiveType::float_; value.float_ = value_; } inline primitive(const double value_) { type = primitiveType::double_; value.double_ = value_; } inline primitive(void *value_) { type = primitiveType::ptr; value.ptr = (char*) value_; } static primitive load(const char *&c, const bool includeSign = true); static primitive load(const std::string &s, const bool includeSign = true); static primitive loadBinary(const char *&c, const bool isNegative = false); static primitive loadHex(const char *&c, const bool isNegative = false); inline primitive& operator = (const bool value_) { type = primitiveType::bool_; value.bool_ = (bool) value_; return *this; } inline primitive& operator = (const uint8_t value_) { type = primitiveType::uint8_; value.uint8_ = (uint8_t) value_; return *this; } inline primitive& operator = (const uint16_t value_) { type = primitiveType::uint16_; value.uint16_ = (uint16_t) value_; return *this; } inline primitive& operator = (const uint32_t value_) { type = primitiveType::uint32_; value.uint32_ = (uint32_t) value_; return *this; } inline primitive& operator = (const uint64_t value_) { type = primitiveType::uint64_; value.uint64_ = (uint64_t) value_; return *this; } inline primitive& operator = (const int8_t value_) { type = primitiveType::int8_; value.int8_ = (int8_t) value_; return *this; } inline primitive& operator = (const int16_t value_) { type = primitiveType::int16_; value.int16_ = (int16_t) value_; return *this; } inline primitive& operator = (const int32_t value_) { type = primitiveType::int32_; value.int32_ = (int32_t) value_; return *this; } inline primitive& operator = (const int64_t value_) { type = primitiveType::int64_; value.int64_ = (int64_t) value_; return *this; } inline primitive& operator = (const float value_) { type = primitiveType::float_; value.float_ = value_; return *this; } inline primitive& operator = (const double value_) { type = primitiveType::double_; value.double_ = value_; return *this; } inline primitive& operator = (void *value_) { type = primitiveType::ptr; value.ptr = (char*) value_; return *this; } inline operator bool () const { return to<bool>(); } inline operator uint8_t () const { return to<uint8_t>(); } inline operator uint16_t () const { return to<uint16_t>(); } inline operator uint32_t () const { return to<uint32_t>(); } inline operator uint64_t () const { return to<uint64_t>(); } inline operator int8_t () const { return to<int8_t>(); } inline operator int16_t () const { return to<int16_t>(); } inline operator int32_t () const { return to<int32_t>(); } inline operator int64_t () const { return to<int64_t>(); } inline operator float () const { return to<float>(); } inline operator double () const { return to<double>(); } template <class TM> inline TM to() const { switch(type) { case primitiveType::bool_ : return (TM) value.bool_; case primitiveType::uint8_ : return (TM) value.uint8_; case primitiveType::uint16_ : return (TM) value.uint16_; case primitiveType::uint32_ : return (TM) value.uint32_; case primitiveType::uint64_ : return (TM) value.uint64_; case primitiveType::int8_ : return (TM) value.int8_; case primitiveType::int16_ : return (TM) value.int16_; case primitiveType::int32_ : return (TM) value.int32_; case primitiveType::int64_ : return (TM) value.int64_; case primitiveType::float_ : return (TM) value.float_; case primitiveType::double_ : return (TM) value.double_; default: OCCA_FORCE_ERROR("Type not set"); } return TM(); } inline bool isNaN() const { return type & primitiveType::none; } inline bool isBool() const { return type & primitiveType::bool_; } inline bool isSigned() const { return type & primitiveType::isSigned; } inline bool isUnsigned() const { return type & primitiveType::isUnsigned; } inline bool isInteger() const { return type & primitiveType::isInteger; } inline bool isFloat() const { return type & primitiveType::isFloat; } inline bool isPointer() const { return type & primitiveType::ptr; } std::string toString() const; friend io::output& operator << (io::output &out, const primitive &p); //---[ Misc Methods ]----------------- uint64_t sizeof_(); //==================================== //---[ Unary Operators ]-------------- static primitive not_(const primitive &p); static primitive positive(const primitive &p); static primitive negative(const primitive &p); static primitive tilde(const primitive &p); static primitive& leftIncrement(primitive &p); static primitive& leftDecrement(primitive &p); static primitive rightIncrement(primitive &p); static primitive rightDecrement(primitive &p); //==================================== //---[ Boolean Operators ]------------ static primitive lessThan(const primitive &a, const primitive &b); static primitive lessThanEq(const primitive &a, const primitive &b); static primitive equal(const primitive &a, const primitive &b); static primitive compare(const primitive &a, const primitive &b); static primitive notEqual(const primitive &a, const primitive &b); static primitive greaterThanEq(const primitive &a, const primitive &b); static primitive greaterThan(const primitive &a, const primitive &b); static primitive and_(const primitive &a, const primitive &b); static primitive or_(const primitive &a, const primitive &b); //==================================== //---[ Binary Operators ]------------- static primitive mult(const primitive &a, const primitive &b); static primitive add(const primitive &a, const primitive &b); static primitive sub(const primitive &a, const primitive &b); static primitive div(const primitive &a, const primitive &b); static primitive mod(const primitive &a, const primitive &b); static primitive bitAnd(const primitive &a, const primitive &b); static primitive bitOr(const primitive &a, const primitive &b); static primitive xor_(const primitive &a, const primitive &b); static primitive rightShift(const primitive &a, const primitive &b); static primitive leftShift(const primitive &a, const primitive &b); //==================================== //---[ Assignment Operators ]--------- static primitive& assign(primitive &a, const primitive &b); static primitive& multEq(primitive &a, const primitive &b); static primitive& addEq(primitive &a, const primitive &b); static primitive& subEq(primitive &a, const primitive &b); static primitive& divEq(primitive &a, const primitive &b); static primitive& modEq(primitive &a, const primitive &b); static primitive& bitAndEq(primitive &a, const primitive &b); static primitive& bitOrEq(primitive &a, const primitive &b); static primitive& xorEq(primitive &a, const primitive &b); static primitive& rightShiftEq(primitive &a, const primitive &b); static primitive& leftShiftEq(primitive &a, const primitive &b); //==================================== }; } #endif
29.083333
79
0.597153
krowe-alcf
a6a85c509488ab470e674715b75d896bc4b1efe6
324
cpp
C++
src/application/unit_tests/main_unit_tests.cpp
rybcom/cpp_modular_template
19c94a7a4000ca33e389e7bb43c510d1ee29115a
[ "BSD-3-Clause" ]
null
null
null
src/application/unit_tests/main_unit_tests.cpp
rybcom/cpp_modular_template
19c94a7a4000ca33e389e7bb43c510d1ee29115a
[ "BSD-3-Clause" ]
null
null
null
src/application/unit_tests/main_unit_tests.cpp
rybcom/cpp_modular_template
19c94a7a4000ca33e389e7bb43c510d1ee29115a
[ "BSD-3-Clause" ]
null
null
null
#include "project_config.h" #if RUN_AS_UNIT_TESTING() == true #define CATCH_CONFIG_RUNNER #include "catch.hpp" #include "unit_tests/object_unit_test.h" int main(int argc, char* argv[]) { char* xxx[2]; xxx[0] = (char*)"xxx"; xxx[1] =(char*) "-s"; int result = Catch::Session().run(2, xxx); return result; } #endif
16.2
43
0.666667
rybcom
16f5594c0cea57632469aaf24a0ad389b699e24b
3,117
hpp
C++
contrib/pdxautoserializer/src/impl/CPPParser/DictEntry.hpp
vaijira/geode-native
5a46b659b86ecc4890df59c1b7abe727192e5d06
[ "Apache-2.0" ]
null
null
null
contrib/pdxautoserializer/src/impl/CPPParser/DictEntry.hpp
vaijira/geode-native
5a46b659b86ecc4890df59c1b7abe727192e5d06
[ "Apache-2.0" ]
1
2022-03-31T01:54:57.000Z
2022-03-31T01:54:57.000Z
contrib/pdxautoserializer/src/impl/CPPParser/DictEntry.hpp
s0/geode-native
9b4c572ac0c63854641410a49521625c29a75bae
[ "Apache-2.0" ]
null
null
null
/* * PUBLIC DOMAIN PCCTS-BASED C++ GRAMMAR (cplusplus.g, stat.g, expr.g) * * Authors: Sumana Srinivasan, NeXT Inc.; sumana_srinivasan@next.com * Terence Parr, Parr Research Corporation; parrt@parr-research.com * Russell Quong, Purdue University; quong@ecn.purdue.edu * * SOFTWARE RIGHTS * * This file is a part of the ANTLR-based C++ grammar and is free * software. We do not reserve any LEGAL rights to its use or * distribution, but you may NOT claim ownership or authorship of this * grammar or support code. An individual or company may otherwise do * whatever they wish with the grammar distributed herewith including the * incorporation of the grammar or the output generated by ANTLR into * commerical software. You may redistribute in source or binary form * without payment of royalties to us as long as this header remains * in all source distributions. * * We encourage users to develop parsers/tools using this grammar. * In return, we ask that credit is given to us for developing this * grammar. By "credit", we mean that if you incorporate our grammar or * the generated code into one of your programs (commercial product, * research project, or otherwise) that you acknowledge this fact in the * documentation, research report, etc.... In addition, you should say nice * things about us at every opportunity. * * As long as these guidelines are kept, we expect to continue enhancing * this grammar. Feel free to send us enhancements, fixes, bug reports, * suggestions, or general words of encouragement at parrt@parr-research.com. * * NeXT Computer Inc. * 900 Chesapeake Dr. * Redwood City, CA 94555 * 12/02/1994 * * Restructured for public consumption by Terence Parr late February, 1995. * * Requires PCCTS 1.32b4 or higher to get past ANTLR. * * DISCLAIMER: we make no guarantees that this grammar works, makes sense, * or can be used to do anything useful. */ /* 1999-2005 Version 3.1 November 2005 * Modified by David Wigg at London South Bank University for CPP_parser.g * * See MyReadMe.txt for further information * * This file is best viewed in courier font with tabs set to 4 spaces */ #ifndef DictEntry_hpp #define DictEntry_hpp class DictEntry { protected: const char *key; int hashCode; DictEntry *next; // next element in the bucket DictEntry *scope; // next element in the scope public: int this_scope; // 4/2/96 LL - added to store scope DictEntry() { key = NULL; hashCode = -1; next = scope = NULL; } DictEntry(const char *k, int h = -1) { key = k; hashCode = h; next = scope = NULL; } virtual ~DictEntry() { key = NULL; hashCode = -1; next = scope = NULL; } void setKey(char *k) { key = k; } const char *getKey() { return key; } void setHashCode(int h) { hashCode = h; } int getHashCode() { return hashCode; } void setNext(DictEntry *n) { next = n; } DictEntry *getNext() { return next; } void setScope(DictEntry *s) { scope = s; } DictEntry *getNextInScope() { return scope; } }; #endif
31.484848
79
0.695541
vaijira
16fc36274b91f2ac0a3e8d0ad54d9fd9ed230d42
2,689
cpp
C++
ndk/cpp/src/exercise/String.cpp
donfyy/AndroidCrowds
05741d128fa7542eafc0565290aef407fb8edab8
[ "Apache-2.0" ]
1
2020-12-04T08:45:04.000Z
2020-12-04T08:45:04.000Z
ndk/cpp/src/exercise/String.cpp
donfyy/Android
896c58d033fcceb53714daec838151935eff7f01
[ "Apache-2.0" ]
null
null
null
ndk/cpp/src/exercise/String.cpp
donfyy/Android
896c58d033fcceb53714daec838151935eff7f01
[ "Apache-2.0" ]
null
null
null
#include <cstring> #include "String.h" ostream &operator<<(ostream &out, MyString &s) { out << s.m_p << endl; return out; } istream &operator>>(istream &in, MyString &s) { in >> s.m_p; return in; } MyString::MyString(int len) { if (len < 0) len = 0; if (len == 0) { m_len = 0; m_p = new char[m_len + 1]; strcpy(m_p, ""); } else { m_len = len; m_p = new char[m_len + 1]; memset(m_p, 0, m_len); } } MyString::MyString(const char *p) { if (p == NULL) { m_len = 0; m_p = new char[m_len + 1]; strcpy(m_p, ""); } else { m_len = strlen(p); m_p = new char[m_len + 1]; strcpy(m_p, p); } } MyString::MyString(const MyString &s) { m_len = s.m_len; m_p = new char[m_len + 1]; strcpy(m_p, s.m_p); } MyString::~MyString() { if (m_p != NULL) { delete[] m_p; m_p = NULL; m_len = -1; } } MyString &MyString::operator=(const char *p) { if (m_p != NULL) { delete[] m_p; } if (p == NULL) { m_len = 0; m_p = new char[m_len + 1]; strcpy(m_p, ""); } else { m_len = strlen(p); m_p = new char[m_len + 1]; strcpy(m_p, p); } return *this; } MyString &MyString::operator=(const MyString &s) { if (this != &s) { // 考虑异常安全性,抛出异常时该实例仍处于有效的状态 MyString temp(s); char* pTemp = temp.m_p; temp.m_p = m_p; m_p = pTemp; m_len = temp.m_len; } return *this; } char &MyString::operator[](int index) { return m_p[index]; } bool MyString::operator==(const char *p) const { if (p == NULL) { return m_len < 1; } else { return m_len == strlen(p) && !strcmp(m_p, p); } } bool MyString::operator!=(const char *p) const { return !(*this == p); } bool MyString::operator==(const MyString &s) const { return m_len != s.m_len || !strcmp(m_p, s.m_p); } bool MyString::operator!=(const MyString &s) const { return !(*this == s); } int MyString::operator<(const char *p) { return strcmp(this->m_p, p); } int MyString::operator>(const char *p) { return strcmp(p, this->m_p); } int MyString::operator<(const MyString &s) { return strcmp(this->m_p, s.m_p); } int MyString::operator>(const MyString &s) { return strcmp(s.m_p, m_p); } char *MyString::c_str() { return m_p; } int MyString::length() { return m_len; }
16.91195
54
0.482707
donfyy
e500886c6683389bdedc36ec89e4aaf3b4e362b2
2,448
cpp
C++
modules/mdns/src/linux/Location.cpp
lubyk/lubyk
e4792099d61c460497aacda1a3c08f23f5bb84ed
[ "MIT" ]
18
2015-05-11T16:18:23.000Z
2021-12-03T09:28:51.000Z
modules/mdns/src/linux/Location.cpp
lubyk/lubyk
e4792099d61c460497aacda1a3c08f23f5bb84ed
[ "MIT" ]
2
2016-07-15T09:13:41.000Z
2019-09-17T11:38:21.000Z
modules/mdns/src/linux/Location.cpp
lubyk/lubyk
e4792099d61c460497aacda1a3c08f23f5bb84ed
[ "MIT" ]
4
2015-05-13T20:26:28.000Z
2021-12-03T09:28:52.000Z
/* ============================================================================== This file is part of the LUBYK project (http://lubyk.org) Copyright (c) 2007-2011 by Gaspard Bucher (http://teti.ch). ------------------------------------------------------------------------------ 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 above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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. ============================================================================== */ #include "dub/dub.h" #include "mdns/Location.h" #include <sstream> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> namespace mdns { unsigned long Location::ip_from_hostname(const char *hostname) { struct addrinfo *result, *result0; unsigned long ip; int error; error = getaddrinfo(hostname, NULL, NULL, &result0); if (error) { throw dub::Exception("Could not resolve '%s' (%s).", hostname, gai_strerror(error)); return Location::NO_IP; } for (result = result0; result; result = result->ai_next) { if (result->ai_family == AF_INET) { // only support AF_INET for now (no IPv6) // sockaddr is a generic raw bunch of bytes, we must cast it first to // an IPv4 struct: struct sockaddr_in *ipv4 = (sockaddr_in*) result->ai_addr; // ip is in sin_addr // we must convert the 32-bit IP from network to host ip = ntohl(ipv4->sin_addr.s_addr); break; } } freeaddrinfo(result0); return ip; } } // mdns
34
88
0.638889
lubyk
e5009c9afd5e8a4a26d29c63fc49171a80100fd6
1,429
cpp
C++
source/utility.cpp
tigeroses/bwa-postalt
74bc52e931a03395708c5038394055a29f1babbf
[ "Unlicense" ]
2
2020-10-21T08:24:48.000Z
2022-01-17T10:04:44.000Z
source/utility.cpp
tigeroses/bwa-postalt
74bc52e931a03395708c5038394055a29f1babbf
[ "Unlicense" ]
null
null
null
source/utility.cpp
tigeroses/bwa-postalt
74bc52e931a03395708c5038394055a29f1babbf
[ "Unlicense" ]
null
null
null
#include "postalt/utility.h" #include <sstream> void split_str(const std::string& s, std::vector<std::string>& v, char c, bool skip_empty) { // std::istringstream iss(str); // std::vector< std::string > res; // for (std::string item; std::getline(iss, item, delim);) // if (skip_empty && item.empty()) // continue; // else // res.push_back(item); // return res; v.clear(); std::string::size_type pos1, pos2; pos2 = s.find(c); pos1 = 0; while(std::string::npos != pos2) { v.push_back(s.substr(pos1, pos2-pos1)); pos1 = pos2 + 1; pos2 = s.find(c, pos1); } if(pos1 != s.length()) v.push_back(s.substr(pos1)); } std::string cat_str(std::vector<std::string>& l, char sep, bool endline) { std::stringstream ss; for (size_t i = 0; i < l.size(); ++i) { ss << l[i]; if (i != (l.size()-1)) ss << sep; } if (endline) ss << '\n'; return ss.str(); } std::vector<std::pair<int, char>> parse_cigar(std::string& s) { std::vector<std::pair<int, char>> res; std::string len_str; for (auto& c : s) { if ('0' <= c && c <= '9') len_str += c; else { if (len_str.empty()) continue; res.push_back({std::stoi(len_str), c}); len_str.clear(); } } return res; }
21.984615
90
0.495451
tigeroses
e5012afcb60d410277ee0fcc00911ca8dbbdc90d
1,025
cc
C++
chromeos/lacros/lacros_test_helper.cc
DamieFC/chromium
54ce2d3c77723697efd22cfdb02aea38f9dfa25c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-10-18T02:33:40.000Z
2020-10-18T02:33:40.000Z
chromeos/lacros/lacros_test_helper.cc
DamieFC/chromium
54ce2d3c77723697efd22cfdb02aea38f9dfa25c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2021-05-17T16:28:52.000Z
2021-05-21T22:42:22.000Z
chromeos/lacros/lacros_test_helper.cc
DamieFC/chromium
54ce2d3c77723697efd22cfdb02aea38f9dfa25c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/lacros/lacros_test_helper.h" #include "base/check.h" #include "chromeos/lacros/lacros_chrome_service_delegate.h" namespace chromeos { ScopedDisableCrosapiForTesting::ScopedDisableCrosapiForTesting() : disable_crosapi_resetter_(&LacrosService::disable_crosapi_for_testing_, true) { // Ensure that no instance exist, to prevent interference. CHECK(!LacrosService::Get()); } // TODO(crbug.com/1196314): Ensure that no instance exist on destruction, too. // Currently, browser_tests' shutdown is an exception. ScopedDisableCrosapiForTesting::~ScopedDisableCrosapiForTesting() = default; ScopedLacrosServiceTestHelper::ScopedLacrosServiceTestHelper() : lacros_service_(/*delegate=*/nullptr) {} ScopedLacrosServiceTestHelper::~ScopedLacrosServiceTestHelper() = default; } // namespace chromeos
35.344828
78
0.76878
DamieFC
e504faf3170b46bf9ef1bc054012488ac4b5f3cf
637
hpp
C++
vm/aging_space.hpp
dch/factor
faacbb58e0738a0612a04b792a3f6ff4929134ff
[ "BSD-2-Clause" ]
null
null
null
vm/aging_space.hpp
dch/factor
faacbb58e0738a0612a04b792a3f6ff4929134ff
[ "BSD-2-Clause" ]
null
null
null
vm/aging_space.hpp
dch/factor
faacbb58e0738a0612a04b792a3f6ff4929134ff
[ "BSD-2-Clause" ]
null
null
null
namespace factor { struct aging_space : bump_allocator { object_start_map starts; aging_space(cell size, cell start) : bump_allocator(size, start), starts(size, start) {} object* allot(cell size) { if (here + size > end) return NULL; object* obj = bump_allocator::allot(size); starts.record_object_start_offset(obj); return obj; } cell next_object_after(cell scan) { cell size = ((object*)scan)->size(); if (scan + size < here) return scan + size; else return 0; } cell first_object() { if (start != here) return start; else return 0; } }; }
18.2
59
0.613815
dch
e5050046cad987b3ef38bb290d7aa2075de6fdaa
918
hpp
C++
include/State/Game.hpp
sarahkittyy/platform.sh
8ddd8f412a70041153f555b4ba5bb56056e804e4
[ "MIT" ]
null
null
null
include/State/Game.hpp
sarahkittyy/platform.sh
8ddd8f412a70041153f555b4ba5bb56056e804e4
[ "MIT" ]
null
null
null
include/State/Game.hpp
sarahkittyy/platform.sh
8ddd8f412a70041153f555b4ba5bb56056e804e4
[ "MIT" ]
null
null
null
#pragma once #include <SFML/Graphics.hpp> #include <memory> #include "Level/Factory/Levels.hpp" #include "Level/Level.hpp" #include "Object/Object.hpp" #include "ResourceManager.hpp" #include "State/Edit.hpp" #include "State/State.hpp" #include "imgui/imgui-SFML.h" #include "imgui/imgui.h" namespace State { /** * @brief Main game state. * */ class Game : public State { public: /// Init the game, and use the test level. Game(); /// Init the game with a pre-generated level. Game(std::shared_ptr<Level::Level> level, bool fromEditor = false); /// Stops the level. ~Game(); void init(); void update(); void on(const sf::Event& event); private: /// The level the game plays. std::shared_ptr<Level::Level> mLevel; /// If we just came from the editor. Enables extra GUI and escaping back to the editor. bool mFromEditor; /// Entry point for editor-related functionality. void fromEditor(); }; }
20.4
88
0.699346
sarahkittyy
e505696107be31a1e366450617a581df89690cc7
10,415
cpp
C++
kernel/src/physicalmemory.cpp
dennis95/dennix
8fee2b2158e350576935ddefa1a207000b9ae77f
[ "0BSD" ]
99
2016-11-02T20:04:44.000Z
2022-03-29T07:27:46.000Z
kernel/src/physicalmemory.cpp
dennis95/dennix
8fee2b2158e350576935ddefa1a207000b9ae77f
[ "0BSD" ]
30
2017-08-10T18:31:55.000Z
2022-03-01T14:10:25.000Z
kernel/src/physicalmemory.cpp
dennis95/dennix
8fee2b2158e350576935ddefa1a207000b9ae77f
[ "0BSD" ]
9
2016-11-01T09:16:42.000Z
2022-02-10T14:10:44.000Z
/* Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021 Dennis Wölfing * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* kernel/src/physicalmemory.cpp * Physical memory management. */ #include <assert.h> #include <dennix/meminfo.h> #include <dennix/kernel/addressspace.h> #include <dennix/kernel/cache.h> #include <dennix/kernel/kthread.h> #include <dennix/kernel/panic.h> #include <dennix/kernel/physicalmemory.h> #include <dennix/kernel/syscall.h> class MemoryStack { public: MemoryStack(void* firstStackPage); void pushPageFrame(paddr_t physicalAddress, bool cache = false); paddr_t popPageFrame(bool cache = false); public: size_t framesOnStack; private: paddr_t* stack; vaddr_t lastStackPage; }; static CacheController* firstCache; static char firstStackPage[PAGESIZE] ALIGNED(PAGESIZE); static size_t framesAvailable; static size_t framesReserved; static MemoryStack memstack(firstStackPage); static size_t totalFrames; static kthread_mutex_t mutex = KTHREAD_MUTEX_INITIALIZER; #ifdef __x86_64__ static char firstStackPage32[PAGESIZE] ALIGNED(PAGESIZE); static MemoryStack memstack32(firstStackPage32); #define totalFramesOnStack (memstack.framesOnStack + memstack32.framesOnStack) #else #define totalFramesOnStack (memstack.framesOnStack) #endif extern "C" { extern symbol_t bootstrapBegin; extern symbol_t bootstrapEnd; extern symbol_t kernelPhysicalBegin; extern symbol_t kernelPhysicalEnd; } static inline bool isUsedByKernel(paddr_t physicalAddress) { return (physicalAddress >= (paddr_t) &bootstrapBegin && physicalAddress < (paddr_t) &bootstrapEnd) || (physicalAddress >= (paddr_t) &kernelPhysicalBegin && physicalAddress < (paddr_t) &kernelPhysicalEnd) || physicalAddress == 0; } static inline bool isUsedByModule(paddr_t physicalAddress, const multiboot_info* multiboot) { uintptr_t p = (uintptr_t) multiboot + 8; while (true) { const multiboot_tag* tag = (const multiboot_tag*) p; if (tag->type == MULTIBOOT_TAG_TYPE_MODULE) { const multiboot_tag_module* moduleTag = (const multiboot_tag_module*) tag; if (physicalAddress >= moduleTag->mod_start && physicalAddress < moduleTag->mod_end) { return true; } } if (tag->type == MULTIBOOT_TAG_TYPE_END) { return false; } p = ALIGNUP(p + tag->size, 8); } } static inline bool isUsedByMultiboot(paddr_t physicalAddress, paddr_t multibootPhys, paddr_t multibootEnd) { return physicalAddress >= multibootPhys && physicalAddress < multibootEnd; } void PhysicalMemory::initialize(const multiboot_info* multiboot) { uintptr_t p = (uintptr_t) multiboot + 8; const multiboot_tag* tag; while (true) { tag = (const multiboot_tag*) p; if (tag->type == MULTIBOOT_TAG_TYPE_MMAP) { break; } if (tag->type == MULTIBOOT_TAG_TYPE_END) { PANIC("Bootloader did not provide a memory map."); } p = ALIGNUP(p + tag->size, 8); } const multiboot_tag_mmap* mmapTag = (const multiboot_tag_mmap*) tag; vaddr_t mmap = (vaddr_t) mmapTag->entries; vaddr_t mmapEnd = mmap + (tag->size - sizeof(*mmapTag)); paddr_t multibootPhys = kernelSpace->getPhysicalAddress( (vaddr_t) multiboot & ~PAGE_MISALIGN); paddr_t multibootEnd = multibootPhys + ALIGNUP(multiboot->total_size + ((vaddr_t) multiboot & PAGE_MISALIGN), PAGESIZE); while (mmap < mmapEnd) { multiboot_mmap_entry* mmapEntry = (multiboot_mmap_entry*) mmap; if (mmapEntry->type == MULTIBOOT_MEMORY_AVAILABLE && mmapEntry->addr + mmapEntry->len <= UINTPTR_MAX) { paddr_t addr = (paddr_t) mmapEntry->addr; for (uint64_t i = 0; i < mmapEntry->len; i += PAGESIZE) { totalFrames++; if (isUsedByModule(addr + i, multiboot) || isUsedByKernel(addr + i) || isUsedByMultiboot(addr + i, multibootPhys, multibootEnd)) { continue; } pushPageFrame(addr + i); } } mmap += mmapTag->entry_size; } } MemoryStack::MemoryStack(void* firstStackPage) { stack = (paddr_t*) firstStackPage + 1; framesOnStack = 0; lastStackPage = (vaddr_t) firstStackPage; } void MemoryStack::pushPageFrame(paddr_t physicalAddress, bool cache /*= false*/) { if (((vaddr_t) (stack + 1) & PAGE_MISALIGN) == 0) { paddr_t* stackPage = (paddr_t*) ((vaddr_t) stack & ~PAGE_MISALIGN); if (*(stackPage + 1) == 0) { // We need to unlock the mutex because AddressSpace::mapPhysical // might need to pop page frames from the stack. kthread_mutex_unlock(&mutex); vaddr_t nextStackPage = kernelSpace->mapPhysical(physicalAddress, PAGESIZE, PROT_READ | PROT_WRITE); kthread_mutex_lock(&mutex); if (cache) framesAvailable--; if (unlikely(nextStackPage == 0)) { // If we cannot save the address, we have to leak it. return; } *((paddr_t*) lastStackPage + 1) = nextStackPage; *(vaddr_t*) nextStackPage = lastStackPage; *((paddr_t*) nextStackPage + 1) = 0; lastStackPage = nextStackPage; return; } else { stack = (paddr_t*) *(stackPage + 1) + 1; } } *++stack = physicalAddress; framesOnStack++; if (!cache) { framesAvailable++; } } void PhysicalMemory::pushPageFrame(paddr_t physicalAddress) { assert(physicalAddress); assert(PAGE_ALIGNED(physicalAddress)); AutoLock lock(&mutex); #ifdef __x86_64__ if (physicalAddress <= 0xFFFFF000) { memstack32.pushPageFrame(physicalAddress); return; } #endif memstack.pushPageFrame(physicalAddress); } paddr_t MemoryStack::popPageFrame(bool cache /*= false*/) { if (((vaddr_t) stack & PAGE_MISALIGN) < 2 * sizeof(paddr_t)) { paddr_t* stackPage = (paddr_t*) ((vaddr_t) stack & ~PAGE_MISALIGN); assert(*stackPage != 0); stack = (paddr_t*) (*stackPage + PAGESIZE - sizeof(paddr_t)); } framesOnStack--; if (!cache) { framesAvailable--; } return *stack--; } paddr_t PhysicalMemory::popPageFrame() { AutoLock lock(&mutex); if (framesAvailable - framesReserved == 0) return 0; if (totalFramesOnStack - framesReserved > 0) { if (memstack.framesOnStack > 0) { return memstack.popPageFrame(); } #ifdef __x86_64__ return memstack32.popPageFrame(); #endif } for (CacheController* cache = firstCache; cache; cache = cache->nextCache) { paddr_t result = cache->reclaimCache(); if (result) return result; } return 0; } #ifdef __x86_64__ paddr_t PhysicalMemory::popPageFrame32() { AutoLock lock(&mutex); if (memstack32.framesOnStack == 0) return 0; return memstack32.popPageFrame(); } #else paddr_t PhysicalMemory::popPageFrame32() { return popPageFrame(); } #endif paddr_t PhysicalMemory::popReserved() { AutoLock lock(&mutex); assert(framesReserved > 0); framesReserved--; #ifdef __x86_64__ if (memstack.framesOnStack > 0) { return memstack.popPageFrame(); } return memstack32.popPageFrame(); #else return memstack.popPageFrame(); #endif } bool PhysicalMemory::reserveFrames(size_t frames) { AutoLock lock(&mutex); if (framesAvailable - framesReserved < frames) return false; // Make sure that reserved frames on the stack because memory used for // caching can be unreclaimable for a short time frame. while (totalFramesOnStack < framesReserved + frames) { paddr_t address = 0; for (CacheController* cache = firstCache; cache; cache = cache->nextCache) { address = cache->reclaimCache(); if (address) break; } if (address) { #ifdef __x86_64__ if (address <= 0xFFFFF000) { memstack32.pushPageFrame(address, true); } else #endif memstack.pushPageFrame(address, true); } else { return false; } } framesReserved += frames; return true; } void PhysicalMemory::unreserveFrames(size_t frames) { AutoLock lock(&mutex); assert(framesReserved >= frames); framesReserved -= frames; } CacheController::CacheController() { nextCache = firstCache; firstCache = this; } paddr_t CacheController::allocateCache() { AutoLock lock(&mutex); if (framesAvailable - framesReserved == 0) { return 0; } if (totalFramesOnStack - framesReserved > 0) { if (memstack.framesOnStack > 0) { return memstack.popPageFrame(true); } #ifdef __x86_64__ return memstack32.popPageFrame(true); #endif } for (CacheController* cache = firstCache; cache; cache = cache->nextCache) { if (cache == this) continue; paddr_t result = cache->reclaimCache(); if (result) return result; } return reclaimCache(); } void CacheController::returnCache(paddr_t address) { AutoLock lock(&mutex); memstack.pushPageFrame(address, true); } void Syscall::meminfo(struct meminfo* info) { AutoLock lock(&mutex); info->mem_total = totalFrames * PAGESIZE; info->mem_free = totalFramesOnStack * PAGESIZE; info->mem_available = framesAvailable * PAGESIZE; info->__reserved = 0; }
29.672365
80
0.644263
dennis95
e505ff14c7a9605922d8bffdd13c4caccc58323b
206
cpp
C++
Classes/NeuralNetworks/NeuronLayer.cpp
Ervadar/SmartShooters
7f861ae62a9b9add00639a82d473bfa345a2470d
[ "MIT" ]
null
null
null
Classes/NeuralNetworks/NeuronLayer.cpp
Ervadar/SmartShooters
7f861ae62a9b9add00639a82d473bfa345a2470d
[ "MIT" ]
null
null
null
Classes/NeuralNetworks/NeuronLayer.cpp
Ervadar/SmartShooters
7f861ae62a9b9add00639a82d473bfa345a2470d
[ "MIT" ]
null
null
null
#include "NeuronLayer.h" NeuronLayer::NeuronLayer(int neuronCount, int inPutsPerNeuron) : neuronCount(neuronCount) { for (int i = 0; i < neuronCount; ++i) neurons.push_back(Neuron(inPutsPerNeuron)); }
22.888889
62
0.742718
Ervadar
e50612448af0ef739e67d81bdeac2c3d016b6d0a
7,340
cpp
C++
wxWidgets/UserInterface/AboutDialog.cpp
st-gb/CPUinfoAndControl
5e93d4a195b4692d147bb05cfef534e38d7f8b64
[ "MIT" ]
null
null
null
wxWidgets/UserInterface/AboutDialog.cpp
st-gb/CPUinfoAndControl
5e93d4a195b4692d147bb05cfef534e38d7f8b64
[ "MIT" ]
null
null
null
wxWidgets/UserInterface/AboutDialog.cpp
st-gb/CPUinfoAndControl
5e93d4a195b4692d147bb05cfef534e38d7f8b64
[ "MIT" ]
1
2021-07-16T21:01:26.000Z
2021-07-16T21:01:26.000Z
/* Do not remove this header/ copyright information. * * Copyright © Trilobyte Software Engineering GmbH, Berlin, Germany 2010-2011. * You are allowed to modify and use the source code from * Trilobyte Software Engineering GmbH, Berlin, Germany for free if you are not * making profit with it or its adaption. Else you may contact Trilobyte SE. */ /* * AboutDialog.cpp * * Created on: Oct 3, 2010 * Author: Stefan */ //class CPUcontrolBase::s_ar_tchInstableCPUcoreVoltageWarning #include <Controller/CPUcontrolBase.hpp> #include <Controller/MainController.hpp>//MainController::GetSupportedCPUs(...) #include <ModelData/ModelData.hpp> //class Model #include <preprocessor_macros/BuildTimeString.h> //BUILT_TIME #include <wxWidgets/UserInterface/AboutDialog.hpp> #include <wxWidgets/Controller/character_string/wxStringHelper.hpp> #include <wx/bitmap.h> //class wxBitmap //#include <wx/dialog.h> //for base class wxDialog //#include <wx/stattext.h> //class wxStaticText #include <wx/textctrl.h> //class wxTextCtrl #include <wx/statbmp.h> //class wxStaticBitmap #include <wx/string.h> //class wxString #include <wx/sizer.h> //class wxBoxSizer #include <compiler/GCC/enable_disable_write_strings_warning.h> //IGNORE_WRITE_STRINGS_WARNING //GCC_DIAG_ON(write-strings) //GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,write-strings)) //GCC_DIAG_DO_PRAGMA(GCC diagnostic x) _Pragma("GCC diagnostic ignored \"-Wwrite-strings\"") #include <images/street_lamp_80x321_256_indexed_colors.xpm> ENABLE_WRITE_STRINGS_WARNING //Lebensweisheiten: wxString g_ar_wxstrWorldlyWisdom [] = { wxT("Happiness is only real when shared--Alexander Supertramp") , wxT("People (even criminal) usually are the result of the interaction " "between them and their environment") }; WORD g_wNumberOfWorldlyWisdomStrings = 2; wxString GetRandomWorldlyWisdom( const std::map<uint16_t,std::string> & c_r_std_set_WisdomStrings) { if( c_r_std_set_WisdomStrings.size() > 0 ) { //from http://www.cplusplus.com/reference/clibrary/cstdlib/rand/: /* initialize random seed: */ srand ( time(NULL) ); /* generate random number: */ int nRandomNumber = rand() % //g_wNumberOfWorldlyWisdomStrings; c_r_std_set_WisdomStrings.size(); // m_c_r_model_data.m_std_vec_WisdomStrings. return //g_ar_wxstrWorldlyWisdom[nRandomNumber]; wxWidgets::GetwxString_Inline(c_r_std_set_WisdomStrings.find( nRandomNumber)->second.c_str() ); } return wxT(""); } void GetAboutMessage(wxString & wxstrMessage, const std::map<uint16_t,std::string> & c_r_std_vec_WisdomStrings) { std::tstring stdtstr ; std::vector<std::tstring> stdvec_stdtstring ; // wxString wxstrMessage ; MainController::GetSupportedCPUs(stdvec_stdtstring) ; for(BYTE by = 0 ; by < stdvec_stdtstring.size() ; by ++ ) { stdtstr += _T("-") + stdvec_stdtstring.at(by) + _T("\n") ; } if( stdtstr.empty() ) wxstrMessage += _T("A tool for giving information about and controlling " "x86 CPUs"); else wxstrMessage += //We need a wxT()/ _T() macro (wide char-> L"", char->"") for EACH //line to make it compatible between char and wide char. wxT("A tool for giving information about and controlling x86 CPUs ") wxT("(built-in):\n") + stdtstr + wxT( "\n") wxT("and for other CPUs as dynamic library") ; wxstrMessage += wxT("\n\n") //"Build: " __DATE__ " " __TIME__ "GMT\n\n" //#ifdef _WIN32 // BUILT_TIME //+ _T("") + wxT("Build:") wxT(__DATE__) wxT(" ") wxT(__TIME__) wxT(" GMT + 1") //#endif wxT("\nbuilt with compiler version:") //_T( STRINGIFY(COMPILER_VERSION) ) //wxT("compiled/ built with:") #ifdef __MINGW32__ wxT("MinGW32 ") #endif #ifdef __GNUC__ wxT("GCC ") //wxT("version ") #endif wxT( COMPILER_VERSION_NUMBER ) wxT("\nusing wxWidgets " ) wxVERSION_NUM_DOT_STRING_T //COMPILER_VERSION wxT("\n\n"); //"AMD--smarter choice than Intel?\n\n" //"To ensure a stable operation:\n" // _T("To give important information (that already may be contained in ") // _T("the documentation):\n") // _T("When undervolting there may be system instability when switching ") // _T("from power supply operation to battery mode\n") // _T("So test for this case if needed: test for the different p-states, ") // _T("especially for the ones that are much undervolted.\n") wxstrMessage += CPUcontrolBase::s_ar_tchInstableCPUcoreVoltageWarning; wxstrMessage += wxT("\n\n") wxT("If the system is instable, heighten the voltage(s).\n") wxT("Note that the OS may freeze if changing voltages, so you may ") wxT("encounter data loss.\n->save all of your work before.\n\n") //" -when switching from power supply operation to battery,\n" //_T("Licence/ info: http://amd.goexchange.de / http://sw.goexchange.de") wxT("Licence/ info: http://www.trilobyte-se.de/x86iandc") wxT("\n\n") + GetRandomWorldlyWisdom(c_r_std_vec_WisdomStrings) ; } AboutDialog::AboutDialog( const Model & c_r_model_data, const wxString & cr_wxstrProgramName ) : wxDialog( NULL, wxID_ANY , _T("About ") + cr_wxstrProgramName, // ::GetwxString_Inline(c_r_model_data.m_stdtstrProgramName.c) wxDefaultPosition, // wxDefaultSize, wxSize(600, 400), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ), m_c_r_model_data(c_r_model_data) { wxString wxstrMessage ; GetAboutMessage(wxstrMessage, c_r_model_data.m_userinterfaceattributes. m_std_vec_WisdomStrings) ; wxBoxSizer * p_wxboxsizer = new wxBoxSizer(wxHORIZONTAL) ; wxTextCtrl * p_wxtextctrl = new //wxStaticText( wxTextCtrl( this, // NULL, wxID_ANY, wxstrMessage , wxDefaultPosition, wxDefaultSize #ifdef __WXGTK___ //http://docs.wxwidgets.org/trunk/classwx_static_text.html // #fcba401f2915146b1ce25b90c9499ccb: //"This function allows to set decorated static label text, when the //wxST_MARKUP style is used, on those platforms which support it //(currently only GTK+ 2). For the other platforms or when wxST_MARKUP is //not used, the markup is ignored" ,wxST_MARKUP // to allow to select and copy text. #endif , //prevent editing the text wxTE_READONLY | wxTE_MULTILINE ); // AddChild( p_wxtextctrl) ; p_wxboxsizer->Add(p_wxtextctrl, 1 //1=the control should take more space if the sizer is enlarged , wxEXPAND ); wxBitmap wxbitmapStreetLamp(street_lamp_80x321_256_indexed_colors_xpm); // wxPanel * p_wxpanel = new wxPanel(); // p_wxpanel->SetB //from http://ubuntuforums.org/archive/index.php/t-1486783.html //("[SOLVED] [C++/wx] wxStaticBitmap->SetBitmap(wxBitmap) = "Segmentation fault") wxStaticBitmap * p_wxstaticbitmap = new wxStaticBitmap//(); (this, wxID_ANY, wxbitmapStreetLamp); p_wxstaticbitmap->SetToolTip( wxT("a street lamp from former GDR " "symbolizing East Berlin")); // p_wxstaticbitmap->SetBitmap(wxbitmapStreetLamp); p_wxboxsizer->Add( p_wxstaticbitmap); SetSizer(p_wxboxsizer); // AddChild(p_wxstaticbitmap); // SetSizeHints(this); // Fit(this); //Force the neighbour controls of "voltage in volt" to be resized. Layout() ; } AboutDialog::~AboutDialog() { // TODO Auto-generated destructor stub }
35.119617
83
0.703951
st-gb
e5070f75689070b6c6d608fe5e799a91ea5c3dfc
13,280
cpp
C++
legacy/hershey-fonts.cpp
AnyTimeTraveler/ReMarkable2Typewriter
2ec4e124a5704de598cb1b5940ba40ad830240eb
[ "MIT" ]
null
null
null
legacy/hershey-fonts.cpp
AnyTimeTraveler/ReMarkable2Typewriter
2ec4e124a5704de598cb1b5940ba40ad830240eb
[ "MIT" ]
null
null
null
legacy/hershey-fonts.cpp
AnyTimeTraveler/ReMarkable2Typewriter
2ec4e124a5704de598cb1b5940ba40ad830240eb
[ "MIT" ]
null
null
null
#include "ccow.h" #include <stdlib.h> #include <string.h> #include <linux/input.h> // The font data here was modified from // http://paulbourke.net/dataformats/hershey/ // Compiled by Paul Bourke in 1997. static const int8_t hershey_font_simplex_compact[95][112] = { /* num_stroke_pts, width, stroke_data 21=top, 0=bottom */ /* Ascii 32 */ { 0, 16, }, /* ! Ascii 33 */ { 8, 10, 5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2,}, /* " Ascii 34 */ { 5, 16, 4,21,4,14,-1,-1,12,21,12,14,}, /* # Ascii 35 */ {11, 21, 11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6,}, /* $ Ascii 36 */ {26, 20, 8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3,}, /* % Ascii 37 */ {31, 24, 21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7,}, /* & Ascii 38 */ {34, 26, 23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2,}, /* ' Ascii 39 */ { 7, 10, 5,19,4,20,5,21,6,20,6,18,5,16,4,15,}, /* ( Ascii 40 */ {10, 14, 11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7,}, /* ) Ascii 41 */ {10, 14, 3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7,}, /* * Ascii 42 */ { 8, 16, 8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12,}, /* + Ascii 43 */ { 5, 26, 13,18,13,0,-1,-1,4,9,22,9,}, /* , Ascii 44 */ { 8, 10, 6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4,}, /* - Ascii 45 */ { 2, 26, 4,9,22,9,}, /* . Ascii 46 */ { 5, 10, 5,2,4,1,5,0,6,1,5,2,}, /* / Ascii 47 */ { 2, 22, 20,25,2,-7,}, /* 0 Ascii 48 */ {17, 20, 9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21,}, /* 1 Ascii 49 */ { 4, 20, 8,19,10,20,11,21,11,0,}, /* 2 Ascii 50 */ {14, 20, 4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0,}, /* 3 Ascii 51 */ {15, 20, 5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4,}, /* 4 Ascii 52 */ { 6, 20, 13,21,3,7,18,7,-1,-1,13,21,13,0,}, /* 5 Ascii 53 */ {17, 20, 15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4,}, /* 6 Ascii 54 */ {23, 20, 16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7,}, /* 7 Ascii 55 */ { 5, 20, 17,21,7,0,-1,-1,3,21,17,21,}, /* 8 Ascii 56 */ {29, 20, 8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21,}, /* 9 Ascii 57 */ {23, 20, 16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3,}, /* : Ascii 58 */ {11, 10, 5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2,}, /* ; Ascii 59 */ {14, 10, 5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4,}, /* < Ascii 60 */ { 3, 24, 20,18,4,9,20,0,}, /* = Ascii 61 */ { 5, 26, 4,12,22,12,-1,-1,4,6,22,6,}, /* > Ascii 62 */ { 3, 24, 4,18,20,9,4,0,}, /* ? Ascii 63 */ {20, 18, 3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2,}, /* @ Ascii 64 */ {55, 27, 18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5,}, /* A Ascii 65 */ { 8, 18, 9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7,}, /* B Ascii 66 */ {23, 21, 4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0,}, /* C Ascii 67 */ {18, 21, 18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,}, /* D Ascii 68 */ {15, 21, 4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0,}, /* E Ascii 69 */ {11, 19, 4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0,}, /* F Ascii 70 */ { 8, 18, 4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,}, /* G Ascii 71 */ {22, 21, 18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8,}, /* H Ascii 72 */ { 8, 22, 4,21,4,0, -1,-1 ,4,11,18,11, -1,-1, 18,21,18,0, }, /* I Ascii 73 */ { 2, 8, 4,21,4,0,}, /* J Ascii 74 */ {10, 16, 12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7,}, /* K Ascii 75 */ { 8, 21, 4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0,}, /* L Ascii 76 */ { 5, 17, 4,21,4,0,-1,-1,4,0,16,0,}, /* M Ascii 77 */ { 8, 24, 4,0,4,21, 4,21,12,0, 12,0,20,21, 20,21,20,0,}, /* N Ascii 78 */ { 6, 22, 4,0,4,21, 4,21,18,0, 18,0,18,21,}, /* O Ascii 79 */ {21, 22, 9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,}, /* P Ascii 80 */ {13, 21, 4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10,}, /* Q Ascii 81 */ {24, 22, 9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2,}, /* R Ascii 82 */ {16, 21, 4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0,}, /* S Ascii 83 */ {20, 20, 17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3,}, /* T Ascii 84 */ { 5, 16, 8,21,8,0,-1,-1,1,21,15,21,}, /* U Ascii 85 */ {10, 22, 4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21,}, /* V Ascii 86 */ { 5, 18, 1,21,9,0,-1,-1,17,21,9,0,}, /* W Ascii 87 */ {11, 24, 2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0,}, /* X Ascii 88 */ { 5, 20, 3,21,17,0,-1,-1,17,21,3,0,}, /* Y Ascii 89 */ { 6, 18, 1,21,9,11,17,21, -1,-1, 9,11,9,0}, /* Z Ascii 90 */ { 6, 20, 3,21,17,21, 17,21,3,0, 3,0,17,0,}, /* [ Ascii 91 */ { 4, 14, 11,25,4,25,4,-7,11,-7,}, /* \ Ascii 92 */ { 2, 14, 0,21,14,-3,}, /* ] Ascii 93 */ { 4, 14, 3,25,10,25,10,-7,3,-7}, /* ^ Ascii 94 */ {10, 16, 6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0,}, /* _ Ascii 95 */ { 2, 16, 0,-2,16,-2,}, /* ` Ascii 96 */ { 7, 10, 6,21,5,20,4,18,4,16,5,15,6,16,5,17,}, /* a Ascii 97 */ {17, 19, 15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3, -1,-1,15,14,15,0,}, /* b Ascii 98 */ {17, 19, 4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3,}, /* c Ascii 99 */ {14, 18, 15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,}, /* d Ascii 100 */ {17, 19, 15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,}, /* e Ascii 101 */ {17, 18, 3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,}, /* f Ascii 102 */ { 8, 12, 10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14,}, /* g Ascii 103 */ {22, 19, 15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3, -1,-1,15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,}, /* h Ascii 104 */ {10, 19, 4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,}, /* i Ascii 105 */ { 8, 8, 3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0,}, /* j Ascii 106 */ {11, 10, 5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7,}, /* k Ascii 107 */ { 8, 17, 4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0,}, /* l Ascii 108 */ { 2, 8, 4,21,4,0,}, /* m Ascii 109 */ {18, 30, 4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0,}, /* n Ascii 110 */ {10, 19, 4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,}, /* o Ascii 111 */ {17, 19, 8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14,}, /* p Ascii 112 */ {17, 19, 4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3,}, /* q Ascii 113 */ {17, 19, 15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3, -1,-1,15,14,15,-7,}, /* r Ascii 114 */ { 8, 13, 4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14,}, /* s Ascii 115 */ {17, 17, 14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3,}, /* t Ascii 116 */ { 8, 12, 5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14,}, /* u Ascii 117 */ {10, 19, 4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0,}, /* v Ascii 118 */ { 5, 16, 2,14,8,0,-1,-1,14,14,8,0,}, /* w Ascii 119 */ { 5, 22, 3,14,7,0,11,14,15,0,19,14,}, /* x Ascii 120 */ { 5, 17, 3,14,14,0,-1,-1,14,14,3,0,}, /* y Ascii 121 */ { 9, 16, 2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7,}, /* z Ascii 122 */ { 6, 17, 3,14,14,14, 14,14,3,0, 3,0,14,0,}, /* { Ascii 123 */ {39, 14, 9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7,}, /* | Ascii 124 */ { 2, 8, 4,25,4,-7,}, /* } Ascii 125 */ {39, 14, 5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7,}, /* ~ Ascii 126 */ {23, 24, 3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12,}, }; const int8_t* get_font_char(const char* font_name, char ascii_value, int& out_num_verts, int& out_horiz_dist) { if (1 || !strcmp(font_name, "hershey")) { if (ascii_value >= 32 && ascii_value <= 126) { const int8_t* char_data = hershey_font_simplex_compact[ascii_value - 32]; out_num_verts = char_data[0]; out_horiz_dist = char_data[1]; return char_data + 2; } } return NULL; } char keycode_to_ascii(int keycode, int mods) { if (mods & (MOD_CTRL|MOD_ALT)) { // Do whatever we want here. Maybe launch VNC? return 0; } switch (keycode) { case KEY_SEMICOLON: return (mods & MOD_SHIFT) ? ':' : ';'; break; case KEY_LEFTBRACE: return (mods & MOD_SHIFT) ? '{' : '['; break; case KEY_RIGHTBRACE: return (mods & MOD_SHIFT) ? '}' : ']'; break; case KEY_MINUS: return (mods & MOD_SHIFT) ? '_' : '-'; break; case KEY_EQUAL: return (mods & MOD_SHIFT) ? '+' : '='; break; case KEY_APOSTROPHE: return (mods & MOD_SHIFT) ? '\"' : '\''; break; case KEY_GRAVE: return (mods & MOD_SHIFT) ? '~' : '`'; break; case KEY_BACKSLASH: return (mods & MOD_SHIFT) ? '|' : '\\'; break; case KEY_COMMA: return (mods & MOD_SHIFT) ? '<' : ','; break; case KEY_DOT: return (mods & MOD_SHIFT) ? '>' : '.'; break; case KEY_SLASH: return (mods & MOD_SHIFT) ? '?' : '/'; break; case KEY_SPACE: return ' '; break; case KEY_0: return (mods & MOD_SHIFT) ? ')' : '0'; break; case KEY_1: return (mods & MOD_SHIFT) ? '!' : '1'; break; case KEY_2: return (mods & MOD_SHIFT) ? '@' : '2'; break; case KEY_3: return (mods & MOD_SHIFT) ? '#' : '3'; break; case KEY_4: return (mods & MOD_SHIFT) ? '$' : '4'; break; case KEY_5: return (mods & MOD_SHIFT) ? '%' : '5'; break; case KEY_6: return (mods & MOD_SHIFT) ? '^' : '6'; break; case KEY_7: return (mods & MOD_SHIFT) ? '&' : '7'; break; case KEY_8: return (mods & MOD_SHIFT) ? '*' : '8'; break; case KEY_9: return (mods & MOD_SHIFT) ? '(' : '9'; break; case KEY_A: return (mods & MOD_CAPS) ? 'A' : 'a'; break; case KEY_B: return (mods & MOD_CAPS) ? 'B' : 'b'; break; case KEY_C: return (mods & MOD_CAPS) ? 'C' : 'c'; break; case KEY_D: return (mods & MOD_CAPS) ? 'D' : 'd'; break; case KEY_E: return (mods & MOD_CAPS) ? 'E' : 'e'; break; case KEY_F: return (mods & MOD_CAPS) ? 'F' : 'f'; break; case KEY_G: return (mods & MOD_CAPS) ? 'G' : 'g'; break; case KEY_H: return (mods & MOD_CAPS) ? 'H' : 'h'; break; case KEY_I: return (mods & MOD_CAPS) ? 'I' : 'i'; break; case KEY_J: return (mods & MOD_CAPS) ? 'J' : 'j'; break; case KEY_K: return (mods & MOD_CAPS) ? 'K' : 'k'; break; case KEY_L: return (mods & MOD_CAPS) ? 'L' : 'l'; break; case KEY_M: return (mods & MOD_CAPS) ? 'M' : 'm'; break; case KEY_N: return (mods & MOD_CAPS) ? 'N' : 'n'; break; case KEY_O: return (mods & MOD_CAPS) ? 'O' : 'o'; break; case KEY_P: return (mods & MOD_CAPS) ? 'P' : 'p'; break; case KEY_Q: return (mods & MOD_CAPS) ? 'Q' : 'q'; break; case KEY_R: return (mods & MOD_CAPS) ? 'R' : 'r'; break; case KEY_S: return (mods & MOD_CAPS) ? 'S' : 's'; break; case KEY_T: return (mods & MOD_CAPS) ? 'T' : 't'; break; case KEY_U: return (mods & MOD_CAPS) ? 'U' : 'u'; break; case KEY_V: return (mods & MOD_CAPS) ? 'V' : 'v'; break; case KEY_W: return (mods & MOD_CAPS) ? 'W' : 'w'; break; case KEY_X: return (mods & MOD_CAPS) ? 'X' : 'x'; break; case KEY_Y: return (mods & MOD_CAPS) ? 'Y' : 'y'; break; case KEY_Z: return (mods & MOD_CAPS) ? 'Z' : 'z'; break; default: return 0; break; } }
71.397849
318
0.511521
AnyTimeTraveler
e508c4e16634932390f17cb50144cc917c55742f
4,861
cpp
C++
bde_verify/checks/csabbg/test-driver/1/conversion.t.cpp
gstrauss/bde-tools
7dc88b2b87d9331d988aad71c42905b923db584d
[ "Apache-2.0" ]
null
null
null
bde_verify/checks/csabbg/test-driver/1/conversion.t.cpp
gstrauss/bde-tools
7dc88b2b87d9331d988aad71c42905b923db584d
[ "Apache-2.0" ]
null
null
null
bde_verify/checks/csabbg/test-driver/1/conversion.t.cpp
gstrauss/bde-tools
7dc88b2b87d9331d988aad71c42905b923db584d
[ "Apache-2.0" ]
null
null
null
#include <stdlib.h> #include <bsl_iostream.h> namespace bde_verify { } using namespace bde_verify; using namespace bsl; //============================================================================= // TEST PLAN //----------------------------------------------------------------------------- // Overview // -------- // Nothing. //----------------------------------------------------------------------------- // [ 1] operator int &(); // [ 1] operator const int &() const; //----------------------------------------------------------------------------- // ============================================================================ // STANDARD BSL ASSERT TEST FUNCTION // ---------------------------------------------------------------------------- namespace { int testStatus = 0; void aSsErT(bool condition, const char *message, int line) { if (condition) { printf("Error " __FILE__ "(%d): %s (failed)\n", line, message); if (0 <= testStatus && testStatus <= 100) { ++testStatus; } } } } // close unnamed namespace // ============================================================================ // STANDARD BDE TEST DRIVER MACRO ABBREVIATIONS // ---------------------------------------------------------------------------- #define ASSERT BDLS_TESTUTIL_ASSERT #define ASSERTV BDLS_TESTUTIL_ASSERTV #define LOOP_ASSERT BDLS_TESTUTIL_LOOP_ASSERT #define LOOP0_ASSERT BDLS_TESTUTIL_LOOP0_ASSERT #define LOOP1_ASSERT BDLS_TESTUTIL_LOOP1_ASSERT #define LOOP2_ASSERT BDLS_TESTUTIL_LOOP2_ASSERT #define LOOP3_ASSERT BDLS_TESTUTIL_LOOP3_ASSERT #define LOOP4_ASSERT BDLS_TESTUTIL_LOOP4_ASSERT #define LOOP5_ASSERT BDLS_TESTUTIL_LOOP5_ASSERT #define LOOP6_ASSERT BDLS_TESTUTIL_LOOP6_ASSERT #define Q BDLS_TESTUTIL_Q // Quote identifier literally. #define P BDLS_TESTUTIL_P // Print identifier and value. #define P_ BDLS_TESTUTIL_P_ // P(X) without '\n'. #define T_ BDLS_TESTUTIL_T_ // Print a tab (w/o newline). #define L_ BDLS_TESTUTIL_L_ // current Line number //@CLASSES: // joe : just a class namespace bde_verify { struct joe { operator int &(); operator const int &() const; }; } //============================================================================= // MAIN PROGRAM //----------------------------------------------------------------------------- int main(int argc, char *argv[]) { int test = argc > 1 ? atoi(argv[1]) : 0; bool verbose = argc > 2; switch (test) { case 1: { // -------------------------------------------------------------------- // DETECT UNCALLED METHODS // // Concerns: //: 1 Bde_verify detects uncalled methods. // // Plan: //: 1 Don't call some methods. //: 2 See whether bde_verify notices. //: 3 ??? //: 4 Profit! // // Testing: // operator int &(); // operator const int &() const; // -------------------------------------------------------------------- if (verbose) cout << endl << "DETECT UNCALLED METHODS" << endl << "=======================" << endl; joe j, &rj = j, *pj = &j; int &i = j; const joe c = { }; const int &k = c; } break; } return testStatus; } // ---------------------------------------------------------------------------- // Copyright (C) 2014 Bloomberg Finance L.P. // // 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 above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // 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. // ----------------------------- END-OF-FILE ----------------------------------
36.007407
79
0.476034
gstrauss
e50aed423e5cdbe81d5eaf3e19783ae564f3dbf0
3,310
hpp
C++
DoremiEditor/DRMEditorPlugin/Include/Plugin.hpp
meraz/doremi
452d08ebd10db50d9563c1cf97699571889ab18f
[ "MIT" ]
1
2020-03-23T15:42:05.000Z
2020-03-23T15:42:05.000Z
DoremiEditor/DRMEditorPlugin/Include/Plugin.hpp
Meraz/ssp15
452d08ebd10db50d9563c1cf97699571889ab18f
[ "MIT" ]
null
null
null
DoremiEditor/DRMEditorPlugin/Include/Plugin.hpp
Meraz/ssp15
452d08ebd10db50d9563c1cf97699571889ab18f
[ "MIT" ]
1
2020-03-23T15:42:06.000Z
2020-03-23T15:42:06.000Z
#pragma once // some definitions for the DLL to play nice with Maya #define NT_PLUGIN #define REQUIRE_IOSTREAM #define EXPORT __declspec(dllexport) #include <stdlib.h> #include <iostream> #include <string> #include <vector> #include <queue> #include <maya/MEvent.h> #include <maya/MFnPlugin.h> #include <maya/MFnMesh.h> #include <maya/MFnTransform.h> #include <maya/MFloatPointArray.h> #include <maya/MPointArray.h> #include <maya/MIntArray.h> #include <maya/MPoint.h> #include <maya/MMatrix.h> #include <maya/MFloatMatrix.h> #include <maya/MEulerRotation.h> #include <maya/MVector.h> #include <maya/MItDag.h> #include <maya/MFnCamera.h> #include <maya/M3dView.h> #include <maya/MItMeshPolygon.h> #include <maya/MPlugArray.h> #include <maya/MFnDependencyNode.h> #include <maya/MFnLambertShader.h> #include <maya/MFnBlinnShader.h> #include <maya/MFnPhongShader.h> #include <maya/MImage.h> #include <maya/MFnPointLight.h> #include <maya/MSelectionList.h> #include <maya/MItDependencyNodes.h> #include <maya/MFnDirectionalLight.h> #include <maya/MFnSpotLight.h> #include <maya/MFnPointLight.h> #include <maya/M3dView.h> #include <maya/MTransformationMatrix.h> #include <maya/MMatrix.h> // Wrappers #include <maya/MGlobal.h> #include <maya/MCallbackIdArray.h> // Messages #include <maya/MMessage.h> #include <maya/MTimerMessage.h> #include <maya/MDGMessage.h> #include <maya/MEventMessage.h> #include <maya/MPolyMessage.h> #include <maya/MNodeMessage.h> #include <maya/MDagPath.h> #include <maya/MDagMessage.h> #include <maya/MUiMessage.h> #include <maya/MModelMessage.h> #include <maya/MCameraSetMessage.h> #include <maya/MLockMessage.h> #include <FileMap.hpp> // Commands #include <maya/MPxCommand.h> std::vector<std::string> msgTypeVector; FileMapping fileMap; M3dView modelPanel; MDagPath activeCamera; bool debug; MCallbackId _CBid; MCallbackIdArray _CBidArray; std::vector<MeshInfo> meshVector; std::vector<TransformInfo> transVector; std::vector<CameraInfo> camVector; std::vector<LightInfo> lightVector; std::vector<MaterialInfo> materialVector; std::vector<MessageInfo> msgVector; std::queue<MessageInfo> msgQueue; void cbReparent(MDagPath& child, MDagPath& parent, void* clientData); void cbMeshAttribute(MNodeMessage::AttributeMessage msg, MPlug& plug_1, MPlug& plug_2, void* clientData); void cbMessageTimer(float elapsedTime, float lastTime, void* clientData); void cbNewNode(MObject& node, void* clientData); void cbTransformModified(MNodeMessage::AttributeMessage msg, MPlug& plug_1, MPlug& plug_2, void* clientData); void cbNameChange(MObject& node, const MString& str, void* clientData); void cbMeshAttributeChange(MNodeMessage::AttributeMessage msg, MPlug& plug_1, MPlug& plug_2, void* clientData); void cbMaterialAttribute(MNodeMessage::AttributeMessage msg, MPlug& plug_1, MPlug& plug_2, void* clientData); void mAddNode(char* name, int type, int vertCount = 0, char* childname = nullptr); void mAddMessage(std::string name, int msgType, int nodeType, std::string oldName = ""); void loadScene(); bool deleteNode(); bool renameNode(MString newName, MString oldName, int type); MeshInfo outMeshData(std::string name, bool getDynamicData = true); void outTransFormData(MObject& obj); void outMeshData(MObject& obj); void outCameraData(MObject& obj); void outLightData(MObject& obj);
31.226415
111
0.779758
meraz
e50fd99083c30848561f5fd265f8f1d34da13d84
1,237
cc
C++
ash/login/ui/login_data_dispatcher.cc
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ash/login/ui/login_data_dispatcher.cc
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ash/login/ui/login_data_dispatcher.cc
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/login/ui/login_data_dispatcher.h" namespace ash { LoginDataDispatcher::Observer::~Observer() {} void LoginDataDispatcher::Observer::OnUsersChanged( const std::vector<ash::mojom::UserInfoPtr>& users) {} void LoginDataDispatcher::Observer::OnPinEnabledForUserChanged( const AccountId& user, bool enabled) {} LoginDataDispatcher::LoginDataDispatcher() = default; LoginDataDispatcher::~LoginDataDispatcher() = default; void LoginDataDispatcher::AddObserver(Observer* observer) { observers_.AddObserver(observer); } void LoginDataDispatcher::RemoveObserver(Observer* observer) { observers_.RemoveObserver(observer); } void LoginDataDispatcher::NotifyUsers( const std::vector<ash::mojom::UserInfoPtr>& users) { for (auto& observer : observers_) observer.OnUsersChanged(users); } void LoginDataDispatcher::SetPinEnabledForUser(const AccountId& user, bool enabled) { for (auto& observer : observers_) observer.OnPinEnabledForUserChanged(user, enabled); } } // namespace ash
28.767442
73
0.737268
metux
e511d3a85184f777397408c078e6e30f5a3b2ce0
747
cpp
C++
FuegoUniversalComponent/fuego/smartgame/SgGtpUtil.cpp
GSMgeeth/gameofgo
51563fea15fbdca797afb7cf9a29773a313e5697
[ "Apache-2.0" ]
13
2016-09-09T13:45:42.000Z
2021-12-17T08:42:28.000Z
FuegoUniversalComponent/fuego/smartgame/SgGtpUtil.cpp
GSMgeeth/gameofgo
51563fea15fbdca797afb7cf9a29773a313e5697
[ "Apache-2.0" ]
1
2016-06-18T05:19:58.000Z
2016-09-15T18:21:54.000Z
FuegoUniversalComponent/fuego/smartgame/SgGtpUtil.cpp
cbordeman/gameofgo
51563fea15fbdca797afb7cf9a29773a313e5697
[ "Apache-2.0" ]
5
2016-11-19T03:05:12.000Z
2022-01-31T12:20:40.000Z
//---------------------------------------------------------------------------- /** @file SgGtpUtil.cpp */ //---------------------------------------------------------------------------- #include "SgSystem.h" #include "SgGtpUtil.h" #include "SgPointSet.h" #include "../gtpengine/GtpEngine.h" using namespace std; //---------------------------------------------------------------------------- void SgGtpUtil::RespondPointSet(GtpCommand& cmd, const SgPointSet& pointSet) { bool isFirst = true; for (SgSetIterator it(pointSet); it; ++it) { if (! isFirst) cmd << ' '; isFirst = false; cmd << SgWritePoint(*it); } } //----------------------------------------------------------------------------
25.758621
78
0.348059
GSMgeeth
e5120f54c6135ec4bb6213f5704b8feb2dc53299
783
cc
C++
src/event/UpdateQuestEvent.cc
kallentu/pathos
1914edbccc98baef79d98fb065119230072ac40d
[ "MIT" ]
7
2019-05-09T15:38:55.000Z
2021-12-07T03:13:29.000Z
src/event/UpdateQuestEvent.cc
kallentu/pathos
1914edbccc98baef79d98fb065119230072ac40d
[ "MIT" ]
1
2019-06-20T03:01:18.000Z
2019-06-20T03:01:18.000Z
src/event/UpdateQuestEvent.cc
kallentu/pathos
1914edbccc98baef79d98fb065119230072ac40d
[ "MIT" ]
null
null
null
#include "event/UpdateQuestEvent.h" #include "core/PathosInstance.h" #include "quest/Quest.h" #include "quest/QuestManager.h" #include "request/ClearEntireStatus.h" #include "request/MultipleRequest.h" #include "request/QuestRequest.h" using namespace Pathos; void UpdateQuestEvent::begin(PathosInstance *inst) { // Update the conditions and status of the quest if they changed. quest->updateQuestStatus(inst); // Clear prior main and quick status since we moved. // Update view depending on quest progress. std::unique_ptr<MultipleRequest> request = std::make_unique<MultipleRequest>(); request->addRequest(std::make_unique<ClearEntireStatus>()); request->addRequest(quest->getQuestGiver()->retrieveQuestRequestWithInstance(inst)); inst->notify(request.get()); }
35.590909
86
0.771392
kallentu
e512309ffc3a487f30bd5f06a8324322bc587518
3,653
cpp
C++
matlab_code/jjcao_code-head/toolbox/jjcao_img/superpixel/TurboPixels64/DT.cpp
joycewangsy/normals_pointnet
fc74a8ed1a009b18785990b1b4c20eda0549721c
[ "MIT" ]
4
2018-12-07T12:47:13.000Z
2021-12-21T08:46:50.000Z
matlab_code/jjcao_code-head/toolbox/jjcao_img/superpixel/TurboPixels64/DT.cpp
joycewangsy/normals_pointnet
fc74a8ed1a009b18785990b1b4c20eda0549721c
[ "MIT" ]
null
null
null
matlab_code/jjcao_code-head/toolbox/jjcao_img/superpixel/TurboPixels64/DT.cpp
joycewangsy/normals_pointnet
fc74a8ed1a009b18785990b1b4c20eda0549721c
[ "MIT" ]
2
2018-10-29T09:29:19.000Z
2021-12-21T08:46:52.000Z
/************************************************************************ File: 2D_DT_Library.c Author(s): Alexander Vasilevskiy Created: 24 May 2000 Last Revision: $Date$ Description: $Revision$ $Log$ Copyright (c) 2000 by Alexander Vasilevskiy, Centre for Intelligent Machines, McGill University, Montreal, QC. Please see the copyright notice included in this distribution for full details. ***********************************************************************/ #include <stdio.h> #include <math.h> #include "mex.h" #define INFINITY 999999 // detects edges between black and white regions void EdgeDetect(double *in,double *out,int WIDTH,int HEIGHT){ int x,y; for(y=0; y <HEIGHT; y++) { for(x=0; x<WIDTH; x++) { if ((x==0)||(y==0)||(y==HEIGHT-1)||(x==WIDTH-1)) out[y*WIDTH + x]=INFINITY; else if ( (in[y*WIDTH + x]!=INFINITY)&& ((in[(y-1)*WIDTH + x]==INFINITY)|| (in[(y+1)*WIDTH + x]==INFINITY)|| (in[y*WIDTH + x+1]==INFINITY)|| (in[y*WIDTH + x-1]==INFINITY))) out[y*WIDTH + x]=0; else out[y*WIDTH + x]=INFINITY; } } } // assignes sign to distance transform void PutSign(double *in,double *out,int WIDTH,int HEIGHT){ for(int j=0; j<HEIGHT; j++) for(int i=0; i<WIDTH; i++) if (in[j*WIDTH + i] == INFINITY) out[j*WIDTH + i]=-out[j*WIDTH + i]; } double MINforward(double *in,double d1,double d2,int i,int j,int WIDTH,int HEIGHT){ double mask[5]; double min=INFINITY; int k; if ((i>0)&&(j>0)) mask[0]=in[(j-1)*WIDTH + (i-1)]+d2; else mask[0]=INFINITY; if (j>0) mask[1]=in[(j-1)*WIDTH + i]+d1; else mask[1]=INFINITY; if ((i<WIDTH-1)&&(j>0)) mask[2]=in[(j-1)*WIDTH + i+1]+d2; else mask[2]=INFINITY; mask[3]=in[j*WIDTH + i]; if (i>0) mask[4]=in[j*WIDTH + i-1]+d1; else mask[4]=INFINITY; for(k=0;k<5;k++) if (mask[k]<min) min=mask[k]; return min; } double MINbackward(double *in,double d1,double d2,int i,int j,int WIDTH,int HEIGHT){ double mask[5]; double min=INFINITY; int k; mask[0]=in[j*WIDTH + i]; if (i<WIDTH-1) mask[1]=in[j*WIDTH + i+1]+d1; else mask[1]=INFINITY; if ((j<HEIGHT-1)&&(i<WIDTH-1)) mask[2]=in[(j+1)*WIDTH + i+1]+d2; else mask[2]=INFINITY; if (j<HEIGHT-1) mask[3]=in[(j+1)*WIDTH + i]+d1; else mask[3]=INFINITY; if ((i>0)&&(j<HEIGHT-1)) mask[4]=in[(j+1)*WIDTH + i-1]+d2; else mask[4]=INFINITY; for(k=0;k<5;k++) if (mask[k]<min) min=mask[k]; return min; } void nNeighbor(double *in,double d1,double d2,int WIDTH,int HEIGHT){ int i,j; for (j=0;j<HEIGHT;j++) for(i=0;i<WIDTH;i++) in[j*WIDTH + i] = MINforward(in,d1,d2,i,j,WIDTH,HEIGHT); for (j=HEIGHT-1;j>-1;j--) for(i=WIDTH-1;i>-1;i--) in[j*WIDTH + i]=MINbackward(in,d1,d2,i,j,WIDTH,HEIGHT); } void ComputeDistanceTransform(double *in,double *out,int WIDTH,int HEIGHT) { EdgeDetect(in,out,WIDTH,HEIGHT); nNeighbor(out,1,1.351,WIDTH,HEIGHT); PutSign(in,out,WIDTH,HEIGHT); } void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { double *in, *out; int iWidth, iHeight; /* Check for proper number of arguments. */ if (nrhs != 1) { mexErrMsgTxt("One input required."); } else if (nlhs > 1) { mexErrMsgTxt("Too many output arguments"); } /* The input must be a noncomplex scalar double.*/ iWidth = mxGetM(prhs[0]); iHeight = mxGetN(prhs[0]); /* Create matrix for the return argument. */ plhs[0] = mxCreateDoubleMatrix(iWidth,iHeight, mxREAL); /* Assign pointers to each input and output. */ in = mxGetPr(prhs[0]); out = mxGetPr(plhs[0]); ComputeDistanceTransform(in, out, iWidth, iHeight); }
28.76378
92
0.590747
joycewangsy
e513202516c94c89356fb1297517db0ea937e398
9,369
cpp
C++
synthts_et/lib/etana/chklyh3.cpp
martnoumees/synthts_et
8845b33514edef3e54ae0b45404615704c418142
[ "Unlicense" ]
19
2015-10-27T22:21:49.000Z
2022-02-07T11:54:35.000Z
synthts_vr/lib/etana/chklyh3.cpp
ikiissel/synthts_vr
33f2686dc9606aa95697ac0cf7e9031668bc34e8
[ "Unlicense" ]
8
2015-10-28T08:38:08.000Z
2021-03-25T21:26:59.000Z
synthts_vr/lib/etana/chklyh3.cpp
ikiissel/synthts_vr
33f2686dc9606aa95697ac0cf7e9031668bc34e8
[ "Unlicense" ]
11
2016-01-03T11:47:08.000Z
2021-03-17T18:59:54.000Z
/* * kontrollib, kas S6na on suurt�hel. lyhend mingi l�puga; * n�iteks: * * USA-ni, USAni, SS-lane, SSlane, IRA-meelne * */ #include "mrf-mrf.h" #include "mittesona.h" int MORF0::chklyh3(MRFTULEMUSED *tulemus, FSXSTRING *S6na, int sygavus, int *tagasitasand) { int i; int res; FSXSTRING tmpsona, tmplopp, tmpliik, vorminimi; //int tulem = -1; //FS_Failure; const FSxCHAR *vn; FSXSTRING s; // sona ise FSXSTRING kriips(FSxSTR("")); // kriips (kui teda on) FSXSTRING lopp; // l�pp ise FSXSTRING ne_lopp; // line lane lopu jaoks FSXSTRING lali; // line lane alguse jaoks FSXSTRING ss; // int s_pik; int tyyp=0; #define LYHEND 1 #define PROTSENT 2 #define KELL 3 #define PARAGRAHV 4 #define NUMBER 5 #define KRAAD 6 #define MATA 6 // if ( !ChIsUpper(*S6na) && *S6na != '%' && *S6na != para) /* ei alga suure t�hega */ // if (!TaheHulgad::OnSuur(S6na, 0) && (*S6na)[0] != (FSxCHAR)'%' && (*S6na)[0] != TaheHulgad::para[0] if (TaheHulgad::AintSuuredjaNrjaKriipsud(S6na)) /* v�ib olla lihtsalt suuret�heline s�na */ return ALL_RIGHT; /* ei suru v�gisi l�hendiks */ s = (const FSxCHAR *)S6na->SpanIncluding((const FSxCHAR *)(TaheHulgad::protsendinumber)); if (s.GetLength() != 0) if (TaheHulgad::OnLopus(&s, FSxSTR("%")) || TaheHulgad::OnLopus(&s, FSxSTR("%-"))) tyyp = PROTSENT; if (!TaheHulgad::OnSuur(S6na, 0) && tyyp != PROTSENT && (*S6na)[0] != TaheHulgad::para[0] ) return ALL_RIGHT; if (!tyyp) { s = (const FSxCHAR *)(S6na->SpanIncluding((const FSxCHAR *)(TaheHulgad::kraadinumber))); if (s.GetLength() != 0) if (TaheHulgad::OnLopus(&s, (const FSxCHAR *)(TaheHulgad::kraad)) || TaheHulgad::OnLopus(&s, (const FSxCHAR *)(TaheHulgad::kraadjakriips)) ) tyyp = KRAAD; } if (!tyyp) { s = (const FSxCHAR *)(S6na->SpanIncluding((const FSxCHAR *)(TaheHulgad::paranumber))); if (s.GetLength() != 0) if (TaheHulgad::OnAlguses(&s, (const FSxCHAR *)(TaheHulgad::para))) tyyp = PARAGRAHV; } if (!tyyp) { s = (const FSxCHAR *)(S6na->SpanIncluding((const FSxCHAR *)(TaheHulgad::matemaatika1))); if (s.GetLength() == 2 && TaheHulgad::OnLopus(&s, FSxSTR("-"))) tyyp = MATA; } if (!tyyp) { s = (const FSxCHAR *)(S6na->SpanIncluding((const FSxCHAR *)(TaheHulgad::suurnrthtkriips))); ss = (const FSxCHAR *)(S6na->SpanIncluding((const FSxCHAR *)(TaheHulgad::kellanumber))); if (s.GetLength() > ss.GetLength()) tyyp = LYHEND; else if (ss.GetLength() != 0 && s.GetLength() <= ss.GetLength()) { s = ss; tyyp = KELL; } } if (!tyyp) // ei saa olla... return ALL_RIGHT; s_pik = s.GetLength(); lopp = (const FSxCHAR *)(S6na->Mid(s_pik)); if (lopp.GetLength()==0) // pole siin midagi vaadata return ALL_RIGHT; kriips = (const FSxCHAR *)(s.Mid(s_pik-1)); if (kriips != FSxSTR("-")) kriips = FSxSTR(""); if (tyyp == LYHEND && kriips == FSxSTR("")) // ebakindel v�rk { if (s.GetLength()==1) // nt Arike return ALL_RIGHT; i = s.ReverseFind(FSxSTR("-")); if (i == s.GetLength()-2) return ALL_RIGHT; // nt CD-Romile } s.TrimRight(FSxSTR("-")); if (s.GetLength()==0) // pole siin midagi vaadata return ALL_RIGHT; if (TaheHulgad::PoleMuudKui(&s, &TaheHulgad::number)) tyyp = NUMBER; /* oletan, et on lyhend vm lubatud asi */ i = 1; if (tyyp == LYHEND) { if(mrfFlags.Chk(MF_LYHREZH)) { if (s.GetLength() == 1 || (!mrfFlags.Chk(MF_SPELL) && s.GetLength() < 7)) i = 1; else i = (dctLoend[3])[(FSxCHAR *)(const FSxCHAR *)s]; } } // *(S6na+k) = taht; /* taastan esialgse sona */ if (i==-1) /* pole lyhend */ return ALL_RIGHT; if ((s.GetLength() > 1 && tyyp == LYHEND && (TaheHulgad::OnAlguses(&lopp, FSxSTR("la")) || TaheHulgad::OnAlguses(&lopp, FSxSTR("li"))) ) || ((tyyp == NUMBER || tyyp == PROTSENT || tyyp == KRAAD) && TaheHulgad::OnAlguses(&lopp, FSxSTR("li"))) ) { ne_lopp = (const FSxCHAR *)(lopp.Mid(2)); lali = (const FSxCHAR *)(lopp.Left(2)); vn = nLopud.otsi_ne_vorm((const FSxCHAR *)ne_lopp); if (vn != NULL) /* ongi line lise ... voi lane lase ... */ { vorminimi = vn; vorminimi += FSxSTR(", "); tmpsona = s; if (kriips.GetLength() == 1 && !mrfFlags.Chk(MF_ALGV)) tmpsona += kriips; else tmpsona += FSxSTR("="); tmpsona += lali; if (mrfFlags.Chk(MF_ALGV) || vorminimi == FSxSTR("sg n, ")) tmpsona += FSxSTR("ne"); else { if (TaheHulgad::OnAlguses(&vorminimi, FSxSTR("pl")) || TaheHulgad::OnAlguses(&vorminimi, FSxSTR("sg p"))) tmpsona += FSxSTR("s"); else tmpsona += FSxSTR("se"); } if (ne_lopp == FSxSTR("ne") || ne_lopp == FSxSTR("se")) tmplopp = FSxSTR("0"); else if (ne_lopp == FSxSTR("st")) tmplopp = FSxSTR("t"); else if (TaheHulgad::OnAlguses(&vorminimi, FSxSTR("sg"))) tmplopp = (const FSxCHAR *)(ne_lopp.Mid(2)); else tmplopp = (const FSxCHAR *)(ne_lopp.Mid(1)); if (lali == FSxSTR("la")) tmpliik = FSxSTR("S"); else tmpliik = FSxSTR("A"); tulemus->Add((const FSxCHAR *)tmpsona, (const FSxCHAR *)tmplopp, FSxSTR(""), (const FSxCHAR *)tmpliik, (FSxCHAR *)(const FSxCHAR *)vorminimi); *tagasitasand = 1; return ALL_RIGHT; } } vn = nLopud.otsi_lyh_vorm((const FSxCHAR *)lopp); if (vn == NULL) { if (tyyp == LYHEND && (kriips.GetLength() != 0 || mrfFlags.Chk(MF_OLETA)) && // LYH-sona !TaheHulgad::OnAlguses(&lopp, FSxSTR("lise")) && !TaheHulgad::OnAlguses(&lopp, FSxSTR("lasi")) ) { res = chkwrd(tulemus, &lopp, lopp.GetLength(), sygavus, tagasitasand, LIIK_SACU); if (res > ALL_RIGHT) return res; /* viga! */ if ( tulemus->on_tulem() ) /* analyys �nnestus */ { s += kriips; tulemus->LisaTyvedeleEtte((const FSxCHAR *)s); } } return ALL_RIGHT; } if (tyyp != LYHEND) return ALL_RIGHT; /* vist lihtne l�pp */ *tagasitasand = 1; if (TaheHulgad::OnAlguses(&lopp, FSxSTR("te")) )// akronyymidele sellised lopud ei sobi return ALL_RIGHT; if (lopp == FSxSTR("i")) vorminimi = FSxSTR("adt, sg g, sg p, "); else if (lopp == FSxSTR("d")) vorminimi = FSxSTR("pl n, sg p, "); else { vorminimi = vn; vorminimi += FSxSTR(", "); } FSxCHAR vi; FSXSTRING fl; vi = s[s.GetLength()-1]; fl = FSxSTR("FLMNRS"); if (vi == (FSxCHAR)'J'); // jott voi dzhei; iga lopp sobib... else if (TaheHulgad::para.Find(vi) != -1 || vi == (FSxCHAR)'%') { if (lopp == FSxSTR("d")) vorminimi = FSxSTR("pl n, "); } else if (fl.Find(vi) != -1) { if (!mrfFlags.Chk(MF_OLETA)) { if (!TaheHulgad::OnAlguses(&lopp, FSxSTR("i")) && !TaheHulgad::OnAlguses(&lopp, FSxSTR("e"))) return ALL_RIGHT; // yldse ei sobinud } else if (lopp == FSxSTR("d")) vorminimi = FSxSTR("pl n, "); } else { //vi = s.SuurPisiks(s.GetLength()-1); // tahan lihtsalt vi pisiks teha vi = TaheHulgad::SuurPisiks(&s, s.GetLength()-1); // tahan lihtsalt vi pisiks teha if (TaheHulgad::taish.Find(vi) != -1) // lyh lopus vokaal { if (TaheHulgad::OnAlguses(&lopp, FSxSTR("i")) || TaheHulgad::OnAlguses(&lopp, FSxSTR("e"))) return ALL_RIGHT; // yldse ei sobinud } if (!mrfFlags.Chk(MF_OLETA)) { if (s.GetLength() == 1) { if (TaheHulgad::OnAlguses(&lopp, FSxSTR("i")) || TaheHulgad::OnAlguses(&lopp, FSxSTR("e"))) return ALL_RIGHT; // yldse ei sobinud } else { FSxCHAR eelvi; eelvi = TaheHulgad::SuurPisiks(&s, s.GetLength()-2); if (TaheHulgad::taish.Find(eelvi)==-1 && s != FSxSTR("GOST") && s != FSxSTR("GATT") && s != FSxSTR("SAPARD") && s != FSxSTR("SARS")) if (TaheHulgad::OnAlguses(&lopp, FSxSTR("i")) || TaheHulgad::OnAlguses(&lopp, FSxSTR("e"))) return ALL_RIGHT; // yldse ei sobinud } } } tulemus->Add((const FSxCHAR *)s, (const FSxCHAR *)lopp, FSxSTR(""), FSxSTR("Y"), (const FSxCHAR *)vorminimi); return ALL_RIGHT; }
37.931174
141
0.501441
martnoumees
e513e8f35d55b6333b9fc172319f6ab34fc57a86
2,181
cpp
C++
tests/dsp_dotproductscalling_tests.cpp
jontio/JSquelch
72805d6e08035daca09e6c668c63f46dc66674a2
[ "MIT" ]
2
2021-07-11T03:36:42.000Z
2022-03-26T15:04:30.000Z
tests/dsp_dotproductscalling_tests.cpp
jontio/JSquelch
72805d6e08035daca09e6c668c63f46dc66674a2
[ "MIT" ]
null
null
null
tests/dsp_dotproductscalling_tests.cpp
jontio/JSquelch
72805d6e08035daca09e6c668c63f46dc66674a2
[ "MIT" ]
null
null
null
#include "../src/dsp/dsp.h" #include "../src/util/RuntimeError.h" #include "../src/util/stdio_utils.h" #include <random> //important for Qt include cpputest last as it mucks up new and causes compiling to fail #include "CppUTest/TestHarness.h" TEST_GROUP(Test_DSP_DotProductScalling) { double double_tolerance=0.00001; void setup() { } void teardown() { // This gets run after every test } }; TEST(Test_DSP_DotProductScalling, ScaleTest) { JDsp::OverlappedRealFFT fft(128); JDsp::MovingSignalEstimator mse(fft.getOutSize(),8,3,96,62,8); //normally distributed numbers for the signal std::default_random_engine generator(1); std::normal_distribution<double> distribution(0.0,1.0); QVector<JFFT::cpx_type> expected_complex; QVector<double> expected; QVector<JFFT::cpx_type> actual_complex; QVector<double> actual; QVector<double> x(fft.getInSize()); for(int k=0;k<20;k++) { for(int i=0;i<x.size();i++)x[i]=distribution(generator); CHECK(x.size()==fft.getInSize()); fft<<x; CHECK(mse.val.size()==fft.getOutSize()); mse<<fft; QVector<double> a=fft.Xabs; for(int m=0;m<a.size();m++)a[m]*=mse[m]; expected+=a; QVector<JFFT::cpx_type> b=fft.Xfull; for(int m=0;m<mse.val.size();m++) { CHECK(m<b.size()); b[m]*=mse[m]; } for(int m=1;m<mse.val.size()-1;m++) { CHECK((b.size()-m)>=0); CHECK(m<mse.val.size()); b[b.size()-m]*=mse[m]; } expected_complex+=b; fft*=mse; actual+=fft.Xabs; actual_complex+=fft.Xfull; } CHECK(actual.size()==expected.size()); CHECK(actual_complex.size()==expected_complex.size()); for(int k=0;k<actual.size();k++) { DOUBLES_EQUAL(expected[k],actual[k],double_tolerance); } for(int k=0;k<actual_complex.size();k++) { DOUBLES_EQUAL(expected_complex[k].real(),actual_complex[k].real(),double_tolerance); DOUBLES_EQUAL(expected_complex[k].imag(),actual_complex[k].imag(),double_tolerance); } }
24.505618
92
0.596974
jontio
e5149a0ac6f17debed1bce495c42acce4e32eeab
2,151
cpp
C++
problemsets/UVA/10731.cpp
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/UVA/10731.cpp
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/UVA/10731.cpp
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <stack> using namespace std; char input[30]; vector<int> adj[30]; stack<int> scc; vector<string> ret; int nord; int vis[30], L[30], in[30]; void dfs(int u) { vis[u] = L[u] = ++nord; scc.push(u); in[u] = 1; for (int i = 0; i < adj[u].size(); i++) { int v = adj[u][i]; if (!vis[v]) dfs(v); if (in[v]) L[u] = min(L[u], L[v]); } if (vis[u]==L[u]) { string r = ""; while (!scc.empty() && scc.top() != u) { r += string(1, scc.top()+'A'); in[scc.top()] = 0; scc.pop(); } r += string(1, u+'A'); in[u] = 0; scc.pop(); //reverse(r.begin(), r.end()); sort(r.begin(), r.end()); ret.push_back(r); } } void SCC() { nord = 0; for (int i = 0; i < 26; i++) in[i] = vis[i] = L[i] = 0; for (int i = 0; i < 26; i++) if (!vis[i] && input[i]) dfs(i); } int main() { int M; bool f = 1; while (scanf("%d", &M) && M) { for (int i = 0; i < 26; i++) adj[i].clear(), input[i] = 0; while (M--) { char a, b, c, d, e, f; scanf(" %c %c %c %c %c %c ", &a, &b, &c, &d, &e, &f); if (f!=a) adj[f-'A'].push_back(a-'A'); if (f!=b) adj[f-'A'].push_back(b-'A'); if (f!=c) adj[f-'A'].push_back(c-'A'); if (f!=d) adj[f-'A'].push_back(d-'A'); if (f!=e) adj[f-'A'].push_back(e-'A'); input[a-'A'] = 1; input[b-'A'] = 1; input[c-'A'] = 1; input[d-'A'] = 1; input[e-'A'] = 1; } ret.clear(); SCC(); sort(ret.begin(), ret.end()); if (!f) putchar('\n'); f = 0; for (int i = 0; i < ret.size(); i++) { for (int j = 0; j < ret[i].size(); j++) { if (j != 0) putchar(' '); putchar(ret[i][j]); } putchar('\n'); } } return 0; }
23.637363
66
0.39377
juarezpaulino
e514c32bc4403e8764cc047eaae816e6164f1e18
2,326
cpp
C++
src/ComposerGUI/composer/package/form/delegate/editor/Author.cpp
composer-gui/composer-gui
2a488db4c6828fee0f36682d0b0edc96d359b4c3
[ "BSD-3-Clause" ]
13
2019-04-01T07:54:05.000Z
2022-03-27T16:55:59.000Z
src/ComposerGUI/composer/package/form/delegate/editor/Author.cpp
informaticacba/composer-gui
2a488db4c6828fee0f36682d0b0edc96d359b4c3
[ "BSD-3-Clause" ]
null
null
null
src/ComposerGUI/composer/package/form/delegate/editor/Author.cpp
informaticacba/composer-gui
2a488db4c6828fee0f36682d0b0edc96d359b4c3
[ "BSD-3-Clause" ]
1
2022-03-27T16:56:02.000Z
2022-03-27T16:56:02.000Z
#include <QFormLayout> #include <QDialogButtonBox> #include <QPushButton> #include "Author.h" namespace composer_gui { namespace composer { namespace package { namespace form { namespace delegate { namespace editor { Author::Author(QWidget *parent) : QDialog(parent) { m_name = new QLineEdit; m_role = new QLineEdit; m_email = new QLineEdit; m_homepage = new QLineEdit; m_mapper = new QDataWidgetMapper(this); m_mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); QFormLayout *editorLayout = new QFormLayout; editorLayout->addRow("Name:", m_name); editorLayout->addRow("Role:", m_role); editorLayout->addRow("Email:", m_email); editorLayout->addRow("Homepage:", m_homepage); QDialogButtonBox *buttonBox = new QDialogButtonBox(this); buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); okButton->setEnabled(false); auto validator = [this, okButton] { bool isAllEmpty = m_name->text().trimmed().isEmpty() && m_role->text().trimmed().isEmpty() && m_email->text().trimmed().isEmpty() && m_homepage->text().trimmed().isEmpty(); okButton->setEnabled(!isAllEmpty); }; connect(m_name, &QLineEdit::textChanged, validator); connect(m_role, &QLineEdit::textChanged, validator); connect(m_email, &QLineEdit::textChanged, validator); connect(m_homepage, &QLineEdit::textChanged, validator); editorLayout->addWidget(buttonBox); connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, m_mapper, &QDataWidgetMapper::submit); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); setLayout(editorLayout); } void Author::setModelIndex(const QModelIndex &index) { m_mapper->setModel(const_cast<QAbstractItemModel *>(index.model())); m_mapper->addMapping(m_name, 0); m_mapper->addMapping(m_role, 1); m_mapper->addMapping(m_email, 2); m_mapper->addMapping(m_homepage, 3); m_mapper->setCurrentModelIndex(index); } } // editor } // delegate } // form } // package } // composer } // composer_gui
28.365854
90
0.678418
composer-gui
e51a15cf4157104113eade2da5910a59e7dcd9dc
8,827
cpp
C++
apps/edges/src/main.cpp
jpjodoin/litiv
435556bea20d60816aff492f50587b1a2d748b21
[ "BSD-3-Clause" ]
97
2015-10-16T04:32:33.000Z
2022-03-29T07:04:02.000Z
apps/edges/src/main.cpp
jpjodoin/litiv
435556bea20d60816aff492f50587b1a2d748b21
[ "BSD-3-Clause" ]
19
2016-07-01T16:37:02.000Z
2020-09-10T06:09:39.000Z
apps/edges/src/main.cpp
jpjodoin/litiv
435556bea20d60816aff492f50587b1a2d748b21
[ "BSD-3-Clause" ]
41
2015-11-17T05:59:23.000Z
2022-02-16T09:30:28.000Z
// This file is part of the LITIV framework; visit the original repository at // https://github.com/plstcharles/litiv for more information. // // Copyright 2015 Pierre-Luc St-Charles; pierre-luc.st-charles<at>polymtl.ca // // 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 "litiv/datasets.hpp" #include "litiv/imgproc.hpp" //////////////////////////////// #define WRITE_IMG_OUTPUT 0 #define EVALUATE_OUTPUT 0 #define DISPLAY_OUTPUT 1 //////////////////////////////// #define USE_CANNY 0 #define USE_LBSP 1 //////////////////////////////// #define FULL_THRESH_ANALYSIS 1 //////////////////////////////// #define DATASET_ID Dataset_BSDS500 // comment this line to fall back to custom dataset definition #define DATASET_OUTPUT_PATH "results_test" // will be created in the app's working directory if using a custom dataset #define DATASET_PRECACHING 1 #define DATASET_SCALE_FACTOR 1.0 #define DATASET_WORKTHREADS 1 //////////////////////////////// #if (USE_CANNY+USE_LBSP)!=1 #error "Must specify a single algorithm." #endif //USE_... #ifndef DATASET_ID #define DATASET_ID Dataset_Custom #define DATASET_PARAMS \ "####", /* => const std::string& sDatasetName */ \ "####", /* => const std::string& sDatasetDirPath */ \ DATASET_OUTPUT_PATH, /* => const std::string& sOutputDirPath */ \ std::vector<std::string>{"###","###","###","..."}, /* => const std::vector<std::string>& vsWorkBatchDirs */ \ std::vector<std::string>{"###","###","###","..."}, /* => const std::vector<std::string>& vsSkippedDirTokens */ \ bool(WRITE_IMG_OUTPUT), /* => bool bSaveOutput */ \ bool(EVALUATE_OUTPUT), /* => bool bUseEvaluator */ \ false, /* => bool bForce4ByteDataAlign */ \ DATASET_SCALE_FACTOR /* => double dScaleFactor */ #else //defined(DATASET_ID) #define DATASET_PARAMS \ DATASET_OUTPUT_PATH, /* => const std::string& sOutputDirName */ \ bool(WRITE_IMG_OUTPUT), /* => bool bSaveOutput */ \ bool(EVALUATE_OUTPUT), /* => bool bUseEvaluator */ \ DATASET_SCALE_FACTOR /* => double dScaleFactor */ #endif //defined(DATASET_ID) void Analyze(std::string sWorkerName, lv::IDataHandlerPtr pBatch); using DatasetType = lv::Dataset_<lv::DatasetTask_EdgDet,lv::DATASET_ID,lv::NonParallel>; #if USE_CANNY using EdgeDetectorType = EdgeDetectorCanny; #elif USE_LBSP using EdgeDetectorType = EdgeDetectorLBSP; #endif //USE_... int main(int, char**) { try { DatasetType::Ptr pDataset = DatasetType::create(DATASET_PARAMS); lv::IDataHandlerPtrArray vpBatches = pDataset->getBatches(false); const size_t nTotPackets = pDataset->getInputCount(); const size_t nTotBatches = vpBatches.size(); if(nTotBatches==0 || nTotPackets==0) lvError_("Could not parse any data for dataset '%s'",pDataset->getName().c_str()); std::cout << "\n[" << lv::getTimeStamp() << "]\n" << std::endl; std::cout << "Executing algorithm with " << DATASET_WORKTHREADS << " thread(s)..." << std::endl; lv::WorkerPool<DATASET_WORKTHREADS> oPool; std::vector<std::future<void>> vTaskResults; size_t nCurrBatchIdx = 1; for(lv::IDataHandlerPtr pBatch : vpBatches) vTaskResults.push_back(oPool.queueTask(Analyze,std::to_string(nCurrBatchIdx++)+"/"+std::to_string(nTotBatches),pBatch)); for(std::future<void>& oTaskRes : vTaskResults) oTaskRes.get(); pDataset->writeEvalReport(); } catch(const lv::Exception&) {std::cout << "\n!!!!!!!!!!!!!!\nTop level caught lv::Exception (check stderr)\n!!!!!!!!!!!!!!\n" << std::endl; return -1;} catch(const cv::Exception&) {std::cout << "\n!!!!!!!!!!!!!!\nTop level caught cv::Exception (check stderr)\n!!!!!!!!!!!!!!\n" << std::endl; return -1;} catch(const std::exception& e) {std::cout << "\n!!!!!!!!!!!!!!\nTop level caught std::exception:\n" << e.what() << "\n!!!!!!!!!!!!!!\n" << std::endl; return -1;} catch(...) {std::cout << "\n!!!!!!!!!!!!!!\nTop level caught unhandled exception\n!!!!!!!!!!!!!!\n" << std::endl; return -1;} std::cout << "\n[" << lv::getTimeStamp() << "]\n" << std::endl; return 0; } void Analyze(std::string sWorkerName, lv::IDataHandlerPtr pBatch) { srand(0); // for now, assures that two consecutive runs on the same data return the same results //srand((unsigned int)time(NULL)); try { DatasetType::WorkBatch& oBatch = dynamic_cast<DatasetType::WorkBatch&>(*pBatch); lvAssert(oBatch.getInputPacketType()==lv::ImagePacket && oBatch.getOutputPacketType()==lv::ImagePacket); lvAssert(oBatch.getImageCount()>=1); lvAssert(oBatch.isInputInfoConst()); if(DATASET_PRECACHING) oBatch.startPrecaching(!bool(EVALUATE_OUTPUT)); const std::string sCurrBatchName = lv::clampString(oBatch.getName(),12); std::cout << "\t\t" << sCurrBatchName << " @ init [" << sWorkerName << "]" << std::endl; const size_t nTotPacketCount = oBatch.getImageCount(); size_t nCurrIdx = 0; cv::Mat oCurrInput = oBatch.getInput(nCurrIdx).clone(); lvAssert(!oCurrInput.empty() && oCurrInput.isContinuous()); cv::Mat oCurrEdgeMask; std::shared_ptr<IEdgeDetector> pAlgo = std::make_shared<EdgeDetectorType>(); #if !FULL_THRESH_ANALYSIS const double dDefaultThreshold = pAlgo->getDefaultThreshold(); #endif //(!FULL_THRESH_ANALYSIS) #if DISPLAY_OUTPUT>0 lv::DisplayHelperPtr pDisplayHelper = lv::DisplayHelper::create(oBatch.getName(),oBatch.getOutputPath()+"../"); pAlgo->m_pDisplayHelper = pDisplayHelper; #endif //DISPLAY_OUTPUT>0 oBatch.startProcessing(); while(nCurrIdx<nTotPacketCount) { //if(!((nCurrIdx+1)%100)) std::cout << "\t\t" << sCurrBatchName << " @ F:" << std::setfill('0') << std::setw(lv::digit_count((int)nTotPacketCount)) << nCurrIdx+1 << "/" << nTotPacketCount << " [" << sWorkerName << "]" << std::endl; oCurrInput = oBatch.getInput(nCurrIdx); #if FULL_THRESH_ANALYSIS pAlgo->apply(oCurrInput,oCurrEdgeMask); #else //(!FULL_THRESH_ANALYSIS) pAlgo->apply_threshold(oCurrInput,oCurrEdgeMask,dDefaultThreshold); #endif //(!FULL_THRESH_ANALYSIS) #if DISPLAY_OUTPUT>0 pDisplayHelper->display(oCurrInput,oCurrEdgeMask,oBatch.getColoredMask(oCurrEdgeMask,nCurrIdx),nCurrIdx); const int nKeyPressed = pDisplayHelper->waitKey(); if(nKeyPressed==(int)'q') break; #endif //DISPLAY_OUTPUT>0 oBatch.push(oCurrEdgeMask,nCurrIdx++); } oBatch.stopProcessing(); const double dTimeElapsed = oBatch.getFinalProcessTime(); const double dProcessSpeed = (double)nCurrIdx/dTimeElapsed; std::cout << "\t\t" << sCurrBatchName << " @ end [" << sWorkerName << "] (" << std::fixed << std::setw(4) << dTimeElapsed << " sec, " << std::setw(4) << dProcessSpeed << " Hz)" << std::endl; oBatch.writeEvalReport(); // this line is optional; it allows results to be read before all batches are processed } catch(const lv::Exception&) {std::cout << "\nAnalyze caught lv::Exception (check stderr)\n" << std::endl;} catch(const cv::Exception&) {std::cout << "\nAnalyze caught cv::Exception (check stderr)\n" << std::endl;} catch(const std::exception& e) {std::cout << "\nAnalyze caught std::exception:\n" << e.what() << "\n" << std::endl;} catch(...) {std::cout << "\nAnalyze caught unhandled exception\n" << std::endl;} try { if(pBatch->isProcessing()) dynamic_cast<DatasetType::WorkBatch&>(*pBatch).stopProcessing(); } catch(...) { std::cout << "\nAnalyze caught unhandled exception while attempting to stop batch processing.\n" << std::endl; throw; } }
56.583333
223
0.599977
jpjodoin
e51e8ac2b1688b56d499907ce40d8d427c443528
526
cpp
C++
src/libs/bsd/string.cpp
Kirishikesan/haiku
835565c55830f2dab01e6e332cc7e2d9c015b51e
[ "MIT" ]
1,338
2015-01-03T20:06:56.000Z
2022-03-26T13:49:54.000Z
src/libs/bsd/string.cpp
Kirishikesan/haiku
835565c55830f2dab01e6e332cc7e2d9c015b51e
[ "MIT" ]
15
2015-01-17T22:19:32.000Z
2021-12-20T12:35:00.000Z
src/libs/bsd/string.cpp
Kirishikesan/haiku
835565c55830f2dab01e6e332cc7e2d9c015b51e
[ "MIT" ]
350
2015-01-08T14:15:27.000Z
2022-03-21T18:14:35.000Z
/* * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #include <string.h> char* strsep(char** string, const char* delimiters) { if (*string == NULL) return NULL; // find the end of the token char* token = *string; char* end = token; while (*end != '\0' && strchr(delimiters, *end) == NULL) end++; // terminate the token and update the string pointer if (*end != '\0') { *end = '\0'; *string = end + 1; } else *string = NULL; return token; }
17.533333
57
0.619772
Kirishikesan
e520970cd0b5454c8070fe722b2332d5f606b64f
245
cpp
C++
Math/CountDivisorsOfaNum.cpp
tarek99samy/Competitive-Programming
22fa7e9001e6a3606b346d1f56c71344401ea55c
[ "MIT" ]
3
2020-01-03T11:38:45.000Z
2021-03-13T13:34:50.000Z
Math/CountDivisorsOfaNum.cpp
tarek99samy/Competitive-Programming
22fa7e9001e6a3606b346d1f56c71344401ea55c
[ "MIT" ]
null
null
null
Math/CountDivisorsOfaNum.cpp
tarek99samy/Competitive-Programming
22fa7e9001e6a3606b346d1f56c71344401ea55c
[ "MIT" ]
3
2019-04-19T23:28:42.000Z
2019-10-16T19:38:57.000Z
// Returns The Number Of divisors of a given number. // O(sqrt(n)) ll CountDivisors(ll n){ ll cnt = 0 ; ll i ; for (i = 1; i * i <= n; ++i) if (n % i == 0) cnt+=2 ; if(i*i==n) cnt++; return cnt; }
18.846154
52
0.440816
tarek99samy
e5218edc546ea558d248d036432bbca128a462f7
1,031
cpp
C++
src/bg_renderer_cpp/open_gl_ext/cpu_renderer.cpp
ipoletaev/GravitySimulator
7bb2fc5d65e613929e2d2f3f9738a470a32c48b7
[ "MIT" ]
3
2019-10-13T02:56:24.000Z
2020-02-17T11:38:57.000Z
src/bg_renderer_cpp/open_gl_ext/cpu_renderer.cpp
ipoletaev/GravitySimulator
7bb2fc5d65e613929e2d2f3f9738a470a32c48b7
[ "MIT" ]
null
null
null
src/bg_renderer_cpp/open_gl_ext/cpu_renderer.cpp
ipoletaev/GravitySimulator
7bb2fc5d65e613929e2d2f3f9738a470a32c48b7
[ "MIT" ]
null
null
null
#include "cpu_renderer.h" namespace background { int CPURenderer::init_background() { return allocate_memory_for_image(); } bg_cint8_ptr CPURenderer::get_background() const { return bg_img.data; } std::string CPURenderer::get_name() const { return "CPU-Renderer"; } void CPURenderer::draw_a_star(bg_cuint y, bg_cuint x, const uint8_t brightness) { // draw a star in shape of circle with symmetric brightness decreasing from its center to the border float dist; for (bg_uint row = y - star_size; row < y + star_size; row++) { for (bg_uint col = x - star_size; col < x + star_size; col++) { dist = sqrtf((row - y) * (row - y) + (col - x) * (col - x)); if (dist < star_size) { bg_img.at(row, col) = brightness * (1. - dist / star_size); // b(r) = max_b * (1 - r / max_r) } } } } }
27.131579
113
0.516974
ipoletaev
e52236319e32416f8e2158d48590716885b60e6b
5,714
cc
C++
tile/lang/out_plan.cc
nitescuc/plaidml
83a81af049154a2701c4fde315b5ee9bc7050a7a
[ "Apache-2.0" ]
null
null
null
tile/lang/out_plan.cc
nitescuc/plaidml
83a81af049154a2701c4fde315b5ee9bc7050a7a
[ "Apache-2.0" ]
null
null
null
tile/lang/out_plan.cc
nitescuc/plaidml
83a81af049154a2701c4fde315b5ee9bc7050a7a
[ "Apache-2.0" ]
null
null
null
#include "tile/lang/out_plan.h" #include <assert.h> #include <cinttypes> #include <utility> #include <boost/range/adaptor/reversed.hpp> #include "base/util/logging.h" #include "tile/lang/mutil.h" #include "tile/lang/sembuilder.h" using std::map; using std::string; using std::vector; namespace vertexai { namespace tile { namespace lang { OutPlan::OutPlan(const FlatContraction& op, const std::vector<uint64_t>& tile, uint64_t threads, uint64_t mem_elems) : op_(op), threads_(threads), local_size_(1), outputs_(1), group_dims_({{1, 1, 1}}) { using namespace sem::builder; // NOLINT if (mem_elems < 1) { mem_elems = 1; } // Get size into sz size_t sz = op.names.size(); // Copy data into actual structures for (size_t i = 0; i < sz; i++) { const std::vector<int64_t>& out_stride = op.access[0].strides; if (out_stride[i] != 0) { // Only keep 'output' indexes indexes_.emplace_back(op.names[i], i, op.ranges[i], tile[i], out_stride[i]); } } // Sort by stride, then by reverse index. std::sort(indexes_.begin(), indexes_.end(), [](const IdxInfo& a, const IdxInfo& b) { auto as = std::abs(a.stride); auto bs = std::abs(b.stride); if (as != bs) { return as < bs; } return b.stride_idx < a.stride_idx; }); // Assign threads if (indexes_.size() > 0) { // First, assign up to mem_elems of # of threads to low stride entry uint64_t low_threads = NearestPo2(std::min(std::min(mem_elems, threads), indexes_[0].tile)); indexes_[0].threads = low_threads; // IVLOG(3, "Setting low threads on index " << indexes_[0].name << " to " << low_threads); threads /= low_threads; // Now use up the rest of the threads (this is a mediocre huristic) while (threads > 1) { // Prefer something that divides by two, and then the least threaded bool nice_divide = false; int min_thread = threads_; int pick = -1; for (int i = 0; i < indexes_.size(); i++) { const auto& idx = indexes_[i]; if (idx.threads >= idx.tile) continue; bool cur_nice_divide = (idx.tile % (idx.threads * 2) == 0); int cur_min_thread = idx.threads; if ((cur_nice_divide && !nice_divide) || cur_min_thread < min_thread) { nice_divide = cur_nice_divide; min_thread = cur_min_thread; pick = i; } } if (pick == -1) break; indexes_[pick].threads *= 2; threads /= 2; // IVLOG(3, "Multiplying threads on index " << indexes_[pick].name << " to " << indexes_[pick].threads); } } // Compute number of registers used + memory accessed local_size_ = threads_; for (const auto& idx : indexes_) { uint64_t writes = idx.tile; if (idx.stride == 1) { writes = RoundUp(writes, mem_elems); } outputs_ *= writes; uint64_t parts = RoundUp(idx.tile, idx.threads); local_size_ *= parts; } // Now we assign group ids // First, put index number + size into an array std::vector<std::pair<size_t, size_t>> to_place; for (size_t i = 0; i < indexes_.size(); i++) { if (indexes_[i].qout == 1) { indexes_[i].base_expr = _Const(0); } else { to_place.emplace_back(i, indexes_[i].qout); } } // Then sort by size (biggest to smallest) and non-po2 first std::sort(to_place.begin(), to_place.end(), [](const std::pair<size_t, size_t>& a, const std::pair<size_t, size_t>& b) -> bool { return (std::make_tuple(IsPo2(a.second), a.second) < std::make_tuple(IsPo2(b.second), b.second)); }); // Now, place into buckets, always use the smallest std::array<std::vector<size_t>, 3> buckets; for (const auto& p : to_place) { size_t which = std::min_element(group_dims_.begin(), group_dims_.end()) - group_dims_.begin(); buckets[which].push_back(p.first); group_dims_[which] *= p.second; } // Now generate the expressions, and put into place for (size_t i = 0; i < 3; i++) { size_t cur_below = 1; for (const size_t idx_id : boost::adaptors::reverse(buckets[i])) { IdxInfo& idx = indexes_[idx_id]; size_t cur = cur_below * idx.qout; sem::ExprPtr expr = _Index(sem::IndexExpr::GROUP, i); if (cur != group_dims_[i]) { expr = expr % cur; } if (cur_below != 1) { expr = expr / cur_below; } if (idx.tile > 1) { expr = expr * idx.tile; } idx.base_expr = expr; cur_below = cur; } } } std::shared_ptr<sem::Block> OutPlan::initOutput(sem::Type type, sem::ExprPtr value) const { using namespace sem::builder; // NOLINT type.array = local_size_ / threads_; return _Block({_Declare(type, "agg", value)}); } std::shared_ptr<sem::Block> OutPlan::initBases() const { using namespace sem::builder; // NOLINT auto out = _Block({}); // For each index, set a _gid variable for (const auto& idx : indexes_) { out->append(_Declare({sem::Type::INDEX}, idx.name + "_gid", idx.base_expr)); } return out; } uint64_t OutPlan::addOutLoops(LoopInfo& loop) const { // Add the loops for all output variables uint64_t threads = threads_; for (const auto& idx : indexes_) { loop.indexes.emplace_back(IndexInfo{idx.name, idx.range, idx.tile, idx.threads}); threads /= idx.threads; } return threads; } sem::ExprPtr OutPlan::regIndex() const { using namespace sem::builder; // NOLINT sem::ExprPtr r = _Const(0); uint64_t mul = 1; for (const auto& idx : indexes_) { r = r + _(idx.name + "_lid") * mul; mul *= RoundUp(idx.tile, idx.threads); } return r; } uint64_t OutPlan::localSize() const { return local_size_; } } // namespace lang } // namespace tile } // namespace vertexai
32.465909
116
0.622681
nitescuc
e524c12a99f73b8e48c1b69cbb2a8c54845f42ac
871
cpp
C++
USACO/friday.cpp
tico88612/Solution-Note
31a9d220fd633c6920760707a07c9a153c2f76cc
[ "MIT" ]
1
2018-02-11T09:41:54.000Z
2018-02-11T09:41:54.000Z
USACO/friday.cpp
tico88612/Solution-Note
31a9d220fd633c6920760707a07c9a153c2f76cc
[ "MIT" ]
null
null
null
USACO/friday.cpp
tico88612/Solution-Note
31a9d220fd633c6920760707a07c9a153c2f76cc
[ "MIT" ]
null
null
null
/* ID: tico8861 TASK: friday LANG: C++ */ /* LANG can be C++11 or C++14 for those more recent releases */ #include <iostream> #include <fstream> #include <string> #include <map> using namespace std; bool isleap(int year){ if((year%400==0)||(year%4==0&&year%100)) return true; return false; } int main() { ofstream fout ("friday.out"); ifstream fin ("friday.in"); int N; fin >> N; int now=1; int day[7]={0}; int norm[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int leap[12]={31,29,31,30,31,30,31,31,30,31,30,31}; for(int year=1900;year<1900+N;year++){ for(int i=0;i<12;i++){ int a=(now+12)%7; day[a]++; if(isleap(year)) now+=leap[i]; else now+=norm[i]; } } fout<<day[6]; for(int i=0;i<6;i++){ fout<<" "<<day[i]; } fout<<endl; return 0; }
19.795455
63
0.529277
tico88612
e5254fc21fb8273a37c95e1c5610fd8f9b51330c
802
cpp
C++
LanQiao/2015Province/03.cpp
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
1
2019-05-04T10:28:32.000Z
2019-05-04T10:28:32.000Z
LanQiao/2015Province/03.cpp
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
null
null
null
LanQiao/2015Province/03.cpp
cnsteven/online-judge
60ee841a97e2bc0dc9c7b23fe5daa186898ab8b7
[ "MIT" ]
3
2020-12-31T04:36:38.000Z
2021-07-25T07:39:31.000Z
/* 三羊献瑞 观察下面的加法算式: 祥 瑞 生 辉 + 三 羊 献 瑞 ------------------- 三 羊 生 瑞 气 (如果有对齐问题,可以参看【图1.jpg】) 其中,相同的汉字代表相同的数字,不同的汉字代表不同的数字。 请你填写“三羊献瑞”所代表的4位数字(答案唯一),不要填写任何多余内容。 1085 */ #include <algorithm> #include <iostream> using namespace std; int main() { int a[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int x, y, z; // 三 羊 献 瑞 祥 生 辉 气 // 0 1 2 3 4 5 6 7 while (next_permutation(a, a + 10)) { if (a[0] == 0 || a[4] == 0) continue; x = a[4] * 1000 + a[3] * 100 + a[5] * 10 + a[6]; y = a[0] * 1000 + a[1] * 100 + a[2] * 10 + a[3]; z = a[0] * 10000 + a[1] * 1000 + a[5] * 100 + a[3] * 10 + a[7]; if (x + y == z) cout << a[0] << a[1] << a[2] << a[3] << endl; } return 0; }
20.05
71
0.402743
cnsteven
e5268d4cebb5c6389eed22bcbb395a2fc6876e11
2,344
cpp
C++
codes/CF/CF_840D.cpp
chessbot108/solved-problems
0945be829a8ea9f0d5896c89331460d70d076691
[ "MIT" ]
2
2021-03-07T03:34:02.000Z
2021-03-09T01:22:21.000Z
codes/CF/CF_840D.cpp
chessbot108/solved-problems
0945be829a8ea9f0d5896c89331460d70d076691
[ "MIT" ]
1
2021-03-27T15:01:23.000Z
2021-03-27T15:55:34.000Z
codes/CF/CF_840D.cpp
chessbot108/solved-problems
0945be829a8ea9f0d5896c89331460d70d076691
[ "MIT" ]
1
2021-03-27T05:02:33.000Z
2021-03-27T05:02:33.000Z
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <ctime> #include <cmath> #include <cassert> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <sstream> #include <list> #include <queue> #include <stack> //#include <unordered_map> //#include <unordered_set> #include <functional> #define max_v 310000 #define LOGN 50 #define int_max 0x3f3f3f3f #define cont continue #define byte_max 0x3f #define pow_2(n) (1 << (n)) //tree #define lsb(n) ((n)&(-(n))) #define LC(n) (((n) << 1) | 1) #define RC(n) (((n) << 1) + 2) using namespace std; void setIO(const string& file_name){ freopen((file_name+".in").c_str(), "r", stdin); freopen((file_name+".out").c_str(), "w+", stdout); } int sum[max_v * LOGN], lc[max_v * LOGN], rc[max_v * LOGN]; int arr[max_v * 2], srt[max_v * 2], root[max_v * 2], n, s, ind, ans; void dup(int& k){ ind++; sum[ind] = sum[k]; lc[ind] = lc[k]; rc[ind] = rc[k]; k = ind; } int get_ind(int key){ return lower_bound(srt, srt + n, key) - &srt[0]; } void U(int p, int val, int& k, int L, int R){ if(p < L || R <= p || R <= L) return ; dup(k); if(L + 1 == R){ sum[k] += val; return ; } int mid = (L + R) / 2; U(p, val, lc[k], L, mid); U(p, val, rc[k], mid, R); sum[k] = sum[lc[k]] + sum[rc[k]]; } void dfs(int k1, int k2, int kth, int L, int R){ if(R <= L || sum[k2] - sum[k1] < kth) return ; if(L + 1 == R){ if(sum[k2] - sum[k1] >= kth) ans = min(ans, L); return ; } int mid = (L + R) / 2; dfs(lc[k1], lc[k2], kth, L, mid); if(ans == int_max) dfs(rc[k1], rc[k2], kth, mid, R); } void pre_process(){ s = pow_2((int)(ceil(log2(n)))); ind = s*2; root[0] = 0; for(int i = 0; i < s - 1; i++){ lc[i] = LC(i); rc[i] = RC(i); srt[i] = arr[i]; } sort(srt, srt + n); for(int i = 1; i<=n; i++){ root[i] = root[i - 1]; U(get_ind(arr[i - 1]), 1, root[i], 0, s); } } int main(){ int q; scanf("%d%d", &n, &q); for(int i = 0; i<n; i++){ scanf("%d", &arr[i]); } pre_process(); while(q--){ int a, b, c; ans = int_max; scanf("%d%d%d", &a, &b, &c); int kth = (b - a + 1)/ c + 1; dfs(root[a - 1], root[b], kth, 0, s); if(ans == int_max) printf("-1\n"); else printf("%d\n", srt[ans]); } return 0; }
18.603175
68
0.523038
chessbot108
e528077d1b8c81dbc32a70d1bf246b991b20bf81
447
cpp
C++
JetBrainsFileWatcher/main.cpp
SineStriker/fsnotifier
38e8253e6a164f760e5e42bf2f4ba9e63d3fb0f6
[ "Apache-2.0" ]
4
2022-03-07T01:47:19.000Z
2022-03-07T12:24:48.000Z
JetBrainsFileWatcher/main.cpp
SineStriker/fsnotifier
38e8253e6a164f760e5e42bf2f4ba9e63d3fb0f6
[ "Apache-2.0" ]
null
null
null
JetBrainsFileWatcher/main.cpp
SineStriker/fsnotifier
38e8253e6a164f760e5e42bf2f4ba9e63d3fb0f6
[ "Apache-2.0" ]
null
null
null
#include "MainWindow.h" #include <QApplication> #include <QDir> #include "FileSystemNotifier.h" #include "JetBrainsFileWatcher/JBFileWatcherUtils.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); // QDir dir(a.applicationDirPath()); // dir.cdUp(); // FileSystemNotifier::setExecutableFilePath(dir.path() + "/fsnotifier.exe"); FileSystemNotifier n; MainWindow w; w.show(); return a.exec(); }
18.625
81
0.673378
SineStriker
e52a70e876636ad699b8053cff4b91ba959ad8df
4,263
cpp
C++
common/src/process/process.cpp
italiangrid/wms
5b2adda72ba13cf2a85ec488894c2024e155a4b5
[ "Apache-2.0" ]
1
2019-01-18T02:19:18.000Z
2019-01-18T02:19:18.000Z
common/src/process/process.cpp
italiangrid/wms
5b2adda72ba13cf2a85ec488894c2024e155a4b5
[ "Apache-2.0" ]
null
null
null
common/src/process/process.cpp
italiangrid/wms
5b2adda72ba13cf2a85ec488894c2024e155a4b5
[ "Apache-2.0" ]
null
null
null
/* Copyright (c) Members of the EGEE Collaboration. 2004. See http://www.eu-egee.org/partners for details on the copyright holders. 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 <cstdlib> #include <unistd.h> #include <sys/wait.h> #include <algorithm> #include "subprocess.h" #include "process.h" #include "user.h" using namespace std; namespace glite { namespace wms { namespace common { namespace process { namespace { class GetProcess { public: GetProcess( pid_t pid ); inline bool operator()( boost::shared_ptr<Subprocess> &proc ) { return this->gp_pid == proc->pid(); } private: pid_t gp_pid; }; GetProcess::GetProcess( pid_t pid ) : gp_pid( pid ) {} class IsSubproc { public: IsSubproc( Subprocess *proc ); inline bool operator()( boost::shared_ptr<Subprocess> &proc ) { return this->is_proc == proc.get(); } private: Subprocess *is_proc; }; IsSubproc::IsSubproc( Subprocess *proc ) : is_proc( proc ) {} } // Anonymous namespace Process *Process::p_s_instance = NULL; Process::Process( void ) : p_son( false ), p_daemon( false ), p_havestd( true ), p_pid( ::getpid() ), p_list() {} Process::~Process( void ) { p_s_instance = NULL; } Subprocess *Process::fork( Functor &functor ) { pid_t pid; Subprocess *proc = NULL; pid = ::fork(); if( pid == 0 ) { // We are in the son this->p_list.clear(); this->p_pid = ::getpid(); this->p_son = true; exit( functor.run() ); } else if( pid > 0 ) { // We are in the father proc = new Subprocess( pid ); this->p_list.push_back( ProcPtr(proc) ); } return proc; } void Process::remove( Subprocess *proc ) { list<ProcPtr>::iterator procIt; procIt = find_if( this->p_list.begin(), this->p_list.end(), IsSubproc(proc) ); if( procIt != this->p_list.end() ) this->p_list.erase( procIt ); return; } Subprocess *Process::wait_first( void ) { int status; pid_t pid; Subprocess *proc = NULL; list<ProcPtr>::iterator procIt; pid = ::wait( &status ); if( pid > 0 ) { procIt = find_if( this->p_list.begin(), this->p_list.end(), GetProcess(pid) ); if( procIt != this->p_list.end() ) { (*procIt)->set_status( status ); proc = procIt->get(); } } return proc; } void Process::wait_one( Subprocess *proc ) { int status; pid_t pid; list<ProcPtr>::iterator procIt; procIt = find_if( this->p_list.begin(), this->p_list.end(), IsSubproc(proc) ); if( procIt != this->p_list.end() ) { pid = ::waitpid( proc->pid(), &status, 0 ); if( pid > 0 ) proc->set_status( status ); } return; } int Process::drop_privileges_forever( const char *newname ) { int res = 0; User oldUser, newUser( newname ); if( newUser && (oldUser.uid() == 0) ) { res = ::setgid( newUser.gid() ); if( res == 0 ) res = ::setuid( newUser.uid() ); } return res; } int Process::drop_privileges( const char *newname ) { int res = 0; User oldUser, newUser( newname ); if( newUser && (oldUser.uid() == 0) ) { res = ::setegid( newUser.gid() ); if( res == 0 ) res = ::seteuid( newUser.uid() ); } return res; } int Process::regain_privileges( void ) { int res = 0; if( !(res = ::setuid(0)) ) res = ::setgid( 0 ); return res; } int Process::make_daemon( bool chdir, bool close ) { int ret = 0; if( !this->p_daemon ) { this->p_havestd = !close; ret = ::daemon( static_cast<int>(!chdir), static_cast<int>(!close) ); if( ret != -1 ) this->p_daemon = true; } else ret = -1; return ret; } pid_t Process::parent( void ) { return ::getppid(); } } // process namespace } // common namespace } // wms namespace } // glite namespace
20.795122
110
0.622332
italiangrid
e5302d82ddf800a058fb520ecac13ab522c99827
1,194
cpp
C++
Foundation/src/DirectoryIterator_VMS.cpp
abyss7/poco
a651a78c76eebd414b37745f7dd8539460154cab
[ "BSL-1.0" ]
null
null
null
Foundation/src/DirectoryIterator_VMS.cpp
abyss7/poco
a651a78c76eebd414b37745f7dd8539460154cab
[ "BSL-1.0" ]
3
2021-06-02T02:59:06.000Z
2021-09-16T04:35:06.000Z
Foundation/src/DirectoryIterator_VMS.cpp
abyss7/poco
a651a78c76eebd414b37745f7dd8539460154cab
[ "BSL-1.0" ]
6
2021-06-02T02:39:34.000Z
2022-03-29T05:51:57.000Z
// // DirectoryIterator_VMS.cpp // // Library: Foundation // Package: Filesystem // Module: DirectoryIterator // // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include "Poco/DirectoryIterator_VMS.h" #include "Poco/Path.h" #include "Poco/Exception.h" #include <iodef.h> #include <atrdef.h> #include <fibdef.h> #include <starlet.h> namespace Poco { DirectoryIteratorImpl::DirectoryIteratorImpl(const std::string& path): _rc(1) { Path p(path); p.makeDirectory(); _search = p.toString(); _search.append("*.*;*"); _fab = cc$rms_fab; _fab.fab$l_fna = (char*) _search.c_str(); _fab.fab$b_fns = _search.size(); _fab.fab$l_nam = &_nam; _nam = cc$rms_nam; _nam.nam$l_esa = _spec; _nam.nam$b_ess = sizeof(_spec); if (sys$parse(&_fab) & 1) throw OpenFileException(path); next(); } DirectoryIteratorImpl::~DirectoryIteratorImpl() { } const std::string& DirectoryIteratorImpl::next() { if (sys$search(&_fab) & 1) _current.clear(); else _current.assign(_fab.fab$l_nam->nam$l_name, _fab.fab$l_nam->nam$b_name + _fab.fab$l_nam->nam$b_type); return _current; } } // namespace Poco
18.090909
103
0.696817
abyss7
e5309865860ce7942b7f39ed4ad67d1a324ac8a1
713
cpp
C++
gui/src/logger.cpp
maede97/ChessEngine
24697e75a7375b68a47e08e0ef4fb4b363f08619
[ "MIT" ]
1
2021-02-20T11:09:59.000Z
2021-02-20T11:09:59.000Z
gui/src/logger.cpp
maede97/ChessEngine
24697e75a7375b68a47e08e0ef4fb4b363f08619
[ "MIT" ]
2
2021-02-13T22:53:59.000Z
2021-02-21T12:43:28.000Z
gui/src/logger.cpp
maede97/ChessEngine
24697e75a7375b68a47e08e0ef4fb4b363f08619
[ "MIT" ]
null
null
null
#include <ChessEngineGui/logger.h> CHESS_NAMESPACE_BEGIN std::vector<std::pair<ImVec4, std::string>> Logger::entries; void Logger::logInfo(std::string what) { entries.push_back(std::make_pair(ImVec4(0, 1, 0, 1), what)); } void Logger::logWarning(std::string what) { entries.push_back(std::make_pair(ImVec4(1, 0.6, 0, 1), what)); } void Logger::displayConsole(int max) { int min_, max_; if (max == -1) { // display all min_ = 0; max_ = entries.size(); } else { // display only last max_ = entries.size(); min_ = std::max(0, max_ - max); } for (int i = min_; i < max_; i++) { ImGui::TextColored(entries[i].first, entries[i].second.c_str()); } } CHESS_NAMESPACE_END
22.28125
68
0.636746
maede97
e531cd17c405b899e279a1e66f2cec531fdee364
2,516
cpp
C++
cpp/src/dotcpp/dot/noda_time/local_time_util.cpp
dotcpp/dotcpp
ba786aa072dd0612f5249de63f80bc540203840e
[ "Apache-2.0" ]
4
2019-08-08T03:53:37.000Z
2021-01-31T06:51:56.000Z
cpp/src/dotcpp/dot/noda_time/local_time_util.cpp
compatibl/dotcpp-mongo
e329e5a0523577b0d1f36c82d5caaac2e92e1023
[ "Apache-2.0" ]
null
null
null
cpp/src/dotcpp/dot/noda_time/local_time_util.cpp
compatibl/dotcpp-mongo
e329e5a0523577b0d1f36c82d5caaac2e92e1023
[ "Apache-2.0" ]
1
2015-03-28T15:52:01.000Z
2015-03-28T15:52:01.000Z
/* Copyright (C) 2015-present The DotCpp Authors. This file is part of .C++, a native C++ implementation of popular .NET class library APIs developed to facilitate code reuse between C# and C++. http://github.com/dotcpp/dotcpp (source) http://dotcpp.org (documentation) 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 <dot/precompiled.hpp> #include <dot/implement.hpp> #include <dot/noda_time/local_time_util.hpp> #include <dot/system/exception.hpp> #include <dot/system/string.hpp> namespace dot { dot::local_time local_time_util::parse(dot::string value) { boost::posix_time::time_input_facet* facet = new boost::posix_time::time_input_facet(); facet->format("%H:%M:%S%f"); std::istringstream stream(*value); stream.imbue(std::locale(std::locale::classic(), facet)); boost::posix_time::ptime ptime; stream >> ptime; // If default constructed time is passed, error message if (ptime == boost::posix_time::not_a_date_time) throw dot::exception(dot::string::format( "String representation of default constructed time {0} " "passed to local_time.Parse(time) method.", value)); return ptime; } int local_time_util::to_iso_int(dot::local_time value) { // local_time is serialized to millisecond precision in ISO 8601 9 digit int hhmmssfff format int result = value.hour() * 100'00'000 + value.minute() * 100'000 + value.second() * 1000 + value.millisecond(); return result; } dot::local_time local_time_util::parse_iso_int(int value) { // Extract year, month, day int hour = value / 100'00'000; value -= hour * 100'00'000; int minute = value / 100'000; value -= minute * 100'000; int second = value / 1000; value -= second * 1000; int millisecond = value; // Create new local_time object, validates values on input return dot::local_time(hour, minute, second, millisecond); } }
34.944444
120
0.67806
dotcpp
e535f53cac3f41386c15bf2999b119b4e6281020
2,009
hpp
C++
src/batched/KokkosBatched_FindAmax_Internal.hpp
dialecticDolt/kokkos-kernels
00189c0be23a70979aeaa162f0abd4c0e4d1c479
[ "BSD-3-Clause" ]
156
2017-03-01T23:38:10.000Z
2022-03-27T21:28:03.000Z
src/batched/KokkosBatched_FindAmax_Internal.hpp
dialecticDolt/kokkos-kernels
00189c0be23a70979aeaa162f0abd4c0e4d1c479
[ "BSD-3-Clause" ]
1,257
2017-03-03T15:25:16.000Z
2022-03-31T19:46:09.000Z
src/batched/KokkosBatched_FindAmax_Internal.hpp
dialecticDolt/kokkos-kernels
00189c0be23a70979aeaa162f0abd4c0e4d1c479
[ "BSD-3-Clause" ]
76
2017-03-01T17:03:59.000Z
2022-03-03T21:04:41.000Z
#ifndef __KOKKOSBATCHED_FIND_AMAX_INTERNAL_HPP__ #define __KOKKOSBATCHED_FIND_AMAX_INTERNAL_HPP__ /// \author Kyungjoo Kim (kyukim@sandia.gov) #include "KokkosBatched_Util.hpp" namespace KokkosBatched { /// /// Serial Internal Impl /// ===================== struct SerialFindAmaxInternal { template<typename ValueType, typename IntType> KOKKOS_INLINE_FUNCTION static int invoke(const int m, const ValueType *__restrict__ A, const int as0, /**/ IntType *__restrict__ idx) { ValueType max_val(A[0]); IntType val_loc(0); for (int i=1;i<m;++i) { const int idx_a = i*as0; if (A[idx_a] > max_val) { max_val = A[idx_a]; val_loc = i; } } *idx = val_loc; return 0; } }; /// /// TeamVector Internal Impl /// ======================== struct TeamVectorFindAmaxInternal { template<typename MemberType, typename ValueType, typename IntType> KOKKOS_INLINE_FUNCTION static int invoke(const MemberType &member, const int m, const ValueType *__restrict__ A, const int as0, /**/ IntType *__restrict__ idx) { if (m > 0) { using reducer_value_type = typename Kokkos::MaxLoc<ValueType,IntType>::value_type; reducer_value_type value; Kokkos::MaxLoc<ValueType,IntType> reducer_value(value); Kokkos::parallel_reduce (Kokkos::TeamVectorRange(member, m), [&](const int &i, reducer_value_type &update) { const int idx_a = i*as0; if (A[idx_a] > update.val) { update.val = A[idx_a]; update.loc = i; } }, reducer_value); Kokkos::single (Kokkos::PerTeam(member), [&]() { *idx = value.loc; }); } else { Kokkos::single (Kokkos::PerTeam(member), [&]() { *idx = 0; }); } return 0; } }; } #endif
24.5
90
0.551518
dialecticDolt
e536aafb809ed6ff9811f384a52dcc866e9d4eb2
649
cpp
C++
Solutions/LASTDIG.cpp
sjnonweb/spoj
72cf2afcf4466f1356a8646b5e4f925144cb9172
[ "MIT" ]
1
2016-10-05T20:07:03.000Z
2016-10-05T20:07:03.000Z
Solutions/LASTDIG.cpp
sjnonweb/spoj
72cf2afcf4466f1356a8646b5e4f925144cb9172
[ "MIT" ]
null
null
null
Solutions/LASTDIG.cpp
sjnonweb/spoj
72cf2afcf4466f1356a8646b5e4f925144cb9172
[ "MIT" ]
null
null
null
#include <iostream> #include <cmath> using namespace std; int main() { long int test,a,b,i,j,unit,rem,cycle[4]; cin>>test; while(test--) { cin>>a>>b; a=a%10; if(a==0) { cout<<"0"<<endl; continue; } cycle[0]=0; i=0; j=1; do { unit=(((int)pow(a,j))%10); if(cycle[0]==unit) break; cycle[i]=unit; i++; j++; }while(1); rem=b%i; if(rem==0) cout<<cycle[i-1]<<endl; else cout<<cycle[rem-1]<<endl; } return 0; }
17.540541
44
0.371341
sjnonweb
e5379e9ffc988fe521e8faee0d6cbd3b2244856c
2,730
cpp
C++
code/src/tutos/2-map/main.cpp
guillaume-haerinck/imac-soutien-tower-defense
bfa7843803421189f2d9fa47c55d27d2851da454
[ "MIT" ]
null
null
null
code/src/tutos/2-map/main.cpp
guillaume-haerinck/imac-soutien-tower-defense
bfa7843803421189f2d9fa47c55d27d2851da454
[ "MIT" ]
null
null
null
code/src/tutos/2-map/main.cpp
guillaume-haerinck/imac-soutien-tower-defense
bfa7843803421189f2d9fa47c55d27d2851da454
[ "MIT" ]
null
null
null
#ifdef _WIN32 #include <windows.h> #endif #define _USE_MATH_DEFINES #include <cmath> #include <spdlog/spdlog.h> #include <SDL2/SDL.h> #include <glad/glad.h> #include <stdlib.h> #include <stdio.h> #include "core/gl-log-handler.hpp" #include "core/init.hpp" #include "entity.hpp" #include "map.hpp" static const Uint32 FRAMERATE_MILLISECONDS = 1000 / 60; int main(int argc, char **argv) { SDL_Window* window = imac::init(); if (window == nullptr) { spdlog::critical("[INIT] Init not achieved !"); debug_break(); } glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, WINDOW_WIDTH, WINDOW_HEIGHT, 0); // Entities std::vector<Entity*> entities; /* Map */ Map level1; bool loop = true; while (loop) { Uint32 startTime = SDL_GetTicks(); glClear(GL_COLOR_BUFFER_BIT); level1.draw(); /* Update des entités */ for (Entity* entity : entities) { entity->update(); } SDL_GL_SwapWindow(window); SDL_Event e; while (SDL_PollEvent(&e)) { if (e.type == SDL_QUIT) { loop = false; break; } switch (e.type) { case SDL_MOUSEBUTTONUP: { printf("clic en (%d, %d)\n", e.button.x, e.button.y); glm::vec2 gridPos = level1.windowToGrid((float) e.button.x, (float) e.button.y); spdlog::info("Grid x: {} y: {}", gridPos.x, gridPos.y); MapTile tile = level1.getTile(gridPos.x, gridPos.y); if (tile == MapTile::constructible) { spdlog::info("I can construct here"); glm::vec2 winPos = level1.gridToWindow(gridPos.x, gridPos.y); Entity* myNewEntity = new Entity(winPos.x, winPos.y); entities.push_back(myNewEntity); } else { spdlog::warn("can't construct here"); } } break; case SDL_KEYDOWN: printf("touche pressee (code = %d)\n", e.key.keysym.sym); break; default: break; } } Uint32 elapsedTime = SDL_GetTicks() - startTime; if (elapsedTime < FRAMERATE_MILLISECONDS) { SDL_Delay(FRAMERATE_MILLISECONDS - elapsedTime); } } /* Cleanup */ SDL_DestroyWindow(window); SDL_Quit(); for (Entity* entity : entities) { delete entity; } return EXIT_SUCCESS; }
28.14433
104
0.503663
guillaume-haerinck
e53a60e07b456820f1ae3cae980f77b5f72c719e
2,885
cpp
C++
Project Euler/Euler9.cpp
ahakouz17/Competitive-Programming-Practice
5f4daaf491ab03bb86387e491ecc5634b7f99433
[ "MIT" ]
null
null
null
Project Euler/Euler9.cpp
ahakouz17/Competitive-Programming-Practice
5f4daaf491ab03bb86387e491ecc5634b7f99433
[ "MIT" ]
null
null
null
Project Euler/Euler9.cpp
ahakouz17/Competitive-Programming-Practice
5f4daaf491ab03bb86387e491ecc5634b7f99433
[ "MIT" ]
null
null
null
/* * * A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, * a^2 + b^2 = c^2 * * For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. * * There exists exactly one Pythagorean triplet for which a + b + c = 1000. * Find the product abc. * * Answer: 31875000 */ #include <iostream> #include <map> #include <vector> #include <algorithm> #include <math.h> using namespace std; int multiply_matrix[3][2][2] = {{{2, -1},{1, 0}}, {{2, 1},{1, 0}}, {{1, 2},{0, 1}}}; map<int, int> triplet_sums; const int MAX_N = 3005; void insertAllPairs(int a, int b, int c); void generatePrimitiveTripletsTree(int m_n[]); int main() { int t, n; // first primitive triplet is: 3,4,5 // m = 2, n = 1 // sum = 3+4+5 = 12 // product = 3*4*5 = 60 int m_n[2] = {2, 1}; generatePrimitiveTripletsTree(m_n); insertAllPairs(3, 4, 5); scanf("%d", &t); while(t--){ scanf("%d", &n); if (triplet_sums.count(n)==0){ printf("-1\n"); } else { printf("%d\n", triplet_sums[n]); } } return 0; } void insertAllPairs(int a, int b, int c){ int a_mod= a, b_mod = b, c_mod = c, key; while(a_mod+b_mod+c_mod <= MAX_N){ key = a_mod+b_mod+c_mod; if (triplet_sums.count(key)==0) triplet_sums[key] = a_mod*b_mod*c_mod; else { triplet_sums[key] = max(a_mod*b_mod*c_mod, triplet_sums[key]); } a_mod += a; b_mod += b; c_mod += c; } } void generatePrimitiveTripletsTree(int root_mn[]){ int node[2], a, b, c; for(int i = 0; i < 3; i++){ node[0] = multiply_matrix[i][0][0] * root_mn[0] + multiply_matrix[i][0][1] * root_mn[1]; node[1] = multiply_matrix[i][1][0] * root_mn[0] + multiply_matrix[i][1][1] * root_mn[1]; a = node[0]*node[0]-node[1]*node[1]; b = 2*node[0]*node[1]; c = node[0]*node[0]+node[1]*node[1]; if (a+b+c > MAX_N) continue; insertAllPairs(a, b, c); generatePrimitiveTripletsTree(node); } } /* BRUTE FORCE SOLUTION! - TLE map<int, int> squares; vector<int> square_values(1000); for(int i = 1; i < 1000; i++){ squares[i*i] = i; square_values[i]=i*i; } while(t--){ scanf("%d", &n); bool found = false; //int maxFound=-1; for(int a = 1; a < 1000; a++){ if(2* a >= n) break; for(int b = a; b < 1000; b++){ if(a+b >= n) break; int key = (square_values[a]+square_values[b]); if (squares.count(key) == 1 && a+b+squares[key]== n){ found = true; printf("%d\n", a*b*squares[key]); break; } } if(found) break; } if(!found) printf("-1\n"); }*/
26.46789
96
0.495667
ahakouz17
e53a6173782ff0b52a492f8f00f1f3d1d8b9605b
1,234
cpp
C++
Views/createrankview.cpp
MehmetHY/MilitaryOutpostManagement-Qt5
fec112b5496d64e7b4826f05a84647848e49d78d
[ "MIT" ]
null
null
null
Views/createrankview.cpp
MehmetHY/MilitaryOutpostManagement-Qt5
fec112b5496d64e7b4826f05a84647848e49d78d
[ "MIT" ]
null
null
null
Views/createrankview.cpp
MehmetHY/MilitaryOutpostManagement-Qt5
fec112b5496d64e7b4826f05a84647848e49d78d
[ "MIT" ]
null
null
null
#include "createrankview.h" #include "ui_createrankview.h" #include "../mainwindow.h" #include "manageranksview.h" #include "QMessageBox" #include "../Models/rank.h" CreateRankView::CreateRankView(MainWindow *parent) : QWidget(parent), mainWindow(parent), ui(new Ui::CreateRankView) { ui->setupUi(this); connect(ui->backButton, &QPushButton::pressed, this, &CreateRankView::handleBackButtonPressed); connect(ui->createButton, &QPushButton::pressed, this, &CreateRankView::handleCreateButtonPressed); } CreateRankView::~CreateRankView() { delete ui; } void CreateRankView::handleCreateButtonPressed() const { QString name = ui->lineEdit->text().trimmed(); if (name.isEmpty()) { QMessageBox::warning(mainWindow, "Invalid Input", "Name cannot be empty!"); return; } if (Rank::isRankExist(name)) { QMessageBox::warning(mainWindow, "Invalid Input", "Rank " + name + " already exist!"); return; } ui->lineEdit->clear(); Rank::createRank(name); QMessageBox::information(mainWindow, "Success", "Rank created!"); } void CreateRankView::handleBackButtonPressed() const { mainWindow->changeRootWidget(new ManageRanksView(mainWindow)); }
27.422222
103
0.691248
MehmetHY
e53a87307196e71bdaa29b0b31d6427838139570
16,901
cpp
C++
IMS_ModuleFunction_Comm.cpp
TheNewBob/IMS2
572dcfd4c3621458f01278713437c2aca526d2e6
[ "MIT" ]
2
2018-01-28T20:07:52.000Z
2018-03-01T22:41:39.000Z
IMS_ModuleFunction_Comm.cpp
TheNewBob/IMS2
572dcfd4c3621458f01278713437c2aca526d2e6
[ "MIT" ]
6
2017-08-26T10:24:48.000Z
2018-01-28T13:45:34.000Z
IMS_ModuleFunction_Comm.cpp
TheNewBob/IMS2
572dcfd4c3621458f01278713437c2aca526d2e6
[ "MIT" ]
null
null
null
#include "GuiIncludes.h" #include "Common.h" #include "ModuleFunctionIncludes.h" #include "StateMachineIncludes.h" #include "IMS_ModuleFunctionData_Comm.h" #include "GUI_ModuleFunction_Base.h" #include "GUI_ModuleFunction_Comm.h" #include "IMS_ModuleFunction_Comm.h" IMS_ModuleFunction_Comm::IMS_ModuleFunction_Comm(IMS_ModuleFunctionData_Comm *_data, IMS_Module *_module, bool creategui) : IMS_ModuleFunction_Base(_data, _module, MTYPE_COMM), data(_data) { //check which actions are actually supported by the config bool hasdeployment = data->deployanimname != ""; bool hasscanning = data->searchanimname != ""; bool hastracking = data->trackinganimname != ""; if (creategui) { //add our GUI to the module's GUI page menu = new GUI_ModuleFunction_Comm(this, module->GetGui(), hasdeployment, hasscanning, hastracking); } //set up the statemachine //create the states the module function can be in //deployed is the natural stagin state for everything else. basically, //if a module function doesn't support deployment, what it actually doesn't //support is retracting. The function will just be regarded as permanently deployed state.AddState(COMMSTATE_DEPLOYED, "deployed"); if (hasdeployment) { state.AddState(COMMSTATE_RETRACTED, "retracted"); state.AddState(COMMSTATE_DEPLOYING, "deploying", false); state.AddState(COMMSTATE_RETRACTING, "retracting", false); } if (hasscanning) { state.AddState(COMMSTATE_SEARCHING, "scanning"); state.AddState(COMMSTATE_STOP_SEARCHING, "resetting", false); } if (hastracking) { state.AddState(COMMSTATE_ALIGNING, "aligning", false); state.AddState(COMMSTATE_TRACKING, "tracking"); state.AddState(COMMSTATE_STOP_TRACKING, "resetting", false); } //connect the states to create a statemap if (hasdeployment) { state.ConnectStateTo(COMMSTATE_RETRACTED, COMMSTATE_DEPLOYING); //if antenna retracted, it can move to deploying state state.ConnectStateTo(COMMSTATE_DEPLOYING, COMMSTATE_DEPLOYED); //if antenna deploying, it can move to deployed state state.ConnectStateTo(COMMSTATE_DEPLOYED, COMMSTATE_RETRACTING); //if antenna deployed, it can move to retracting state state.ConnectStateTo(COMMSTATE_RETRACTING, COMMSTATE_RETRACTED); //if antenna retracting, it can move to retracted state state.ConnectStateTo(COMMSTATE_RETRACTING, COMMSTATE_DEPLOYING); //antenna can be retracted while it is deploying state.ConnectStateTo(COMMSTATE_DEPLOYING, COMMSTATE_RETRACTING); //antenna can be deployed while it is retracting } if (hasscanning) { state.ConnectStateTo(COMMSTATE_DEPLOYED, COMMSTATE_SEARCHING); //etc state.ConnectStateTo(COMMSTATE_SEARCHING, COMMSTATE_STOP_SEARCHING); state.ConnectStateTo(COMMSTATE_STOP_SEARCHING, COMMSTATE_DEPLOYED); } if (hastracking) { state.ConnectStateTo(COMMSTATE_DEPLOYED, COMMSTATE_ALIGNING); state.ConnectStateTo(COMMSTATE_ALIGNING, COMMSTATE_TRACKING); state.ConnectStateTo(COMMSTATE_TRACKING, COMMSTATE_ALIGNING); state.ConnectStateTo(COMMSTATE_TRACKING, COMMSTATE_STOP_TRACKING); state.ConnectStateTo(COMMSTATE_ALIGNING, COMMSTATE_STOP_TRACKING); //the aligning state can skip the tracking state and move to the stop tracking state. This is one of the rare occasions where two intermediate states are connected directly state.ConnectStateTo(COMMSTATE_STOP_TRACKING, COMMSTATE_DEPLOYED); state.ConnectStateTo(COMMSTATE_STOP_TRACKING, COMMSTATE_ALIGNING); } } IMS_ModuleFunction_Comm::~IMS_ModuleFunction_Comm() { } void IMS_ModuleFunction_Comm::PostLoad() { if (!state.IsInitialised()) { //setting the initial state of the statemachine, as it wasn't loaded from scenario if (data->deployanimname != "") { state.SetInitialState(COMMSTATE_RETRACTED); } else { //if deployment is not supported, the antenna is //actually considered permanently deployed state.SetInitialState(COMMSTATE_DEPLOYED); } menu->SetStateDescription(state.GetStateDescription()); } else { //states were loaded from scenario, initialise the control visuals //initialise the control visuals menu->SetStateDescription(state.GetStateDescription()); int curstate = state.GetState(); if (curstate != COMMSTATE_RETRACTED) { if (curstate == COMMSTATE_DEPLOYING || curstate == COMMSTATE_RETRACTING) { menu->SetDeployBoxState(BLINKING); } else { menu->SetDeployBoxState(ON); if (curstate == COMMSTATE_SEARCHING) { menu->SetSearchBoxState(ON); } else if (curstate == COMMSTATE_TRACKING) { menu->SetTrackBoxState(ON); } else { if (curstate == COMMSTATE_STOP_SEARCHING) { menu->SetSearchBoxState(BLINKING); } else if (curstate == COMMSTATE_ALIGNING || curstate == COMMSTATE_STOP_TRACKING) { menu->SetTrackBoxState(BLINKING); } } } } int tgtstate = state.GetTargetState(); if (tgtstate != curstate) { if (tgtstate == COMMSTATE_RETRACTED) { menu->SetDeployBoxState(BLINKING); } else if (tgtstate == COMMSTATE_SEARCHING) { menu->SetSearchBoxState(BLINKING); } else if (tgtstate == COMMSTATE_TRACKING) { menu->SetTrackBoxState(BLINKING); } } } } GUI_ModuleFunction_Base *IMS_ModuleFunction_Comm::GetGui() { return menu; } void IMS_ModuleFunction_Comm::PreStep(double simdt, IMS2 *vessel) { //don't forget to call the prestep function of the base class! IMS_ModuleFunction_Base::PreStep(simdt, vessel); //check if the state has changed during the last frame, //and whether we reached the target state if (state.StateChanged()) { //state has changed, update the state description on the gui menu->SetStateDescription(state.GetStateDescription()); //first get the current event. This will immediately advance the state to the next //state if it is secure, so don't call GetStateAndAdvance twice in a frame. //then take appropriate action depending on what state we ended up in //in the case of this module function, this simply takes the form of starting //the necessary animations switch (state.GetStateAndAdvance()) { case COMMSTATE_DEPLOYING: addEvent(new StartAnimationEvent(data->deployanimname, 1.0)); menu->SetDeployBoxState(BLINKING); break; case COMMSTATE_RETRACTING: addEvent(new StartAnimationEvent(data->deployanimname, -1.0)); menu->SetDeployBoxState(BLINKING); break; case COMMSTATE_STOP_SEARCHING: addEvent(new StopAnimationEvent(data->searchanimname)); menu->SetSearchBoxState(BLINKING); break; case COMMSTATE_STOP_TRACKING: addEvent(new StopAnimationEvent(data->trackinganimname)); menu->SetTrackBoxState(BLINKING); break; case COMMSTATE_ALIGNING: //check if we have a target selected if (targetname != "") { menu->SetTrackBoxState(BLINKING); addEvent(new StartTrackingAnimationEvent(data->trackinganimname, 1.0, oapiGetObjectByName((char*)targetname.data()))); } else { menu->SetTargetDescription("set a valid target for tracking!", true); menu->SetTrackBoxState(OFF); state.SetTargetState(COMMSTATE_DEPLOYED); } break; case COMMSTATE_SEARCHING: addEvent(new StartAnimationEvent(data->searchanimname, 1.0)); menu->SetSearchBoxState(ON); break; case COMMSTATE_TRACKING: menu->SetTrackBoxState(ON); break; case COMMSTATE_DEPLOYED: menu->SetSearchBoxState(OFF); menu->SetTrackBoxState(OFF); menu->SetDeployBoxState(ON); break; case COMMSTATE_RETRACTED: menu->SetSearchBoxState(OFF); menu->SetTrackBoxState(OFF); menu->SetDeployBoxState(OFF); break; } } } void IMS_ModuleFunction_Comm::AddFunctionToVessel(IMS2 *vessel) { } void IMS_ModuleFunction_Comm::CommandDeploy() { if (data->deployanimname == "") return; if (state.GetState() != COMMSTATE_RETRACTED) { //if the state is not currently retracted, clicking the deployment box is interpreted as an order to retract state.SetTargetState(COMMSTATE_RETRACTED); menu->SetDeployBoxState(BLINKING); } else { //if it is retracted, we interpret it as an order to deploy state.SetTargetState(COMMSTATE_DEPLOYED); menu->SetDeployBoxState(BLINKING); } //if the current state is stable, advance it. //if the current state is an Intermediate one, the state //will be advanced by an event at the proper time state.AdvanceStateSecure(); } void IMS_ModuleFunction_Comm::CommandSearch() { if (data->searchanimname == "") return; //if the comm is currently searching, stop searching if (state.GetState() == COMMSTATE_SEARCHING) { state.SetTargetState(COMMSTATE_DEPLOYED); menu->SetSearchBoxState(BLINKING); } else { //otherwise, we want to start searching state.SetTargetState(COMMSTATE_SEARCHING); menu->SetSearchBoxState(BLINKING); } state.AdvanceStateSecure(); } void IMS_ModuleFunction_Comm::CommandTrack() { if (data->trackinganimname == "") return; int curstate = state.GetState(); if (curstate == COMMSTATE_TRACKING || curstate == COMMSTATE_ALIGNING) { //if the comm is currently tracking or aligning, we want it to stop and get back to deployed state state.SetTargetState(COMMSTATE_DEPLOYED); menu->SetTrackBoxState(BLINKING); } else { state.SetTargetState(COMMSTATE_TRACKING); menu->SetTrackBoxState(BLINKING); } state.AdvanceStateSecure(); } void IMS_ModuleFunction_Comm::CommandSetTarget() { if (data->trackinganimname == "") return; //open an input callback for the user to set the target oapiOpenInputBox("enter target", SetTargetInputCallback, NULL, 15, this); } void IMS_ModuleFunction_Comm::SetTarget(string target) { if (data->trackinganimname == "") return; OBJHANDLE checktarget = oapiGetObjectByName((char*)target.data()); int currentstate = state.GetState(); if (checktarget == NULL) { //if an invalid target was entered, display an error message menu->SetTargetDescription("invalid target!", true); //if the antenna is currently tracking or aligning with a previous target, //stop it and bring it back to origin if (currentstate == COMMSTATE_TRACKING || currentstate == COMMSTATE_ALIGNING) { state.SetTargetState(COMMSTATE_DEPLOYED); } targetname = ""; } else { //a valid target was entered, update state, animation and gui menu->SetTargetDescription(target); targetname = target; if (currentstate == COMMSTATE_TRACKING || currentstate == COMMSTATE_ALIGNING) { addEvent(new ModifyTrackingAnimationEvent(data->trackinganimname, 0.0, checktarget)); state.SetTargetState(COMMSTATE_TRACKING); } } state.AdvanceStateSecure(); } bool IMS_ModuleFunction_Comm::ProcessEvent(Event_Base *e) { if (*e == ANIMATIONFINISHEDEVENT) { //the animation that has finished is on of ours, //that means that an intermediate state has reached its end //we don't even have to know which one. That's what we have the statemachine for. AnimationFinishedEvent *anim = (AnimationFinishedEvent*)e; string id = anim->GetAnimationId(); if (id == data->deployanimname || id == data->searchanimname || id == data->trackinganimname) { state.AdvanceState(); } } else if (*e == ANIMATIONFAILEDEVENT) { //an animation has failed to start, probably due to an unfulfilled dependency. //we need to take action! AnimationFailedEvent *anim = (AnimationFailedEvent*)e; string id = anim->GetAnimationId(); int curstate = state.GetState(); if (id == data->deployanimname) { //we'll have to know what direction the animation was supposed to move if (anim->GetSpeed() < 0 && curstate == COMMSTATE_RETRACTING) { GUImanager::Alert(data->GetName() + ": unable to retract at the moment!", module->GetGui()->GetFirstVisibleChild(), _R(0, 0, 0, 0), STYLE_ERROR, module->GetGui()->GetStyleSet()); state.SetTargetState(COMMSTATE_DEPLOYED); } else if (anim->GetSpeed() > 0 && curstate == COMMSTATE_DEPLOYING) { GUImanager::Alert(data->GetName() + ": unable to deploy at the moment!", module->GetGui()->GetFirstVisibleChild(), _R(0, 0, 0, 0), STYLE_ERROR, module->GetGui()->GetStyleSet()); state.SetTargetState(COMMSTATE_RETRACTED); } } else if (id == data->searchanimname && curstate == COMMSTATE_SEARCHING) { GUImanager::Alert(data->GetName() + ": unable to scan at the moment!", module->GetGui()->GetFirstVisibleChild(), _R(0, 0, 0, 0), STYLE_ERROR, module->GetGui()->GetStyleSet()); state.SetTargetState(COMMSTATE_DEPLOYED); } else if (id == data->trackinganimname && curstate == COMMSTATE_ALIGNING) { GUImanager::Alert(data->GetName() + ": unable to start tracking at the moment!", module->GetGui()->GetFirstVisibleChild(), _R(0, 0, 0, 0), STYLE_ERROR, module->GetGui()->GetStyleSet()); state.SetTargetState(COMMSTATE_DEPLOYED); } state.AdvanceStateSecure(); } else if (*e == ANIMATIONSTARTEDEVENT) { //an animation has been started. Probably it was started by this module function, in which case we don't need to do anything. //but if module functions have shared animations, the state of this module function must now change. AnimationStartedEvent *ev = (AnimationStartedEvent*)e; string animid = ev->GetAnimationId(); int curstate = state.GetState(); if (animid == data->deployanimname) { //check if the started animation concerns this function, and whether it needs to change state as a result if (ev->GetSpeed() > 0 && curstate == COMMSTATE_RETRACTED) { state.SetTargetState(COMMSTATE_DEPLOYED); state.AdvanceStateSecure(); } else if (ev->GetSpeed() < 0 && curstate == COMMSTATE_DEPLOYED) { state.SetTargetState(COMMSTATE_RETRACTED); state.AdvanceStateSecure(); } } else if (animid == data->searchanimname && curstate == COMMSTATE_DEPLOYED) { state.SetTargetState(COMMSTATE_SEARCHING); state.AdvanceStateSecure(); } else if (animid == data->trackinganimname && curstate == COMMSTATE_DEPLOYED) { state.SetTargetState(COMMSTATE_TRACKING); state.AdvanceStateSecure(); } } else if (*e == TRACKINGANIMATIONSTATUSEVENT) { //while the array is tracking, we get a status update every frame. //Currently, we're only interested if the array is aligning or aligned TrackingAnimationStatusEvent *status = (TrackingAnimationStatusEvent*)e; //check if the status update is actually for this modulefunction, and whether it has changed if (status->GetAnimationId() == data->trackinganimname && status->GetStatus() != lasttrackingstatus) { //if the antenna was unable to track the target before, //we have to update the state display to make the error message disapear if (lasttrackingstatus == UNABLE) { menu->SetStateDescription(state.GetStateDescription()); } if (status->GetStatus() == ALIGNED) { if (state.GetState() == COMMSTATE_ALIGNING) { //the array has just aligned itself with the target, update the statemachine state.AdvanceState(); } } else if (status->GetStatus() == ALIGNING) { if (state.GetState() == COMMSTATE_TRACKING) { state.SetTargetState(COMMSTATE_TRACKING); } } else if (status->GetStatus() == REVERTING) { if (state.GetState() == COMMSTATE_ALIGNING || state.GetState() == COMMSTATE_TRACKING) { //the array is on its way back to deployed position. Stop whatever it is it's doing right now state.AdvanceState(); } } else if (status->GetStatus() == UNABLE) { //the array is unable to align with the specified target. //print an error message to the gui. menu->SetStateDescription("unable to align with " + targetname + "!", true); } lasttrackingstatus = status->GetStatus(); } } return false; } void IMS_ModuleFunction_Comm::SaveState(FILEHANDLE scn) { int curstate, tgtstate; curstate = state.GetState(); tgtstate = state.GetTargetState(); oapiWriteScenario_int(scn, "STATE", curstate); if (tgtstate != curstate) { oapiWriteScenario_int(scn, "TGTSTATE", state.GetTargetState()); } if (targetname != "") { //there is a tracking target set, so save that too oapiWriteScenario_string(scn, "TRACKINGTGT", (char*)targetname.data()); } } bool IMS_ModuleFunction_Comm::processScenarioLine(string line) { if (line.substr(0, 5) == "STATE") { int curstate = atoi(line.substr(6).data()); state.SetInitialState(curstate); return true; } else if (line.substr(0, 8) == "TGTSTATE") { int tgtstate = atoi(line.substr(9).data()); if (tgtstate != state.GetState()) { state.SetTargetState(tgtstate); } return true; } else if (line.substr(0, 11) == "TRACKINGTGT") { targetname = line.substr(12); menu->SetTargetDescription(targetname); return true; } return false; } bool SetTargetInputCallback(void *id, char *str, void *usrdata) { if (strlen(str) == 0) { return false; } IMS_ModuleFunction_Comm *comm = (IMS_ModuleFunction_Comm*)usrdata; comm->SetTarget(string(str)); return true; }
30.50722
242
0.725993
TheNewBob
e53c3a180ef6ac0c59839a0e8f364fd4c3967f6e
3,238
cpp
C++
tests/test_list.cpp
SpockBotMC/cpp-nbt
6f2e19586f15b442e2bb26079943b11496f894d2
[ "Zlib" ]
19
2020-07-17T17:51:20.000Z
2022-03-06T00:15:09.000Z
tests/test_list.cpp
SpockBotMC/cpp-nbt
6f2e19586f15b442e2bb26079943b11496f894d2
[ "Zlib" ]
6
2020-07-17T15:22:20.000Z
2022-02-19T21:26:37.000Z
tests/test_list.cpp
SpockBotMC/cpp-nbt
6f2e19586f15b442e2bb26079943b11496f894d2
[ "Zlib" ]
2
2020-10-12T14:52:50.000Z
2021-07-07T09:13:05.000Z
#include <fstream> #include <sstream> #undef NDEBUG #include <cassert> #include "nbt.hpp" int main() { nbt::TagList test_list { nbt::TagList {nbt::TagEnd {}}, { nbt::TagByte {1}, nbt::TagByte {2}, nbt::TagByte {3}, }, { nbt::TagShort {1 << 8}, nbt::TagShort {2 << 8}, nbt::TagShort {3 << 8}, }, { nbt::TagInt {1 << 16}, nbt::TagInt {2 << 16}, nbt::TagInt {3 << 16}, }, { nbt::TagLong {1LL << 32}, nbt::TagLong {2LL << 32}, nbt::TagLong {3LL << 32}, }, { nbt::TagFloat {0.1f}, nbt::TagFloat {0.2f}, nbt::TagFloat {0.3f}, }, { nbt::TagDouble {0.1}, nbt::TagDouble {0.2}, nbt::TagDouble {0.3}, }, { nbt::TagByteArray {1}, nbt::TagByteArray {2}, nbt::TagByteArray {3}, }, { nbt::TagIntArray {1 << 16}, nbt::TagIntArray {2 << 16}, nbt::TagIntArray {3 << 16}, }, { nbt::TagLongArray {1LL << 32}, nbt::TagLongArray {2LL << 32}, nbt::TagLongArray {3LL << 32}, }, { "String #1", "String #2", "String #3", }, { nbt::TagCompound {{"name", "Compound #1"}}, nbt::TagCompound {{"name", "Compound #2"}}, nbt::TagCompound {{"name", "Compound #3"}}, }, }; nbt::NBT root {"List Test", {{"list", test_list}}}; std::stringstream good_buffer; good_buffer << std::ifstream {"list.nbt"}.rdbuf(); std::stringstream test_buffer; root.encode(test_buffer); assert(("binary_list", good_buffer.str() == test_buffer.str())); nbt::NBT file {good_buffer}; const auto& a {nbt::get_list<nbt::TagList>(root.at<nbt::TagList>("list"))}; const auto& b {nbt::get_list<nbt::TagList>(file.at<nbt::TagList>("list"))}; #define TEST(name, type, index) \ assert(( \ #name, nbt::get_list<type>(a[index]) == nbt::get_list<type>(b[index]))) TEST(list_byte, nbt::TagByte, 1); TEST(list_short, nbt::TagShort, 2); TEST(list_int, nbt::TagInt, 3); TEST(list_long, nbt::TagLong, 4); TEST(list_float, nbt::TagFloat, 5); TEST(list_double, nbt::TagDouble, 6); TEST(list_byte_array, nbt::TagByteArray, 7); TEST(list_int_array, nbt::TagIntArray, 8); TEST(list_long_array, nbt::TagLongArray, 9); const auto& dicts_a {nbt::get_list<nbt::TagCompound>(a[11])}; const auto& dicts_b {nbt::get_list<nbt::TagCompound>(b[11])}; assert(("compound_list_length", dicts_a.size() == dicts_b.size())); for(size_t i {0}; i < dicts_a.size(); i++) for(const auto& [key, val] : dicts_a[i].base) assert(("compound_compare", std::get<nbt::TagString>(val) == std::get<nbt::TagString>(dicts_b[i].at(key)))); std::stringstream print_buffer; print_buffer << root; std::stringstream good_print; good_print << std::ifstream {"printed_list.txt"}.rdbuf(); assert(("printed_list", print_buffer.str() == good_print.str())); }
26.760331
79
0.51328
SpockBotMC
e53c3c786211debde0fdca51c2ed14a8c86bd230
2,253
cpp
C++
Object3D.cpp
moelatt/A-Simple-Ray-Tracing
c4625f5d9d55add47d10824eebae4c6c12af81f1
[ "MIT" ]
null
null
null
Object3D.cpp
moelatt/A-Simple-Ray-Tracing
c4625f5d9d55add47d10824eebae4c6c12af81f1
[ "MIT" ]
null
null
null
Object3D.cpp
moelatt/A-Simple-Ray-Tracing
c4625f5d9d55add47d10824eebae4c6c12af81f1
[ "MIT" ]
null
null
null
#include "main.h" using namespace std; void phongLight(scene& objectScene, vecRay pos, int number, float r){ for (int i = 0; i < number; i++) { float t = 2 * M_PI / number * i; light* lig = new light(pos + vecRay(r * cos(t), r * sin(t), 0), RGB(1, 1, 1) , 1.0 / number); objectScene.LightAdd(lig); } } void Sphere(scene& objectScene, vecRay pos, float r =0.5f, RGB col = RGB(0, 0, 1), bool ref =false) { sphereGraph* s = new sphereGraph(r, pos); s->natrualColor = col; s->reflective = ref; objectScene.ObjectAdd(s); } void plane(scene& objectScene, vecRay pos, vecRay dir, RGB col =RGB(0, 0.5, 0.5)){ objectPlane* p = new objectPlane(pos, vecRay(0, 0, 1)^dir); p->natrualColor = col; p->k_spec = 0; objectScene.ObjectAdd(p); } void plane1(scene& objectScene, vecRay pos, RGB col = RGB(0, 1, 0),char inte = 'c'){ switch (inte){ objectPlane* obj; case 'c': obj = new objectPlane(pos, vecRay(0, 0, -1)); obj->natrualColor = col; obj->k_spec = 0; objectScene.ObjectAdd(obj); break; case 'f': obj = new objectPlane(pos, vecRay(0, 0, 1)); obj->natrualColor = col; obj->k_spec = 0; objectScene.ObjectAdd(obj); break; default:break; } } void DrawObject(scene& objectScene, float ir, float kr, float transparent) { Sphere(objectScene, vecRay(1.5, 0.0, 1.2), 0.5, RGB(0.9, 0.5, 0), false); Sphere(objectScene, vecRay(1.2, 0.0, 0.0), 0.5, RGB(0.5, 0.8, 1), false); sphereGraph* sph1 = new sphereGraph(0.5, vecRay(1.5, 1.4, 1.2)); sph1->natrualColor = RGB(1, 0.1, 0.1); sph1->reflective = true; sph1->I_refl = ir; sph1->k_spec = kr; sph1->I_refr = 2; sph1->transparency = transparent; objectScene.ObjectAdd(sph1); sphereGraph* sph2 = new sphereGraph(0.5, vecRay(1.5, -1.4, 1.2)); sph2->natrualColor = RGB(0.1, 1,0.1); sph2->reflective = true; sph2->I_refl = ir; sph1->I_refr = 2; sph2->k_spec = kr; sph2->transparency = transparent; objectScene.ObjectAdd(sph2); RGB gray(0.2,0.2,0.2), red(1, 0, 0); RGB green(0.3, 0.3, 0.3), blue(0.3, 0.0, 0.5); plane(objectScene, vecRay(3, 0, -0.5), vecRay(0, 1, 0), gray * 0.4); plane1(objectScene, vecRay(0, 0, +3.5), gray * 0.4, 'c'); plane1(objectScene, vecRay(0, 0, -0.5), gray * 0.4, 'f'); phongLight(objectScene, vecRay(-0.8, 0, 3), 1, 0.1); }
33.626866
101
0.634265
moelatt
e53ff1e5f9a3e954c7fbcef3156f38af3b6f12ce
7,249
cpp
C++
src/demos/boxesDemo.cpp
VladimirV99/GLSandbox
25987e630ace304ab756153cd31b5dcb2a7a67cf
[ "Unlicense" ]
null
null
null
src/demos/boxesDemo.cpp
VladimirV99/GLSandbox
25987e630ace304ab756153cd31b5dcb2a7a67cf
[ "Unlicense" ]
null
null
null
src/demos/boxesDemo.cpp
VladimirV99/GLSandbox
25987e630ace304ab756153cd31b5dcb2a7a67cf
[ "Unlicense" ]
null
null
null
#include "boxesDemo.hpp" BoxesDemo::BoxesDemo() : shader("../assets/boxes.vert.glsl", "../assets/boxes.frag.glsl") { } void BoxesDemo::Init(GLFWwindow* window) { // Load texture texture = loadTexture("../assets/wall.jpg"); // set up vertex data (and buffer(s)) and configure vertex attributes // ------------------------------------------------------------------ float vertices[] = { -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, -0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -0.5f, 0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, -0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, -0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, -0.5f, -0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f, -0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.5f, -0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.5f, -0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, -0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, -0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, -0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f }; glGenVertexArrays(1, &VAO); glGenBuffers(1, &VBO); glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); // position attribute glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 11 * sizeof(float), (void*)0); glEnableVertexAttribArray(0); // normal attribute glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 11 * sizeof(float), (void*)(3 * sizeof(float))); glEnableVertexAttribArray(1); // color attribute glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 11 * sizeof(float), (void*)(6 * sizeof(float))); glEnableVertexAttribArray(2); // texture coord attribute glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, 11 * sizeof(float), (void*)(9 * sizeof(float))); glEnableVertexAttribArray(3); shader.use(); shader.setVec3("lightColor", 1.0f, 1.0f, 1.0f); shader.setVec3("lightPos", lightPos); shader.setVec3("viewPos", camera.getPosition()); } void BoxesDemo::Draw(GLFWwindow* window) { // world space positions of our cubes glm::vec3 cubePositions[] = { glm::vec3( 0.0f, 0.0f, 0.0f), glm::vec3( 2.0f, 5.0f, -15.0f), glm::vec3(-1.5f, -2.2f, -2.5f), glm::vec3(-3.8f, -2.0f, -12.3f), glm::vec3( 2.4f, -0.4f, -3.5f), glm::vec3(-1.7f, 3.0f, -7.5f), glm::vec3( 1.3f, -2.0f, -2.5f), glm::vec3( 1.5f, 2.0f, -2.5f), glm::vec3( 1.5f, 0.2f, -1.5f), glm::vec3(-1.3f, 1.0f, -1.5f) }; shader.use(); shader.setVec3("viewPos", camera.getPosition()); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); shader.use(); // pass projection matrix to shader (note that in this case it could change every frame) glm::mat4 projection = glm::perspective(glm::radians(camera.getZoom()), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f); shader.setMat4("projection", projection); // camera/view transformation glm::mat4 view = camera.GetViewMatrix(); shader.setMat4("view", view); float angle = 3.1415f / 3; glm::mat4 model = glm::rotate(glm::mat4(1.0f), angle, glm::vec3(0.0f,0.0f,1.0f)); // GLuint location = glGetUniformLocation(programHandle, "model"); // if( location >= 0 ) { // glUniformMatrix4fv(location, 1, GL_FALSE, glm::value_ptr(model)); // } shader.setMat4("model", model); // render boxes glBindVertexArray(VAO); for (unsigned int i = 0; i < 10; i++) { // calculate the model matrix for each object and pass it to shader before drawing glm::mat4 model = glm::mat4(1.0f); // make sure to initialize matrix to identity matrix first model = glm::translate(model, cubePositions[i]); float angle = 20.0f * i; model = glm::rotate(model, glm::radians(angle), glm::vec3(1.0f, 0.3f, 0.5f)); shader.setMat4("model", model); glDrawArrays(GL_TRIANGLES, 0, 36); } } void BoxesDemo::Unload() { glDeleteTextures(1, &texture); glDeleteVertexArrays(1, &VAO); glDeleteBuffers(1, &VBO); } void BoxesDemo::ProcessKeyboard(GLFWwindow *window) { if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS) camera.ProcessKeyboard(FORWARD, deltaTime); if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS) camera.ProcessKeyboard(BACKWARD, deltaTime); if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS) camera.ProcessKeyboard(LEFT, deltaTime); if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS) camera.ProcessKeyboard(RIGHT, deltaTime); } void BoxesDemo::ProcessMouse(GLFWwindow* window, double xpos, double ypos, double xoffset, double yoffset) { camera.ProcessMouseMovement(xoffset, yoffset); } void BoxesDemo::ProcessScroll(GLFWwindow* window, double xoffset, double yoffset) { camera.ProcessMouseScroll(yoffset); } bool BoxesDemo::DrawMenu() { ImGui::BulletText("Press WASD to move"); ImGui::BulletText("Use the mouse to look around"); return true; }
41.422857
128
0.554559
VladimirV99
e5403244c786450d74a8caa9758b08d5e61823cb
4,239
hxx
C++
released_plugins/v3d_plugins/bigneuron_siqi_stalker_v3d/lib/ITK_include/itksys/stl/string.hxx
zzhmark/vaa3d_tools
3ca418add85a59ac7e805d55a600b78330d7e53d
[ "MIT" ]
1
2021-12-27T19:14:03.000Z
2021-12-27T19:14:03.000Z
released_plugins/v3d_plugins/bigneuron_siqi_stalker_v3d/lib/ITK_include/itksys/stl/string.hxx
zzhmark/vaa3d_tools
3ca418add85a59ac7e805d55a600b78330d7e53d
[ "MIT" ]
1
2016-12-03T05:33:13.000Z
2016-12-03T05:33:13.000Z
released_plugins/v3d_plugins/bigneuron_siqi_stalker_v3d/lib/ITK_include/itksys/stl/string.hxx
zzhmark/vaa3d_tools
3ca418add85a59ac7e805d55a600b78330d7e53d
[ "MIT" ]
null
null
null
/*============================================================================ KWSys - Kitware System Library Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ // This header is extra code for <itksys/stl/string>. #if !defined(itksys_stl_string_including_hxx) # error "The header <itksys/stl/string.hxx> may be included only by <itksys/stl/string>." #endif // Provide the istream operator for the stl string if it is not // provided by the system or another copy of kwsys. Allow user code // to block this definition by defining the macro // itksys_STL_STRING_NO_ISTREAM // to avoid conflicts with other libraries. User code can test for // this definition by checking the macro // itksys_STL_STRING_ISTREAM_DEFINED #if !itksys_STL_STRING_HAVE_ISTREAM && !defined(itksys_STL_STRING_NO_ISTREAM) && !defined(KWSYS_STL_STRING_ISTREAM_DEFINED) # define KWSYS_STL_STRING_ISTREAM_DEFINED # define itksys_STL_STRING_ISTREAM_DEFINED # include <ctype.h> // isspace # include <itksys/ios/iostream> # if defined(__WATCOMC__) namespace itksys { struct ios_istream_hack: public kwsys_ios::istream { void eatwhite() { this->itksys_ios::istream::eatwhite(); } }; } # endif inline itksys_ios::istream& operator>>(itksys_ios::istream& is, itksys_stl::string& s) { // Keep track of the resulting state. int state = itksys_ios::ios::goodbit; // Save the width setting and set it back to zero. size_t n = static_cast<size_t>(is.width(0)); // Clear any old contents of the output string. s.erase(); // Skip leading whitespace. #if defined(__WATCOMC__) static_cast<itksys::ios_istream_hack&>(is).eatwhite(); #else is.eatwhite(); #endif itksys_ios::istream& okay = is; if(okay) { // Select a maximum possible length. if(n == 0 || n >= s.max_size()) { n = s.max_size(); } // Read until a space is found or the maximum length is reached. bool success = false; for(int c = is.peek(); (--n > 0 && c != EOF && !isspace(c)); c = is.peek()) { s += static_cast<char>(c); success = true; is.ignore(); } // Set flags for resulting state. if(is.peek() == EOF) { state |= itksys_ios::ios::eofbit; } if(!success) { state |= itksys_ios::ios::failbit; } } // Set the final result state. is.clear(state); return is; } #endif // Provide the ostream operator for the stl string if it is not // provided by the system or another copy of kwsys. Allow user code // to block this definition by defining the macro // itksys_STL_STRING_NO_OSTREAM // to avoid conflicts with other libraries. User code can test for // this definition by checking the macro // itksys_STL_STRING_OSTREAM_DEFINED #if !itksys_STL_STRING_HAVE_OSTREAM && !defined(itksys_STL_STRING_NO_OSTREAM) && !defined(KWSYS_STL_STRING_OSTREAM_DEFINED) # define KWSYS_STL_STRING_OSTREAM_DEFINED # define itksys_STL_STRING_OSTREAM_DEFINED # include <itksys/ios/iostream> inline itksys_ios::ostream& operator<<(itksys_ios::ostream& os, itksys_stl::string const& s) { return os << s.c_str(); } #endif // Provide the operator!= for the stl string and char* if it is not // provided by the system or another copy of kwsys. Allow user code // to block this definition by defining the macro // itksys_STL_STRING_NO_NEQ_CHAR // to avoid conflicts with other libraries. User code can test for // this definition by checking the macro // itksys_STL_STRING_NEQ_CHAR_DEFINED #if !itksys_STL_STRING_HAVE_NEQ_CHAR && !defined(itksys_STL_STRING_NO_NEQ_CHAR) && !defined(KWSYS_STL_STRING_NEQ_CHAR_DEFINED) # define KWSYS_STL_STRING_NEQ_CHAR_DEFINED # define itksys_STL_STRING_NEQ_CHAR_DEFINED inline bool operator!=(itksys_stl::string const& s, const char* c) { return !(s == c); } inline bool operator!=(const char* c, itksys_stl::string const& s) { return !(s == c); } #endif
34.185484
126
0.702524
zzhmark
e542215953900b60bfb3b84aaf60daaa1586c807
8,209
cpp
C++
src/mongo/dbtests/query_stage_sort.cpp
fjonath1/mongodb-ros-osx
31a58cab426b68ce85ef231200ff45d4bd691d32
[ "Apache-2.0" ]
null
null
null
src/mongo/dbtests/query_stage_sort.cpp
fjonath1/mongodb-ros-osx
31a58cab426b68ce85ef231200ff45d4bd691d32
[ "Apache-2.0" ]
null
null
null
src/mongo/dbtests/query_stage_sort.cpp
fjonath1/mongodb-ros-osx
31a58cab426b68ce85ef231200ff45d4bd691d32
[ "Apache-2.0" ]
null
null
null
/** * Copyright (C) 2013 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * 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 * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "mongo/client/dbclientcursor.h" #include "mongo/db/exec/fetch.h" #include "mongo/db/exec/mock_stage.h" #include "mongo/db/exec/plan_stage.h" #include "mongo/db/exec/sort.h" #include "mongo/db/index/catalog_hack.h" #include "mongo/db/instance.h" #include "mongo/db/json.h" #include "mongo/db/query/plan_executor.h" #include "mongo/dbtests/dbtests.h" /** * This file tests db/exec/sort.cpp */ namespace QueryStageSortTests { class QueryStageSortTestBase { public: QueryStageSortTestBase() { } void fillData() { for (int i = 0; i < numObj(); ++i) { insert(BSON("foo" << i)); } } virtual ~QueryStageSortTestBase() { _client.dropCollection(ns()); } void insert(const BSONObj& obj) { _client.insert(ns(), obj); } void getLocs(set<DiskLoc>* locs) { for (boost::shared_ptr<Cursor> c = theDataFileMgr.findAll(ns()); c->ok(); c->advance()) { locs->insert(c->currLoc()); } } /** * We feed a mix of (key, unowned, owned) data to the sort stage. */ void insertVarietyOfObjects(MockStage* ms) { set<DiskLoc> locs; getLocs(&locs); set<DiskLoc>::iterator it = locs.begin(); for (int i = 0; i < numObj(); ++i, ++it) { // Insert some owned obj data. WorkingSetMember member; member.state = WorkingSetMember::OWNED_OBJ; member.obj = it->obj().getOwned(); ASSERT(member.obj.isOwned()); ms->pushBack(member); } } // Return a value in the set {-1, 0, 1} to represent the sign of parameter i. Used to // normalize woCompare calls. int sgn(int i) { if (i == 0) return 0; return i > 0 ? 1 : -1; } /** * A template used by many tests below. * Fill out numObj objects, sort them in the order provided by 'direction'. * If extAllowed is true, sorting will use use external sorting if available. * If limit is not zero, we limit the output of the sort stage to 'limit' results. */ void sortAndCheck(int direction) { WorkingSet* ws = new WorkingSet(); MockStage* ms = new MockStage(ws); // Insert a mix of the various types of data. insertVarietyOfObjects(ms); SortStageParams params; params.pattern = BSON("foo" << direction); // Must fetch so we can look at the doc as a BSONObj. PlanExecutor runner(ws, new FetchStage(ws, new SortStage(params, ws, ms), NULL)); // Look at pairs of objects to make sure that the sort order is pairwise (and therefore // totally) correct. BSONObj last; ASSERT_EQUALS(Runner::RUNNER_ADVANCED, runner.getNext(&last, NULL)); // Count 'last'. int count = 1; BSONObj current; while (Runner::RUNNER_ADVANCED == runner.getNext(&current, NULL)) { int cmp = sgn(current.woSortOrder(last, params.pattern)); // The next object should be equal to the previous or oriented according to the sort // pattern. ASSERT(cmp == 0 || cmp == 1); ++count; last = current; } // No limit, should get all objects back. ASSERT_EQUALS(numObj(), count); } virtual int numObj() = 0; static const char* ns() { return "unittests.QueryStageSort"; } private: static DBDirectClient _client; }; DBDirectClient QueryStageSortTestBase::_client; // Sort some small # of results in increasing order. class QueryStageSortInc: public QueryStageSortTestBase { public: virtual int numObj() { return 100; } void run() { Client::WriteContext ctx(ns()); fillData(); sortAndCheck(1); } }; // Sort some small # of results in decreasing order. class QueryStageSortDec : public QueryStageSortTestBase { public: virtual int numObj() { return 100; } void run() { Client::WriteContext ctx(ns()); fillData(); sortAndCheck(-1); } }; // Sort a big bunch of objects. class QueryStageSortExt : public QueryStageSortTestBase { public: virtual int numObj() { return 10000; } void run() { Client::WriteContext ctx(ns()); fillData(); sortAndCheck(-1); } }; // Invalidation of everything fed to sort. class QueryStageSortInvalidation : public QueryStageSortTestBase { public: virtual int numObj() { return 2000; } void run() { Client::WriteContext ctx(ns()); fillData(); // The data we're going to later invalidate. set<DiskLoc> locs; getLocs(&locs); // Build the mock stage which feeds the data. WorkingSet ws; auto_ptr<MockStage> ms(new MockStage(&ws)); insertVarietyOfObjects(ms.get()); SortStageParams params; params.pattern = BSON("foo" << 1); auto_ptr<SortStage> ss(new SortStage(params, &ws, ms.get())); const int firstRead = 10; // Have sort read in data from the mock stage. for (int i = 0; i < firstRead; ++i) { WorkingSetID id; PlanStage::StageState status = ss->work(&id); ASSERT_NOT_EQUALS(PlanStage::ADVANCED, status); } // We should have read in the first 'firstRead' locs. Invalidate the first. ss->prepareToYield(); set<DiskLoc>::iterator it = locs.begin(); ss->invalidate(*it++); ss->recoverFromYield(); // Read the rest of the data from the mock stage. while (!ms->isEOF()) { WorkingSetID id; ss->work(&id); } // Release to prevent double-deletion. ms.release(); // Let's just invalidate everything now. ss->prepareToYield(); while (it != locs.end()) { ss->invalidate(*it++); } ss->recoverFromYield(); // The sort should still work. int count = 0; while (!ss->isEOF()) { WorkingSetID id; PlanStage::StageState status = ss->work(&id); if (PlanStage::ADVANCED != status) { continue; } WorkingSetMember* member = ws.get(id); ASSERT(member->hasObj()); ASSERT(!member->hasLoc()); ++count; } // We've invalidated everything, but only 2/3 of our data had a DiskLoc to be // invalidated. We get the rest as-is. ASSERT_EQUALS(count, numObj()); } }; class All : public Suite { public: All() : Suite( "query_stage_sort_test" ) { } void setupTests() { add<QueryStageSortInc>(); add<QueryStageSortDec>(); add<QueryStageSortExt>(); add<QueryStageSortInvalidation>(); } } queryStageSortTest; } // namespace
31.817829
100
0.543306
fjonath1
e542fdca460da55e087bd8129a92519659d89932
4,145
cpp
C++
BioNetGen-2.3.0/source_NFsim/validate/BioNetGen-2.2.6-stable/Network3/src/model/reactions/bioNetGenRxn.cpp
joseph-hellerstein/RuleBasedProgramming
fb88118ab764035979dc7c2bf8c89a7b484e4472
[ "MIT" ]
53
2015-03-15T20:33:36.000Z
2022-02-25T12:07:26.000Z
BioNetGen-2.3.0/source_NFsim/validate/BioNetGen-2.2.6-stable/Network3/src/model/reactions/bioNetGenRxn.cpp
joseph-hellerstein/RuleBasedProgramming
fb88118ab764035979dc7c2bf8c89a7b484e4472
[ "MIT" ]
85
2015-03-19T19:58:19.000Z
2022-02-28T20:38:17.000Z
BioNetGen-2.3.0/source_NFsim/validate/BioNetGen-2.2.6-stable/Network3/src/model/reactions/bioNetGenRxn.cpp
joseph-hellerstein/RuleBasedProgramming
fb88118ab764035979dc7c2bf8c89a7b484e4472
[ "MIT" ]
34
2015-05-02T23:46:57.000Z
2021-12-22T19:35:58.000Z
/* * bioNetGenRxn.cpp * * Created on: Jul 11, 2011 * Author: Leonard Harris */ #include "bioNetGenRxn.hh" /* BioNetGenRxn::BioNetGenRxn(){ if (MoMMA::debug) cout << "BioNetGenRxn constructor called." << endl; } */ BioNetGenRxn::BioNetGenRxn(vector<SimpleSpecies*> r, vector<int> rS, vector<SimpleSpecies*> p, vector<int> pS){ if (debug) cout << "BioNetGenRxn constructor called." << endl; // Error check if (r.size() != rS.size()){ cout << "Error in BioNetGenRxn constructor: 'r' and 'rS' vectors must be equal size. Exiting." << endl; exit(1); } if (p.size() != pS.size()){ cout << "Error in BioNetGenRxn constructor: 'p' and 'pS' vectors must be equal size. Exiting." << endl; exit(1); } for (unsigned int i=0;i < rS.size();i++){ if (rS[i] >= 0){ cout << "Error in BioNetGenRxn constructor: Reactant " << r[i]->name << " has non-negative stoichiometry = " << rS[i] << ". Exiting." << endl; exit(1); } } for (unsigned int i=0;i < pS.size();i++){ if (pS[i] <= 0){ cout << "Error in BioNetGenRxn constructor: Product " << p[i]->name << " has non-positive stoichiometry = " << pS[i] << ". Exiting." << endl; exit(1); } } // Remove redundancies from reactants vector<pair<SimpleSpecies*,int> > reactants; vector<bool> skip; skip.resize(r.size(),false); for (unsigned int i=0;i < r.size();i++){ if (!skip[i]){ for (unsigned int j=i+1;j < r.size();j++){ if (r[i] == r[j]){ rS[i] += rS[j]; skip[j] = true; } } } } for (unsigned int i=0;i < r.size();i++){ if (!skip[i]){ reactants.push_back( pair<SimpleSpecies*,int>(r[i],rS[i]) ); } } /* cout << "-----Reactants-----" << endl; for (unsigned int i=0;i != this->reactants.size();i++){ cout << this->reactants[i].first->name << ": " << this->reactants[i].second << endl; } //*/ // Remove redundancies from products vector<pair<SimpleSpecies*,int> > products; skip.clear(); skip.resize(p.size(),false); for (unsigned int i=0;i < p.size();i++){ if (!skip[i]){ for (unsigned int j=i+1;j < p.size();j++){ if (p[i] == p[j]){ pS[i] += pS[j]; skip[j] = true; } } } } for (unsigned int i=0;i < p.size();i++){ if (!skip[i]){ products.push_back( pair<SimpleSpecies*,int>(p[i],pS[i]) ); } } /* cout << "-----Products-----" << endl; for (unsigned int i = 0;i != this->products.size();i++){ cout << this->products[i].first->name << ": " << this->products[i].second << endl; } //*/ // Set rateSpecies = reactant species and store reactant stoichiometries for (unsigned int i=0;i != reactants.size();i++){ this->rateSpecies.push_back(reactants[i].first); this->rStoich.push_back(reactants[i].second); } // /* cout << "\t" << "------RateSpecies------" << endl; for (unsigned int i=0;i < this->rateSpecies.size();i++){ cout << "\t" << this->rateSpecies[i]->name << ": " << this->rStoich[i] << endl; } // */ // Identify stoichSpecies vector<pair<SimpleSpecies*,int> > stoichTemp; skip.clear(); skip.resize((reactants.size()+products.size()),false); for (unsigned int i=0;i != reactants.size();i++){ stoichTemp.push_back(reactants[i]); } for (unsigned int i=0;i != products.size();i++){ stoichTemp.push_back(products[i]); } for (unsigned int i=0;i < stoichTemp.size();i++){ // cout << stoichTemp[i].first->name << ": " << stoichTemp[i].second << endl; if (!skip[i]){ for (unsigned int j=i+1;j < stoichTemp.size();j++){ if (stoichTemp[i].first == stoichTemp[j].first){ stoichTemp[i].second += stoichTemp[j].second; skip[j] = true; } } } } for (unsigned int i=0;i < stoichTemp.size();i++){ if (stoichTemp[i].second != 0 && !skip[i]){ this->stoichSpecies.insert( stoichTemp[i] ); } } // /* cout << "\t" << "-----StoichSpecies-----" << endl; map<SimpleSpecies*,int>::iterator iter; for (iter = this->stoichSpecies.begin();iter != this->stoichSpecies.end();iter++){ cout << "\t" << (*iter).first->name << ": " << (*iter).second << endl; } cout << "\t" << "-----------------------" << endl; //*/ } BioNetGenRxn::~BioNetGenRxn(){ if (debug) cout << "BioNetGenRxn destructor called." << endl; }
29.820144
120
0.578046
joseph-hellerstein
e5448c5f8e635a35aa5e27820e321d3e5ce484e0
1,844
cc
C++
Archive/Stroika_FINAL_for_STERL_1992/Tools/Portable/Endian.cc
SophistSolutions/Stroika
f4e5d84767903a054fba0a6b9c7c4bd1aaefd105
[ "MIT" ]
28
2015-09-22T21:43:32.000Z
2022-02-28T01:35:01.000Z
Archive/Stroika_FINAL_for_STERL_1992/Tools/Portable/Endian.cc
SophistSolutions/Stroika
f4e5d84767903a054fba0a6b9c7c4bd1aaefd105
[ "MIT" ]
98
2015-01-22T03:21:27.000Z
2022-03-02T01:47:00.000Z
Archive/Stroika_FINAL_for_STERL_1992/Tools/Portable/Endian.cc
SophistSolutions/Stroika
f4e5d84767903a054fba0a6b9c7c4bd1aaefd105
[ "MIT" ]
4
2019-02-21T16:45:25.000Z
2022-02-18T13:40:04.000Z
/* Copyright(c) Sophist Solutions Inc. 1990-1992. All rights reserved */ /* * $Header: /fuji/lewis/RCS/Endian.cc,v 1.1 1992/06/20 17:40:19 lewis Exp $ * * TODO: * * Changes: * $Log: Endian.cc,v $ * Revision 1.1 1992/06/20 17:40:19 lewis * Initial revision * Revision 1.2 1992/04/29 23:45:43 lewis *** empty log message *** * * */ #if qIncludeRCSIDs static const char rcsid[] = "$Header: /fuji/lewis/RCS/Endian.cc,v 1.1 1992/06/20 17:40:19 lewis Exp $"; #endif #include <iostream.h> #include <stdlib.h> static int BitOrder_LittleEndianP (); static int ByteOrder_LittleEndianP (); int main (int argc, char* argv[]) { cout << "Testing to see if we are big or little endian\n"; cout << "Bit order is: " << (BitOrder_LittleEndianP ()? "Little": "Big") << " Endian\n"; cout << "Byte order is: " << (ByteOrder_LittleEndianP ()? "Little": "Big") << " Endian\n"; return (0); } static int BitOrder_LittleEndianP () { // if we are little endian, then 1 becomes two when shifted left, and if we are // big endian, then it should get shifted off into lala land, and become zero unsigned w = 1; unsigned x = w << 1; if (x == 0) { return (0); // false } else if (x == 2) { return (1); // true } else { cerr << "Well maybe I still dont understand this stuff\n"; exit (1); } } static int ByteOrder_LittleEndianP () { unsigned long value = 0x44332211; // hope long >= 4 bytes!!! char* vp = (char*)&value; if ((vp[0] == 0x11) && (vp[1] == 0x22) && (vp[2] == 0x33) && (vp[3] == 0x44)) { return (0); // false } else if ((vp[3] == 0x11) && (vp[2] == 0x22) && (vp[1] == 0x33) && (vp[0] == 0x44)) { return (1); // true } else { cerr << "Well maybe I still dont understand this stuff\n"; exit (1); } } // For gnuemacs: // Local Variables: *** // mode:C++ *** // tab-width:4 *** // End: ***
21.44186
103
0.598156
SophistSolutions
e544bcda50fe45d12e0c740fa0515ee9c7336cc8
18,381
cpp
C++
src/comm/NCCLWrapper.cpp
nict-wisdom/rannc
a1708807e053e2d58b7f6d6ed925f03aa8504416
[ "MIT" ]
45
2021-04-02T15:22:29.000Z
2022-03-30T19:13:14.000Z
src/comm/NCCLWrapper.cpp
nict-wisdom/rannc
a1708807e053e2d58b7f6d6ed925f03aa8504416
[ "MIT" ]
6
2021-06-23T12:32:34.000Z
2022-01-27T11:44:24.000Z
src/comm/NCCLWrapper.cpp
nict-wisdom/rannc
a1708807e053e2d58b7f6d6ed925f03aa8504416
[ "MIT" ]
6
2021-06-14T12:59:10.000Z
2022-03-30T19:01:36.000Z
// // Created by Masahiro Tanaka on 2019-07-22. // #include <nccl.h> #include "NCCLWrapper.h" #include "ObjectComm.h" #include <comm/SComm.h> #include <comp/EventRecorder.h> #include <cuda/CudaUtil.h> namespace rannc { int DEFAULT_TAG = 100; constexpr size_t NCCL_MAX_COLL_OP_NUM = 2048; void NCCLBulkJobExecutor::flush() { NCCLWrapper& nccl = NCCLWrapper::get(); nccl.syncWithErrorCheck(); for (const auto& f : pre_comm_jobs_) { f(); } nccl.syncWithErrorCheck(); for (const auto& f : comm_jobs_) { ncclGroupStart(); f(); ncclGroupEnd(); } nccl.syncWithErrorCheck(); for (const auto& f : post_comm_jobs_) { f(); } nccl.syncWithErrorCheck(); pre_comm_jobs_.clear(); comm_jobs_.clear(); post_comm_jobs_.clear(); } void NCCLBulkJobExecutor::doAddJob( std::function<void(void)> f, std::vector<std::function<void(void)>>& jobs) { if (run_immediate_) { f(); } else { jobs.push_back(f); } } void NCCLBulkJobExecutor::addPreCommJob(std::function<void(void)> f) { if (run_immediate_) { ncclGroupStart(); } doAddJob(f, pre_comm_jobs_); if (run_immediate_) { ncclGroupEnd(); NCCLWrapper& nccl = NCCLWrapper::get(); nccl.syncWithErrorCheck(); } } void NCCLBulkJobExecutor::addCommJob(std::function<void(void)> f) { if (run_immediate_) { ncclGroupStart(); } doAddJob(f, comm_jobs_); if (run_immediate_) { ncclGroupEnd(); NCCLWrapper& nccl = NCCLWrapper::get(); nccl.syncWithErrorCheck(); } } void NCCLBulkJobExecutor::addPostCommJob(std::function<void(void)> f) { if (run_immediate_) { ncclGroupStart(); } doAddJob(f, post_comm_jobs_); if (run_immediate_) { ncclGroupEnd(); NCCLWrapper& nccl = NCCLWrapper::get(); nccl.syncWithErrorCheck(); } } struct AllReduceComm { ncclComm_t* comm; }; void NCCLWrapper::createCommunicator( int tag, const std::unordered_set<int>& ranks) { if (contains(comm_map_, tag)) { return; } std::vector<int> rank_vec = setToVector(ranks); std::sort(rank_vec.begin(), rank_vec.end()); logger->trace( "Creating nccl comm. tag={} ranks={}", tag, join_as_str(rank_vec)); int local_root = rank_vec.front(); ncclUniqueId id; if (mpi::getRank() == local_root) { ncclGetUniqueId(&id); for (int r : rank_vec) { if (r != local_root) { MPI_Send( (void*)&id, sizeof(id), MPI_BYTE, r, DEFAULT_TAG, MPI_COMM_WORLD); } } } else { MPI_Status st; MPI_Recv( (void*)&id, sizeof(id), MPI_BYTE, local_root, DEFAULT_TAG, MPI_COMM_WORLD, &st); } int local_rank = getLocalRank(vectorToSet(rank_vec), mpi::getRank()); ncclComm_t* ncomm = new ncclComm_t; ncclCommInitRank(ncomm, rank_vec.size(), id, local_rank); auto* comm_info = new AllReduceComm; comm_info->comm = ncomm; comm_map_[tag] = comm_info; ranks_to_tag_[ranks] = tag; logger->trace("Finished creating nccl comm. tag={}", tag); } void NCCLWrapper::destroy() { destroyAllCommunicators(); comm_map_.clear(); ranks_to_tag_.clear(); buf_cache_.clear(); } ncclDataType_t getReduceNcclDataType(const at::Tensor& t) { ncclDataType_t datatype; switch (t.scalar_type()) { case at::ScalarType::Half: datatype = ncclFloat16; break; case at::ScalarType::Float: datatype = ncclFloat32; break; case at::ScalarType::Double: datatype = ncclFloat64; break; case at::ScalarType::Int: datatype = ncclInt32; break; case at::ScalarType::Long: datatype = ncclInt64; break; #if defined(__NCCL_SUPPORTS_BFLOAT16__) case at::ScalarType::BFloat16: datatype = ncclBfloat16; break; #else case at::ScalarType::BFloat16: datatype = ncclFloat32; break; #endif default: std::stringstream ss; ss << "Unsupported type given to NCCL: " << toString(t.scalar_type()); throw std::invalid_argument(ss.str()); } return datatype; } ncclDataType_t getRedistNcclDataType(const IRTensorElemType t) { ncclDataType_t datatype; switch (t) { case IRTensorElemType::HALF: datatype = ncclFloat16; break; case IRTensorElemType::FLOAT: datatype = ncclFloat32; break; case IRTensorElemType::DOUBLE: datatype = ncclFloat64; break; case IRTensorElemType::INT: datatype = ncclInt32; break; case IRTensorElemType::LONG: datatype = ncclInt64; break; #if defined(__NCCL_SUPPORTS_BFLOAT16__) case IRTensorElemType::BFLOAT16: datatype = ncclBfloat16; break; #else case IRTensorElemType::BFLOAT16: datatype = ncclFloat16; break; #endif default: std::stringstream ss; ss << "Unsupported type given to NCCL: " << toString(t); throw std::invalid_argument(ss.str()); } return datatype; } void runCollectiveCommBuf( std::unordered_map<int, AllReduceComm*>& comm_map, int tag, const std::vector<at::Tensor>& send_tensors, const std::vector<at::Tensor>& recv_tensors, const std::vector<int>& roots, const std::string& op_name, const std::function<ncclResult_t( void*, void*, size_t, int, ncclDataType_t, ncclComm_t*)>& f) { assert(send_tensors.size() == recv_tensors.size() || recv_tensors.empty()); assert(send_tensors.size() == roots.size() || roots.empty()); assert(contains(comm_map, tag)); AllReduceComm* comm_info = comm_map.at(tag); ncclComm_t* ncomm = comm_info->comm; // NCCL's limitation assert(send_tensors.size() <= NCCL_MAX_COLL_OP_NUM); std::stringstream ss; size_t elem_sum = 0; for (const auto& grad : send_tensors) { elem_sum += getTensorElemCount(grad); } ss << "nccl_" << op_name << "_tag_" << tag << "_elem_" << elem_sum; recordStart(ss.str()); #if not defined(__NCCL_SUPPORTS_BFLOAT16__) for (size_t i = 0; i < send_tensors.size(); i++) { const auto& ten = send_tensors.at(i); if (ten.scalar_type() == c10::ScalarType::BFloat16) { throw std::runtime_error("Parameters in bfloat16 are not supported."); } } #endif ncclGroupStart(); for (size_t index = 0; index < send_tensors.size(); index++) { const auto& send_ten = send_tensors.at(index); assert(send_ten.is_contiguous()); void* sendptr = send_ten.data_ptr(); void* recvptr = recv_tensors.empty() ? sendptr : recv_tensors.at(index).data_ptr(); ncclDataType_t datatype = getReduceNcclDataType(send_ten); int root = index < roots.size() ? roots.at(index) : -1; f(sendptr, recvptr, getTensorElemCount(send_ten), root, datatype, ncomm); } ncclGroupEnd(); recordEnd(ss.str()); } void runCollectiveComm( std::unordered_map<int, AllReduceComm*>& comm_map, int tag, const std::vector<at::Tensor>& send_tensors, const std::vector<at::Tensor>& recv_tensors, const std::vector<int>& roots, const std::string& op_name, const std::function<ncclResult_t( void*, void*, size_t, int, ncclDataType_t, ncclComm_t*)>& f) { assert(send_tensors.size() == recv_tensors.size() || recv_tensors.empty()); assert(send_tensors.size() == roots.size() || roots.empty()); std::vector<at::Tensor> send_tensors_buf; std::vector<at::Tensor> recv_tensors_buf; std::vector<int> roots_buf; send_tensors_buf.reserve(NCCL_MAX_COLL_OP_NUM); recv_tensors_buf.reserve(NCCL_MAX_COLL_OP_NUM); roots_buf.reserve(NCCL_MAX_COLL_OP_NUM); for (size_t i = 0; i < send_tensors.size(); i++) { send_tensors_buf.push_back(send_tensors.at(i)); if (!recv_tensors.empty()) { recv_tensors_buf.push_back(recv_tensors.at(i)); } if (!roots.empty()) { roots_buf.push_back(roots.at(i)); } if (send_tensors_buf.size() == NCCL_MAX_COLL_OP_NUM) { runCollectiveCommBuf( comm_map, tag, send_tensors_buf, recv_tensors_buf, roots_buf, op_name, f); send_tensors_buf.clear(); recv_tensors_buf.clear(); roots_buf.clear(); } } runCollectiveCommBuf( comm_map, tag, send_tensors_buf, recv_tensors_buf, roots_buf, op_name, f); } void NCCLWrapper::doAllreduce( int tag, const std::vector<at::Tensor>& tensors, ncclRedOp_t red_op) { runCollectiveComm( comm_map_, tag, tensors, {}, {}, "allreduce", [red_op]( void* sendptr, void* recvptr, size_t count, int root, ncclDataType_t datatype, ncclComm_t* ncomm) { // in-place only return ncclAllReduce( sendptr, sendptr, count, datatype, red_op, *ncomm, (cudaStream_t) nullptr); }); } void NCCLWrapper::allreduce(int tag, const std::vector<at::Tensor>& tensors) { doAllreduce(tag, tensors, ncclSum); } void NCCLWrapper::allreduceMin( int tag, const std::vector<at::Tensor>& tensors) { doAllreduce(tag, tensors, ncclMin); } void NCCLWrapper::reduce( int tag, const std::vector<at::Tensor>& tensors, const std::vector<int>& roots) { assert(tensors.size() == roots.size()); runCollectiveComm( comm_map_, tag, tensors, {}, roots, "reduce", [](void* sendptr, void* recvptr, size_t count, int root, ncclDataType_t datatype, ncclComm_t* ncomm) { // in-place only return ncclReduce( sendptr, sendptr, count, datatype, ncclSum, root, *ncomm, (cudaStream_t) nullptr); }); } void NCCLWrapper::bcast( int tag, const std::vector<at::Tensor>& tensors, const std::vector<int>& roots) { runCollectiveComm( comm_map_, tag, tensors, {}, roots, "bcast", [](void* sendptr, void* recvptr, size_t count, int root, ncclDataType_t datatype, ncclComm_t* ncomm) { // in-place only return ncclBcast( sendptr, count, datatype, root, *ncomm, (cudaStream_t) nullptr); }); } void NCCLWrapper::allgather( int tag, const std::vector<at::Tensor>& tensors, const std::vector<at::Tensor>& out_bufs) { return runCollectiveComm( comm_map_, tag, tensors, out_bufs, {}, "allgather", [](void* sendptr, void* recvptr, size_t count, int root, ncclDataType_t datatype, ncclComm_t* ncomm) { return ncclAllGather( sendptr, recvptr, count, datatype, *ncomm, (cudaStream_t) nullptr); }); } std::string getBoolBufKey(const RouteDP& route, const std::string& action) { std::stringstream ss; ss << toString(route) << "_" << action; return ss.str(); } void NCCLWrapper::redist( void* send_ptr, void* recv_ptr, const RouteDP& route, const IRType& global_type, const RedistArgs& redist_args) { if (!contains(getRanksInRoute(route), mpi::getRank())) { return; } const auto& global_dim = global_type.getTensorDim(); assert(global_type.getBaseType() == IRBaseType::TENSOR); // Special case for bool bool convert_bool = global_type.getTensorElemType() == IRTensorElemType::BOOL; const auto& elem_type = convert_bool ? IRTensorElemType::INT : global_type.getTensorElemType(); void* tmp_send_ptr = send_ptr; void* tmp_recv_ptr = recv_ptr; long send_count_sum = sum(redist_args.sendcounts); long recv_count_sum = sum(redist_args.recvcounts); if (convert_bool) { if (send_ptr != nullptr) { at::TensorOptions options; options = options.device(torch::Device(torch::kCUDA)) .dtype(c10::ScalarType::Bool); auto send_ten = torch::from_blob(send_ptr, {send_count_sum}, options); auto send_buf_ten = buf_cache_.get( getBoolBufKey(route, "send"), IRType::createTensorType(elem_type, {send_count_sum}, false)); send_buf_ten.zero_(); send_buf_ten.masked_fill_(send_ten, 1); tmp_send_ptr = send_buf_ten.data_ptr(); } if (recv_ptr != nullptr) { auto recv_buf_ten = buf_cache_.get( getBoolBufKey(route, "recv"), IRType::createTensorType(elem_type, {recv_count_sum}, false)); tmp_recv_ptr = recv_buf_ten.data_ptr(); } } TagMap& tag_map = TagMap::get(); const auto comm_ranks = getRanksInRoute(route); int tag = tag_map.getRankSetTag(comm_ranks); int my_local_rank = getLocalRank(comm_ranks, mpi::getRank()); size_t n_ranks = comm_ranks.size(); assert(contains(comm_map_, tag)); AllReduceComm* comm_info = comm_map_.at(tag); ncclComm_t* ncomm = comm_info->comm; ncclDataType_t datatype = getRedistNcclDataType(elem_type); const auto elem_size = getTensorElemSize(elem_type); job_executor_.addCommJob([n_ranks, redist_args, my_local_rank, tmp_send_ptr, tmp_recv_ptr, datatype, elem_size, ncomm, send_count_sum]() { auto stream = getStream(); for (size_t i = 0; i < n_ranks; i++) { int sc = redist_args.sendcounts[i]; int rc = redist_args.recvcounts[i]; if (i < my_local_rank) { // send first if (sc > 0) { ncclSend( (char*)tmp_send_ptr + redist_args.sdispls[i] * elem_size, sc, datatype, i, *ncomm, (cudaStream_t)stream); } if (rc > 0) { ncclRecv( (char*)tmp_recv_ptr + redist_args.rdispls[i] * elem_size, rc, datatype, i, *ncomm, (cudaStream_t)stream); } } else if (i > my_local_rank) { if (rc > 0) { ncclRecv( (char*)tmp_recv_ptr + redist_args.rdispls[i] * elem_size, rc, datatype, i, *ncomm, (cudaStream_t)stream); } if (sc > 0) { ncclSend( (char*)tmp_send_ptr + redist_args.sdispls[i] * elem_size, sc, datatype, i, *ncomm, (cudaStream_t)stream); } } } }); int sc_local = redist_args.sendcounts[my_local_rank]; if (sc_local > 0) { cudaMemcpyAsync( (char*)tmp_recv_ptr + redist_args.rdispls[my_local_rank] * elem_size, (char*)tmp_send_ptr + redist_args.sdispls[my_local_rank] * elem_size, sc_local * elem_size, cudaMemcpyDeviceToDevice, (cudaStream_t)getStream()); } if (convert_bool) { job_executor_.addPostCommJob([recv_ptr, tmp_recv_ptr, recv_count_sum]() { if (recv_ptr != nullptr) { at::TensorOptions buf_opts; buf_opts = buf_opts.device(torch::Device(torch::kCUDA)) .dtype(c10::ScalarType::Int); auto recv_buf_ten = torch::from_blob(tmp_recv_ptr, {recv_count_sum}, buf_opts); at::TensorOptions options; options = options.device(torch::Device(torch::kCUDA)) .dtype(c10::ScalarType::Bool); auto recv_ten = torch::from_blob(recv_ptr, {recv_count_sum}, options); { at::NoGradGuard no_grad; recv_ten.copy_(recv_buf_ten.gt(0)); } } }); } } void NCCLWrapper::startBulk() { job_executor_.setRunImmediate(false); } void NCCLWrapper::endBulk() { job_executor_.flush(); job_executor_.setRunImmediate(true); } void NCCLWrapper::checkCommError(int tag) { if (!contains(comm_map_, tag)) { return; } AllReduceComm* comm_info = comm_map_.at(tag); ncclComm_t* ncomm = comm_info->comm; ncclResult_t ncclAsyncErr; ncclResult_t ncclErr = ncclCommGetAsyncError(*ncomm, &ncclAsyncErr); ncclErr = ncclCommGetAsyncError(*ncomm, &ncclAsyncErr); if (ncclErr != ncclSuccess) { spdlog::warn("NCCL Error : ncclCommGetAsyncError returned {}", ncclErr); throw CommErrorException("NCCL Error : ncclCommGetAsyncError", ncclErr); } if (ncclAsyncErr != ncclSuccess) { ncclErr = ncclCommAbort(*ncomm); if (ncclErr != ncclSuccess) { spdlog::warn("NCCL Error : ncclCommAbort returned {}", ncclErr); } throw CommErrorException("NCCL Error : ncclCommAbort", ncclErr); } } void NCCLWrapper::checkAllCommErrors() { for (const auto& it : comm_map_) { checkCommError(it.first); } } void NCCLWrapper::syncWithErrorCheck() { cudaError_t cudaErr; while (true) { cudaErr = cudaStreamQuery(nullptr); if (cudaErr == cudaSuccess) { return; } if (cudaErr != cudaErrorNotReady) { spdlog::info("CUDA Error : cudaStreamQuery returned {}", cudaErr); throw CommErrorException("CUDA Error : cudaStreamQuery", cudaErr); } checkAllCommErrors(); pthread_yield(); } } void NCCLWrapper::destroyCommunicator(int tag) { if (contains(comm_map_, tag)) { AllReduceComm* comm_info = comm_map_.at(tag); ncclCommDestroy(*comm_info->comm); delete comm_info->comm; delete comm_info; comm_map_.erase(tag); } } void NCCLWrapper::destroyAllCommunicators() { std::vector<int> tags; for (const auto& it : comm_map_) { tags.push_back(it.first); } for (const auto& tag : tags) { destroyCommunicator(tag); } } void NCCLWrapper::abortAllCommunicators() { for (const auto& it : comm_map_) { ncclResult_t ncclErr = ncclCommAbort(*it.second->comm); if (ncclErr != ncclSuccess) { spdlog::warn("NCCL Error : ncclCommAbort returned {}", ncclErr); } } } void NCCLWrapper::recreateCommunicator(int tag) { if (contains(comm_map_, tag)) { AllReduceComm* comm_info = comm_map_.at(tag); ncclResult_t ncclErr; ncclErr = ncclCommAbort(*comm_info->comm); if (ncclErr != ncclSuccess) { spdlog::warn("NCCL Error : ncclCommAbort returned {}", ncclErr); } destroyCommunicator(tag); std::unordered_map<int, std::unordered_set<int>> tag_to_ranks; for (const auto& it : ranks_to_tag_) { tag_to_ranks[it.second] = it.first; } assert(contains(tag_to_ranks, tag)); const auto& ranks = tag_to_ranks.at(tag); if (contains(ranks, mpi::getRank())) { createCommunicator(tag, ranks); } } } void NCCLWrapper::recreateAllCommunicators() { std::vector<int> sorted_tags; std::unordered_map<int, std::unordered_set<int>> tag_to_ranks; for (const auto& it : ranks_to_tag_) { sorted_tags.push_back(it.second); tag_to_ranks[it.second] = it.first; } std::sort(sorted_tags.begin(), sorted_tags.end()); for (int tag : sorted_tags) { recreateCommunicator(tag); } MPI_Barrier(MPI_COMM_WORLD); } void NCCLWrapper::commWithRetry(const std::function<void()>& f) { while (true) { try { f(); return; } catch (CommErrorException& e) { spdlog::warn("commWithRetry {}", e.what()); sleep(30); recreateAllCommunicators(); } } } std::string NCCLWrapper::getImplName() { return "NCCL"; } } // namespace rannc
28.765258
80
0.652794
nict-wisdom
e544d59cc2815d8d70bfeceab5c86040ed5265c8
16,539
cpp
C++
hi_modules/effects/editors/HarmonicFilterEditor.cpp
romsom/HISE
73e0e299493ce9236e6fafa7938d3477fcc36a4a
[ "Intel" ]
9
2020-04-16T01:17:27.000Z
2022-02-25T14:13:10.000Z
hi_modules/effects/editors/HarmonicFilterEditor.cpp
romsom/HISE
73e0e299493ce9236e6fafa7938d3477fcc36a4a
[ "Intel" ]
null
null
null
hi_modules/effects/editors/HarmonicFilterEditor.cpp
romsom/HISE
73e0e299493ce9236e6fafa7938d3477fcc36a4a
[ "Intel" ]
6
2020-05-11T22:23:15.000Z
2022-02-24T16:52:44.000Z
/* ============================================================================== This is an automatically generated GUI class created by the Introjucer! Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded and re-saved. Created with Introjucer version: 4.1.0 ------------------------------------------------------------------------------ The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions" Copyright (c) 2015 - ROLI Ltd. ============================================================================== */ //[Headers] You can add your own extra header files here... namespace hise { using namespace juce; //[/Headers] #include "HarmonicFilterEditor.h" //[MiscUserDefs] You can add your own user definitions and misc code here... //[/MiscUserDefs] //============================================================================== HarmonicFilterEditor::HarmonicFilterEditor (ProcessorEditor *p) : ProcessorEditorBody(p) { //[Constructor_pre] You can add your own custom stuff here.. //[/Constructor_pre] addAndMakeVisible (sliderPackA = new SliderPack (dynamic_cast<BaseHarmonicFilter*>(getProcessor())->getSliderPackData(0))); sliderPackA->setName ("new component"); addAndMakeVisible (sliderPackB = new SliderPack (dynamic_cast<BaseHarmonicFilter*>(getProcessor())->getSliderPackData(1))); sliderPackB->setName ("new component"); addAndMakeVisible (sliderPackMix = new SliderPack (dynamic_cast<BaseHarmonicFilter*>(getProcessor())->getSliderPackData(2))); sliderPackMix->setName ("new component"); addAndMakeVisible (label2 = new Label ("new label", TRANS("Spectrum A"))); label2->setFont (Font ("Arial", 11.50f, Font::plain)); label2->setJustificationType (Justification::centred); label2->setEditable (false, false, false); label2->setColour (Label::backgroundColourId, Colour (0x24000000)); label2->setColour (Label::textColourId, Colour (0x91ffffff)); label2->setColour (Label::outlineColourId, Colour (0x32ffffff)); label2->setColour (TextEditor::textColourId, Colours::black); label2->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (label3 = new Label ("new label", TRANS("Spectrum B"))); label3->setFont (Font ("Arial", 11.50f, Font::plain)); label3->setJustificationType (Justification::centred); label3->setEditable (false, false, false); label3->setColour (Label::backgroundColourId, Colour (0x24000000)); label3->setColour (Label::textColourId, Colour (0x91ffffff)); label3->setColour (Label::outlineColourId, Colour (0x32ffffff)); label3->setColour (TextEditor::textColourId, Colours::black); label3->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (label4 = new Label ("new label", TRANS("Harmonic Spectrum"))); label4->setFont (Font ("Arial", 11.50f, Font::bold)); label4->setJustificationType (Justification::centred); label4->setEditable (false, false, false); label4->setColour (Label::backgroundColourId, Colour (0x24000000)); label4->setColour (Label::textColourId, Colour (0xcbffffff)); label4->setColour (Label::outlineColourId, Colour (0x32ffffff)); label4->setColour (TextEditor::textColourId, Colours::black); label4->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (filterNumbers = new HiComboBox ("new combo box")); filterNumbers->setEditableText (false); filterNumbers->setJustificationType (Justification::centredLeft); filterNumbers->setTextWhenNothingSelected (TRANS("Filter Numbers")); filterNumbers->setTextWhenNoChoicesAvailable (TRANS("(no choices)")); filterNumbers->addItem (TRANS("1 Filter Band"), 1); filterNumbers->addItem (TRANS("2 Filter Bands"), 2); filterNumbers->addItem (TRANS("4 Filter Bands"), 3); filterNumbers->addItem (TRANS("8 Filter Bands"), 4); filterNumbers->addItem (TRANS("16 Filter Bands"), 5); filterNumbers->addListener (this); addAndMakeVisible (qSlider = new HiSlider ("Q")); qSlider->setRange (4, 48, 1); qSlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag); qSlider->setTextBoxStyle (Slider::TextBoxRight, false, 80, 20); qSlider->addListener (this); addAndMakeVisible (crossfadeSlider = new Slider ("new slider")); crossfadeSlider->setRange (-1, 1, 0.01); crossfadeSlider->setSliderStyle (Slider::LinearBar); crossfadeSlider->setTextBoxStyle (Slider::NoTextBox, true, 80, 20); crossfadeSlider->setColour (Slider::thumbColourId, Colours::white); crossfadeSlider->setColour (Slider::textBoxOutlineColourId, Colour (0x32ffffff)); crossfadeSlider->addListener (this); addAndMakeVisible (semiToneTranspose = new HiSlider ("Semitones")); semiToneTranspose->setRange (-24, 24, 1); semiToneTranspose->setSliderStyle (Slider::RotaryHorizontalVerticalDrag); semiToneTranspose->setTextBoxStyle (Slider::TextBoxRight, false, 80, 20); semiToneTranspose->addListener (this); addAndMakeVisible (label = new Label ("new label", TRANS("harmonic filter"))); label->setFont (Font ("Arial", 24.00f, Font::bold)); label->setJustificationType (Justification::centredRight); label->setEditable (false, false, false); label->setColour (Label::textColourId, Colour (0x52ffffff)); label->setColour (TextEditor::textColourId, Colours::black); label->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); //[UserPreSize] label->setFont(GLOBAL_BOLD_FONT().withHeight(28.0f)); label2->setFont(GLOBAL_BOLD_FONT()); label3->setFont(GLOBAL_BOLD_FONT()); label4->setFont(GLOBAL_BOLD_FONT()); filterNumbers->setup(getProcessor(), HarmonicFilter::NumFilterBands, "Filterband Amount"); qSlider->setup(getProcessor(), HarmonicFilter::QFactor, "Q Factor"); semiToneTranspose->setup(getProcessor(), HarmonicFilter::SemiToneTranspose, "Transpose"); semiToneTranspose->setTextValueSuffix(" st"); crossfadeSlider->setLookAndFeel(&laf); sliderPackMix->setEnabled(false); sliderPackMix->setColour(Slider::backgroundColourId, Colour(0xff3a3a3a)); sliderPackA->setColour(Slider::backgroundColourId, Colour(0xff4a4a4a)); sliderPackB->setColour(Slider::backgroundColourId, Colour(0xff4a4a4a)); startTimer(30); sliderPackA->setSuffix(" dB"); sliderPackB->setSuffix(" dB"); //[/UserPreSize] setSize (900, 240); //[Constructor] You can add your own custom stuff here.. h = getHeight(); //[/Constructor] } HarmonicFilterEditor::~HarmonicFilterEditor() { //[Destructor_pre]. You can add your own custom destruction code here.. //[/Destructor_pre] sliderPackA = nullptr; sliderPackB = nullptr; sliderPackMix = nullptr; label2 = nullptr; label3 = nullptr; label4 = nullptr; filterNumbers = nullptr; qSlider = nullptr; crossfadeSlider = nullptr; semiToneTranspose = nullptr; label = nullptr; //[Destructor]. You can add your own custom destruction code here.. //[/Destructor] } //============================================================================== void HarmonicFilterEditor::paint (Graphics& g) { //[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] g.setColour (Colour (0x30000000)); g.fillRoundedRectangle (static_cast<float> ((getWidth() / 2) - (700 / 2)), 6.0f, 700.0f, static_cast<float> (getHeight() - 12), 6.000f); g.setColour (Colour (0x25ffffff)); g.drawRoundedRectangle (static_cast<float> ((getWidth() / 2) - (700 / 2)), 6.0f, 700.0f, static_cast<float> (getHeight() - 12), 6.000f, 2.000f); //[UserPaint] Add your own custom painting code here.. //[/UserPaint] } void HarmonicFilterEditor::resized() { //[UserPreResize] Add your own custom resize code here.. //[/UserPreResize] sliderPackA->setBounds ((getWidth() / 2) + -142 - 192, 86, 192, 136); sliderPackB->setBounds ((getWidth() / 2) + 142, 86, 192, 136); sliderPackMix->setBounds ((getWidth() / 2) - (256 / 2), 86, 256, 104); label2->setBounds ((getWidth() / 2) + -142 - 192, 67, 192, 20); label3->setBounds ((getWidth() / 2) + 142, 67, 192, 20); label4->setBounds ((getWidth() / 2) - (256 / 2), 68, 256, 19); filterNumbers->setBounds ((getWidth() / 2) + -330, 23, 184, 28); qSlider->setBounds ((getWidth() / 2) + 3 - 128, 13, 128, 48); crossfadeSlider->setBounds ((getWidth() / 2) - (256 / 2), 199, 256, 23); semiToneTranspose->setBounds ((getWidth() / 2) + 153 - 128, 13, 128, 48); label->setBounds ((getWidth() / 2) + 339 - 264, 6, 264, 40); //[UserResized] Add your own custom resize handling here.. //[/UserResized] } void HarmonicFilterEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged) { //[UsercomboBoxChanged_Pre] //[/UsercomboBoxChanged_Pre] if (comboBoxThatHasChanged == filterNumbers) { //[UserComboBoxCode_filterNumbers] -- add your combo box handling code here.. //[/UserComboBoxCode_filterNumbers] } //[UsercomboBoxChanged_Post] //[/UsercomboBoxChanged_Post] } void HarmonicFilterEditor::sliderValueChanged (Slider* sliderThatWasMoved) { //[UsersliderValueChanged_Pre] //[/UsersliderValueChanged_Pre] if (sliderThatWasMoved == qSlider) { //[UserSliderCode_qSlider] -- add your slider handling code here.. //[/UserSliderCode_qSlider] } else if (sliderThatWasMoved == crossfadeSlider) { //[UserSliderCode_crossfadeSlider] -- add your slider handling code here.. const double normalizedValue = (crossfadeSlider->getValue() + 1.0) / 2.0; getProcessor()->setAttribute(HarmonicFilter::Crossfade, (float)normalizedValue, dontSendNotification); //[/UserSliderCode_crossfadeSlider] } else if (sliderThatWasMoved == semiToneTranspose) { //[UserSliderCode_semiToneTranspose] -- add your slider handling code here.. //[/UserSliderCode_semiToneTranspose] } //[UsersliderValueChanged_Post] //[/UsersliderValueChanged_Post] } //[MiscUserCode] You can add your own definitions of your custom methods or any other code here... void HarmonicFilterEditor::timerCallback() { const bool hasModulators = dynamic_cast<ModulatorChain*>(getProcessor()->getChildProcessor(0))->getHandler()->getNumProcessors() > 0; if (hasModulators) { crossfadeSlider->setEnabled(false); const double sliderValue = (float)getProcessor()->getAttribute(HarmonicFilter::Crossfade) * 2.0 - 1.0; crossfadeSlider->setValue(sliderValue, dontSendNotification); } else { crossfadeSlider->setEnabled(true); } } //[/MiscUserCode] //============================================================================== #if 0 /* -- Introjucer information section -- This is where the Introjucer stores the metadata that describe this GUI layout, so make changes in here at your peril! BEGIN_JUCER_METADATA <JUCER_COMPONENT documentType="Component" className="HarmonicFilterEditor" componentName="" parentClasses="public ProcessorEditorBody, public Timer" constructorParams="ProcessorEditor *p" variableInitialisers="ProcessorEditorBody(p)&#10;" snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330" fixedSize="1" initialWidth="900" initialHeight="240"> <BACKGROUND backgroundColour="ffffff"> <ROUNDRECT pos="0Cc 6 700 12M" cornerSize="6" fill="solid: 30000000" hasStroke="1" stroke="2, mitered, butt" strokeColour="solid: 25ffffff"/> </BACKGROUND> <GENERICCOMPONENT name="new component" id="d050db4d14cb45f1" memberName="sliderPackA" virtualName="" explicitFocusOrder="0" pos="-142Cr 86 192 136" class="SliderPack" params="dynamic_cast&lt;BaseHarmonicFilter*&gt;(getProcessor())-&gt;getSliderPackData(0)"/> <GENERICCOMPONENT name="new component" id="a24223cdd6589f94" memberName="sliderPackB" virtualName="" explicitFocusOrder="0" pos="142C 86 192 136" class="SliderPack" params="dynamic_cast&lt;BaseHarmonicFilter*&gt;(getProcessor())-&gt;getSliderPackData(1)"/> <GENERICCOMPONENT name="new component" id="9768772bb12c50e7" memberName="sliderPackMix" virtualName="" explicitFocusOrder="0" pos="0Cc 86 256 104" class="SliderPack" params="dynamic_cast&lt;BaseHarmonicFilter*&gt;(getProcessor())-&gt;getSliderPackData(2)"/> <LABEL name="new label" id="ac19153614231d20" memberName="label2" virtualName="" explicitFocusOrder="0" pos="-142Cr 67 192 20" bkgCol="24000000" textCol="91ffffff" outlineCol="32ffffff" edTextCol="ff000000" edBkgCol="0" labelText="Spectrum A" editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0" fontname="Arial" fontsize="11.5" bold="0" italic="0" justification="36"/> <LABEL name="new label" id="4b5d2e574f60cad8" memberName="label3" virtualName="" explicitFocusOrder="0" pos="142C 67 192 20" bkgCol="24000000" textCol="91ffffff" outlineCol="32ffffff" edTextCol="ff000000" edBkgCol="0" labelText="Spectrum B" editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0" fontname="Arial" fontsize="11.5" bold="0" italic="0" justification="36"/> <LABEL name="new label" id="c377089af1cf7875" memberName="label4" virtualName="" explicitFocusOrder="0" pos="0Cc 68 256 19" bkgCol="24000000" textCol="cbffffff" outlineCol="32ffffff" edTextCol="ff000000" edBkgCol="0" labelText="Harmonic Spectrum" editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0" fontname="Arial" fontsize="11.5" bold="1" italic="0" justification="36"/> <COMBOBOX name="new combo box" id="f9053c2b9246bbfc" memberName="filterNumbers" virtualName="HiComboBox" explicitFocusOrder="0" pos="-330C 23 184 28" posRelativeX="3b242d8d6cab6cc3" editable="0" layout="33" items="1 Filter Band&#10;2 Filter Bands&#10;4 Filter Bands&#10;8 Filter Bands&#10;16 Filter Bands" textWhenNonSelected="Filter Numbers" textWhenNoItems="(no choices)"/> <SLIDER name="Q" id="89cc5b4c20e221e" memberName="qSlider" virtualName="HiSlider" explicitFocusOrder="0" pos="3Cr 13 128 48" posRelativeX="f930000f86c6c8b6" min="4" max="48" int="1" style="RotaryHorizontalVerticalDrag" textBoxPos="TextBoxRight" textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> <SLIDER name="new slider" id="1684e9ecd984b307" memberName="crossfadeSlider" virtualName="" explicitFocusOrder="0" pos="0Cc 199 256 23" thumbcol="ffffffff" textboxoutline="32ffffff" min="-1" max="1" int="0.01" style="LinearBar" textBoxPos="NoTextBox" textBoxEditable="0" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> <SLIDER name="Semitones" id="f2c32a369cff4bfd" memberName="semiToneTranspose" virtualName="HiSlider" explicitFocusOrder="0" pos="153Cr 13 128 48" posRelativeX="f930000f86c6c8b6" min="-24" max="24" int="1" style="RotaryHorizontalVerticalDrag" textBoxPos="TextBoxRight" textBoxEditable="1" textBoxWidth="80" textBoxHeight="20" skewFactor="1"/> <LABEL name="new label" id="bd1d8d6ad6d04bdc" memberName="label" virtualName="" explicitFocusOrder="0" pos="339Cr 6 264 40" textCol="52ffffff" edTextCol="ff000000" edBkgCol="0" labelText="harmonic filter" editableSingleClick="0" editableDoubleClick="0" focusDiscardsChanges="0" fontname="Arial" fontsize="24" bold="1" italic="0" justification="34"/> </JUCER_COMPONENT> END_JUCER_METADATA */ #endif //[EndFile] You can add extra defines here... } // namespace hise //[/EndFile]
44.104
168
0.655844
romsom
e5461de4e1f026d92f9f1b630e825dd56a7a2fa6
31,026
hpp
C++
Lib/Chip/Unknown/Atmel/AT91SAM9G15/MATRIX.hpp
cjsmeele/Kvasir
c8d2acd8313ae52d78259ee2d409b963925f77d7
[ "Apache-2.0" ]
376
2015-07-17T01:41:20.000Z
2022-03-26T04:02:49.000Z
Lib/Chip/Unknown/Atmel/AT91SAM9G15/MATRIX.hpp
cjsmeele/Kvasir
c8d2acd8313ae52d78259ee2d409b963925f77d7
[ "Apache-2.0" ]
59
2015-07-03T21:30:13.000Z
2021-03-05T11:30:08.000Z
Lib/Chip/Unknown/Atmel/AT91SAM9G15/MATRIX.hpp
cjsmeele/Kvasir
c8d2acd8313ae52d78259ee2d409b963925f77d7
[ "Apache-2.0" ]
53
2015-07-14T12:17:06.000Z
2021-06-04T07:28:40.000Z
#pragma once #include <Register/Utility.hpp> namespace Kvasir { //AHB Bus Matrix namespace MatrixPras0{ ///<Priority Register A for Slave 0 using Addr = Register::Address<0xffffde80,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs0{ ///<Priority Register B for Slave 0 using Addr = Register::Address<0xffffde84,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras1{ ///<Priority Register A for Slave 1 using Addr = Register::Address<0xffffde88,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs1{ ///<Priority Register B for Slave 1 using Addr = Register::Address<0xffffde8c,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras2{ ///<Priority Register A for Slave 2 using Addr = Register::Address<0xffffde90,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs2{ ///<Priority Register B for Slave 2 using Addr = Register::Address<0xffffde94,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras3{ ///<Priority Register A for Slave 3 using Addr = Register::Address<0xffffde98,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs3{ ///<Priority Register B for Slave 3 using Addr = Register::Address<0xffffde9c,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras4{ ///<Priority Register A for Slave 4 using Addr = Register::Address<0xffffdea0,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs4{ ///<Priority Register B for Slave 4 using Addr = Register::Address<0xffffdea4,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras5{ ///<Priority Register A for Slave 5 using Addr = Register::Address<0xffffdea8,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs5{ ///<Priority Register B for Slave 5 using Addr = Register::Address<0xffffdeac,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras6{ ///<Priority Register A for Slave 6 using Addr = Register::Address<0xffffdeb0,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs6{ ///<Priority Register B for Slave 6 using Addr = Register::Address<0xffffdeb4,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras7{ ///<Priority Register A for Slave 7 using Addr = Register::Address<0xffffdeb8,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs7{ ///<Priority Register B for Slave 7 using Addr = Register::Address<0xffffdebc,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras8{ ///<Priority Register A for Slave 8 using Addr = Register::Address<0xffffdec0,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs8{ ///<Priority Register B for Slave 8 using Addr = Register::Address<0xffffdec4,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixPras9{ ///<Priority Register A for Slave 9 using Addr = Register::Address<0xffffdec8,0xcccccccc,0x00000000,unsigned>; ///Master 0 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m0pr{}; ///Master 1 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m1pr{}; ///Master 2 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,8),Register::ReadWriteAccess,unsigned> m2pr{}; ///Master 3 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(13,12),Register::ReadWriteAccess,unsigned> m3pr{}; ///Master 4 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> m4pr{}; ///Master 5 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,20),Register::ReadWriteAccess,unsigned> m5pr{}; ///Master 6 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(25,24),Register::ReadWriteAccess,unsigned> m6pr{}; ///Master 7 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(29,28),Register::ReadWriteAccess,unsigned> m7pr{}; } namespace MatrixPrbs9{ ///<Priority Register B for Slave 9 using Addr = Register::Address<0xffffdecc,0xffffffcc,0x00000000,unsigned>; ///Master 8 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,0),Register::ReadWriteAccess,unsigned> m8pr{}; ///Master 9 Priority constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,4),Register::ReadWriteAccess,unsigned> m9pr{}; } namespace MatrixMrcr{ ///<Master Remap Control Register using Addr = Register::Address<0xffffdf00,0xfffff800,0x00000000,unsigned>; ///Remap Command Bit for Master 0 constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> rcb0{}; ///Remap Command Bit for Master 1 constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rcb1{}; ///Remap Command Bit for Master 2 constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> rcb2{}; ///Remap Command Bit for Master 3 constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,unsigned> rcb3{}; ///Remap Command Bit for Master 4 constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,unsigned> rcb4{}; ///Remap Command Bit for Master 5 constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,unsigned> rcb5{}; ///Remap Command Bit for Master 6 constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::ReadWriteAccess,unsigned> rcb6{}; ///Remap Command Bit for Master 7 constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,unsigned> rcb7{}; ///Remap Command Bit for Master 8 constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,unsigned> rcb8{}; ///Remap Command Bit for Master 9 constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,9),Register::ReadWriteAccess,unsigned> rcb9{}; ///Remap Command Bit for Master 10 constexpr Register::FieldLocation<Addr,Register::maskFromRange(10,10),Register::ReadWriteAccess,unsigned> rcb10{}; } namespace MatrixWpmr{ ///<Write Protect Mode Register using Addr = Register::Address<0xffffdfe4,0x000000fe,0x00000000,unsigned>; ///Write Protect ENable constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> wpen{}; ///Write Protect KEY (Write-only) constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,8),Register::ReadWriteAccess,unsigned> wpkey{}; } namespace MatrixWpsr{ ///<Write Protect Status Register using Addr = Register::Address<0xffffdfe8,0xff0000fe,0x00000000,unsigned>; ///Write Protect Violation Status constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> wpvs{}; ///Write Protect Violation Source constexpr Register::FieldLocation<Addr,Register::maskFromRange(23,8),Register::Access<Register::AccessType::readOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> wpvsrc{}; } namespace MatrixMcfg0{ ///<Master Configuration Register using Addr = Register::Address<0xffffde00,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg1{ ///<Master Configuration Register using Addr = Register::Address<0xffffde04,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg2{ ///<Master Configuration Register using Addr = Register::Address<0xffffde08,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg3{ ///<Master Configuration Register using Addr = Register::Address<0xffffde0c,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg4{ ///<Master Configuration Register using Addr = Register::Address<0xffffde10,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg5{ ///<Master Configuration Register using Addr = Register::Address<0xffffde14,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg6{ ///<Master Configuration Register using Addr = Register::Address<0xffffde18,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg7{ ///<Master Configuration Register using Addr = Register::Address<0xffffde1c,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg8{ ///<Master Configuration Register using Addr = Register::Address<0xffffde20,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixMcfg9{ ///<Master Configuration Register using Addr = Register::Address<0xffffde24,0xfffffff8,0x00000000,unsigned>; ///Undefined Length Burst Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> ulbt{}; } namespace MatrixScfg0{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde40,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg1{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde44,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg2{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde48,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg3{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde4c,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg4{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde50,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg5{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde54,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg6{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde58,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg7{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde5c,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg8{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde60,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } namespace MatrixScfg9{ ///<Slave Configuration Register using Addr = Register::Address<0xffffde64,0xffc0fe00,0x00000000,unsigned>; ///Maximum Bus Grant Duration for Masters constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,0),Register::ReadWriteAccess,unsigned> slotCycle{}; ///Default Master Type constexpr Register::FieldLocation<Addr,Register::maskFromRange(17,16),Register::ReadWriteAccess,unsigned> defmstrType{}; ///Fixed Default Master constexpr Register::FieldLocation<Addr,Register::maskFromRange(21,18),Register::ReadWriteAccess,unsigned> fixedDefmstr{}; } }
69.721348
220
0.717882
cjsmeele
e549a487942d96e6b7a642a0d2add670586a9422
309
cpp
C++
src/lock.cpp
stiartsly/WhisperDemo-Pi
23aef69f5194274828b32e3c1dd560b3bbe80fab
[ "MIT" ]
null
null
null
src/lock.cpp
stiartsly/WhisperDemo-Pi
23aef69f5194274828b32e3c1dd560b3bbe80fab
[ "MIT" ]
null
null
null
src/lock.cpp
stiartsly/WhisperDemo-Pi
23aef69f5194274828b32e3c1dd560b3bbe80fab
[ "MIT" ]
null
null
null
#include <cstdlib> #include <pthread.h> #include "lock.h" CLock::CLock() { pthread_mutex_init(&mLock, NULL); } CLock::~CLock() { pthread_mutex_destroy(&mLock); } int CLock::lock(void) { return pthread_mutex_lock(&mLock); } int CLock::unlock(void) { return pthread_mutex_unlock(&mLock); }
12.36
40
0.673139
stiartsly
e54a93658c8b55d6f45b9a668a312f5a2a56fa00
2,924
cpp
C++
2019/Day03/Day03.cpp
luddet/AdventOfCode
ad6b3dacabfb29e044d8e37bc305e2a8c83e943e
[ "MIT" ]
null
null
null
2019/Day03/Day03.cpp
luddet/AdventOfCode
ad6b3dacabfb29e044d8e37bc305e2a8c83e943e
[ "MIT" ]
null
null
null
2019/Day03/Day03.cpp
luddet/AdventOfCode
ad6b3dacabfb29e044d8e37bc305e2a8c83e943e
[ "MIT" ]
null
null
null
// https://adventofcode.com/2019/day/3 #include <iostream> #include <string> #include <fstream> #include <sstream> #include <vector> #include <algorithm> struct Coord { int x; int y; }; struct Line { Coord start; Coord end; }; // Manhattan length int length(const Coord& coord) { return std::abs(coord.x) + std::abs(coord.y); } int length(const Line& line) { return std::abs(line.end.x - line.start.x) + std::abs(line.end.y - line.start.y); } bool intersects(const Line& line1, const Line& line2, Coord& intersecionPoint) { int minX1 = std::min(line1.start.x, line1.end.x); int minY1 = std::min(line1.start.y, line1.end.y); int maxX1 = std::max(line1.start.x, line1.end.x); int maxY1 = std::max(line1.start.y, line1.end.y); int minX2 = std::min(line2.start.x, line2.end.x); int minY2 = std::min(line2.start.y, line2.end.y); int maxX2 = std::max(line2.start.x, line2.end.x); int maxY2 = std::max(line2.start.y, line2.end.y); if (maxX1 < minX2 || minX1 > maxX2 || maxY1 < minY2 || minY1 > maxY2) return false; intersecionPoint.x = minX1 == maxX1 ? minX1 : minX2; intersecionPoint.y = minY1 == maxY1 ? minY1 : minY2; return true; } std::vector<Line> parseLine(std::string& line) { std::stringstream lineStream(line); std::vector<Line> result; Coord p1{ 0,0 }; char direction; int distance; while (lineStream >> direction >> distance) { Coord p2{ p1.x, p1.y }; switch (direction) { case 'U': p2.y += distance; break; case 'R': p2.x += distance; break; case 'D': p2.y -= distance; break; case 'L': p2.x -= distance; break; } result.push_back(Line{ p1, p2 }); p1 = p2; // eat comma char _; lineStream >> _; } return result; } int main() { std::ifstream fs("input.txt"); std::string line1, line2; std::getline(fs, line1); std::getline(fs, line2); std::vector<Line> wire1, wire2; wire1 = parseLine(line1); wire2 = parseLine(line2); int closestDistance = INT_MAX; int leastSteps = INT_MAX; int wire1TotalSteps = 0; for (size_t i = 0; i < wire1.size(); ++i) { int wire2TotalSteps = 0; for (size_t j = 0; j < wire2.size(); ++j) { Coord intersection; // don't check origin segments for intersections if ((i != 0 || j != 0) && intersects(wire1[i], wire2[j], intersection)) { closestDistance = std::min(closestDistance, length(intersection)); // delta from each wire segments start point to the intersection Coord w1delta{ intersection.x - wire1[i].start.x, intersection.y - wire1[i].start.y }; Coord w2delta{ intersection.x - wire2[j].start.x, intersection.y - wire2[j].start.y }; leastSteps = std::min(leastSteps, wire1TotalSteps + wire2TotalSteps + length(w1delta) + length(w2delta)); } wire2TotalSteps += length(wire2[j]); } wire1TotalSteps += length(wire1[i]); } std::cout << "Part 1: " << closestDistance << std::endl; std::cout << "Part 2: " << leastSteps << std::endl; }
22.84375
109
0.647743
luddet
e54c1893e6649423a7cfed325f4d82edcbfbe3f0
4,252
cpp
C++
problems/week11-return_of_the_jedi/src/algorithm.cpp
haeggee/algolab
176a7d4efbbfb2842f46e93250be00d3b59e0ec3
[ "MIT" ]
null
null
null
problems/week11-return_of_the_jedi/src/algorithm.cpp
haeggee/algolab
176a7d4efbbfb2842f46e93250be00d3b59e0ec3
[ "MIT" ]
null
null
null
problems/week11-return_of_the_jedi/src/algorithm.cpp
haeggee/algolab
176a7d4efbbfb2842f46e93250be00d3b59e0ec3
[ "MIT" ]
null
null
null
/* Tags: Minimal Spanning Tree, DFS, 2nd MST Key idea: * we look for 2nd best MST * construct MST with Kruskal --> Leias solution (equivalent to her Prim algorithm in terms of weight) * compute max edge on pairwise paths in MST with DFS in O(n^2) (paths are unique in tree) * loop through all edges _not_ in MST and compute best differences in adding edge (u,v) and removing worst edge on MST path between u and v * WHY? 2nd best MST is attained by adding a single edge that previosuly wasnt in MST and then deleting the largest edge in the cycle that is introduced. * Since the graph is fully connected here, it is more efficient to precompute pairwise max_edge_weights in O(n^2) than to do it for each edge in O(E * V) */ // STL includes #include <iostream> #include <vector> #include <queue> #include <stack> // BGL includes #include <boost/graph/adjacency_list.hpp> #include <boost/graph/kruskal_min_spanning_tree.hpp> #include <boost/pending/disjoint_sets.hpp> typedef std::size_t Index; typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::property<boost::edge_weight_t, int> > weighted_graph; typedef boost::property_map<weighted_graph, boost::edge_weight_t>::type weight_map; typedef boost::graph_traits<weighted_graph>::edge_descriptor edge_desc; typedef boost::graph_traits<weighted_graph>::vertex_descriptor vertex_desc; // edge: (u,v,c) typedef std::tuple<int,int,int> Edge; typedef std::vector<Edge> EdgeV; void testcase() { int n, tatt; std::cin >> n >> tatt; EdgeV edges; edges.reserve(n*n); for(int i = 0; i < n - 1; i++) { for(int j = 0; j < n - i - 1; j++) { int c; std::cin >> c; edges.emplace_back(i, i + j + 1, c); } } std::sort(edges.begin(), edges.end(), [](const Edge& e1, const Edge& e2) -> bool { return std::get<2>(e1) < std::get<2>(e2); }); // construct MST with Kruskal --> Leias solution (equivalent to her Prim algorithm) std::vector<std::vector<int>> edge_in_mst(n, std::vector<int>(n, 0)); // nonzero means included boost::disjoint_sets_with_storage<> uf(n); int mst_cost = 0; int n_components = n; std::vector<std::vector<int>> mst_edges(n, std::vector<int>(0)); for (EdgeV::const_iterator e = edges.begin(); e != edges.end(); ++e) { Index i1 = std::get<0>(*e); Index i2 = std::get<1>(*e); Index c1 = uf.find_set(i1); Index c2 = uf.find_set(i2); int cost = std::get<2>(*e); if(c1 != c2) { mst_cost += cost; uf.link(c1, c2); edge_in_mst[i1][i2] = cost; edge_in_mst[i2][i1] = cost; mst_edges[i1].push_back(i2); mst_edges[i2].push_back(i1); if(--n_components == 1) break; } } // compute max edge on pairwise paths in MST with DFS std::vector<std::vector<int>> max_e_betw(n, std::vector<int>(n, 0)); for(int i = 0; i < n; i++) { std::stack<std::pair<int,int>> Q; // pair of (node, max edge on path form i to node) Q.push({i,0}); std::vector<bool> visited(n, false); while(!Q.empty()) { auto v = Q.top(); int j = v.first; int c = v.second; Q.pop(); if(!visited[j]) { visited[j] = true; max_e_betw[i][j] = c; for(auto k : mst_edges[j]) Q.push({k, std::max(c, edge_in_mst[j][k])}); } } } // loop through all edges not in MST, compute best differences in adding edge (u,v) and // removing worst edge on MST path between u and v int min_diff = std::numeric_limits<int>::max(); for (EdgeV::const_iterator e = edges.begin(); e != edges.end(); ++e) { Index i1 = std::get<0>(*e); Index i2 = std::get<1>(*e); int cost = std::get<2>(*e); if(edge_in_mst[i1][i2] == 0) { min_diff = std::min(min_diff, cost - max_e_betw[i1][i2]); } } std::cout << mst_cost + min_diff << std::endl; } int main() { std::ios_base::sync_with_stdio(false); int t; std::cin >> t; for (int i = 0; i < t; ++i) testcase(); }
34.852459
101
0.591486
haeggee
e54fc090eccf003218a089668bfc96725925c1a9
942
hpp
C++
include/modules/sway/bar.hpp
Psykar/Waybar
a1129c4c87dd14beef771295aca911f3f9e799bc
[ "MIT" ]
null
null
null
include/modules/sway/bar.hpp
Psykar/Waybar
a1129c4c87dd14beef771295aca911f3f9e799bc
[ "MIT" ]
null
null
null
include/modules/sway/bar.hpp
Psykar/Waybar
a1129c4c87dd14beef771295aca911f3f9e799bc
[ "MIT" ]
null
null
null
#pragma once #include <string> #include "modules/sway/ipc/client.hpp" #include "util/SafeSignal.hpp" #include "util/json.hpp" namespace waybar { class Bar; namespace modules::sway { /* * Supported subset of i3/sway IPC barconfig object */ struct swaybar_config { std::string id; std::string mode; std::string hidden_state; }; /** * swaybar IPC client */ class BarIpcClient { public: BarIpcClient(waybar::Bar& bar); private: void onInitialConfig(const struct Ipc::ipc_response& res); void onIpcEvent(const struct Ipc::ipc_response&); void onConfigUpdate(const swaybar_config& config); void onVisibilityUpdate(bool visible_by_modifier); void update(); Bar& bar_; util::JsonParser parser_; Ipc ipc_; swaybar_config bar_config_; bool visible_by_modifier_ = false; SafeSignal<bool> signal_visible_; SafeSignal<swaybar_config> signal_config_; }; } // namespace modules::sway } // namespace waybar
18.84
60
0.733546
Psykar
e5503c73ff01bd157d2e1423074beb79a59cd748
623
hpp
C++
src/LANManager.hpp
developer-kikikaikai/linux_router
e4c29f407b5ace64298f798d6b1afabd81c2b6f5
[ "MIT" ]
null
null
null
src/LANManager.hpp
developer-kikikaikai/linux_router
e4c29f407b5ace64298f798d6b1afabd81c2b6f5
[ "MIT" ]
14
2018-07-22T19:12:21.000Z
2018-08-21T08:54:49.000Z
src/LANManager.hpp
developer-kikikaikai/linux_router
e4c29f407b5ace64298f798d6b1afabd81c2b6f5
[ "MIT" ]
null
null
null
#ifndef LAN_MANAGER_HPP #define LAN_MANAGER_HPP #include <vector> #include "LANIPManager.hpp" #include "JsonParser.hpp" #include <lower_layer_director.h> class LANManager { private: const char * _setting; LANIPManager * _ipmanager; JsonParser *_setting_parser; std::vector<LowerLayerDirector> _directors; public: LANManager(const char * input_setting) { _setting_parser = new JsonParser(input_setting); _ipmanager = new LANIPManager(_setting_parser->lan_info); } ~LANManager() { delete _ipmanager; } int set_lan(void); void add_devices(void); void delete_devices(void); int unset_lan(void); }; #endif
20.096774
59
0.76565
developer-kikikaikai
e55179158e57432b7325bd3977f58355acea694c
3,106
cpp
C++
code_reading/oceanbase-master/src/sql/engine/expr/ob_expr_not_exists.cpp
wangcy6/weekly_read
3a8837ee9cd957787ee1785e4066dd623e02e13a
[ "Apache-2.0" ]
null
null
null
code_reading/oceanbase-master/src/sql/engine/expr/ob_expr_not_exists.cpp
wangcy6/weekly_read
3a8837ee9cd957787ee1785e4066dd623e02e13a
[ "Apache-2.0" ]
null
null
null
code_reading/oceanbase-master/src/sql/engine/expr/ob_expr_not_exists.cpp
wangcy6/weekly_read
3a8837ee9cd957787ee1785e4066dd623e02e13a
[ "Apache-2.0" ]
1
2020-10-18T12:59:31.000Z
2020-10-18T12:59:31.000Z
/** * Copyright (c) 2021 OceanBase * OceanBase CE is licensed under Mulan PubL v2. * You can use this software according to the terms and conditions of the Mulan PubL v2. * You may obtain a copy of Mulan PubL v2 at: * http://license.coscl.org.cn/MulanPubL-2.0 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. * See the Mulan PubL v2 for more details. */ #define USING_LOG_PREFIX SQL_ENG #include "sql/engine/expr/ob_expr_not_exists.h" #include "common/row/ob_row_iterator.h" namespace oceanbase { using namespace common; namespace sql { ObExprNotExists::ObExprNotExists(ObIAllocator& alloc) : ObSubQueryRelationalExpr(alloc, T_OP_NOT_EXISTS, N_NOT_EXISTS, 1, NOT_ROW_DIMENSION) {} ObExprNotExists::~ObExprNotExists() {} int ObExprNotExists::calc_result_type1(ObExprResType& type, ObExprResType& type1, ObExprTypeCtx& type_ctx) const { UNUSED(type_ctx); int ret = OB_SUCCESS; if (OB_UNLIKELY(!type1.is_int())) { ret = OB_ERR_INVALID_TYPE_FOR_OP; } else { type.set_int32(); type.set_result_flag(OB_MYSQL_NOT_NULL_FLAG); type.set_scale(DEFAULT_SCALE_FOR_INTEGER); type.set_precision(DEFAULT_PRECISION_FOR_BOOL); } return ret; } int ObExprNotExists::calc_result1(ObObj& result, const ObObj& obj1, ObExprCtx& expr_ctx) const { int ret = OB_SUCCESS; int64_t query_idx = OB_INVALID_INDEX; ObNewRow* row = NULL; ObNewRowIterator* row_iter = NULL; if (OB_ISNULL(expr_ctx.subplan_iters_)) { ret = OB_INVALID_ARGUMENT; LOG_WARN("expr_ctx.subplan_iters_ is null"); } else { ObIArray<ObNewRowIterator*>* row_iters = expr_ctx.subplan_iters_; if (OB_FAIL(obj1.get_int(query_idx))) { LOG_WARN("get int failed", K(obj1), K(ret)); } else if (OB_UNLIKELY(query_idx < 0 || query_idx >= row_iters->count())) { ret = OB_INVALID_ARGUMENT; LOG_WARN("query_idx is invalid", "row_iter_count", row_iters->count(), K(query_idx)); } else if (OB_ISNULL(row_iter = row_iters->at(query_idx))) { ret = OB_ERR_NULL_VALUE; LOG_WARN("row iterator is null", K(query_idx)); } else if (OB_FAIL(row_iter->get_next_row(row))) { if (OB_LIKELY(OB_ITER_END == ret)) { ret = OB_SUCCESS; result.set_int32(1); // not exist } else { LOG_WARN("get next row failed", K(ret)); } } else { result.set_int32(0); // exist row,so return false } } return ret; } int ObExprNotExists::cg_expr(ObExprCGCtx&, const ObRawExpr&, ObExpr& rt_expr) const { int ret = OB_SUCCESS; CK(1 == rt_expr.arg_cnt_); rt_expr.eval_func_ = &not_exists_eval; return ret; }; int ObExprNotExists::not_exists_eval(const ObExpr& expr, ObEvalCtx& ctx, ObDatum& expr_datum) { int ret = OB_SUCCESS; bool exists = false; if (OB_FAIL(check_exists(expr, ctx, exists))) { LOG_WARN("check exists failed", K(ret)); } else { expr_datum.set_bool(!exists); } return ret; } } // namespace sql } // namespace oceanbase
31.693878
112
0.703799
wangcy6
e553a287b6184222831f218ba400fa98aa3e48ea
3,801
cpp
C++
src/libraries/core/meshes/primitiveMesh/primitiveMeshClear.cpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
src/libraries/core/meshes/primitiveMesh/primitiveMeshClear.cpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
src/libraries/core/meshes/primitiveMesh/primitiveMeshClear.cpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
/*---------------------------------------------------------------------------*\ Copyright (C) 2011 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of CAELUS. CAELUS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CAELUS 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 GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CAELUS. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "primitiveMesh.hpp" #include "demandDrivenData.hpp" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void CML::primitiveMesh::printAllocated() const { Pout<< "primitiveMesh allocated :" << endl; // Topology if (cellShapesPtr_) { Pout<< " Cell shapes" << endl; } if (edgesPtr_) { Pout<< " Edges" << endl; } if (ccPtr_) { Pout<< " Cell-cells" << endl; } if (ecPtr_) { Pout<< " Edge-cells" << endl; } if (pcPtr_) { Pout<< " Point-cells" << endl; } if (cfPtr_) { Pout<< " Cell-faces" << endl; } if (efPtr_) { Pout<< " Edge-faces" << endl; } if (pfPtr_) { Pout<< " Point-faces" << endl; } if (cePtr_) { Pout<< " Cell-edges" << endl; } if (fePtr_) { Pout<< " Face-edges" << endl; } if (pePtr_) { Pout<< " Point-edges" << endl; } if (ppPtr_) { Pout<< " Point-point" << endl; } if (cpPtr_) { Pout<< " Cell-point" << endl; } // Geometry if (cellCentresPtr_) { Pout<< " Cell-centres" << endl; } if (cellCentresGeometricPtr_) { Pout<< " Cell-centres geometric" << endl; } if (faceCentresPtr_) { Pout<< " Face-centres" << endl; } if (cellVolumesPtr_) { Pout<< " Cell-volumes" << endl; } if (faceAreasPtr_) { Pout<< " Face-areas" << endl; } } void CML::primitiveMesh::clearGeom() { if (debug) { Pout<< "primitiveMesh::clearGeom() : " << "clearing geometric data" << endl; } deleteDemandDrivenData(cellCentresPtr_); deleteDemandDrivenData(cellCentresGeometricPtr_); deleteDemandDrivenData(faceCentresPtr_); deleteDemandDrivenData(cellVolumesPtr_); deleteDemandDrivenData(faceAreasPtr_); } void CML::primitiveMesh::clearAddressing() { if (debug) { Pout<< "primitiveMesh::clearAddressing() : " << "clearing topology" << endl; } deleteDemandDrivenData(cellShapesPtr_); clearOutEdges(); deleteDemandDrivenData(ccPtr_); deleteDemandDrivenData(ecPtr_); deleteDemandDrivenData(pcPtr_); deleteDemandDrivenData(cfPtr_); deleteDemandDrivenData(efPtr_); deleteDemandDrivenData(pfPtr_); deleteDemandDrivenData(cePtr_); deleteDemandDrivenData(fePtr_); deleteDemandDrivenData(pePtr_); deleteDemandDrivenData(ppPtr_); deleteDemandDrivenData(cpPtr_); } void CML::primitiveMesh::clearOut() { clearGeom(); clearAddressing(); } // ************************************************************************* //
21.116667
79
0.524599
MrAwesomeRocks
e5568754493f67bb68185336cecf41822a020365
2,116
cpp
C++
src/color_management.cpp
hydrocarborane/polyscope
bee34c22cd7ac1b1e01686b55b7b8ceeee20d2fe
[ "MIT" ]
930
2018-02-19T16:38:29.000Z
2022-03-30T22:16:01.000Z
src/color_management.cpp
hydrocarborane/polyscope
bee34c22cd7ac1b1e01686b55b7b8ceeee20d2fe
[ "MIT" ]
142
2018-02-19T16:14:28.000Z
2022-03-25T13:51:08.000Z
src/color_management.cpp
hydrocarborane/polyscope
bee34c22cd7ac1b1e01686b55b7b8ceeee20d2fe
[ "MIT" ]
92
2018-05-13T01:41:04.000Z
2022-03-28T03:26:44.000Z
// Copyright 2017-2019, Nicholas Sharp and the Polyscope contributors. http://polyscope.run. #include "polyscope/color_management.h" // Use for color conversion scripts #include "imgui.h" #include <algorithm> #include <cmath> #include <iostream> using std::cout; using std::endl; namespace polyscope { namespace { // == Color management helpers // Clamp to [0,1] float unitClamp(float x) { return std::max(0.0f, std::min(1.0f, x)); } glm::vec3 unitClamp(glm::vec3 x) { return {unitClamp(x[0]), unitClamp(x[1]), unitClamp(x[2])}; } // Used to sample colors. Samples a series of most-distant values from a range [0,1] // offset from a starting value 'start' and wrapped around. index=0 returns start // // Example: if start = 0, emits f(0, i) = {0, 1/2, 1/4, 3/4, 1/8, 5/8, 3/8, 7/8, ...} // if start = 0.3 emits (0.3 + f(0, i)) % 1 float getIndexedDistinctValue(float start, int index) { if (index < 0) { return 0.0; } // Bit shifty magic to evaluate f() float val = 0; float p = 0.5; while (index > 0) { if (index % 2 == 1) { val += p; } index = index >> 1; p /= 2.0; } // Apply modular offset val = std::fmod(val + start, 1.0); return unitClamp(val); } // Get an indexed offset color. Inputs and outputs in RGB glm::vec3 indexOffsetHue(glm::vec3 baseColor, int index) { glm::vec3 baseHSV = RGBtoHSV(baseColor); float newHue = getIndexedDistinctValue(baseHSV[0], index); glm::vec3 outHSV = {newHue, baseHSV[1], baseHSV[2]}; return HSVtoRGB(outHSV); } // Keep track of unique structure colors const glm::vec3 uniqueColorBase{28. / 255., 99. / 255., 227. / 255.}; int iUniqueColor = 0; } // namespace glm::vec3 getNextUniqueColor() { return indexOffsetHue(uniqueColorBase, iUniqueColor++); } glm::vec3 RGBtoHSV(glm::vec3 rgb) { glm::vec3 hsv; ImGui::ColorConvertRGBtoHSV(rgb[0], rgb[1], rgb[2], hsv[0], hsv[1], hsv[2]); return unitClamp(hsv); } glm::vec3 HSVtoRGB(glm::vec3 hsv) { glm::vec3 rgb; ImGui::ColorConvertHSVtoRGB(hsv[0], hsv[1], hsv[2], rgb[0], rgb[1], rgb[2]); return unitClamp(rgb); } } // namespace polyscope
25.804878
96
0.651229
hydrocarborane
e557a824faa6e221484d57c294b9c763b7490482
8,099
cpp
C++
src/loramodem.cpp
2ni/lorawan_modem
a0722eb937b3d687c2a20c6123873ad93e18cb16
[ "MIT" ]
5
2020-10-27T21:28:03.000Z
2020-12-15T15:56:19.000Z
src/loramodem.cpp
2ni/lorawan_modem
a0722eb937b3d687c2a20c6123873ad93e18cb16
[ "MIT" ]
2
2020-10-28T17:47:17.000Z
2020-11-03T01:20:16.000Z
src/loramodem.cpp
2ni/lorawan_modem
a0722eb937b3d687c2a20c6123873ad93e18cb16
[ "MIT" ]
null
null
null
#include <Arduino.h> #include "loramodem.h" LoRaWANModem::LoRaWANModem(uint8_t pin_cts, uint8_t pin_rts) : uart(LORA_TX, LORA_RX, NC, NC) { _pin_cts = pin_cts; _pin_rts = pin_rts; } void LoRaWANModem::begin() { pinMode(_pin_rts, OUTPUT); digitalWrite(_pin_rts, HIGH); pinMode(_pin_cts, INPUT); uart.begin(115200); // data bits 8, stop bits 1, parity none while (!uart); } /* * only sends a join command * does not wait for network */ Status LoRaWANModem::command_join(const uint8_t *appeui, const uint8_t *appkey) { Status s; // should not be called if module joined or is joining network // or it'll return 0x05 error s = command(CMD_SETJOINEUI, appeui, 8); if (s != OK) { Serial.printf(DBG_ERR("set app eui error: 0x%02x."), (uint8_t)s); if (s == BUSY) { Serial.print(" Can't set appeui when joined/joining to network"); } Serial.println(); return s; } s = command(CMD_SETNWKKEY, appkey, 16); if (s != OK) { Serial.printf(DBG_ERR("set appkey error: 0x%02x."), (uint8_t)s); if (s == BUSY) { Serial.println("Can't set appeui when joined/joining to network"); } return s; } s = command(CMD_JOIN); if (s != OK) { Serial.printf(DBG_ERR("join error: 0x%02x") "\n", (uint8_t)s); return s; } delay(25); return OK; } bool LoRaWANModem::is_joining(void (*join_done)(Event_code code)) { uint8_t len; uint8_t response[3] = {0}; Status s = command(CMD_GETEVENT, response, &len); if (s != OK) { Serial.printf(DBG_ERR("pulling join event error: 0x%02x") "\n", (uint8_t)s); } if (response[0] == EVT_JOINED || response[0] == EVT_JOINFAIL) { // callback if (join_done != NULL) { join_done((Event_code)response[0]); } if (response[0] == EVT_JOINFAIL) { Serial.printf(DBG_ERR("join event fail") "\n"); } return false; } return true; } bool LoRaWANModem::is_joining() { return is_joining(NULL); } /* * send join command and wait for network * TODO sleep instead of idling 500ms! * TODO if join fails we get back to the modem stuck with "0x05 busy" */ Status LoRaWANModem::join(const uint8_t *appeui, const uint8_t *appkey) { // check status, if joined -> do nothing // avoid issues with multiple joins -> seems to create 0x05 busy errors Status s; uint8_t st[1] = {0}; uint8_t sl; command(CMD_GETSTATUS, st, &sl); Modem_status status = (Modem_status)st[0]; if (status == JOINED) { Serial.println(DBG_OK("already joined. Send your data!")); return OK; } // do not start an initial join call if already joining to avoid 0x05 busy errors // by setting appeui / appkey if (status != JOINING) { s = command_join(appeui, appkey); if (s != OK) { Serial.printf(DBG_ERR("join request error: 0x%02x") "\n", s); return FAIL; } } Serial.print("waiting"); uint8_t len; uint8_t response[1] = {0}; unsigned long current_time = millis(); while (true) { if ((millis()-current_time) > 500) { s = command(CMD_GETEVENT, response, &len); if (s != OK) { Serial.printf(DBG_ERR("pulling join event error: 0x%02x") "\n", (uint8_t)s); } if (response[0] == EVT_JOINED) { Serial.println(DBG_OK("joined")); return OK; } if (response[0] == EVT_JOINFAIL) { Serial.println(DBG_ERR("failed")); return FAIL; } current_time = millis(); Serial.print("."); } } } Status LoRaWANModem::send(const uint8_t *data, uint8_t len, uint8_t port, uint8_t confirm) { uint8_t payload_len = len + 2; uint8_t payload[255]; payload[0] = port; payload[1] = confirm; for (uint8_t i=0; i<len; i++) { payload[2+i] = data[i]; } Status sw = _write(CMD_REQUESTTX, payload, payload_len); if (sw != OK) { Serial.printf(DBG_ERR("tx cmd error: 0x%02x") "\n", (uint8_t)sw); return sw; } /* uint8_t event_len; uint8_t event_resp[3] = {0}; Status se = command(CMD_GETEVENT, event_resp, &event_len); if (se != OK) { Serial.printf(DBG_ERR("tx event cmd error: %02x") "\n", (uint8_t)se); } if (event_resp[0] == EVT_TXDONE) { tx_done((Event_code)event_resp[0]); return false; } */ return OK; } uint8_t LoRaWANModem::_calc_crc(uint8_t cmd, const uint8_t *payload, uint8_t len) { uint8_t crc = cmd^len; if (payload == NULL) return crc; for (uint8_t i=0; i<len; i++) { crc ^= payload[i]; } return crc; } /* * single command with arguments * get response */ Status LoRaWANModem::command(Lora_cmd cmd, const uint8_t *payload, uint8_t len_payload, uint8_t *response, uint8_t *len_response) { Status sw = _write(cmd, payload, len_payload); if (sw != OK) return sw; if (response == NULL) { uint8_t r[255] = {0}; uint8_t l; return _read(r, &l); } return _read(response, len_response); } /* * single command no arguments * get response */ Status LoRaWANModem::command(Lora_cmd cmd, uint8_t *response, uint8_t *len_response) { return command(cmd, NULL, 0, response, len_response); } /* * single command with arguments * ignore response * * we always need to read the result or we'll mess up communication at some point */ Status LoRaWANModem::command(Lora_cmd cmd, const uint8_t *payload, uint8_t len_payload) { return command(cmd, payload, len_payload, NULL, NULL); } /* * single command no arguments * ignore response */ Status LoRaWANModem::command(Lora_cmd cmd) { return command(cmd, NULL, 0, NULL, NULL); } Status LoRaWANModem::_write(Lora_cmd cmd) { return _write(cmd, NULL, 0); } Status LoRaWANModem::_write(Lora_cmd cmd, const uint8_t *payload, uint8_t len) { digitalWrite(_pin_rts, LOW); unsigned long now = millis(); // wait for uart to set busy line low with 10ms timeout while (digitalRead(_pin_cts) == HIGH) { if ((millis()-now) > 10) { Serial.println(DBG_ERR("cts timeout")); digitalWrite(_pin_rts, HIGH); return TIMEOUT; } } uart.write(cmd); uart.write(len); for (uint8_t i=0; i<len; i++) { uart.write(payload[i]); } uart.write(_calc_crc(cmd, payload, len)); delay(25); digitalWrite(_pin_rts, HIGH); // wait for uart to set busy line high again now = millis(); while (digitalRead(_pin_cts) == LOW) { if ((millis()-now) > 200) { Serial.println(DBG_ERR("cts release timeout")); return TIMEOUT; } } return OK; } Status LoRaWANModem::_read(uint8_t *payload, uint8_t *len) { unsigned long now = millis(); // wait for data with 100ms timeout while (!uart.available()) { if ((millis()-now) > 100) { Serial.println(DBG_ERR("receive timeout")); return TIMEOUT; } } while (!uart.available()) {} Status rc = (Status)uart.read(); if (rc != OK) { Serial.printf(DBG_ERR("receive error: 0x%02x") "\n", rc); } while (!uart.available()) {} uint8_t l = uart.read(); if (l) { uart.readBytes(payload, l); } while (!uart.available()) {} uint8_t chk = uart.read(); if (chk != _calc_crc(rc, payload, l)) { Serial.printf(DBG_ERR("invalid crc: 0x%02x") "\n", chk); return BADCRC; } *len = l; return rc; } void LoRaWANModem::info() { cmd_and_result("version", CMD_GETVERSION); cmd_and_result("status", CMD_GETSTATUS); cmd_and_result("chip id", CMD_GETCHIPEUI); cmd_and_result("dev eui", CMD_GETDEVEUI); cmd_and_result("app eui", CMD_GETJOINEUI); cmd_and_result("region", CMD_GETREGION); } void LoRaWANModem::cmd_and_result(const char *name, Lora_cmd cmd) { cmd_and_result(name, cmd, NULL, 0); } void LoRaWANModem::cmd_and_result(const char *name, Lora_cmd cmd, const uint8_t *payload, uint8_t len_payload) { uint8_t response[255] = {0}; uint8_t len = 0; Serial.printf("%s: ", name); if (command(cmd, payload, len_payload, response, &len) == OK) { Serial.print(DBG_OK("ok")); print_arr(response, len); } else { Serial.println(DBG_ERR("failed")); } } void LoRaWANModem::print_arr(uint8_t *arr, uint8_t len) { for (uint8_t i=0; i<len; i++) { Serial.printf(" %02x", arr[i]); } Serial.println(""); }
24.248503
131
0.639462
2ni
e557c19ba2a44a798c976cd41aada8e056a046c6
1,020
cpp
C++
libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
nawrinsu/llvm
e9153f0e50d45fb4a760463ae711aa45ce2bd450
[ "Apache-2.0" ]
null
null
null
libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
nawrinsu/llvm
e9153f0e50d45fb4a760463ae711aa45ce2bd450
[ "Apache-2.0" ]
null
null
null
libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
nawrinsu/llvm
e9153f0e50d45fb4a760463ae711aa45ce2bd450
[ "Apache-2.0" ]
null
null
null
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // <array> // template <size_t I, class T, size_t N> T&& get(array<T, N>&& a); // UNSUPPORTED: c++98, c++03 #include <array> #include <memory> #include <utility> #include <cassert> // std::array is explicitly allowed to be initialized with A a = { init-list };. // Disable the missing braces warning for this reason. #include "test_macros.h" #include "disable_missing_braces_warning.h" int main(int, char**) { { typedef std::unique_ptr<double> T; typedef std::array<T, 1> C; C c = {std::unique_ptr<double>(new double(3.5))}; T t = std::get<0>(std::move(c)); assert(*t == 3.5); } return 0; }
26.842105
80
0.538235
nawrinsu
e558a141ca9806e6d403c97858e3794873a66ec2
1,858
cpp
C++
src/Parsers/New/AST/CreateViewQuery.cpp
evryfs/ClickHouse
a9648af0b9e2506ce783106315814ed8dbd0a952
[ "Apache-2.0" ]
18
2021-05-29T01:12:33.000Z
2021-11-18T12:34:48.000Z
src/Parsers/New/AST/CreateViewQuery.cpp
evryfs/ClickHouse
a9648af0b9e2506ce783106315814ed8dbd0a952
[ "Apache-2.0" ]
13
2019-06-06T09:45:53.000Z
2020-05-15T12:03:45.000Z
src/Parsers/New/AST/CreateViewQuery.cpp
evryfs/ClickHouse
a9648af0b9e2506ce783106315814ed8dbd0a952
[ "Apache-2.0" ]
22
2019-06-14T10:31:51.000Z
2020-10-12T14:57:44.000Z
#include <Parsers/New/AST/CreateViewQuery.h> #include <Parsers/ASTCreateQuery.h> #include <Parsers/New/AST/CreateTableQuery.h> #include <Parsers/New/AST/Identifier.h> #include <Parsers/New/AST/SelectUnionQuery.h> #include <Parsers/New/ParseTreeVisitor.h> namespace DB::AST { CreateViewQuery::CreateViewQuery( PtrTo<ClusterClause> cluster, bool attach_, bool replace_, bool if_not_exists_, PtrTo<TableIdentifier> identifier, PtrTo<TableSchemaClause> clause, PtrTo<SelectUnionQuery> query) : DDLQuery(cluster, {identifier, clause, query}), attach(attach_), replace(replace_), if_not_exists(if_not_exists_) { } ASTPtr CreateViewQuery::convertToOld() const { auto query = std::make_shared<ASTCreateQuery>(); { auto table_id = getTableIdentifier(get(NAME)->convertToOld()); query->database = table_id.database_name; query->table = table_id.table_name; query->uuid = table_id.uuid; } query->attach = attach; query->replace_view = replace; query->if_not_exists = if_not_exists; query->is_ordinary_view = true; query->cluster = cluster_name; if (has(SCHEMA)) query->set(query->columns_list, get(SCHEMA)->convertToOld()); query->set(query->select, get(SUBQUERY)->convertToOld()); return query; } } namespace DB { using namespace AST; antlrcpp::Any ParseTreeVisitor::visitCreateViewStmt(ClickHouseParser::CreateViewStmtContext *ctx) { auto cluster = ctx->clusterClause() ? visit(ctx->clusterClause()).as<PtrTo<ClusterClause>>() : nullptr; auto schema = ctx->tableSchemaClause() ? visit(ctx->tableSchemaClause()).as<PtrTo<TableSchemaClause>>() : nullptr; return std::make_shared<CreateViewQuery>( cluster, !!ctx->ATTACH(), !!ctx->REPLACE(), !!ctx->IF(), visit(ctx->tableIdentifier()), schema, visit(ctx->subqueryClause())); } }
29.492063
134
0.709903
evryfs
e55b9e21ffd129536767b49da9796805fd71aba9
1,539
cpp
C++
leet/find_valid_matrix_given_row_and_column_sums.cpp
Surya-06/My-Solutions
58f7c7f1a0a3a28f25eff22d03a09cb2fbcf7806
[ "MIT" ]
null
null
null
leet/find_valid_matrix_given_row_and_column_sums.cpp
Surya-06/My-Solutions
58f7c7f1a0a3a28f25eff22d03a09cb2fbcf7806
[ "MIT" ]
null
null
null
leet/find_valid_matrix_given_row_and_column_sums.cpp
Surya-06/My-Solutions
58f7c7f1a0a3a28f25eff22d03a09cb2fbcf7806
[ "MIT" ]
null
null
null
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> // Problem: typedef long long int llint; typedef long double ldouble; using namespace std; class Solution { public: using vint = vector<int>; using vvint = vector<vint>; using pint = pair<int, int>; void __calc__(int x, int y, vvint& answer, vint& xr, vint& yr) { const size_t rsize = answer.size(); const size_t csize = rsize > 0 ? answer[0].size() : 0; if (x >= rsize or y >= csize) return; answer[x][y] = min(xr[x], yr[y]); xr[x] -= answer[x][y]; yr[y] -= answer[x][y]; if (xr[x] == 0) { for (int i = y + 1; i < csize; i++) answer[x][i] = 0; for (int i = x + 1; i < rsize; i++) { answer[i][y] = min(xr[i], yr[y]); xr[i] -= answer[i][y]; yr[y] -= answer[i][y]; } } else if (yr[y] == 0) { for (int i = x + 1; i < rsize; i++) answer[i][y] = 0; for (int i = y + 1; i < csize; i++) { answer[x][i] = min(xr[x], yr[i]); xr[x] -= answer[x][i]; yr[i] -= answer[x][i]; } } __calc__(x + 1, y + 1, answer, xr, yr); } vector<vector<int>> restoreMatrix(vector<int>& r, vector<int>& c) { vvint answer(r.size(), vint(c.size(), 0)); __calc__(0, 0, answer, r, c); return answer; } }; int main() { std::ios_base::sync_with_stdio(false); return 0; }
20.797297
69
0.527615
Surya-06
e55ea52956dab30f6882d126a1960c9d4f07d3e2
23,289
cpp
C++
taco-oopsla2017/src/lower/lower.cpp
peterahrens/FillEstimationIPDPS2017
857b6ee8866a2950aa5721d575d2d7d0797c4302
[ "BSD-3-Clause" ]
null
null
null
taco-oopsla2017/src/lower/lower.cpp
peterahrens/FillEstimationIPDPS2017
857b6ee8866a2950aa5721d575d2d7d0797c4302
[ "BSD-3-Clause" ]
null
null
null
taco-oopsla2017/src/lower/lower.cpp
peterahrens/FillEstimationIPDPS2017
857b6ee8866a2950aa5721d575d2d7d0797c4302
[ "BSD-3-Clause" ]
null
null
null
#include "taco/lower/lower.h" #include <vector> #include <stack> #include <set> #include "taco/tensor.h" #include "taco/expr.h" #include "taco/ir/ir.h" #include "taco/ir/ir_visitor.h" #include "ir/ir_codegen.h" #include "lower_codegen.h" #include "iterators.h" #include "tensor_path.h" #include "merge_lattice.h" #include "iteration_schedule.h" #include "expr_tools.h" #include "taco/expr_nodes/expr_nodes.h" #include "taco/expr_nodes/expr_rewriter.h" #include "storage/iterator.h" #include "taco/util/name_generator.h" #include "taco/util/collections.h" #include "taco/util/strings.h" using namespace std; namespace taco { namespace lower { using namespace taco::ir; using namespace taco::expr_nodes; using taco::storage::Iterator; struct Context { /// Determines what kind of code to emit (e.g. compute and/or assembly) set<Property> properties; /// The iteration schedule to use for lowering the index expression IterationSchedule schedule; /// The iterators of the tensor tree levels Iterators iterators; /// The size of initial memory allocations Expr allocSize; /// Maps tensor (scalar) temporaries to IR variables. /// (Not clear if this approach to temporaries is too hacky.) map<TensorBase,Expr> temporaries; }; struct Target { Expr tensor; Expr pos; }; enum ComputeCase { // Emit the last free variable. We first recurse to compute remaining // reduction variables into a temporary, before we compute and store the // main expression LAST_FREE, // Emit a variable above the last free variable. First emit code to compute // available expressions and store them in temporaries, before // we recurse on the next index variable. ABOVE_LAST_FREE, // Emit a variable below the last free variable. First recurse to emit // remaining (summation) variables, before we add in the available expressions // for the current summation variable. BELOW_LAST_FREE }; static ComputeCase getComputeCase(const IndexVar& indexVar, const IterationSchedule& schedule) { if (schedule.isLastFreeVariable(indexVar)) { return LAST_FREE; } else if (schedule.hasFreeVariableDescendant(indexVar)) { return ABOVE_LAST_FREE; } else { return BELOW_LAST_FREE; } } /// Returns true iff the lattice must be merged, false otherwise. A lattice /// must be merged iff it has more than one lattice point, or two or more of /// its iterators are not random access. static bool needsMerge(MergeLattice lattice) { if (lattice.getSize() > 1) { return true; } int notRandomAccess = 0; for (auto& iterator : lattice.getIterators()) { if ((!iterator.isRandomAccess()) && (++notRandomAccess > 1)) { return true; } } return false; } static bool needsZero(const Context& ctx) { const auto& schedule = ctx.schedule; const auto& resultIdxVars = schedule.getResultTensorPath().getVariables(); if (schedule.hasReductionVariableAncestor(resultIdxVars.back())) { return true; } for (const auto& idxVar : resultIdxVars) { for (const auto& tensorPath : schedule.getTensorPaths()) { if (util::contains(tensorPath.getVariables(), idxVar) && !ctx.iterators[tensorPath.getStep(idxVar)].isDense()) { return true; } } } return false; } static IndexExpr emitAvailableExprs(const IndexVar& indexVar, const IndexExpr& indexExpr, Context* ctx, vector<Stmt>* stmts) { vector<IndexVar> visited = ctx->schedule.getAncestors(indexVar); vector<IndexExpr> availExprs = getAvailableExpressions(indexExpr, visited); map<IndexExpr,IndexExpr> substitutions; for (const IndexExpr& availExpr : availExprs) { TensorBase t("t" + indexVar.getName(), Float(64)); substitutions.insert({availExpr, taco::Access(t)}); Expr tensorVar = Var::make(t.getName(), Float(64)); ctx->temporaries.insert({t, tensorVar}); Expr expr = lowerToScalarExpression(availExpr, ctx->iterators, ctx->schedule, ctx->temporaries); stmts->push_back(VarAssign::make(tensorVar, expr, true)); } return replace(indexExpr, substitutions); } static void emitComputeExpr(const Target& target, const IndexVar& indexVar, const IndexExpr& indexExpr, const Context& ctx, vector<Stmt>* stmts) { Expr expr = lowerToScalarExpression(indexExpr, ctx.iterators, ctx.schedule, ctx.temporaries); if (target.pos.defined()) { Stmt store = ctx.schedule.hasReductionVariableAncestor(indexVar) ? compoundStore(target.tensor, target.pos, expr) : Store::make(target.tensor, target.pos, expr); stmts->push_back(store); } else { Stmt assign = ctx.schedule.hasReductionVariableAncestor(indexVar) ? compoundAssign(target.tensor, expr) : VarAssign::make(target.tensor, expr); stmts->push_back(assign); } } static LoopKind doParallelize(const IndexVar& indexVar, const Expr& tensor, const Context& ctx) { if (ctx.schedule.getAncestors(indexVar).size() != 1 || ctx.schedule.isReduction(indexVar)) { return LoopKind::Serial; } const TensorPath& resultPath = ctx.schedule.getResultTensorPath(); for (size_t i = 0; i < resultPath.getSize(); i++){ if (!ctx.iterators[resultPath.getStep(i)].isDense()) { return LoopKind::Serial; } } const TensorPath parallelizedAccess = [&]() { const auto tensorName = tensor.as<Var>()->name; for (const auto& tensorPath : ctx.schedule.getTensorPaths()) { if (tensorPath.getTensor().getName() == tensorName) { return tensorPath; } } taco_iassert(false); return TensorPath(); }(); if (parallelizedAccess.getSize() <= 2) { return LoopKind::Static; } for (size_t i = 1; i < parallelizedAccess.getSize(); ++i) { if (ctx.iterators[parallelizedAccess.getStep(i)].isDense()) { return LoopKind::Static; } } return LoopKind::Dynamic; } /// Expression evaluates to true iff none of the iteratators are exhausted static Expr noneExhausted(const vector<Iterator>& iterators) { vector<Expr> stepIterLqEnd; for (auto& iter : iterators) { stepIterLqEnd.push_back(Lt::make(iter.getIteratorVar(), iter.end())); } return conjunction(stepIterLqEnd); } /// Expression evaluates to true iff all the iterator idx vars are equal to idx /// or if there are no iterators. static Expr allEqualTo(const vector<Iterator>& iterators, Expr idx) { if (iterators.size() == 0) { return Literal::make(true); } vector<Expr> iterIdxEqualToIdx; for (auto& iter : iterators) { iterIdxEqualToIdx.push_back(Eq::make(iter.getIdxVar(), idx)); } return conjunction(iterIdxEqualToIdx); } /// Returns the iterator for the `idx` variable from `iterators`, or Iterator() /// none of the iterator iterate over `idx`. static Iterator getIterator(const Expr& idx, const vector<Iterator>& iterators) { for (auto& iterator : iterators) { if (iterator.getIdxVar() == idx) { return iterator; } } return Iterator(); } static vector<Iterator> removeIterator(const Expr& idx, const vector<Iterator>& iterators) { vector<Iterator> result; for (auto& iterator : iterators) { if (iterator.getIdxVar() != idx) { result.push_back(iterator); } } return result; } static Stmt createIfStatements(vector<pair<Expr,Stmt>> cases, const MergeLattice& lattice) { if (!needsMerge(lattice)) { return cases[0].second; } vector<pair<Expr,Stmt>> ifCases; pair<Expr,Stmt> elseCase; for (auto& cas : cases) { auto lit = cas.first.as<Literal>(); if (lit != nullptr && lit->type == Bool() && lit->value == 1){ taco_iassert(!elseCase.first.defined()) << "there should only be one true case"; elseCase = cas; } else { ifCases.push_back(cas); } } if (elseCase.first.defined()) { ifCases.push_back(elseCase); return Case::make(ifCases, true); } else { return Case::make(ifCases, lattice.isFull()); } } static vector<Stmt> lower(const Target& target, const IndexExpr& indexExpr, const IndexVar& indexVar, Context& ctx) { vector<Stmt> code; MergeLattice lattice = MergeLattice::make(indexExpr, indexVar, ctx.schedule, ctx.iterators); TensorPath resultPath = ctx.schedule.getResultTensorPath(); TensorPathStep resultStep = resultPath.getStep(indexVar); Iterator resultIterator = (resultStep.getPath().defined()) ? ctx.iterators[resultStep] : Iterator(); bool emitCompute = util::contains(ctx.properties, Compute); bool emitAssemble = util::contains(ctx.properties, Assemble); bool emitMerge = needsMerge(lattice); // Emit code to initialize pos variables: // B2_pos = B2_pos_arr[B1_pos]; if (emitMerge) { for (auto& iterator : lattice.getIterators()) { Expr iteratorVar = iterator.getIteratorVar(); Stmt iteratorInit = VarAssign::make(iteratorVar, iterator.begin(), true); code.push_back(iteratorInit); } } // Emit one loop per lattice point lp vector<Stmt> loops; for (MergeLatticePoint lp : lattice) { MergeLattice lpLattice = lattice.getSubLattice(lp); auto lpIterators = lp.getIterators(); vector<Stmt> loopBody; // Emit code to initialize sequential access idx variables: // int kB = B1_idx_arr[B1_pos]; // int kc = c0_idx_arr[c0_pos]; vector<Expr> mergeIdxVariables; auto sequentialAccessIterators = getSequentialAccessIterators(lpIterators); for (Iterator& iterator : sequentialAccessIterators) { Stmt initIdx = iterator.initDerivedVar(); loopBody.push_back(initIdx); mergeIdxVariables.push_back(iterator.getIdxVar()); } // Emit code to initialize the index variable: // k = min(kB, kc); Expr idx = (lp.getMergeIterators().size() > 1) ? min(indexVar.getName(), lp.getMergeIterators(), &loopBody) : lp.getMergeIterators()[0].getIdxVar(); // Emit code to initialize random access pos variables: // D1_pos = (D0_pos * 3) + k; auto randomAccessIterators = getRandomAccessIterators(util::combine(lpIterators, {resultIterator})); for (Iterator& iterator : randomAccessIterators) { Expr val = ir::Add::make(ir::Mul::make(iterator.getParent().getPtrVar(), iterator.end()), idx); Stmt initPos = VarAssign::make(iterator.getPtrVar(), val, true); loopBody.push_back(initPos); } // Emit one case per lattice point in the sub-lattice rooted at lp vector<pair<Expr,Stmt>> cases; for (MergeLatticePoint& lq : lpLattice) { IndexExpr lqExpr = lq.getExpr(); vector<Stmt> caseBody; // Emit compute code for three cases: above, at or below the last free var ComputeCase indexVarCase = getComputeCase(indexVar, ctx.schedule); // Emit available sub-expressions at this loop level if (emitCompute && ABOVE_LAST_FREE == indexVarCase) { lqExpr = emitAvailableExprs(indexVar, lqExpr, &ctx, &caseBody); } // Recursive call to emit iteration schedule children for (auto& child : ctx.schedule.getChildren(indexVar)) { IndexExpr childExpr = lqExpr; Target childTarget = target; if (indexVarCase == LAST_FREE || indexVarCase == BELOW_LAST_FREE) { // Extract the expression to compute at the next level. If there's no // computation on the next level for this lattice case then skip it childExpr = getSubExpr(lqExpr, ctx.schedule.getDescendants(child)); if (!childExpr.defined()) continue; // Reduce child expression into temporary TensorBase t("t" + child.getName(), Float(64)); Expr tensorVar = Var::make(t.getName(), Type(Type::Float,64)); ctx.temporaries.insert({t, tensorVar}); childTarget.tensor = tensorVar; childTarget.pos = Expr(); if (emitCompute) { caseBody.push_back(VarAssign::make(tensorVar, 0.0, true)); } // Rewrite lqExpr to substitute the expression computed at the next // level with the temporary lqExpr = replace(lqExpr, {{childExpr,taco::Access(t)}}); } auto childCode = lower::lower(childTarget, childExpr, child, ctx); util::append(caseBody, childCode); } // Emit code to compute and store/assign result if (emitCompute && (indexVarCase == LAST_FREE || indexVarCase == BELOW_LAST_FREE)) { emitComputeExpr(target, indexVar, lqExpr, ctx, &caseBody); } // Emit a store of the index variable value to the result idx index array // A2_idx_arr[A2_pos] = j; if (emitAssemble && resultIterator.defined()){ Stmt idxStore = resultIterator.storeIdx(idx); if (idxStore.defined()) { caseBody.push_back(idxStore); } } // Emit code to increment the result `pos` variable and to allocate // additional storage for result `idx` and `pos` arrays if (resultIterator.defined() && resultIterator.isSequentialAccess()) { Expr rpos = resultIterator.getPtrVar(); Stmt posInc = VarAssign::make(rpos, Add::make(rpos, 1)); // Conditionally resize result `idx` and `pos` arrays if (emitAssemble) { Expr resize = And::make(Eq::make(0, BitAnd::make(Add::make(rpos, 1), rpos)), Lte::make(ctx.allocSize, Add::make(rpos, 1))); Expr newSize = ir::Mul::make(2, ir::Add::make(rpos, 1)); // Resize result `idx` array Stmt resizeIndices = resultIterator.resizeIdxStorage(newSize); // Resize result `pos` array if (indexVarCase == ABOVE_LAST_FREE) { auto nextStep = resultPath.getStep(resultStep.getStep() + 1); Stmt resizePos = ctx.iterators[nextStep].resizePtrStorage(newSize); resizeIndices = Block::make({resizeIndices, resizePos}); } else if (resultStep == resultPath.getLastStep() && emitCompute) { Expr vals = GetProperty::make(resultIterator.getTensor(), TensorProperty::Values); Stmt resizeVals = Allocate::make(vals, newSize, true); resizeIndices = Block::make({resizeIndices, resizeVals}); } posInc = Block::make({posInc,IfThenElse::make(resize,resizeIndices)}); } // Only increment `pos` if values were produced at the next level if (indexVarCase == ABOVE_LAST_FREE) { int step = resultStep.getStep() + 1; string resultTensorName = resultIterator.getTensor().as<Var>()->name; string posArrName = resultTensorName + to_string(step + 1) + "_pos"; Expr posArr = GetProperty::make(resultIterator.getTensor(), TensorProperty::Indices, step, 0, posArrName); Expr producedVals = Gt::make(Load::make(posArr, Add::make(rpos,1)), Load::make(posArr, rpos)); posInc = IfThenElse::make(producedVals, posInc); } util::append(caseBody, {posInc}); } auto caseIterators = removeIterator(idx, lq.getRangeIterators()); cases.push_back({allEqualTo(caseIterators,idx), Block::make(caseBody)}); } loopBody.push_back(createIfStatements(cases, lpLattice)); // Emit code to increment sequential access `pos` variables. Variables that // may not be consumed in an iteration (i.e. their iteration space is // different from the loop iteration space) are guarded by a conditional: if (emitMerge) { // if (k == kB) B1_pos++; // if (k == kc) c0_pos++; for (auto& iterator : removeIterator(idx, lp.getRangeIterators())) { Expr ivar = iterator.getIteratorVar(); Stmt inc = VarAssign::make(ivar, Add::make(ivar, 1)); Expr tensorIdx = iterator.getIdxVar(); loopBody.push_back(IfThenElse::make(Eq::make(tensorIdx, idx), inc)); } /// k++ auto idxIterator = getIterator(idx, lpIterators); if (idxIterator.defined()) { Expr ivar = idxIterator.getIteratorVar(); loopBody.push_back(VarAssign::make(ivar, Add::make(ivar, 1))); } } // Emit loop (while loop for merges and for loop for non-merges) Stmt loop; if (emitMerge) { loop = While::make(noneExhausted(lp.getRangeIterators()), Block::make(loopBody)); } else { Iterator iter = lp.getRangeIterators()[0]; loop = For::make(iter.getIteratorVar(), iter.begin(), iter.end(), 1, Block::make(loopBody), doParallelize(indexVar, iter.getTensor(), ctx)); } loops.push_back(loop); } util::append(code, loops); // Emit a store of the segment size to the result pos index // A2_pos_arr[A1_pos + 1] = A2_pos; if (emitAssemble && resultIterator.defined()) { Stmt posStore = resultIterator.storePtr(); if (posStore.defined()) { util::append(code, {posStore}); } } return code; } Stmt lower(TensorBase tensor, string funcName, set<Property> properties) { Context ctx; ctx.allocSize = Var::make("init_alloc_size", Type(Type::Int)); ctx.properties = properties; const bool emitAssemble = util::contains(ctx.properties, Assemble); const bool emitCompute = util::contains(ctx.properties, Compute); auto name = tensor.getName(); auto indexExpr = tensor.getExpr(); // Pack the tensor and it's expression operands into the parameter list vector<Expr> parameters; vector<Expr> results; map<TensorBase,Expr> tensorVars; tie(parameters,results,tensorVars) = getTensorVars(tensor); // Create the schedule and the iterators of the lowered code ctx.schedule = IterationSchedule::make(tensor); ctx.iterators = Iterators(ctx.schedule, tensorVars); vector<Stmt> init, body; TensorPath resultPath = ctx.schedule.getResultTensorPath(); if (emitAssemble) { for (auto& indexVar : resultPath.getVariables()) { Iterator iter = ctx.iterators[resultPath.getStep(indexVar)]; Stmt allocStmts = iter.initStorage(ctx.allocSize); if (allocStmts.defined()) { if (init.empty()) { const auto comment = to<Var>(ctx.allocSize)->name + " should be initialized to a power of two"; Stmt setAllocSize = Block::make({ Comment::make(comment), VarAssign::make(ctx.allocSize, (int)tensor.getAllocSize(), true) }); init.push_back(setAllocSize); } init.push_back(allocStmts); } } } // Initialize the result pos variables if (emitCompute || emitAssemble) { Stmt prevIteratorInit; for (auto& indexVar : resultPath.getVariables()) { Iterator iter = ctx.iterators[resultPath.getStep(indexVar)]; Stmt iteratorInit = VarAssign::make(iter.getPtrVar(), iter.begin(), true); if (iter.isSequentialAccess()) { // Emit code to initialize the result pos variable if (prevIteratorInit.defined()) { body.push_back(prevIteratorInit); prevIteratorInit = Stmt(); } body.push_back(iteratorInit); } else { prevIteratorInit = iteratorInit; } } } taco_iassert(results.size() == 1) << "An expression can only have one result"; // Lower the iteration schedule auto& roots = ctx.schedule.getRoots(); // Lower tensor expressions if (roots.size() > 0) { Iterator resultIterator = (resultPath.getSize() > 0) ? ctx.iterators[resultPath.getLastStep()] : ctx.iterators.getRoot(resultPath); // e.g. `a = b(i) * c(i)` Target target; target.tensor = GetProperty::make(resultIterator.getTensor(), TensorProperty::Values); target.pos = resultIterator.getPtrVar(); if (emitCompute) { Expr size = 1; for (auto& indexVar : resultPath.getVariables()) { const Iterator iter = ctx.iterators[resultPath.getStep(indexVar)]; if (!iter.isFixedRange()) { size = ctx.allocSize; break; } size = Mul::make(size, iter.end()); } if (emitAssemble) { Stmt allocVals = Allocate::make(target.tensor, size); init.push_back(allocVals); } // If the output is dense and if either an output dimension is merged with // a sparse input dimension or if the emitted code is a scatter code, then // we also need to zero the output. if (!isa<Var>(size)) { if (isa<Literal>(size)) { taco_iassert(to<Literal>(size)->value == 1); body.push_back(Store::make(target.tensor, 0, 0.0)); } else if (needsZero(ctx)) { Expr idxVar = Var::make("p" + name, Type(Type::Int)); Stmt zeroStmt = Store::make(target.tensor, idxVar, 0.0); body.push_back(For::make(idxVar, 0, size, 1, zeroStmt)); } } } const bool emitLoops = emitCompute || (emitAssemble && [&]() { for (auto& indexVar : resultPath.getVariables()) { Iterator iter = ctx.iterators[resultPath.getStep(indexVar)]; if (!iter.isDense()) { return true; } } return false; }()); if (emitLoops) { for (auto& root : roots) { auto loopNest = lower::lower(target, indexExpr, root, ctx); util::append(body, loopNest); } } if (emitAssemble && !emitCompute) { Expr size = 1; for (auto& indexVar : resultPath.getVariables()) { Iterator iter = ctx.iterators[resultPath.getStep(indexVar)]; size = iter.isFixedRange() ? Mul::make(size, iter.end()) : iter.getPtrVar(); } Stmt allocVals = Allocate::make(target.tensor, size); if (!body.empty()) { body.push_back(BlankLine::make()); } body.push_back(allocVals); } } // Lower scalar expressions else { TensorPath resultPath = ctx.schedule.getResultTensorPath(); Expr resultTensorVar = ctx.iterators.getRoot(resultPath).getTensor(); Expr vals = GetProperty::make(resultTensorVar, TensorProperty::Values); if (emitAssemble) { Stmt allocVals = Allocate::make(vals, 1); init.push_back(allocVals); } if (emitCompute) { Expr expr = lowerToScalarExpression(indexExpr, ctx.iterators, ctx.schedule, map<TensorBase,Expr>()); Stmt compute = Store::make(vals, 0, expr); body.push_back(compute); } } if (!init.empty()) { init.push_back(BlankLine::make()); } body = util::combine(init, body); return Function::make(funcName, parameters, results, Block::make(body)); } }}
35.339909
81
0.630083
peterahrens
e562585a55cfabb469ca1ed2c84c423dae48f8de
99
cpp
C++
Src/Vessel/Quadcopter/QuadcopterSubsys.cpp
Ybalrid/orbiter
7bed82f845ea8347f238011367e07007b0a24099
[ "MIT" ]
1,040
2021-07-27T12:12:06.000Z
2021-08-02T14:24:49.000Z
Src/Vessel/Quadcopter/QuadcopterSubsys.cpp
Ybalrid/orbiter
7bed82f845ea8347f238011367e07007b0a24099
[ "MIT" ]
20
2021-07-27T12:25:22.000Z
2021-08-02T12:22:19.000Z
Src/Vessel/Quadcopter/QuadcopterSubsys.cpp
Ybalrid/orbiter
7bed82f845ea8347f238011367e07007b0a24099
[ "MIT" ]
71
2021-07-27T14:19:49.000Z
2021-08-02T05:51:52.000Z
// Copyright (c) Martin Schweiger // Licensed under the MIT License #include "QuadcopterSubsys.h"
19.8
33
0.757576
Ybalrid
e5648cea6421a775246cc1d2cc71e8dbedd13695
575
cpp
C++
Sisyphe/interpreter/plugins/libdebugPlg/interpreter/src/Interpreter.cpp
tedi21/SisypheReview
f7c05bad1ccc036f45870535149d9685e1120c2c
[ "Unlicense" ]
null
null
null
Sisyphe/interpreter/plugins/libdebugPlg/interpreter/src/Interpreter.cpp
tedi21/SisypheReview
f7c05bad1ccc036f45870535149d9685e1120c2c
[ "Unlicense" ]
null
null
null
Sisyphe/interpreter/plugins/libdebugPlg/interpreter/src/Interpreter.cpp
tedi21/SisypheReview
f7c05bad1ccc036f45870535149d9685e1120c2c
[ "Unlicense" ]
null
null
null
#include <windows.h> #include "ProgramInterpreter.hpp" #include "DebugEngineInterpreter.hpp" #include "IDebugClientPtrInterpreter.hpp" #include "IDebugControlPtrInterpreter.hpp" #include "DEBUG_VALUEInterpreter.hpp" using namespace enc; using namespace fctr; using namespace interp; ////////////////////////////////////////// // Exportation des classes ////////////////////////////////////////// FACTORY_EXPORT_FILE(DebugEngineInterpreter<ucs>, ) FACTORY_EXPORT_FILE(IDebugClientPtrInterpreter<ucs>, ) FACTORY_EXPORT_FILE(IDebugControlPtrInterpreter<ucs>, )
33.823529
55
0.690435
tedi21
e564dd2b2161d9e83ef47fa9f3249ce3181fdb0b
5,505
hpp
C++
src/TNL/Benchmarks/Benchmarks.hpp
grinisrit/tnl-dev
4403b2dca895e2c32636395d6f1c1210c7afcefd
[ "MIT" ]
null
null
null
src/TNL/Benchmarks/Benchmarks.hpp
grinisrit/tnl-dev
4403b2dca895e2c32636395d6f1c1210c7afcefd
[ "MIT" ]
null
null
null
src/TNL/Benchmarks/Benchmarks.hpp
grinisrit/tnl-dev
4403b2dca895e2c32636395d6f1c1210c7afcefd
[ "MIT" ]
null
null
null
// Copyright (c) 2004-2022 Tomáš Oberhuber et al. // // This file is part of TNL - Template Numerical Library (https://tnl-project.org/) // // SPDX-License-Identifier: MIT // Implemented by: Jakub Klinkovsky, // Tomas Oberhuber #pragma once #include "Benchmarks.h" #include "Utils.h" #include <iostream> #include <exception> namespace TNL { namespace Benchmarks { template< typename Logger > Benchmark< Logger >::Benchmark( std::ostream& output, int loops, int verbose ) : logger( output, verbose ), loops( loops ) {} template< typename Logger > void Benchmark< Logger >::configSetup( Config::ConfigDescription& config ) { config.addEntry< int >( "loops", "Number of iterations for every computation.", 10 ); config.addEntry< bool >( "reset", "Call reset function between loops.", true ); config.addEntry< double >( "min-time", "Minimal real time in seconds for every computation.", 0.0 ); config.addEntry< int >( "verbose", "Verbose mode, the higher number the more verbosity.", 1 ); } template< typename Logger > void Benchmark< Logger >::setup( const Config::ParameterContainer& parameters ) { this->loops = parameters.getParameter< int >( "loops" ); this->reset = parameters.getParameter< bool >( "reset" ); this->minTime = parameters.getParameter< double >( "min-time" ); const int verbose = parameters.getParameter< int >( "verbose" ); logger.setVerbose( verbose ); } template< typename Logger > void Benchmark< Logger >::setLoops( int loops ) { this->loops = loops; } template< typename Logger > void Benchmark< Logger >::setMinTime( double minTime ) { this->minTime = minTime; } template< typename Logger > bool Benchmark< Logger >::isResetingOn() const { return reset; } template< typename Logger > void Benchmark< Logger >::setMetadataColumns( const MetadataColumns& metadata ) { logger.setMetadataColumns( metadata ); } template< typename Logger > void Benchmark< Logger >::setMetadataElement( const typename MetadataColumns::value_type& element ) { logger.setMetadataElement( element ); } template< typename Logger > void Benchmark< Logger >::setMetadataWidths( const std::map< std::string, int >& widths ) { logger.setMetadataWidths( widths ); } template< typename Logger > void Benchmark< Logger >::setDatasetSize( double datasetSize, double baseTime ) { this->datasetSize = datasetSize; this->baseTime = baseTime; } template< typename Logger > void Benchmark< Logger >::setOperation( const String& operation, double datasetSize, double baseTime ) { monitor.setStage( operation.getString() ); logger.setMetadataElement( { "operation", operation }, 0 ); setDatasetSize( datasetSize, baseTime ); } template< typename Logger > template< typename Device, typename ResetFunction, typename ComputeFunction > void Benchmark< Logger >::time( ResetFunction reset, const String& performer, ComputeFunction& compute, BenchmarkResult& result ) { result.time = std::numeric_limits< double >::quiet_NaN(); result.stddev = std::numeric_limits< double >::quiet_NaN(); // run the monitor main loop Solvers::SolverMonitorThread monitor_thread( monitor ); if( logger.getVerbose() <= 1 ) // stop the main loop when not verbose monitor.stopMainLoop(); std::string errorMessage; try { if( this->reset ) std::tie( result.loops, result.time, result.stddev ) = timeFunction< Device >( compute, reset, loops, minTime, monitor ); else { auto noReset = []() {}; std::tie( result.loops, result.time, result.stddev ) = timeFunction< Device >( compute, noReset, loops, minTime, monitor ); } } catch( const std::exception& e ) { errorMessage = "timeFunction failed due to a C++ exception with description: " + std::string( e.what() ); std::cerr << errorMessage << std::endl; } result.bandwidth = datasetSize / result.time; result.speedup = this->baseTime / result.time; if( this->baseTime == 0.0 ) this->baseTime = result.time; logger.logResult( performer, result.getTableHeader(), result.getRowElements(), result.getColumnWidthHints(), errorMessage ); } template< typename Logger > template< typename Device, typename ResetFunction, typename ComputeFunction > BenchmarkResult Benchmark< Logger >::time( ResetFunction reset, const String& performer, ComputeFunction& compute ) { BenchmarkResult result; time< Device >( reset, performer, compute, result ); return result; } template< typename Logger > template< typename Device, typename ComputeFunction > void Benchmark< Logger >::time( const String& performer, ComputeFunction& compute, BenchmarkResult& result ) { auto noReset = []() {}; time< Device >( noReset, performer, compute, result ); } template< typename Logger > template< typename Device, typename ComputeFunction > BenchmarkResult Benchmark< Logger >::time( const String& performer, ComputeFunction& compute ) { BenchmarkResult result; time< Device >( performer, compute, result ); return result; } template< typename Logger > void Benchmark< Logger >::addErrorMessage( const std::string& message ) { logger.writeErrorMessage( message ); std::cerr << message << std::endl; } template< typename Logger > auto Benchmark< Logger >::getMonitor() -> SolverMonitorType& { return monitor; } template< typename Logger > double Benchmark< Logger >::getBaseTime() const { return baseTime; } } // namespace Benchmarks } // namespace TNL
28.086735
127
0.704814
grinisrit
e5655eb057cb7a0baed86d4371a3e518994375ba
434
cpp
C++
sprint2/src/customer.cpp
trimino/ELSA
9021425a4c1ff592a15c7f7cd9940f9144f44047
[ "MIT" ]
null
null
null
sprint2/src/customer.cpp
trimino/ELSA
9021425a4c1ff592a15c7f7cd9940f9144f44047
[ "MIT" ]
null
null
null
sprint2/src/customer.cpp
trimino/ELSA
9021425a4c1ff592a15c7f7cd9940f9144f44047
[ "MIT" ]
null
null
null
#include "customer.h" #include <iostream> Customer::Customer(std::string name, std::string phone, std::string email): _name{name}, _phone{phone}, _email{email}{ /*constructor for Cusotmer Class*/} std::ostream& operator<<(std::ostream& ost, const Customer& customer){ ost << customer._name << "(" << customer._phone << " - " << customer._email << ")"; return ost; } std::string Customer::get_name(){ return _name; }
25.529412
154
0.66129
trimino
e5681f877ad7f83f4618f2fc44e500c843976446
1,984
hh
C++
src/opbox/core/OpTimer.hh
faodel/faodel
ef2bd8ff335433e695eb561d7ecd44f233e58bf0
[ "MIT" ]
2
2019-01-25T21:21:07.000Z
2021-04-29T17:24:00.000Z
src/opbox/core/OpTimer.hh
faodel/faodel
ef2bd8ff335433e695eb561d7ecd44f233e58bf0
[ "MIT" ]
8
2018-10-09T14:35:30.000Z
2020-09-30T20:09:42.000Z
src/opbox/core/OpTimer.hh
faodel/faodel
ef2bd8ff335433e695eb561d7ecd44f233e58bf0
[ "MIT" ]
2
2019-04-23T19:01:36.000Z
2021-05-11T07:44:55.000Z
// Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC // (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. // Government retains certain rights in this software. #ifndef OPBOX_OPBOX_OPTIMER_HH #define OPBOX_OPBOX_OPTIMER_HH #include <vector> #include "opbox/ops/Op.hh" namespace opbox { namespace internal { class OpTimerEvent { public: enum Value: int { Incoming=0, Update, Launch, Trigger, Dispatched, ActionComplete }; OpTimerEvent()=default; std::string str(); constexpr OpTimerEvent(Value e) :value(e) {} private: Value value; }; /** * @brief Timing code to help estimate how long it takes to execute ops * * This timer creates a trace of all the different events that are passed * to each op. An instrumented OpBoxCore should include one of these * structures and use Mark commands to add new events to the trace. The * op's mailbox id is extracted from the op to provide a tag for grouping * ops. The Dump command sorts by mailbox and shows the amount of time * since the previous marker in this op. */ class OpTimer { public: OpTimer(); ~OpTimer(); void Mark(Op *op, OpTimerEvent event); void MarkDispatched(mailbox_t); void Dump(); private: struct op_timestamp_t { mailbox_t mbox; unsigned int opid; OpTimerEvent event; std::chrono::high_resolution_clock::time_point time; op_timestamp_t(Op *op, OpTimerEvent event) : mbox(op->GetAssignedMailbox()), opid(op->getOpID()), event(event) { time = std::chrono::high_resolution_clock::now(); } op_timestamp_t(mailbox_t m) : mbox(m), opid(0), event(OpTimerEvent::Dispatched) { time = std::chrono::high_resolution_clock::now(); } uint64_t getGapTimeUS(const op_timestamp_t &prv); }; private: faodel::MutexWrapper *mutex; std::vector <op_timestamp_t> timestamps; }; } //namespace internal } //namespace opbox #endif //OPBOX_OPBOX_OPTIMER_HH
24.8
81
0.705645
faodel
e56990303867d05ec251b5bb657511702066902c
628
cpp
C++
drv_brain/src/facelistener.cpp
DrawZeroPoint/drv_package_v2
fc4b83e1a7ee4a3e007e32358a5e0035e0dcf5cb
[ "MIT" ]
13
2017-09-06T13:33:19.000Z
2021-09-20T08:53:05.000Z
drv_brain/src/facelistener.cpp
DrawZeroPoint/drv_package_v2
fc4b83e1a7ee4a3e007e32358a5e0035e0dcf5cb
[ "MIT" ]
null
null
null
drv_brain/src/facelistener.cpp
DrawZeroPoint/drv_package_v2
fc4b83e1a7ee4a3e007e32358a5e0035e0dcf5cb
[ "MIT" ]
5
2017-11-02T13:09:33.000Z
2018-06-07T01:08:29.000Z
#include "facelistener.h" FaceListener::FaceListener() { control_param_need_recog = "/comm/param/control/face/need_recognize"; local_param_need_recog = "/vision/face/need_recognize"; } void FaceListener::isNeedRecognizeFace() { // if (ros::param::has(local_param_need_recog)) // { // bool need_recog = false; // ros::param::get(local_param_need_recog, need_recog); // if (need_recog) // { // ros::param::set(local_param_need_recog, true); // } // else // { // ros::param::set(local_param_need_recog, false); // } // } // else // ros::param::set(local_param_need_recog, false); }
23.259259
73
0.657643
DrawZeroPoint
e56a1a9ec62105fe15240e7b7eb2c1b9a3e2c170
6,279
cpp
C++
src/SNN/utils/Image.cpp
CognitiveModeling/snn-robotic-trunk
0a1dce9271feeabfd3c442de3c7fa90a8a725100
[ "MIT" ]
1
2021-11-21T08:28:56.000Z
2021-11-21T08:28:56.000Z
src/SNN/utils/Image.cpp
CognitiveModeling/snn-robotic-trunk
0a1dce9271feeabfd3c442de3c7fa90a8a725100
[ "MIT" ]
null
null
null
src/SNN/utils/Image.cpp
CognitiveModeling/snn-robotic-trunk
0a1dce9271feeabfd3c442de3c7fa90a8a725100
[ "MIT" ]
null
null
null
#include "Image.h" #include <IL/il.h> #include <pthread.h> #include <assert.h> #include <string.h> #include <unistd.h> #include <math.h> #include <dirent.h> #include "utils.h" #include <string.h> using namespace SNN; /* wether the image library was allready initialized */ bool Image::initialized = false; /* synconization */ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* constructor */ Image::Image(std::string fname) { if (!initialized) { ilInit(); initialized = true; } pthread_mutex_lock(&mutex); if (ilLoadImage(fname.c_str()) == IL_FALSE) { pthread_mutex_unlock(&mutex); assert(false); } this->width = ilGetInteger(IL_IMAGE_WIDTH); this->height = ilGetInteger(IL_IMAGE_HEIGHT); this->bytesPerPixel = ilGetInteger(IL_IMAGE_BITS_PER_PIXEL) / 8; this->length = this->width * this->height * this->bytesPerPixel; this->pixel = (uint8_t *) malloc(this->length); memcpy(this->pixel, ilGetData(), this->length); if (ilGetError() != IL_NO_ERROR) { free(this->pixel); free(this); pthread_mutex_unlock(&mutex); assert(false); } pthread_mutex_unlock(&mutex); /* mirror horizontaly */ uint8_t *tmp = (uint8_t *) malloc(this->bytesPerPixel * width); for (int32_t i = 0; i < height / 2; i++) { memcpy(tmp, this->pixel + i * this->bytesPerPixel * width, this->bytesPerPixel * width); memcpy( this->pixel + i * this->bytesPerPixel * width, this->pixel + (height - i - 1) * this->bytesPerPixel * width, this->bytesPerPixel * width ); memcpy( this->pixel + (height - i - 1) * this->bytesPerPixel * width, tmp, this->bytesPerPixel * width ); } free(tmp); } /* creat an image with the given width an height and byptes per pixel */ Image::Image(int32_t width, int32_t height, uint8_t bytesPerPixel, int initialValue) { if (!initialized) { ilInit(); initialized = true; } this->width = width; this->height = height; this->bytesPerPixel = bytesPerPixel; this->length = this->width * this->height * this->bytesPerPixel; this->pixel = (uint8_t *) malloc(this->length); memset(this->pixel, initialValue, this->length); } /* stack several 1D greyscale images */ Image::Image(std::vector<Image *> imgs): Image(imgs[0]->width, imgs.size(), 1) { if (!initialized) { ilInit(); initialized = true; } for (unsigned y = 0; y < imgs.size(); y++) for (int x = 0; x < width; x++) pixel[y * width + x] = imgs[y]->pixel[x]; } /* destructor */ Image::~Image() { free(this->pixel); } /* saves the image */ void Image::save(std::string fname) { pthread_mutex_lock(&mutex); unlink(fname.c_str()); ilTexImage( this->width, this->height, 1, this->bytesPerPixel, (this->bytesPerPixel == 1) ? IL_LUMINANCE : ((this->bytesPerPixel == 3) ? IL_RGB : IL_RGBA), IL_UNSIGNED_BYTE, this->pixel ); ilSaveImage(fname.c_str()); pthread_mutex_unlock(&mutex); } /* converts this to greyscale */ void Image::toGray() { assert(this->bytesPerPixel == 3); int64_t i, j; for (i = 0, j = 0; i < this->length; i += 3, j++) { this->pixel[j] = this->pixel[i] * 0.299 + this->pixel[i + 1] * 0.587 + this->pixel[i + 2] * 0.114; } this->length /= 3; this->pixel = (uint8_t *) realloc(this->pixel, this->length); this->bytesPerPixel = 1; } /* opens all images from the given directory */ std::vector<Image *> Image::open(std::string dir) { if (!initialized) { ilInit(); initialized = true; } if (dir.back() != '/') dir += '/'; std::vector<Image *> images; DIR * dirp; struct dirent *entry; dirp = opendir(dir.c_str()); if (dirp == NULL) { perror("Couldn't open the directory"); exit(EXIT_FAILURE); } while ((entry = readdir(dirp)) != NULL) if (entry->d_type == DT_REG) { std::string file = dir + std::string(entry->d_name); if (endsWith(file, ".jpg") || endsWith(file, ".png") || endsWith(file, ".bmp") || endsWith(file, ".gif")) images.push_back(new Image(file)); } closedir(dirp); return images; } /* upscal this image about the given factor in x and y */ void Image::upscal(int factor) { if (this->bytesPerPixel == 1) { unsigned oldWidth = this->width; this->width *= factor; this->height *= factor; this->length = this->width * this->height; uint8_t *tmpPixel = (uint8_t *) malloc(this->length); for (int x = 0; x < this->width; x += factor) { for (int y = 0; y < this->height; y += factor) { for (int i = 0; i < factor; i++) { memset( tmpPixel + (y + i) * this->width + x, this->pixel[(y / factor) * oldWidth + x / factor], factor ); } } } free(this->pixel); this->pixel = tmpPixel; } else { this->width *= factor; this->height *= factor; this->length = this->width * this->height * this->bytesPerPixel; uint8_t *tmpPixel = (uint8_t *) malloc(this->length); for (int x = 0; x < this->width; x += factor) { for (int y = 0; y < this->height; y += factor) { for (int xx = 0; xx < factor; xx++) { for (int yy = 0; yy < factor; yy++) { memcpy( tmpPixel + ((y + yy) * this->width + x + xx) * this->bytesPerPixel, this->pixel + (y * this->width / (factor * factor) + x / factor) * this->bytesPerPixel, this->bytesPerPixel ); } } } } free(this->pixel); this->pixel = tmpPixel; } }
28.671233
115
0.52158
CognitiveModeling
e56ba64c5927c2dbe7a9151e9033f66a03d48e81
1,885
cc
C++
components/password_manager/core/browser/possible_username_data.cc
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
components/password_manager/core/browser/possible_username_data.cc
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
components/password_manager/core/browser/possible_username_data.cc
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/password_manager/core/browser/possible_username_data.h" #include <string> #include "base/strings/string_piece.h" #include "components/password_manager/core/browser/leak_detection/encryption_utils.h" namespace password_manager { namespace { // Find a field in |predictions| with given renderer id. const PasswordFieldPrediction* FindFieldPrediction( const FormPredictions& predictions, autofill::FieldRendererId field_renderer_id) { for (const auto& field : predictions.fields) { if (field.renderer_id == field_renderer_id) return &field; } return nullptr; } } // namespace PossibleUsernameData::PossibleUsernameData( std::string signon_realm, autofill::FieldRendererId renderer_id, const std::u16string& field_name, const std::u16string& value, base::Time last_change, int driver_id) : signon_realm(std::move(signon_realm)), renderer_id(renderer_id), field_name(field_name), value(value), last_change(last_change), driver_id(driver_id) {} PossibleUsernameData::PossibleUsernameData(const PossibleUsernameData&) = default; PossibleUsernameData::~PossibleUsernameData() = default; bool PossibleUsernameData::IsStale() const { return base::Time::Now() - last_change > kPossibleUsernameExpirationTimeout; } bool PossibleUsernameData::HasSingleUsernameServerPrediction() const { // Check if there is a server prediction. if (!form_predictions) return false; const PasswordFieldPrediction* field_prediction = FindFieldPrediction(*form_predictions, renderer_id); return field_prediction && field_prediction->type == autofill::SINGLE_USERNAME; } } // namespace password_manager
30.403226
85
0.755438
chromium
e56d6acda63cb2f705e626fc0e64b34ca36c1562
12,435
cc
C++
chrome/browser/chromeos/smb_client/smbfs_share_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/browser/chromeos/smb_client/smbfs_share_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/browser/chromeos/smb_client/smbfs_share_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/smb_client/smbfs_share.h" #include "base/run_loop.h" #include "base/test/bind_test_util.h" #include "base/test/gmock_callback_support.h" #include "base/test/task_environment.h" #include "chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h" #include "chrome/browser/chromeos/file_manager/volume_manager.h" #include "chrome/browser/chromeos/file_manager/volume_manager_factory.h" #include "chrome/browser/chromeos/file_manager/volume_manager_observer.h" #include "chrome/browser/chromeos/smb_client/smb_url.h" #include "chrome/test/base/testing_profile.h" #include "chromeos/components/smbfs/smbfs_host.h" #include "chromeos/components/smbfs/smbfs_mounter.h" #include "chromeos/disks/disk_mount_manager.h" #include "chromeos/disks/mount_point.h" #include "content/public/test/browser_task_environment.h" #include "storage/browser/file_system/external_mount_points.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" using testing::_; using testing::AllOf; using testing::Property; using testing::Unused; namespace chromeos { namespace smb_client { namespace { constexpr char kSharePath[] = "smb://share/path"; constexpr char kDisplayName[] = "Public"; constexpr char kMountPath[] = "/share/mount/path"; constexpr char kFileName[] = "file_name.ext"; // Creates a new VolumeManager for tests. // By default, VolumeManager KeyedService is null for testing. std::unique_ptr<KeyedService> BuildVolumeManager( content::BrowserContext* context) { return std::make_unique<file_manager::VolumeManager>( Profile::FromBrowserContext(context), nullptr /* drive_integration_service */, nullptr /* power_manager_client */, chromeos::disks::DiskMountManager::GetInstance(), nullptr /* file_system_provider_service */, file_manager::VolumeManager::GetMtpStorageInfoCallback()); } class MockVolumeManagerObsever : public file_manager::VolumeManagerObserver { public: MOCK_METHOD(void, OnVolumeMounted, (chromeos::MountError error_code, const file_manager::Volume& volume), (override)); MOCK_METHOD(void, OnVolumeUnmounted, (chromeos::MountError error_code, const file_manager::Volume& volume), (override)); }; class MockSmbFsMounter : public smbfs::SmbFsMounter { public: MOCK_METHOD(void, Mount, (smbfs::SmbFsMounter::DoneCallback callback), (override)); }; class TestSmbFsImpl : public smbfs::mojom::SmbFs {}; class SmbFsShareTest : public testing::Test { protected: void SetUp() override { chromeos::disks::DiskMountManager::InitializeForTesting( disk_mount_manager_); file_manager::VolumeManagerFactory::GetInstance()->SetTestingFactory( &profile_, base::BindRepeating(&BuildVolumeManager)); file_manager::VolumeManager::Get(&profile_)->AddObserver(&observer_); mounter_creation_callback_ = base::BindLambdaForTesting( [this](const std::string& share_path, const std::string& mount_dir_name, const SmbFsShare::MountOptions& options, smbfs::SmbFsHost::Delegate* delegate) -> std::unique_ptr<smbfs::SmbFsMounter> { EXPECT_EQ(share_path, kSharePath); return std::move(mounter_); }); } void TearDown() override { file_manager::VolumeManager::Get(&profile_)->RemoveObserver(&observer_); } std::unique_ptr<smbfs::SmbFsHost> CreateSmbFsHost( SmbFsShare* share, mojo::Receiver<smbfs::mojom::SmbFs>* smbfs_receiver, mojo::Remote<smbfs::mojom::SmbFsDelegate>* delegate) { return std::make_unique<smbfs::SmbFsHost>( std::make_unique<chromeos::disks::MountPoint>( base::FilePath(kMountPath), disk_mount_manager_), share, mojo::Remote<smbfs::mojom::SmbFs>( smbfs_receiver->BindNewPipeAndPassRemote()), delegate->BindNewPipeAndPassReceiver()); } content::BrowserTaskEnvironment task_environment_{ content::BrowserTaskEnvironment::REAL_IO_THREAD, base::test::TaskEnvironment::TimeSource::MOCK_TIME}; file_manager::FakeDiskMountManager* disk_mount_manager_ = new file_manager::FakeDiskMountManager; TestingProfile profile_; MockVolumeManagerObsever observer_; SmbFsShare::MounterCreationCallback mounter_creation_callback_; std::unique_ptr<MockSmbFsMounter> mounter_ = std::make_unique<MockSmbFsMounter>(); MockSmbFsMounter* raw_mounter_ = mounter_.get(); }; TEST_F(SmbFsShareTest, Mount) { TestSmbFsImpl smbfs; mojo::Receiver<smbfs::mojom::SmbFs> smbfs_receiver(&smbfs); mojo::Remote<smbfs::mojom::SmbFsDelegate> delegate; SmbFsShare share(&profile_, SmbUrl(kSharePath), kDisplayName, {}); share.SetMounterCreationCallbackForTest(mounter_creation_callback_); EXPECT_CALL(*raw_mounter_, Mount(_)) .WillOnce([this, &share, &smbfs_receiver, &delegate](smbfs::SmbFsMounter::DoneCallback callback) { std::move(callback).Run( smbfs::mojom::MountError::kOk, CreateSmbFsHost(&share, &smbfs_receiver, &delegate)); }); EXPECT_CALL( observer_, OnVolumeMounted( chromeos::MOUNT_ERROR_NONE, AllOf(Property(&file_manager::Volume::type, file_manager::VOLUME_TYPE_SMB), Property(&file_manager::Volume::mount_path, base::FilePath(kMountPath)), Property(&file_manager::Volume::volume_label, kDisplayName)))) .Times(1); EXPECT_CALL(observer_, OnVolumeUnmounted( chromeos::MOUNT_ERROR_NONE, AllOf(Property(&file_manager::Volume::type, file_manager::VOLUME_TYPE_SMB), Property(&file_manager::Volume::mount_path, base::FilePath(kMountPath))))) .Times(1); base::RunLoop run_loop; share.Mount(base::BindLambdaForTesting([&run_loop](SmbMountResult result) { EXPECT_EQ(result, SmbMountResult::kSuccess); run_loop.Quit(); })); run_loop.Run(); EXPECT_TRUE(share.IsMounted()); EXPECT_EQ(share.share_url().ToString(), kSharePath); EXPECT_EQ(share.mount_path(), base::FilePath(kMountPath)); storage::ExternalMountPoints* const mount_points = storage::ExternalMountPoints::GetSystemInstance(); base::FilePath virtual_path; EXPECT_TRUE(mount_points->GetVirtualPath( base::FilePath(kMountPath).Append(kFileName), &virtual_path)); } TEST_F(SmbFsShareTest, MountFailure) { EXPECT_CALL(*raw_mounter_, Mount(_)) .WillOnce([](smbfs::SmbFsMounter::DoneCallback callback) { std::move(callback).Run(smbfs::mojom::MountError::kTimeout, nullptr); }); EXPECT_CALL(observer_, OnVolumeMounted(chromeos::MOUNT_ERROR_NONE, _)) .Times(0); EXPECT_CALL(observer_, OnVolumeUnmounted(chromeos::MOUNT_ERROR_NONE, _)) .Times(0); SmbFsShare share(&profile_, SmbUrl(kSharePath), kDisplayName, {}); share.SetMounterCreationCallbackForTest(mounter_creation_callback_); base::RunLoop run_loop; share.Mount(base::BindLambdaForTesting([&run_loop](SmbMountResult result) { EXPECT_EQ(result, SmbMountResult::kAborted); run_loop.Quit(); })); run_loop.Run(); EXPECT_FALSE(share.IsMounted()); EXPECT_EQ(share.share_url().ToString(), kSharePath); EXPECT_EQ(share.mount_path(), base::FilePath()); } TEST_F(SmbFsShareTest, UnmountOnDisconnect) { TestSmbFsImpl smbfs; mojo::Receiver<smbfs::mojom::SmbFs> smbfs_receiver(&smbfs); mojo::Remote<smbfs::mojom::SmbFsDelegate> delegate; SmbFsShare share(&profile_, SmbUrl(kSharePath), kDisplayName, {}); share.SetMounterCreationCallbackForTest(mounter_creation_callback_); EXPECT_CALL(*raw_mounter_, Mount(_)) .WillOnce([this, &share, &smbfs_receiver, &delegate](smbfs::SmbFsMounter::DoneCallback callback) { std::move(callback).Run( smbfs::mojom::MountError::kOk, CreateSmbFsHost(&share, &smbfs_receiver, &delegate)); }); EXPECT_CALL( observer_, OnVolumeMounted( chromeos::MOUNT_ERROR_NONE, AllOf(Property(&file_manager::Volume::type, file_manager::VOLUME_TYPE_SMB), Property(&file_manager::Volume::mount_path, base::FilePath(kMountPath)), Property(&file_manager::Volume::volume_label, kDisplayName)))) .Times(1); base::RunLoop run_loop; EXPECT_CALL(observer_, OnVolumeUnmounted( chromeos::MOUNT_ERROR_NONE, AllOf(Property(&file_manager::Volume::type, file_manager::VOLUME_TYPE_SMB), Property(&file_manager::Volume::mount_path, base::FilePath(kMountPath))))) .WillOnce(base::test::RunClosure(run_loop.QuitClosure())); share.Mount( base::BindLambdaForTesting([&smbfs_receiver](SmbMountResult result) { EXPECT_EQ(result, SmbMountResult::kSuccess); // Disconnect the Mojo service which should trigger the unmount. smbfs_receiver.reset(); })); run_loop.Run(); } TEST_F(SmbFsShareTest, DisallowCredentialsDialogByDefault) { TestSmbFsImpl smbfs; mojo::Receiver<smbfs::mojom::SmbFs> smbfs_receiver(&smbfs); mojo::Remote<smbfs::mojom::SmbFsDelegate> delegate; SmbFsShare share(&profile_, SmbUrl(kSharePath), kDisplayName, {}); share.SetMounterCreationCallbackForTest(mounter_creation_callback_); EXPECT_CALL(*raw_mounter_, Mount(_)) .WillOnce([this, &share, &smbfs_receiver, &delegate](smbfs::SmbFsMounter::DoneCallback callback) { std::move(callback).Run( smbfs::mojom::MountError::kOk, CreateSmbFsHost(&share, &smbfs_receiver, &delegate)); }); EXPECT_CALL(observer_, OnVolumeMounted(chromeos::MOUNT_ERROR_NONE, _)) .Times(1); EXPECT_CALL(observer_, OnVolumeUnmounted(chromeos::MOUNT_ERROR_NONE, _)) .Times(1); { base::RunLoop run_loop; share.Mount(base::BindLambdaForTesting([&run_loop](SmbMountResult result) { EXPECT_EQ(result, SmbMountResult::kSuccess); run_loop.Quit(); })); run_loop.Run(); } base::RunLoop run_loop; delegate->RequestCredentials(base::BindLambdaForTesting( [&run_loop](smbfs::mojom::CredentialsPtr creds) { EXPECT_FALSE(creds); run_loop.Quit(); })); run_loop.Run(); } TEST_F(SmbFsShareTest, DisallowCredentialsDialogAfterTimeout) { TestSmbFsImpl smbfs; mojo::Receiver<smbfs::mojom::SmbFs> smbfs_receiver(&smbfs); mojo::Remote<smbfs::mojom::SmbFsDelegate> delegate; SmbFsShare share(&profile_, SmbUrl(kSharePath), kDisplayName, {}); share.SetMounterCreationCallbackForTest(mounter_creation_callback_); EXPECT_CALL(*raw_mounter_, Mount(_)) .WillOnce([this, &share, &smbfs_receiver, &delegate](smbfs::SmbFsMounter::DoneCallback callback) { std::move(callback).Run( smbfs::mojom::MountError::kOk, CreateSmbFsHost(&share, &smbfs_receiver, &delegate)); }); EXPECT_CALL(observer_, OnVolumeMounted(chromeos::MOUNT_ERROR_NONE, _)) .Times(1); EXPECT_CALL(observer_, OnVolumeUnmounted(chromeos::MOUNT_ERROR_NONE, _)) .Times(1); { base::RunLoop run_loop; share.Mount(base::BindLambdaForTesting([&run_loop](SmbMountResult result) { EXPECT_EQ(result, SmbMountResult::kSuccess); run_loop.Quit(); })); run_loop.Run(); } share.AllowCredentialsRequest(); // Fast-forward time for the allow state to timeout. The timeout is 5 seconds, // so moving forward by 6 will ensure the timeout runs. task_environment_.FastForwardBy(base::TimeDelta::FromSeconds(6)); base::RunLoop run_loop; delegate->RequestCredentials(base::BindLambdaForTesting( [&run_loop](smbfs::mojom::CredentialsPtr creds) { EXPECT_FALSE(creds); run_loop.Quit(); })); run_loop.Run(); } } // namespace } // namespace smb_client } // namespace chromeos
37.342342
80
0.685002
sarang-apps
e571e48132178154c38b7965efe5a0948d4a8c28
3,083
cpp
C++
LibFoundation/Intersection/Wm4IntrRay3Capsule3.cpp
wjezxujian/WildMagic4
249a17f8c447cf57c6283408e01009039810206a
[ "BSL-1.0" ]
3
2021-08-02T04:03:03.000Z
2022-01-04T07:31:20.000Z
LibFoundation/Intersection/Wm4IntrRay3Capsule3.cpp
wjezxujian/WildMagic4
249a17f8c447cf57c6283408e01009039810206a
[ "BSL-1.0" ]
null
null
null
LibFoundation/Intersection/Wm4IntrRay3Capsule3.cpp
wjezxujian/WildMagic4
249a17f8c447cf57c6283408e01009039810206a
[ "BSL-1.0" ]
5
2019-10-13T02:44:19.000Z
2021-08-02T04:03:10.000Z
// Geometric Tools, Inc. // http://www.geometrictools.com // Copyright (c) 1998-2006. All Rights Reserved // // The Wild Magic Version 4 Foundation Library source code is supplied // under the terms of the license agreement // http://www.geometrictools.com/License/Wm4FoundationLicense.pdf // and may not be copied or disclosed except in accordance with the terms // of that agreement. #include "Wm4FoundationPCH.h" #include "Wm4IntrRay3Capsule3.h" #include "Wm4DistRay3Segment3.h" #include "Wm4IntrLine3Capsule3.h" namespace Wm4 { //---------------------------------------------------------------------------- template <class Real> IntrRay3Capsule3<Real>::IntrRay3Capsule3 (const Ray3<Real>& rkRay, const Capsule3<Real>& rkCapsule) : m_rkRay(rkRay), m_rkCapsule(rkCapsule) { } //---------------------------------------------------------------------------- template <class Real> const Ray3<Real>& IntrRay3Capsule3<Real>::GetRay () const { return m_rkRay; } //---------------------------------------------------------------------------- template <class Real> const Capsule3<Real>& IntrRay3Capsule3<Real>::GetCapsule () const { return m_rkCapsule; } //---------------------------------------------------------------------------- template <class Real> bool IntrRay3Capsule3<Real>::Test () { Real fDist = DistRay3Segment3<Real>(m_rkRay,m_rkCapsule.Segment).Get(); return fDist <= m_rkCapsule.Radius; } //---------------------------------------------------------------------------- template <class Real> bool IntrRay3Capsule3<Real>::Find () { Real afT[2]; int iQuantity = IntrLine3Capsule3<Real>::Find(m_rkRay.Origin, m_rkRay.Direction,m_rkCapsule,afT); m_iQuantity = 0; for (int i = 0; i < iQuantity; i++) { if (afT[i] >= (Real)0.0) { m_akPoint[m_iQuantity++] = m_rkRay.Origin + afT[i]*m_rkRay.Direction; } } if (m_iQuantity == 2) { m_iIntersectionType = IT_SEGMENT; } else if (m_iQuantity == 1) { m_iIntersectionType = IT_POINT; } else { m_iIntersectionType = IT_EMPTY; } return m_iIntersectionType != IT_EMPTY; } //---------------------------------------------------------------------------- template <class Real> int IntrRay3Capsule3<Real>::GetQuantity () const { return m_iQuantity; } //---------------------------------------------------------------------------- template <class Real> const Vector3<Real>& IntrRay3Capsule3<Real>::GetPoint (int i) const { assert(0 <= i && i < m_iQuantity); return m_akPoint[i]; } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // explicit instantiation //---------------------------------------------------------------------------- template WM4_FOUNDATION_ITEM class IntrRay3Capsule3<float>; template WM4_FOUNDATION_ITEM class IntrRay3Capsule3<double>; //---------------------------------------------------------------------------- }
29.644231
78
0.492702
wjezxujian
e5737e84d7801be09dc45c044267c7bb91c9edbf
410
cpp
C++
src/CPP/7zip/Compress/CopyRegister.cpp
playback-sports/PLzmaSDK
f1f4807e2f797a14cfdb6ad81833385a06c8338d
[ "MIT" ]
33
2020-09-01T20:11:50.000Z
2022-03-29T01:20:43.000Z
src/CPP/7zip/Compress/CopyRegister.cpp
playback-sports/PLzmaSDK
f1f4807e2f797a14cfdb6ad81833385a06c8338d
[ "MIT" ]
13
2021-01-20T14:00:18.000Z
2022-03-24T08:31:47.000Z
src/CPP/7zip/Compress/CopyRegister.cpp
playback-sports/PLzmaSDK
f1f4807e2f797a14cfdb6ad81833385a06c8338d
[ "MIT" ]
9
2021-01-29T14:51:41.000Z
2022-02-21T13:38:31.000Z
// CopyRegister.cpp #include "StdAfx.h" #include "../Common/RegisterCodec.h" #include "CopyCoder.h" namespace NCompress { REGISTER_CODEC_CREATE(CreateCodec, CCopyCoder()) REGISTER_CODEC_2(Copy, CreateCodec, CreateCodec, 0, "Copy") } #if defined(LIBPLZMA_USING_REGISTRATORS) uint64_t plzma_registrator_9(void) { return static_cast<uint64_t>(NCompress::g_CodecInfo.Id); } #endif
18.636364
61
0.729268
playback-sports
e57578e36cfc567cfe4c3b042ab10c0d043ec0f1
15,553
cpp
C++
test/reduce/merge_blocks_test.cpp
danginsburg/SPIRV-Tools
37861ac106027220fa327bd088d1635c352fb5f0
[ "Apache-2.0" ]
9
2016-05-25T12:25:50.000Z
2020-11-30T13:40:13.000Z
test/reduce/merge_blocks_test.cpp
danginsburg/SPIRV-Tools
37861ac106027220fa327bd088d1635c352fb5f0
[ "Apache-2.0" ]
null
null
null
test/reduce/merge_blocks_test.cpp
danginsburg/SPIRV-Tools
37861ac106027220fa327bd088d1635c352fb5f0
[ "Apache-2.0" ]
3
2018-02-25T06:10:31.000Z
2019-09-28T15:55:36.000Z
// Copyright (c) 2019 Google LLC // // 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 "reduce_test_util.h" #include "source/opt/build_module.h" #include "source/reduce/merge_blocks_reduction_opportunity_finder.h" #include "source/reduce/reduction_opportunity.h" namespace spvtools { namespace reduce { namespace { TEST(MergeBlocksReductionPassTest, BasicCheck) { std::string shader = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %10 = OpConstant %6 2 %11 = OpConstant %6 3 %12 = OpConstant %6 4 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function OpBranch %13 %13 = OpLabel OpStore %8 %9 OpBranch %14 %14 = OpLabel OpStore %8 %10 OpBranch %15 %15 = OpLabel OpStore %8 %11 OpBranch %16 %16 = OpLabel OpStore %8 %12 OpBranch %17 %17 = OpLabel OpReturn OpFunctionEnd )"; const auto env = SPV_ENV_UNIVERSAL_1_3; const auto consumer = nullptr; const auto context = BuildModule(env, consumer, shader, kReduceAssembleOption); const auto ops = MergeBlocksReductionOpportunityFinder().GetAvailableOpportunities( context.get()); ASSERT_EQ(5, ops.size()); // Try order 3, 0, 2, 4, 1 ASSERT_TRUE(ops[3]->PreconditionHolds()); ops[3]->TryToApply(); std::string after_op_3 = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %10 = OpConstant %6 2 %11 = OpConstant %6 3 %12 = OpConstant %6 4 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function OpBranch %13 %13 = OpLabel OpStore %8 %9 OpBranch %14 %14 = OpLabel OpStore %8 %10 OpBranch %15 %15 = OpLabel OpStore %8 %11 OpStore %8 %12 OpBranch %17 %17 = OpLabel OpReturn OpFunctionEnd )"; CheckEqual(env, after_op_3, context.get()); ASSERT_TRUE(ops[0]->PreconditionHolds()); ops[0]->TryToApply(); std::string after_op_0 = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %10 = OpConstant %6 2 %11 = OpConstant %6 3 %12 = OpConstant %6 4 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function OpStore %8 %9 OpBranch %14 %14 = OpLabel OpStore %8 %10 OpBranch %15 %15 = OpLabel OpStore %8 %11 OpStore %8 %12 OpBranch %17 %17 = OpLabel OpReturn OpFunctionEnd )"; CheckEqual(env, after_op_0, context.get()); ASSERT_TRUE(ops[2]->PreconditionHolds()); ops[2]->TryToApply(); std::string after_op_2 = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %10 = OpConstant %6 2 %11 = OpConstant %6 3 %12 = OpConstant %6 4 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function OpStore %8 %9 OpBranch %14 %14 = OpLabel OpStore %8 %10 OpStore %8 %11 OpStore %8 %12 OpBranch %17 %17 = OpLabel OpReturn OpFunctionEnd )"; CheckEqual(env, after_op_2, context.get()); ASSERT_TRUE(ops[4]->PreconditionHolds()); ops[4]->TryToApply(); std::string after_op_4 = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %10 = OpConstant %6 2 %11 = OpConstant %6 3 %12 = OpConstant %6 4 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function OpStore %8 %9 OpBranch %14 %14 = OpLabel OpStore %8 %10 OpStore %8 %11 OpStore %8 %12 OpReturn OpFunctionEnd )"; CheckEqual(env, after_op_4, context.get()); ASSERT_TRUE(ops[1]->PreconditionHolds()); ops[1]->TryToApply(); std::string after_op_1 = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %10 = OpConstant %6 2 %11 = OpConstant %6 3 %12 = OpConstant %6 4 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function OpStore %8 %9 OpStore %8 %10 OpStore %8 %11 OpStore %8 %12 OpReturn OpFunctionEnd )"; CheckEqual(env, after_op_1, context.get()); } TEST(MergeBlocksReductionPassTest, Loops) { std::string shader = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" OpName %10 "i" OpName %29 "i" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %11 = OpConstant %6 0 %18 = OpConstant %6 10 %19 = OpTypeBool %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function %10 = OpVariable %7 Function %29 = OpVariable %7 Function OpStore %8 %9 OpBranch %45 %45 = OpLabel OpStore %10 %11 OpBranch %12 %12 = OpLabel OpLoopMerge %14 %15 None OpBranch %16 %16 = OpLabel %17 = OpLoad %6 %10 OpBranch %46 %46 = OpLabel %20 = OpSLessThan %19 %17 %18 OpBranchConditional %20 %13 %14 %13 = OpLabel %21 = OpLoad %6 %10 OpBranch %47 %47 = OpLabel %22 = OpLoad %6 %8 %23 = OpIAdd %6 %22 %21 OpStore %8 %23 %24 = OpLoad %6 %10 %25 = OpLoad %6 %8 %26 = OpIAdd %6 %25 %24 OpStore %8 %26 OpBranch %48 %48 = OpLabel OpBranch %15 %15 = OpLabel %27 = OpLoad %6 %10 %28 = OpIAdd %6 %27 %9 OpStore %10 %28 OpBranch %12 %14 = OpLabel OpStore %29 %11 OpBranch %49 %49 = OpLabel OpBranch %30 %30 = OpLabel OpLoopMerge %32 %33 None OpBranch %34 %34 = OpLabel %35 = OpLoad %6 %29 %36 = OpSLessThan %19 %35 %18 OpBranch %50 %50 = OpLabel OpBranchConditional %36 %31 %32 %31 = OpLabel %37 = OpLoad %6 %29 %38 = OpLoad %6 %8 %39 = OpIAdd %6 %38 %37 OpStore %8 %39 %40 = OpLoad %6 %29 %41 = OpLoad %6 %8 %42 = OpIAdd %6 %41 %40 OpStore %8 %42 OpBranch %33 %33 = OpLabel %43 = OpLoad %6 %29 %44 = OpIAdd %6 %43 %9 OpBranch %51 %51 = OpLabel OpStore %29 %44 OpBranch %30 %32 = OpLabel OpReturn OpFunctionEnd )"; const auto env = SPV_ENV_UNIVERSAL_1_3; const auto consumer = nullptr; const auto context = BuildModule(env, consumer, shader, kReduceAssembleOption); const auto ops = MergeBlocksReductionOpportunityFinder().GetAvailableOpportunities( context.get()); ASSERT_EQ(11, ops.size()); for (auto& ri : ops) { ASSERT_TRUE(ri->PreconditionHolds()); ri->TryToApply(); } std::string after = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" OpName %10 "i" OpName %29 "i" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %11 = OpConstant %6 0 %18 = OpConstant %6 10 %19 = OpTypeBool %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function %10 = OpVariable %7 Function %29 = OpVariable %7 Function OpStore %8 %9 OpStore %10 %11 OpBranch %12 %12 = OpLabel %17 = OpLoad %6 %10 %20 = OpSLessThan %19 %17 %18 OpLoopMerge %14 %13 None OpBranchConditional %20 %13 %14 %13 = OpLabel %21 = OpLoad %6 %10 %22 = OpLoad %6 %8 %23 = OpIAdd %6 %22 %21 OpStore %8 %23 %24 = OpLoad %6 %10 %25 = OpLoad %6 %8 %26 = OpIAdd %6 %25 %24 OpStore %8 %26 %27 = OpLoad %6 %10 %28 = OpIAdd %6 %27 %9 OpStore %10 %28 OpBranch %12 %14 = OpLabel OpStore %29 %11 OpBranch %30 %30 = OpLabel %35 = OpLoad %6 %29 %36 = OpSLessThan %19 %35 %18 OpLoopMerge %32 %31 None OpBranchConditional %36 %31 %32 %31 = OpLabel %37 = OpLoad %6 %29 %38 = OpLoad %6 %8 %39 = OpIAdd %6 %38 %37 OpStore %8 %39 %40 = OpLoad %6 %29 %41 = OpLoad %6 %8 %42 = OpIAdd %6 %41 %40 OpStore %8 %42 %43 = OpLoad %6 %29 %44 = OpIAdd %6 %43 %9 OpStore %29 %44 OpBranch %30 %32 = OpLabel OpReturn OpFunctionEnd )"; CheckEqual(env, after, context.get()); } TEST(MergeBlocksReductionPassTest, MergeWithOpPhi) { std::string shader = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" OpName %10 "y" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function %10 = OpVariable %7 Function OpStore %8 %9 %11 = OpLoad %6 %8 OpBranch %12 %12 = OpLabel %13 = OpPhi %6 %11 %5 OpStore %10 %13 OpReturn OpFunctionEnd )"; const auto env = SPV_ENV_UNIVERSAL_1_3; const auto consumer = nullptr; const auto context = BuildModule(env, consumer, shader, kReduceAssembleOption); const auto ops = MergeBlocksReductionOpportunityFinder().GetAvailableOpportunities( context.get()); ASSERT_EQ(1, ops.size()); ASSERT_TRUE(ops[0]->PreconditionHolds()); ops[0]->TryToApply(); std::string after = R"( OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %4 "main" OpExecutionMode %4 OriginUpperLeft OpSource ESSL 310 OpName %4 "main" OpName %8 "x" OpName %10 "y" %2 = OpTypeVoid %3 = OpTypeFunction %2 %6 = OpTypeInt 32 1 %7 = OpTypePointer Function %6 %9 = OpConstant %6 1 %4 = OpFunction %2 None %3 %5 = OpLabel %8 = OpVariable %7 Function %10 = OpVariable %7 Function OpStore %8 %9 %11 = OpLoad %6 %8 OpStore %10 %11 OpReturn OpFunctionEnd )"; CheckEqual(env, after, context.get()); } } // namespace } // namespace reduce } // namespace spvtools
30.258755
75
0.48923
danginsburg
e575b5ffc966abe5bdd67d94c90113033a1f860b
1,710
cpp
C++
Code/Engine/Animation/AnimationFrameTime.cpp
JuanluMorales/KRG
f3a11de469586a4ef0db835af4bc4589e6b70779
[ "MIT" ]
419
2022-01-27T19:37:43.000Z
2022-03-31T06:14:22.000Z
Code/Engine/Animation/AnimationFrameTime.cpp
jagt/KRG
ba20cd8798997b0450491b0cc04dc817c4a4bc76
[ "MIT" ]
2
2022-01-28T20:35:33.000Z
2022-03-13T17:42:52.000Z
Code/Engine/Animation/AnimationFrameTime.cpp
jagt/KRG
ba20cd8798997b0450491b0cc04dc817c4a4bc76
[ "MIT" ]
20
2022-01-27T20:41:02.000Z
2022-03-26T16:16:57.000Z
#include "AnimationFrameTime.h" //------------------------------------------------------------------------- namespace KRG::Animation { FrameTime FrameTime::operator+( Percentage const& RHS ) const { FrameTime newTime = *this; int32 loopCount; Percentage newPercent = m_percentageThrough + RHS; newPercent.GetLoopCountAndNormalizedTime( loopCount, newTime.m_percentageThrough ); newTime.m_frameIndex += loopCount; return newTime; } FrameTime& FrameTime::operator+=( Percentage const& RHS ) { int32 loopCount; Percentage newPercent = m_percentageThrough + RHS; newPercent.GetLoopCountAndNormalizedTime( loopCount, m_percentageThrough ); m_frameIndex += loopCount; return *this; } FrameTime FrameTime::operator-( Percentage const& RHS ) const { FrameTime newTime = *this; int32 loopCount; Percentage newPercent = m_percentageThrough - RHS; newPercent.GetLoopCountAndNormalizedTime( loopCount, newTime.m_percentageThrough ); if ( loopCount < 0 ) { newTime.m_frameIndex -= loopCount; newTime.m_percentageThrough.Invert(); } return newTime; } FrameTime& FrameTime::operator-=( Percentage const& RHS ) { int32 loopCount; Percentage newPercent = m_percentageThrough - RHS; newPercent.GetLoopCountAndNormalizedTime( loopCount, m_percentageThrough ); if ( loopCount < 0 ) { m_frameIndex -= loopCount; m_percentageThrough.Invert(); } return *this; } }
30
92
0.587135
JuanluMorales
e575bb3b784da7fd45c6e1223965737cb96e3085
1,653
cpp
C++
solutions/goat-rope.cpp
techchrism/kattis-problems
4d5b761fefdee04e4396fc09f0ee3578fc44a76f
[ "MIT" ]
null
null
null
solutions/goat-rope.cpp
techchrism/kattis-problems
4d5b761fefdee04e4396fc09f0ee3578fc44a76f
[ "MIT" ]
null
null
null
solutions/goat-rope.cpp
techchrism/kattis-problems
4d5b761fefdee04e4396fc09f0ee3578fc44a76f
[ "MIT" ]
null
null
null
// Problem https://open.kattis.com/problems/goatrope #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <queue> #include <deque> #include <bitset> #include <iterator> #include <list> #include <stack> #include <map> #include <set> #include <functional> #include <numeric> #include <utility> #include <limits> #include <ctime> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <cassert> using namespace std; #define MP make_pair #define PB push_back #define INF (int)1e9 #define EPS 1e-9 #define PI 3.1415926535897932384626433832795 #define MOD 1000000007 typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<string> VS; typedef vector<PII> VII; typedef vector<VI> VVI; typedef map<int, int> MPII; typedef set<int> SETI; typedef multiset<int> MSETI; typedef long int int32; typedef unsigned long int ul; typedef long long int ll; typedef unsigned long long int ull; int pHyp(double x, double y) { cout<<fixed<<sqrt((x*x)+(y*y)); return 0; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); double x,y,xMin,yMin,xMax,yMax; cin>>x>>y>>xMin>>yMin>>xMax>>yMax; if(x>xMax){ if(y>yMax) return pHyp(x-xMax,y-yMax); if(y<yMin) return pHyp(x-xMax,y-yMin); cout<<fixed<<x-xMax; }else if(x<xMin){ if(y>yMax) return pHyp(x-xMin,y-yMax); if(y<yMin) return pHyp(x-xMin,y-yMin); cout<<fixed<<xMin-x; }else{ if(y>yMax){ cout<<fixed<<y-yMax; }else{ cout<<fixed<<yMin-y; } } return 0; }
20.6625
52
0.656382
techchrism
ec78cb415a2829b108d2dec07e7f4b0358d90020
1,277
cpp
C++
src/board/i2c/multiplexers/tests/multiplexer_tests.cpp
MelbourneSpaceProgram/msp_flight_software_public
de290a2e7181ac43af1232b2ffbca2db8ec4ecd2
[ "MIT" ]
10
2018-04-28T04:44:56.000Z
2022-02-06T21:12:13.000Z
src/board/i2c/multiplexers/tests/multiplexer_tests.cpp
MelbourneSpaceProgram/msp_flight_software_public
de290a2e7181ac43af1232b2ffbca2db8ec4ecd2
[ "MIT" ]
null
null
null
src/board/i2c/multiplexers/tests/multiplexer_tests.cpp
MelbourneSpaceProgram/msp_flight_software_public
de290a2e7181ac43af1232b2ffbca2db8ec4ecd2
[ "MIT" ]
3
2019-02-16T03:22:26.000Z
2022-02-03T14:54:22.000Z
#include <CppUTest/TestHarness.h> #include <src/board/board.h> #include <src/board/i2c/i2c.h> #include <src/board/i2c/multiplexers/i2c_multiplexer.h> #include <src/config/unit_tests.h> #include <src/sensors/i2c_sensors/mcp9808.h> #include <src/sensors/i2c_sensors/measurables/temperature_measurable.h> #include <src/util/data_types.h> #include <xdc/runtime/Log.h> static constexpr byte kMultiplexerAddress = 0x76; static constexpr byte kTempSensorAddress = 0x1A; TEST_GROUP(Multiplexer) { void setup() { if (!kI2cAvailable) { TEST_EXIT; } }; }; TEST(Multiplexer, TestMultiplexer) { I2c bus(I2C_BUS_A); I2cMultiplexer multiplexer(&bus, kMultiplexerAddress); Mcp9808 temp_sensor(&bus, kTempSensorAddress); Mcp9808 temp_sensor2(&bus, kTempSensorAddress); TemperatureMeasurable accessible_temp(&temp_sensor); TemperatureMeasurable inaccessible_temp(&temp_sensor2); multiplexer.OpenChannel(I2cMultiplexer::kMuxChannel0); CHECK(accessible_temp.TakeReading()); multiplexer.CloseAllChannels(); // Since all channels are closed the reading should fail Log_info0("An I2c measurable failed read message will be printed. This is expected and okay."); CHECK_FALSE(inaccessible_temp.TakeReading()); }
32.74359
99
0.749413
MelbourneSpaceProgram
ec7ac649a2c32d3c679a5de985cccde3fdd44fab
3,730
hpp
C++
include/ReverseAssignment.hpp
AristiPap/kNN-and-Clustering-on-Time-Series-and-Curves
4f510e69c65c4c2e6a994eb267c08289acd80727
[ "MIT" ]
16
2022-02-06T15:29:36.000Z
2022-02-18T09:11:35.000Z
include/ReverseAssignment.hpp
AristiPap/kNN-and-Clustering-on-Time-Series-and-Curves
4f510e69c65c4c2e6a994eb267c08289acd80727
[ "MIT" ]
null
null
null
include/ReverseAssignment.hpp
AristiPap/kNN-and-Clustering-on-Time-Series-and-Curves
4f510e69c65c4c2e6a994eb267c08289acd80727
[ "MIT" ]
1
2022-02-06T15:28:49.000Z
2022-02-06T15:28:49.000Z
#pragma once #include <set> #include <list> #include "GenericClusterSolver.hpp" // init radius is min(dist between centroids)/2 template<class CentroidT> double init_R(vector<CentroidT> &centroids) { double min_dist = numeric_limits<double>::max(); for (uint32_t i = 0; i < centroids.size(); i++) for (uint32_t j = i + 1; j < centroids.size(); j++) min_dist = min(min_dist, centroids[i].first.dist(centroids[j].first)); return min_dist/2.0; } template<class T, class CentroidT> void insert_into_cluster(T *p, double dist, int centroid_id, vector<CentroidT> &centroids, uint32_t &points_changed, set<T *>& unassigned_points) { assert(centroid_id < centroids.size()); // get p's previous and under-check cluster-centroid CentroidT *old_c = p->getCluster() >= 0 ? &(centroids[p->getCluster()]) : nullptr; CentroidT *new_c = &(centroids[centroid_id]); // check if the point is marked // if P is marked, // then we need to decide in which cluster to assign it. // Assign it to the new cluster only if the distance of new centroid is smaller than the assigned one // otherwise we will let the point at its assigned cluster if (p->getMarked() && old_c != nullptr && dist - old_c->second[p] >= 0) { new_c = old_c; } // do something only in case the previous and the newly assigned clusters are different if (new_c != old_c) { points_changed++; // in case its the first point assignment for this loop then assign it if (p->getMarked() == false) unassigned_points.erase(p); if (old_c != nullptr) old_c->second.erase(p); new_c->second[p] = dist; p->setMarked(true); p->setCluster(centroid_id); } } // Actual implementation of reverse assignment utilizing a Nearest Neighbour Solver class (either LSH or Hypercube will do). template<class T, class CentroidT, class SolverT> uint32_t __reverse_assignment__(vector<CentroidT> &centroids, list<T *> &dataset, SolverT &solver, double R_max, set<T *>& unassigned_points) { static bool start = true; // insert all items in an unassigned table if (start) { unassigned_points.insert(dataset.begin(), dataset.end()); start = false; } // initialize R for range search static double R = init_R(centroids); // number of points that changed cluster uint32_t points_changes = 0; // perform range search with q-point each one of the centroids for (auto i = 0; i < centroids.size(); i++) { // perform the range query, with center the current centroid list<pair<T *, double>> *in_range = solver.nearestNeighbours_w_rangeSearch(centroids[i].first, R); // insert all the neighbours in the centroid for (auto neighbour_pair : *in_range) { T *p = neighbour_pair.first; double dist = neighbour_pair.second; // insert the point into c. If p was in a different centroid before change the changes counter accordingly insert_into_cluster(p, dist, i, centroids, points_changes, unassigned_points); } delete in_range; // free the list, but jsut the list not the inner pointers } // at the end of the loop double the search radius R *= 2.0; if (R - R_max > 0) { for (auto p = unassigned_points.begin(); p != unassigned_points.end(); p++) { insert_in_closest_center(*p, centroids); } unassigned_points.clear(); } #ifdef VERBOSE cout << "points_changes: " << points_changes << ", unassigned points: " << unassigned_points.size() << ", R = " << R << endl; #endif return points_changes + unassigned_points.size(); }
39.680851
147
0.652547
AristiPap
ec7d3b0ba9ee3d08fe0df60cba1017060940634f
7,028
cpp
C++
plugins/archvis/src/ScaleModel.cpp
azuki-monster/megamol
f5d75ae5630f9a71a7fbf81624bfd4f6b253c655
[ "BSD-3-Clause" ]
2
2020-10-16T10:15:37.000Z
2021-01-21T13:06:00.000Z
plugins/archvis/src/ScaleModel.cpp
azuki-monster/megamol
f5d75ae5630f9a71a7fbf81624bfd4f6b253c655
[ "BSD-3-Clause" ]
null
null
null
plugins/archvis/src/ScaleModel.cpp
azuki-monster/megamol
f5d75ae5630f9a71a7fbf81624bfd4f6b253c655
[ "BSD-3-Clause" ]
1
2021-01-28T01:19:54.000Z
2021-01-28T01:19:54.000Z
/* * ScaleModel.cpp * * Copyright (C) 2018 by Universitaet Stuttgart (VISUS). * All rights reserved. */ #include "ScaleModel.h" using namespace megamol::archvis; ScaleModel::ScaleModel( std::vector<Vec3> node_positions, std::vector<std::tuple<int, int, int, int, int>> elements, std::vector<int> input_elements) : m_node_positions(node_positions), m_node_displacements(node_positions.size(), Vec3(0.0f,0.0f,0.0f)), m_input_elements(input_elements) { for (auto& element : elements) { int type = std::get<0>(element); switch (type) { case 0: m_elements.push_back( Element( ElementType::STRUT, std::tuple<int, int>(std::get<1>(element), std::get<2>(element)), 0.0f) ); break; case 1: m_elements.push_back( Element( ElementType::DIAGONAL, std::tuple<int, int>(std::get<1>(element), std::get<2>(element)), 0.0f) ); break; case 2: m_elements.push_back( Element( ElementType::FLOOR, std::tuple<int, int, int, int>(std::get<1>(element), std::get<2>(element), std::get<3>(element), std::get<4>(element)), 0.0f) ); break; default: break; } } } void ScaleModel::setModelTransform(Mat4x4 transform) { m_model_transform = transform; } void ScaleModel::updateNodeDisplacements(std::vector<Vec3> const& displacements) { m_node_displacements = displacements; } void ScaleModel::updateElementForces(std::vector<float> const& forces) { //TODO check forces count matches input element count for (int i=0; i<forces.size(); ++i) { m_elements[m_input_elements[i]].setForce(forces[i]); } } int ScaleModel::getNodeCount() { return m_node_positions.size(); } int ScaleModel::getElementCount() { return m_elements.size(); } int ScaleModel::getInputElementCount() { return m_input_elements.size(); } ScaleModel::ElementType ScaleModel::getElementType(int element_idx) { return m_elements[element_idx].getType(); } float ScaleModel::getElementForce(int element_idx) { return m_elements[element_idx].getForce(); } ScaleModel::Mat4x4 ScaleModel::getElementTransform(int element_idx) { return m_model_transform * m_elements[element_idx].computeTransform(m_node_positions, m_node_displacements); } ScaleModel::Vec3 ScaleModel::getElementCenter(int element_idx) { Vec4 center = Vec4(m_elements[element_idx].computeCenter(m_node_positions, m_node_displacements)); center.SetW(1.0f); return Vec3(m_model_transform * center); } std::vector<ScaleModel::Vec3> const& megamol::archvis::ScaleModel::accessNodePositions() { return m_node_positions; } std::vector<ScaleModel::Vec3> const& megamol::archvis::ScaleModel::accessNodeDisplacements() { return m_node_displacements; } ScaleModel::Mat4x4 ScaleModel::computeElementTransform(std::tuple<int, int> node_indices, std::vector<Vec3> const& node_positions, std::vector<Vec3> const& node_displacements) { Vec3 src_position = node_positions[std::get<0>(node_indices)]; Vec3 tgt_position = node_positions[std::get<1>(node_indices)]; Vec3 src_displaced = src_position + node_displacements[std::get<0>(node_indices)]; Vec3 tgt_displaced = tgt_position + node_displacements[std::get<1>(node_indices)]; // compute element rotation Mat4x4 object_rotation; Vec3 diag_vector = tgt_displaced - src_displaced; diag_vector.Normalise(); Vec3 up_vector(0.0f, 1.0f, 0.0f); Vec3 rot_vector = up_vector.Cross(diag_vector); rot_vector.Normalise(); Quat rotation(std::acos(up_vector.Dot(diag_vector)), rot_vector); object_rotation = rotation; // compute element scale Mat4x4 object_scale; float base_distance = (tgt_position - src_position).Length(); float displaced_distance = (tgt_displaced - src_displaced).Length(); object_scale.SetAt(1, 1, displaced_distance / base_distance); // compute element offset Mat4x4 object_translation; object_translation.SetAt(0, 3, src_displaced.X() ); object_translation.SetAt(1, 3, src_displaced.Y() ); object_translation.SetAt(2, 3, src_displaced.Z() ); return (object_translation * object_rotation * object_scale); } ScaleModel::Mat4x4 ScaleModel::computeElementTransform(std::tuple<int, int, int, int> node_indices, std::vector<Vec3> const& node_positions, std::vector<Vec3> const& node_displacements) { Vec3 origin_displaced = node_positions[std::get<0>(node_indices)] + node_displacements[std::get<0>(node_indices)]; Vec3 corner_x_displaced = node_positions[std::get<1>(node_indices)] + node_displacements[std::get<1>(node_indices)]; Vec3 corner_z_displaced = node_positions[std::get<3>(node_indices)] + node_displacements[std::get<3>(node_indices)]; Vec3 corner_xz_displaced = node_positions[std::get<2>(node_indices)] + node_displacements[std::get<2>(node_indices)]; // compute coordinate frame of planar surface given by four points Vec3 x_axis = corner_x_displaced - origin_displaced; x_axis.Normalise(); Vec3 z_axis = corner_z_displaced - origin_displaced; z_axis.Normalise(); Vec3 y_axis = -x_axis.Cross(z_axis); y_axis.Normalise(); Mat4x4 rotational_transform; rotational_transform.SetAt(0, 0, x_axis.X()); rotational_transform.SetAt(1, 0, x_axis.Y()); rotational_transform.SetAt(2, 0, x_axis.Z()); rotational_transform.SetAt(0, 1, y_axis.X()); rotational_transform.SetAt(1, 1, y_axis.Y()); rotational_transform.SetAt(2, 1, y_axis.Z()); rotational_transform.SetAt(0, 2, z_axis.X()); rotational_transform.SetAt(1, 2, z_axis.Y()); rotational_transform.SetAt(2, 2, z_axis.Z()); rotational_transform.SetAt(3, 3, 1.0f); // compute element offset Mat4x4 object_translation; object_translation.SetAt(0, 3, origin_displaced.X()); object_translation.SetAt(1, 3, origin_displaced.Y()); object_translation.SetAt(2, 3, origin_displaced.Z()); return (object_translation * rotational_transform); } ScaleModel::Vec3 ScaleModel::computeElementCenter(std::tuple<int, int> node_indices, std::vector<Vec3> const& node_positions, std::vector<Vec3> const& node_displacements) { Vec3 src_position = node_positions[std::get<0>(node_indices)]; Vec3 tgt_position = node_positions[std::get<1>(node_indices)]; Vec3 src_displaced = src_position + node_displacements[std::get<0>(node_indices)]; Vec3 tgt_displaced = tgt_position + node_displacements[std::get<1>(node_indices)]; return (src_displaced + tgt_displaced)*0.5f; } ScaleModel::Vec3 ScaleModel::computeElementCenter(std::tuple<int, int, int, int> node_indices, std::vector<Vec3> const& node_positions, std::vector<Vec3> const& node_displacements) { Vec3 origin_displaced = node_positions[std::get<0>(node_indices)] + node_displacements[std::get<0>(node_indices)]; Vec3 corner_x_displaced = node_positions[std::get<1>(node_indices)] + node_displacements[std::get<1>(node_indices)]; Vec3 corner_z_displaced = node_positions[std::get<3>(node_indices)] + node_displacements[std::get<3>(node_indices)]; Vec3 corner_xz_displaced = node_positions[std::get<2>(node_indices)] + node_displacements[std::get<2>(node_indices)]; return (origin_displaced + corner_x_displaced + corner_z_displaced + corner_xz_displaced)*0.25f; }
31.657658
124
0.749858
azuki-monster
ec889a5ba359735240cb4e1a1d00e18c7354f0fb
244
cpp
C++
Engine/Source/Editor/PIEPreviewDeviceProfileSelector/Private/PIEPreviewDeviceSpecification.cpp
windystrife/UnrealEngine_NVIDIAGameWork
b50e6338a7c5b26374d66306ebc7807541ff815e
[ "MIT" ]
1
2022-01-29T18:36:12.000Z
2022-01-29T18:36:12.000Z
Engine/Source/Editor/PIEPreviewDeviceProfileSelector/Private/PIEPreviewDeviceSpecification.cpp
windystrife/UnrealEngine_NVIDIAGameWork
b50e6338a7c5b26374d66306ebc7807541ff815e
[ "MIT" ]
null
null
null
Engine/Source/Editor/PIEPreviewDeviceProfileSelector/Private/PIEPreviewDeviceSpecification.cpp
windystrife/UnrealEngine_NVIDIAGameWork
b50e6338a7c5b26374d66306ebc7807541ff815e
[ "MIT" ]
null
null
null
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "PIEPreviewDeviceSpecification.h" UPIEPreviewDeviceSpecification::UPIEPreviewDeviceSpecification(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { }
34.857143
107
0.840164
windystrife
ec8dbf21301fd11a54a4ec8946a7ecf45c18a269
2,507
hpp
C++
src/ast.hpp
camila314/Broma
ceb3aeb853271bf0c1766d17c32c592f8c7c8c21
[ "MIT" ]
1
2022-01-11T18:53:23.000Z
2022-01-11T18:53:23.000Z
src/ast.hpp
camila314/Broma
ceb3aeb853271bf0c1766d17c32c592f8c7c8c21
[ "MIT" ]
1
2022-01-11T20:50:13.000Z
2022-01-11T20:50:13.000Z
src/ast.hpp
CacaoSDK/Broma
ceb3aeb853271bf0c1766d17c32c592f8c7c8c21
[ "MIT" ]
2
2022-01-11T20:32:21.000Z
2022-01-14T17:42:25.000Z
#pragma once #include <string> #include <vector> #include <unordered_map> #include <algorithm> #include <iostream> using std::vector, std::unordered_map, std::string, std::is_same_v, std::cout, std::cin, std::endl; struct ClassDefinition; enum FieldType { kFunction=0, kMember=1, kInline=2 }; struct ClassField { FieldType field_type; ClassDefinition* parent_class; }; enum FunctionType { kVirtualFunction=0, kStaticFunction=1, kRegularFunction=2, //kStructorCutoff=10, // used for comparisons kConstructor=11, kDestructor=12 }; struct Function : ClassField { Function() : is_const(), return_type(), name(), args(), binds(), android_mangle(), index() {} bool is_const; FunctionType function_type; string return_type; string name; vector<string> args; string binds[3]; // mac, windows, ios (android has all symbols included). No binding = no string. Stored as a string because no math is done on it string android_mangle; // only sometimes matters. empty if irrelevant size_t index; }; struct Member : ClassField { Member() : type(), name(), hardcode(), hardcodes(), count() {} string type; string name; bool hardcode; string hardcodes[3]; // mac/ios, windows, android size_t count; // for arrays }; struct Inline : ClassField { Inline() : inlined() {} string inlined; }; struct Root; struct ClassDefinition { string name; vector<string> superclasses; vector<Function> functions; vector<Member> members; vector<Inline> inlines; vector<ClassField*> in_order; void addSuperclass(string sclass) { if (std::find(superclasses.begin(), superclasses.end(), sclass) == superclasses.end()) { superclasses.push_back(sclass); } // intentional // else cacerr("Duplicate superclass %s for class %s\n", sclass.c_str(), name.c_str()); } template<typename T> void addField(T& field) { field.parent_class = this; if constexpr (is_same_v<Function, T>) { field.index = functions.size(); field.field_type = FieldType::kFunction; functions.push_back(field); } if constexpr (is_same_v<Member, T>) { field.field_type = FieldType::kMember; members.push_back(field); } if constexpr (is_same_v<Inline, T>) { field.field_type = FieldType::kInline; inlines.push_back(field); } } }; struct Root { unordered_map<string, ClassDefinition> classes; ClassDefinition& addClass(string name) { if (classes.find(name) == classes.end()) { classes[name] = ClassDefinition(); classes[name].name = name; } return classes[name]; } };
23.212963
147
0.708018
camila314
ec8fddd0f498c738de2bfc064e886c2cb5235326
2,304
cc
C++
src/Error.cc
walecome/seal
204b2dbad9f0bf3ac77f5e32173de39ef1fb81c1
[ "MIT" ]
1
2020-01-06T09:43:56.000Z
2020-01-06T09:43:56.000Z
src/Error.cc
walecome/seal
204b2dbad9f0bf3ac77f5e32173de39ef1fb81c1
[ "MIT" ]
null
null
null
src/Error.cc
walecome/seal
204b2dbad9f0bf3ac77f5e32173de39ef1fb81c1
[ "MIT" ]
null
null
null
#include <utility> #include "Error.hh" #include "ast/Type.hh" void error::syntax_error(const std::string_view err) { report_error(err); } void error::syntax(TokenType expected, Token got) { std::ostringstream oss {}; oss << "Invalid syntax, expected " << token_names[expected]; oss << " got " << token_names[got.type]; report_error(oss.str()); } void error::syntax(const std::string &s, TokenBuffer &tokens) { std::ostringstream oss {}; oss << s << " " << tokens.dump() << std::endl; report_error(oss.str()); } void error::report_error(const std::string_view err, bool quit) { std::cout << Color::Modifier(Color::FG_RED) << err << Color::Modifier(Color::FG_DEFAULT) << std::endl; if (quit) exit(EXIT_FAILURE); } std::string line_text(SourceRef source_ref) { std::ostringstream oss {}; oss << "Line " << (source_ref.begin->row + 1) << " column " << (source_ref.begin->col + 1); return oss.str(); } void error::mismatched_type(const Type &a, const Type &b, SourceRef source_ref) { std::ostringstream oss {}; auto tokens = TokenBuffer::source_tokens(source_ref); oss << line_text(source_ref) << ": "; oss << "Mismatched types, got " << a.to_user_string() << " and " << b.to_user_string() << std::endl; oss << "\t" << tokens.as_source(); add_semantic_error(oss.str()); } void error::add_semantic_error(const std::string error) { semantic_errors.push_back(error); } void error::add_semantic_error(const std::string error_prefix, const Token &token) { std::ostringstream oss {}; oss << error_prefix << ": " << token.to_string(); add_semantic_error(oss.str()); } void error::add_semantic_error(const std::string error_prefix, SourceRef source_ref) { auto tokens = TokenBuffer::source_tokens(source_ref); std::ostringstream oss {}; oss << line_text(source_ref) << ": "; oss << error_prefix << std::endl; oss << "\t" << tokens.as_source(); add_semantic_error(oss.str()); } void error::report_semantic_errors() { if (semantic_errors.empty()) return; for (auto &error : semantic_errors) { report_error(error, false); } exit(EXIT_FAILURE); }
28.8
90
0.61849
walecome
ec9e2db9686565bd9f58b3a43512b0a2c281a845
1,559
cc
C++
source/common/formatter/substitution_format_string.cc
tgalkovskyi/envoy
9d702c125acde33933fc5d63818b1defe36b5cf3
[ "Apache-2.0" ]
3
2020-06-04T03:26:32.000Z
2020-06-04T03:26:45.000Z
source/common/formatter/substitution_format_string.cc
tgalkovskyi/envoy
9d702c125acde33933fc5d63818b1defe36b5cf3
[ "Apache-2.0" ]
8
2020-08-07T00:52:28.000Z
2020-09-24T22:11:43.000Z
source/common/formatter/substitution_format_string.cc
tgalkovskyi/envoy
9d702c125acde33933fc5d63818b1defe36b5cf3
[ "Apache-2.0" ]
3
2020-03-29T08:27:26.000Z
2022-02-17T14:12:22.000Z
#include "common/formatter/substitution_format_string.h" #include "common/formatter/substitution_formatter.h" namespace Envoy { namespace Formatter { namespace { absl::flat_hash_map<std::string, std::string> convertJsonFormatToMap(const ProtobufWkt::Struct& json_format) { absl::flat_hash_map<std::string, std::string> output; for (const auto& pair : json_format.fields()) { if (pair.second.kind_case() != ProtobufWkt::Value::kStringValue) { throw EnvoyException("Only string values are supported in the JSON access log format."); } output.emplace(pair.first, pair.second.string_value()); } return output; } } // namespace FormatterPtr SubstitutionFormatStringUtils::createJsonFormatter(const ProtobufWkt::Struct& struct_format, bool preserve_types) { auto json_format_map = convertJsonFormatToMap(struct_format); return std::make_unique<JsonFormatterImpl>(json_format_map, preserve_types); } FormatterPtr SubstitutionFormatStringUtils::fromProtoConfig( const envoy::config::core::v3::SubstitutionFormatString& config) { switch (config.format_case()) { case envoy::config::core::v3::SubstitutionFormatString::FormatCase::kTextFormat: return std::make_unique<FormatterImpl>(config.text_format()); case envoy::config::core::v3::SubstitutionFormatString::FormatCase::kJsonFormat: { return createJsonFormatter(config.json_format(), true); } default: NOT_REACHED_GCOVR_EXCL_LINE; } return nullptr; } } // namespace Formatter } // namespace Envoy
33.891304
94
0.74086
tgalkovskyi
ec9f2d36b59bbdfe5dd574b82b6aad36c372d195
38,633
cpp
C++
src/connection.cpp
spolitov/cassandra-cpp-driver
697c783f83e03cec8cd1881169d334dab42d311b
[ "Apache-2.0" ]
4
2020-02-21T00:15:30.000Z
2022-01-20T22:56:42.000Z
src/connection.cpp
spolitov/cassandra-cpp-driver
697c783f83e03cec8cd1881169d334dab42d311b
[ "Apache-2.0" ]
5
2020-10-22T16:53:03.000Z
2021-05-19T17:29:33.000Z
src/connection.cpp
spolitov/cassandra-cpp-driver
697c783f83e03cec8cd1881169d334dab42d311b
[ "Apache-2.0" ]
5
2019-11-12T07:40:24.000Z
2021-01-15T11:29:41.000Z
/* Copyright (c) DataStax, Inc. 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 "connection.hpp" #include "auth.hpp" #include "auth_requests.hpp" #include "auth_responses.hpp" #include "cassandra.h" #include "cassconfig.hpp" #include "constants.hpp" #include "connector.hpp" #include "timer.hpp" #include "config.hpp" #include "result_response.hpp" #include "supported_response.hpp" #include "startup_request.hpp" #include "query_request.hpp" #include "options_request.hpp" #include "register_request.hpp" #include "error_response.hpp" #include "event_response.hpp" #include "logger.hpp" #ifdef HAVE_NOSIGPIPE #include <sys/socket.h> #include <sys/types.h> #endif #include <iomanip> #include <sstream> #define SSL_READ_SIZE 8192 #define SSL_WRITE_SIZE 8192 #define SSL_ENCRYPTED_BUFS_COUNT 16 #define MAX_BUFFER_REUSE_NO 8 #define BUFFER_REUSE_SIZE 64 * 1024 #if UV_VERSION_MAJOR == 0 #define UV_ERRSTR(status, loop) uv_strerror(uv_last_error(loop)) #else #define UV_ERRSTR(status, loop) uv_strerror(status) #endif namespace cass { static void cleanup_pending_callbacks(List<RequestCallback>* pending) { while (!pending->is_empty()) { RequestCallback::Ptr callback(pending->front()); pending->remove(callback.get()); switch (callback->state()) { case RequestCallback::REQUEST_STATE_NEW: case RequestCallback::REQUEST_STATE_FINISHED: case RequestCallback::REQUEST_STATE_CANCELLED: assert(false && "Request state is invalid in cleanup"); break; case RequestCallback::REQUEST_STATE_READ_BEFORE_WRITE: callback->set_state(RequestCallback::REQUEST_STATE_FINISHED); // Use the response saved in the read callback callback->on_set(callback->read_before_write_response()); break; case RequestCallback::REQUEST_STATE_WRITING: case RequestCallback::REQUEST_STATE_READING: callback->set_state(RequestCallback::REQUEST_STATE_FINISHED); if (callback->request()->is_idempotent()) { callback->on_retry_next_host(); } else { callback->on_error(CASS_ERROR_LIB_REQUEST_TIMED_OUT, "Request timed out"); } break; case RequestCallback::REQUEST_STATE_CANCELLED_WRITING: case RequestCallback::REQUEST_STATE_CANCELLED_READING: case RequestCallback::REQUEST_STATE_CANCELLED_READ_BEFORE_WRITE: callback->set_state(RequestCallback::REQUEST_STATE_CANCELLED); callback->on_cancel(); break; } callback->dec_ref(); } } Connection::StartupCallback::StartupCallback(const Request::ConstPtr& request) : SimpleRequestCallback(request) { } void Connection::StartupCallback::on_internal_set(ResponseMessage* response) { switch (response->opcode()) { case CQL_OPCODE_SUPPORTED: connection()->on_supported(response); break; case CQL_OPCODE_ERROR: { ErrorResponse* error = static_cast<ErrorResponse*>(response->response_body().get()); ConnectionError error_code = CONNECTION_ERROR_GENERIC; if (error->code() == CQL_ERROR_PROTOCOL_ERROR && error->message().find("Invalid or unsupported protocol version") != StringRef::npos) { error_code = CONNECTION_ERROR_INVALID_PROTOCOL; } else if (error->code() == CQL_ERROR_BAD_CREDENTIALS) { error_code = CONNECTION_ERROR_AUTH; } else if (error->code() == CQL_ERROR_INVALID_QUERY && error->message().find("Keyspace") == 0 && error->message().find("does not exist") != StringRef::npos) { error_code = CONNECTION_ERROR_KEYSPACE; } connection()->notify_error("Received error response " + error->error_message(), error_code); break; } case CQL_OPCODE_AUTHENTICATE: { AuthenticateResponse* auth = static_cast<AuthenticateResponse*>(response->response_body().get()); connection()->on_authenticate(auth->class_name()); break; } case CQL_OPCODE_AUTH_CHALLENGE: connection()->on_auth_challenge( static_cast<const AuthResponseRequest*>(request()), static_cast<AuthChallengeResponse*>(response->response_body().get())->token()); break; case CQL_OPCODE_AUTH_SUCCESS: connection()->on_auth_success( static_cast<const AuthResponseRequest*>(request()), static_cast<AuthSuccessResponse*>(response->response_body().get())->token()); break; case CQL_OPCODE_READY: connection()->on_ready(); break; case CQL_OPCODE_RESULT: on_result_response(response); break; default: connection()->notify_error("Invalid opcode"); break; } } void Connection::StartupCallback::on_internal_error(CassError code, const std::string& message) { std::ostringstream ss; ss << "Error: '" << message << "' (0x" << std::hex << std::uppercase << std::setw(8) << std::setfill('0') << code << ")"; connection()->notify_error(ss.str()); } void Connection::StartupCallback::on_internal_timeout() { if (!connection()->is_closing()) { connection()->notify_error("Timed out", CONNECTION_ERROR_TIMEOUT); } } void Connection::StartupCallback::on_result_response(ResponseMessage* response) { ResultResponse* result = static_cast<ResultResponse*>(response->response_body().get()); switch (result->kind()) { case CASS_RESULT_KIND_SET_KEYSPACE: connection()->on_set_keyspace(); break; default: connection()->notify_error("Invalid result response. Expected set keyspace."); break; } } Connection::HeartbeatCallback::HeartbeatCallback() : SimpleRequestCallback(Request::ConstPtr(new OptionsRequest())) { } void Connection::HeartbeatCallback::on_internal_set(ResponseMessage* response) { LOG_TRACE("Heartbeat completed on host %s", connection()->address_string().c_str()); connection()->heartbeat_outstanding_ = false; } void Connection::HeartbeatCallback::on_internal_error(CassError code, const std::string& message) { LOG_WARN("An error occurred on host %s during a heartbeat request: %s", connection()->address_string().c_str(), message.c_str()); connection()->heartbeat_outstanding_ = false; } void Connection::HeartbeatCallback::on_internal_timeout() { LOG_WARN("Heartbeat request timed out on host %s", connection()->address_string().c_str()); connection()->heartbeat_outstanding_ = false; } Connection::Connection(uv_loop_t* loop, const Config& config, Metrics* metrics, const Host::ConstPtr& host, const std::string& keyspace, int protocol_version, Listener* listener) : state_(CONNECTION_STATE_NEW) , error_code_(CONNECTION_OK) , ssl_error_code_(CASS_OK) , loop_(loop) , config_(config) , metrics_(metrics) , host_(host) , keyspace_(keyspace) , protocol_version_(protocol_version) , listener_(listener) , response_(new ResponseMessage()) , stream_manager_(protocol_version) , ssl_session_(NULL) , heartbeat_outstanding_(false) { socket_.data = this; uv_tcp_init(loop_, &socket_); if (uv_tcp_nodelay(&socket_, config.tcp_nodelay_enable() ? 1 : 0) != 0) { LOG_WARN("Unable to set tcp nodelay"); } if (uv_tcp_keepalive(&socket_, config.tcp_keepalive_enable() ? 1 : 0, config.tcp_keepalive_delay_secs()) != 0) { LOG_WARN("Unable to set tcp keepalive"); } SslContext* ssl_context = config_.ssl_context(); if (ssl_context != NULL) { ssl_session_.reset(ssl_context->create_session(host)); } } Connection::~Connection() { while (!buffer_reuse_list_.empty()) { uv_buf_t buf = buffer_reuse_list_.top(); delete[] buf.base; buffer_reuse_list_.pop(); } } void Connection::connect() { if (state_ == CONNECTION_STATE_NEW) { set_state(CONNECTION_STATE_CONNECTING); connect_timer_.start(loop_, config_.connect_timeout_ms(), this, on_connect_timeout); Connector::connect(&socket_, host_->address(), this, on_connect); } } bool Connection::write(const RequestCallback::Ptr& callback, bool flush_immediately) { int32_t result = internal_write(callback, flush_immediately); if (result > 0) { restart_heartbeat_timer(); } return result != Request::REQUEST_ERROR_NO_AVAILABLE_STREAM_IDS; } int32_t Connection::internal_write(const RequestCallback::Ptr& callback, bool flush_immediately) { if (callback->state() == RequestCallback::REQUEST_STATE_CANCELLED) { return Request::REQUEST_ERROR_CANCELLED; } int stream = stream_manager_.acquire(callback.get()); if (stream < 0) { return Request::REQUEST_ERROR_NO_AVAILABLE_STREAM_IDS; } callback->inc_ref(); // Connection reference callback->start(this, stream); if (pending_writes_.is_empty() || pending_writes_.back()->is_flushed()) { if (ssl_session_) { pending_writes_.add_to_back(new PendingWriteSsl(this)); } else { pending_writes_.add_to_back(new PendingWrite(this)); } } PendingWriteBase *pending_write = pending_writes_.back(); int32_t request_size = pending_write->write(callback.get()); if (request_size < 0) { stream_manager_.release(stream); switch (request_size) { case Request::REQUEST_ERROR_BATCH_WITH_NAMED_VALUES: case Request::REQUEST_ERROR_PARAMETER_UNSET: // Already handled break; default: callback->on_error(CASS_ERROR_LIB_MESSAGE_ENCODE, "Operation unsupported by this protocol version"); break; } callback->dec_ref(); return request_size; } LOG_TRACE("Sending message type %s with stream %d on host %s", opcode_to_string(callback->request()->opcode()).c_str(), stream, address_string().c_str()); callback->set_state(RequestCallback::REQUEST_STATE_WRITING); if (flush_immediately) { pending_write->flush(); } return request_size; } void Connection::flush() { if (pending_writes_.is_empty()) return; pending_writes_.back()->flush(); } void Connection::schedule_schema_agreement(const SchemaChangeCallback::Ptr& callback, uint64_t wait) { PendingSchemaAgreement* pending_schema_agreement = new PendingSchemaAgreement(callback); pending_schema_agreements_.add_to_back(pending_schema_agreement); pending_schema_agreement->timer.start(loop_, wait, pending_schema_agreement, Connection::on_pending_schema_agreement); } void Connection::close() { internal_close(CONNECTION_STATE_CLOSE); } void Connection::defunct() { internal_close(CONNECTION_STATE_CLOSE_DEFUNCT); } void Connection::internal_close(ConnectionState close_state) { assert(close_state == CONNECTION_STATE_CLOSE || close_state == CONNECTION_STATE_CLOSE_DEFUNCT); if (state_ != CONNECTION_STATE_CLOSE && state_ != CONNECTION_STATE_CLOSE_DEFUNCT) { uv_handle_t* handle = reinterpret_cast<uv_handle_t*>(&socket_); if (!uv_is_closing(handle)) { heartbeat_timer_.stop(); terminate_timer_.stop(); connect_timer_.stop(); set_state(close_state); uv_close(handle, on_close); } } } void Connection::set_state(ConnectionState new_state) { // Only update if the state changed if (new_state == state_) return; switch (state_) { case CONNECTION_STATE_NEW: assert(new_state == CONNECTION_STATE_CONNECTING && "Invalid connection state after new"); state_ = new_state; break; case CONNECTION_STATE_CONNECTING: assert((new_state == CONNECTION_STATE_CONNECTED || new_state == CONNECTION_STATE_CLOSE || new_state == CONNECTION_STATE_CLOSE_DEFUNCT) && "Invalid connection state after connecting"); state_ = new_state; break; case CONNECTION_STATE_CONNECTED: assert((new_state == CONNECTION_STATE_REGISTERING_EVENTS || new_state == CONNECTION_STATE_READY || new_state == CONNECTION_STATE_CLOSE || new_state == CONNECTION_STATE_CLOSE_DEFUNCT) && "Invalid connection state after connected"); state_ = new_state; break; case CONNECTION_STATE_REGISTERING_EVENTS: assert((new_state == CONNECTION_STATE_READY || new_state == CONNECTION_STATE_CLOSE || new_state == CONNECTION_STATE_CLOSE_DEFUNCT) && "Invalid connection state after registering for events"); state_ = new_state; break; case CONNECTION_STATE_READY: assert((new_state == CONNECTION_STATE_CLOSE || new_state == CONNECTION_STATE_CLOSE_DEFUNCT) && "Invalid connection state after ready"); state_ = new_state; break; case CONNECTION_STATE_CLOSE: assert(false && "No state change after close"); break; case CONNECTION_STATE_CLOSE_DEFUNCT: assert(false && "No state change after close defunct"); break; } } void Connection::consume(char* input, size_t size) { char* buffer = input; size_t remaining = size; // A successful read means the connection is still responsive restart_terminate_timer(); while (remaining != 0 && !is_closing()) { ssize_t consumed = response_->decode(buffer, remaining); if (consumed <= 0) { notify_error("Error consuming message"); continue; } if (response_->is_body_ready()) { ScopedPtr<ResponseMessage> response(response_.release()); response_.reset(new ResponseMessage()); LOG_TRACE("Consumed message type %s with stream %d, input %u, remaining %u on host %s", opcode_to_string(response->opcode()).c_str(), static_cast<int>(response->stream()), static_cast<unsigned int>(size), static_cast<unsigned int>(remaining), host_->address_string().c_str()); if (response->stream() < 0) { if (response->opcode() == CQL_OPCODE_EVENT) { listener_->on_event(static_cast<EventResponse*>(response->response_body().get())); } else { notify_error("Invalid response opcode for event stream: " + opcode_to_string(response->opcode())); continue; } } else { RequestCallback* temp = NULL; if (stream_manager_.get_pending_and_release(response->stream(), temp)) { RequestCallback::Ptr callback(temp); switch (callback->state()) { case RequestCallback::REQUEST_STATE_READING: pending_reads_.remove(callback.get()); callback->set_state(RequestCallback::REQUEST_STATE_FINISHED); maybe_set_keyspace(response.get()); callback->on_set(response.get()); callback->dec_ref(); break; case RequestCallback::REQUEST_STATE_WRITING: // There are cases when the read callback will happen // before the write callback. If this happens we have // to allow the write callback to finish the request. callback->set_state(RequestCallback::REQUEST_STATE_READ_BEFORE_WRITE); // Save the response for the write callback callback->set_read_before_write_response(response.release()); // Transfer ownership break; case RequestCallback::REQUEST_STATE_CANCELLED_READING: pending_reads_.remove(callback.get()); callback->set_state(RequestCallback::REQUEST_STATE_CANCELLED); callback->on_cancel(); callback->dec_ref(); break; case RequestCallback::REQUEST_STATE_CANCELLED_WRITING: // There are cases when the read callback will happen // before the write callback. If this happens we have // to allow the write callback to finish the request. callback->set_state(RequestCallback::REQUEST_STATE_CANCELLED_READ_BEFORE_WRITE); break; default: assert(false && "Invalid request state after receiving response"); break; } } else { notify_error("Invalid stream ID"); continue; } } } remaining -= consumed; buffer += consumed; } } void Connection::maybe_set_keyspace(ResponseMessage* response) { if (response->opcode() == CQL_OPCODE_RESULT) { ResultResponse* result = static_cast<ResultResponse*>(response->response_body().get()); if (result->kind() == CASS_RESULT_KIND_SET_KEYSPACE) { keyspace_ = result->keyspace().to_string(); } } } void Connection::on_connect(Connector* connector) { Connection* connection = static_cast<Connection*>(connector->data()); if (!connection->connect_timer_.is_running()) { return; // Timed out } if (connector->status() == 0) { LOG_DEBUG("Connected to host %s on connection(%p)", connection->host_->address_string().c_str(), static_cast<void*>(connection)); #if defined(HAVE_NOSIGPIPE) && UV_VERSION_MAJOR >= 1 // This must be done after connection for the socket file descriptor to be // valid. uv_os_fd_t fd = 0; int enabled = 1; if (uv_fileno(reinterpret_cast<uv_handle_t*>(&connection->socket_), &fd) != 0 || setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&enabled, sizeof(int)) != 0) { LOG_WARN("Unable to set socket option SO_NOSIGPIPE for host %s", connection->host_->address_string().c_str()); } #endif if (connection->ssl_session_) { uv_read_start(reinterpret_cast<uv_stream_t*>(&connection->socket_), Connection::alloc_buffer_ssl, Connection::on_read_ssl); } else { uv_read_start(reinterpret_cast<uv_stream_t*>(&connection->socket_), Connection::alloc_buffer, Connection::on_read); } connection->set_state(CONNECTION_STATE_CONNECTED); if (connection->ssl_session_) { connection->ssl_handshake(); } else { connection->on_connected(); } } else { connection->notify_error("Connect error '" + std::string(UV_ERRSTR(connector->status(), connection->loop_)) + "'"); } } void Connection::on_connect_timeout(Timer* timer) { Connection* connection = static_cast<Connection*>(timer->data()); connection->notify_error("Connection timeout", CONNECTION_ERROR_TIMEOUT); connection->metrics_->connection_timeouts.inc(); } void Connection::on_close(uv_handle_t* handle) { Connection* connection = static_cast<Connection*>(handle->data); LOG_DEBUG("Connection(%p) to host %s closed", static_cast<void*>(connection), connection->host_->address_string().c_str()); cleanup_pending_callbacks(&connection->pending_reads_); while (!connection->pending_writes_.is_empty()) { PendingWriteBase* pending_write = connection->pending_writes_.front(); connection->pending_writes_.remove(pending_write); delete pending_write; } while (!connection->pending_schema_agreements_.is_empty()) { PendingSchemaAgreement* pending_schema_aggreement = connection->pending_schema_agreements_.front(); connection->pending_schema_agreements_.remove(pending_schema_aggreement); pending_schema_aggreement->stop_timer(); pending_schema_aggreement->callback->on_closing(); delete pending_schema_aggreement; } connection->listener_->on_close(connection); delete connection; } uv_buf_t Connection::internal_alloc_buffer(size_t suggested_size) { if (suggested_size <= BUFFER_REUSE_SIZE) { if (!buffer_reuse_list_.empty()) { uv_buf_t ret = buffer_reuse_list_.top(); buffer_reuse_list_.pop(); return ret; } return uv_buf_init(new char[BUFFER_REUSE_SIZE], BUFFER_REUSE_SIZE); } return uv_buf_init(new char[suggested_size], suggested_size); } void Connection::internal_reuse_buffer(uv_buf_t buf) { if (buf.len == BUFFER_REUSE_SIZE && buffer_reuse_list_.size() < MAX_BUFFER_REUSE_NO) { buffer_reuse_list_.push(buf); return; } delete[] buf.base; } #if UV_VERSION_MAJOR == 0 uv_buf_t Connection::alloc_buffer(uv_handle_t* handle, size_t suggested_size) { Connection* connection = static_cast<Connection*>(handle->data); return connection->internal_alloc_buffer(suggested_size); } #else void Connection::alloc_buffer(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { Connection* connection = static_cast<Connection*>(handle->data); *buf = connection->internal_alloc_buffer(suggested_size); } #endif #if UV_VERSION_MAJOR == 0 void Connection::on_read(uv_stream_t* client, ssize_t nread, uv_buf_t buf) { #else void Connection::on_read(uv_stream_t* client, ssize_t nread, const uv_buf_t* buf) { #endif Connection* connection = static_cast<Connection*>(client->data); if (nread < 0) { #if UV_VERSION_MAJOR == 0 if (uv_last_error(connection->loop_).code != UV_EOF) { #else if (nread != UV_EOF) { #endif connection->notify_error("Read error '" + std::string(UV_ERRSTR(nread, connection->loop_)) + "'"); } else { connection->defunct(); } #if UV_VERSION_MAJOR == 0 connection->internal_reuse_buffer(buf); #else connection->internal_reuse_buffer(*buf); #endif return; } #if UV_VERSION_MAJOR == 0 connection->consume(buf.base, nread); connection->internal_reuse_buffer(buf); #else connection->consume(buf->base, nread); connection->internal_reuse_buffer(*buf); #endif } #if UV_VERSION_MAJOR == 0 uv_buf_t Connection::alloc_buffer_ssl(uv_handle_t* handle, size_t suggested_size) { Connection* connection = static_cast<Connection*>(handle->data); char* base = connection->ssl_session_->incoming().peek_writable(&suggested_size); return uv_buf_init(base, suggested_size); } #else void Connection::alloc_buffer_ssl(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { Connection* connection = static_cast<Connection*>(handle->data); buf->base = connection->ssl_session_->incoming().peek_writable(&suggested_size); buf->len = suggested_size; } #endif #if UV_VERSION_MAJOR == 0 void Connection::on_read_ssl(uv_stream_t* client, ssize_t nread, uv_buf_t buf) { #else void Connection::on_read_ssl(uv_stream_t* client, ssize_t nread, const uv_buf_t* buf) { #endif Connection* connection = static_cast<Connection*>(client->data); SslSession* ssl_session = connection->ssl_session_.get(); assert(ssl_session != NULL); if (nread < 0) { #if UV_VERSION_MAJOR == 0 if (uv_last_error(connection->loop_).code != UV_EOF) { #else if (nread != UV_EOF) { #endif connection->notify_error("Read error '" + std::string(UV_ERRSTR(nread, connection->loop_)) + "'"); } else { connection->defunct(); } return; } ssl_session->incoming().commit(nread); if (ssl_session->is_handshake_done()) { char buf[SSL_READ_SIZE]; int rc = 0; while ((rc = ssl_session->decrypt(buf, sizeof(buf))) > 0) { connection->consume(buf, rc); } if (rc <= 0 && ssl_session->has_error()) { connection->notify_error("Unable to decrypt data: " + ssl_session->error_message(), CONNECTION_ERROR_SSL_DECRYPT); } } else { connection->ssl_handshake(); } } void Connection::on_connected() { internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new OptionsRequest())))); } void Connection::on_authenticate(const std::string& class_name) { if (protocol_version_ == 1) { send_credentials(class_name); } else { send_initial_auth_response(class_name); } } void Connection::on_auth_challenge(const AuthResponseRequest* request, const std::string& token) { std::string response; if (!request->auth()->evaluate_challenge(token, &response)) { notify_error("Failed evaluating challenge token: " + request->auth()->error(), CONNECTION_ERROR_AUTH); return; } internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new AuthResponseRequest(response, request->auth()))))); } void Connection::on_auth_success(const AuthResponseRequest* request, const std::string& token) { if (!request->auth()->success(token)) { notify_error("Failed evaluating success token: " + request->auth()->error(), CONNECTION_ERROR_AUTH); return; } on_ready(); } void Connection::on_ready() { if (state_ == CONNECTION_STATE_CONNECTED && listener_->event_types() != 0) { set_state(CONNECTION_STATE_REGISTERING_EVENTS); internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new RegisterRequest(listener_->event_types()))))); return; } if (keyspace_.empty()) { notify_ready(); } else { internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new QueryRequest("USE \"" + keyspace_ + "\""))))); } } void Connection::on_set_keyspace() { notify_ready(); } void Connection::on_supported(ResponseMessage* response) { SupportedResponse* supported = static_cast<SupportedResponse*>(response->response_body().get()); // TODO(mstump) do something with the supported info (void)supported; internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new StartupRequest(config().no_compact()))))); } void Connection::on_pending_schema_agreement(Timer* timer) { PendingSchemaAgreement* pending_schema_agreement = static_cast<PendingSchemaAgreement*>(timer->data()); Connection* connection = pending_schema_agreement->callback->connection(); connection->pending_schema_agreements_.remove(pending_schema_agreement); pending_schema_agreement->callback->execute(); delete pending_schema_agreement; } void Connection::notify_ready() { connect_timer_.stop(); restart_heartbeat_timer(); restart_terminate_timer(); set_state(CONNECTION_STATE_READY); listener_->on_ready(this); } void Connection::notify_error(const std::string& message, ConnectionError code) { assert(code != CONNECTION_OK && "Notified error without an error"); LOG_DEBUG("Lost connection(%p) to host %s with the following error: %s", static_cast<void*>(this), host_->address_string().c_str(), message.c_str()); error_message_ = message; error_code_ = code; if (is_ssl_error()) { ssl_error_code_ = ssl_session_->error_code(); } defunct(); } void Connection::ssl_handshake() { if (!ssl_session_->is_handshake_done()) { ssl_session_->do_handshake(); if (ssl_session_->has_error()) { notify_error("Error during SSL handshake: " + ssl_session_->error_message(), CONNECTION_ERROR_SSL_HANDSHAKE); return; } } char buf[SslHandshakeWriter::MAX_BUFFER_SIZE]; size_t size = ssl_session_->outgoing().read(buf, sizeof(buf)); if (size > 0) { if (!SslHandshakeWriter::write(this, buf, size)) { notify_error("Error writing data during SSL handshake"); return; } } if (ssl_session_->is_handshake_done()) { ssl_session_->verify(); if (ssl_session_->has_error()) { notify_error("Error verifying peer certificate: " + ssl_session_->error_message(), CONNECTION_ERROR_SSL_VERIFY); return; } on_connected(); } } void Connection::send_credentials(const std::string& class_name) { ScopedPtr<V1Authenticator> v1_auth(config_.auth_provider()->new_authenticator_v1(host_, class_name)); if (v1_auth) { V1Authenticator::Credentials credentials; v1_auth->get_credentials(&credentials); internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new CredentialsRequest(credentials))))); } else { send_initial_auth_response(class_name); } } void Connection::send_initial_auth_response(const std::string& class_name) { Authenticator::Ptr auth(config_.auth_provider()->new_authenticator(host_, class_name)); if (!auth) { notify_error("Authentication required but no auth provider set", CONNECTION_ERROR_AUTH); } else { std::string response; if (!auth->initial_response(&response)) { notify_error("Failed creating initial response token: " + auth->error(), CONNECTION_ERROR_AUTH); return; } internal_write(RequestCallback::Ptr( new StartupCallback(Request::ConstPtr( new AuthResponseRequest(response, auth))))); } } void Connection::restart_heartbeat_timer() { if (config_.connection_heartbeat_interval_secs() > 0) { heartbeat_timer_.start(loop_, 1000 * config_.connection_heartbeat_interval_secs(), this, on_heartbeat); } } void Connection::on_heartbeat(Timer* timer) { Connection* connection = static_cast<Connection*>(timer->data()); if (!connection->heartbeat_outstanding_) { if (!connection->internal_write(RequestCallback::Ptr(new HeartbeatCallback()))) { // Recycling only this connection with a timeout error. This is unlikely and // it means the connection ran out of stream IDs as a result of requests // that never returned and as a result timed out. connection->notify_error("No streams IDs available for heartbeat request. " "Terminating connection...", CONNECTION_ERROR_TIMEOUT); return; } connection->heartbeat_outstanding_ = true; } connection->restart_heartbeat_timer(); } void Connection::restart_terminate_timer() { // The terminate timer shouldn't be started without having heartbeats enabled, // otherwise connections would be terminated in periods of request inactivity. if (config_.connection_heartbeat_interval_secs() > 0 && config_.connection_idle_timeout_secs() > 0) { terminate_timer_.start(loop_, 1000 * config_.connection_idle_timeout_secs(), this, on_terminate); } } void Connection::on_terminate(Timer* timer) { Connection* connection = static_cast<Connection*>(timer->data()); connection->notify_error("Failed to send a heartbeat within connection idle interval. " "Terminating connection...", CONNECTION_ERROR_TIMEOUT); } void Connection::PendingSchemaAgreement::stop_timer() { timer.stop(); } Connection::PendingWriteBase::~PendingWriteBase() { cleanup_pending_callbacks(&callbacks_); } int32_t Connection::PendingWriteBase::write(RequestCallback* callback) { size_t last_buffer_size = buffers_.size(); int32_t request_size = callback->encode(connection_->protocol_version_, 0x00, &buffers_); if (request_size < 0) { buffers_.resize(last_buffer_size); // rollback return request_size; } size_ += request_size; callbacks_.add_to_back(callback); return request_size; } void Connection::PendingWriteBase::on_write(uv_write_t* req, int status) { PendingWrite* pending_write = static_cast<PendingWrite*>(req->data); Connection* connection = static_cast<Connection*>(pending_write->connection_); while (!pending_write->callbacks_.is_empty()) { RequestCallback::Ptr callback(pending_write->callbacks_.front()); pending_write->callbacks_.remove(callback.get()); switch (callback->state()) { case RequestCallback::REQUEST_STATE_WRITING: if (status == 0) { callback->set_state(RequestCallback::REQUEST_STATE_READING); connection->pending_reads_.add_to_back(callback.get()); } else { if (!connection->is_closing()) { connection->notify_error("Write error '" + std::string(UV_ERRSTR(status, connection->loop_)) + "'"); connection->defunct(); } connection->stream_manager_.release(callback->stream()); callback->set_state(RequestCallback::REQUEST_STATE_FINISHED); callback->on_error(CASS_ERROR_LIB_WRITE_ERROR, "Unable to write to socket"); callback->dec_ref(); } break; case RequestCallback::REQUEST_STATE_READ_BEFORE_WRITE: // The read callback happened before the write callback // returned. This is now responsible for finishing the request. callback->set_state(RequestCallback::REQUEST_STATE_FINISHED); // Use the response saved in the read callback connection->maybe_set_keyspace(callback->read_before_write_response()); callback->on_set(callback->read_before_write_response()); callback->dec_ref(); break; case RequestCallback::REQUEST_STATE_CANCELLED_WRITING: callback->set_state(RequestCallback::REQUEST_STATE_CANCELLED_READING); connection->pending_reads_.add_to_back(callback.get()); break; case RequestCallback::REQUEST_STATE_CANCELLED_READ_BEFORE_WRITE: // The read callback happened before the write callback // returned. This is now responsible for cleanup. callback->set_state(RequestCallback::REQUEST_STATE_CANCELLED); callback->on_cancel(); callback->dec_ref(); break; default: assert(false && "Invalid request state after write finished"); break; } } connection->pending_writes_.remove(pending_write); delete pending_write; connection->flush(); } void Connection::PendingWrite::flush() { if (!is_flushed_ && !buffers_.empty()) { UvBufVec bufs; bufs.reserve(buffers_.size()); for (BufferVec::const_iterator it = buffers_.begin(), end = buffers_.end(); it != end; ++it) { bufs.push_back(uv_buf_init(const_cast<char*>(it->data()), it->size())); } is_flushed_ = true; uv_stream_t* sock_stream = reinterpret_cast<uv_stream_t*>(&connection_->socket_); uv_write(&req_, sock_stream, bufs.data(), bufs.size(), PendingWrite::on_write); } } void Connection::PendingWriteSsl::encrypt() { char buf[SSL_WRITE_SIZE]; size_t copied = 0; size_t offset = 0; size_t total = 0; SslSession* ssl_session = connection_->ssl_session_.get(); BufferVec::const_iterator it = buffers_.begin(), end = buffers_.end(); LOG_TRACE("Copying %u bufs", static_cast<unsigned int>(buffers_.size())); bool is_done = (it == end); while (!is_done) { assert(it->size() > 0); size_t size = it->size(); size_t to_copy = size - offset; size_t available = SSL_WRITE_SIZE - copied; if (available < to_copy) { to_copy = available; } memcpy(buf + copied, it->data() + offset, to_copy); copied += to_copy; offset += to_copy; total += to_copy; if (offset == size) { ++it; offset = 0; } is_done = (it == end); if (is_done || copied == SSL_WRITE_SIZE) { int rc = ssl_session->encrypt(buf, copied); if (rc <= 0 && ssl_session->has_error()) { connection_->notify_error("Unable to encrypt data: " + ssl_session->error_message(), CONNECTION_ERROR_SSL_ENCRYPT); return; } copied = 0; } } LOG_TRACE("Copied %u bytes for encryption", static_cast<unsigned int>(total)); } void Connection::PendingWriteSsl::flush() { if (!is_flushed_ && !buffers_.empty()) { SslSession* ssl_session = connection_->ssl_session_.get(); rb::RingBuffer::Position prev_pos = ssl_session->outgoing().write_position(); encrypt(); SmallVector<uv_buf_t, SSL_ENCRYPTED_BUFS_COUNT> bufs; encrypted_size_ = ssl_session->outgoing().peek_multiple(prev_pos, &bufs); LOG_TRACE("Sending %u encrypted bytes", static_cast<unsigned int>(encrypted_size_)); uv_stream_t* sock_stream = reinterpret_cast<uv_stream_t*>(&connection_->socket_); uv_write(&req_, sock_stream, bufs.data(), bufs.size(), PendingWriteSsl::on_write); is_flushed_ = true; } } void Connection::PendingWriteSsl::on_write(uv_write_t* req, int status) { if (status == 0) { PendingWriteSsl* pending_write = static_cast<PendingWriteSsl*>(req->data); pending_write->connection_->ssl_session_->outgoing().read(NULL, pending_write->encrypted_size_); } PendingWriteBase::on_write(req, status); } bool Connection::SslHandshakeWriter::write(Connection* connection, char* buf, size_t buf_size) { SslHandshakeWriter* writer = new SslHandshakeWriter(connection, buf, buf_size); uv_stream_t* stream = reinterpret_cast<uv_stream_t*>(&connection->socket_); int rc = uv_write(&writer->req_, stream, &writer->uv_buf_, 1, SslHandshakeWriter::on_write); if (rc != 0) { delete writer; return false; } return true; } Connection::SslHandshakeWriter::SslHandshakeWriter(Connection* connection, char* buf, size_t buf_size) : connection_(connection) , uv_buf_(uv_buf_init(buf, buf_size)) { memcpy(buf_, buf, buf_size); req_.data = this; } void Connection::SslHandshakeWriter::on_write(uv_write_t* req, int status) { SslHandshakeWriter* writer = static_cast<SslHandshakeWriter*>(req->data); if (status != 0) { writer->connection_->notify_error("Write error '" + std::string(UV_ERRSTR(status, writer->connection_->loop_)) + "'"); } delete writer; } } // namespace cass
33.53559
106
0.666529
spolitov
eca05a55acf935e9d42224eff0b73ef73fe19066
41,398
cpp
C++
dev/TreeView/ViewModel.cpp
riverar/microsoft-ui-xaml
ef3a0fcd85d200c98514e765eea94323b943cf1e
[ "MIT" ]
3,788
2019-05-07T02:41:36.000Z
2022-03-30T12:34:15.000Z
dev/TreeView/ViewModel.cpp
riverar/microsoft-ui-xaml
ef3a0fcd85d200c98514e765eea94323b943cf1e
[ "MIT" ]
6,170
2019-05-06T21:32:43.000Z
2022-03-31T23:46:55.000Z
dev/TreeView/ViewModel.cpp
riverar/microsoft-ui-xaml
ef3a0fcd85d200c98514e765eea94323b943cf1e
[ "MIT" ]
532
2019-05-07T12:15:58.000Z
2022-03-31T11:36:26.000Z
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. #include "pch.h" #include "common.h" #include "ViewModel.h" #include "TreeView.h" #include "TreeViewItem.h" #include "VectorChangedEventArgs.h" #include "TreeViewList.h" #include <HashMap.h> // Need to update node selection states on UI before vector changes. // Listen on vector change events don't solve the problem because the event already happened when the event handler gets called. // i.e. the node is already gone when we get to ItemRemoved callback. #pragma region SelectedTreeNodeVector typedef typename VectorOptionsFromFlag<winrt::TreeViewNode, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()> SelectedTreeNodeVectorOptions; class SelectedTreeNodeVector : public ReferenceTracker< SelectedTreeNodeVector, reference_tracker_implements_t<typename SelectedTreeNodeVectorOptions::VectorType>::type, typename TreeViewNodeVectorOptions::IterableType, typename TreeViewNodeVectorOptions::ObservableVectorType>, public TreeViewNodeVectorOptions::IVectorOwner { Implement_Vector_Read(SelectedTreeNodeVectorOptions) private: winrt::weak_ref<ViewModel> m_viewModel{ nullptr }; void UpdateSelection(winrt::TreeViewNode const& node, TreeNodeSelectionState state) { if (winrt::get_self<TreeViewNode>(node)->SelectionState() != state) { if (auto viewModel = m_viewModel.get()) { viewModel->UpdateSelection(node, state); viewModel->NotifyContainerOfSelectionChange(node, state); } } } public: void SetViewModel(ViewModel& viewModel) { m_viewModel = viewModel.get_weak(); } void Append(winrt::TreeViewNode const& node) { InsertAt(Size(), node); } void InsertAt(unsigned int index, winrt::TreeViewNode const& node) { if (!Contains(node)) { // UpdateSelection will call InsertAtCore UpdateSelection(node, TreeNodeSelectionState::Selected); } } void SetAt(unsigned int index, winrt::TreeViewNode const& node) { RemoveAt(index); InsertAt(index, node); } void RemoveAt(unsigned int index) { auto inner = GetVectorInnerImpl(); auto oldNode = winrt::get_self<TreeViewNode>(inner->GetAt(index)); // UpdateSelection will call RemoveAtCore UpdateSelection(*oldNode, TreeNodeSelectionState::UnSelected); } void RemoveAtEnd() { RemoveAt(Size() - 1); } void ReplaceAll(winrt::array_view<winrt::TreeViewNode const> nodes) { Clear(); for (auto const& node : nodes) { Append(node); } } void Clear() { while (Size() > 0) { RemoveAtEnd(); } } bool Contains(winrt::TreeViewNode const& node) { uint32_t index; return GetVectorInnerImpl()->IndexOf(node, index); } // Default write methods will trigger TreeView visual updates. // If you want to update vector content without notifying TreeViewNodes, use "core" version of the methods. void InsertAtCore(unsigned int index, winrt::TreeViewNode const& node) { GetVectorInnerImpl()->InsertAt(index, node); // Keep SelectedItems and SelectedNodes in sync if (auto viewModel = m_viewModel.get()) { auto selectedItems = viewModel->GetSelectedItems(); if (selectedItems.Size() != Size()) { if (auto listControl = viewModel->ListControl()) { if (auto item = winrt::get_self<TreeViewList>(listControl)->ItemFromNode(node)) { selectedItems.InsertAt(index, item); viewModel->TrackItemSelected(item); } } } } } void RemoveAtCore(unsigned int index) { GetVectorInnerImpl()->RemoveAt(index); // Keep SelectedItems and SelectedNodes in sync if (auto viewModel = m_viewModel.get()) { auto selectedItems = viewModel->GetSelectedItems(); if (selectedItems.Size() != Size()) { const auto item = selectedItems.GetAt(index); selectedItems.RemoveAt(index); viewModel->TrackItemUnselected(item); } } } }; #pragma endregion // Similar to SelectedNodesVector above, we need to make decisions before the item is inserted or removed. // we can't use vector change events because the event already happened when event hander gets called. #pragma region SelectedItemsVector typedef typename VectorOptionsFromFlag<winrt::IInspectable, MakeVectorParam<VectorFlag::Observable, VectorFlag::DependencyObjectBase>()> SelectedItemsVectorOptions; class SelectedItemsVector : public ReferenceTracker< SelectedItemsVector, reference_tracker_implements_t<typename SelectedItemsVectorOptions::VectorType>::type, typename SelectedItemsVectorOptions::IterableType, typename SelectedItemsVectorOptions::ObservableVectorType>, public SelectedItemsVectorOptions::IVectorOwner { Implement_Vector_Read(SelectedItemsVectorOptions) private: winrt::weak_ref<ViewModel> m_viewModel{ nullptr }; public: void SetViewModel(ViewModel& viewModel) { m_viewModel = viewModel.get_weak(); } void Append(winrt::IInspectable const& item) { InsertAt(Size(), item); } void InsertAt(unsigned int index, winrt::IInspectable const& item) { if (!Contains(item)) { GetVectorInnerImpl()->InsertAt(index, item); // Keep SelectedNodes and SelectedItems in sync if (auto viewModel = m_viewModel.get()) { auto selectedNodes = viewModel->GetSelectedNodes(); if (selectedNodes.Size() != Size()) { if (auto listControl = viewModel->ListControl()) { if (auto node = winrt::get_self<TreeViewList>(listControl)->NodeFromItem(item)) { selectedNodes.InsertAt(index, node); } } } } } } void SetAt(unsigned int index, winrt::IInspectable const& item) { RemoveAt(index); InsertAt(index, item); } void RemoveAt(unsigned int index) { GetVectorInnerImpl()->RemoveAt(index); // Keep SelectedNodes and SelectedItems in sync if (auto viewModel = m_viewModel.get()) { auto selectedNodes = viewModel->GetSelectedNodes(); if (Size() != selectedNodes.Size()) { selectedNodes.RemoveAt(index); } } } void RemoveAtEnd() { RemoveAt(Size() - 1); } void ReplaceAll(winrt::array_view<winrt::IInspectable const> items) { Clear(); for (auto const& node : items) { Append(node); } } void Clear() { while (Size() > 0) { RemoveAtEnd(); } } bool Contains(winrt::IInspectable const& item) { uint32_t index; return GetVectorInnerImpl()->IndexOf(item, index); } }; #pragma endregion ViewModel::ViewModel() { auto selectedNodes = winrt::make_self<SelectedTreeNodeVector>(); selectedNodes->SetViewModel(*this); m_selectedNodes.set(*selectedNodes); auto selectedItems = winrt::make_self<SelectedItemsVector>(); selectedItems->SetViewModel(*this); m_selectedItems.set(*selectedItems); m_itemToNodeMap.set(winrt::make<HashMap<winrt::IInspectable, winrt::TreeViewNode>>()); } ViewModel::~ViewModel() { if (m_rootNodeChildrenChangedEventToken.value != 0) { if (auto origin = m_originNode.safe_get()) { winrt::get_self<TreeViewNode>(origin)->ChildrenChanged(m_rootNodeChildrenChangedEventToken); } ClearEventTokenVectors(); } } void ViewModel::ExpandNode(const winrt::TreeViewNode& value) { value.IsExpanded(true); } void ViewModel::CollapseNode(const winrt::TreeViewNode& value) { value.IsExpanded(false); } winrt::event_token ViewModel::NodeExpanding(const winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>& handler) { return m_nodeExpandingEventSource.add(handler); } void ViewModel::NodeExpanding(const winrt::event_token token) { m_nodeExpandingEventSource.remove(token); } winrt::event_token ViewModel::NodeCollapsed(const winrt::TypedEventHandler<winrt::TreeViewNode, winrt::IInspectable>& handler) { return m_nodeCollapsedEventSource.add(handler); } void ViewModel::NodeCollapsed(const winrt::event_token token) { m_nodeCollapsedEventSource.remove(token); } void ViewModel::SelectAll() { auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); }); BeginSelectionChanges(); UpdateSelection(m_originNode.get(), TreeNodeSelectionState::Selected); } void ViewModel::SelectSingleItem(winrt::IInspectable const& item) { auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); }); BeginSelectionChanges(); auto selectedItems = GetSelectedItems(); if (selectedItems.Size() > 0) { selectedItems.Clear(); } if (item) { selectedItems.Append(item); } } void ViewModel::SelectNode(const winrt::TreeViewNode& node, bool isSelected) { auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); }); BeginSelectionChanges(); auto selectedNodes = GetSelectedNodes(); if (isSelected) { if (IsInSingleSelectionMode() && selectedNodes.Size() > 0) { selectedNodes.Clear(); } selectedNodes.Append(node); } else { unsigned int index; if (selectedNodes.IndexOf(node, index)) { selectedNodes.RemoveAt(index); } } } void ViewModel::SelectByIndex(int index, TreeNodeSelectionState const& state) { auto trackSelection = gsl::finally([this]() { EndSelectionChanges(); }); BeginSelectionChanges(); auto targetNode = GetNodeAt(index); UpdateSelection(targetNode, state); } void ViewModel::BeginSelectionChanges() { if (!IsInSingleSelectionMode()) { m_selectionTrackingCounter++; if (m_selectionTrackingCounter == 1) { m_addedSelectedItems.clear(); m_removedSelectedItems.clear(); } } } void ViewModel::EndSelectionChanges() { if (!IsInSingleSelectionMode()) { m_selectionTrackingCounter--; if (m_selectionTrackingCounter == 0 && (m_addedSelectedItems.size() > 0 || m_removedSelectedItems.size() > 0)) { auto treeView = winrt::get_self<TreeView>(m_TreeView.get()); auto added = winrt::make<Vector<winrt::IInspectable>>(); for (unsigned int i = 0; i < m_addedSelectedItems.size(); i++) { added.Append(m_addedSelectedItems.at(i).get()); } auto removed = winrt::make<Vector<winrt::IInspectable>>(); for (unsigned int i = 0; i < m_removedSelectedItems.size(); i++) { removed.Append(m_removedSelectedItems.at(i)); } treeView->RaiseSelectionChanged(added, removed); } } } uint32_t ViewModel::Size() { auto inner = GetVectorInnerImpl(); return inner->Size(); } winrt::IInspectable ViewModel::GetAt(uint32_t index) { winrt::TreeViewNode node = GetNodeAt(index); return IsContentMode() ? node.Content() : node; } bool ViewModel::IndexOf(winrt::IInspectable const& value, uint32_t& index) { if (auto indexOfFunction = GetCustomIndexOfFunction()) { return indexOfFunction(value, index); } else { auto inner = GetVectorInnerImpl(); return inner->IndexOf(value, index); } } uint32_t ViewModel::GetMany(uint32_t const startIndex, winrt::array_view<winrt::IInspectable> values) { auto inner = GetVectorInnerImpl(); if (IsContentMode()) { auto vector = winrt::make<Vector<winrt::IInspectable>>(); const int size = Size(); for (int i = 0; i < size; i++) { vector.Append(GetNodeAt(i).Content()); } return vector.GetMany(startIndex, values); } return inner->GetMany(startIndex, values); } winrt::IVectorView<winrt::IInspectable> ViewModel::GetView() { throw winrt::hresult_not_implemented(); } winrt::TreeViewNode ViewModel::GetNodeAt(uint32_t index) { auto inner = GetVectorInnerImpl(); return inner->GetAt(index).as<winrt::TreeViewNode>(); } void ViewModel::SetAt(uint32_t index, winrt::IInspectable const& value) { auto inner = GetVectorInnerImpl(); auto current = inner->GetAt(index).as<winrt::TreeViewNode>(); inner->SetAt(index, value); winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>(); auto tvnCurrent = winrt::get_self<TreeViewNode>(current); tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector[index]); tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector[index]); // Hook up events and replace tokens auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode); m_collectionChangedEventTokenVector[index] = tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged }); m_IsExpandedChangedEventTokenVector[index] = tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged }); } void ViewModel::InsertAt(uint32_t index, winrt::IInspectable const& value) { GetVectorInnerImpl()->InsertAt(index, value); winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>(); // Hook up events and save tokens auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode); m_collectionChangedEventTokenVector.insert(m_collectionChangedEventTokenVector.begin() + index, tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged })); m_IsExpandedChangedEventTokenVector.insert(m_IsExpandedChangedEventTokenVector.begin() + index, tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged })); } void ViewModel::RemoveAt(uint32_t index) { auto inner = GetVectorInnerImpl(); auto current = inner->GetAt(index).as<winrt::TreeViewNode>(); inner->RemoveAt(index); // Unhook event handlers auto tvnCurrent = winrt::get_self<TreeViewNode>(current); tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector[index]); tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector[index]); // Remove tokens from vectors m_collectionChangedEventTokenVector.erase(m_collectionChangedEventTokenVector.begin() + index); m_IsExpandedChangedEventTokenVector.erase(m_IsExpandedChangedEventTokenVector.begin() + index); } void ViewModel::Append(winrt::IInspectable const& value) { GetVectorInnerImpl()->Append(value); winrt::TreeViewNode newNode = value.as<winrt::TreeViewNode>(); // Hook up events and save tokens auto tvnNewNode = winrt::get_self<TreeViewNode>(newNode); m_collectionChangedEventTokenVector.push_back(tvnNewNode->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged })); m_IsExpandedChangedEventTokenVector.push_back(tvnNewNode->AddExpandedChanged({ this, &ViewModel::TreeViewNodePropertyChanged })); } void ViewModel::RemoveAtEnd() { auto inner = GetVectorInnerImpl(); auto current = inner->GetAt(Size() - 1).as<winrt::TreeViewNode>(); inner->RemoveAtEnd(); // Unhook events auto tvnCurrent = winrt::get_self<TreeViewNode>(current); tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector.back()); tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector.back()); // Remove tokens m_collectionChangedEventTokenVector.pop_back(); m_IsExpandedChangedEventTokenVector.pop_back(); } void ViewModel::Clear() { // Don't call GetVectorInnerImpl()->Clear() directly because we need to remove hooked events unsigned int count = Size(); while (count != 0) { RemoveAtEnd(); count--; } } void ViewModel::ReplaceAll(winrt::array_view<winrt::IInspectable const> items) { auto inner = GetVectorInnerImpl(); return inner->ReplaceAll(items); } // Helper function void ViewModel::PrepareView(const winrt::TreeViewNode& originNode) { // Remove any existing RootNode events/children if (auto existingOriginNode = m_originNode.get()) { for (int i = (existingOriginNode.Children().Size() - 1); i >= 0; i--) { auto removeNode = existingOriginNode.Children().GetAt(i).as<winrt::TreeViewNode>(); RemoveNodeAndDescendantsFromView(removeNode); } if (m_rootNodeChildrenChangedEventToken.value != 0) { existingOriginNode.Children().as<winrt::IObservableVector<winrt::TreeViewNode>>().VectorChanged(m_rootNodeChildrenChangedEventToken); } } // Add new RootNode & children m_originNode.set(originNode); m_rootNodeChildrenChangedEventToken = winrt::get_self<TreeViewNode>(originNode)->ChildrenChanged({ this, &ViewModel::TreeViewNodeVectorChanged }); originNode.IsExpanded(true); int allOpenedDescendantsCount = 0; for (unsigned int i = 0; i < originNode.Children().Size(); i++) { auto addNode = originNode.Children().GetAt(i).as<winrt::TreeViewNode>(); AddNodeToView(addNode, i + allOpenedDescendantsCount); allOpenedDescendantsCount = AddNodeDescendantsToView(addNode, i, allOpenedDescendantsCount); } } void ViewModel::SetOwners(winrt::TreeViewList const& owningList, winrt::TreeView const& owningTreeView) { m_TreeViewList = winrt::make_weak(owningList); m_TreeView = winrt::make_weak(owningTreeView); } winrt::TreeViewList ViewModel::ListControl() { return m_TreeViewList.get(); } bool ViewModel::IsInSingleSelectionMode() { return m_TreeViewList.get().SelectionMode() == winrt::ListViewSelectionMode::Single; } // Private helpers void ViewModel::AddNodeToView(const winrt::TreeViewNode& value, unsigned int index) { InsertAt(index, value); } int ViewModel::AddNodeDescendantsToView(const winrt::TreeViewNode& value, unsigned int index, int offset) { if (value.IsExpanded()) { unsigned int size = value.Children().Size(); for (unsigned int i = 0; i < size; i++) { auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>(); offset++; AddNodeToView(childNode, offset + index); offset = AddNodeDescendantsToView(childNode, index, offset); } return offset; } return offset; } void ViewModel::RemoveNodeAndDescendantsFromView(const winrt::TreeViewNode& value) { UINT32 valueIndex; if (value.IsExpanded()) { unsigned int size = value.Children().Size(); for (unsigned int i = 0; i < size; i++) { auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>(); RemoveNodeAndDescendantsFromView(childNode); } } const bool containsValue = IndexOfNode(value, valueIndex); if (containsValue) { RemoveAt(valueIndex); } } void ViewModel::RemoveNodesAndDescendentsWithFlatIndexRange(unsigned int lowIndex, unsigned int highIndex) { MUX_ASSERT(lowIndex <= highIndex); for (int i = static_cast<int>(highIndex); i >= static_cast<int>(lowIndex); i--) { RemoveNodeAndDescendantsFromView(GetNodeAt(i)); } } int ViewModel::GetNextIndexInFlatTree(const winrt::TreeViewNode& node) { unsigned int index = 0; const bool isNodeInFlatList = IndexOfNode(node, index); if (isNodeInFlatList) { index++; } else { // node is Root node, so next index in flat tree is 0 index = 0; } return index; } // When ViewModel receives a event, it only includes the sender(parent TreeViewNode) and index. // We can't use sender[index] directly because it is already updated/removed // To find the removed TreeViewNode: // calculate allOpenedDescendantsCount in sender[0..index-1] first // then add offset and finally return TreeViewNode by looking up the flat tree. winrt::TreeViewNode ViewModel::GetRemovedChildTreeViewNodeByIndex(winrt::TreeViewNode const& node, unsigned int childIndex) { unsigned int allOpenedDescendantsCount = 0; for (unsigned int i = 0; i < childIndex; i++) { winrt::TreeViewNode calcNode = node.Children().GetAt(i).as<winrt::TreeViewNode>(); if (calcNode.IsExpanded()) { allOpenedDescendantsCount += GetExpandedDescendantCount(calcNode); } } const unsigned int childIndexInFlatTree = GetNextIndexInFlatTree(node) + childIndex + allOpenedDescendantsCount; return GetNodeAt(childIndexInFlatTree); } int ViewModel::CountDescendants(const winrt::TreeViewNode& value) { int descendantCount = 0; unsigned int size = value.Children().Size(); for (unsigned int i = 0; i < size; i++) { auto childNode = value.Children().GetAt(i).as<winrt::TreeViewNode>(); descendantCount++; if (childNode.IsExpanded()) { descendantCount = descendantCount + CountDescendants(childNode); } } return descendantCount; } unsigned int ViewModel::IndexOfNextSibling(winrt::TreeViewNode const& childNode) { auto child = childNode; auto parentNode = child.Parent(); unsigned int stopIndex; bool isLastRelativeChild = true; while (parentNode && isLastRelativeChild) { unsigned int relativeIndex; parentNode.Children().IndexOf(child, relativeIndex); if (parentNode.Children().Size() - 1 != relativeIndex) { isLastRelativeChild = false; } else { child = parentNode; parentNode = parentNode.Parent(); } } if (parentNode) { unsigned int siblingIndex; parentNode.Children().IndexOf(child, siblingIndex); auto siblingNode = parentNode.Children().GetAt(siblingIndex + 1); IndexOfNode(siblingNode, stopIndex); } else { stopIndex = Size(); } return stopIndex; } unsigned int ViewModel::GetExpandedDescendantCount(winrt::TreeViewNode const& parentNode) { unsigned int allOpenedDescendantsCount = 0; for (unsigned int i = 0; i < parentNode.Children().Size(); i++) { auto childNode = parentNode.Children().GetAt(i).as<winrt::TreeViewNode>(); allOpenedDescendantsCount++; if (childNode.IsExpanded()) { allOpenedDescendantsCount += CountDescendants(childNode); } } return allOpenedDescendantsCount; } bool ViewModel::IsNodeSelected(winrt::TreeViewNode const& targetNode) { unsigned int index; return m_selectedNodes.get().IndexOf(targetNode, index); } TreeNodeSelectionState ViewModel::NodeSelectionState(winrt::TreeViewNode const& targetNode) { return winrt::get_self<TreeViewNode>(targetNode)->SelectionState(); } void ViewModel::UpdateNodeSelection(winrt::TreeViewNode const& selectNode, TreeNodeSelectionState const& selectionState) { auto node = winrt::get_self<TreeViewNode>(selectNode); if (selectionState != node->SelectionState()) { node->SelectionState(selectionState); auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get()); switch (selectionState) { case TreeNodeSelectionState::Selected: selectedNodes->InsertAtCore(selectedNodes->Size(), selectNode); m_selectedNodeChildrenChangedEventTokenVector.push_back(winrt::get_self<TreeViewNode>(selectNode)->ChildrenChanged({ this, &ViewModel::SelectedNodeChildrenChanged })); break; case TreeNodeSelectionState::PartialSelected: case TreeNodeSelectionState::UnSelected: unsigned int index; if (selectedNodes->IndexOf(selectNode, index)) { selectedNodes->RemoveAtCore(index); winrt::get_self<TreeViewNode>(selectNode)->ChildrenChanged(m_selectedNodeChildrenChangedEventTokenVector[index]); m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + index); } break; } } } void ViewModel::UpdateSelection(winrt::TreeViewNode const& selectNode, TreeNodeSelectionState const& selectionState) { if(NodeSelectionState(selectNode) != selectionState) { UpdateNodeSelection(selectNode, selectionState); if (!IsInSingleSelectionMode()) { UpdateSelectionStateOfDescendants(selectNode, selectionState); UpdateSelectionStateOfAncestors(selectNode); } } } void ViewModel::UpdateSelectionStateOfDescendants(winrt::TreeViewNode const& targetNode, TreeNodeSelectionState const& selectionState) { if (selectionState == TreeNodeSelectionState::PartialSelected) return; for (auto const& childNode : targetNode.Children()) { UpdateNodeSelection(childNode, selectionState); UpdateSelectionStateOfDescendants(childNode, selectionState); NotifyContainerOfSelectionChange(childNode, selectionState); } } void ViewModel::UpdateSelectionStateOfAncestors(winrt::TreeViewNode const& targetNode) { if (auto parentNode = targetNode.Parent()) { // no need to update m_originalNode since it's the logical root for TreeView and not accessible to users if (parentNode != m_originNode.safe_get()) { const auto previousState = NodeSelectionState(parentNode); const auto selectionState = SelectionStateBasedOnChildren(parentNode); if (previousState != selectionState) { UpdateNodeSelection(parentNode, selectionState); NotifyContainerOfSelectionChange(parentNode, selectionState); UpdateSelectionStateOfAncestors(parentNode); } } } } TreeNodeSelectionState ViewModel::SelectionStateBasedOnChildren(winrt::TreeViewNode const& node) { bool hasSelectedChildren{ false }; bool hasUnSelectedChildren{ false }; for (auto const& childNode : node.Children()) { const auto state = NodeSelectionState(childNode); if (state == TreeNodeSelectionState::Selected) { hasSelectedChildren = true; } else if (state == TreeNodeSelectionState::UnSelected) { hasUnSelectedChildren = true; } if ((hasSelectedChildren && hasUnSelectedChildren) || state == TreeNodeSelectionState::PartialSelected) { return TreeNodeSelectionState::PartialSelected; } } return hasSelectedChildren ? TreeNodeSelectionState::Selected : TreeNodeSelectionState::UnSelected; } void ViewModel::NotifyContainerOfSelectionChange(winrt::TreeViewNode const& targetNode, TreeNodeSelectionState const& selectionState) { if (m_TreeViewList) { auto container = winrt::get_self<TreeViewList>(m_TreeViewList.get())->ContainerFromNode(targetNode); if (container) { winrt::TreeViewItem targetItem = container.as<winrt::TreeViewItem>(); winrt::get_self<TreeViewItem>(targetItem)->UpdateSelectionVisual(selectionState); } } } winrt::IVector<winrt::TreeViewNode> ViewModel::GetSelectedNodes() { return m_selectedNodes.get(); } winrt::IVector<winrt::IInspectable> ViewModel::GetSelectedItems() { return m_selectedItems.get(); } void ViewModel::TrackItemSelected(winrt::IInspectable item) { if (m_selectionTrackingCounter > 0 && item != m_originNode.safe_get()) { m_addedSelectedItems.push_back(winrt::make_weak(item)); } } void ViewModel::TrackItemUnselected(winrt::IInspectable item) { if (m_selectionTrackingCounter > 0 && item != m_originNode.safe_get()) { m_removedSelectedItems.push_back(item); } } winrt::TreeViewNode ViewModel::GetAssociatedNode(winrt::IInspectable item) { return m_itemToNodeMap.get().Lookup(item); } bool ViewModel::IndexOfNode(winrt::TreeViewNode const& targetNode, uint32_t& index) { return GetVectorInnerImpl()->IndexOf(targetNode, index); } void ViewModel::TreeViewNodeVectorChanged(winrt::TreeViewNode const& sender, winrt::IInspectable const& args) { winrt::CollectionChange collectionChange = args.as<winrt::IVectorChangedEventArgs>().CollectionChange(); unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index(); switch (collectionChange) { // Reset case, commonly seen when a TreeNode is cleared. // removes all nodes that need removing then // toggles a collapse / expand to ensure order. case (winrt::CollectionChange::Reset): { auto resetNode = sender.as<winrt::TreeViewNode>(); if (resetNode.IsExpanded()) { //The lowIndex is the index of the first child, while the high index is the index of the last descendant in the list. const unsigned int lowIndex = GetNextIndexInFlatTree(resetNode); const unsigned int highIndex = IndexOfNextSibling(resetNode) - 1; RemoveNodesAndDescendentsWithFlatIndexRange(lowIndex, highIndex); // reset the status of resetNodes children CollapseNode(resetNode); ExpandNode(resetNode); } break; } // We will find the correct index of insertion by first checking if the // node we are inserting into is expanded. If it is we will start walking // down the tree and counting the open items. This is to ensure we place // the inserted item in the correct index. If along the way we bump into // the item being inserted, we insert there then return, because we don't // need to do anything further. case (winrt::CollectionChange::ItemInserted): { auto targetNode = sender.as<winrt::TreeViewNode>().Children().GetAt(index).as<winrt::TreeViewNode>(); if (IsContentMode()) { m_itemToNodeMap.get().Insert(targetNode.Content(), targetNode); } auto parentNode = targetNode.Parent(); const unsigned int nextNodeIndex = GetNextIndexInFlatTree(parentNode); int allOpenedDescendantsCount = 0; if (parentNode.IsExpanded()) { for (unsigned int i = 0; i < parentNode.Children().Size(); i++) { auto childNode = parentNode.Children().GetAt(i).as<winrt::TreeViewNode>(); if (childNode == targetNode) { AddNodeToView(targetNode, nextNodeIndex + i + allOpenedDescendantsCount); if (targetNode.IsExpanded()) { AddNodeDescendantsToView(targetNode, nextNodeIndex + i, allOpenedDescendantsCount); } } else if (childNode.IsExpanded()) { allOpenedDescendantsCount += CountDescendants(childNode); } } } break; } // Removes a node from the ViewModel when a TreeNode // removes a child. case (winrt::CollectionChange::ItemRemoved): { auto removingNodeParent = sender.as<winrt::TreeViewNode>(); if (removingNodeParent.IsExpanded()) { auto removedNode = GetRemovedChildTreeViewNodeByIndex(removingNodeParent, index); RemoveNodeAndDescendantsFromView(removedNode); if (IsContentMode()) { m_itemToNodeMap.get().Remove(removedNode.Content()); } } break; } // Triggered by a replace such as SetAt. // Updates the TreeNode that changed in the ViewModel. case (winrt::CollectionChange::ItemChanged): { auto targetNode = sender.as<winrt::TreeViewNode>().Children().GetAt(index).as<winrt::TreeViewNode>(); auto changingNodeParent = sender.as<winrt::TreeViewNode>(); if (changingNodeParent.IsExpanded()) { auto removedNode = GetRemovedChildTreeViewNodeByIndex(changingNodeParent, index); [[gsl::suppress(con)]] { unsigned int removedNodeIndex = 0; MUX_ASSERT(IndexOfNode(removedNode, removedNodeIndex)); RemoveNodeAndDescendantsFromView(removedNode); InsertAt(removedNodeIndex, targetNode.as<winrt::IInspectable>()); } if (IsContentMode()) { m_itemToNodeMap.get().Remove(removedNode.Content()); m_itemToNodeMap.get().Insert(targetNode.Content(), targetNode); } } break; } } } void ViewModel::SelectedNodeChildrenChanged(winrt::TreeViewNode const& sender, winrt::IInspectable const& args) { winrt::CollectionChange collectionChange = args.as<winrt::IVectorChangedEventArgs>().CollectionChange(); unsigned int index = args.as<winrt::IVectorChangedEventArgs>().Index(); auto changingChildrenNode = sender.as<winrt::TreeViewNode>(); switch (collectionChange) { case (winrt::CollectionChange::ItemInserted): { auto newNode = changingChildrenNode.Children().GetAt(index); // If we are in multi select, we want the new child items to be also selected. if (!IsInSingleSelectionMode()) { UpdateNodeSelection(newNode, NodeSelectionState(changingChildrenNode)); } break; } case (winrt::CollectionChange::ItemChanged): { auto newNode = changingChildrenNode.Children().GetAt(index); UpdateNodeSelection(newNode, NodeSelectionState(changingChildrenNode)); auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get()); for (unsigned int i = 0; i < selectedNodes->Size(); i++) { auto selectNode = selectedNodes->GetAt(i); auto ancestorNode = selectNode.Parent(); while (ancestorNode && ancestorNode.Parent()) { ancestorNode = ancestorNode.Parent(); } if (ancestorNode != m_originNode.get()) { selectedNodes->RemoveAtCore(i); m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + i); } } break; } case (winrt::CollectionChange::ItemRemoved): case (winrt::CollectionChange::Reset): { //This checks if there are still children, then re-evaluates parents selection based on current state of remaining children //If a node has 2 children selected, and 1 unselected, and the unselected is removed, we then change the parent node to selected. //If the last child is removed, we preserve the current selection state of the parent, and this code need not execute. if (changingChildrenNode.Children().Size() > 0) { auto firstChildNode = changingChildrenNode.Children().GetAt(0); UpdateSelectionStateOfAncestors(firstChildNode); } auto selectedNodes = winrt::get_self<SelectedTreeNodeVector>(m_selectedNodes.get()); for (unsigned int i = 0; i < selectedNodes->Size(); i++) { auto selectNode = selectedNodes->GetAt(i); auto ancestorNode = selectNode.Parent(); while (ancestorNode && ancestorNode.Parent()) { ancestorNode = ancestorNode.Parent(); } if (ancestorNode != m_originNode.get()) { selectedNodes->RemoveAtCore(i); m_selectedNodeChildrenChangedEventTokenVector.erase(m_selectedNodeChildrenChangedEventTokenVector.begin() + i); } } break; } } } void ViewModel::TreeViewNodePropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args) { winrt::IDependencyProperty property = args.Property(); if (property == TreeViewNode::s_IsExpandedProperty) { TreeViewNodeIsExpandedPropertyChanged(sender, args); } else if (property == TreeViewNode::s_HasChildrenProperty) { TreeViewNodeHasChildrenPropertyChanged(sender, args); } } void ViewModel::TreeViewNodeIsExpandedPropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args) { auto targetNode = sender.as<winrt::TreeViewNode>(); if (targetNode.IsExpanded()) { if (targetNode.Children().Size() != 0) { int openedDescendantOffset = 0; unsigned int index; IndexOfNode(targetNode, index); index = index + 1; for (unsigned int i = 0; i < targetNode.Children().Size(); i++) { winrt::TreeViewNode childNode{ nullptr }; childNode = targetNode.Children().GetAt(i).as<winrt::TreeViewNode>(); AddNodeToView(childNode, index + i + openedDescendantOffset); openedDescendantOffset = AddNodeDescendantsToView(childNode, index + i, openedDescendantOffset); } } //Notify TreeView that a node is being expanded. m_nodeExpandingEventSource(targetNode, nullptr); } else { for (unsigned int i = 0; i < targetNode.Children().Size(); i++) { winrt::TreeViewNode childNode{ nullptr }; childNode = targetNode.Children().GetAt(i).as<winrt::TreeViewNode>(); RemoveNodeAndDescendantsFromView(childNode); } //Notify TreeView that a node is being collapsed m_nodeCollapsedEventSource(targetNode, nullptr); } } void ViewModel::TreeViewNodeHasChildrenPropertyChanged(winrt::TreeViewNode const& sender, winrt::IDependencyPropertyChangedEventArgs const& args) { if (m_TreeViewList) { auto targetNode = sender.as<winrt::TreeViewNode>(); auto container = winrt::get_self<TreeViewList>(m_TreeViewList.get())->ContainerFromNode(targetNode); if (container) { winrt::TreeViewItem targetItem = container.as<winrt::TreeViewItem>(); targetItem.GlyphOpacity(targetNode.HasChildren() ? 1.0 : 0.0); } } } void ViewModel::IsContentMode(const bool value) { m_isContentMode = value; } bool ViewModel::IsContentMode() { return m_isContentMode; } void ViewModel::ClearEventTokenVectors() { // Remove ChildrenChanged and ExpandedChanged events auto inner = GetVectorInnerImpl(); for (uint32_t i =0 ; i < Size(); i++) { if (auto current = inner->SafeGetAt(i)) { auto tvnCurrent = winrt::get_self<TreeViewNode>(current.as<winrt::TreeViewNode>()); tvnCurrent->ChildrenChanged(m_collectionChangedEventTokenVector.at(i)); tvnCurrent->RemoveExpandedChanged(m_IsExpandedChangedEventTokenVector.at(i)); } } // Remove SelectedNodeChildrenChangedEvent if (auto selectedNodes = m_selectedNodes.safe_get()) { for (uint32_t i = 0; i < selectedNodes.Size(); i++) { if (auto current = selectedNodes.GetAt(i)) { auto node = winrt::get_self<TreeViewNode>(current.as<winrt::TreeViewNode>()); node->ChildrenChanged(m_selectedNodeChildrenChangedEventTokenVector[i]); } } } // Clear token vectors m_collectionChangedEventTokenVector.clear(); m_IsExpandedChangedEventTokenVector.clear(); m_selectedNodeChildrenChangedEventTokenVector.clear(); }
33.932787
184
0.638751
riverar
eca81fbb773cabc99faaf2b9b23db83ceb9112a7
9,122
hpp
C++
VS/Spike-Izhikevich-LIB/v1/updateState_serial.hpp
HJLebbink/Spike-Izhi
b8ff31a436f55c0db6132362e8572bf999d699b5
[ "MIT" ]
null
null
null
VS/Spike-Izhikevich-LIB/v1/updateState_serial.hpp
HJLebbink/Spike-Izhi
b8ff31a436f55c0db6132362e8572bf999d699b5
[ "MIT" ]
null
null
null
VS/Spike-Izhikevich-LIB/v1/updateState_serial.hpp
HJLebbink/Spike-Izhi
b8ff31a436f55c0db6132362e8572bf999d699b5
[ "MIT" ]
null
null
null
// The MIT License (MIT) // // Copyright (c) 2017 Henk-Jan Lebbink // // 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 above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // 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. #pragma once #include <stdio.h> // for printf // stdio functions are used since C++ streams aren't necessarily thread safe //#include <intrin.h> // needed for compiler intrinsics #include <array> #include "../../Spike-Tools-LIB/SpikeSet1Sec.hpp" #include "../../Spike-Tools-LIB/Constants.hpp" #include "../../Spike-Izhikevich-LIB/SpikeTypesIzhikevich.hpp" namespace spike { namespace v1 { static inline int ltpIndex(const int neuronId, const int time, const int N) { return (time * N) + neuronId; } template <size_t nNeurons> static inline void updateState_X64_Blitz(float v[], float u[], const float ic[], const float is[], const float a[]) { for (size_t i = 0; i < nNeurons; ++i) { const float tt = 140 - u[i] + (is[i] * ic[i]); //const float tt = 140 - u[i] + ic[i]; v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + tt); // for numerical stability v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + tt); // time step is 0.5 ms u[i] += a[i] * ((0.2f * v[i]) - u[i]); } } template <size_t nNeurons> static inline void updateState_X64(float v[], float u[], const float ic[], const float is[], const float a[], const float b[]) { //__debugbreak(); //#pragma loop(hint_parallel(4)) for (size_t i = 0; i < nNeurons; ++i) { BOOST_ASSERT_MSG_HJ(!std::isfinite(v[i]), "v[" << i << "] is not finite"); BOOST_ASSERT_MSG_HJ(!std::isfinite(u[i]), "u[" << i << "] is not finite"); //const float tt = 140 - u[i] + (is[i] * ic[i]); const float tt = 140 - u[i] + ic[i]; v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + tt); // for numerical stability v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + tt); // time step is 0.5 ms u[i] += a[i] * ((b[i] * v[i]) - u[i]); if (u[i] > 50) { u[i] = 50; } if (v[i] > 100) { v[i] = 100; } } } template <size_t N, size_t D> static inline void updateStdp_X64(const unsigned int t, float ltd[N], float ltp[N][1001 + D]) { for (unsigned int i = 0; i < N; ++i) { ltd[i] *= 0.95f; ltp[i][t + D + 1] = 0.95f * ltp[i][t + D]; } } template <size_t nNeurons> static inline void updateState_Sse(float v[], float u[], const float ic[], const float is[], const float a[], const float b[]) { const __m128 c1 = _mm_set1_ps(0.5f); const __m128 c2 = _mm_set1_ps(0.04f); const __m128 c3 = _mm_set1_ps(5.0f); const __m128 c4 = _mm_set1_ps(140.0f); for (size_t i = 0; i < nNeurons; i += 4) { const __m128 ici = _mm_load_ps(&ic[i]); //const __m128 isi = _mm_load_ps(&is[i]); __m128 vi = _mm_load_ps(&v[i]); __m128 ui = _mm_load_ps(&u[i]); // + 140 - u[i] + (is[i] * ic[i]) // const __m128 tt = _mm_add_ps(_mm_sub_ps(_mm_mul_ps(isi, ici), ui), c4); // + 140 - u[i] + ic[i] const __m128 tt = _mm_add_ps(_mm_sub_ps(ici, ui), c4); ////////////////////////////////////////// // v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + tt); // for numerical stability const __m128 x1a = _mm_mul_ps(vi, c2); const __m128 x2a = _mm_add_ps(x1a, c3); const __m128 x3a = _mm_mul_ps(x2a, vi); const __m128 x4a = _mm_add_ps(x3a, tt); const __m128 x5a = _mm_mul_ps(x4a, c1); vi = _mm_add_ps(x5a, vi); ////////////////////////////////////////// // v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + tt); // time step is 0.5 ms const __m128 x1b = _mm_mul_ps(vi, c2); const __m128 x2b = _mm_add_ps(x1b, c3); const __m128 x3b = _mm_mul_ps(x2b, vi); const __m128 x4b = _mm_add_ps(x3b, tt); const __m128 x5b = _mm_mul_ps(x4b, c1); vi = _mm_add_ps(x5b, vi); ////////////////////////////////////////// // u[i] += a[i] * ((b[i] * v[i]) - u[i]); const __m128 bi = _mm_load_ps(&b[i]); const __m128 y1 = _mm_mul_ps(vi, bi); const __m128 y2 = _mm_sub_ps(y1, ui); const __m128 ai = _mm_load_ps(&a[i]); const __m128 y3 = _mm_mul_ps(y2, ai); ui = _mm_add_ps(y3, ui); /* BOOST_ASSERT_MSG_HJ(std::isfinite(vi.m128_f32[0]), "v[" << i << "][0] = " << vi.m128_f32[0] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(vi.m128_f32[1]), "v[" << i << "][1] = " << vi.m128_f32[1] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(vi.m128_f32[2]), "v[" << i << "][2] = " << vi.m128_f32[2] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(vi.m128_f32[3]), "v[" << i << "][3] = " << vi.m128_f32[3] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(ui.m128_f32[0]), "u[" << i << "][0] = " << ui.m128_f32[0] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(ui.m128_f32[1]), "u[" << i << "][1] = " << ui.m128_f32[1] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(ui.m128_f32[2]), "u[" << i << "][2] = " << ui.m128_f32[2] << " is not finite"); BOOST_ASSERT_MSG_HJ(std::isfinite(ui.m128_f32[3]), "u[" << i << "][3] = " << ui.m128_f32[3] << " is not finite"); */ _mm_store_ps(&v[i], vi); _mm_store_ps(&u[i], ui); } } template <size_t N, Delay D> static inline void updateStdp_Sse(const unsigned int t, float ltd[N], float ltp[N][1001 + D]) { for (unsigned int i = 0; i < N; i += 4) { // ltd[i] *= 0.95f; _mm_store_ps(&ltd[i], _mm_mul_ps(_mm_set1_ps(0.95f), _mm_load_ps(&ltd[i]))); // ltp[ltpIndex(i, t+D+1)+0] = 0.95f * ltp[ltpIndex(i, t+D)+0]; _mm_store_ps(&ltp[i][t + D + 1], _mm_mul_ps(_mm_set1_ps(0.95f), _mm_load_ps(&ltp[i][t + D]))); } } template <size_t nNeurons> static inline void updateState_Avx(float v[], float u[], const float ic[], const float is[], const float a[]) { for (size_t i = 0; i < nNeurons; i += 8) { const __m256 ai = _mm256_load_ps(&a[i]); const __m256 ici = _mm256_load_ps(&ic[i]); const __m256 isi = _mm256_load_ps(&is[i]); __m256 vi = _mm256_load_ps(&v[i]); __m256 ui = _mm256_load_ps(&u[i]); const __m256 c1 = _mm256_set1_ps(0.5f); const __m256 c2 = _mm256_set1_ps(0.04f); const __m256 c3 = _mm256_set1_ps(5.0f); const __m256 c4 = _mm256_set1_ps(140.0f); // + 140 - u[i] + (is[i] * ic[i]) // const __m256 tt = _mm256_add_ps(_mm256_sub_ps(_mm256_mul_ps(isi, ici), ui), c4); // + 140 - u[i] + ic[i] const __m256 tt = _mm256_add_ps(_mm256_sub_ps(ici, ui), c4); ////////////////////////////////////////// // v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + 140 - u[i] + ic[i]); // for numerical stability const __m256 x1a = _mm256_mul_ps(vi, c2); const __m256 x2a = _mm256_add_ps(x1a, c3); const __m256 x3a = _mm256_mul_ps(x2a, vi); const __m256 x4a = _mm256_add_ps(x3a, tt); const __m256 x5a = _mm256_mul_ps(x4a, c1); vi = _mm256_add_ps(x5a, vi); ////////////////////////////////////////// // v[i] += 0.5f * ((((0.04f * v[i]) + 5) * v[i]) + 140 - u[i] + ic[i]); // time step is 0.5 ms const __m256 x1b = _mm256_mul_ps(vi, c2); const __m256 x2b = _mm256_add_ps(x1b, c3); const __m256 x3b = _mm256_mul_ps(x2b, vi); const __m256 x4b = _mm256_add_ps(x3b, tt); const __m256 x5b = _mm256_mul_ps(x4b, c1); vi = _mm256_add_ps(x5b, vi); ////////////////////////////////////////// // u[i] += a[i] * ((0.2f * v[i]) - u[i]); const __m256 c5 = _mm256_set1_ps(0.2f); const __m256 y1 = _mm256_mul_ps(vi, c5); const __m256 y2 = _mm256_sub_ps(y1, ui); const __m256 y3 = _mm256_mul_ps(y2, ai); ui = _mm256_add_ps(y3, ui); _mm256_store_ps(&v[i], vi); _mm256_store_ps(&u[i], ui); } } template <size_t nNeurons, Delay D> static inline void updateStdp_Avx(const unsigned int t, float ltd[], float ltp[][1001 + D]) { for (unsigned int i = 0; i < nNeurons; i += 8) { // ltd[i] *= 0.95f; _mm256_store_ps(&ltd[i], _mm256_mul_ps(_mm256_set1_ps(0.95f), _mm256_load_ps(&ltd[i]))); // ltp[ltpIndex(i, t+D+1)+0] = 0.95f * ltp[ltpIndex(i, t+D)+0]; _mm256_store_ps(&ltp[i][t + D + 1], _mm256_mul_ps(_mm256_set1_ps(0.95f), _mm256_load_ps(&ltp[i][t + D]))); } } } }
36.931174
128
0.580355
HJLebbink
ecada5a1590c0f507a42fad6bfa0ba4000a66ebf
418
cpp
C++
Courses/Cpp.Saurabh-Shukla/code/l15-object-pointer.cpp
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Courses/Cpp.Saurabh-Shukla/code/l15-object-pointer.cpp
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Courses/Cpp.Saurabh-Shukla/code/l15-object-pointer.cpp
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
#include <iostream> using namespace std; class Box { int l, b, h; public: void set_dimension(int x, int y, int z) { l = x; b = y; h = z; } void show_dimension() { cout << "l = " << l << " b = " << b << " h = " << h << endl; } }; int main(void) { Box *p, small_box; p = &small_box; p->set_dimension(12, 10, 5); p->show_dimension(); return 0; }
16.72
68
0.464115
shihab4t