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
109
| 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
48.5k
⌀ | 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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7fca7f0a1ab5371c77521df02499fe293640447
| 1,435
|
hpp
|
C++
|
include/MeshEditor/Cube.hpp
|
THOSE-EYES/MeshEditor
|
6a58460a3ddfeba5d372aa92cd120b0c2a108c35
|
[
"Apache-2.0"
] | null | null | null |
include/MeshEditor/Cube.hpp
|
THOSE-EYES/MeshEditor
|
6a58460a3ddfeba5d372aa92cd120b0c2a108c35
|
[
"Apache-2.0"
] | null | null | null |
include/MeshEditor/Cube.hpp
|
THOSE-EYES/MeshEditor
|
6a58460a3ddfeba5d372aa92cd120b0c2a108c35
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright 2018 Illia Shvarov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "Command.hpp"
/**
* Constants
*/
#define MIN_ARGS 3
/**
* A command to create a cube in STL format
*/
class Cube : public Command {
public:
/**
* Getting command's title
* @return title
*/
const std::string getName() const override;
/**
* Start execution
* @param args arguments for the command
* @return error code or 0
*/
uint8_t execute(const map<string, string>&) override;
protected:
int length; // Length of a side
Coordinates origin; // Origin of the cube
string filepath; // File to save the cube
/**
* Parsing the arguments
* @param args the arguments
* @return error code or 0
*/
uint8_t parse(const map<string, string>&);
/**
* Create a shape of a cube out of vertexes
* @return a cube as an array of triangles
*/
const Triangles* createTriangles();
};
| 23.916667
| 75
| 0.69547
|
THOSE-EYES
|
f7fd34a2d2b297a07b9f4de7d7527453d94707e7
| 3,692
|
cpp
|
C++
|
Engine/Source/ComponentManager.cpp
|
AdamSzentesiGrip/MiniECS
|
c938b5e90746c06f9a4e8ca8e1c2d3e8bf3c3faf
|
[
"Unlicense"
] | null | null | null |
Engine/Source/ComponentManager.cpp
|
AdamSzentesiGrip/MiniECS
|
c938b5e90746c06f9a4e8ca8e1c2d3e8bf3c3faf
|
[
"Unlicense"
] | null | null | null |
Engine/Source/ComponentManager.cpp
|
AdamSzentesiGrip/MiniECS
|
c938b5e90746c06f9a4e8ca8e1c2d3e8bf3c3faf
|
[
"Unlicense"
] | null | null | null |
#include "../Include/ComponentManager.h"
namespace Mini
{
ComponentManager::ComponentManager()
{
_ComponentIDRegister = new std::map<size_t, int_componentID>();
_ComponentBuffers = new std::vector<ComponentBufferBase*>();
}
ComponentManager::~ComponentManager()
{
delete _ComponentIDRegister;
delete _ComponentBuffers;
}
bool ComponentManager::IsRegistered(size_t hashCode)
{
return (_ComponentIDRegister->count(hashCode) > 0);
}
void ComponentManager::RegisterComponentType(ComponentBufferBase* componentBuffer)
{
int_componentID componentID = componentBuffer->GetComponentID();
size_t componentHashCode = componentBuffer->GetComponentHashCode();
const char* componentName = componentBuffer->GetComponentName();
LOG("REG COMPONENT " << static_cast<uint32_t>(componentID) << ": " << componentName);
_ComponentIDRegister->insert({ componentHashCode, componentID });
_ComponentBuffers->push_back(componentBuffer);
return;
}
void ComponentManager::AddComponent(EntityData* entityData, ComponentBase& component, int_componentID componentID)
{
component._EntityData = entityData;
if (AddComponentKey(entityData, componentID))
{
LOG("ADD + COMPONENT TO ENTITY " << (int)entityData->EntityID << ": " << GetComponentTypeName(componentID));
entityData->ComponentIndices[componentID] = (*_ComponentBuffers)[componentID]->AddComponent(component);
}
else
{
LOG("UPD COMPONENT ON ENTITY " << (int)entityData->EntityID << ": " << GetComponentTypeName(componentID));
(*_ComponentBuffers)[componentID]->UpdateComponent(entityData->ComponentIndices[componentID], component);
}
}
ComponentBase* ComponentManager::GetComponent(EntityData* entityData, int_componentID componentID)
{
if (!HasComponent(entityData, componentID)) return nullptr;
LOG("GET < COMPONENT FROM ENTITY " << (int)entityData->EntityID << ": " << GetComponentTypeName(componentID));
return (*_ComponentBuffers)[componentID]->GetComponent(entityData->ComponentIndices[componentID]);
}
int_entityID ComponentManager::RemoveComponent(size_t index, int_componentID componentID)
{
LOG("REM - COMPONENT FROM ENTITY " << (int)index << ": " << GetComponentTypeName(componentID));
return (*_ComponentBuffers)[componentID]->RemoveComponent(index);
}
int_componentID ComponentManager::GetComponentID(size_t componentHashCode)
{
return _ComponentIDRegister->at(componentHashCode);
}
componentKey ComponentManager::GetComponentKey(int_componentID componentID)
{
componentKey componentKey = 1;
componentKey <<= componentID;
return componentKey;
}
bool ComponentManager::HasComponentKey(EntityData* entityData, componentKey componentKey)
{
return ((entityData->EntityComponentKey & componentKey) != 0);
}
bool ComponentManager::HasComponent(EntityData* entityData, int_componentID componentID)
{
return HasComponentKey(entityData, GetComponentKey(componentID));
}
bool ComponentManager::AddComponentKey(EntityData* entityData, int_componentID componentID)
{
componentKey componentKey = GetComponentKey(componentID);
if(HasComponentKey(entityData, componentKey))
{
return false;
}
entityData->EntityComponentKey |= componentKey;
return true;
}
bool ComponentManager::RemoveComponentKey(EntityData* entityData, int_componentID componentID)
{
componentKey componentKey = GetComponentKey(componentID);
if (!HasComponentKey(entityData, componentKey))
{
return false;
}
entityData->EntityComponentKey &= ~componentKey;
return true;
}
const char* ComponentManager:: GetComponentTypeName(int_componentID componentID)
{
return (*_ComponentBuffers)[componentID]->GetComponentName();
}
}
| 29.536
| 115
| 0.765439
|
AdamSzentesiGrip
|
7902f4e5ce76bdc4d61f5467c02544bbabca6ad9
| 640
|
hpp
|
C++
|
plugins/opengl/include/sge/opengl/target/set_flipped_area.hpp
|
cpreh/spacegameengine
|
313a1c34160b42a5135f8223ffaa3a31bc075a01
|
[
"BSL-1.0"
] | 2
|
2016-01-27T13:18:14.000Z
|
2018-05-11T01:11:32.000Z
|
plugins/opengl/include/sge/opengl/target/set_flipped_area.hpp
|
cpreh/spacegameengine
|
313a1c34160b42a5135f8223ffaa3a31bc075a01
|
[
"BSL-1.0"
] | null | null | null |
plugins/opengl/include/sge/opengl/target/set_flipped_area.hpp
|
cpreh/spacegameengine
|
313a1c34160b42a5135f8223ffaa3a31bc075a01
|
[
"BSL-1.0"
] | 3
|
2018-05-11T01:11:34.000Z
|
2021-04-24T19:47:45.000Z
|
// Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SGE_OPENGL_TARGET_SET_FLIPPED_AREA_HPP_INCLUDED
#define SGE_OPENGL_TARGET_SET_FLIPPED_AREA_HPP_INCLUDED
#include <sge/opengl/target/area_function.hpp>
#include <sge/renderer/pixel_rect.hpp>
#include <sge/renderer/screen_unit.hpp>
namespace sge::opengl::target
{
void set_flipped_area(
sge::opengl::target::area_function,
sge::renderer::pixel_rect const &,
sge::renderer::screen_unit);
}
#endif
| 26.666667
| 61
| 0.751563
|
cpreh
|
7904ba5b69e6949c2728b7908c9d040da5b38e9d
| 23,937
|
cpp
|
C++
|
Users.cpp
|
Yeeler/open-source-search-engine
|
260864b36404a550c5268d2e2224c18d42e3eeb0
|
[
"Apache-2.0"
] | null | null | null |
Users.cpp
|
Yeeler/open-source-search-engine
|
260864b36404a550c5268d2e2224c18d42e3eeb0
|
[
"Apache-2.0"
] | null | null | null |
Users.cpp
|
Yeeler/open-source-search-engine
|
260864b36404a550c5268d2e2224c18d42e3eeb0
|
[
"Apache-2.0"
] | null | null | null |
#include "Users.h"
Users g_users;
RdbTree g_testResultsTree;
// intialize User members
User::User(){
m_permissions = 0;
m_numTagIds = 0;
m_numColls = 0;
m_allColls = false;
m_numIps = 0;
m_allIps = false;
m_numPages = 0;
m_allPages = 0;
m_reLogin = false;
m_username[0] = '\0';
m_password[0] = '\0';
}
// verify if user has permission from this ip
bool User::verifyIp ( int32_t ip ){
//
if ( m_allIps ) return true;
// check the iplist
for (uint16_t i=0; i < m_numIps; i++ ){
int32_t ipCheck = m_ip[i] & ( ip & m_ipMask[i] );
// check if they match
if ( ipCheck == m_ip[i] ) return true;
}
return false;
}
// verify user pass
bool User::verifyPassword ( char *pass ){
//
if ( ! pass ) return false;
if ( strcmp ( pass, m_password ) == 0 ) return true;
return false;
}
// verify is has access to this coll
bool User::verifyColl ( int32_t collNum ){
if ( m_allColls ) return true;
//
if ( collNum < 0 ) return false;
for ( uint16_t i=0; i < m_numColls; i++ )
if ( m_collNum[i] == collNum ) return true;
return false;
}
// verify if the user has the supplied tagId
bool User::verifyTagId ( int32_t tagId ){
//if ( tagId == 0 || tagId >= ST_LAST_TAG ) return false;
if ( tagId == 0 ) return false;
for ( uint16_t i = 0; i < m_numTagIds; i++ )
if ( m_tagId[i] == tagId ) return true;
return false;
}
// check if user is allowed to access this page
bool User::verifyPageNum ( uint16_t pageNum ){
if ( pageNum >= PAGE_NONE ) return false;
for ( uint16_t i = 0; i < m_numPages; i++ ){
bool allow = ! ( m_pages[i] & 0x8000 );
if ( pageNum == (m_pages[i] & 0x7fff) ) return allow;
}
// check if pageNum is of dummy page
bool isDummy = true;
//if ( pageNum > PAGE_PUBLIC )
isDummy = false;
//
if ( m_allPages && !isDummy )
return true;
return false;
}
// get first page
int32_t User::firstPage ( ){
// return first allowed page
for ( uint16_t i = 0; i < m_numPages; i++ )
if ( ! (m_pages[i] & 0x8000) ) //&&
// (m_pages[i]&0x7fff) > PAGE_PUBLIC )
return m_pages[i];
// if all pages is set then just return the root page
if ( m_allPages ) return PAGE_ROOT;
return -1;
}
// intialize the members
Users::Users(){
m_init = false;
m_needsSave = false;
}
Users::~Users(){
}
bool Users::save(){
if ( ! m_needsSave ) return true;
if ( ! m_loginTable.save(g_hostdb.m_dir,"userlogin.dat",NULL,0) )
return log("users: userlogin.dat save failed");
return true;
}
// initialize cache, tree, loadUsers and also loadTestUrls
bool Users::init(){
// 8 byte key is an ip/usernameHash and value is the timestamp
m_loginTable.set ( 8 , 4,0,NULL,0,false,0,"logintbl" );
// initialize the testresults rdbtree
//
int32_t nodeSize = (sizeof(key_t)+12+1) + sizeof(collnum_t);
int32_t maxNodes = MAX_TEST_RESULTS;
int32_t maxMem = maxNodes * nodeSize;
// only need to call this once
if ( ! g_testResultsTree.set ( 0 , // fixedDataSize
maxNodes ,
true , // do balancing?
maxMem ,
false , // own data?
"tree-testresults",
false , // dataInPtrs
NULL , // dbname
12 , // keySize
false ))
return false;
// call this userlogin.dat, not turkLoginTable.dat!!
//if ( ! m_loginTable.load(g_hostdb.m_dir,"userlogin.dat", NULL,NULL) )
// log("users: failed to load userlogin.dat");
// try to load the turk test results
loadTestResults();
// load users from the file
m_init = loadUserHashTable ();
m_needsSave = false;
return m_init;
}
// load turk test results from
bool Users::loadTestResults ( ){
//
File file;
char testFile[1024];
sprintf(testFile,"%sturkTestResults.dat", g_hostdb.m_dir );
file.set(testFile);
//
if ( ! file.doesExist() ) return false;
int32_t fileSize = file.getFileSize();
if (fileSize <= 0 ) return false;
// open the file
if ( !file.open(O_RDONLY) ){
log(LOG_DEBUG,"Users error operning test result file %s",
testFile );
return false;
}
char *buf = NULL;
int32_t bufSize = 4096;
int32_t offset = 0;
int32_t numNodes = 0;
// read the turk results file
for ( int32_t i=0; i < fileSize; ){
// bail out if no node left in tree
if ( numNodes >= MAX_TEST_RESULTS ) break;
buf = (char *)mmalloc(bufSize,"UserTestResults");
if ( !buf ){
log(LOG_DEBUG,"Users cannot allocate mem for test"
" file buf");
return false;
}
int32_t numBytesRead = file.read(buf,bufSize,offset);
if ( numBytesRead < 0 ){
log(LOG_DEBUG,"Users error reading test result file %s",
testFile );
mfree(buf,bufSize,"UsersTestResults");
}
// set the offsets
char *bufEnd = buf + numBytesRead;
char *newLineOffset = bufEnd;
for ( char *p = buf; p < bufEnd; p++ ){
char temp[250];
char *line = temp;
int32_t items = 0;
char username[10];
int32_t timestamp;
uint16_t result;
while ( *p != '\n' && p < bufEnd){
*line++ = *p++;
if ( *p != ' ' && *p != '\n' ) continue;
*line = '\0';
switch(items){
case 0: strcpy(username,temp);
break;
case 1: timestamp = atoi(temp);
break;
case 2: result = atoi(temp);
break;
}
line = temp;
items++;
}
if ( p < bufEnd && *p == '\n')
newLineOffset = p;
if ( p >= bufEnd && *p != '\n') break;
// if the fields are not 3 then the line is corrupt
if ( items == 3){
key_t key;
key.n1 = hash32n(username);
key.n0 = ((int32_t)timestamp << 8)
| (result & 0xff);
int32_t node =
g_testResultsTree.addNode(0,(char*)&key);
if ( node < 0 ){
log(LOG_DEBUG,"Users error adding node"
" to testResultsTree");
mfree(buf,bufSize,"UsersTestResults");
return false;
}
numNodes++;
}
//else
//log(LOG_DEBUG,"Users corrupt line turkTestResuls file"
// ": %s", temp);
}
// adjust the offset
offset = file.getCurrentPos() - (int32_t)(bufEnd - newLineOffset);
i += bufSize - (int32_t)( bufEnd - newLineOffset );
mfree(buf,bufSize,"UsersTestResults");
}
file.close();
return true;
}
int32_t Users::getAccuracy ( char *username, time_t timestamp ){
//
// get key between 15
key_t key;
key.n1 = hash32n(username);
key.n0 = ((int32_t)timestamp << 8);
int32_t refNode = g_testResultsTree.getPrevNode( 0 , (char *)&key);
if ( refNode == -1 )
refNode = g_testResultsTree.getNextNode ( 0 ,(char*)&key);
if ( refNode == -1 ) return -1;
// initialize the voting paramaters
int32_t totalVotes = 0;
int32_t totalCorrect = 0;
// get the vote from the reference node
key_t *refKey = (key_t*)g_testResultsTree.getKey(refNode);
if ( refKey->n1 == key.n1 ){
totalVotes++;
if ( refKey->n0 & 0x01 ) totalCorrect++;
}
// scan in the forward direction
int32_t currentNode = refNode;
//key_t currentKey = *refKey;
//currentKey.n0 += 2;
for ( int32_t i=0; i < ACCURACY_FWD_RANGE; i++ ){
int32_t nextNode = g_testResultsTree.getNextNode(currentNode);
if ( nextNode == -1) break;
key_t *nextKey = (key_t *)g_testResultsTree.getKey(nextNode);
if ( refKey->n1 == nextKey->n1 ){
totalVotes++;
if ( nextKey->n0 & 0x01 ) totalCorrect++;
}
currentNode = nextNode;
// currentKey = *nextKey;
// currentKey.n0 += 2;
}
// scan in the backward direction
currentNode = refNode;
//currentKey = *refKey;
//currentKey.n0 -= 2;
for ( int32_t i=0; i < ACCURACY_BWD_RANGE; i++ ){
int32_t prevNode = g_testResultsTree.getPrevNode(currentNode);
if ( prevNode == -1) break;
key_t *prevKey = (key_t *)g_testResultsTree.getKey(prevNode);
if ( refKey->n1 == prevKey->n1 ){
totalVotes++;
if ( prevKey->n0 & 0x01 ) totalCorrect++;
}
currentNode = prevNode;
//currentKey = *prevKey;
//currentKey.n0 -= 2;
}
// don't compute accuracy for few data points
if ( totalVotes < ACCURACY_MIN_TESTS ) return -1;
// compute accuracy in percentage
int32_t accuracy = ( totalCorrect * 100 ) / totalVotes;
return accuracy;
}
// . parses individual row of g_users
// . individual field are separated by :
// and , is used to mention many params in single field
bool Users::parseRow (char *row, int32_t rowLen, User *user ){
// parse individual user row
char *current = row;
char *end = &row[rowLen];
int32_t col = 0;
for ( ; col < 7 ;){
char temp[1024];
char *p = &temp[0];
bool hasStar = false;
while ( current <= end ){
if ( *current == ',' || *current == ':' ||
current == end ){
*p = '\0';
// star is present in data
// its allowed only for column 0 & 2
if (*current == '*' && col != 0 && col != 2 &&
col != 4 ){
log(LOG_DEBUG,"Users * can only"
"be user for collection,ip & pages: %s",
row );
return false;
}
// set the user param
setDatum ( temp, col, user, hasStar );
p = &temp[0];
// reset hasStar for all the other columns
// other then ip column 1
if ( col != 1 ) hasStar = false;
}
else {
//if ( *current == '*' || isalnum(*current) ||
// *current == '_' || *current=='.') {
if ( *current == '*' )
hasStar = true;
*p++ = *current;
}
current++;
if ( *(current-1) == ':') break;
//else{
// wrong format
// log(LOG_DEBUG,"Users error in log line: %s",
// row );
// return false;
//
}
if ( current >= end ) break;
col++;
QUICKPOLL(0);
}
if ( current < end ) return false;
return true;
}
// set individual user field from the given column/field
void Users::setDatum ( char *data, int32_t column, User *user, bool hasStar){
int32_t dataLen = gbstrlen (data);
if ( dataLen <= 0 || user == NULL || column < 0 ) return;
// set the user info depending on the column
// number or field
switch ( column ){
case 0:{
if ( user->m_allColls ) break;
if ( *data == '*' ){
user->m_allColls = true;
break;
}
collnum_t collNum = g_collectiondb.getCollnum(data);
if (collNum >= 0 ){
user->m_collNum[user->m_numColls] = collNum;
user->m_numColls++;
}
break;
}
case 2:{
if ( dataLen >= MAX_USER_SIZE ) data[MAX_USER_SIZE] = '\0';
strcpy ( user->m_username, data );
break;
}
case 1:{
if (user->m_allIps || user->m_numIps > MAX_IPS_PER_USER) break;
// scan ip
// if start is present find the location of *
uint32_t starMask = 0xffffffff;
if ( hasStar ){
char *p = data;
if ( *data == '*' && *(data+1) =='\0'){
user->m_allIps = true;
break;
}
// get the location of *
unsigned char starLoc = 4;
while ( *p !='\0'){
if ( *p == '*'){
// ignore the whole byte for
// that location
// set it to 0
*p = '0';
if ( starMask==0xffffffff )
starMask >>= 8*starLoc;
}
if ( *p == '.' ) starLoc--;
// starLoc = ceil(starLoc/2);
p++;
}
}
// if startMask means all ips are allowed
if ( starMask==0 ){ user->m_allIps = true; break;}
int32_t iplen = gbstrlen ( data );
int32_t ip = atoip(data,iplen);
if ( ! ip ) break;
user->m_ip[user->m_numIps] = ip;
user->m_ipMask[user->m_numIps] = starMask;
user->m_numIps++;
break;
}
case 3:{
if ( gbstrlen(data) > MAX_PASS_SIZE ) data[MAX_PASS_SIZE] = '\0';
strcpy ( user->m_password, data);
break;
}
case 5:{
if ( user->m_numPages >= MAX_PAGES_PER_USER ) break;
char *p = data;
user->m_pages[user->m_numPages]=0;
if ( hasStar ){
user->m_allPages = true;
break;
}
// if not allowed set MSB to 1
if ( *p == '-' ){
user->m_pages[user->m_numPages] = 0x8000;
p++;
}
int32_t pageNum = g_pages.getPageNumber(p);
if ( pageNum < 0 || pageNum >= PAGE_NONE ){
log(LOG_DEBUG,"Users Invalid Page - %s for user %s", p,
user->m_username );
break;
}
user->m_pages[user->m_numPages] |= ((uint16_t)pageNum & 0x7fff);
user->m_numPages++;
break;
}
case 6:{
// save the user permission
// only one user is allowed
// user permission keyword no longer used
/*if ( ! user->m_permissions & 0xff ){
if (strcmp(data,"master")==0)
user->m_permissions = USER_MASTER;
else if (strcmp(data,"admin")==0)
user->m_permissions = USER_ADMIN;
else if (strcmp(data,"client")==0)
user->m_permissions = USER_CLIENT;
else if (strcmp(data,"spam")==0)
user->m_permissions = USER_SPAM;
else if (strcmp(data,"public")==0)
user->m_permissions = USER_PUBLIC;
}else{ */
// save the tags
int32_t tagId = 0;
int32_t strLen = gbstrlen(data);
// backup over ^M
if ( strLen>1 && data[strLen-1]=='M' && data[strLen-2]=='^' )
strLen-=2;
//
// skip for now, it cores for "english" because we removed
// that tag from the list of tags in Tagdb.cpp
//
log("users: skipping language tag");
break;
tagId = getTagTypeFromStr ( data, strLen );
if ( tagId > 0 ) { // && tagId < ST_LAST_TAG ){
user->m_tagId[user->m_numTagIds] = tagId;
user->m_numTagIds++;
}
else {
log(LOG_DEBUG,"Users Invalid tagname - %s for user %s", data,
user->m_username );
//char *xx=NULL;*xx=0;
}
//}
break;
}
case 4:{
if ( *data == '1' && gbstrlen(data)==1 ) user->m_reLogin=true;
break;
}
default:
//
log(LOG_DEBUG, "Users invalid column data: %s", data);
}
}
// . load users from Conf::g_users if size of g_users
// changes and lastreadtime is > USER_DATA_READ_FREQ
// . returns false and sets g_errno on error
bool Users::loadUserHashTable ( ) {
// read user info from the file and add to cache
char *buf = &g_conf.m_users[0];
uint32_t bufSize = g_conf.m_usersLen;
//time_t now = getTimeGlobal();
// no users?
if ( bufSize <= 0 ) {
//log("users: no <users> tag in gb.conf?");
return true;
}
// what was this for?
//if ( bufSize <= 0 || ( bufSize == m_oldBufSize
// && (now - m_oldBufReadTime) < USER_DATA_READ_FREQ ))
// return false;
// init it
if ( ! m_ht.set (12,sizeof(User),0,NULL,0,false,0,"userstbl"))
return false;
// read user data from the line and add it to the cache
char *p = buf;
uint32_t i = 0;
for ( ; i < bufSize; i++){
// read a line from buf
char *row = p;
int32_t rowLen = 0;
while ( *p != '\r' && *p != '\n' && i < bufSize ){
i++; p++; rowLen++;
}
if ( *p == '\r' && *(p+1) == '\n' ) p+=2;
else if ( *p == '\r' || *p == '\n' ) p++;
if ( rowLen <= 0) break;
// set "user"
User user; if ( ! parseRow ( row, rowLen, &user) ) continue;
// skip empty usernames
if ( !gbstrlen(user.m_username) || !gbstrlen(user.m_password) )
continue;
// make the user key
key_t uk = hash32n ( user.m_username );
// grab the slot
int32_t slot = m_ht.getSlot ( &uk );
// get existing User record, "eu" from hash table
User *eu = NULL;
if ( slot >= 0 ) eu = (User *)m_ht.getValueFromSlot ( slot );
// add the user. will overwrite him if in there
if ( ! m_ht.addKey ( &uk , &user ) ) return false;
}
return true;
}
// . get User record from user cache
// . return NULL if no record found
User *Users::getUser (char *username ) { //,bool cacheLoad){
// bail out if init has failed
if ( ! m_init ) {
log("users: could not load users from cache ");
return NULL;
}
if ( ! username ) return NULL;
// check for user in cache
key_t uk = hash32n ( username );
return (User *)m_ht.getValue ( &uk );
}
// . check if user is logged
// . returns NULL if session is timedout or user not logged
// . returns the User record on success
User *Users::isUserLogged ( char *username, int32_t ip ){
// bail out if init has failed
if ( !m_init ) return (User *)NULL;
// get the user to the login cache
// get user record from cache
// return NULL if not found
User *user = getUser (username);
if ( !user ) return NULL;
//if ( user->m_reLogin ) return user;
// make the key a combo of ip and username
uint64_t key;
key = ((int64_t)ip << 32 ) | (int64_t)hash32n(username);
int32_t slotNum = m_loginTable.getSlot ( &key );
if ( slotNum < 0 ) return NULL;
// if this is true, user cannot time out
if ( user->m_reLogin ) return user;
// return NULL if user sesssion has timed out
int32_t now = getTime();
//int32_t timestamp = m_loginTable.getValueFromSlot(slotNum);
// let's make it a permanent login now!
//if ( (now-timestamp) > (int32_t)USER_SESSION_TIMEOUT ){
// m_loginTable.removeKey(key);
// return NULL;
//}
m_needsSave = true;
// if not timed out then add the new access time to the table
if ( ! m_loginTable.addKey(&key,&now) )
log("users: failed to update login of user %s : %s",username,
mstrerror(g_errno) );
return user;
}
// . login the user
// . adds the user to the login table
// . the valud is the last access timestamp of user
// which is used for session timeout
bool Users::loginUser ( char *username, int32_t ip ) {
// bail out if init has failed
if ( ! m_init ) return false;
// add the user to the login table
//key_t cacheKey = makeUserKey ( username, &cacheKey );
uint64_t key;
key = ((int64_t)ip << 32 ) | (int64_t)hash32n(username);
m_needsSave = true;
// add entry to table
int32_t now = getTime();
if ( m_loginTable.addKey(&key,&now) ) return true;
return log("users: failed to login user %s : %s",
username,mstrerror(g_errno));
}
bool Users::logoffUser( char *username, int32_t ip ){
uint64_t key;
key = ((int64_t)ip << 32 ) | (int64_t)hash32n(username);
m_loginTable.removeKey(&key);
return true;
}
char *Users::getUsername ( HttpRequest *r ){
// get from cgi before cookie so we can override
char *username = r->getString("username",NULL);
if ( !username ) username = r->getString("user",NULL);
// cookie is last resort
if ( !username ) username = r->getStringFromCookie("username",NULL);
//if ( !username ) username = r->getString("code",NULL);
// use the password as the user name if no username given
if ( ! username ) username = r->getString("pwd",NULL);
return username;
}
// check page permissions
bool Users::hasPermission ( HttpRequest *r, int32_t page , TcpSocket *s ) {
if ( r->isLocal() ) return true;
// get username from the request
char *username = getUsername(r);
// msg28 always has permission
if ( username &&
s &&
strcmp(username,"msg28")==0 ) {
Host *h = g_hostdb.getHostByIp(s->m_ip);
// we often ssh tunnel in through router0 which is also
// the proxy, but now the proxy uses msg 0xfd to forward
// http requests, so we no longer have to worry about this
// being a security hazard
//Host *p = g_hostdb.getProxyByIp(s->m_ip);
//if ( h && ! p ) return true;
// if host has same ip as proxy, DONT TRUST IT
//if ( h && p->m_ip == h->m_ip )
// return log("http: proxy ip same as host ip.");
if ( ! h )
return log("http: msg28 only good internally.");
// we are good to go
return true;
}
return hasPermission ( username, page );
}
// does user have permission to view and edit the parms on this page?
bool Users::hasPermission ( char *username, int32_t page ){
//if ( !username ) return false;
if ( ! username ) username = "public";
// get ths user from cache
User *user = getUser(username);
if ( !user ) return false;
// verify if user has access to the page
return user->verifyPageNum(page);
}
// get the highest user level for this client
//int32_t Pages::getUserType ( TcpSocket *s , HttpRequest *r ) {
bool Users::verifyUser ( TcpSocket *s, HttpRequest *r ){
//
//bool isIpInNetwork = true;//g_hostdb.isIpInNetwork ( s->m_ip );
if ( r->isLocal() ) return true;
int32_t n = g_pages.getDynamicPageNumber ( r );
User *user;
char *username = getUsername( r);
//if ( !username ) return false;
// if no username, assume public user. technically,
// they are verified as who they claim to be... noone.
if ( ! username ) return true;
// public user need not be verified
if ( strcmp(username,"public") == 0 ) return true;
// user "msg28" is valid as int32_t as he is on one of the machines
// and not the proxy ip
if ( s && strcmp(username,"msg28")==0 ) {
Host *h = g_hostdb.getHostByIp(s->m_ip);
if ( h && ! h->m_isProxy ) return true;
// if he's from 127.0.0.1 then let it slide
//if ( s->m_ip == 16777343 ) return true;
//if ( h && h->m_isProxy ) return true;
// otherwise someone could do a get request with msg28
// as the username and totally control us...
return log("http: msg28 only good internally and not "
"from proxy.");
}
char *password = r->getString("pwd",NULL);
// this is the same thing!
if ( password && ! password[0] ) password = NULL;
/*
// the possible proxy ip
int32_t ip = s->m_ip;
// . if the request is from the proxy, grab the "uip",
// the "user ip" who originated the query
// . now the porxy uses msg 0xfd to forward its requests so if we
// receive this request from ip "ip" it is probably because we are
// doing an ssh tunnel through router0, which is also the proxy
if ( g_hostdb.getProxyByIp ( ip ) ) {
// attacker could add uip=X and gain access if we are logged
// in through X. now we have moved the proxy off of router0
// and onto gf49...
return log("gb: got admin request from proxy for "
"user=%s. ignoring.",username);
}
*/
// if the page is login then
// get the username from the request
// and login the user if valid
if ( n == PAGE_LOGIN ){
//
//username = r->getString("username");
//char *password = r->getString("pwd");
// if no username return
//if ( ! username ) return 0;
// get the user information
user = g_users.getUser ( username );
// if no user by that name
// means bad username, return
if ( ! user ) return 0;
// verify pass and return if bad
if ( ! user->verifyPassword ( password ) ) return 0;
}
else if ( password ) {
user = g_users.getUser(username);
if (!user) return 0;
//password = r->getString("pwd",NULL);
if ( !user->verifyPassword( password) ) return 0;
// . add the user to the login cache
// . if we don't log him in then passing the username/pwd
// in the hostid links is not good enough, we'd also have
// to add username/pwd to all the other links too!
g_users.loginUser(username,s->m_ip);
}
else {
// check the login table and users cache
user = g_users.isUserLogged ( username, s->m_ip );
// . if no user prsent return 0 to indicate that
// user is not logged in.
// . MDW: no, because the cookie keeps sending
// username=mwells even though i don't want to login...
// i just want to do a search and be treated like public
if ( ! user ) return 0;
}
// verify ip of the user
bool verifyIp = user->verifyIp ( s->m_ip );
if ( ! verifyIp ) return 0;
// verify collection
char *coll = r->getString ("c");
if( !coll) coll = g_conf.m_defaultColl;
int32_t collNum = g_collectiondb.getCollnum(coll);
bool verifyColl = user->verifyColl (collNum);
if ( ! verifyColl ) return 0;
// add the user to the login cache
if ( n == PAGE_LOGIN || n == PAGE_LOGIN2 ){
if ( ! g_users.loginUser ( username, s->m_ip ) ) return 0;
}
// now if everything is valid
// get the user permission
// i.e USER_MASTER | USER_ADMIN etc.
//int32_t userType = user->getPermissions ( );
// . Commented by Gourav
// . Users class used
//hif ( userType == USER_MASTER || userType == USER_ADMIN
// || userType == USER_PUBLIC )
// userType &= isIpInNetwork;
//if ( g_conf.isMasterAdmin ( s , r ) ) return USER_MASTER;
// see if has permission for specified collection
//CollectionRec *cr = g_collectiondb.getRec ( r );
// if no collection specified, assume public access
//if ( ! cr ) return USER_PUBLIC;
//if ( cr->hasPermission ( r , s ) ) return USER_ADMIN;
//if ( cr->isAssassin ( s->m_ip ) ) return USER_SPAM;
// otherwise, just a public user
//return USER_PUBLIC;
//return userType;
return true;
}
| 26.685619
| 77
| 0.618081
|
Yeeler
|
790668ab16a374fc5914f305f2afa4855615ed99
| 37,027
|
cpp
|
C++
|
FindMeSAT_SW/amateurfunk-funkrufmaster_19862/src/digi.cpp
|
DF4IAH/GPS-TrackMe
|
600511a41c995e98ec6e06a9e5bb1b64cce9b7a6
|
[
"MIT"
] | 2
|
2018-01-18T16:03:41.000Z
|
2018-04-01T15:55:59.000Z
|
FindMeSAT_SW/amateurfunk-funkrufmaster_19862/src/digi.cpp
|
DF4IAH/GPS-TrackMe
|
600511a41c995e98ec6e06a9e5bb1b64cce9b7a6
|
[
"MIT"
] | null | null | null |
FindMeSAT_SW/amateurfunk-funkrufmaster_19862/src/digi.cpp
|
DF4IAH/GPS-TrackMe
|
600511a41c995e98ec6e06a9e5bb1b64cce9b7a6
|
[
"MIT"
] | 2
|
2020-05-22T17:01:24.000Z
|
2021-10-08T15:53:01.000Z
|
/****************************************************************************
* *
* *
* Copyright (C) 2002-2004 by Holger Flemming *
* *
* This Program is free software; you can redistribute ist and/or modify *
* it under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or *
* (at your option) any later versions. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRENTY; 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 receved a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
****************************************************************************
* *
* Author: *
* Jens Schoon, DH6BB email : dh6bb@darc.de *
* PR : dh6bb@db0whv.#nds.deu.eu *
* *
* List of other authors: *
* Holger Flemming, DH4DAI email : dh4dai@amsat.org *
* PR : dh4dai@db0wts.#nrw.deu.eu *
* *
****************************************************************************/
#include "digi.h"
#include "spoolfiles.h"
#include "board.h"
#include "logfile.h"
#include "callsign.h"
String digi_config_file::digi_typen[5]={"UNKNOWN", "FLEX", "TNN", "XNET" };
/* Hier mal einige Gedanken dazu von DH6BB:
Linkstatus:
12345678901234567890
DB0WHV<>DB0LER 11/12
DB0WHV<>DB0BHV 1+/3+ (Laufzeit 100/300 bis 199/399)
DB0WHV<>DB0PDF 2+/1* (Laufzeit 200/1000 bis 299/1999)
DB0WHV<>DB0TNC --/-- (Kein Link)
DB0WHV<>DB0SM (-/-) (Link weg, gibt aber Umweg)
DB0WHV<>DB0SM (./.) (Laufzeit 10/10 bis 99/99, gibt aber schnelleren Umweg)
Wir nehmen die Zahlen von Flexnet. TNN-Zeiten teilen wir durch 100.
Das entspricht etwa den Flexnet-Zeiten.
Digi-Status:
12345678901234567890
DB0WHV Up: 123d
Destinations : 689
Zeile noch frei
Zeile noch frei
Bitte Kommentare.
Hier der Vorschlag von DH4DAI:
Die gesamte Rubrik "Digipeater" besteht aus 10 Slots a 4 Zeilen, also aus
40 Zeilen. Jeder Digipeater, der automatisch abgefragt wird, erhaelt eine
Statuszeile. Darunter koennen fuer jeden Digipeater beliebig viele Einstiege
und Links konfiguriert werden, deren Status ebenfalls in einer Zeile
dargestellt wird.
Es gibt die folgenden Formate:
Statuszeile eines Digipeaters:
==============================
12345678901234567890
DB0WTS/JO31NK ##:##*
------ Uptime
Das Format der Zeitausgabe der Klasse delta_t muss fuer die Uptime leicht
modifiziert werden, da normalerweise ein Leerzeichen vor der Dimension
eingefuegt wird. Dies ist hier aus Platzgruenden nicht moeglich.
Bei den Statuszeilen von Einstiegen und Links wurden als Grundlage die bei
RMNC/Flexnet zur Verfuegung stehenden Informationen benutzt. Fuer andere
Knotenrechnersysteme muss geschaut werden, ob diese Informationen zur
Verfuegung stehen oder ob andere Informationen angezeigt werden koennen
Statuszeile eines Einstiegs
===========================
12345678901234567890
70cm ### #.## * ###
--- Quality
------ Datenrate
--- Anzahl der QSOs
---- Kuerzel des Einstiegs
Die Quality wird von Flexnet der Prozentsatz der als korrekt bestaetigten
Info-Frames auf der Anzeige angezeigt. Es handelt sich um einen Integer
zwischen 0 und 100
Die Datenrate wird bei Flexnet in KByte / 10min angegeben. Um einen direkten
Vergleich zur Nenndatenrate zu haben, kann diese Datenrate in Bit/s
(1 KByte / 10min = 13,653 Bit/s ) umgerechnet werden. Es werden beide
Richtungen addiert.
Die Anzahl der QSOs auf diesem Port wird von Flexnet direkt ausgegeben
Als Kuerzel dient eine eindeutige Kennung dieses Einstiegs aus vier Zeichen,
z.B. '70cm' ' 2m ', ' 9k6' oder '76k8'
Statuszeile eines Links
=======================
12345678901234567890
0IUZ #.## * ## #####
----- Linkzeit
-- Quality
------ Datenrate
---- Kuerzel
Die Linkzeit wird in einer Notation angegeben, wie von Jens vorgeschlagen
Fuer die Quality stehen hier nur zwei Ziffern zur Verfuegung eine Quality von
100% wird mit '1+' angegeben.
Fuer die Datenrate gilt das gleiche, wie bei den Einstiegen
Das Kuerzel ist hier wiede eine eindeutige Kennung aus vier Buchstaben,
ueblicherweise Ziffer und Suffix des Rufzeichens des Linkpartners
Zusatzfunktion Sysopalarm
=========================
Fuer den Fall, dass sich bestimmte Parameter derart verschlechtern, dass
die Vermutung besteht, dass ein technisches Problem aufgetreten ist, kann
als Zusatzfunktion ein Funkruf zu einem technischen Verantwortlichen
ausgeloest werden. Folgende Alarmzustaende sind moeglich:
* Digipeateralarm
Wird ausgeloest, wenn ein Digipeaterneustart erkannt wurde oder wenn ein
Verbindungsaufbau zu diesem Digipeater gescheitert ist.
Ein Digipeaterneustart ist daran zu erkennen, dass die Uptime kleiner ist,
als bei der letzten Abfrage.
* Einstiegsalarm
Wird ausgeloest, wenn die Uebertragungsqualitaet auf diesem Einstieg
signifikant abgesunken ist.
* Linkalarm
Wird ausgeloest, wenn die Uebertragungsqualitaet auf diesem Link
signifikant abgesunken ist oder die Linkzeiten signifikant angestiegen sind.
Was als signifikante abnahme oder anstieg gewertet wird, muss noch genau
definiert werden.
Die Konfiguration erfolgt ueber eine Konfigurationsdatei, deren Format wie
folgt aussehen koennte:
#
# Kommentare,
#
#
# Hier beginnt jetzt die Konfiguration eines Digipeaters
#
DIGI <rufzeichen>
#
# Zur Digikonfiguration gehoeren Pfad, Digityp, etc
#
PFAD <connect_pfad>
#
TYP [FLEX|TNN|...]
#
ALARM <rufzeichen>,<rufzeichen>,...
#
# gibt an, wer bei einem Digipeateralarm zu alarmieren ist
#
# Nun beginnt die Konfiguration eines Einstiegs
#
EINSTIEG <kuerzel> <port-nr>
#
ALARM <rufzeichen>,<rufzeichen>,...
#
ENDE
#
# Ende der Einstiegsdeklaration
#
# Nun beginnt die Linkdeklaration
#
LINK <kuerzel> <port-nr>
#
ALARM <rufzeichen>,<rufzeichen>,...
#
ENDE
#
# Ende der Linkdeklaration
#
#
ENDE
#
# Ende der Digipeaterdeklaration
#
#
Fehlt noch was in der Konfiguration ?
Kommentare zu meinem Vorschlag ???
*/
extern config_file configuration;
extern spoolfiles spool;
extern callsign G_mycall;
extern digi_control Digi;
digi_control::digi_control(void)
{
start_flag = false;
start_first = false;
activ = false;
last_fetch = zeit(-1);
}
digi_control::~digi_control(void)
{
}
/*
----------------------------------------------------------------------------
zunaechst kommen alle Methoden der Konfigurations-Datei-Klasse
digi_config_files
----------------------------------------------------------------------------
*/
digi_config_file::digi_config_file( void )
{
slot = 0;
};
digi_config_file::digi_config_file( String & dname )
{
read(dname);
}
void digi_config_file::read( String & dname )
{
ifstream cfg_file(strtochar(dname));
if (!cfg_file)
throw Error_could_not_open_digi_configfile();
else
{
dateiname = dname;
String line;
link_anzahl=0;
enabled=false;
while (cfg_file)
{
line.getline(cfg_file,250);
int l = line.slen();
if (l > 0 && line[0] != '#')
{
try
{
int p;
digi.set_format(false);
if ((p = line.pos(String('='))) != -1 )
{
String parameter = line.copy(0,p);
String wert = line.copy(p+1,l-p-1);
wert.kuerze();
if (parameter == "DIGI")
digi = callsign(wert);
else if (parameter == "SLOT")
slot = wert.Stoi();
else if (parameter == "STATUS" )
{
if (wert=="ENABLED")
enabled=true;
}
else if (parameter == "TYP" )
{
if (wert=="TNN")
typ=tnn;
else if (wert=="FLEX")
typ=flexnet;
else if (wert=="XNET")
typ=xnet;
else
typ=unknown;
}
else if (parameter == "PFAD")
pfad = connect_string(wert);
else if (parameter == "LINK")
{
link_call[link_anzahl] = callsign(wert);
link_anzahl++;
}
else
throw Error_unknown_parameter_in_digi_configfile();
}
else
throw Error_wrong_format_in_digi_config_file();
}
catch( Error_syntax_fehler_in_connect_string )
{
throw Error_wrong_format_in_digi_config_file();
}
catch( Error_no_callsign )
{
throw Error_wrong_format_in_digi_config_file();
}
catch( Error_not_a_locator )
{
throw Error_wrong_format_in_digi_config_file();
}
}
}
}
#ifdef _DEBUG_DIGI_
cerr << "DIGI: " << digi << " Typ: " << digi_typen[typ] << " Path: " << pfad << endl;
cerr << "Links: " << link_anzahl << endl;
#endif
}
void digi_config_file::PrintOn( ostream &strm )
{
callsign call;
digi.set_format(false);
strm << "#" << endl;
strm << "# Digi-configuration-file!" << endl;
strm << "# automaticaly generated, please do not edit!" << endl;
strm << "#" << endl;
if (enabled)
strm << "STATUS=ENABLED" << endl;
else
strm << "STATUS=DISABLED" << endl;
strm << "DIGI=" << digi << endl;
strm << "PFAD=" << pfad << endl;
strm << "TYP=" << digi_typen[typ] << endl;
strm << "SLOT=" << slot << endl;
for (int i=0; i<link_anzahl; i++)
{
try
{
call=callsign(link_call[i]);
strm << "LINK=" << link_call[i] << endl;
}
catch (Error_no_callsign)
{
}
}
strm << "#" << endl;
}
void digi_config_file::show(ostream &strm, char cr )
{
digi.set_format(true);
digi.set_nossid(false);
strm << digi << setw(2) << slot << setw (8) << digi_typen[typ] << " " << link_anzahl << " " << pfad << cr;
digi.set_format(false);
}
void digi_config_file::full_show(ostream &strm, char cr )
{
digi.set_format(true);
digi.set_nossid(false);
strm << "Digi : " << digi << cr;
strm << "Digi-Typ : " << digi_typen[typ] << cr;
strm << "Slot : " << slot << cr;
strm << "Connect-Pfad : " << pfad << cr;
for (int i=0; i<link_anzahl; i++)
strm << "Link : " << link_call[i] << cr;
digi.set_format(false);
if (enabled)
strm << "Status : Enabled" << cr;
else
strm << "Status : Disabled" << cr;
}
void digi_config_file::save(void)
{
ofstream ostr(strtochar(dateiname));
#ifdef _DEBUG_DIGI_
cerr << "SAVE Digistat" << endl;
#endif
if (ostr)
{
PrintOn(ostr);
}
}
digi_config_file::~digi_config_file( void )
{
}
void digi_control::start(void)
{
if (activ)
{
start_flag = true;
start_first = true;
}
}
bool digi_control::set_status(const callsign &call, bool status)
{
try
{
digi_config_file digicfg = digifiles.find(call);
digicfg.enabled=status;
if (digifiles.set(call,digicfg))
{
digicfg.save();
return true;
}
return false;
}
catch( Error_unknown_digi )
{
return false;
}
}
bool digi_control::set_typ(const callsign &call, const String &typ)
{
try
{
digi_config_file digicfg = digifiles.find(call);
digicfg.typ=unknown;
if (typ=="TNN")
digicfg.typ=tnn;
else if (typ=="FLEX")
digicfg.typ=flexnet;
else if (typ=="XNET")
digicfg.typ=xnet;
if (digifiles.set(call,digicfg))
{
digicfg.save();
return true;
}
return false;
}
catch( Error_unknown_digi )
{
return false;
}
}
// Der Destruktor bleibt leer
digi_status::~digi_status( void )
{
}
digi_interface::digi_interface(String &outp, bool ax_flag, digi_config_file &digi_confg) : interfaces(outp,ax_flag)
{
digi_cfg = digi_confg; // Daten in klasseninterner Variablen speichern
set_maske();
mdg.gefundene_links=0;
set_connect_path(digi_cfg.pfad);
first_connect(outp);
interface_id = 'I';
last_activity = zeit();
mdg.call = digi_cfg.digi;
}
// Der Destruktor bleibt leer
digi_interface::~digi_interface( void )
{
}
bool digi_interface::do_process( bool rx_flag, String &outp )
{
digi_control Digi;
outp = "";
if (rx_flag)
{
String inp;
while (get_line(inp))
{
// Steht in der Zeile "reconnected" ? Dann wird der Prozess beendet
if (inp.in("*** reconnected") || inp.in("Reconnected to"))
return false;
else
{
if (connect_prompt)
{
if (maske != 0)
digi_line(inp);
if (maske == 0)
{
Digi.meldung(digi_cfg.slot,mdg,digi_cfg);
in_msg++;
#ifdef _DEBUG_DIGI_
cerr << "Maske ist Null" << endl;
#endif
return false;
}
}
else
{
#ifdef _DEBUG_DIGI_
cerr << "Connected" << endl;
#endif
String command;
switch (digi_cfg.typ)
{
case flexnet:
command = "p *";
break;
case xnet:
command = "s *\r\nl";
break;
case tnn:
command = "s\r\nr v";
break;
default:
return false;
}
outp.append(command + char(13)); // Befehl senden
connect_prompt=true;
last_activity = zeit();
}
}
}
}
return true;
}
digi_config_files::digi_config_files( void )
{
files.clear();
}
digi_config_files::digi_config_files( config_file& cfg )
{
files.clear();
syslog slog(cfg);
try
{
digi_dir_name = cfg.find("DIGI");
DIR *digi_dir;
digi_dir = opendir(strtochar(digi_dir_name));
if (digi_dir != NULL)
{
struct dirent *entry;
while ((entry = readdir(digi_dir)) != NULL )
{
if ( (strcmp(entry->d_name,".") != 0) && (strcmp(entry->d_name,"..")))
{
String fname(digi_dir_name + entry->d_name);
if (fname.in(String(".digi")))
try
{
files.push_back(digi_config_file(fname));
}
catch(Error_could_not_open_digi_configfile)
{
slog.eintrag("Digi-Configurationsfile "+fname+" nicht zu oeffnen",LOGMASK_PRGRMERR);
}
catch(Error_unknown_parameter_in_digi_configfile)
{
slog.eintrag("Unbekannter Parameter in digi-Config-Datei "+fname,LOGMASK_PRGRMERR);
}
catch(Error_wrong_format_in_digi_config_file)
{
slog.eintrag("Falsches Dateiformat in digi-Config-Datei "+fname,LOGMASK_PRGRMERR);
}
}
}
closedir(digi_dir);
}
}
catch( Error_parameter_not_defined )
{
}
}
bool digi_config_files::get_first( digi_config_file &f )
{
it = files.begin();
if (it != files.end())
{
f = *it;
return true;
}
else
return false;
}
bool digi_config_files::get_next( digi_config_file &f )
{
if (it == files.end())
return false;
else
{
it++;
if (it != files.end())
{
f = *it;
return true;
}
else
return false;
}
}
bool digi_control::add_link( const callsign &digicall, const callsign &linkcall )
{
try
{
digi_config_file digicfg = digifiles.find(digicall);
for (int a=0; a<digicfg.link_anzahl; a++)
{
if(samecall(digicfg.link_call[a],linkcall))
return false;
}
digicfg.link_call[digicfg.link_anzahl] = linkcall;
digicfg.link_anzahl++;
if (digifiles.set(digicall,digicfg))
{
digicfg.save();
return true;
}
return false;
}
catch( Error_unknown_digi )
{
return false;
}
}
bool digi_control::del_link( const callsign &digicall, const callsign &linkcall )
{
try
{
int a=0, b=0;
digi_config_file digicfg = digifiles.find(digicall);
for (a=0; a<digicfg.link_anzahl; a++)
{
if(samecall(digicfg.link_call[a],linkcall))
{
}
else
{
digicfg.link_call[b] = digicfg.link_call[a];
b++;
}
}
if (a==b)
return false;
digicfg.link_anzahl=b;
if (digifiles.set(digicall,digicfg))
{
digicfg.save();
return true;
}
return false;
}
catch( Error_unknown_digi )
{
return false;
}
}
bool digi_control::add( const callsign &call )
{
digi_config_file digicfg;
digicfg.digi = call;
return digifiles.add(digicfg);
}
bool digi_control::del( const callsign &call )
{
digi_config_file digicfg;
digicfg.digi = call;
return digifiles.del(call);
}
bool digi_config_files::add( digi_config_file digicfg )
{
for (vector<digi_config_file>::iterator i = files.begin() ; i != files.end() ; ++i)
{
if (samecall(digicfg.digi,i->digi))
return false;
}
String dname = digi_dir_name + digicfg.digi.str() + ".digi";
#ifdef _DEBUG_DIGI_
cerr << "Digi: " << dname << endl;
#endif
digicfg.dateiname = dname;
digicfg.slot=1;
digicfg.typ=unknown;
digicfg.pfad=connect_string("no:n0cal>n0cal");
digicfg.link_anzahl=0;
digicfg.enabled=false;
files.push_back(digicfg);
digicfg.save();
return true;
}
bool digi_config_files::del( const callsign &call )
{
for (vector<digi_config_file>::iterator i = files.begin() ; i != files.end() ; ++i)
{
if (samecall(call,i->digi))
{
remove(strtochar(i->dateiname));
files.erase(i);
it = files.begin();
return true;
}
}
return false;
}
bool digi_config_files::set( const callsign &call, const digi_config_file &digicfg )
{
for (vector<digi_config_file>::iterator i = files.begin() ; i != files.end() ; ++i)
{
if (samecall(call,i->digi))
{
*i = digicfg;
return true;
}
}
return false;
}
digi_config_file& digi_config_files::find( const callsign &call )
{
for (vector<digi_config_file>::iterator i = files.begin() ; i != files.end() ; ++i)
{
if (samecall(call,i->digi))
return *i;
}
throw Error_unknown_digi();
}
void digi_config_files::show( ostream &ostr , char cr )
{
for (vector<digi_config_file>::iterator i = files.begin() ; i != files.end() ; ++i)
{
i->show(ostr, cr);
}
}
void digi_config_files::full_show(const callsign &call, ostream &ostr, char cr)
{
for (vector<digi_config_file>::iterator i = files.begin() ; i != files.end() ; ++i)
{
if (samecall(call,i->digi))
{
#ifdef _DEBUG_DIGI_
cerr << "Samecall: " << call << endl;
#endif
i->full_show(ostr,cr);
}
}
}
void digi_control::load( config_file & cfg )
{
digifiles = digi_config_files(cfg);
ds = get_default_destin();
try
{
String en = cfg.find("DIGI_STATUS");
en.kuerze();
if ( en == "JA" )
activ = true;
else
activ = false;
}
catch ( Error_parameter_not_defined )
{
activ = false;
}
}
void digi_control::show( ostream &ostr, char cr )
{
digifiles.show(ostr,cr);
ostr << cr << cr;
ostr << "Status : ";
if (activ)
ostr << " activ";
else
ostr << "inactiv";
ostr << cr << cr;
}
void digi_control::full_show(const callsign &call, ostream &ostr, char cr)
{
digifiles.full_show(call, ostr, cr);
}
bool digi_control::start_connection( digi_config_file &digicfg )
{
if (start_flag)
{
if (start_first)
{
if ( !digifiles.get_first(digicfg) )
{
start_flag = false;
start_first = false;
return false;
}
else
{
start_first = false;
if (digicfg.enabled==false)
return false;
last_fetch = zeit();
return true;
}
}
else
if ( !digifiles.get_next(digicfg) )
{
start_flag = false;
return false;
}
else
{
if (digicfg.enabled==false)
return false;
last_fetch = zeit();
return true;
}
}
else
return false;
}
/*
----------------------------------------------------------------------------
Nun folgen die Methoden der Klasse digi_meldung
----------------------------------------------------------------------------
*/
digi_meldung::digi_meldung( void )
{
uptime = 0;
destin = -1;
}
String digi_meldung::spool_msg_digi( void ) const
{
// Erste Zeile enthaelt Rufzeichen
int pos=1;
zeit jetzt;
callsign c = call;
delta_t Uptime = uptime;
c.set_format(true);
// c.set_nossid(true);
String tmp = c.call();
jetzt.set_darstellung(zeit::f_zeit_s);
pos=tmp.slen()+5;
while(pos++<20) tmp.append(" ");
tmp.append(jetzt.get_zeit_string());
tmp.append("Uptime: ");
tmp.append((Uptime.get_string()));
pos=tmp.slen();
while(pos++<40) tmp.append(" ");
tmp.append("Destin: ");
tmp.append(itoS(destin,4));
return tmp;
}
String digi_meldung::spool_msg_link(digi_config_file &digi_cfg) const
{
String von = call.str();
String an;
if (von.slen()<6) von.append(" ");
String tmp;
for(int i=0; i<digi_cfg.link_anzahl; i++)
{
an=digi_cfg.link_call[i].str();
if (an.slen()<6) an.append(" ");
tmp.append(von+"<>"+an+" "+link_rtt[i]);
}
if (tmp.slen()<2) tmp="---";
return tmp;
}
void digi_control::meldung( int slot, const digi_meldung &mldg, digi_config_file &digi_cfg )
{
String msg;
msg = mldg.spool_msg_digi();
spool_msg(slot,msg,RUB_DIGI_STAT);
// ToDo: Slots + >4 Links
// if (mdg.link_anzahl>0)
{
msg = mldg.spool_msg_link(digi_cfg);
spool_msg(slot,msg,RUB_LINK_STAT);
}
}
void digi_control::spool_msg( int sl, const String &msg, String rubrik )
{
int slot;
syslog logf(configuration);
try
{
board brd(rubrik,configuration);
int board = brd.get_brd_id();
if (sl > 10) //Rotierende Slots
slot = brd.get_slot();
else
slot = sl; //fester Slot
brd.set_msg(msg,slot,ds);
// Nachricht ins Spoolverzeichnis schreiben
spool.spool_bul(G_mycall,zeit(),board,slot,msg,false,ds,128);
}
// Moegliche Fehler-Exceptions abfangen
catch( Error_could_not_open_file )
{
logf.eintrag("Nicht moeglich, Datei im Spoolverzeichnis zu oeffnen",LOGMASK_PRGRMERR);
}
catch( Error_could_not_open_boardfile )
{
logf.eintrag("Digi Boarddatei nicht angelegt.",LOGMASK_PRGRMERR);
}
catch( Error_could_not_create_boardfile )
{
logf.eintrag("Nicht moeglich, Digi Boarddatei zu speichern.",LOGMASK_PRGRMERR);
}
}
void digi_interface::set_maske( void )
{
maske=0;
if ( digi_cfg.typ == flexnet )
{
#ifdef _DEBUG_DIGI_
cerr << "Typ ist Flexnet" << endl;
#endif
maske |= MASKE_UPTIME;
maske |= MASKE_DESTINATION;
maske |= MASKE_LINK;
}
if ( digi_cfg.typ == tnn )
{
#ifdef _DEBUG_DIGI_
cerr << "Typ ist TNN" << endl;
#endif
maske |= MASKE_UPTIME;
maske |= MASKE_DESTINATION;
maske |= MASKE_LINK;
}
if ( digi_cfg.typ == xnet )
{
#ifdef _DEBUG_DIGI_
cerr << "Typ ist XNET" << endl;
#endif
maske |= MASKE_UPTIME;
maske |= MASKE_DESTINATION;
maske |= MASKE_NODES;
maske |= MASKE_LINK;
}
#ifdef _DEBUG_DIGI_
cerr << "Maske: " << maske << endl;
#endif
}
void digi_interface::digi_line( String line )
{
switch (digi_cfg.typ)
{
case flexnet:
flex_digi_line(line);
break;
case tnn:
tnn_digi_line(line);
break;
case xnet:
xnet_digi_line(line);
break;
default:
break;
}
}
void digi_interface::flex_digi_line( String line )
{
last_activity = zeit();
double up = 0;
if ( maske & MASKE_DESTINATION )
{
if (line.in(String("d:")) &&
line.in(String("v:")) &&
line.in(String("t:")))
{
int pos1=0, pos2=0;
String dests;
if((pos1=line.pos("d:")) && (pos2=line.pos("v:")))
{
dests=line.part(pos1+2,pos2-pos1-2);
#ifdef _DEBUG_DIGI_
cerr << ">>" << dests << "<<" << endl;
#endif
mdg.destin = dests.Stoi();
maske &= ~MASKE_DESTINATION;
}
}
}
if ( maske & MASKE_UPTIME )
{
if (line.in(String("d:")) &&
line.in(String("v:")) &&
line.in(String("t:")))
{
int pos1=0, pos2=0, pos3=0;
String Uptime;
if((pos1=line.pos("t:")) && (pos2=line.pos(")")))
{
Uptime=line.part(pos1+2,pos2-pos1-2);
if ((pos3=Uptime.pos(","))) // 7h, 23m
{
String high, low;
high=Uptime.part(0,pos3);
low=Uptime.part(pos3+1,Uptime.slen()-pos3-1);
#ifdef _DEBUG_DIGI_
cerr << ">>" << Uptime << "<<>>" << high << "<<>>" << low << "<<" << endl;
#endif
if (high.in("d"))
{
high.part(0,high.slen()-2); up+=high.Stoi()*24*60*60;
}
if (high.in("h"))
{
high.part(0,high.slen()-2); up+=high.Stoi()*60*60;
}
if (high.in("m"))
{
high.part(0,high.slen()-2); up+=high.Stoi()*60;
}
if (high.in("s"))
{
high.part(0,high.slen()-2); up=high.Stoi();
}
if (low.in("h"))
{
low.part(0,low.slen()-2); up+=low.Stoi()*60*60;
}
if (low.in("m"))
{
low.part(0,low.slen()-2); up+=low.Stoi()*60;
}
if (low.in("s"))
{
low.part(0,low.slen()-2); up+=low.Stoi();
}
}
else
{
if (Uptime.in("s"))
{
Uptime.part(0,Uptime.slen()-2); up+=Uptime.Stoi();
}
}
#ifdef _DEBUG_DIGI_
cerr << "Uptime: " << delta_t(up) << endl;
#endif
mdg.uptime=delta_t(up);
maske &= ~MASKE_UPTIME;
}
}
}
if ( maske & MASKE_LINK )
{
String Linkcall;
String hin, rueck;
String laufzeit;
String ssid;
if (line.slen()>70)
{
Linkcall=line.part(54,7);
try
{
for(int anzahl=0; anzahl<digi_cfg.link_anzahl; anzahl++)
{
//cerr << "Call:" << digi_cfg.link_anzahl << digi_cfg.link_call[anzahl] << endl;
if (samecall(callsign(Linkcall),digi_cfg.link_call[anzahl]))
{
laufzeit=line.part(66,line.slen()-66);
ssid=line.part(60,6);
#ifdef _DEBUG_DIGI_
cerr << "SSID :" << ssid << endl;
#endif
mdg.link_rtt[anzahl]=rtt_calc(laufzeit.part(0,laufzeit.slen()),flexnet);
#ifdef _DEBUG_DIGI_
cerr << "RTT:" << anzahl << ":" << mdg.link_rtt[anzahl] << endl;
#endif
mdg.gefundene_links++;
anzahl=digi_cfg.link_anzahl; //gefunden. Raus aus der Schleife
}
}
if (mdg.gefundene_links==digi_cfg.link_anzahl)
maske &= ~MASKE_LINK;
}
catch (Error_no_callsign)
{
}
}
}
}
void digi_interface::tnn_digi_line( String line )
{
last_activity = zeit();
double up = 0;
if ( maske & MASKE_DESTINATION )
{
if (line.in(String(" Active Nodes:")))
{
String dests;
dests=line.part(20,line.slen()-27);
mdg.destin = dests.Stoi();
maske &= ~MASKE_DESTINATION;
#ifdef _DEBUG_DIGI_
cerr << ">>" << mdg.destin << "<<" << endl;
#endif
}
}
if ( maske & MASKE_UPTIME )
{
if (line.in(String(" Uptime:")))
{
String Uptime;
int pos;
Uptime=line.part(20,line.slen()-20);
if ((pos=Uptime.pos("/"))) // 21/22:23
{
String Up;
Up=Uptime.part(0,pos);
up+=Up.Stoi()*24*60*60;
Up=Uptime.part(pos+1,2);
up+=Up.Stoi()*60*60;
Up=Uptime.part(pos+4,2);
up+=Up.Stoi()*60;
#ifdef _DEBUG_DIGI_
cerr << "Uptime: " << delta_t(up) << endl;
#endif
mdg.uptime=delta_t(up);
maske &= ~MASKE_UPTIME;
}
}
}
if ( maske & MASKE_LINK )
{
String Linkcall;
String hin, rueck;
String laufzeit;
String ssid;
if (line.slen()>50)
{
Linkcall=line.part(0,9);
try
{
for(int anzahl=0; anzahl<digi_cfg.link_anzahl; anzahl++)
{
//cerr << "Call:" << Linkcall <<":"<< digi_cfg.link_call[anzahl] << endl;
if (samecall(callsign(Linkcall),digi_cfg.link_call[anzahl]))
{
laufzeit=line.part(26,15);
// ssid=line.part(60,6);
//cerr << "SSID :" << ssid << endl;
mdg.link_rtt[anzahl]=rtt_calc(laufzeit.part(0,laufzeit.slen()),tnn);
#ifdef _DEBUG_DIGI_
cerr << "RTT:" << anzahl << ":" << mdg.link_rtt[anzahl] << endl;
#endif
mdg.gefundene_links++;
anzahl=digi_cfg.link_anzahl; //gefunden. Raus aus der Schleife
}
}
if (mdg.gefundene_links==digi_cfg.link_anzahl)
maske &= ~MASKE_LINK;
}
catch (Error_no_callsign)
{
}
}
}
}
void digi_interface::xnet_digi_line( String line )
{
last_activity = zeit();
double up = 0;
if ( maske & MASKE_DESTINATION )
{
if (line.in(String("destinations |")))
{
String dests;
dests=line.part(21,9);
#ifdef _DEBUG_DIGI_
cerr << "Dest >>" << dests << "<<" << endl;
#endif
mdg.destin = dests.Stoi();
maske &= ~MASKE_DESTINATION;
}
}
if ( maske & MASKE_NODES )
{
if (line.in(String("nodes |")))
{
String nodes;
nodes=line.part(21,9);
#ifdef _DEBUG_DIGI_
cerr << "Nodes >>" << nodes << "<<" << endl;
#endif
mdg.nodes = nodes.Stoi();
maske &= ~MASKE_NODES;
}
}
if ( maske & MASKE_UPTIME )
{
if (line.in(String("Uptime (")))
{
String Uptime;
String high, low;
Uptime=line.part(8,8);
low=Uptime.part(4,4);
high=Uptime.part(0,4);
#ifdef _DEBUG_DIGI_
cerr << ">>" << Uptime << "<<>>" << high << "<<>>" << low << "<<" << endl;
#endif
if (high.in("d"))
{
high.part(0,high.slen()-2); up+=high.Stoi()*24*60*60;
}
if (high.in("h"))
{
high.part(0,high.slen()-2); up+=high.Stoi()*60*60;
}
if (high.in("m"))
{
high.part(0,high.slen()-2); up+=high.Stoi()*60;
}
if (high.in("s"))
{
high.part(0,high.slen()-2); up=high.Stoi();
}
if (low.in("h"))
{
low.part(0,low.slen()-2); up+=low.Stoi()*60*60;
}
if (low.in("m"))
{
low.part(0,low.slen()-2); up+=low.Stoi()*60;
}
if (low.in("s"))
{
low.part(0,low.slen()-2); up+=low.Stoi();
}
#ifdef _DEBUG_DIGI_
cerr << "Uptime: " << delta_t(up) << endl;
#endif
mdg.uptime=delta_t(up);
maske &= ~MASKE_UPTIME;
}
}
if ( maske & MASKE_LINK )
{
String Linkcall;
String hin, rueck;
String laufzeit;
String ssid;
if (line.slen()>75)
{
Linkcall=line.part(3,9);
try
{
for(int anzahl=0; anzahl<digi_cfg.link_anzahl; anzahl++)
{
//cerr << "Call:" << digi_cfg.link_anzahl << digi_cfg.link_call[anzahl] << endl;
if (samecall(callsign(Linkcall),digi_cfg.link_call[anzahl]))
{
laufzeit=line.part(23,9);
// ssid=line.part(60,6);
//cerr << "SSID :" << ssid << endl;
mdg.link_rtt[anzahl]=rtt_calc(laufzeit.part(0,laufzeit.slen()),xnet);
#ifdef _DEBUG_DIGI_
cerr << "RTT:" << anzahl << ":" << mdg.link_rtt[anzahl] << endl;
#endif
mdg.gefundene_links++;
anzahl=digi_cfg.link_anzahl; //gefunden. Raus aus der Schleife
}
}
if (mdg.gefundene_links==digi_cfg.link_anzahl)
maske &= ~MASKE_LINK;
}
catch (Error_no_callsign)
{
}
}
}
}
String digi_interface::rtt_calc(String line, digi_typ typ)
{
String rtt=" --- ";
String hin, rueck;
int Hin=-2;
int Rueck=-2;
bool umleitung=false;
int pos1;
if (typ==flexnet)
{
#ifdef _DEBUG_DIGI_
cerr << "RTT-String:" << line << endl;
#endif
if (!line.in("/"))
{
if (line.in("-"))
return rtt;
else
{
Hin=line.Stoi();
if (Hin<10)
return (" "+itoS(Hin)+" ");
if (Hin<100)
return (" "+itoS(Hin)+" ");
if (Hin<1000)
return (" "+itoS(Hin)+" ");
return (itoS(Hin)+" ");
}
}
if((pos1=line.pos("/")))
{
hin=line.part(0,pos1);
rueck=line.part(pos1+1,line.slen()-pos1-1);
if (hin[0]==String("("))
{
umleitung=true;
hin=hin.part(1,hin.slen()-1);
rueck[line.pos("(")]=' ';
}
if (hin[0]==String("-"))
Hin=-1;
if (rueck[0]==String("-"))
Rueck=-1;
if (Hin!=-1 && Rueck!=-1)
{
Hin=hin.Stoi();
Rueck=rueck.Stoi();
}
if (Hin==-1 && Rueck==-1)
{
if (umleitung)
rtt="(-/-)";
else
rtt="--/--";
return rtt;
}
if (umleitung)
{
if(Hin>=999)
rtt="(*/";
else if (Hin>99)
rtt="(+/";
else if (Hin>9)
rtt="(./";
else
rtt="("+itoS(Hin)+"/";
}
else
{
if(Hin>=999)
{
Hin=Hin/1000;
rtt=itoS(Hin)+"*/";
}
else if (Hin>99)
{
Hin=Hin/100;
rtt=itoS(Hin)+"+/";
}
else if (Hin>9)
rtt=itoS(Hin)+"/";
else
rtt=" "+itoS(Hin)+"/";
}
if (umleitung)
{
if(Rueck>=999)
rtt.append("*)");
else if (Rueck>99)
rtt.append("+)");
else if (Rueck>9)
rtt.append(".)");
else
rtt.append(itoS(Rueck)+")");
}
else
{
if(Rueck>=999)
{
Rueck=Rueck/1000;
rtt.append(itoS(Rueck)+"*");
}
else if (Rueck>99)
{
Rueck=Rueck/100;
rtt.append(itoS(Rueck)+"+");
}
else if (Rueck>9)
rtt.append(itoS(Rueck));
else
rtt.append(itoS(Rueck)+" ");
}
}
}
else if (typ==tnn)
{
#ifdef _DEBUG_DIGI_
cerr << "RTT-String:" << line << endl;
#endif
if (!line.in("/"))
{
return rtt;
}
if((pos1=line.pos("/")))
{
hin=line.part(0,pos1);
rueck=line.part(pos1+1,line.slen()-pos1-1);
if (hin[hin.slen()-1]==String("-"))
Hin=-1;
if (rueck[0]==String("-"))
Rueck=-1;
if (Hin!=-1 && Rueck!=-1)
{
Hin=hin.Stoi();
Rueck=rueck.Stoi();
Hin/=100;
Rueck/=100;
}
if (Hin==-1 && Rueck==-1)
{
return ("--/--");
}
if(Hin>=999)
{
Hin=Hin/1000;
rtt=itoS(Hin)+"*/";
}
else if (Hin>99)
{
Hin=Hin/100;
rtt=itoS(Hin)+"+/";
}
else if (Hin>9)
rtt=itoS(Hin)+"/";
else
rtt=" "+itoS(Hin)+"/";
if(Rueck>=999)
{
Rueck=Rueck/1000;
rtt.append(itoS(Rueck)+"*");
}
else if (Rueck>99)
{
Rueck=Rueck/100;
rtt.append(itoS(Rueck)+"+");
}
else if (Rueck>9)
rtt.append(itoS(Rueck));
else
rtt.append(itoS(Rueck)+" ");
}
}
else if (typ==xnet)
{
#ifdef _DEBUG_DIGI_
cerr << "RTT-String:" << line << endl;
#endif
if (!line.in("/"))
{
if (line.in("-"))
return rtt;
else
{
Hin=line.Stoi();
if (Hin<10)
return (" "+itoS(Hin)+" ");
if (Hin<100)
return (" "+itoS(Hin)+" ");
if (Hin<1000)
return (" "+itoS(Hin)+" ");
return (itoS(Hin)+" ");
}
}
if((pos1=line.pos("/")))
{
hin=line.part(0,pos1);
rueck=line.part(pos1+1,line.slen()-pos1-1);
if (hin[hin.slen()-1]==String("-"))
Hin=-1;
if (rueck[0]==String("-"))
Rueck=-1;
if (Hin!=-1 && Rueck!=-1)
{
Hin=hin.Stoi();
Rueck=rueck.Stoi();
}
if (Hin==-1 && Rueck==-1)
{
return ("--/--");
}
if (Hin>99)
{
Hin=Hin/100;
rtt=itoS(Hin)+"+/";
}
else if (Hin>9)
rtt=itoS(Hin)+"/";
else
rtt=" "+itoS(Hin)+"/";
if (Rueck>99)
{
Rueck=Rueck/100;
rtt.append(itoS(Rueck)+"+");
}
else if (Rueck>9)
rtt.append(itoS(Rueck));
else
rtt.append(itoS(Rueck)+" ");
}
}
return rtt;
}
bool digi_control::set_slot( const callsign &call, int slt )
{
try
{
digi_config_file digicfg = digifiles.find(call);
digicfg.slot = slt;
if (digifiles.set(call,digicfg))
{
digicfg.save();
return true;
}
return false;
}
catch( Error_unknown_digi )
{
return false;
}
}
bool digi_control::set_pfad( const callsign &call, const connect_string &pfd )
{
try
{
digi_config_file digicfg = digifiles.find(call);
digicfg.pfad = pfd;
if (digifiles.set(call,digicfg))
{
digicfg.save();
return true;
}
return false;
}
catch( Error_unknown_digi )
{
return false;
}
}
void digi_control::enable( config_file &cfg )
{
cfg.set("DIGI_STATUS","JA");
cfg.save();
activ = true;
}
void digi_control::disable( config_file &cfg )
{
cfg.set("DIGI_STATUS","NEIN");
cfg.save();
activ = false;
}
| 22.688113
| 115
| 0.556891
|
DF4IAH
|
790b13872a46feaeb2cd735acc929f881e79b0b1
| 11,690
|
cpp
|
C++
|
Motor2D/Enemy.cpp
|
pink-king/Final-Fantasy-Tactics
|
b5dcdd0aa548900b3b2279cd4c6d4220f5869c08
|
[
"Unlicense"
] | 9
|
2019-04-19T17:25:34.000Z
|
2022-01-30T14:46:30.000Z
|
Motor2D/Enemy.cpp
|
pink-king/Final-Fantasy-Tactics
|
b5dcdd0aa548900b3b2279cd4c6d4220f5869c08
|
[
"Unlicense"
] | 44
|
2019-03-22T10:22:19.000Z
|
2019-08-08T07:48:27.000Z
|
Motor2D/Enemy.cpp
|
pink-king/Final-Fantasy-Tactics
|
b5dcdd0aa548900b3b2279cd4c6d4220f5869c08
|
[
"Unlicense"
] | 1
|
2022-01-30T14:46:34.000Z
|
2022-01-30T14:46:34.000Z
|
#include "Enemy.h"
#include "j1App.h"
#include "j1Render.h"
#include "j1EntityFactory.h"
#include "j1PathFinding.h"
#include "j1Map.h"
#include "j1Scene.h"
#include "WaveManager.h"
#include <ctime>
#include <random>
Enemy::Enemy(iPoint position, uint movementSpeed, uint detectionRange, uint attackRange, uint baseDamage, float attackSpeed, bool dummy, ENTITY_TYPE entityType, const char* name)
: speed(movementSpeed), detectionRange(detectionRange), baseDamage(baseDamage), attackRange(attackRange), dummy(dummy), attackSpeed(attackSpeed), j1Entity(entityType, position.x, position.y, name)
{
debugSubtile = App->entityFactory->debugsubtileTex;
// Intial orientation random
pointingDir = 1 + std::rand() % 8;
currentAnimation = &idle[pointingDir];
CheckRenderFlip();
this->attackPerS = 1.F / attackSpeed;
if (this->type != ENTITY_TYPE::ENEMY_DUMMY)
this->lifeBar = App->gui->AddHealthBarToEnemy(&App->gui->enemyLifeBarInfo.dynamicSection, type::enemy, this, App->scene->inGamePanel);
//App->audio->PlayFx(App->entityFactory->enemySpawn, 0);
}
Enemy::~Enemy()
{
App->attackManager->DestroyAllMyCurrentAttacks(this);
if (inWave)
{
std::vector<Enemy*>::iterator iter = App->entityFactory->waveManager->alive.begin();
for (; iter != App->entityFactory->waveManager->alive.end(); iter++)
{
if ((*iter) == this)
{
break;
}
}
App->entityFactory->waveManager->alive.erase(iter);
// Probably here will change the label of remaining enemies in the wave?
LOG("Enemies remaining: %i", App->entityFactory->waveManager->alive.size());
}
memset(idle, 0, sizeof(idle));
memset(run, 0, sizeof(run));
memset(basicAttack, 0, sizeof(basicAttack));
if (!App->cleaningUp) // When closing the App, Gui cpp already deletes the healthbar before this. Prevent invalid accesses
{
if (this->type != ENTITY_TYPE::ENEMY_DUMMY)
{
if (lifeBar != nullptr)
{
lifeBar->deliever = nullptr;
lifeBar->dynamicImage->to_delete = true; // deleted in uitemcpp draw
lifeBar->to_delete = true;
lifeBar->skull->to_delete = true;
}
}
LOG("parent enemy bye");
}
}
bool Enemy::SearchNewPath()
{
bool ret = false;
if (path_to_follow.empty() == false)
FreeMyReservedAdjacents();
path_to_follow.clear();
iPoint thisTile = App->map->WorldToMap((int)GetPivotPos().x, (int)GetPivotPos().y);
iPoint playerTile = App->map->WorldToMap((int)App->entityFactory->player->GetPivotPos().x, (int)App->entityFactory->player->GetPivotPos().y);
if (thisTile.DistanceManhattan(playerTile) > 1) // The enemy doesnt collapse with the player
{
if (App->pathfinding->CreatePath(thisTile, playerTile) > 0)
{
path_to_follow = *App->pathfinding->GetLastPath();
if (path_to_follow.size() > 1)
path_to_follow.erase(path_to_follow.begin()); // Enemy doesnt go to the center of his initial tile
if (path_to_follow.size() > 1)
path_to_follow.pop_back(); // Enemy doesnt eat the player, stays at 1 tile
//path_to_follow.pop_back();
ret = (path_to_follow.size() > 0);
}
//else LOG("Could not create path correctly");
}
return ret;
}
bool Enemy::SearchNewSubPath(bool ignoringColl) // Default -> path avoids other enemies
{
bool ret = false;
if (path_to_follow.empty() == false)
FreeMyReservedAdjacents();
path_to_follow.clear();
iPoint thisTile = App->map->WorldToSubtileMap((int)GetPivotPos().x, (int)GetPivotPos().y);
iPoint playerTile = App->entityFactory->player->GetSubtilePos();
if (thisTile.DistanceManhattan(playerTile) > 1) // The enemy doesnt collapse with the player
{
if (!ignoringColl)
{
if (App->pathfinding->CreateSubtilePath(thisTile, playerTile) > 0)
{
path_to_follow = *App->pathfinding->GetLastPath();
if (path_to_follow.size() > 1)
path_to_follow.erase(path_to_follow.begin()); // Enemy doesnt go to the center of his initial tile
if (path_to_follow.size() > 1)
path_to_follow.pop_back(); // Enemy doesnt eat the player, stays at 1 tile
iPoint adj = path_to_follow.back();
App->entityFactory->ReserveAdjacent(adj);
ret = (path_to_follow.size() > 0);
}
else LOG("Could not create path correctly");
}
else if(App->pathfinding->CreateSubtilePath(thisTile, playerTile, true) > 0)
{
path_to_follow = *App->pathfinding->GetLastPath();
if (path_to_follow.size() > 1)
path_to_follow.erase(path_to_follow.begin()); // Enemy doesnt go to the center of his initial tile
if (path_to_follow.size() > 1)
path_to_follow.pop_back(); // Enemy doesnt eat the player, stays at 1 tile
iPoint adj = path_to_follow.back();
App->entityFactory->ReserveAdjacent(adj);
ret = (path_to_follow.size() > 0);
}
else LOG("Could not create path correctly");
}
return ret;
}
bool Enemy::SearchPathToSubtile(const iPoint& goal)
{
bool ret = false;
if (path_to_follow.empty() == false)
FreeMyReservedAdjacents();
path_to_follow.clear();
if (imOnSubtile.DistanceManhattan(goal) > 1)
{
if (App->pathfinding->CreateSubtilePath(imOnSubtile, goal) > 0)
{
path_to_follow = *App->pathfinding->GetLastPath();
//if (path_to_follow.size() > 1)
// path_to_follow.erase(path_to_follow.begin()); // Enemy doesnt go to the center of his initial tile
//if (path_to_follow.size() > 1)
// path_to_follow.pop_back(); // Enemy doesnt eat the player, stays at 1 tile
/*iPoint adj = path_to_follow.back();
App->entityFactory->ReserveAdjacent(adj);*/
ret = (path_to_follow.size() > 0);
}
}
return ret;
}
int Enemy::GetRandomValue(const int& min, const int& max) const
{
static std::default_random_engine generator;
std::uniform_int_distribution<int> distribution(min, max);
float dice_roll = distribution(generator);
return dice_roll;
}
bool Enemy::isInDetectionRange() const
{
iPoint playerPos = App->entityFactory->player->GetTilePos();
return (GetTilePos().DistanceManhattan(playerPos) < detectionRange);
}
bool Enemy::isInAttackRange() const
{
return (GetSubtilePos().DistanceTo(App->entityFactory->player->GetSubtilePos()) <= attackRange);
}
bool Enemy::isNextPosFree(iPoint futurePos)
{
iPoint onSubtilePosTemp = App->map->WorldToSubtileMap(futurePos.x, futurePos.y);
return !(onSubtilePosTemp != previousSubtilePos && !App->entityFactory->isThisSubtileEnemyFree(onSubtilePosTemp));
}
bool Enemy::CheckFuturePos(float dt) const
{
fPoint tempPos = GetPivotPos() + velocity * dt * speed;
iPoint subtileTemp = App->map->WorldToSubtileMap(tempPos.x, tempPos.y);
return !(subtileTemp != previousSubtilePos && !App->entityFactory->isThisSubtileEnemyFree(subtileTemp));
}
bool Enemy::isOnDestiny() const
{
return GetPivotPos().DistanceTo(currentDestiny.Return_fPoint()) < 5;
}
void Enemy::FreeMyReservedAdjacents()
{
std::vector<iPoint>::iterator item = path_to_follow.begin();
for (; item != path_to_follow.end(); ++item)
{
if (App->entityFactory->isThisSubtileReserved(*item))
{
App->entityFactory->FreeAdjacent(*item);
break;
}
}
}
iPoint Enemy::SearchNeighbourSubtile() const
{
fPoint goal = position + velocity * speed * App->GetDt();
iPoint goalSubtile = App->map->WorldToSubtileMap(goal.ReturniPoint().x, goal.ReturniPoint().y);
iPoint neighbours[4];
neighbours[0] = goalSubtile + iPoint(1, 0);
neighbours[1] = goalSubtile + iPoint(0, 1);
neighbours[2] = goalSubtile + iPoint(-1, 0);
neighbours[3] = goalSubtile + iPoint(0, -1);
uint i = 0;
for (i; i <= 3; ++i)
{
if (App->entityFactory->isThisSubtileEnemyFree(neighbours[i]))
{
// This is the first free
return neighbours[i];
//SearchPathToSubtile(neighbours[i]);
break;
}
}
return iPoint(0, 0);
}
void Enemy::SetNewDirection()
{
velocity = currentDestiny.Return_fPoint() - GetPivotPos();
velocity.Normalize();
SetLookingTo(currentDestiny.Return_fPoint());
currentAnimation = &run[pointingDir];
}
void Enemy::MoveToCurrDestiny(float dt)
{
position += velocity * dt * speed;
}
int Enemy::GetPointingDir(float angle)
{
int numAnims = 8;
//LOG("angle: %f", angle);
// divide the semicircle in 4 portions
float animDistribution = PI / (numAnims * 0.5f); // each increment between portions //two semicircles
int i = 0;
if (angle >= 0) // is going right or on bottom semicircle range to left
{
// iterate between portions to find a match
for (float portion = animDistribution * 0.5f; portion <= PI; portion += animDistribution) // increment on portion units
{
if (portion >= angle) // if the portion is on angle range
{
// return the increment position matching with enumerator direction animation
// TODO: not the best workaround, instead do with std::map
/*LOG("bottom semicircle");
LOG("portion: %i", i);*/
break;
}
++i;
}
}
else if (angle <= 0) // animations relatives to upper semicircle
{
i = 0; // the next 4 on the enum direction
for (float portion = -animDistribution * 0.5f; portion >= -PI; portion -= animDistribution)
{
if (i == 1) i = numAnims * 0.5f + 1;
if (portion <= angle)
{
/*LOG("upper semicircle");
LOG("portion: %i", i);*/
break;
}
++i;
}
}
pointingDir = i;
if (pointingDir == numAnims) // if max direction
pointingDir = numAnims - 1; // set to prev
//LOG("portion: %i", pointingDir);
return pointingDir;
}
void Enemy::CheckRenderFlip()
{
if (pointingDir == int(facingDirection::SW) || pointingDir == 4 || pointingDir == 7)
{
flip = SDL_FLIP_HORIZONTAL;
}
else
flip = SDL_FLIP_NONE;
}
void Enemy::SetLookingTo(const fPoint& dir)
{
fPoint aux;
aux = dir - GetPivotPos();
aux.Normalize();
GetPointingDir(atan2f(aux.y, aux.x));
CheckRenderFlip();
}
void Enemy::DebugPath() const
{
for (uint i = 0; i < path_to_follow.size(); ++i)
{
if (!isSubpathRange) {
iPoint pos = App->map->MapToWorld(path_to_follow[i].x + 1, path_to_follow[i].y); // X + 1, Same problem with map
App->render->DrawQuad({ pos.x, pos.y + (int)(App->map->data.tile_height * 0.5F), 5, 5 }, 255 , 0, 255, 175, true);
//App->render->Blit(App->pathfinding->debug_texture, pos.x, pos.y);
}
else
{
iPoint pos = App->map->SubTileMapToWorld(path_to_follow[i].x + 1, path_to_follow[i].y); // X + 1, Same problem with map
App->render->DrawQuad({ pos.x, pos.y + (int)(App->map->data.tile_height * 0.5F * 0.5F), 3, 3 }, 255, 0, 255, 175, true);
//App->render->Blit(App->pathfinding->debug_texture, pos.x, pos.y);
}
}
iPoint subTilePos = GetSubtilePos();
subTilePos = App->map->SubTileMapToWorld(subTilePos.x, subTilePos.y);
App->render->Blit(debugSubtile, subTilePos.x, subTilePos.y, NULL);
// Real subtile?
//App->render->Blit(debugSubtile, subTilePos.x - 16, subTilePos.y - 8, NULL);
/*App->render->DrawQuad({ subTilePos.x, subTilePos.y, 5,5 }, 255, 255, 0, 255, true);
App->render->DrawIsoQuad({ subTilePos.x, subTilePos.y, 16, 16});*/
}
bool Enemy::Load(pugi::xml_node &)
{
return true;
}
bool Enemy::Save(pugi::xml_node &node) const
{
if(type == ENTITY_TYPE::ENEMY_BOMB)
node.append_attribute("type") = "enemyBomb";
else if(type == ENTITY_TYPE::ENEMY_TEST)
node.append_attribute("type") = "enemyTest";
node.append_attribute("level") = level;
node.append_attribute("life") = life;
pugi::xml_node nodeSpeed = node.append_child("position");
nodeSpeed.append_attribute("x") = position.x;
nodeSpeed.append_attribute("y") = position.y;
return true;
}
void Enemy::Draw()
{
if(App->scene->debugSubtiles == true)
DebugPath();
if (entityTex != nullptr)
{
if (currentAnimation != nullptr)
App->render->Blit(entityTex, position.x, position.y, ¤tAnimation->GetCurrentFrame(), 1.0F, flip);
else
App->render->Blit(entityTex, position.x, position.y);
}
}
| 28.651961
| 198
| 0.688537
|
pink-king
|
790b79670bda81a9c4bf639db26d4642f0963209
| 847
|
cpp
|
C++
|
src/easteregg.cpp
|
CodeScratcher/shimmerlang
|
2137b3b11574d6b378aff8df7a3342c1a0915964
|
[
"MIT"
] | null | null | null |
src/easteregg.cpp
|
CodeScratcher/shimmerlang
|
2137b3b11574d6b378aff8df7a3342c1a0915964
|
[
"MIT"
] | 3
|
2020-10-29T21:02:49.000Z
|
2021-06-14T19:40:36.000Z
|
src/easteregg.cpp
|
CodeScratcher/shimmerlang
|
2137b3b11574d6b378aff8df7a3342c1a0915964
|
[
"MIT"
] | null | null | null |
#include <string>
#include "easteregg.h"
std::string get_easteregg(int n) {
return (
"\x1b[1;93m"
R"( )" "\n"
R"( LOL MEMES . . WOW FTLULZ )" "\n"
R"( XD ____ __ .*\.* SUCH COOL MUCH )" "\n"
R"( / ___\ / / */.*. MANY NICE ____ BORED )" "\n"
R"( / /_ / /_ :) __ ______ ______ / __ \ ___ )" "\n"
R"( \__ \ / __ \ / / / \ / \ / ____/ / __\ )" "\n"
R"( ____/ / / / / / / / / // // / / // // / / /___aste/ / )" "\n"
R"( \____/ /_/ /_/ /_/ /_//_//_/ /_//_//_/ \____/ /_/ egg )" "\n"
R"( ===============================================---====== )" "\n"
"\x1b[0m"
);
}
| 42.35
| 79
| 0.250295
|
CodeScratcher
|
790d4dbebc90149c98b63fbfb10a26e7249295a7
| 263
|
hpp
|
C++
|
packets/PKT_S2C_DisableHUDForEndOfGame.hpp
|
HoDANG/OGLeague2
|
21efea8ea480972a6d686c4adefea03d57da5e9d
|
[
"MIT"
] | 1
|
2022-03-27T10:21:41.000Z
|
2022-03-27T10:21:41.000Z
|
packets/PKT_S2C_DisableHUDForEndOfGame.hpp
|
HoDANG/OGLeague2
|
21efea8ea480972a6d686c4adefea03d57da5e9d
|
[
"MIT"
] | null | null | null |
packets/PKT_S2C_DisableHUDForEndOfGame.hpp
|
HoDANG/OGLeague2
|
21efea8ea480972a6d686c4adefea03d57da5e9d
|
[
"MIT"
] | 3
|
2019-07-20T03:59:10.000Z
|
2022-03-27T10:20:09.000Z
|
#ifndef HPP_180_PKT_S2C_DisableHUDForEndOfGame_HPP
#define HPP_180_PKT_S2C_DisableHUDForEndOfGame_HPP
#include "base.hpp"
#pragma pack(push, 1)
struct PKT_S2C_DisableHUDForEndOfGame_s : DefaultPacket<PKT_S2C_DisableHUDForEndOfGame>
{
};
#pragma pack(pop)
#endif
| 23.909091
| 87
| 0.851711
|
HoDANG
|
790ecd27034330df97129d53197f2f617fcaf44d
| 5,381
|
cpp
|
C++
|
Source/Desert.cpp
|
michal-z/Desert
|
845a7f5f7b1927f6716c37fb3aa0bbe71645d49b
|
[
"MIT"
] | 1
|
2021-11-07T07:22:40.000Z
|
2021-11-07T07:22:40.000Z
|
Source/Desert.cpp
|
michal-z/Desert
|
845a7f5f7b1927f6716c37fb3aa0bbe71645d49b
|
[
"MIT"
] | null | null | null |
Source/Desert.cpp
|
michal-z/Desert
|
845a7f5f7b1927f6716c37fb3aa0bbe71645d49b
|
[
"MIT"
] | null | null | null |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define GLFW_INCLUDE_GLCOREARB
#include <GLFW/glfw3.h>
#define IMAGE_WIDTH 1280
#define IMAGE_HEIGHT 720
static PFNGLCREATEVERTEXARRAYSPROC glCreateVertexArrays;
static PFNGLCREATEPROGRAMPIPELINESPROC glCreateProgramPipelines;
static PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv;
static PFNGLCREATETEXTURESPROC glCreateTextures;
static PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
static PFNGLDELETEPROGRAMPIPELINESPROC glDeleteProgramPipelines;
static PFNGLDELETEPROGRAMPROC glDeleteProgram;
static PFNGLDELETETEXTURESPROC glDeleteTextures;
static PFNGLUSEPROGRAMSTAGESPROC glUseProgramStages;
static PFNGLBINDPROGRAMPIPELINEPROC glBindProgramPipeline;
static PFNGLBINDVERTEXARRAYPROC glBindVertexArray;
static PFNGLDRAWARRAYSPROC glDrawArrays;
static PFNGLDISPATCHCOMPUTEPROC glDispatchCompute;
static PFNGLTEXTURESTORAGE2DPROC glTextureStorage2D;
static PFNGLTEXTUREPARAMETERIPROC glTextureParameteri;
static PFNGLBINDTEXTUREUNITPROC glBindTextureUnit;
static PFNGLBINDIMAGETEXTUREPROC glBindImageTexture;
static uint32_t s_Vs;
static uint32_t s_Fs;
static uint32_t s_Vao;
static uint32_t s_Ppo;
static uint32_t s_Tex;
bool ShouldRecompileShaders();
static char*
LoadTextFile(const char* fileName)
{
FILE* file = fopen(fileName, "rb");
assert(file);
fseek(file, 0, SEEK_END);
long size = ftell(file);
assert(size != -1);
char* content = (char*)malloc(size + 1);
assert(content);
fseek(file, 0, SEEK_SET);
fread(content, 1, size, file);
fclose(file);
content[size] = '\0';
return content;
}
static void
CreateShaders()
{
glDeleteProgram(s_Vs);
glDeleteProgram(s_Fs);
char *glsl = LoadTextFile("Desert.glsl");
const char *vsSrc[] = { "#version 450 core\n", "#define VS_FULL_TRIANGLE\n", (const char *)glsl };
s_Vs = glCreateShaderProgramv(GL_VERTEX_SHADER, 3, vsSrc);
const char *fsSrc[] = { "#version 450 core\n", "#define FS_DESERT\n", (const char *)glsl };
s_Fs = glCreateShaderProgramv(GL_FRAGMENT_SHADER, 3, fsSrc);
free(glsl);
glUseProgramStages(s_Ppo, GL_VERTEX_SHADER_BIT, s_Vs);
glUseProgramStages(s_Ppo, GL_FRAGMENT_SHADER_BIT, s_Fs);
}
static void
Initialize()
{
glCreateVertexArrays(1, &s_Vao);
glCreateProgramPipelines(1, &s_Ppo);
glCreateTextures(GL_TEXTURE_2D, 1, &s_Tex);
glTextureParameteri(s_Tex, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTextureParameteri(s_Tex, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTextureStorage2D(s_Tex, 1, IMAGE_WIDTH, IMAGE_HEIGHT, GL_RGBA8);
CreateShaders();
}
static void
Shutdown()
{
glDeleteProgram(s_Vs);
glDeleteProgram(s_Fs);
glDeleteProgramPipelines(1, &s_Ppo);
glDeleteVertexArrays(1, &s_Vao);
glfwTerminate();
}
static void
Update()
{
glBindProgramPipeline(s_Ppo);
glBindVertexArray(s_Vao);
glDrawArrays(GL_TRIANGLES, 0, 3);
if (ShouldRecompileShaders())
{
CreateShaders();
}
}
int
main()
{
if (!glfwInit())
{
return 1;
}
glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
glfwWindowHint(GLFW_FLOATING, GLFW_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);
GLFWwindow *window = glfwCreateWindow(IMAGE_WIDTH, IMAGE_HEIGHT, "Desert", NULL, NULL);
if (!window)
{
glfwTerminate();
return 2;
}
glfwMakeContextCurrent(window);
glCreateVertexArrays = (PFNGLCREATEVERTEXARRAYSPROC)glfwGetProcAddress("glCreateVertexArrays");
glCreateProgramPipelines = (PFNGLCREATEPROGRAMPIPELINESPROC)glfwGetProcAddress("glCreateProgramPipelines");
glCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)glfwGetProcAddress("glCreateShaderProgramv");
glCreateTextures = (PFNGLCREATETEXTURESPROC)glfwGetProcAddress("glCreateTextures");
glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)glfwGetProcAddress("glDeleteVertexArrays");
glDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC)glfwGetProcAddress("glDeleteProgramPipelines");
glDeleteProgram = (PFNGLDELETEPROGRAMPROC)glfwGetProcAddress("glDeleteProgram");
glDeleteTextures = (PFNGLDELETETEXTURESPROC)glfwGetProcAddress("glDeleteTextures");
glUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC)glfwGetProcAddress("glUseProgramStages");
glBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC)glfwGetProcAddress("glBindProgramPipeline");
glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)glfwGetProcAddress("glBindVertexArray");
glDrawArrays = (PFNGLDRAWARRAYSPROC)glfwGetProcAddress("glDrawArrays");
glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)glfwGetProcAddress("glDispatchCompute");
glTextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC)glfwGetProcAddress("glTextureStorage2D");
glTextureParameteri = (PFNGLTEXTUREPARAMETERIPROC)glfwGetProcAddress("glTextureParameteri");
glBindTextureUnit = (PFNGLBINDTEXTUREUNITPROC)glfwGetProcAddress("glBindTextureUnit");
glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)glfwGetProcAddress("glBindImageTexture");
Initialize();
while (!glfwWindowShouldClose(window))
{
Update();
glfwSwapBuffers(window);
glfwPollEvents();
}
Shutdown();
return 0;
}
| 33.01227
| 111
| 0.773091
|
michal-z
|
791034bc1e0f89557bbc5aab3358df5d200cca68
| 1,832
|
cpp
|
C++
|
tggdkjxv/State.Statistics.cpp
|
playdeezgames/tggdkjxv
|
bdb1a31ffff2dd3b3524de4639846fa902b893b9
|
[
"MIT"
] | null | null | null |
tggdkjxv/State.Statistics.cpp
|
playdeezgames/tggdkjxv
|
bdb1a31ffff2dd3b3524de4639846fa902b893b9
|
[
"MIT"
] | null | null | null |
tggdkjxv/State.Statistics.cpp
|
playdeezgames/tggdkjxv
|
bdb1a31ffff2dd3b3524de4639846fa902b893b9
|
[
"MIT"
] | null | null | null |
#include "Application.Renderer.h"
#include "Application.Command.h"
#include "Application.MouseButtonUp.h"
#include "Application.OnEnter.h"
#include "Game.Audio.Mux.h"
#include "Game.Achievements.h"
#include "Visuals.Texts.h"
#include <format>
#include "Common.Utility.h"
#include <tuple>
namespace state::Statistics
{
const std::string LAYOUT_NAME = "State.Statistics";
const std::string TEXT_MOVES_MADE = "MovesMade";
const std::string TEXT_GAMES_PLAYED = "GamesPlayed";
static bool OnMouseButtonUp(const common::XY<int>& xy, unsigned char buttons)
{
::application::UIState::Write(::UIState::MAIN_MENU);
return true;
}
static void SetStatisticText(const std::string& textId, const std::string& caption, const game::Statistic& statistic)
{
auto value = game::Statistics::Read(statistic);
if (value)
{
visuals::Texts::SetText(LAYOUT_NAME, textId, std::format("{}: {}", caption, value.value()));
}
else
{
visuals::Texts::SetText(LAYOUT_NAME, textId, std::format("{}: -", caption));
}
}
const std::vector<std::tuple<std::string, std::string, game::Statistic>> statisticsList =
{
{ TEXT_MOVES_MADE, "Moves Made", game::Statistic::MOVES_MADE},
{ TEXT_GAMES_PLAYED, "Games Played", game::Statistic::GAMES_PLAYED}
};
static void OnEnter()
{
game::audio::Mux::Play(game::audio::Mux::Theme::MAIN);
for (auto& item : statisticsList)
{
SetStatisticText(std::get<0>(item), std::get<1>(item), std::get<2>(item));
}
}
void Start()
{
::application::OnEnter::AddHandler(::UIState::STATISTICS, OnEnter);
::application::MouseButtonUp::AddHandler(::UIState::STATISTICS, OnMouseButtonUp);
::application::Command::SetHandler(::UIState::STATISTICS, ::application::UIState::GoTo(::UIState::MAIN_MENU));
::application::Renderer::SetRenderLayout(::UIState::STATISTICS, LAYOUT_NAME);
}
}
| 31.050847
| 118
| 0.708515
|
playdeezgames
|
79119636105a12278d7b0567946a2d866fe025ee
| 3,010
|
hpp
|
C++
|
common-utilities/libs/math/tests/testStatistics/testLinearLeastSquaresFitting.hpp
|
crdrisko/drychem
|
15de97f277a836fb0bfb34ac6489fbc037b5151f
|
[
"MIT"
] | 1
|
2020-09-26T12:38:54.000Z
|
2020-09-26T12:38:54.000Z
|
common-utilities/libs/math/tests/testStatistics/testLinearLeastSquaresFitting.hpp
|
crdrisko/cpp-units
|
15de97f277a836fb0bfb34ac6489fbc037b5151f
|
[
"MIT"
] | 9
|
2020-10-05T12:53:12.000Z
|
2020-11-02T19:28:01.000Z
|
common-utilities/libs/math/tests/testStatistics/testLinearLeastSquaresFitting.hpp
|
crdrisko/cpp-units
|
15de97f277a836fb0bfb34ac6489fbc037b5151f
|
[
"MIT"
] | 1
|
2020-12-04T13:34:41.000Z
|
2020-12-04T13:34:41.000Z
|
// Copyright (c) 2020-2021 Cody R. Drisko. All rights reserved.
// Licensed under the MIT License. See the LICENSE file in the project root for more information.
//
// Name: testLinearLeastSquaresFitting.hpp
// Author: crdrisko
// Date: 10/26/2020-11:56:41
// Description: Provides ~100% unit test coverage over the linear least squares fitting function
#ifndef DRYCHEM_COMMON_UTILITIES_LIBS_MATH_TESTS_TESTSTATISTICS_TESTLINEARLEASTSQUARESFITTING_HPP
#define DRYCHEM_COMMON_UTILITIES_LIBS_MATH_TESTS_TESTSTATISTICS_TESTLINEARLEASTSQUARESFITTING_HPP
#include <cmath>
#include <sstream>
#include <vector>
#include <common-utils/math.hpp>
#include <gtest/gtest.h>
GTEST_TEST(testLinearLeastSquaresFitting, linearLeastSquaresFittingReturnsMultipleValuesInAStruct)
{
std::vector<long double> x {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0};
std::vector<long double> y {2.0, 5.0, 3.0, 7.0, 8.0, 9.0, 12.0, 10.0, 15.0, 20.0};
CppUtils::Math::details::LinearLeastSquaresResult<long double> result
= DryChem::linearLeastSquaresFitting(x.begin(), x.end(), y.begin(), y.end());
ASSERT_NEAR(1.7152, result.slope, DryChem::findAbsoluteError(1.7152, 5));
ASSERT_NEAR(-0.33333, result.intercept, DryChem::findAbsoluteError(-0.33333, 5));
ASSERT_NEAR(0.2139317, std::sqrt(result.variance), DryChem::findAbsoluteError(0.2139317, 7));
}
GTEST_TEST(testLinearLeastSquaresFitting, linearLeastSquaresFittingCanReturnATypeCompatibleWithStructuredBinding)
{
std::vector<long double> x {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0};
std::vector<long double> y {2.0, 5.0, 3.0, 7.0, 8.0, 9.0, 12.0, 10.0, 15.0, 20.0};
auto [slope, intercept, variance] = DryChem::linearLeastSquaresFitting(x.cbegin(), x.cend(), y.cbegin(), y.cend());
ASSERT_NEAR(1.7152, slope, DryChem::findAbsoluteError(1.7152, 5));
ASSERT_NEAR(-0.33333, intercept, DryChem::findAbsoluteError(-0.33333, 5));
ASSERT_NEAR(0.2139317, std::sqrt(variance), DryChem::findAbsoluteError(0.2139317, 7));
}
GTEST_TEST(testLinearLeastSquaresFitting, passingTwoDifferentlySizedContainersResultsInFatalException)
{
std::stringstream deathRegex;
deathRegex << "Common-Utilities Fatal Error: ";
#if GTEST_USES_POSIX_RE
deathRegex << "[(]linearLeastSquaresFitting.hpp: *[0-9]*[)]\n\t";
#elif GTEST_USES_SIMPLE_RE
deathRegex << "\\(linearLeastSquaresFitting.hpp: \\d*\\)\n\t";
#endif
deathRegex << "Input sizes for x and y containers must be the same.\n";
std::vector<long double> x {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0};
std::vector<long double> y {2.0, 5.0, 3.0, 7.0, 8.0, 9.0, 12.0, 10.0, 15.0, 20.0};
ASSERT_DEATH(
{
try
{
DryChem::linearLeastSquaresFitting(x.begin(), x.end(), y.begin(), y.end() - 2);
}
catch (const DryChem::InputSizeMismatch& except)
{
except.handleErrorWithMessage();
}
},
deathRegex.str());
}
#endif
| 39.605263
| 119
| 0.683389
|
crdrisko
|
79156c92a9f526a43c4ce31b21ba9cadadf8ba95
| 1,892
|
cpp
|
C++
|
leetcode/problems/hard/927-three-equal-parts.cpp
|
wingkwong/competitive-programming
|
e8bf7aa32e87b3a020b63acac20e740728764649
|
[
"MIT"
] | 18
|
2020-08-27T05:27:50.000Z
|
2022-03-08T02:56:48.000Z
|
leetcode/problems/hard/927-three-equal-parts.cpp
|
wingkwong/competitive-programming
|
e8bf7aa32e87b3a020b63acac20e740728764649
|
[
"MIT"
] | null | null | null |
leetcode/problems/hard/927-three-equal-parts.cpp
|
wingkwong/competitive-programming
|
e8bf7aa32e87b3a020b63acac20e740728764649
|
[
"MIT"
] | 1
|
2020-10-13T05:23:58.000Z
|
2020-10-13T05:23:58.000Z
|
/*
Three Equal Parts
https://leetcode.com/problems/three-equal-parts/
You are given an array arr which consists of only zeros and ones, divide the array into three non-empty parts such that all of these parts represent the same binary value.
If it is possible, return any [i, j] with i + 1 < j, such that:
arr[0], arr[1], ..., arr[i] is the first part,
arr[i + 1], arr[i + 2], ..., arr[j - 1] is the second part, and
arr[j], arr[j + 1], ..., arr[arr.length - 1] is the third part.
All three parts have equal binary values.
If it is not possible, return [-1, -1].
Note that the entire part is used when considering what binary value it represents. For example, [1,1,0] represents 6 in decimal, not 3. Also, leading zeros are allowed, so [0,1,1] and [1,1] represent the same value.
Example 1:
Input: arr = [1,0,1,0,1]
Output: [0,3]
Example 2:
Input: arr = [1,1,0,1,1]
Output: [-1,-1]
Example 3:
Input: arr = [1,1,0,0,1]
Output: [0,2]
Constraints:
3 <= arr.length <= 3 * 104
arr[i] is 0 or 1
*/
class Solution {
public:
int find_first_one(vector<int>& arr, int target) {
int cnt = 0;
for(int i = 0; i < arr.size(); i++) {
if(arr[i] == 1) cnt++;
if(cnt == target) return i;
}
return -1;
}
vector<int> threeEqualParts(vector<int>& arr) {
int one = count(arr.begin(), arr.end(), 1);
if(one % 3 != 0) return vector<int>{-1, -1};
int one_per_part = one / 3;
if(one_per_part == 0) return vector<int>{0, (int)arr.size() - 1};
int l = find_first_one(arr, 1);
int m = find_first_one(arr, one_per_part + 1);
int r = find_first_one(arr, 2 * one_per_part + 1);
while(r < arr.size()) {
if(arr[l] == arr[m] && arr[m] == arr[r]) l++, m++, r++;
else return vector<int>{-1, -1};
}
return vector<int>{l - 1, m};
}
};
| 29.5625
| 216
| 0.580338
|
wingkwong
|
7919d493ae95ee0cae18e1b5222c4dcb2d338549
| 552
|
cpp
|
C++
|
source/chapter_02/listings/listing_02_05_ourfunc.cpp
|
ShinyGreenRobot/CPP-Primer-Plus-Sixth-Edition
|
ce2c8fca379508929dfd24dce10eff2c09117999
|
[
"MIT"
] | null | null | null |
source/chapter_02/listings/listing_02_05_ourfunc.cpp
|
ShinyGreenRobot/CPP-Primer-Plus-Sixth-Edition
|
ce2c8fca379508929dfd24dce10eff2c09117999
|
[
"MIT"
] | null | null | null |
source/chapter_02/listings/listing_02_05_ourfunc.cpp
|
ShinyGreenRobot/CPP-Primer-Plus-Sixth-Edition
|
ce2c8fca379508929dfd24dce10eff2c09117999
|
[
"MIT"
] | null | null | null |
/**
* \file
* listing_02_05_ourfunc.cpp
*
* \brief
* Defining your own function.
*/
#include <iostream>
void simon(int);
int main()
{
using namespace std;
simon(3); // call the simon() function
cout << "Pick an integer: ";
int count;
cin >> count;
simon(count); // call the simon() function again
cout << "Done!" << endl;
return 0;
}
void simon(int n) // define the simon() function
{
using namespace std;
cout << "Simon says touch your toes " << n << " times." << endl;
// void functions does not need return statements
}
| 16.727273
| 65
| 0.630435
|
ShinyGreenRobot
|
791bcff4aab5d6974cf4327411cd4c422c555f06
| 48,594
|
cpp
|
C++
|
src/serverbase/datatable/DataTableLoader.cpp
|
mark-online/server
|
ca24898e2e5a9ccbaa11ef1ade57bb25260b717f
|
[
"MIT"
] | null | null | null |
src/serverbase/datatable/DataTableLoader.cpp
|
mark-online/server
|
ca24898e2e5a9ccbaa11ef1ade57bb25260b717f
|
[
"MIT"
] | null | null | null |
src/serverbase/datatable/DataTableLoader.cpp
|
mark-online/server
|
ca24898e2e5a9ccbaa11ef1ade57bb25260b717f
|
[
"MIT"
] | null | null | null |
#include "ServerBasePCH.h"
#include <gideon/serverbase/datatable/DataTableLoader.h>
#include <gideon/cs/datatable/DataTableFactory.h>
#include <gideon/cs/datatable/EquipTable.h>
#include <gideon/cs/datatable/ReprocessTable.h>
#include <gideon/cs/datatable/PlayerActiveSkillTable.h>
#include <gideon/cs/datatable/SOActiveSkillTable.h>
#include <gideon/cs/datatable/ItemActiveSkillTable.h>
#include <gideon/cs/datatable/PlayerPassiveSkillTable.h>
#include <gideon/cs/datatable/NpcActiveSkillTable.h>
#include <gideon/cs/datatable/SkillEffectTable.h>
#include <gideon/cs/datatable/NpcTable.h>
#include <gideon/cs/datatable/RecipeTable.h>
#include <gideon/cs/datatable/ElementTable.h>
#include <gideon/cs/datatable/FragmentTable.h>
#include <gideon/cs/datatable/WorldMapTable.h>
#include <gideon/cs/datatable/RegionTable.h>
#include <gideon/cs/datatable/RegionCoordinates.h>
#include <gideon/cs/datatable/RegionSpawnTable.h>
#include <gideon/cs/datatable/PositionSpawnTable.h>
#include <gideon/cs/datatable/ExpTable.h>
#include <gideon/cs/datatable/SelectRecipeProductionTable.h>
#include <gideon/cs/datatable/TreasureTable.h>
#include <gideon/cs/datatable/NpcSellTable.h>
#include <gideon/cs/datatable/NpcBuyTable.h>
#include <gideon/cs/datatable/AnchorTable.h>
#include <gideon/cs/datatable/EntityPathTable.h>
#include <gideon/cs/datatable/ResourcesProductionTable.h>
#include <gideon/cs/datatable/ArenaTable.h>
#include <gideon/cs/datatable/AccessoryTable.h>
//#include <gideon/cs/datatable/StaticObjectSkillTable.h>
#include <gideon/cs/datatable/ActionTable.h>
#include <gideon/cs/datatable/FunctionTable.h>
#include <gideon/cs/datatable/ItemDropTable.h>
#include <gideon/cs/datatable/WorldDropTable.h>
#include <gideon/cs/datatable/WorldDropSuffixTable.h>
#include <gideon/cs/datatable/PropertyTable.h>
#include <gideon/cs/datatable/GemTable.h>
#include <gideon/cs/datatable/QuestTable.h>
#include <gideon/cs/datatable/QuestItemTable.h>
#include <gideon/cs/datatable/QuestKillMissionTable.h>
#include <gideon/cs/datatable/QuestActivationMissionTable.h>
#include <gideon/cs/datatable/QuestProbeMissionTable.h>
#include <gideon/cs/datatable/QuestTransportMissionTable.h>
#include <gideon/cs/datatable/QuestObtainMissionTable.h>
#include <gideon/cs/datatable/QuestContentsMissionTable.h>
#include <gideon/cs/datatable/RandomDungeonTable.h>
#include <gideon/cs/datatable/HarvestTable.h>
#include <gideon/cs/datatable/BuildingTable.h>
#include <gideon/cs/datatable/FactionTable.h>
#include <gideon/cs/datatable/EventTriggerTable.h>
#include <gideon/cs/datatable/DeviceTable.h>
#include <gideon/cs/datatable/GliderTable.h>
#include <gideon/cs/datatable/VehicleTable.h>
#include <gideon/cs/datatable/HarnessTable.h>
#include <gideon/cs/datatable/NpcFormationTable.h>
#include <gideon/cs/datatable/NpcTalkingTable.h>
#include <gideon/cs/datatable/BuildingGuardTable.h>
#include <gideon/cs/datatable/BuildingGuardSellTable.h>
#include <gideon/cs/datatable/WorldEventTable.h>
#include <gideon/cs/datatable/WorldEventMissionTable.h>
#include <gideon/cs/datatable/WorldEventInvaderSpawnTable.h>
#include <gideon/cs/datatable/WorldEventMissionSpawnTable.h>
#include <gideon/cs/datatable/ItemOptionTable.h>
#include <gideon/cs/datatable/ItemSuffixTable.h>
#include <gideon/cs/datatable/CharacterStatusTable.h>
#include <gideon/cs/datatable/CharacterDefaultItemTable.h>
#include <gideon/cs/datatable/CharacterDefaultSkillTable.h>
#include <gideon/cs/datatable/AchievementTable.h>
#include <gideon/cs/datatable/GuildLevelTable.h>
#include <gideon/cs/datatable/GuildSkillTable.h>
#include <sne/server/common/Property.h>
#include <sne/server/utility/Profiler.h>
#include <sne/base/utility/Logger.h>
#include <fstream>
namespace gideon { namespace serverbase {
namespace {
template <typename Table>
inline std::unique_ptr<Table> loadTable(const std::string& tableUrl,
std::unique_ptr<Table> (*createTable)(std::istream& is))
{
std::unique_ptr<Table> table;
std::string why;
std::ifstream ifs(tableUrl.c_str());
if ((! tableUrl.empty()) && ifs.is_open()) {
table = (*createTable)(ifs);
if (table->isLoaded()) {
return table;
}
else {
why = table->getLastError();
}
}
else {
why = "file not found";
}
table.reset();
SNE_LOG_ERROR("Can't load data-table(%s) - %s",
tableUrl.c_str(), why.c_str());
return table;
}
} // namespace
bool DataTableLoader::loadPropertyTable()
{
sne::server::Profiler profiler("DataTableLoader::loadPropertyTable()");
static std::unique_ptr<datatable::PropertyTable> s_propertyTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.property_table_url");
s_propertyTable = loadTable<datatable::PropertyTable>(tableUrl,
datatable::DataTableFactory::createPropertyTable);
if (! s_propertyTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadPropertyTable() FAILED!");
return false;
}
assert(GIDEON_PROPERTY_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadCharacterStatusTable()
{
sne::server::Profiler profiler("DataTableLoader::loadCharacterStatusTable()");
static std::unique_ptr<datatable::CharacterStatusTable> s_characterStatusTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.character_status_table_url");
s_characterStatusTable = loadTable<datatable::CharacterStatusTable>(tableUrl,
datatable::DataTableFactory::createCharacterStatusTable);
if (! s_characterStatusTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadCharacterStatusTable() FAILED!");
return false;
}
assert(CHARACTER_STATUS_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldMapTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldMapTable()");
static std::unique_ptr<datatable::WorldMapTable> s_worldMapTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_map_table_url");
s_worldMapTable = loadTable<datatable::WorldMapTable>(tableUrl,
datatable::DataTableFactory::createWorldMapTable);
if (! s_worldMapTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldMapTable() FAILED!");
return false;
}
assert(WORLDMAP_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadEquipTable()
{
sne::server::Profiler profiler("DataTableLoader::loadEquipTable()");
static std::unique_ptr<datatable::EquipTable> s_equipTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.equip_table_url");
s_equipTable = loadTable<datatable::EquipTable>(tableUrl,
datatable::DataTableFactory::createEquipTable);
if (! s_equipTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadEquipTable() FAILED!");
return false;
}
assert(EQUIP_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadReprocessTable()
{
sne::server::Profiler profiler("DataTableLoader::loadReprocessTable()");
static std::unique_ptr<datatable::ReprocessTable> s_reprocessTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.reprocess_table_url");
s_reprocessTable = loadTable<datatable::ReprocessTable>(tableUrl,
datatable::DataTableFactory::createReprocessTable);
if (! s_reprocessTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadReprocessTable() FAILED!");
return false;
}
assert(REPROCESS_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadPlayerActiveSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadPlayerActiveSkillTable()");
static std::unique_ptr<datatable::PlayerActiveSkillTable> s_playerActiveSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.player_active_skill_table_url");
s_playerActiveSkillTable = loadTable<datatable::PlayerActiveSkillTable>(tableUrl,
datatable::DataTableFactory::createPlayerActiveSkillTableForServer);
if (! s_playerActiveSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadPlayerActiveSkillTable() FAILED!");
return false;
}
assert(PLAYER_ACTIVE_SKILL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadItemActiveSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadItemActiveSkillTable()");
static std::unique_ptr<datatable::ItemActiveSkillTable> s_itemActiveSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.item_active_skill_table_url");
s_itemActiveSkillTable = loadTable<datatable::ItemActiveSkillTable>(tableUrl,
datatable::DataTableFactory::createItemActiveSkillTableForServer);
if (! s_itemActiveSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadItemActiveSkillTable() FAILED!");
return false;
}
assert(ITEM_ACTIVE_SKILL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadSOActiveSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadSOActiveSkillTable()");
static std::unique_ptr<datatable::SOActiveSkillTable> s_soSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.so_active_skill_table_url");
s_soSkillTable = loadTable<datatable::SOActiveSkillTable>(tableUrl,
datatable::DataTableFactory::createSOActiveSkillTableForServer);
if (! s_soSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadSOActiveSkillTable() FAILED!");
return false;
}
assert(SO_ACTIVE_SKILL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadPlayerPassiveSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadPlayerPassiveSkillTable()");
static std::unique_ptr<datatable::PlayerPassiveSkillTable> s_playerPassiveSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.player_passive_skill_table_url");
s_playerPassiveSkillTable = loadTable<datatable::PlayerPassiveSkillTable>(tableUrl,
datatable::DataTableFactory::createPlayerPassiveSkillTableForServer);
if (! s_playerPassiveSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadPlayerPassiveSkillTable() FAILED!");
return false;
}
assert(PLAYER_PASSIVE_SKILL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadNpcActiveSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadNpcActiveSkillTable()");
static std::unique_ptr<datatable::NpcActiveSkillTable> s_npcSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.npc_active_skill_table_url");
s_npcSkillTable = loadTable<datatable::NpcActiveSkillTable>(tableUrl,
datatable::DataTableFactory::createNpcActiveSkillTableForServer);
if (! s_npcSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadNpcActiveSkillTable() FAILED!");
return false;
}
assert(NPC_ACTIVE_SKILL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadSkillEffectTable()
{
sne::server::Profiler profiler("DataTableLoader::loadSkillEffectTable()");
static std::unique_ptr<datatable::SkillEffectTable> s_skillEffectTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.skill_effect_table_url");
s_skillEffectTable = loadTable<datatable::SkillEffectTable>(tableUrl,
datatable::DataTableFactory::createSkillEffectTable);
if (! s_skillEffectTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadSkillEffectTable() FAILED!");
return false;
}
assert(SKILL_EFFECT_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadNpcTable()
{
sne::server::Profiler profiler("DataTableLoader::loadNpcTable()");
static std::unique_ptr<datatable::NpcTable> s_npcTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.npc_table_url");
s_npcTable = loadTable<datatable::NpcTable>(tableUrl,
datatable::DataTableFactory::createNpcTable);
if (! s_npcTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadNpcTable() FAILED!");
return false;
}
assert(NPC_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadElementTable()
{
sne::server::Profiler profiler("DataTableLoader::loadElementTable()");
static std::unique_ptr<datatable::ElementTable> s_elementTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.element_table_url");
s_elementTable = loadTable<datatable::ElementTable>(tableUrl,
datatable::DataTableFactory::createElementTable);
if (! s_elementTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadElementTable() FAILED!");
return false;
}
assert(ELEMENT_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadFragmentTable()
{
sne::server::Profiler profiler("DataTableLoader::loadFragmentTable()");
static std::unique_ptr<datatable::FragmentTable> s_fragmentTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.fragment_table_url");
s_fragmentTable = loadTable<datatable::FragmentTable>(tableUrl,
datatable::DataTableFactory::createFragmentTable);
if (! s_fragmentTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadFragmentTable() FAILED!");
return false;
}
assert(FRAGMENT_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadItemDropTable()
{
sne::server::Profiler profiler("DataTableLoader::loadItemDropTable()");
static std::unique_ptr<datatable::ItemDropTable> s_itemDropTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.item_drop_table_url");
s_itemDropTable = loadTable<datatable::ItemDropTable>(tableUrl,
datatable::DataTableFactory::createItemDropTable);
if (! s_itemDropTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadItemDropTable() FAILED!");
return false;
}
assert(ITEM_DROP_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldDropTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldDropTable()");
static std::unique_ptr<datatable::WorldDropTable> s_worldDropTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_drop_table_url");
s_worldDropTable = loadTable<datatable::WorldDropTable>(tableUrl,
datatable::DataTableFactory::createWorldDropTable);
if (! s_worldDropTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldDropTable() FAILED!");
return false;
}
assert(WORLD_DROP_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldDropSuffixTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldDropSuffixTable()");
static std::unique_ptr<datatable::WorldDropSuffixTable> s_worldDropSuffixTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_drop_suffix_table_url");
s_worldDropSuffixTable = loadTable<datatable::WorldDropSuffixTable>(tableUrl,
datatable::DataTableFactory::createWorldDropSuffixTable);
if (! s_worldDropSuffixTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldDropSuffixTable() FAILED!");
return false;
}
assert(WORLD_DROP_SUFFIX_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadGemTable()
{
sne::server::Profiler profiler("DataTableLoader::loadGemTable()");
static std::unique_ptr<datatable::GemTable> s_gemTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.gem_table_url");
s_gemTable = loadTable<datatable::GemTable>(tableUrl,
datatable::DataTableFactory::createGemTable);
if (! s_gemTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadGemTable() FAILED!");
return false;
}
assert(GEM_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadRecipeTable()
{
sne::server::Profiler profiler("DataTableLoader::loadRecipeTable()");
static std::unique_ptr<datatable::RecipeTable> s_recipeTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.recipe_table_url");
s_recipeTable = loadTable<datatable::RecipeTable>(tableUrl,
datatable::DataTableFactory::createRecipeTable);
if (! s_recipeTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadRecipeTable() FAILED!");
return false;
}
assert(RECIPE_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadExpTable()
{
sne::server::Profiler profiler("DataTableLoader::loadExpTable()");
static std::unique_ptr<datatable::ExpTable> s_expTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.exp_table_url");
s_expTable = loadTable<datatable::ExpTable>(tableUrl,
datatable::DataTableFactory::createExpTable);
if (! s_expTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadExpTable() FAILED!");
return false;
}
assert(EXP_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadSelectProductionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadSelectProductionTable()");
static std::unique_ptr<datatable::SelectRecipeProductionTable> s_selectProductionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.select_recipe_production_table_url");
s_selectProductionTable = loadTable<datatable::SelectRecipeProductionTable>(tableUrl,
datatable::DataTableFactory::createSelectRecipeProductionTable);
if (! s_selectProductionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadSelectProductionTable() FAILED!");
return false;
}
assert(SELECT_RECIPE_PRODUCTION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadRandomDungeonTable()
{
sne::server::Profiler profiler("DataTableLoader::loadRandomDungeonTable()");
static std::unique_ptr<datatable::RandomDungeonTable> s_randomDungeonTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.random_dungeon_table_url");
s_randomDungeonTable = loadTable<datatable::RandomDungeonTable>(tableUrl,
datatable::DataTableFactory::createRandomDungeonTable);
if (! s_randomDungeonTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadRandomDungeonTable() FAILED!");
return false;
}
assert(RANDOM_DUNGEON_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestTable()");
static std::unique_ptr<datatable::QuestTable> s_questTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_table_url");
s_questTable = loadTable<datatable::QuestTable>(tableUrl,
datatable::DataTableFactory::createQuestTable);
if (! s_questTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestTable() FAILED!");
return false;
}
assert(QUEST_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestItemTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestItemTable()");
static std::unique_ptr<datatable::QuestItemTable> s_questItemTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_item_table_url");
s_questItemTable = loadTable<datatable::QuestItemTable>(tableUrl,
datatable::DataTableFactory::createQuestItemTable);
if (! s_questItemTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestItemTable() FAILED!");
return false;
}
assert(QUEST_ITEM_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestKillMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestKillMissionTable()");
static std::unique_ptr<datatable::QuestKillMissionTable> s_questKillMissionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_kill_mission_table_url");
s_questKillMissionTable = loadTable<datatable::QuestKillMissionTable>(tableUrl,
datatable::DataTableFactory::createQuestKillMissionTable);
if (! s_questKillMissionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestKillMissionTable() FAILED!");
return false;
}
assert(QUEST_KILL_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestActivationMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestActivationMissionTable()");
static std::unique_ptr<datatable::QuestActivationMissionTable> s_questActivationMissionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_activation_mission_table_url");
s_questActivationMissionTable = loadTable<datatable::QuestActivationMissionTable>(tableUrl,
datatable::DataTableFactory::createQuestActivationMissionTable);
if (! s_questActivationMissionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestActivationMissionTable() FAILED!");
return false;
}
assert(QUEST_ACTIVATION_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestObtainMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestObtainMissionTable()");
static std::unique_ptr<datatable::QuestObtainMissionTable> s_questObtainMissionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_obtain_mission_table_url");
s_questObtainMissionTable = loadTable<datatable::QuestObtainMissionTable>(tableUrl,
datatable::DataTableFactory::createQuestObtainMissionTable);
if (! s_questObtainMissionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestObtainMissionTable() FAILED!");
return false;
}
assert(QUEST_OBTAIN_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestProbeMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestProbeMissionTable()");
static std::unique_ptr<datatable::QuestProbeMissionTable> s_questProbeMissionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_probe_mission_table_url");
s_questProbeMissionTable = loadTable<datatable::QuestProbeMissionTable>(tableUrl,
datatable::DataTableFactory::createQuestProbeMissionTable);
if (! s_questProbeMissionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestProbeMissionTable() FAILED!");
return false;
}
assert(QUEST_PROBE_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestTransportMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestTransportMissionTable()");
static std::unique_ptr<datatable::QuestTransportMissionTable> s_questTransportMissionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_transport_mission_table_url");
s_questTransportMissionTable = loadTable<datatable::QuestTransportMissionTable>(tableUrl,
datatable::DataTableFactory::createQuestTransportMissionTable);
if (! s_questTransportMissionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestTransportMissionTable() FAILED!");
return false;
}
assert(QUEST_TRANSPORT_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadQuestContentsMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadQuestContentsMissionTable()");
static std::unique_ptr<datatable::QuestContentsMissionTable> s_questContentstMissionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.quest_contents_mission_table_url");
s_questContentstMissionTable = loadTable<datatable::QuestContentsMissionTable>(tableUrl,
datatable::DataTableFactory::createQuestContentsMissionTable);
if (! s_questContentstMissionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadQuestContentsMissionTable() FAILED!");
return false;
}
assert(QUEST_CONTENTS_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadHarvestTable()
{
sne::server::Profiler profiler("DataTableLoader::loadHarvestTable()");
static std::unique_ptr<datatable::HarvestTable> s_harvestTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.harvest_table_url");
s_harvestTable = loadTable<datatable::HarvestTable>(tableUrl,
datatable::DataTableFactory::createHarvestTable);
if (! s_harvestTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadHarvestTable() FAILED!");
return false;
}
assert(HARVEST_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadTreasureTable()
{
sne::server::Profiler profiler("DataTableLoader::loadTreasureTable()");
static std::unique_ptr<datatable::TreasureTable> s_treasureTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.treasure_table_url");
s_treasureTable = loadTable<datatable::TreasureTable>(tableUrl,
datatable::DataTableFactory::createTreasureTable);
if (! s_treasureTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadTreasureTable() FAILED!");
return false;
}
assert(TREASURE_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadNpcSellTable()
{
sne::server::Profiler profiler("DataTableLoader::loadNpcSellTable()");
static std::unique_ptr<datatable::NpcSellTable> s_npcSellTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.npc_sell_table_url");
s_npcSellTable = loadTable<datatable::NpcSellTable>(tableUrl,
datatable::DataTableFactory::createNpcSellTable);
if (! s_npcSellTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadNpcSellTable() FAILED!");
return false;
}
assert(NPC_SELL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadNpcBuyTable()
{
sne::server::Profiler profiler("DataTableLoader::loadNpcBuyTable()");
static std::unique_ptr<datatable::NpcBuyTable> s_npcBuyTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.npc_buy_table_url");
s_npcBuyTable = loadTable<datatable::NpcBuyTable>(tableUrl,
datatable::DataTableFactory::createNpcBuyTable);
if (! s_npcBuyTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadNpcBuyTable() FAILED!");
return false;
}
assert(NPC_BUY_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadAnchorTable()
{
sne::server::Profiler profiler("DataTableLoader::loadAnchorTable()");
static std::unique_ptr<datatable::AnchorTable> s_anchorTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.anchor_table_url");
s_anchorTable = loadTable<datatable::AnchorTable>(tableUrl,
datatable::DataTableFactory::createAnchorTable);
if (! s_anchorTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadAnchorTable() FAILED!");
return false;
}
assert(ANCHOR_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadArenaTable()
{
sne::server::Profiler profiler("DataTableLoader::loadArenaTable()");
static std::unique_ptr<datatable::ArenaTable> s_arenaTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.arena_table_url");
s_arenaTable = loadTable<datatable::ArenaTable>(tableUrl,
datatable::DataTableFactory::createArenaTable);
if (! s_arenaTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadArenaTable() FAILED!");
return false;
}
assert(ARENA_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadAccessoryTable()
{
sne::server::Profiler profiler("DataTableLoader::loadAccessoryTable()");
static std::unique_ptr<datatable::AccessoryTable> s_accessoryTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.accessory_table_url");
s_accessoryTable = loadTable<datatable::AccessoryTable>(tableUrl,
datatable::DataTableFactory::createAccessoryTable);
if (! s_accessoryTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadAccessoryTable() FAILED!");
SNE_LOG_ERROR("DataTableLoader::loadAccessoryTable() FAILED!");
return false;
}
assert(ACCESSORY_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadBuildingTable()
{
sne::server::Profiler profiler("DataTableLoader::loadBuildingTable()");
static std::unique_ptr<datatable::BuildingTable> s_buildingTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.building_table_url");
s_buildingTable = loadTable<datatable::BuildingTable>(tableUrl,
datatable::DataTableFactory::createBuildingTable);
if (! s_buildingTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadBuildingTable() FAILED!");
return false;
}
assert(BUILDING_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadResourcesProductionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadResourcesProductionTable()");
static std::unique_ptr<datatable::ResourcesProductionTable> s_resourcesProductionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.resources_production_table_url");
s_resourcesProductionTable = loadTable<datatable::ResourcesProductionTable>(tableUrl,
datatable::DataTableFactory::createResourcesProductionTable);
if (! s_resourcesProductionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadResourcesProductionTable() FAILED!");
return false;
}
assert(RESOURCES_PRODUCTION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadFactionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadFactionTable()");
static std::unique_ptr<datatable::FactionTable> s_factionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.faction_table_url");
s_factionTable = loadTable<datatable::FactionTable>(tableUrl,
datatable::DataTableFactory::createFactionTable);
if (! s_factionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadFactionTable() FAILED!");
return false;
}
assert(FACTION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadEventTriggerTable()
{
sne::server::Profiler profiler("DataTableLoader::loadEventTriggerTable()");
static std::unique_ptr<datatable::EventTriggerTable> s_eventAiTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.event_trigger_table_url");
s_eventAiTable = loadTable<datatable::EventTriggerTable>(tableUrl,
datatable::DataTableFactory::createEventTriggerTable);
if (! s_eventAiTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadEventTriggerTable() FAILED!");
return false;
}
assert(EVT_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadDeviceTable()
{
sne::server::Profiler profiler("DataTableLoader::loadDeviceTable()");
static std::unique_ptr<datatable::DeviceTable> s_deviceTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.device_table_url");
s_deviceTable = loadTable<datatable::DeviceTable>(tableUrl,
datatable::DataTableFactory::createDeviceTable);
if (! s_deviceTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadDeviceTable() FAILED!");
return false;
}
assert(DEVICE_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadGliderTable()
{
sne::server::Profiler profiler("DataTableLoader::loadGliderTable()");
static std::unique_ptr<datatable::GliderTable> s_gliderTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.glider_table_url");
s_gliderTable = loadTable<datatable::GliderTable>(tableUrl,
datatable::DataTableFactory::createGliderTable);
if (! s_gliderTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadGliderTable() FAILED!");
return false;
}
assert(GLIDER_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadFunctionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadFunctionTable()");
static std::unique_ptr<datatable::FunctionTable> s_functionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.function_table_url");
s_functionTable = loadTable<datatable::FunctionTable>(tableUrl,
datatable::DataTableFactory::createFunctionTable);
if (! s_functionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadFunctionTable() FAILED!");
return false;
}
assert(FUNCTION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadVehicleTable()
{
sne::server::Profiler profiler("DataTableLoader::loadVehicleTable()");
static std::unique_ptr<datatable::VehicleTable> s_vehicleTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.vehicle_table_url");
s_vehicleTable = loadTable<datatable::VehicleTable>(tableUrl,
datatable::DataTableFactory::createVehicleTable);
if (! s_vehicleTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadVehicleTable() FAILED!");
return false;
}
assert(VEHICLE_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadHarnessTable()
{
sne::server::Profiler profiler("DataTableLoader::loadHarnessTable()");
static std::unique_ptr<datatable::HarnessTable> s_harnessTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.harness_table_url");
s_harnessTable = loadTable<datatable::HarnessTable>(tableUrl,
datatable::DataTableFactory::createHarnessTable);
if (! s_harnessTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadHarnessTable() FAILED!");
return false;
}
assert(HARNESS_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadActionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadActionTable()");
static std::unique_ptr<datatable::ActionTable> s_actionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.action_table_url");
s_actionTable = loadTable<datatable::ActionTable>(tableUrl,
datatable::DataTableFactory::createActionTable);
if (! s_actionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadActionTable() FAILED!");
return false;
}
assert(ACTION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadNpcFormationTable()
{
sne::server::Profiler profiler("DataTableLoader::loadNpcFormationTable()");
static std::unique_ptr<datatable::NpcFormationTable> s_npcFormationTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.npc_formation_table_url");
s_npcFormationTable = loadTable<datatable::NpcFormationTable>(tableUrl,
datatable::DataTableFactory::createNpcFormationTable);
if (! s_npcFormationTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadNpcFormationTable() FAILED!");
return false;
}
assert(NPC_FORMATION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadNpcTalkingTable()
{
sne::server::Profiler profiler("DataTableLoader::loadNpcTalkingTable()");
static std::unique_ptr<datatable::NpcTalkingTable> s_npcTalkingTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.npc_talking_table_url");
s_npcTalkingTable = loadTable<datatable::NpcTalkingTable>(tableUrl,
datatable::DataTableFactory::createNpcTalkingTable);
if (! s_npcTalkingTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadNpcTalkingTable() FAILED!");
return false;
}
assert(NPC_TALKING_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadBuildingGuardTable()
{
sne::server::Profiler profiler("DataTableLoader::loadBuildingGuardTable()");
static std::unique_ptr<datatable::BuildingGuardTable> s_buildingGuard;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.building_guard_table_url");
s_buildingGuard = loadTable<datatable::BuildingGuardTable>(tableUrl,
datatable::DataTableFactory::createBuildingGuardTable);
if (! s_buildingGuard.get()) {
SNE_LOG_ERROR("DataTableLoader::loadBuildingGuardTable() FAILED!");
return false;
}
assert(BUILDING_GUARD_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadBuildingGuardSellTable()
{
sne::server::Profiler profiler("DataTableLoader::loadBuildingGuardSellTable()");
static std::unique_ptr<datatable::BuildingGuardSellTable> s_buildingGuardSell;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.building_guard_sell_table_url");
s_buildingGuardSell = loadTable<datatable::BuildingGuardSellTable>(tableUrl,
datatable::DataTableFactory::createBuildingGuardSellTable);
if (! s_buildingGuardSell.get()) {
SNE_LOG_ERROR("DataTableLoader::loadBuildingGuardSellTable() FAILED!");
return false;
}
assert(BUILDING_GUARD_SELL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldEventTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldEventTable()");
static std::unique_ptr<datatable::WorldEventTable> s_worldEvent;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_event_table_url");
s_worldEvent = loadTable<datatable::WorldEventTable>(tableUrl,
datatable::DataTableFactory::createWorldEventTable);
if (! s_worldEvent.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldEventTable() FAILED!");
return false;
}
assert(WORLD_EVENT_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldEventMissionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldEventMissionTable()");
static std::unique_ptr<datatable::WorldEventMissionTable> s_worldEventMission;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_event_mission_table_url");
s_worldEventMission = loadTable<datatable::WorldEventMissionTable>(tableUrl,
datatable::DataTableFactory::createWorldEventMissionTable);
if (! s_worldEventMission.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldEventMissionTable() FAILED!");
return false;
}
assert(WORLD_EVENT_MISSION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldEventInvaderSpawnTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldEventInvaderSpawnTable()");
static std::unique_ptr<datatable::WorldEventInvaderSpawnTable> s_worldEventInvaderSpawn;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_event_invader_spawn_table_url");
s_worldEventInvaderSpawn = loadTable<datatable::WorldEventInvaderSpawnTable>(tableUrl,
datatable::DataTableFactory::createWorldEventInvaderSpawnTable);
if (! s_worldEventInvaderSpawn.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldEventInvaderSpawnTable() FAILED!");
return false;
}
assert(WORLD_EVENT_INVADER_SPAWN_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadWorldEventMissionSpawnTable()
{
sne::server::Profiler profiler("DataTableLoader::loadWorldEventMissionSpawnTable()");
static std::unique_ptr<datatable::WorldEventMissionSpawnTable> s_worldEventMissionSpawn;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.world_event_mission_spawn_table_url");
s_worldEventMissionSpawn = loadTable<datatable::WorldEventMissionSpawnTable>(tableUrl,
datatable::DataTableFactory::createWorldEventMissionSpawnTable);
if (! s_worldEventMissionSpawn.get()) {
SNE_LOG_ERROR("DataTableLoader::loadWorldEventMissionSpawnTable() FAILED!");
return false;
}
assert(WORLD_EVENT_MISSION_SPAWN_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadItemOptionTable()
{
sne::server::Profiler profiler("DataTableLoader::loadItemOptionTable()");
static std::unique_ptr<datatable::ItemOptionTable> s_itemOptionTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.item_option_table_url");
s_itemOptionTable = loadTable<datatable::ItemOptionTable>(tableUrl,
datatable::DataTableFactory::creatItemOptionTable);
if (! s_itemOptionTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadItemOptionTable() FAILED!");
return false;
}
assert(ITEM_OPTION_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadItemSuffixTable()
{
sne::server::Profiler profiler("DataTableLoader::loadItemSuffixTable()");
static std::unique_ptr<datatable::ItemSuffixTable> s_itemSuffixTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.item_suffix_table_url");
s_itemSuffixTable = loadTable<datatable::ItemSuffixTable>(tableUrl,
datatable::DataTableFactory::createItemSuffixTable);
if (! s_itemSuffixTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadItemSuffixTable() FAILED!");
return false;
}
assert(ITEM_SUFFIX_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadCharacterDefaultItemTable()
{
sne::server::Profiler profiler("DataTableLoader::loadCharacterDefaultItemTable()");
static std::unique_ptr<datatable::CharacterDefaultItemTable> s_characterDefaultItemTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.character_default_item_table_url");
s_characterDefaultItemTable = loadTable<datatable::CharacterDefaultItemTable>(tableUrl,
datatable::DataTableFactory::createCharacterDefaultItemTable);
if (! s_characterDefaultItemTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadCharacterDefaultItemTable() FAILED!");
return false;
}
assert(CHARACTER_DEFAULT_ITEM_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadCharacterDefaultSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadCharacterDefaultSkillTable()");
static std::unique_ptr<datatable::CharacterDefaultSkillTable> s_characterDefaultSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.character_default_skill_table_url");
s_characterDefaultSkillTable = loadTable<datatable::CharacterDefaultSkillTable>(tableUrl,
datatable::DataTableFactory::createCharacterDefaultSkillTable);
if (! s_characterDefaultSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadCharacterDefaultSkillTable() FAILED!");
return false;
}
assert(CHARACTER_DEFAULT_SKILL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadAchievementTable()
{
sne::server::Profiler profiler("DataTableLoader::loadAchievementTable()");
static std::unique_ptr<datatable::AchievementTable> s_achievementTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.achievement_table_url");
s_achievementTable = loadTable<datatable::AchievementTable>(tableUrl,
datatable::DataTableFactory::createAchievementTable);
if (! s_achievementTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadAchievementTable() FAILED!");
return false;
}
assert(ACHIEVEMENT_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadGuildLevelTable()
{
sne::server::Profiler profiler("DataTableLoader::loadGuildLevelTable()");
static std::unique_ptr<datatable::GuildLevelTable> s_guildLevel;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.guild_level_table_url");
s_guildLevel = loadTable<datatable::GuildLevelTable>(tableUrl,
datatable::DataTableFactory::createGuildLevelTable);
if (! s_guildLevel.get()) {
SNE_LOG_ERROR("DataTableLoader::loadGuildLevelTable() FAILED!");
return false;
}
assert(GUILD_LEVEL_TABLE != nullptr);
return true;
}
bool DataTableLoader::loadGuildSkillTable()
{
sne::server::Profiler profiler("DataTableLoader::loadGuildSkillTable()");
static std::unique_ptr<datatable::GuildSkillTable> s_guildSkillTable;
const std::string tableUrl =
SNE_PROPERTIES::getProperty<std::string>("data_table.guild_skill_table_url");
s_guildSkillTable = loadTable<datatable::GuildSkillTable>(tableUrl,
datatable::DataTableFactory::createGuildSkillTable);
if (! s_guildSkillTable.get()) {
SNE_LOG_ERROR("DataTableLoader::loadGuildSkillTable() FAILED!");
return false;
}
assert(GUILD_SKILL_TABLE != nullptr);
return true;
}
std::unique_ptr<datatable::RegionTable>
DataTableLoader::loadRegionTable(MapCode mapCode)
{
if (! isValidMapCode(mapCode)) {
return std::unique_ptr<datatable::RegionTable>();
}
std::string urlPrefix;
if (getMapType(mapCode) == mtArena) {
urlPrefix =
SNE_PROPERTIES::getProperty<std::string>("data_table.arena_region_table_url_prefix");
}
else {
urlPrefix =
SNE_PROPERTIES::getProperty<std::string>("data_table.region_table_url_prefix");
}
const std::string regionUrl = urlPrefix +
boost::lexical_cast<std::string>(mapCode) + ".xml";
return loadTable<datatable::RegionTable>(regionUrl,
datatable::DataTableFactory::createRegionTable);
}
std::unique_ptr<datatable::RegionCoordinates>
DataTableLoader::loadRegionCoordinates(MapCode mapCode)
{
const std::string urlPrefix =
SNE_PROPERTIES::getProperty<std::string>("data_table.region_coordinates_url_prefix");
const std::string coordinatesUrl = urlPrefix +
boost::lexical_cast<std::string>(mapCode) + ".xml";
return loadTable<datatable::RegionCoordinates>(coordinatesUrl,
datatable::DataTableFactory::createRegionCoordinates);
}
std::unique_ptr<datatable::RegionSpawnTable>
DataTableLoader::loadRegionSpawnTable(MapCode mapCode)
{
const std::string urlPrefix =
SNE_PROPERTIES::getProperty<std::string>("data_table.region_spawn_table_url_prefix");
const std::string regionUrl = urlPrefix +
boost::lexical_cast<std::string>(mapCode) + ".xml";
return loadTable<datatable::RegionSpawnTable>(regionUrl,
datatable::DataTableFactory::createRegionSpawnTable);
}
std::unique_ptr<datatable::PositionSpawnTable>
DataTableLoader::loadPositionSpawnTable(MapCode mapCode)
{
const std::string urlPrefix =
SNE_PROPERTIES::getProperty<std::string>("data_table.position_spawn_table_url_prefix");
const std::string regionUrl = urlPrefix +
boost::lexical_cast<std::string>(mapCode) + ".xml";
return loadTable<datatable::PositionSpawnTable>(regionUrl,
datatable::DataTableFactory::createPositionSpawnTable);
}
std::unique_ptr<datatable::EntityPathTable>
DataTableLoader::loadEntityPathTable(MapCode mapCode)
{
const std::string urlPrefix =
SNE_PROPERTIES::getProperty<std::string>("data_table.entity_path_table_url_prefix");
const std::string regionUrl = urlPrefix +
boost::lexical_cast<std::string>(mapCode) + ".xml";
return loadTable<datatable::EntityPathTable>(regionUrl,
datatable::DataTableFactory::createEntityPathTable);
}
}} // namespace gideon { namespace serverbase {
| 33.629066
| 99
| 0.733239
|
mark-online
|
791c9ab9c4e0c2969625dec69ac7b20ee96f383c
| 3,535
|
cpp
|
C++
|
Metazion/Net/ComConnecter.cpp
|
KaleoFeng/Metazion
|
5f1149d60aa87b391c2f40de7a89a5044701f2ca
|
[
"MIT"
] | 15
|
2018-10-30T07:49:02.000Z
|
2020-10-20T06:27:08.000Z
|
Metazion/Net/ComConnecter.cpp
|
kaleofeng/metazion
|
5f1149d60aa87b391c2f40de7a89a5044701f2ca
|
[
"MIT"
] | null | null | null |
Metazion/Net/ComConnecter.cpp
|
kaleofeng/metazion
|
5f1149d60aa87b391c2f40de7a89a5044701f2ca
|
[
"MIT"
] | 5
|
2020-12-04T07:39:31.000Z
|
2021-11-23T03:16:39.000Z
|
#include "Metazion/Net/ComConnecter.hpp"
#include <Metazion/Share/Time/Time.hpp>
#include "Metazion/Net/TransmitSocket.hpp"
DECL_NAMESPACE_MZ_NET_BEGIN
ComConnecter::ComConnecter(TransmitSocket& socket)
: m_socket(socket) {}
ComConnecter::~ComConnecter() {}
void ComConnecter::Reset() {
m_stage = STAGE_NONE;
m_connectTime = 0;
m_reconnectInterval = 0;
m_tempSockId = INVALID_SOCKID;
}
void ComConnecter::Tick(int64_t now, int interval) {
ConnectStage();
}
bool ComConnecter::Connect() {
SetStage(STAGE_WAITING);
return true;
}
void ComConnecter::ConnectStage() {
switch (m_stage) {
case STAGE_WAITING:
ConnectStageWaiting();
break;
case STAGE_CONNECTING:
ConnectStageConnecting();
break;
case STAGE_CONNECTED:
ConnectStageConnected();
break;
case STAGE_CLOSED:
ConnectStageClosed();
break;
default: MZ_ASSERT_TRUE(false); break;
}
}
void ComConnecter::ConnectStageWaiting() {
const auto now = NS_SHARE::GetNowMillisecond();
if (now < m_connectTime) {
return;
}
const auto ret = TryToConnect();
if (ret == 0) {
SetStage(STAGE_CONNECTING);
}
else if (ret > 0) {
m_socket.AttachSockId(m_tempSockId);
SetStage(STAGE_CONNECTED);
}
else {
m_connectFaildCallback();
Reconnect(m_reconnectInterval);
}
}
void ComConnecter::ConnectStageConnecting() {
const auto ret = CheckConnected();
if (ret == 0) {
// Keep connecting.
}
else if (ret > 0) {
m_socket.AttachSockId(m_tempSockId);
SetStage(STAGE_CONNECTED);
}
else {
DetachTempSockId();
m_connectFaildCallback();
Reconnect(m_reconnectInterval);
}
}
void ComConnecter::ConnectStageConnected() {
if (m_socket.IsActive()) {
return;
}
if (m_socket.IsWannaClose()) {
return;
}
Reconnect(1000);
}
void ComConnecter::ConnectStageClosed() {
MZ_ASSERT_TRUE(!m_socket.IsActive());
}
void ComConnecter::Reconnect(int milliseconds) {
if (m_reconnectInterval < 0) {
SetStage(STAGE_CLOSED);
return;
}
ResetConnectTime(milliseconds);
SetStage(STAGE_WAITING);
}
int ComConnecter::TryToConnect() {
auto sockId = CreateSockId(TRANSPORT_TCP);
if (sockId == INVALID_SOCKID) {
return -1;
}
AttachTempSockId(sockId);
auto sockAddr = m_socket.GetRemoteHost().SockAddr();
auto sockAddrLen = m_socket.GetRemoteHost().SockAddrLen();
const auto ret = connect(m_tempSockId, sockAddr, sockAddrLen);
if (ret < 0) {
const auto error = SAGetLastError();
if (!IsConnectWouldBlock(error)) {
DetachTempSockId();
return -1;
}
return 0;
}
return 1;
}
int ComConnecter::CheckConnected() {
const auto ret = CheckSockConnected(m_tempSockId);
if (ret <= 0) {
return ret;
}
// It doesn't work in some situations on linux platform.
// For examle, when listen socket's backlog queue is full.
// And also doesn't work on solaris platform.
int optValue = 0;
auto optLength = static_cast<SockLen_t>(sizeof(optValue));
GetSockOpt(m_tempSockId, SOL_SOCKET, SO_ERROR, &optValue, &optLength);
if (optValue != 0) {
return -1;
}
return 1;
}
void ComConnecter::ResetConnectTime(int milliseconds) {
m_connectTime = NS_SHARE::GetNowMillisecond() + milliseconds;
}
DECL_NAMESPACE_MZ_NET_END
| 22.373418
| 74
| 0.641018
|
KaleoFeng
|
791f893820e1fda1d7684a2eff098374840d4a7e
| 2,188
|
cpp
|
C++
|
cppcheck/data/c_files/13.cpp
|
awsm-research/LineVul
|
246baf18c1932094564a10c9b81efb21914b2978
|
[
"MIT"
] | 2
|
2022-03-23T12:16:20.000Z
|
2022-03-31T06:19:40.000Z
|
cppcheck/data/c_files/13.cpp
|
awsm-research/LineVul
|
246baf18c1932094564a10c9b81efb21914b2978
|
[
"MIT"
] | null | null | null |
cppcheck/data/c_files/13.cpp
|
awsm-research/LineVul
|
246baf18c1932094564a10c9b81efb21914b2978
|
[
"MIT"
] | null | null | null |
IDNConversionResult IDNToUnicodeWithAdjustmentsImpl(
base::StringPiece host,
base::OffsetAdjuster::Adjustments* adjustments,
bool enable_spoof_checks) {
if (adjustments)
adjustments->clear();
// Convert the ASCII input to a base::string16 for ICU.
base::string16 input16;
input16.reserve(host.length());
input16.insert(input16.end(), host.begin(), host.end());
bool is_tld_ascii = true;
size_t last_dot = host.rfind('.');
if (last_dot != base::StringPiece::npos &&
host.substr(last_dot).starts_with(".xn--")) {
is_tld_ascii = false;
}
IDNConversionResult result;
// Do each component of the host separately, since we enforce script matching
// on a per-component basis.
base::string16 out16;
for (size_t component_start = 0, component_end;
component_start < input16.length();
component_start = component_end + 1) {
// Find the end of the component.
component_end = input16.find('.', component_start);
if (component_end == base::string16::npos)
component_end = input16.length(); // For getting the last component.
size_t component_length = component_end - component_start;
size_t new_component_start = out16.length();
bool converted_idn = false;
if (component_end > component_start) {
// Add the substring that we just found.
bool has_idn_component = false;
converted_idn = IDNToUnicodeOneComponent(
input16.data() + component_start, component_length, is_tld_ascii,
enable_spoof_checks, &out16, &has_idn_component);
result.has_idn_component |= has_idn_component;
}
size_t new_component_length = out16.length() - new_component_start;
if (converted_idn && adjustments) {
adjustments->push_back(base::OffsetAdjuster::Adjustment(
component_start, component_length, new_component_length));
}
// Need to add the dot we just found (if we found one).
if (component_end < input16.length())
out16.push_back('.');
}
result.result = out16;
// Leave as punycode any inputs that spoof top domains.
if (result.has_idn_component) {
result.matching_top_domain =
g_idn_spoof_checker.Get().GetSimilarTopDomain(out16);
if (enable_spoof_checks && !result.matching_top_domain.domain.empty()) {
if (adjustments)
adjustments->clear();
result.result = input16;
}
}
return result;
}
| 32.176471
| 77
| 0.762797
|
awsm-research
|
792136d98b549852f7f8776bf1bebc52c9f940be
| 9,845
|
cpp
|
C++
|
src/odbc/Connection.cpp
|
mrylov/odbc-cpp-wrapper
|
c822bc036196aa1819ccf69a88556382eeae925f
|
[
"Apache-2.0"
] | 34
|
2019-02-25T14:43:58.000Z
|
2022-03-14T17:15:44.000Z
|
src/odbc/Connection.cpp
|
mrylov/odbc-cpp-wrapper
|
c822bc036196aa1819ccf69a88556382eeae925f
|
[
"Apache-2.0"
] | 18
|
2019-05-14T10:00:09.000Z
|
2022-03-14T17:15:05.000Z
|
src/odbc/Connection.cpp
|
mrylov/odbc-cpp-wrapper
|
c822bc036196aa1819ccf69a88556382eeae925f
|
[
"Apache-2.0"
] | 28
|
2019-05-14T09:25:30.000Z
|
2022-03-18T04:21:21.000Z
|
#include <limits>
#include <odbc/Connection.h>
#include <odbc/DatabaseMetaData.h>
#include <odbc/DatabaseMetaDataUnicode.h>
#include <odbc/Environment.h>
#include <odbc/Exception.h>
#include <odbc/PreparedStatement.h>
#include <odbc/ResultSet.h>
#include <odbc/Statement.h>
#include <odbc/internal/Macros.h>
#include <odbc/internal/Odbc.h>
//------------------------------------------------------------------------------
using namespace std;
//------------------------------------------------------------------------------
namespace odbc {
//------------------------------------------------------------------------------
Connection::Connection(Environment* parent)
: parent_(parent, true)
, hdbc_(SQL_NULL_HANDLE)
, connected_(false)
{
}
//------------------------------------------------------------------------------
Connection::~Connection()
{
if (connected_)
SQLDisconnect(hdbc_);
if (hdbc_)
SQLFreeHandle(SQL_HANDLE_DBC, hdbc_);
}
//------------------------------------------------------------------------------
void Connection::setHandle(void* hdbc)
{
hdbc_ = hdbc;
}
//------------------------------------------------------------------------------
void Connection::connect(const char* dsn, const char* user,
const char* password)
{
EXEC_DBC(SQLConnectA, hdbc_,
(SQLCHAR*)dsn, SQL_NTS,
(SQLCHAR*)user, SQL_NTS,
(SQLCHAR*)password, SQL_NTS);
connected_ = true;
}
//------------------------------------------------------------------------------
void Connection::connect(const char* connString)
{
SQLCHAR outString[1024];
SQLSMALLINT outLength;
EXEC_DBC(SQLDriverConnectA, hdbc_, NULL,
(SQLCHAR*)connString, SQL_NTS,
outString, sizeof(outString),
&outLength, SQL_DRIVER_NOPROMPT);
connected_ = true;
}
//------------------------------------------------------------------------------
void Connection::disconnect()
{
SQLRETURN rc = SQLDisconnect(hdbc_);
connected_ = false;
Exception::checkForError(rc, SQL_HANDLE_DBC, hdbc_);
}
//------------------------------------------------------------------------------
bool Connection::connected() const
{
return connected_;
}
//------------------------------------------------------------------------------
bool Connection::isValid()
{
SQLULEN ret = 0;
EXEC_DBC(SQLGetConnectAttr, hdbc_, SQL_ATTR_CONNECTION_DEAD, &ret, 0, NULL);
return ret == SQL_CD_FALSE;
}
//------------------------------------------------------------------------------
unsigned long Connection::getConnectionTimeout()
{
SQLULEN ret = 0;
EXEC_DBC(SQLGetConnectAttr, hdbc_, SQL_ATTR_CONNECTION_TIMEOUT, &ret, 0,
NULL);
return (unsigned long)ret;
}
//------------------------------------------------------------------------------
void Connection::setConnectionTimeout(unsigned long seconds)
{
EXEC_DBC(SQLSetConnectAttr, hdbc_, SQL_ATTR_CONNECTION_TIMEOUT,
(SQLPOINTER)(ptrdiff_t)seconds, SQL_IS_UINTEGER);
}
//------------------------------------------------------------------------------
unsigned long Connection::getLoginTimeout()
{
SQLULEN ret = 0;
EXEC_DBC(SQLGetConnectAttr, hdbc_, SQL_ATTR_LOGIN_TIMEOUT, &ret, 0, NULL);
return (unsigned long)ret;
}
//------------------------------------------------------------------------------
void Connection::setLoginTimeout(unsigned long seconds)
{
EXEC_DBC(SQLSetConnectAttr, hdbc_, SQL_ATTR_LOGIN_TIMEOUT,
(SQLPOINTER)(ptrdiff_t)seconds, SQL_IS_UINTEGER);
}
//------------------------------------------------------------------------------
void Connection::setAttribute(int attr, int value)
{
EXEC_DBC(SQLSetConnectAttr, hdbc_, attr, (SQLPOINTER)(ptrdiff_t)value,
SQL_IS_INTEGER);
}
//------------------------------------------------------------------------------
void Connection::setAttribute(int attr, unsigned int value)
{
EXEC_DBC(SQLSetConnectAttr, hdbc_, attr, (SQLPOINTER)(ptrdiff_t)value,
SQL_IS_UINTEGER);
}
//------------------------------------------------------------------------------
void Connection::setAttribute(int attr, const char* value)
{
EXEC_DBC(SQLSetConnectAttr, hdbc_, attr, (SQLPOINTER)value, SQL_NTS);
}
//------------------------------------------------------------------------------
void Connection::setAttribute(int attr, const char* value, std::size_t size)
{
if (size > (size_t)numeric_limits<SQLINTEGER>::max())
throw Exception("The attribute value is too long");
EXEC_DBC(SQLSetConnectAttr, hdbc_, attr, (SQLPOINTER)value,
(SQLINTEGER)size);
}
//------------------------------------------------------------------------------
void Connection::setAttribute(int attr, const void* value, std::size_t size)
{
if (size > (size_t)numeric_limits<SQLINTEGER>::max())
throw Exception("The attribute value is too long");
EXEC_DBC(SQLSetConnectAttr, hdbc_, attr, (SQLPOINTER)value,
(SQLINTEGER)size);
}
//------------------------------------------------------------------------------
bool Connection::getAutoCommit() const
{
SQLULEN ret = 0;
EXEC_DBC(SQLGetConnectAttr, hdbc_, SQL_ATTR_AUTOCOMMIT, &ret, 0, NULL);
return ret == SQL_AUTOCOMMIT_ON;
}
//------------------------------------------------------------------------------
void Connection::setAutoCommit(bool autoCommit)
{
EXEC_DBC(SQLSetConnectAttr, hdbc_, SQL_ATTR_AUTOCOMMIT,
autoCommit ?
(SQLPOINTER)SQL_AUTOCOMMIT_ON: (SQLPOINTER)SQL_AUTOCOMMIT_OFF,
SQL_IS_INTEGER);
}
//------------------------------------------------------------------------------
void Connection::commit()
{
SQLRETURN rc = SQLEndTran(SQL_HANDLE_DBC, hdbc_, SQL_COMMIT);
Exception::checkForError(rc, SQL_HANDLE_DBC, hdbc_);
}
//------------------------------------------------------------------------------
void Connection::rollback()
{
SQLRETURN rc = SQLEndTran(SQL_HANDLE_DBC, hdbc_, SQL_ROLLBACK);
Exception::checkForError(rc, SQL_HANDLE_DBC, hdbc_);
}
//------------------------------------------------------------------------------
bool Connection::isReadOnly()
{
SQLULEN ret = 0;
EXEC_DBC(SQLGetConnectAttr, hdbc_, SQL_ATTR_ACCESS_MODE, &ret, 0, NULL);
return ret == SQL_MODE_READ_ONLY;
}
//------------------------------------------------------------------------------
void Connection::setReadOnly(bool readOnly)
{
unsigned int mode = readOnly ? SQL_MODE_READ_ONLY : SQL_MODE_READ_WRITE;
setAttribute(SQL_ATTR_ACCESS_MODE, mode);
}
//------------------------------------------------------------------------------
TransactionIsolationLevel Connection::getTransactionIsolation()
{
SQLULEN txn = 0;
EXEC_DBC(SQLGetConnectAttr, hdbc_, SQL_ATTR_TXN_ISOLATION, &txn, 0, NULL);
switch (txn)
{
case SQL_TXN_READ_COMMITTED:
return TransactionIsolationLevel::READ_COMMITTED;
case SQL_TXN_READ_UNCOMMITTED:
return TransactionIsolationLevel::READ_UNCOMMITTED;
case SQL_TXN_REPEATABLE_READ:
return TransactionIsolationLevel::REPEATABLE_READ;
case SQL_TXN_SERIALIZABLE:
return TransactionIsolationLevel::SERIALIZABLE;
case 0:
return TransactionIsolationLevel::NONE;
default:
throw Exception("Unknown transaction isolation level.");
}
}
//------------------------------------------------------------------------------
void Connection::setTransactionIsolation(TransactionIsolationLevel level)
{
unsigned int txn = 0;
switch (level)
{
case TransactionIsolationLevel::READ_COMMITTED:
txn = SQL_TXN_READ_COMMITTED;
break;
case TransactionIsolationLevel::READ_UNCOMMITTED:
txn = SQL_TXN_READ_UNCOMMITTED;
break;
case TransactionIsolationLevel::REPEATABLE_READ:
txn = SQL_TXN_REPEATABLE_READ;
break;
case TransactionIsolationLevel::SERIALIZABLE:
txn = SQL_TXN_SERIALIZABLE;
break;
case TransactionIsolationLevel::NONE:
throw Exception("NONE transaction isolation level cannot be set.");
}
setAttribute(SQL_ATTR_TXN_ISOLATION, txn);
}
//------------------------------------------------------------------------------
StatementRef Connection::createStatement()
{
SQLHANDLE hstmt;
StatementRef ret(new Statement(this));
SQLRETURN rc = SQLAllocHandle(SQL_HANDLE_STMT, hdbc_, &hstmt);
Exception::checkForError(rc, SQL_HANDLE_DBC, hdbc_);
ret->setHandle(hstmt);
return ret;
}
//------------------------------------------------------------------------------
PreparedStatementRef Connection::prepareStatement(const char* sql)
{
SQLHANDLE hstmt;
PreparedStatementRef ret(new PreparedStatement(this));
SQLRETURN rc = SQLAllocHandle(SQL_HANDLE_STMT, hdbc_, &hstmt);
Exception::checkForError(rc, SQL_HANDLE_DBC, hdbc_);
ret->setHandleAndQuery(hstmt, sql);
return ret;
}
//------------------------------------------------------------------------------
PreparedStatementRef Connection::prepareStatement(const char16_t* sql)
{
SQLHANDLE hstmt;
PreparedStatementRef ret(new PreparedStatement(this));
SQLRETURN rc = SQLAllocHandle(SQL_HANDLE_STMT, hdbc_, &hstmt);
Exception::checkForError(rc, SQL_HANDLE_DBC, hdbc_);
ret->setHandleAndQuery(hstmt, sql);
return ret;
}
//------------------------------------------------------------------------------
DatabaseMetaDataRef Connection::getDatabaseMetaData()
{
DatabaseMetaDataRef ret(new DatabaseMetaData(this));
return ret;
}
//------------------------------------------------------------------------------
DatabaseMetaDataUnicodeRef Connection::getDatabaseMetaDataUnicode()
{
DatabaseMetaDataUnicodeRef ret(new DatabaseMetaDataUnicode(this));
return ret;
}
//------------------------------------------------------------------------------
} // namespace odbc
| 37.011278
| 80
| 0.528085
|
mrylov
|
792273d865dd48c6e4851aaa7e72ca73121c7e56
| 26,275
|
cc
|
C++
|
src/cxx/default_ast_visitor.cc
|
robertoraggi/cplusplus
|
d15d4669629a7cc0347ea7ed60697b55cbd44523
|
[
"MIT"
] | 49
|
2015-03-08T11:28:28.000Z
|
2021-11-29T14:23:39.000Z
|
src/cxx/default_ast_visitor.cc
|
robertoraggi/cplusplus
|
d15d4669629a7cc0347ea7ed60697b55cbd44523
|
[
"MIT"
] | 19
|
2021-03-06T05:14:02.000Z
|
2021-12-02T19:48:07.000Z
|
src/cxx/default_ast_visitor.cc
|
robertoraggi/cplusplus
|
d15d4669629a7cc0347ea7ed60697b55cbd44523
|
[
"MIT"
] | 10
|
2015-01-08T16:08:49.000Z
|
2022-01-27T06:42:51.000Z
|
// Copyright (c) 2021 Roberto Raggi <roberto.raggi@gmail.com>
//
// 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 <cxx/ast.h>
#include <cxx/default_ast_visitor.h>
#include <stdexcept>
namespace cxx {
// AST
void DefaultASTVisitor::visit(TypeIdAST* ast) {
throw std::runtime_error("visit(TypeIdAST): not implemented");
}
void DefaultASTVisitor::visit(NestedNameSpecifierAST* ast) {
throw std::runtime_error("visit(NestedNameSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(UsingDeclaratorAST* ast) {
throw std::runtime_error("visit(UsingDeclaratorAST): not implemented");
}
void DefaultASTVisitor::visit(HandlerAST* ast) {
throw std::runtime_error("visit(HandlerAST): not implemented");
}
void DefaultASTVisitor::visit(EnumBaseAST* ast) {
throw std::runtime_error("visit(EnumBaseAST): not implemented");
}
void DefaultASTVisitor::visit(EnumeratorAST* ast) {
throw std::runtime_error("visit(EnumeratorAST): not implemented");
}
void DefaultASTVisitor::visit(DeclaratorAST* ast) {
throw std::runtime_error("visit(DeclaratorAST): not implemented");
}
void DefaultASTVisitor::visit(InitDeclaratorAST* ast) {
throw std::runtime_error("visit(InitDeclaratorAST): not implemented");
}
void DefaultASTVisitor::visit(BaseSpecifierAST* ast) {
throw std::runtime_error("visit(BaseSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(BaseClauseAST* ast) {
throw std::runtime_error("visit(BaseClauseAST): not implemented");
}
void DefaultASTVisitor::visit(NewTypeIdAST* ast) {
throw std::runtime_error("visit(NewTypeIdAST): not implemented");
}
void DefaultASTVisitor::visit(RequiresClauseAST* ast) {
throw std::runtime_error("visit(RequiresClauseAST): not implemented");
}
void DefaultASTVisitor::visit(ParameterDeclarationClauseAST* ast) {
throw std::runtime_error(
"visit(ParameterDeclarationClauseAST): not implemented");
}
void DefaultASTVisitor::visit(ParametersAndQualifiersAST* ast) {
throw std::runtime_error(
"visit(ParametersAndQualifiersAST): not implemented");
}
void DefaultASTVisitor::visit(LambdaIntroducerAST* ast) {
throw std::runtime_error("visit(LambdaIntroducerAST): not implemented");
}
void DefaultASTVisitor::visit(LambdaDeclaratorAST* ast) {
throw std::runtime_error("visit(LambdaDeclaratorAST): not implemented");
}
void DefaultASTVisitor::visit(TrailingReturnTypeAST* ast) {
throw std::runtime_error("visit(TrailingReturnTypeAST): not implemented");
}
void DefaultASTVisitor::visit(CtorInitializerAST* ast) {
throw std::runtime_error("visit(CtorInitializerAST): not implemented");
}
void DefaultASTVisitor::visit(RequirementBodyAST* ast) {
throw std::runtime_error("visit(RequirementBodyAST): not implemented");
}
void DefaultASTVisitor::visit(TypeConstraintAST* ast) {
throw std::runtime_error("visit(TypeConstraintAST): not implemented");
}
// RequirementAST
void DefaultASTVisitor::visit(SimpleRequirementAST* ast) {
throw std::runtime_error("visit(SimpleRequirementAST): not implemented");
}
void DefaultASTVisitor::visit(CompoundRequirementAST* ast) {
throw std::runtime_error("visit(CompoundRequirementAST): not implemented");
}
void DefaultASTVisitor::visit(TypeRequirementAST* ast) {
throw std::runtime_error("visit(TypeRequirementAST): not implemented");
}
void DefaultASTVisitor::visit(NestedRequirementAST* ast) {
throw std::runtime_error("visit(NestedRequirementAST): not implemented");
}
// TemplateArgumentAST
void DefaultASTVisitor::visit(TypeTemplateArgumentAST* ast) {
throw std::runtime_error("visit(TypeTemplateArgumentAST): not implemented");
}
void DefaultASTVisitor::visit(ExpressionTemplateArgumentAST* ast) {
throw std::runtime_error(
"visit(ExpressionTemplateArgumentAST): not implemented");
}
// MemInitializerAST
void DefaultASTVisitor::visit(ParenMemInitializerAST* ast) {
throw std::runtime_error("visit(ParenMemInitializerAST): not implemented");
}
void DefaultASTVisitor::visit(BracedMemInitializerAST* ast) {
throw std::runtime_error("visit(BracedMemInitializerAST): not implemented");
}
// LambdaCaptureAST
void DefaultASTVisitor::visit(ThisLambdaCaptureAST* ast) {
throw std::runtime_error("visit(ThisLambdaCaptureAST): not implemented");
}
void DefaultASTVisitor::visit(DerefThisLambdaCaptureAST* ast) {
throw std::runtime_error("visit(DerefThisLambdaCaptureAST): not implemented");
}
void DefaultASTVisitor::visit(SimpleLambdaCaptureAST* ast) {
throw std::runtime_error("visit(SimpleLambdaCaptureAST): not implemented");
}
void DefaultASTVisitor::visit(RefLambdaCaptureAST* ast) {
throw std::runtime_error("visit(RefLambdaCaptureAST): not implemented");
}
void DefaultASTVisitor::visit(RefInitLambdaCaptureAST* ast) {
throw std::runtime_error("visit(RefInitLambdaCaptureAST): not implemented");
}
void DefaultASTVisitor::visit(InitLambdaCaptureAST* ast) {
throw std::runtime_error("visit(InitLambdaCaptureAST): not implemented");
}
// InitializerAST
void DefaultASTVisitor::visit(EqualInitializerAST* ast) {
throw std::runtime_error("visit(EqualInitializerAST): not implemented");
}
void DefaultASTVisitor::visit(BracedInitListAST* ast) {
throw std::runtime_error("visit(BracedInitListAST): not implemented");
}
void DefaultASTVisitor::visit(ParenInitializerAST* ast) {
throw std::runtime_error("visit(ParenInitializerAST): not implemented");
}
// NewInitializerAST
void DefaultASTVisitor::visit(NewParenInitializerAST* ast) {
throw std::runtime_error("visit(NewParenInitializerAST): not implemented");
}
void DefaultASTVisitor::visit(NewBracedInitializerAST* ast) {
throw std::runtime_error("visit(NewBracedInitializerAST): not implemented");
}
// ExceptionDeclarationAST
void DefaultASTVisitor::visit(EllipsisExceptionDeclarationAST* ast) {
throw std::runtime_error(
"visit(EllipsisExceptionDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(TypeExceptionDeclarationAST* ast) {
throw std::runtime_error(
"visit(TypeExceptionDeclarationAST): not implemented");
}
// FunctionBodyAST
void DefaultASTVisitor::visit(DefaultFunctionBodyAST* ast) {
throw std::runtime_error("visit(DefaultFunctionBodyAST): not implemented");
}
void DefaultASTVisitor::visit(CompoundStatementFunctionBodyAST* ast) {
throw std::runtime_error(
"visit(CompoundStatementFunctionBodyAST): not implemented");
}
void DefaultASTVisitor::visit(TryStatementFunctionBodyAST* ast) {
throw std::runtime_error(
"visit(TryStatementFunctionBodyAST): not implemented");
}
void DefaultASTVisitor::visit(DeleteFunctionBodyAST* ast) {
throw std::runtime_error("visit(DeleteFunctionBodyAST): not implemented");
}
// UnitAST
void DefaultASTVisitor::visit(TranslationUnitAST* ast) {
throw std::runtime_error("visit(TranslationUnitAST): not implemented");
}
void DefaultASTVisitor::visit(ModuleUnitAST* ast) {
throw std::runtime_error("visit(ModuleUnitAST): not implemented");
}
// ExpressionAST
void DefaultASTVisitor::visit(ThisExpressionAST* ast) {
throw std::runtime_error("visit(ThisExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(CharLiteralExpressionAST* ast) {
throw std::runtime_error("visit(CharLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(BoolLiteralExpressionAST* ast) {
throw std::runtime_error("visit(BoolLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(IntLiteralExpressionAST* ast) {
throw std::runtime_error("visit(IntLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(FloatLiteralExpressionAST* ast) {
throw std::runtime_error("visit(FloatLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(NullptrLiteralExpressionAST* ast) {
throw std::runtime_error(
"visit(NullptrLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(StringLiteralExpressionAST* ast) {
throw std::runtime_error(
"visit(StringLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(UserDefinedStringLiteralExpressionAST* ast) {
throw std::runtime_error(
"visit(UserDefinedStringLiteralExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(IdExpressionAST* ast) {
throw std::runtime_error("visit(IdExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(RequiresExpressionAST* ast) {
throw std::runtime_error("visit(RequiresExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(NestedExpressionAST* ast) {
throw std::runtime_error("visit(NestedExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(RightFoldExpressionAST* ast) {
throw std::runtime_error("visit(RightFoldExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(LeftFoldExpressionAST* ast) {
throw std::runtime_error("visit(LeftFoldExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(FoldExpressionAST* ast) {
throw std::runtime_error("visit(FoldExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(LambdaExpressionAST* ast) {
throw std::runtime_error("visit(LambdaExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(SizeofExpressionAST* ast) {
throw std::runtime_error("visit(SizeofExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(SizeofTypeExpressionAST* ast) {
throw std::runtime_error("visit(SizeofTypeExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(SizeofPackExpressionAST* ast) {
throw std::runtime_error("visit(SizeofPackExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(TypeidExpressionAST* ast) {
throw std::runtime_error("visit(TypeidExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(TypeidOfTypeExpressionAST* ast) {
throw std::runtime_error("visit(TypeidOfTypeExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(AlignofExpressionAST* ast) {
throw std::runtime_error("visit(AlignofExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(UnaryExpressionAST* ast) {
throw std::runtime_error("visit(UnaryExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(BinaryExpressionAST* ast) {
throw std::runtime_error("visit(BinaryExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(AssignmentExpressionAST* ast) {
throw std::runtime_error("visit(AssignmentExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(BracedTypeConstructionAST* ast) {
throw std::runtime_error("visit(BracedTypeConstructionAST): not implemented");
}
void DefaultASTVisitor::visit(TypeConstructionAST* ast) {
throw std::runtime_error("visit(TypeConstructionAST): not implemented");
}
void DefaultASTVisitor::visit(CallExpressionAST* ast) {
throw std::runtime_error("visit(CallExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(SubscriptExpressionAST* ast) {
throw std::runtime_error("visit(SubscriptExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(MemberExpressionAST* ast) {
throw std::runtime_error("visit(MemberExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(PostIncrExpressionAST* ast) {
throw std::runtime_error("visit(PostIncrExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(ConditionalExpressionAST* ast) {
throw std::runtime_error("visit(ConditionalExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(ImplicitCastExpressionAST* ast) {
throw std::runtime_error("visit(ImplicitCastExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(CastExpressionAST* ast) {
throw std::runtime_error("visit(CastExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(CppCastExpressionAST* ast) {
throw std::runtime_error("visit(CppCastExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(NewExpressionAST* ast) {
throw std::runtime_error("visit(NewExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(DeleteExpressionAST* ast) {
throw std::runtime_error("visit(DeleteExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(ThrowExpressionAST* ast) {
throw std::runtime_error("visit(ThrowExpressionAST): not implemented");
}
void DefaultASTVisitor::visit(NoexceptExpressionAST* ast) {
throw std::runtime_error("visit(NoexceptExpressionAST): not implemented");
}
// StatementAST
void DefaultASTVisitor::visit(LabeledStatementAST* ast) {
throw std::runtime_error("visit(LabeledStatementAST): not implemented");
}
void DefaultASTVisitor::visit(CaseStatementAST* ast) {
throw std::runtime_error("visit(CaseStatementAST): not implemented");
}
void DefaultASTVisitor::visit(DefaultStatementAST* ast) {
throw std::runtime_error("visit(DefaultStatementAST): not implemented");
}
void DefaultASTVisitor::visit(ExpressionStatementAST* ast) {
throw std::runtime_error("visit(ExpressionStatementAST): not implemented");
}
void DefaultASTVisitor::visit(CompoundStatementAST* ast) {
throw std::runtime_error("visit(CompoundStatementAST): not implemented");
}
void DefaultASTVisitor::visit(IfStatementAST* ast) {
throw std::runtime_error("visit(IfStatementAST): not implemented");
}
void DefaultASTVisitor::visit(SwitchStatementAST* ast) {
throw std::runtime_error("visit(SwitchStatementAST): not implemented");
}
void DefaultASTVisitor::visit(WhileStatementAST* ast) {
throw std::runtime_error("visit(WhileStatementAST): not implemented");
}
void DefaultASTVisitor::visit(DoStatementAST* ast) {
throw std::runtime_error("visit(DoStatementAST): not implemented");
}
void DefaultASTVisitor::visit(ForRangeStatementAST* ast) {
throw std::runtime_error("visit(ForRangeStatementAST): not implemented");
}
void DefaultASTVisitor::visit(ForStatementAST* ast) {
throw std::runtime_error("visit(ForStatementAST): not implemented");
}
void DefaultASTVisitor::visit(BreakStatementAST* ast) {
throw std::runtime_error("visit(BreakStatementAST): not implemented");
}
void DefaultASTVisitor::visit(ContinueStatementAST* ast) {
throw std::runtime_error("visit(ContinueStatementAST): not implemented");
}
void DefaultASTVisitor::visit(ReturnStatementAST* ast) {
throw std::runtime_error("visit(ReturnStatementAST): not implemented");
}
void DefaultASTVisitor::visit(GotoStatementAST* ast) {
throw std::runtime_error("visit(GotoStatementAST): not implemented");
}
void DefaultASTVisitor::visit(CoroutineReturnStatementAST* ast) {
throw std::runtime_error(
"visit(CoroutineReturnStatementAST): not implemented");
}
void DefaultASTVisitor::visit(DeclarationStatementAST* ast) {
throw std::runtime_error("visit(DeclarationStatementAST): not implemented");
}
void DefaultASTVisitor::visit(TryBlockStatementAST* ast) {
throw std::runtime_error("visit(TryBlockStatementAST): not implemented");
}
// DeclarationAST
void DefaultASTVisitor::visit(AccessDeclarationAST* ast) {
throw std::runtime_error("visit(AccessDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(FunctionDefinitionAST* ast) {
throw std::runtime_error("visit(FunctionDefinitionAST): not implemented");
}
void DefaultASTVisitor::visit(ConceptDefinitionAST* ast) {
throw std::runtime_error("visit(ConceptDefinitionAST): not implemented");
}
void DefaultASTVisitor::visit(ForRangeDeclarationAST* ast) {
throw std::runtime_error("visit(ForRangeDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(AliasDeclarationAST* ast) {
throw std::runtime_error("visit(AliasDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(SimpleDeclarationAST* ast) {
throw std::runtime_error("visit(SimpleDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(StaticAssertDeclarationAST* ast) {
throw std::runtime_error(
"visit(StaticAssertDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(EmptyDeclarationAST* ast) {
throw std::runtime_error("visit(EmptyDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(AttributeDeclarationAST* ast) {
throw std::runtime_error("visit(AttributeDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(OpaqueEnumDeclarationAST* ast) {
throw std::runtime_error("visit(OpaqueEnumDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(UsingEnumDeclarationAST* ast) {
throw std::runtime_error("visit(UsingEnumDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(NamespaceDefinitionAST* ast) {
throw std::runtime_error("visit(NamespaceDefinitionAST): not implemented");
}
void DefaultASTVisitor::visit(NamespaceAliasDefinitionAST* ast) {
throw std::runtime_error(
"visit(NamespaceAliasDefinitionAST): not implemented");
}
void DefaultASTVisitor::visit(UsingDirectiveAST* ast) {
throw std::runtime_error("visit(UsingDirectiveAST): not implemented");
}
void DefaultASTVisitor::visit(UsingDeclarationAST* ast) {
throw std::runtime_error("visit(UsingDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(AsmDeclarationAST* ast) {
throw std::runtime_error("visit(AsmDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(ExportDeclarationAST* ast) {
throw std::runtime_error("visit(ExportDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(ModuleImportDeclarationAST* ast) {
throw std::runtime_error(
"visit(ModuleImportDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(TemplateDeclarationAST* ast) {
throw std::runtime_error("visit(TemplateDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(TypenameTypeParameterAST* ast) {
throw std::runtime_error("visit(TypenameTypeParameterAST): not implemented");
}
void DefaultASTVisitor::visit(TypenamePackTypeParameterAST* ast) {
throw std::runtime_error(
"visit(TypenamePackTypeParameterAST): not implemented");
}
void DefaultASTVisitor::visit(TemplateTypeParameterAST* ast) {
throw std::runtime_error("visit(TemplateTypeParameterAST): not implemented");
}
void DefaultASTVisitor::visit(TemplatePackTypeParameterAST* ast) {
throw std::runtime_error(
"visit(TemplatePackTypeParameterAST): not implemented");
}
void DefaultASTVisitor::visit(DeductionGuideAST* ast) {
throw std::runtime_error("visit(DeductionGuideAST): not implemented");
}
void DefaultASTVisitor::visit(ExplicitInstantiationAST* ast) {
throw std::runtime_error("visit(ExplicitInstantiationAST): not implemented");
}
void DefaultASTVisitor::visit(ParameterDeclarationAST* ast) {
throw std::runtime_error("visit(ParameterDeclarationAST): not implemented");
}
void DefaultASTVisitor::visit(LinkageSpecificationAST* ast) {
throw std::runtime_error("visit(LinkageSpecificationAST): not implemented");
}
// NameAST
void DefaultASTVisitor::visit(SimpleNameAST* ast) {
throw std::runtime_error("visit(SimpleNameAST): not implemented");
}
void DefaultASTVisitor::visit(DestructorNameAST* ast) {
throw std::runtime_error("visit(DestructorNameAST): not implemented");
}
void DefaultASTVisitor::visit(DecltypeNameAST* ast) {
throw std::runtime_error("visit(DecltypeNameAST): not implemented");
}
void DefaultASTVisitor::visit(OperatorNameAST* ast) {
throw std::runtime_error("visit(OperatorNameAST): not implemented");
}
void DefaultASTVisitor::visit(ConversionNameAST* ast) {
throw std::runtime_error("visit(ConversionNameAST): not implemented");
}
void DefaultASTVisitor::visit(TemplateNameAST* ast) {
throw std::runtime_error("visit(TemplateNameAST): not implemented");
}
void DefaultASTVisitor::visit(QualifiedNameAST* ast) {
throw std::runtime_error("visit(QualifiedNameAST): not implemented");
}
// SpecifierAST
void DefaultASTVisitor::visit(TypedefSpecifierAST* ast) {
throw std::runtime_error("visit(TypedefSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(FriendSpecifierAST* ast) {
throw std::runtime_error("visit(FriendSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ConstevalSpecifierAST* ast) {
throw std::runtime_error("visit(ConstevalSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ConstinitSpecifierAST* ast) {
throw std::runtime_error("visit(ConstinitSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ConstexprSpecifierAST* ast) {
throw std::runtime_error("visit(ConstexprSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(InlineSpecifierAST* ast) {
throw std::runtime_error("visit(InlineSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(StaticSpecifierAST* ast) {
throw std::runtime_error("visit(StaticSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ExternSpecifierAST* ast) {
throw std::runtime_error("visit(ExternSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ThreadLocalSpecifierAST* ast) {
throw std::runtime_error("visit(ThreadLocalSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ThreadSpecifierAST* ast) {
throw std::runtime_error("visit(ThreadSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(MutableSpecifierAST* ast) {
throw std::runtime_error("visit(MutableSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(VirtualSpecifierAST* ast) {
throw std::runtime_error("visit(VirtualSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ExplicitSpecifierAST* ast) {
throw std::runtime_error("visit(ExplicitSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(AutoTypeSpecifierAST* ast) {
throw std::runtime_error("visit(AutoTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(VoidTypeSpecifierAST* ast) {
throw std::runtime_error("visit(VoidTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(VaListTypeSpecifierAST* ast) {
throw std::runtime_error("visit(VaListTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(IntegralTypeSpecifierAST* ast) {
throw std::runtime_error("visit(IntegralTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(FloatingPointTypeSpecifierAST* ast) {
throw std::runtime_error(
"visit(FloatingPointTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ComplexTypeSpecifierAST* ast) {
throw std::runtime_error("visit(ComplexTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(NamedTypeSpecifierAST* ast) {
throw std::runtime_error("visit(NamedTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(AtomicTypeSpecifierAST* ast) {
throw std::runtime_error("visit(AtomicTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(UnderlyingTypeSpecifierAST* ast) {
throw std::runtime_error(
"visit(UnderlyingTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ElaboratedTypeSpecifierAST* ast) {
throw std::runtime_error(
"visit(ElaboratedTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(DecltypeAutoSpecifierAST* ast) {
throw std::runtime_error("visit(DecltypeAutoSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(DecltypeSpecifierAST* ast) {
throw std::runtime_error("visit(DecltypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(TypeofSpecifierAST* ast) {
throw std::runtime_error("visit(TypeofSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(PlaceholderTypeSpecifierAST* ast) {
throw std::runtime_error(
"visit(PlaceholderTypeSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ConstQualifierAST* ast) {
throw std::runtime_error("visit(ConstQualifierAST): not implemented");
}
void DefaultASTVisitor::visit(VolatileQualifierAST* ast) {
throw std::runtime_error("visit(VolatileQualifierAST): not implemented");
}
void DefaultASTVisitor::visit(RestrictQualifierAST* ast) {
throw std::runtime_error("visit(RestrictQualifierAST): not implemented");
}
void DefaultASTVisitor::visit(EnumSpecifierAST* ast) {
throw std::runtime_error("visit(EnumSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(ClassSpecifierAST* ast) {
throw std::runtime_error("visit(ClassSpecifierAST): not implemented");
}
void DefaultASTVisitor::visit(TypenameSpecifierAST* ast) {
throw std::runtime_error("visit(TypenameSpecifierAST): not implemented");
}
// CoreDeclaratorAST
void DefaultASTVisitor::visit(IdDeclaratorAST* ast) {
throw std::runtime_error("visit(IdDeclaratorAST): not implemented");
}
void DefaultASTVisitor::visit(NestedDeclaratorAST* ast) {
throw std::runtime_error("visit(NestedDeclaratorAST): not implemented");
}
// PtrOperatorAST
void DefaultASTVisitor::visit(PointerOperatorAST* ast) {
throw std::runtime_error("visit(PointerOperatorAST): not implemented");
}
void DefaultASTVisitor::visit(ReferenceOperatorAST* ast) {
throw std::runtime_error("visit(ReferenceOperatorAST): not implemented");
}
void DefaultASTVisitor::visit(PtrToMemberOperatorAST* ast) {
throw std::runtime_error("visit(PtrToMemberOperatorAST): not implemented");
}
// DeclaratorModifierAST
void DefaultASTVisitor::visit(FunctionDeclaratorAST* ast) {
throw std::runtime_error("visit(FunctionDeclaratorAST): not implemented");
}
void DefaultASTVisitor::visit(ArrayDeclaratorAST* ast) {
throw std::runtime_error("visit(ArrayDeclaratorAST): not implemented");
}
} // namespace cxx
| 33.903226
| 80
| 0.785157
|
robertoraggi
|
792cbb7ef29edd92cecb77d6adc5eec00c43f4ef
| 13,490
|
cpp
|
C++
|
src/ProjectForecast/Systems/GMSRoomManagementSystem.cpp
|
yxbh/Project-Forecast
|
8ea2f6249a38c9e7f4d6d7d1e51e11ad0b05c2c4
|
[
"BSD-3-Clause"
] | 4
|
2019-04-09T13:03:11.000Z
|
2021-01-27T04:58:29.000Z
|
src/ProjectForecast/Systems/GMSRoomManagementSystem.cpp
|
yxbh/Project-Forecast
|
8ea2f6249a38c9e7f4d6d7d1e51e11ad0b05c2c4
|
[
"BSD-3-Clause"
] | 2
|
2017-02-06T03:48:45.000Z
|
2020-08-31T01:30:10.000Z
|
src/ProjectForecast/Systems/GMSRoomManagementSystem.cpp
|
yxbh/Project-Forecast
|
8ea2f6249a38c9e7f4d6d7d1e51e11ad0b05c2c4
|
[
"BSD-3-Clause"
] | 4
|
2020-06-28T08:19:53.000Z
|
2020-06-28T16:30:19.000Z
|
#include "GMSRoomManagementSystem.hpp"
#include "../Events/GMSRoomLoadRequestEvent.hpp"
#include "../AssetResources/GMSRoomResource.hpp"
#include "../AssetResources/GMSObjectResource.hpp"
#include "../AssetResources/OtherGMSResources.hpp"
#include "../AssetResources/TextureInfoResource.hpp"
#include <KEngine/Graphics/SceneNodes.hpp>
#include <KEngine/Entity/Components/EntityRenderableComponents.hpp>
#include <KEngine/Events/OtherGraphicsEvents.hpp>
#include <KEngine/App.hpp>
#include <KEngine/Core/EventManager.hpp>
#include <KEngine/Log/Log.hpp>
#include <KEngine/Common/ScopeFunc.hpp>
#include <filesystem>
#include <unordered_set>
namespace
{
static const auto ProjectForecastExecAssetsRoot = "D:/workspace/ProjectForecastExecAssetsRoot";
}
namespace pf
{
static auto logger = ke::Log::createDefaultLogger("pf::GMSRoomManagementSystem");
bool GMSRoomManagementSystem::initialise()
{
ke::EventManager::registerListener<pf::GMSRoomLoadRequestEvent>(this, &GMSRoomManagementSystem::handleGMSRoomLoadRequest);
return true;
}
void GMSRoomManagementSystem::shutdown()
{
this->unloadCurrentEntities();
ke::EventManager::deregisterListener<pf::GMSRoomLoadRequestEvent>(this, &GMSRoomManagementSystem::handleGMSRoomLoadRequest);
}
void GMSRoomManagementSystem::update(ke::Time elapsedTime)
{
KE_UNUSED(elapsedTime);
auto currentHumanView = ke::App::instance()->getLogic()->getCurrentHumanView();
if (currentHumanView)
{
auto currentCameraNode = dynamic_cast<ke::CameraNode*>(currentHumanView->getScene()->getCameraNode());
if (currentCameraNode)
{
if (this->currentLevelName == "Desolate Forest")
{
this->updateRorLevelBg_DesolateForest(currentCameraNode);
}
else if (this->currentLevelName == "Dry Lake")
{
this->updateRorLevelBg_DryLake(currentCameraNode);
}
}
}
}
void GMSRoomManagementSystem::handleGMSRoomLoadRequest(ke::EventSptr event)
{
auto request = std::dynamic_pointer_cast<pf::GMSRoomLoadRequestEvent>(event);
if (nullptr == request)
{
logger->error("GMSRoomManagementSystem received unexpected event: {}", event->getName());
return;
}
if (this->isLoadingRoom)
{
logger->warn("GMSRoomManagementSystem is alreadying loading a room. Ignoring new load request.");
return;
}
this->isLoadingRoom = true;
KE_MAKE_SCOPEFUNC([this]() { isLoadingRoom = false; });
this->unloadCurrentEntities();
if (this->currentRoomResource)
{
logger->info("Unloading GM:S room: {} ...", this->currentRoomResource->getName());
auto entityManager = ke::App::instance()->getLogic()->getEntityManager();
for (auto entity : this->currentRoomEntities)
{
entityManager->removeEntity(entity->getId());
}
this->currentRoomEntities.clear();
this->currentRoomResource = nullptr;
/*for (const auto & bgInfo : this->currentRoomResource->getBackgroundInfos())
{
ke::EventManager::enqueue(ke::makeEvent<ke::TextureUnloadRequestEvent>(bgInfo.bg, bgInfo.bg_hash));
}*/
}
if (request->getRoomName().empty())
{
// We interpret an empty room name as a room unload only request.
return;
}
auto resourceManager = ke::App::instance()->getResourceManager();
this->currentRoomResource = std::dynamic_pointer_cast<GMSRoomResource>(resourceManager->getResource(request->getRoomName()));
if (this->currentRoomResource != nullptr)
{
logger->info("Loading GM:S room: {} ...", request->getRoomName());
auto textureLoadRequestEvent = ke::makeEvent<ke::TexturesBulkLoadViaFilesRequestEvent>();
const auto texpagesResource = std::dynamic_pointer_cast<pf::TexpageMapResource>(resourceManager->getResource("texpages"));
assert(texpagesResource);
for (const auto & bgInfo : this->currentRoomResource->getBackgroundInfos())
{
if (bgInfo.bg.length() != 0)
{
auto textureInfo = std::dynamic_pointer_cast<TextureInfoResource>(resourceManager->getResource(bgInfo.bg));
if (textureInfo)
{
textureLoadRequestEvent->addTextureInfo(textureInfo->getName(), textureInfo->getTextureId(), textureInfo->getSourcePath());
}
}
}
ke::EventManager::enqueue(ke::makeEvent<ke::SetClearColourRequestEvent>(this->currentRoomResource->getColour()));
// Instantiate tile entities.
std::unordered_set<unsigned> sheetIds;
auto entityManager = ke::App::instance()->getLogic()->getEntityManager();
for (const auto & tile : this->currentRoomResource->getTiles())
{
auto bgResource = std::dynamic_pointer_cast<pf::GMSBgResource>(resourceManager->getResource(tile.bg));
if (bgResource)
{
const auto texpageResource = texpagesResource->texpages[bgResource->texture].get();
const auto textureId = texpageResource->sheetid;
sheetIds.insert(textureId);
ke::Transform2D transform;
transform.x = static_cast<ke::Transform2D::PointType>(tile.pos.x);
transform.y = static_cast<ke::Transform2D::PointType>(tile.pos.y);
transform.scaleX = tile.scale.x;
transform.scaleY = tile.scale.y;
ke::Rect2DInt32 textureRect;
textureRect.top = tile.sourcepos.y;
textureRect.left = tile.sourcepos.x;
textureRect.width = tile.size.width;
textureRect.height = tile.size.height;
const ke::Point2DInt32 origin{ 0,0 };
auto tileEntity = entityManager->newEntity(tile.instanceid).lock();
tileEntity->setName(tile.bg);
tileEntity->addComponent(ke::makeEntityComponent<ke::SpriteDrawableComponent>(
tileEntity, transform, origin, tile.tiledepth, textureId, textureRect, tile.colour));
this->currentRoomEntities.push_back(tileEntity.get());
}
}
// Instantiate background entities.
std::unordered_set<std::shared_ptr<TextureInfoResource>> backgroundTextureInfos;
ke::graphics::DepthType depth = std::numeric_limits<ke::graphics::DepthType>::min();
for (const auto & bgInfo : this->currentRoomResource->getBackgroundInfos())
{
if (!bgInfo.enabled) continue;
auto bgResource = std::dynamic_pointer_cast<pf::GMSBgResource>(resourceManager->getResource(bgInfo.bg));
if (bgResource)
{
const auto texpageResource = texpagesResource->texpages[bgResource->texture].get();
const auto textureId = texpageResource->sheetid;
ke::Transform2D transform;
transform.x = static_cast<ke::Transform2D::PointType>(bgInfo.pos.x);
transform.y = static_cast<ke::Transform2D::PointType>(bgInfo.pos.y);
transform.scaleX = 1.0f;
transform.scaleY = 1.0f;
ke::Rect2DInt32 textureRect;
textureRect.top = bgInfo.sourcepos.y;
textureRect.left = bgInfo.sourcepos.x;
textureRect.width = bgInfo.size.width;
textureRect.height = bgInfo.size.height;
++depth;
const ke::Point2DInt32 origin{ 0,0 };
auto bgEntity = entityManager->newEntity().lock();
bgEntity->setName(bgInfo.bg);
auto drawableComponent = ke::makeEntityComponent<ke::TiledSpriteDrawablwComponent>(
bgEntity, transform, origin, depth, textureId, textureRect, ke::Color::WHITE, bgInfo.tilex, bgInfo.tiley);
bgEntity->addComponent(drawableComponent);
this->currentRoomEntities.push_back(bgEntity.get());
this->currentRoomBgEntities.push_back(bgEntity.get());
}
}
// Instantiate room objects.
auto entityFactory = ke::App::instance()->getLogic()->getEntityFactory();
for (const auto & objInfo : this->currentRoomResource->getObjects())
{
auto e = entityFactory->createNew(objInfo.obj, objInfo);
if (e)
{
this->currentRoomEntities.push_back(e);
// Compute texture to load.
const auto objectResource = std::static_pointer_cast<GMSObjectResource>(resourceManager->getResource(objInfo.obj));
const auto spriteResource = objectResource->spriteResource;
for (const auto texpageResource : spriteResource->texpageResources)
{
sheetIds.insert(texpageResource->sheetid);
}
}
else
{
logger->error("Failed to create instance of: {}", objInfo.obj);
}
}
// Load textures.
for (const auto sheetId : sheetIds)
{
const auto textureInfo = std::dynamic_pointer_cast<pf::TextureInfoResource>(resourceManager->getResource("texture_" + std::to_string(sheetId)));
assert(textureInfo);
textureLoadRequestEvent->addTextureInfo(textureInfo->getName(), textureInfo->getTextureId(), textureInfo->getSourcePath());
}
ke::EventManager::enqueue(textureLoadRequestEvent);
logger->info("Loading GM:S room: {} ... DONE", request->getRoomName());
}
else
{
logger->error("Cannot load GM:S room: {}. Room resource is missing.", request->getRoomName());
}
}
void GMSRoomManagementSystem::unloadCurrentEntities()
{
auto entityManager = ke::App::instance()->getLogic()->getEntityManager();
for (auto entity : this->currentRoomEntities) entityManager->removeEntity(entity->getId());
this->currentRoomEntities.clear();
this->currentRoomBgEntities.clear();
}
void GMSRoomManagementSystem::updateRorLevelBg_DesolateForest(ke::CameraNode * p_cameraNode)
{
const auto cameraViewDimension = p_cameraNode->getViewDimension();
const auto cameraViewTransform = p_cameraNode->getGlobalTransform();
ke::Point2DDouble cameraTopLeftPos;
cameraTopLeftPos.x = cameraViewTransform.x - cameraViewDimension.width / 2;
cameraTopLeftPos.y = cameraViewTransform.y + cameraViewDimension.height / 2;
for (int i = 0; i < this->currentRoomBgEntities.size(); ++i)
{
auto entity = this->currentRoomBgEntities[i];
auto bgComponent = entity->getComponent<ke::TiledSpriteDrawablwComponent>(ke::TiledSpriteDrawablwComponent::TYPE).lock();
auto node = bgComponent->getSceneNode();
switch (i)
{
case 0: // bStars
{
node->setLocalTransform(cameraViewTransform);
break;
}
case 1: // bPlanets
{
ke::Transform2D newTransform;
newTransform.x = cameraTopLeftPos.x + cameraViewDimension.width * 0.666666666666667;
newTransform.y = cameraTopLeftPos.y - cameraViewDimension.height * 0.142857142857143;
node->setLocalTransform(newTransform);
break;
}
case 2: // bClouds1
{
ke::Transform2D newTransform;
newTransform.x = cameraTopLeftPos.x / 1.1 + 140;
newTransform.y = cameraTopLeftPos.y / 1.07 - 60;
node->setLocalTransform(newTransform);
break;
}
case 3: // bClouds2
{
ke::Transform2D newTransform;
newTransform.x = cameraTopLeftPos.x / 1.2;
newTransform.y = cameraTopLeftPos.y / 1.1 - 106;
node->setLocalTransform(newTransform);
break;
}
case 4: // bMountains
{
ke::Transform2D newTransform;
newTransform.x = cameraTopLeftPos.x;
newTransform.y = cameraTopLeftPos.y - cameraViewDimension.height + 153;
node->setLocalTransform(newTransform);
break;
}
}
}
}
void GMSRoomManagementSystem::updateRorLevelBg_DryLake(ke::CameraNode * p_cameraNode)
{
return this->updateRorLevelBg_DesolateForest(p_cameraNode);
}
}
| 44.229508
| 160
| 0.58169
|
yxbh
|
792cfe158360577bc0a80ff036dba3e4304b7250
| 512
|
hpp
|
C++
|
EiRas/Framework/Component/LogSys/LogManager.hpp
|
MonsterENT/EiRas
|
b29592da60b1a9085f5a2d8fa4ed01b43660f712
|
[
"MIT"
] | 1
|
2019-12-24T10:12:16.000Z
|
2019-12-24T10:12:16.000Z
|
EiRas/Framework/Component/LogSys/LogManager.hpp
|
MonsterENT/EiRas
|
b29592da60b1a9085f5a2d8fa4ed01b43660f712
|
[
"MIT"
] | null | null | null |
EiRas/Framework/Component/LogSys/LogManager.hpp
|
MonsterENT/EiRas
|
b29592da60b1a9085f5a2d8fa4ed01b43660f712
|
[
"MIT"
] | null | null | null |
//
// LogManager.hpp
// EiRasMetalBuild
//
// Created by MonsterENT on 1/7/20.
// Copyright © 2020 MonsterENT. All rights reserved.
//
#ifndef LogManager_hpp
#define LogManager_hpp
#include <string>
#include <Global/GlobalDefine.h>
namespace LogSys {
class LogManager
{
public:
static void DebugPrint(std::string str);
static void DebugPrint(int i);
static void DebugPrint(float f);
static void DebugPrint(double d);
static void DebugPrint(_uint ui);
};
}
#endif /* LogManager_hpp */
| 18.285714
| 53
| 0.708984
|
MonsterENT
|
792f856eec0bfa0b84754b95d0ebf9e93ebe8d6d
| 661
|
hpp
|
C++
|
src/core/kext/RemapFunc/ForceNumLockOn.hpp
|
gkb/Karabiner
|
f47307d4fc89a4c421d10157d059293c508f721a
|
[
"Unlicense"
] | null | null | null |
src/core/kext/RemapFunc/ForceNumLockOn.hpp
|
gkb/Karabiner
|
f47307d4fc89a4c421d10157d059293c508f721a
|
[
"Unlicense"
] | null | null | null |
src/core/kext/RemapFunc/ForceNumLockOn.hpp
|
gkb/Karabiner
|
f47307d4fc89a4c421d10157d059293c508f721a
|
[
"Unlicense"
] | null | null | null |
#ifndef FORCENUMLOCKON_HPP
#define FORCENUMLOCKON_HPP
#include "RemapFuncBase.hpp"
namespace org_pqrs_Karabiner {
namespace RemapFunc {
class ForceNumLockOn final : public RemapFuncBase {
public:
ForceNumLockOn(void) : RemapFuncBase(BRIDGE_REMAPTYPE_FORCENUMLOCKON),
index_(0), forceOffMode_(false) {}
bool remapForceNumLockOn(ListHookedKeyboard::Item* item) override;
// ----------------------------------------
// [0] => DeviceVendor
// [1] => DeviceProduct
void add(AddDataType datatype, AddValue newval) override;
private:
size_t index_;
DeviceIdentifier deviceIdentifier_;
bool forceOffMode_;
};
}
}
#endif
| 22.793103
| 72
| 0.69289
|
gkb
|
79321995f0a323a5d0c3fe1abc92af50403e8719
| 1,360
|
cpp
|
C++
|
Day1-1/main.cpp
|
MPC-Game-Programming-Practice/Prantice
|
42097c970aa5cb31fad31841db70f6fcc3536fb5
|
[
"BSD-2-Clause"
] | null | null | null |
Day1-1/main.cpp
|
MPC-Game-Programming-Practice/Prantice
|
42097c970aa5cb31fad31841db70f6fcc3536fb5
|
[
"BSD-2-Clause"
] | null | null | null |
Day1-1/main.cpp
|
MPC-Game-Programming-Practice/Prantice
|
42097c970aa5cb31fad31841db70f6fcc3536fb5
|
[
"BSD-2-Clause"
] | null | null | null |
#include <iostream>
using namespace std;
// 以下に、和とスカラー倍の定義されたベクトルを表す構造体 Vector を定義する
// Vector構造体のメンバ変数を書く
// double x x座標を表す
// double y y座標を表す
// コンストラクタの定義を書く
// 引数:double argX, double argY (それぞれx座標の値、y座標の値を表す)
// コンストラクタの説明:メンバー変数xにargXを代入し、メンバー変数yにargYを代入する。
// メンバ関数 multiply の定義を書く
// 関数名:multiply
// 引数:double a
// 返り値:Vector
// 関数の説明:
// 新たにVector型のオブジェクトを生成して返す。
// ただし、生成するオブジェクトが持つx座標とy座標は以下の通り。
// x座標:元のメンバ変数xと引数で受け取った実数aの積
// y座標:元のメンバ変数yと引数で受け取った実数aの積
// メンバ関数 plus の定義を書く
// 関数名:plus
// 引数:Vector v
// 返り値:Vector
// 関数の説明:
// 新たにVector型のオブジェクトを生成して返す。
// ただし、生成するオブジェクトが持つx座標とy座標は以下の値となるようにする。
// x座標:元のメンバ変数xと引数で受け取ったベクトルvのメンバ変数xの和
// y座標:元のメンバ変数yと引数で受け取ったベクトルvのメンバ変数yの和
//メンバ関数数 print の定義を書く
// 関数名:print
// 引数:なし
// 返り値:なし
// 関数の説明:このオブジェクトが持つメンバ変数xとyを空白区切りで出力し、最後に改行する。
// -------------------
// ここから先は変更しない
// -------------------
int main() {
// 入力を受け取る
double x0, y0, x1, y1, a;
cin >> x0 >> y0 >> x1 >> y1 >> a;
// Vector構造体のオブジェクトを宣言
Vector v0(x0, y0), v1(x1,y1);
// v0、v1を表示
cout << "v0" << endl;
v0.print();
cout << "v1" << endl;
v1.print();
Vector v2=v0.multiply(a);
cout << "v2" << endl;
v2.print();
Vector v3=v0.plus(v1);
cout << "v3" << endl;
v3.print();
}
// 入力例
// 1 2 3 4 5
// 0 0 1 -1 -2
// 1 -1 0 0 3
// -1 2 -2 3 0
// -2 3 -4 5 -3
| 17.894737
| 53
| 0.616912
|
MPC-Game-Programming-Practice
|
a6b2ea36193d62125126242ca030b0f227f431ec
| 699
|
cpp
|
C++
|
engine samples/01_HelloWord/source/HelloWordGame.cpp
|
drr00t/quanticvortex
|
b780b0f547cf19bd48198dc43329588d023a9ad9
|
[
"MIT"
] | null | null | null |
engine samples/01_HelloWord/source/HelloWordGame.cpp
|
drr00t/quanticvortex
|
b780b0f547cf19bd48198dc43329588d023a9ad9
|
[
"MIT"
] | null | null | null |
engine samples/01_HelloWord/source/HelloWordGame.cpp
|
drr00t/quanticvortex
|
b780b0f547cf19bd48198dc43329588d023a9ad9
|
[
"MIT"
] | null | null | null |
#include "HelloWordGame.h"
// QuanticVortex headers
#include "qvGameViewTypes.h"
namespace samples
{
//------------------------------------------------------------------------------------------------
HelloWordGame::HelloWordGame()
{
//CreateHumanViewCommandArgs( gameViewName);
//ConfigureInputTranslatorCommandArgs( inputTranslatorType, device, inputMap);
//LoadSceneViewCommandArgs( sceneViewFile);
// addGameView("My game Window", qv::views::GVT_GAME_VIEW_HUMAN);
}
//-----------------------------------------------------------------------------
HelloWordGame::~HelloWordGame()
{
}
//-----------------------------------------------------------------------------
}
| 27.96
| 99
| 0.463519
|
drr00t
|
a6b37d0dc5172895077f2121d418007934f14864
| 9,508
|
cc
|
C++
|
display/simgraph0.cc
|
makkrnic/simutrans-extended
|
8afbbce5b88c79bfea1760cf6c7662d020757b6a
|
[
"Artistic-1.0"
] | null | null | null |
display/simgraph0.cc
|
makkrnic/simutrans-extended
|
8afbbce5b88c79bfea1760cf6c7662d020757b6a
|
[
"Artistic-1.0"
] | null | null | null |
display/simgraph0.cc
|
makkrnic/simutrans-extended
|
8afbbce5b88c79bfea1760cf6c7662d020757b6a
|
[
"Artistic-1.0"
] | null | null | null |
/*
* This file is part of the Simutrans-Extended project under the Artistic License.
* (see LICENSE.txt)
*/
#include "../simconst.h"
#include "../sys/simsys.h"
#include "../descriptor/image.h"
#include "simgraph.h"
int large_font_height = 10;
int large_font_total_height = 11;
int large_font_ascent = 9;
KOORD_VAL tile_raster_width = 16; // zoomed
KOORD_VAL base_tile_raster_width = 16; // original
/*
* Hajo: mapping table for special-colors (AI player colors)
* to actual output format - all day mode
* 16 sets of 16 colors
*/
PIXVAL specialcolormap_all_day[256];
KOORD_VAL display_set_base_raster_width(KOORD_VAL)
{
return 0;
}
void set_zoom_factor(int)
{
}
int get_zoom_factor()
{
return 1;
}
int zoom_factor_up()
{
return false;
}
int zoom_factor_down()
{
return false;
}
void mark_rect_dirty_wc(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL)
{
}
void mark_rect_dirty_clip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL CLIP_NUM_DEF_NOUSE)
{
}
void mark_screen_dirty()
{
}
void display_mark_img_dirty(image_id, KOORD_VAL, KOORD_VAL)
{
}
uint16 display_load_font(const char*)
{
return 1;
}
sint16 display_get_width()
{
return 0;
}
sint16 display_get_height()
{
return 0;
}
void display_set_height(KOORD_VAL)
{
}
void display_set_actual_width(KOORD_VAL)
{
}
int display_get_light()
{
return 0;
}
void display_set_light(int)
{
}
void display_day_night_shift(int)
{
}
void display_set_player_color_scheme(const int, const COLOR_VAL, const COLOR_VAL)
{
}
COLOR_VAL display_get_index_from_rgb(uint8, uint8, uint8)
{
return 0;
}
void register_image(class image_t* image)
{
image->imageid = 1;
}
void display_snapshot(int, int, int, int)
{
}
void display_get_image_offset(image_id image, KOORD_VAL *xoff, KOORD_VAL *yoff, KOORD_VAL *xw, KOORD_VAL *yw)
{
if (image < 2) {
// initialize offsets with dummy values
*xoff = 0;
*yoff = 0;
*xw = 0;
*yw = 0;
}
}
void display_get_base_image_offset(image_id image, scr_coord_val& xoff, scr_coord_val& yoff, scr_coord_val& xw, scr_coord_val& yw)
{
if (image < 2) {
// initialize offsets with dummy values
xoff = 0;
yoff = 0;
xw = 0;
yw = 0;
}
}
/*
void display_set_base_image_offset(unsigned, KOORD_VAL, KOORD_VAL)
{
}
*/
clip_dimension display_get_clip_wh(CLIP_NUM_DEF_NOUSE0)
{
clip_dimension clip_rect;
clip_rect.x = 0;
clip_rect.xx = 0;
clip_rect.w = 0;
clip_rect.y = 0;
clip_rect.yy = 0;
clip_rect.h = 0;
return clip_rect;
}
void display_set_clip_wh(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL CLIP_NUM_DEF_NOUSE)
{
}
void display_push_clip_wh(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL CLIP_NUM_DEF_NOUSE)
{
}
void display_swap_clip_wh(CLIP_NUM_DEF_NOUSE0)
{
}
void display_pop_clip_wh(CLIP_NUM_DEF_NOUSE0)
{
}
void display_scroll_band(const KOORD_VAL, const KOORD_VAL, const KOORD_VAL)
{
}
void display_img_aux(const image_id, KOORD_VAL, KOORD_VAL, const signed char, const int, const int CLIP_NUM_DEF_NOUSE)
{
}
void display_color_img(const image_id, KOORD_VAL, KOORD_VAL, const signed char, const int, const int CLIP_NUM_DEF_NOUSE)
{
}
void display_base_img(const image_id, KOORD_VAL, KOORD_VAL, const signed char, const int, const int CLIP_NUM_DEF_NOUSE)
{
}
void display_fit_img_to_width(const image_id, sint16)
{
}
void display_img_stretch(const stretch_map_t &, scr_rect)
{
}
void display_img_stretch_blend(const stretch_map_t &, scr_rect, PLAYER_COLOR_VAL)
{
}
void display_rezoomed_img_blend(const image_id, KOORD_VAL, KOORD_VAL, const signed char, const PLAYER_COLOR_VAL, const int, const int CLIP_NUM_DEF_NOUSE)
{
}
void display_rezoomed_img_alpha(const image_id, const image_id, const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const PLAYER_COLOR_VAL, const int, const int CLIP_NUM_DEF_NOUSE)
{
}
void display_base_img_blend(const image_id, KOORD_VAL, KOORD_VAL, const signed char, const PLAYER_COLOR_VAL, const int, const int CLIP_NUM_DEF_NOUSE)
{
}
void display_base_img_alpha(const image_id, const image_id, const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const PLAYER_COLOR_VAL, const int, int CLIP_NUM_DEF_NOUSE)
{
}
// Knightly : variables for storing currently used image procedure set and tile raster width
display_image_proc display_normal = display_base_img;
display_image_proc display_color = display_base_img;
display_blend_proc display_blend = display_base_img_blend;
display_alpha_proc display_alpha = display_base_img_alpha;
signed short current_tile_raster_width = 0;
void display_blend_wh_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PIXVAL, int)
{
}
void display_vlinear_gradient_wh_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PIXVAL, int, int)
{
}
void display_color_img_with_tooltip(const image_id, KOORD_VAL, KOORD_VAL, sint8, const int, const int, const char* CLIP_NUM_DEF_NOUSE)
{
}
void display_fillbox_wh_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, bool)
{
}
void display_fillbox_wh_clip_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, bool CLIP_NUM_DEF_NOUSE)
{
}
void display_cylinderbar_wh_clip_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PIXVAL, bool CLIP_NUM_DEF_NOUSE)
{
}
void display_colorbox_with_tooltip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PIXVAL, bool, const char*)
{
}
void display_veh_form_wh_clip_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, PIXVAL, bool, uint8, uint8, bool CLIP_NUM_DEF_NOUSE)
{
}
void display_vline_wh_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, bool)
{
}
void display_vline_wh_clip_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, bool CLIP_NUM_DEF_NOUSE)
{
}
void display_array_wh(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, const COLOR_VAL *)
{
}
void display_filled_roundbox_clip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PIXVAL, bool)
{
}
size_t get_next_char(const char*, size_t pos)
{
return pos + 1;
}
sint32 get_prev_char(const char*, sint32 pos)
{
if (pos <= 0) {
return 0;
}
return pos - 1;
}
KOORD_VAL display_get_char_width(utf16)
{
return 0;
}
KOORD_VAL display_get_char_max_width(const char*, size_t)
{
return 0;
}
unsigned short get_next_char_with_metrics(const char* &, unsigned char &, unsigned char &)
{
return 0;
}
unsigned short get_prev_char_with_metrics(const char* &, const char *const, unsigned char &, unsigned char &)
{
return 0;
}
bool has_character(utf16)
{
return false;
}
size_t display_fit_proportional(const char *, scr_coord_val, scr_coord_val)
{
return 0;
}
int display_calc_proportional_string_len_width(const char*, size_t)
{
return 0;
}
int display_text_proportional_len_clip_rgb(KOORD_VAL, KOORD_VAL, const char*, control_alignment_t, const PIXVAL, bool, sint32 CLIP_NUM_DEF_NOUSE)
{
return 0;
}
void display_outline_proportional_rgb(KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, const char *, int)
{
}
void display_shadow_proportional_rgb(KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, const char *, int)
{
}
void display_ddd_box_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, bool)
{
}
void display_ddd_box_clip_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL)
{
}
void display_ddd_proportional(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, const char *, int)
{
}
void display_ddd_proportional_clip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, const char *, int CLIP_NUM_DEF_NOUSE)
{
}
int display_multiline_text_rgb(KOORD_VAL, KOORD_VAL, const char *, PLAYER_COLOR_VAL)
{
return 0;
}
void display_flush_buffer()
{
}
void display_show_pointer(int)
{
}
void display_set_pointer(int)
{
}
void display_show_load_pointer(int)
{
}
void simgraph_init(KOORD_VAL, KOORD_VAL, int)
{
}
int is_display_init()
{
return false;
}
void display_free_all_images_above(image_id)
{
}
void simgraph_exit()
{
dr_os_close();
}
void simgraph_resize(KOORD_VAL, KOORD_VAL)
{
}
void reset_textur(void *)
{
}
void display_snapshot()
{
}
void display_direct_line_rgb(const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const PLAYER_COLOR_VAL)
{
}
void display_direct_line_rgb(const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const PLAYER_COLOR_VAL)
{
}
void display_direct_line_dotted_rgb(const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const PLAYER_COLOR_VAL)
{
}
void display_circle_rgb(KOORD_VAL, KOORD_VAL, int, const PLAYER_COLOR_VAL)
{
}
void display_filled_circle_rgb(KOORD_VAL, KOORD_VAL, int, const PLAYER_COLOR_VAL)
{
}
int display_fluctuation_triangle_rgb(KOORD_VAL, KOORD_VAL, uint8, const bool, sint64)
{
return 0;
}
void draw_bezier_rgb(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, const PLAYER_COLOR_VAL, KOORD_VAL, KOORD_VAL)
{
}
void display_set_progress_text(const char *)
{
}
void display_progress(int, int)
{
}
void display_img_aligned(const image_id, scr_rect, int, int)
{
}
KOORD_VAL display_proportional_ellipse_rgb(scr_rect, const char *, int, PIXVAL, bool)
{
return 0;
}
image_id get_image_count()
{
return 0;
}
#ifdef MULTI_THREAD
void add_poly_clip(int, int, int, int, int CLIP_NUM_DEF_NOUSE)
{
}
void clear_all_poly_clip(const sint8)
{
}
void activate_ribi_clip(int CLIP_NUM_DEF_NOUSE)
{
}
#else
void add_poly_clip(int, int, int, int, int)
{
}
void clear_all_poly_clip()
{
}
void activate_ribi_clip(int)
{
}
#endif
| 19.644628
| 186
| 0.77398
|
makkrnic
|
a6b6a050adf667fba6d81d8838ae25b018f6311f
| 4,695
|
cpp
|
C++
|
src/profiling/PeriodicCounterSelectionCommandHandler.cpp
|
vivint-smarthome/armnn
|
6b1bf1a40bebf4cc108d39f8b8e0c29bdfc51ce1
|
[
"MIT"
] | null | null | null |
src/profiling/PeriodicCounterSelectionCommandHandler.cpp
|
vivint-smarthome/armnn
|
6b1bf1a40bebf4cc108d39f8b8e0c29bdfc51ce1
|
[
"MIT"
] | null | null | null |
src/profiling/PeriodicCounterSelectionCommandHandler.cpp
|
vivint-smarthome/armnn
|
6b1bf1a40bebf4cc108d39f8b8e0c29bdfc51ce1
|
[
"MIT"
] | null | null | null |
//
// Copyright © 2019 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "PeriodicCounterSelectionCommandHandler.hpp"
#include "ProfilingUtils.hpp"
#include <armnn/Types.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/format.hpp>
#include <vector>
namespace armnn
{
namespace profiling
{
void PeriodicCounterSelectionCommandHandler::ParseData(const Packet& packet, CaptureData& captureData)
{
std::vector<uint16_t> counterIds;
uint32_t sizeOfUint32 = boost::numeric_cast<uint32_t>(sizeof(uint32_t));
uint32_t sizeOfUint16 = boost::numeric_cast<uint32_t>(sizeof(uint16_t));
uint32_t offset = 0;
if (packet.GetLength() < 4)
{
// Insufficient packet size
return;
}
// Parse the capture period
uint32_t capturePeriod = ReadUint32(packet.GetData(), offset);
// Set the capture period
captureData.SetCapturePeriod(capturePeriod);
// Parse the counter ids
unsigned int counters = (packet.GetLength() - 4) / 2;
if (counters > 0)
{
counterIds.reserve(counters);
offset += sizeOfUint32;
for (unsigned int i = 0; i < counters; ++i)
{
// Parse the counter id
uint16_t counterId = ReadUint16(packet.GetData(), offset);
counterIds.emplace_back(counterId);
offset += sizeOfUint16;
}
}
// Set the counter ids
captureData.SetCounterIds(counterIds);
}
void PeriodicCounterSelectionCommandHandler::operator()(const Packet& packet)
{
ProfilingState currentState = m_StateMachine.GetCurrentState();
switch (currentState)
{
case ProfilingState::Uninitialised:
case ProfilingState::NotConnected:
case ProfilingState::WaitingForAck:
throw RuntimeException(boost::str(boost::format("Periodic Counter Selection Command Handler invoked while in "
"an wrong state: %1%")
% GetProfilingStateName(currentState)));
case ProfilingState::Active:
{
// Process the packet
if (!(packet.GetPacketFamily() == 0u && packet.GetPacketId() == 4u))
{
throw armnn::InvalidArgumentException(boost::str(boost::format("Expected Packet family = 0, id = 4 but "
"received family = %1%, id = %2%")
% packet.GetPacketFamily()
% packet.GetPacketId()));
}
// Parse the packet to get the capture period and counter UIDs
CaptureData captureData;
ParseData(packet, captureData);
// Get the capture data
uint32_t capturePeriod = captureData.GetCapturePeriod();
// Validate that the capture period is within the acceptable range.
if (capturePeriod > 0 && capturePeriod < LOWEST_CAPTURE_PERIOD)
{
capturePeriod = LOWEST_CAPTURE_PERIOD;
}
const std::vector<uint16_t>& counterIds = captureData.GetCounterIds();
// Check whether the selected counter UIDs are valid
std::vector<uint16_t> validCounterIds;
for (uint16_t counterId : counterIds)
{
// Check whether the counter is registered
if (!m_ReadCounterValues.IsCounterRegistered(counterId))
{
// Invalid counter UID, ignore it and continue
continue;
}
// The counter is valid
validCounterIds.push_back(counterId);
}
// Set the capture data with only the valid counter UIDs
m_CaptureDataHolder.SetCaptureData(capturePeriod, validCounterIds);
// Echo back the Periodic Counter Selection packet to the Counter Stream Buffer
m_SendCounterPacket.SendPeriodicCounterSelectionPacket(capturePeriod, validCounterIds);
// Notify the Send Thread that new data is available in the Counter Stream Buffer
m_SendCounterPacket.SetReadyToRead();
if (capturePeriod == 0 || validCounterIds.empty())
{
// No data capture stop the thread
m_PeriodicCounterCapture.Stop();
}
else
{
// Start the Period Counter Capture thread (if not running already)
m_PeriodicCounterCapture.Start();
}
break;
}
default:
throw RuntimeException(boost::str(boost::format("Unknown profiling service state: %1%")
% static_cast<int>(currentState)));
}
}
} // namespace profiling
} // namespace armnn
| 33.535714
| 118
| 0.61065
|
vivint-smarthome
|
a6bc696cea1a4154083afcd130c3edcf2c3084c4
| 1,766
|
hh
|
C++
|
libsrc/pylith/feassemble/feassemblefwd.hh
|
joegeisz/pylith
|
f74060b7b19d7e90abf8597bbe9250c96593c0ad
|
[
"MIT"
] | 1
|
2021-01-20T17:18:28.000Z
|
2021-01-20T17:18:28.000Z
|
libsrc/pylith/feassemble/feassemblefwd.hh
|
joegeisz/pylith
|
f74060b7b19d7e90abf8597bbe9250c96593c0ad
|
[
"MIT"
] | null | null | null |
libsrc/pylith/feassemble/feassemblefwd.hh
|
joegeisz/pylith
|
f74060b7b19d7e90abf8597bbe9250c96593c0ad
|
[
"MIT"
] | null | null | null |
// -*- C++ -*-
//
// ======================================================================
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University of Chicago
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://geodynamics.org).
//
// Copyright (c) 2010-2017 University of California, Davis
//
// See COPYING for license information.
//
// ======================================================================
//
/** @file libsrc/feassemble/feassemblefwd.hh
*
* @brief Forward declarations for PyLith feassemble objects.
*
* Including this header file eliminates the need to use separate
* forward declarations.
*/
#if !defined(pylith_feassemble_feassemblefwd_hh)
#define pylith_feassemble_feassemblefwd_hh
namespace pylith {
namespace feassemble {
class CellGeometry;
class GeometryLine2D;
class GeometryLine3D;
class GeometryTri2D;
class GeometryTri3D;
class GeometryQuad2D;
class GeometryQuad3D;
class GeometryTet3D;
class GeometryHex3D;
class Quadrature;
class QuadratureRefCell;
class QuadratureEngine;
class Quadrature1Din2D;
class Quadrature1Din3D;
class Quadrature2D;
class Quadrature2Din3D;
class Quadrature3D;
class Constraint;
class Integrator;
class IntegratorElasticity;
class ElasticityImplicit;
class ElasticityExplicit;
class ElasticityExplicitTet4;
class ElasticityExplicitTri3;
class IntegratorElasticityLgDeform;
class ElasticityImplicitLgDeform;
class ElasticityExplicitLgDeform;
class ElasticityImplicitCUDA;
} // feassemble
} // pylith
#endif // pylith_feassemble_feassemblefwd_hh
// End of file
| 23.236842
| 73
| 0.674972
|
joegeisz
|
a6d276d4b8a19938119a98e4bc1b7f5a2ba48330
| 4,316
|
cc
|
C++
|
tests/unit_tests/data/blocks/date_time.cc
|
tini2p/tini2p
|
28fb4ddf69b2f191fee91a4ff349135fcff8dfe1
|
[
"BSD-3-Clause"
] | 12
|
2019-01-21T07:04:30.000Z
|
2021-12-06T03:35:07.000Z
|
tests/unit_tests/data/blocks/date_time.cc
|
chisa0a/tini2p
|
a9b6cb48dbbc8d667b081a95c720f0ff2a0f84f5
|
[
"BSD-3-Clause"
] | null | null | null |
tests/unit_tests/data/blocks/date_time.cc
|
chisa0a/tini2p
|
a9b6cb48dbbc8d667b081a95c720f0ff2a0f84f5
|
[
"BSD-3-Clause"
] | 5
|
2019-02-07T23:08:37.000Z
|
2021-12-06T03:35:08.000Z
|
/* Copyright (c) 2019, tini2p
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <catch2/catch.hpp>
#include "src/data/blocks/date_time.h"
namespace meta = tini2p::meta::block;
using tini2p::time::now_s;
using tini2p::data::DateTimeBlock;
struct DateTimeBlockFixture
{
DateTimeBlock block;
};
TEST_CASE_METHOD(
DateTimeBlockFixture,
"DateTimeBlock has a block ID",
"[block]")
{
REQUIRE(block.type() == DateTimeBlock::Type::DateTime);
}
TEST_CASE_METHOD(DateTimeBlockFixture, "DateTimeBlock has a size", "[block]")
{
REQUIRE(block.data_size() == DateTimeBlock::TimestampLen);
REQUIRE(
block.size() == DateTimeBlock::HeaderLen + DateTimeBlock::TimestampLen);
REQUIRE(block.size() == block.buffer().size());
}
TEST_CASE_METHOD(
DateTimeBlockFixture,
"DateTimeBlock has a timestamp",
"[block]")
{
REQUIRE(block.timestamp());
REQUIRE(tini2p::time::check_lag_s(block.timestamp()));
}
TEST_CASE_METHOD(
DateTimeBlockFixture,
"DateTimeBlock serializes and deserializes from the buffer",
"[block]")
{
// set valid DateTime block parameters
const auto tmp_ts = now_s();
// serialize to buffer
REQUIRE_NOTHROW(block.serialize());
// deserialize from buffer
REQUIRE_NOTHROW(block.deserialize());
REQUIRE(block.type() == DateTimeBlock::Type::DateTime);
REQUIRE(block.data_size() == DateTimeBlock::TimestampLen);
REQUIRE(block.timestamp() == tmp_ts);
REQUIRE(
block.size() == DateTimeBlock::HeaderLen + DateTimeBlock::TimestampLen);
REQUIRE(block.buffer().size() == block.size());
}
TEST_CASE_METHOD(
DateTimeBlockFixture,
"DateTimeBlock fails to deserialize invalid ID",
"[block]")
{
// serialize a valid block
REQUIRE_NOTHROW(block.serialize());
// invalidate the block ID
++block.buffer()[DateTimeBlock::TypeOffset];
REQUIRE_THROWS(block.deserialize());
block.buffer()[DateTimeBlock::TypeOffset] -= 2;
REQUIRE_THROWS(block.deserialize());
}
TEST_CASE_METHOD(
DateTimeBlockFixture,
"DateTimeBlock fails to deserialize invalid size",
"[block]")
{
// invalidate the size
++block.buffer()[DateTimeBlock::SizeOffset];
REQUIRE_THROWS(block.deserialize());
block.buffer()[DateTimeBlock::SizeOffset] -= 2;
REQUIRE_THROWS(block.deserialize());
}
TEST_CASE_METHOD(
DateTimeBlockFixture,
"DateTimeBlock fails to deserialize invalid timestamp",
"[block]")
{
using tini2p::meta::time::MaxLagDelta;
// serialize a valid block
REQUIRE_NOTHROW(block.serialize());
// invalidate the timestamp (lowerbound)
block.buffer()[DateTimeBlock::TimestampOffset] -= MaxLagDelta + 1;
REQUIRE_THROWS(block.deserialize());
// invalidate the timestamp (upperbound)
block.buffer()[DateTimeBlock::TimestampOffset] = now_s() + (MaxLagDelta + 1);
REQUIRE_THROWS(block.deserialize());
}
| 31.275362
| 81
| 0.734013
|
tini2p
|
a6d4c69a57df9586374cc5ccea56d4b43a6223ff
| 9,929
|
cpp
|
C++
|
multisense_ros/src/config.cpp
|
davidirobinson/multisense_ros2
|
87aa8dd64d3f380ffbff2483a32d0362c27dff5a
|
[
"MIT"
] | null | null | null |
multisense_ros/src/config.cpp
|
davidirobinson/multisense_ros2
|
87aa8dd64d3f380ffbff2483a32d0362c27dff5a
|
[
"MIT"
] | null | null | null |
multisense_ros/src/config.cpp
|
davidirobinson/multisense_ros2
|
87aa8dd64d3f380ffbff2483a32d0362c27dff5a
|
[
"MIT"
] | 1
|
2021-07-18T23:33:32.000Z
|
2021-07-18T23:33:32.000Z
|
/**
* @file config.cpp
*
* Copyright 2020
* Carnegie Robotics, LLC
* 4501 Hatfield Street, Pittsburgh, PA 15201
* http://www.carnegierobotics.com
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the Carnegie Robotics, LLC nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL CARNEGIE ROBOTICS, LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**/
#include <multisense_ros/config.h>
#include <multisense_ros/parameter_utilities.h>
namespace multisense_ros {
Config::Config(const std::string& node_name, crl::multisense::Channel* driver):
Node(node_name),
driver_(driver)
{
if (const auto status = driver_->getDeviceInfo(device_info_); status != crl::multisense::Status_Ok)
{
RCLCPP_ERROR(get_logger(), "Config: failed to query device info: %s",
crl::multisense::Channel::statusString(status));
return;
}
if (device_info_.lightingType != 0)
{
if (const auto status = driver_->getLightingConfig(lighting_config_); status != crl::multisense::Status_Ok)
{
RCLCPP_ERROR(get_logger(), "Config: failed to query lighting info: %s",
crl::multisense::Channel::statusString(status));
return;
}
}
if (const auto status = driver_->getTransmitDelay(transmit_delay_); status != crl::multisense::Status_Ok)
{
RCLCPP_ERROR(get_logger(), "Config: failed to query transmit delay: %s",
crl::multisense::Channel::statusString(status));
return;
}
paramter_handle_ = add_on_set_parameters_callback(std::bind(&Config::parameterCallback, this, std::placeholders::_1));
//
// Transmit delay
rcl_interfaces::msg::IntegerRange transmit_delay_range;
transmit_delay_range.set__from_value(0)
.set__to_value(500)
.set__step(1);
rcl_interfaces::msg::ParameterDescriptor transmit_delay_desc;
transmit_delay_desc.set__name("desired_transmit_delay")
.set__type(rcl_interfaces::msg::ParameterType::PARAMETER_INTEGER)
.set__description("delay in ms before multisense sends data")
.set__integer_range({transmit_delay_range});
declare_parameter("desired_transmit_delay", 0, transmit_delay_desc);
if (device_info_.hardwareRevision != crl::multisense::system::DeviceInfo::HARDWARE_REV_MULTISENSE_ST21)
{
if (device_info_.lightingType != 0)
{
//
// Lighting
rcl_interfaces::msg::ParameterDescriptor lighting_desc;
lighting_desc.set__name("lighting")
.set__type(rcl_interfaces::msg::ParameterType::PARAMETER_BOOL)
.set__description("enable external lights");
declare_parameter("lighting", false, lighting_desc);
//
// Flash
rcl_interfaces::msg::ParameterDescriptor flash_desc;
flash_desc.set__name("flash")
.set__type(rcl_interfaces::msg::ParameterType::PARAMETER_BOOL)
.set__description("strobe lights with each image exposure");
declare_parameter("flash", false, flash_desc);
//
// LED duty cycle
rcl_interfaces::msg::FloatingPointRange led_duty_cycle_range;
led_duty_cycle_range.set__from_value(0.0)
.set__to_value(1.0)
.set__step(0.01);
rcl_interfaces::msg::ParameterDescriptor led_duty_cycle_desc;
led_duty_cycle_desc.set__name("led_duty_cycle")
.set__type(rcl_interfaces::msg::ParameterType::PARAMETER_DOUBLE)
.set__description("LED duty cycle when lights enabled")
.set__floating_point_range({led_duty_cycle_range});
declare_parameter("led_duty_cycle", 0.0, led_duty_cycle_desc);
}
//
// Network time sync
rcl_interfaces::msg::ParameterDescriptor network_time_sync_desc;
network_time_sync_desc.set__name("network_time_sync")
.set__type(rcl_interfaces::msg::ParameterType::PARAMETER_BOOL)
.set__description("run basic time sync between MultiSense and host");
declare_parameter("network_time_sync", true, network_time_sync_desc);
}
}
Config::~Config()
{
}
rcl_interfaces::msg::SetParametersResult Config::parameterCallback(const std::vector<rclcpp::Parameter>& parameters)
{
rcl_interfaces::msg::SetParametersResult result;
result.set__successful(true);
bool update_lighting = false;
for (const auto ¶meter : parameters)
{
const auto type = parameter.get_type();
if (type == rclcpp::ParameterType::PARAMETER_NOT_SET)
{
continue;
}
const auto name = parameter.get_name();
if (name == "desired_transmit_delay")
{
if (type != rclcpp::ParameterType::PARAMETER_DOUBLE && type != rclcpp::ParameterType::PARAMETER_INTEGER)
{
return result.set__successful(false).set__reason("invalid transmission delay type");
}
const auto value = get_as_number<int>(parameter);
if (transmit_delay_.delay != value)
{
auto delay = transmit_delay_;
delay.delay = value;
if (const auto status = driver_->setTransmitDelay(delay); status != crl::multisense::Status_Ok)
{
return result.set__successful(false).set__reason(crl::multisense::Channel::statusString(status));
}
transmit_delay_ = std::move(delay);
}
}
else if (name == "lighting")
{
if (type != rclcpp::ParameterType::PARAMETER_BOOL)
{
return result.set__successful(false).set__reason("invalid lighting type");
}
const auto value = parameter.as_bool();
if (lighting_enabled_ != value)
{
lighting_enabled_ = value;
update_lighting = true;
}
}
else if(name == "flash")
{
if (type != rclcpp::ParameterType::PARAMETER_BOOL)
{
return result.set__successful(false).set__reason("invalid flash type");
}
const auto value = parameter.as_bool();
if (lighting_config_.getFlash() != value)
{
lighting_config_.setFlash(value);
update_lighting = true;
}
}
else if(name == "led_duty_cycle")
{
if (type != rclcpp::ParameterType::PARAMETER_DOUBLE && type != rclcpp::ParameterType::PARAMETER_INTEGER)
{
return result.set__successful(false).set__reason("invalid led duty cycle type");
}
const auto value = get_as_number<double>(parameter);
if (lighting_config_.getDutyCycle(0) != value)
{
lighting_config_.setDutyCycle(value);
update_lighting = true;
}
}
else if(name == "network_time_sync")
{
if (type != rclcpp::ParameterType::PARAMETER_BOOL)
{
return result.set__successful(false).set__reason("invalid network time sync type");
}
if (const auto status = driver_->networkTimeSynchronization(parameter.as_bool());
status != crl::multisense::Status_Ok)
{
return result.set__successful(false).set__reason(crl::multisense::Channel::statusString(status));
}
}
}
if (update_lighting)
{
auto config = lighting_config_;
config.setFlash(lighting_enabled_ ? config.getFlash() : false);
config.setDutyCycle(lighting_enabled_ ? config.getDutyCycle(0) : 0.0);
if (const auto status = driver_->setLightingConfig(config); status != crl::multisense::Status_Ok)
{
if (status == crl::multisense::Status_Unsupported)
{
return result.set__successful(false).set__reason("lighting not supported");
}
else
{
return result.set__successful(false).set__reason(crl::multisense::Channel::statusString(status));
}
}
}
return result;
}
}
| 38.785156
| 122
| 0.613758
|
davidirobinson
|
a6d4ec99bda3d0d817acb8e21c50ee77d13f547c
| 5,175
|
cpp
|
C++
|
src/DS3231/DS3231.cpp
|
MarkMan0/STM32-Serial-Parser
|
3ed62f3876d0859cbb4382af51b766815a9d994a
|
[
"BSD-3-Clause"
] | null | null | null |
src/DS3231/DS3231.cpp
|
MarkMan0/STM32-Serial-Parser
|
3ed62f3876d0859cbb4382af51b766815a9d994a
|
[
"BSD-3-Clause"
] | null | null | null |
src/DS3231/DS3231.cpp
|
MarkMan0/STM32-Serial-Parser
|
3ed62f3876d0859cbb4382af51b766815a9d994a
|
[
"BSD-3-Clause"
] | null | null | null |
#include "DS3231/DS3231.h"
#include "main.h"
#include "i2c.h"
#include "utils.h"
#include "stdio.h"
#include "uart.h"
#include "cmsis_os.h"
/**
* @brief DS3231 Hardware description
*
*/
namespace DS3231Reg {
/**
* @brief DS3231 register addresses
*
*/
enum reg {
SECONDS,
MINUTES,
HOURS,
DAY,
DATE,
MONTH,
YEAR,
ALARM_1_SECONDS,
ALARM_1_MINUTES,
ALARM_1_HOURS,
ALARM_1_DAY_DATE,
ALARM_2_MINUTES,
ALARM_2_HOURS,
ALARM_2_DAY_DATE,
CONTROL,
CONTROL_STATUS,
AGING_OFFSET,
TEMP_MSB,
TEMP_LSB,
REGISTER_END,
};
/**
* @brief Masks to hel manipulate registers
*
*/
enum mask {
MASK_SECONDS = 0b1111,
MASK_10_SECONDS = 0b1110000,
MASK_MINUTES = 0b1111,
MASK_10_MINUTES = 0b1110000,
MASK_HOURS = 0b1111,
MASK_10_HOUR = 0b10000,
MASK_AM_PM_20_HOUR = 0b100000,
MASK_12_24 = 0b1000000,
MASK_DAY = 0b111,
MASK_DATE = 0b1111,
MASK_10_DATE = 0b110000,
MASK_MONTH = 0b1111,
MASK_10_MONTH = 0b10000,
MASK_CENTURY = 0b10000000,
MASK_YEAR = 0b1111,
MASK_10_YEAR = 0b11110000,
MASK_N_EOSC = 1 << 7,
MASK_BBSQW = 1 << 6,
MASK_CONV = 1 << 5,
MASK_RS2 = 1 << 4,
MASK_RS1 = 1 << 3,
MASK_INTCN = 1 << 2,
MASK_A2IE = 1 << 1,
MASK_A1IE = 1 << 0,
MASK_OSF = 1 << 7,
MASK_EN32KHZ = 1 << 3,
MASK_BSY = 1 << 2,
MASK_A2F = 1 << 1,
MASK_A1F = 1 << 0,
};
} // namespace DS3231Reg
using namespace DS3231Reg;
constexpr uint8_t DS3231::dev_address_;
/**
* @brief Used as default value
*
*/
static constexpr DS3231::time valid_time{ .seconds = 0,
.minutes = 0,
.hours = 0,
.day = 1,
.date = 1,
.month = 1,
.am_pm = DS3231::AM_PM_UNUSED,
.year = 2000 };
void DS3231::report_all_registers() {
uint8_t buff[REGISTER_END];
{
auto lck = i2c.get_lock();
if (!lck.lock()) {
return;
}
if (!i2c.read_register(dev_address_, SECONDS, buff, REGISTER_END)) {
return;
}
}
for (uint8_t i = 0; i < REGISTER_END; ++i) {
uart2.printf("buff %d, val: %d", i, buff[i]);
}
}
bool DS3231::get_time(time& t) {
uint8_t buff[7];
buff[0] = SECONDS;
{
auto lck = i2c.get_lock();
if (!lck.lock()) {
return false;
}
if (!i2c.read_register(dev_address_, SECONDS, buff, 7)) {
return false;
}
}
t = valid_time;
t.seconds = (buff[0] & MASK_SECONDS) + 10 * ((buff[0] & MASK_10_SECONDS) >> 4);
t.minutes = (buff[1] & MASK_MINUTES) + 10 * ((buff[1] & MASK_10_MINUTES) >> 4);
if (buff[2] & MASK_12_24) {
t.am_pm = (buff[2] & MASK_AM_PM_20_HOUR) ? AM_PM::PM : AM_PM::AM;
} else {
t.am_pm = AM_PM::AM_PM_UNUSED;
}
t.hours = (buff[2] & MASK_HOURS) + 10 * (!!(buff[2] & MASK_10_HOUR));
if (t.am_pm == AM_PM::AM_PM_UNUSED) {
t.hours += 20 * (!!(buff[2] & MASK_AM_PM_20_HOUR));
}
t.day = buff[3] & MASK_DAY;
t.date = (buff[4] & MASK_DATE) + 10 * ((buff[4] & MASK_10_DATE) >> 4);
t.month = (buff[5] & MASK_MONTH) + 10 * (!!(buff[5] & MASK_10_MONTH));
t.year = 2000 + (buff[6] & MASK_YEAR) + 10 * ((buff[6] & MASK_10_YEAR) >> 4);
return true;
}
bool DS3231::set_time(time& t) {
uint8_t buff[7];
using utils::is_within;
if (!is_within(t.seconds, 0, 59)) return false;
if (!is_within(t.minutes, 0, 59)) return false;
if (!is_within(t.hours, 0, 23)) return false;
if (!is_within(t.day, 1, 7)) return false;
if (!is_within(t.date, 1, 31)) return false;
if (!is_within(t.month, 1, 12)) return false;
if (!is_within(t.am_pm, AM_PM_UNUSED, AM_PM::PM)) return false;
if (!is_within(t.year, 2000, 2099)) return false;
buff[0] = ((t.seconds / 10) << 4) | ((t.seconds % 10) & MASK_SECONDS);
buff[1] = ((t.minutes / 10) << 4) | ((t.minutes % 10) & MASK_MINUTES);
buff[2] = 0;
if (t.am_pm == AM_PM::AM_PM_UNUSED) {
if (t.hours >= 20) {
buff[2] |= MASK_AM_PM_20_HOUR;
}
} else {
buff[2] |= MASK_12_24;
if (t.am_pm == AM_PM::PM) {
buff[2] |= MASK_AM_PM_20_HOUR;
}
}
if (t.hours >= 10 && t.hours < 20) {
buff[2] |= MASK_10_HOUR;
}
buff[2] |= (t.hours % 10) & MASK_HOURS;
buff[3] = t.day & MASK_DAY;
buff[4] = ((t.date / 10) << 4) | ((t.date % 10) & MASK_DATE);
buff[5] = (t.month % 10) & MASK_MONTH;
if (t.month >= 10) {
buff[5] |= MASK_10_MONTH;
}
buff[6] = ((t.year - 2000) / 10) << 4;
buff[6] |= (t.year % 10) & MASK_YEAR;
return i2c.get_lock().lock() && i2c.write_register(dev_address_, SECONDS, buff, 7);
}
void DS3231::report_time(const time& t) {
uart2.printf("%2d.%2d.%4d %2d:%2d:%2d", t.date, t.month, t.year, t.hours, t.minutes, t.seconds);
static constexpr const char* strs[] = {
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
};
if (!utils::is_within(t.day, 1, 7)) {
return;
}
uart2.printf("DOW: %s", strs[t.day - 1]);
}
DS3231 rtc;
| 23.847926
| 98
| 0.551304
|
MarkMan0
|
a6d8cddca771e3fa045fed5f69dda19f1393dd3a
| 2,931
|
cpp
|
C++
|
src/Game.cpp
|
RHUL-CS-Projects/towersAndMuskets
|
6679857813e6bcd55e3bfc4f587e23e76da6e603
|
[
"MIT"
] | 8
|
2017-04-01T13:27:27.000Z
|
2019-03-23T14:44:15.000Z
|
src/Game.cpp
|
RHUL-CS-Projects/towersAndMuskets
|
6679857813e6bcd55e3bfc4f587e23e76da6e603
|
[
"MIT"
] | null | null | null |
src/Game.cpp
|
RHUL-CS-Projects/towersAndMuskets
|
6679857813e6bcd55e3bfc4f587e23e76da6e603
|
[
"MIT"
] | null | null | null |
#include <Game.h>
#include <irrlicht/irrlicht.h>
#include <EventReceiver.h>
#include <chrono>
#include <sfml/SFML/Window.hpp>
#include <StateMainMenu.h>
#include <DebugValues.h>
using namespace std;
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
using namespace chrono;
using namespace sf;
Game Game::game;
void Game::init() {
rendManager.init(L"Tower Defence");
device = rendManager.getDevice();
driver = rendManager.getDriver();
smgr = rendManager.getSceneManager();
guienv = rendManager.getGUIEnvironment();
device->setResizable(false);
SAppContext context;
context.device = device;
EventReceiver* eventReceiver = new EventReceiver(context);
device->setEventReceiver(eventReceiver);
pushState(new StateMainMenu());
}
void Game::run() {
Clock gameClock;
double ticksPerSecond = 60;
double tickTime = 1000.0 / ticksPerSecond * 1000.0;
double maxFrameSkip = 10;
double nextTick = gameClock.getElapsedTime().asMicroseconds();
double currentTime;
int loops = 0;
int tickCounter = 0;
int frameCounter = 0;
double updateTime = gameClock.getElapsedTime().asMicroseconds();
while (device->run()) {
currentTime = gameClock.getElapsedTime().asMicroseconds();
loops = 0;
while (currentTime >= nextTick && loops < maxFrameSkip) {
// Update game
if (stateStack.size() > 0)
updateStates();
nextTick += tickTime;
loops++;
tickCounter++;
}
//objManager.drawSystems(0);
// Render game
if (stateStack.size() > 0)
renderStates();
frameCounter++;
if (currentTime - updateTime >= 1000000.0) {
if (DebugValues::PRINT_FPS)
cout << "Ticks: " << tickCounter << ", Frames: " << frameCounter << endl;
frameCounter = 0;
tickCounter = 0;
updateTime += 1000000.0;//currentTime - ((currentTime - updateTime) - 1000);
}
}
}
void Game::dispose() {
resources.freeSounds();
device->drop();
}
void Game::updateStates() {
for (GameState* state : stateStack) {
state->update();
if (!state->transparentUpdate)
break;
}
}
void Game::renderStates() {
driver->beginScene(true, true, irr::video::SColor(255,0,0,0));
int bottom = 0;
for (int i = 0; i < stateStack.size(); i++) {
if (stateStack.at(i)->transparentDraw)
bottom++;
else
break;
}
for (int i = bottom; i >= 0; i--) {
stateStack.at(i)->render(driver);
}
driver->endScene();
}
void Game::pushState ( GameState* state ) {
stateStack.insert(stateStack.begin(), state);
}
void Game::popState() {
GameState* current = currentState();
stateStack.erase(stateStack.begin());
delete current;
}
void Game::popStates ( int num ) {
for (int i = 0; i < num; i++) {
popState();
}
}
ObjectManager* Game::getObjMgr() {
return &objManager;
}
RenderManager* Game::getRendMgr() {
return &rendManager;
}
GameState* Game::currentState() {
return stateStack.front();
}
| 20.075342
| 79
| 0.67622
|
RHUL-CS-Projects
|
a6e47799fe0a0eb1c1d78764fa8406d96b26767d
| 2,843
|
cpp
|
C++
|
src/ariel/rendersys.cpp
|
lymastee/gslib
|
1b165b7a812526c4b2a3179588df9a7c2ff602a6
|
[
"MIT"
] | 9
|
2016-10-18T09:40:09.000Z
|
2022-02-11T09:44:51.000Z
|
src/ariel/rendersys.cpp
|
lymastee/gslib
|
1b165b7a812526c4b2a3179588df9a7c2ff602a6
|
[
"MIT"
] | null | null | null |
src/ariel/rendersys.cpp
|
lymastee/gslib
|
1b165b7a812526c4b2a3179588df9a7c2ff602a6
|
[
"MIT"
] | 1
|
2016-10-19T15:20:58.000Z
|
2016-10-19T15:20:58.000Z
|
/*
* Copyright (c) 2016-2021 lymastee, All rights reserved.
* Contact: lymastee@hotmail.com
*
* This file is part of the gslib project.
*
* 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 <ariel/rendersys.h>
__ariel_begin__
rendersys::rsys_map rendersys::_dev_indexing;
rendersys::rendersys():
_bkcr {0.f, 0.f, 0.f, 1.f}
{
}
bool rendersys::is_vsync_enabled(const configs& cfg)
{
auto f = cfg.find(_t("vsync"));
if(f == cfg.end())
return false;
return f->second == _t("true") || f->second == _t("1");
}
bool rendersys::is_full_screen(const configs& cfg)
{
auto f = cfg.find(_t("fullscreen"));
if(f == cfg.end())
return false;
return f->second == _t("true") || f->second == _t("1");
}
bool rendersys::is_MSAA_enabled(const configs& cfg)
{
auto f = cfg.find(_t("msaa"));
if(f == cfg.end())
return false;
return f->second == _t("true") || f->second == _t("1");
}
uint rendersys::get_MSAA_sampler_count(const configs& cfg)
{
auto f = cfg.find(_t("msaa_sampler_count"));
if(f == cfg.end())
return 0;
return (uint)f->second.to_int();
}
void rendersys::set_background_color(const color& cr)
{
_bkcr[0] = (float)cr.red / 255.f;
_bkcr[1] = (float)cr.green / 255.f;
_bkcr[2] = (float)cr.blue / 255.f;
_bkcr[3] = (float)cr.alpha / 255.f;
}
void rendersys::register_dev_index_service(void* dev, rendersys* rsys)
{
_dev_indexing.emplace(dev, rsys);
}
void rendersys::unregister_dev_index_service(void* dev)
{
_dev_indexing.erase(dev);
}
rendersys* rendersys::find_by_dev(void* dev)
{
auto f = _dev_indexing.find(dev);
return f == _dev_indexing.end() ? nullptr : f->second;
}
__ariel_end__
| 29.926316
| 82
| 0.663384
|
lymastee
|
a6e5c2bec1f49071ef3a8df5348fc465336955a4
| 981
|
cpp
|
C++
|
src/DynamicProgramming/RegionalDP/MinimumMergeCost.cpp
|
S1xe/Way-to-Algorithm
|
e666edfb000b3eaef8cc1413f71b035ec4141718
|
[
"MIT"
] | 101
|
2015-11-19T02:40:01.000Z
|
2017-12-01T13:43:06.000Z
|
src/DynamicProgramming/RegionalDP/MinimumMergeCost.cpp
|
S1xe/Way-to-Algorithm
|
e666edfb000b3eaef8cc1413f71b035ec4141718
|
[
"MIT"
] | 3
|
2019-05-31T14:27:56.000Z
|
2021-07-28T04:24:55.000Z
|
src/DynamicProgramming/RegionalDP/MinimumMergeCost.cpp
|
S1xe/Way-to-Algorithm
|
e666edfb000b3eaef8cc1413f71b035ec4141718
|
[
"MIT"
] | 72
|
2016-01-28T15:20:01.000Z
|
2017-12-01T13:43:07.000Z
|
#include "MinimumMergeCost.h"
#include "../Util.h"
#include <algorithm>
#include <climits>
#include <cstdarg>
#include <iostream>
#include <string>
// 防止int溢出
static int Add(int a = 0, int b = 0, int c = 0) {
if (a == INF || b == INF || c == INF)
return INF;
return a + b + c;
}
int MinimumMergeCost(int *s, int n) {
int **f = Array2DNew(n + 1, n + 1);
int **sum = Array2DNew(n + 1, n + 1);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++) {
f[i][j] = (i == j) ? 0 : INF;
sum[i][j] = 0;
}
for (int i = 1; i <= n; i++)
for (int j = i; j <= n; j++)
for (int k = i; k <= j; k++)
sum[i][j] += s[k];
for (int i = 1; i <= n; i++)
for (int j = i + 1; j <= n; j++)
for (int k = i; k < j; k++) {
f[i][j] = std::min(
f[i][j], Add(Add(f[i][k], f[k + 1][j]), sum[i][k], sum[k + 1][j]));
}
int result = f[1][n];
Array2DFree(f, n + 1);
Array2DFree(sum, n + 1);
return result;
}
| 21.8
| 79
| 0.448522
|
S1xe
|
a6eb023906b4bc6df26ebf5d31be5d6cf5e49212
| 648
|
cpp
|
C++
|
problems/codeforces/1504/b-flip-the-bits/code.cpp
|
brunodccarvalho/competitive
|
4177c439174fbe749293b9da3445ce7303bd23c2
|
[
"MIT"
] | 7
|
2020-10-15T22:37:10.000Z
|
2022-02-26T17:23:49.000Z
|
problems/codeforces/1504/b-flip-the-bits/code.cpp
|
brunodccarvalho/competitive
|
4177c439174fbe749293b9da3445ce7303bd23c2
|
[
"MIT"
] | null | null | null |
problems/codeforces/1504/b-flip-the-bits/code.cpp
|
brunodccarvalho/competitive
|
4177c439174fbe749293b9da3445ce7303bd23c2
|
[
"MIT"
] | null | null | null |
#include <bits/stdc++.h>
using namespace std;
// *****
auto solve() {
int N;
string a, b;
cin >> N >> a >> b;
bool eq = true;
int ones = count(begin(a), end(a), '1');
int zeros = N - ones;
for (int i = N - 1; i >= 0; i--) {
bool same = (a[i] == b[i]) == eq;
if (!same && ones != zeros) {
return "NO";
}
a[i] == '1' ? ones-- : zeros--;
eq ^= !same;
}
return "YES";
}
// *****
int main() {
ios::sync_with_stdio(false);
unsigned T;
cin >> T >> ws;
for (unsigned t = 1; t <= T; ++t) {
cout << solve() << endl;
}
return 0;
}
| 16.615385
| 44
| 0.405864
|
brunodccarvalho
|
a6ebcbad9e9e3e377c2d3a8ed595b32dcc98fce4
| 284,460
|
cpp
|
C++
|
App/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp_Attr.cpp
|
JBrentJ/MRDL_Unity_Surfaces
|
155c97eb7803af90ef1b7e95dfe7969694507575
|
[
"MIT"
] | null | null | null |
App/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp_Attr.cpp
|
JBrentJ/MRDL_Unity_Surfaces
|
155c97eb7803af90ef1b7e95dfe7969694507575
|
[
"MIT"
] | null | null | null |
App/Il2CppOutputProject/Source/il2cppOutput/Assembly-CSharp_Attr.cpp
|
JBrentJ/MRDL_Unity_Surfaces
|
155c97eb7803af90ef1b7e95dfe7969694507575
|
[
"MIT"
] | null | null | null |
#include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
// System.Char[]
struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34;
// System.Type[]
struct TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755;
// System.Runtime.CompilerServices.AsyncStateMachineAttribute
struct AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6;
// System.Reflection.Binder
struct Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30;
// System.Runtime.CompilerServices.CompilationRelaxationsAttribute
struct CompilationRelaxationsAttribute_t661FDDC06629BDA607A42BD660944F039FE03AFF;
// System.Runtime.CompilerServices.CompilerGeneratedAttribute
struct CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C;
// System.Diagnostics.DebuggableAttribute
struct DebuggableAttribute_tA8054EBD0FC7511695D494B690B5771658E3191B;
// System.Diagnostics.DebuggerHiddenAttribute
struct DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88;
// UnityEngine.ExecuteInEditMode
struct ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173;
// UnityEngine.HeaderAttribute
struct HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB;
// UnityEngine.HideInInspector
struct HideInInspector_tDD5B9D3AD8D48C93E23FE6CA3ECDA5589D60CCDA;
// System.Reflection.MemberFilter
struct MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81;
// UnityEngine.RangeAttribute
struct RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5;
// System.Runtime.CompilerServices.RuntimeCompatibilityAttribute
struct RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80;
// UnityEngine.SerializeField
struct SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25;
// System.String
struct String_t;
// UnityEngine.TooltipAttribute
struct TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B;
// System.Type
struct Type_t;
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5;
IL2CPP_EXTERN_C const RuntimeType* U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_0_0_0_var;
IL2CPP_EXTERN_C const RuntimeType* U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_0_0_0_var;
IL2CPP_EXTERN_C const RuntimeType* U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_0_0_0_var;
IL2CPP_EXTERN_C const RuntimeType* U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_0_0_0_var;
IL2CPP_EXTERN_C const RuntimeType* U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_0_0_0_var;
IL2CPP_EXTERN_C const RuntimeType* U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_0_0_0_var;
IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Object
// System.Attribute
struct Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71 : public RuntimeObject
{
public:
public:
};
// System.Reflection.MemberInfo
struct MemberInfo_t : public RuntimeObject
{
public:
public:
};
// System.String
struct String_t : public RuntimeObject
{
public:
// System.Int32 System.String::m_stringLength
int32_t ___m_stringLength_0;
// System.Char System.String::m_firstChar
Il2CppChar ___m_firstChar_1;
public:
inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); }
inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; }
inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; }
inline void set_m_stringLength_0(int32_t value)
{
___m_stringLength_0 = value;
}
inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); }
inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; }
inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; }
inline void set_m_firstChar_1(Il2CppChar value)
{
___m_firstChar_1 = value;
}
};
struct String_t_StaticFields
{
public:
// System.String System.String::Empty
String_t* ___Empty_5;
public:
inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); }
inline String_t* get_Empty_5() const { return ___Empty_5; }
inline String_t** get_address_of_Empty_5() { return &___Empty_5; }
inline void set_Empty_5(String_t* value)
{
___Empty_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Empty_5), (void*)value);
}
};
// System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject
{
public:
public:
};
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com
{
};
// System.Boolean
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37
{
public:
// System.Boolean System.Boolean::m_value
bool ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___m_value_0)); }
inline bool get_m_value_0() const { return ___m_value_0; }
inline bool* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(bool value)
{
___m_value_0 = value;
}
};
struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields
{
public:
// System.String System.Boolean::TrueString
String_t* ___TrueString_5;
// System.String System.Boolean::FalseString
String_t* ___FalseString_6;
public:
inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___TrueString_5)); }
inline String_t* get_TrueString_5() const { return ___TrueString_5; }
inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; }
inline void set_TrueString_5(String_t* value)
{
___TrueString_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___TrueString_5), (void*)value);
}
inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_StaticFields, ___FalseString_6)); }
inline String_t* get_FalseString_6() const { return ___FalseString_6; }
inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; }
inline void set_FalseString_6(String_t* value)
{
___FalseString_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FalseString_6), (void*)value);
}
};
// System.Runtime.CompilerServices.CompilationRelaxationsAttribute
struct CompilationRelaxationsAttribute_t661FDDC06629BDA607A42BD660944F039FE03AFF : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
// System.Int32 System.Runtime.CompilerServices.CompilationRelaxationsAttribute::m_relaxations
int32_t ___m_relaxations_0;
public:
inline static int32_t get_offset_of_m_relaxations_0() { return static_cast<int32_t>(offsetof(CompilationRelaxationsAttribute_t661FDDC06629BDA607A42BD660944F039FE03AFF, ___m_relaxations_0)); }
inline int32_t get_m_relaxations_0() const { return ___m_relaxations_0; }
inline int32_t* get_address_of_m_relaxations_0() { return &___m_relaxations_0; }
inline void set_m_relaxations_0(int32_t value)
{
___m_relaxations_0 = value;
}
};
// System.Runtime.CompilerServices.CompilerGeneratedAttribute
struct CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Diagnostics.DebuggerHiddenAttribute
struct DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA : public ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52
{
public:
public:
};
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields
{
public:
// System.Char[] System.Enum::enumSeperatorCharArray
CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* ___enumSeperatorCharArray_0;
public:
inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t23B90B40F60E677A8025267341651C94AE079CDA_StaticFields, ___enumSeperatorCharArray_0)); }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; }
inline CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; }
inline void set_enumSeperatorCharArray_0(CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34* value)
{
___enumSeperatorCharArray_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___enumSeperatorCharArray_0), (void*)value);
}
};
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshaled_com
{
};
// UnityEngine.ExecuteInEditMode
struct ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// UnityEngine.HideInInspector
struct HideInInspector_tDD5B9D3AD8D48C93E23FE6CA3ECDA5589D60CCDA : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.IntPtr
struct IntPtr_t
{
public:
// System.Void* System.IntPtr::m_value
void* ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
inline void* get_m_value_0() const { return ___m_value_0; }
inline void** get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(void* value)
{
___m_value_0 = value;
}
};
struct IntPtr_t_StaticFields
{
public:
// System.IntPtr System.IntPtr::Zero
intptr_t ___Zero_1;
public:
inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
inline intptr_t get_Zero_1() const { return ___Zero_1; }
inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
inline void set_Zero_1(intptr_t value)
{
___Zero_1 = value;
}
};
// UnityEngine.PropertyAttribute
struct PropertyAttribute_t4A352471DF625C56C811E27AC86B7E1CE6444052 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Runtime.CompilerServices.RuntimeCompatibilityAttribute
struct RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
// System.Boolean System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::m_wrapNonExceptionThrows
bool ___m_wrapNonExceptionThrows_0;
public:
inline static int32_t get_offset_of_m_wrapNonExceptionThrows_0() { return static_cast<int32_t>(offsetof(RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80, ___m_wrapNonExceptionThrows_0)); }
inline bool get_m_wrapNonExceptionThrows_0() const { return ___m_wrapNonExceptionThrows_0; }
inline bool* get_address_of_m_wrapNonExceptionThrows_0() { return &___m_wrapNonExceptionThrows_0; }
inline void set_m_wrapNonExceptionThrows_0(bool value)
{
___m_wrapNonExceptionThrows_0 = value;
}
};
// UnityEngine.SerializeField
struct SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
public:
};
// System.Runtime.CompilerServices.StateMachineAttribute
struct StateMachineAttribute_tA6E77C77F821508E405473BA1C4C08A69FDA0AC3 : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
// System.Type System.Runtime.CompilerServices.StateMachineAttribute::<StateMachineType>k__BackingField
Type_t * ___U3CStateMachineTypeU3Ek__BackingField_0;
public:
inline static int32_t get_offset_of_U3CStateMachineTypeU3Ek__BackingField_0() { return static_cast<int32_t>(offsetof(StateMachineAttribute_tA6E77C77F821508E405473BA1C4C08A69FDA0AC3, ___U3CStateMachineTypeU3Ek__BackingField_0)); }
inline Type_t * get_U3CStateMachineTypeU3Ek__BackingField_0() const { return ___U3CStateMachineTypeU3Ek__BackingField_0; }
inline Type_t ** get_address_of_U3CStateMachineTypeU3Ek__BackingField_0() { return &___U3CStateMachineTypeU3Ek__BackingField_0; }
inline void set_U3CStateMachineTypeU3Ek__BackingField_0(Type_t * value)
{
___U3CStateMachineTypeU3Ek__BackingField_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___U3CStateMachineTypeU3Ek__BackingField_0), (void*)value);
}
};
// System.Void
struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5
{
public:
union
{
struct
{
};
uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1];
};
public:
};
// System.Runtime.CompilerServices.AsyncStateMachineAttribute
struct AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 : public StateMachineAttribute_tA6E77C77F821508E405473BA1C4C08A69FDA0AC3
{
public:
public:
};
// System.Reflection.BindingFlags
struct BindingFlags_tAAAB07D9AC588F0D55D844E51D7035E96DF94733
{
public:
// System.Int32 System.Reflection.BindingFlags::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(BindingFlags_tAAAB07D9AC588F0D55D844E51D7035E96DF94733, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// UnityEngine.HeaderAttribute
struct HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB : public PropertyAttribute_t4A352471DF625C56C811E27AC86B7E1CE6444052
{
public:
// System.String UnityEngine.HeaderAttribute::header
String_t* ___header_0;
public:
inline static int32_t get_offset_of_header_0() { return static_cast<int32_t>(offsetof(HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB, ___header_0)); }
inline String_t* get_header_0() const { return ___header_0; }
inline String_t** get_address_of_header_0() { return &___header_0; }
inline void set_header_0(String_t* value)
{
___header_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___header_0), (void*)value);
}
};
// UnityEngine.RangeAttribute
struct RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 : public PropertyAttribute_t4A352471DF625C56C811E27AC86B7E1CE6444052
{
public:
// System.Single UnityEngine.RangeAttribute::min
float ___min_0;
// System.Single UnityEngine.RangeAttribute::max
float ___max_1;
public:
inline static int32_t get_offset_of_min_0() { return static_cast<int32_t>(offsetof(RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5, ___min_0)); }
inline float get_min_0() const { return ___min_0; }
inline float* get_address_of_min_0() { return &___min_0; }
inline void set_min_0(float value)
{
___min_0 = value;
}
inline static int32_t get_offset_of_max_1() { return static_cast<int32_t>(offsetof(RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5, ___max_1)); }
inline float get_max_1() const { return ___max_1; }
inline float* get_address_of_max_1() { return &___max_1; }
inline void set_max_1(float value)
{
___max_1 = value;
}
};
// System.RuntimeTypeHandle
struct RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9
{
public:
// System.IntPtr System.RuntimeTypeHandle::value
intptr_t ___value_0;
public:
inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9, ___value_0)); }
inline intptr_t get_value_0() const { return ___value_0; }
inline intptr_t* get_address_of_value_0() { return &___value_0; }
inline void set_value_0(intptr_t value)
{
___value_0 = value;
}
};
// UnityEngine.TooltipAttribute
struct TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B : public PropertyAttribute_t4A352471DF625C56C811E27AC86B7E1CE6444052
{
public:
// System.String UnityEngine.TooltipAttribute::tooltip
String_t* ___tooltip_0;
public:
inline static int32_t get_offset_of_tooltip_0() { return static_cast<int32_t>(offsetof(TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B, ___tooltip_0)); }
inline String_t* get_tooltip_0() const { return ___tooltip_0; }
inline String_t** get_address_of_tooltip_0() { return &___tooltip_0; }
inline void set_tooltip_0(String_t* value)
{
___tooltip_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___tooltip_0), (void*)value);
}
};
// System.Diagnostics.DebuggableAttribute/DebuggingModes
struct DebuggingModes_t279D5B9C012ABA935887CB73C5A63A1F46AF08A8
{
public:
// System.Int32 System.Diagnostics.DebuggableAttribute/DebuggingModes::value__
int32_t ___value___2;
public:
inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(DebuggingModes_t279D5B9C012ABA935887CB73C5A63A1F46AF08A8, ___value___2)); }
inline int32_t get_value___2() const { return ___value___2; }
inline int32_t* get_address_of_value___2() { return &___value___2; }
inline void set_value___2(int32_t value)
{
___value___2 = value;
}
};
// System.Diagnostics.DebuggableAttribute
struct DebuggableAttribute_tA8054EBD0FC7511695D494B690B5771658E3191B : public Attribute_t037CA9D9F3B742C063DB364D2EEBBF9FC5772C71
{
public:
// System.Diagnostics.DebuggableAttribute/DebuggingModes System.Diagnostics.DebuggableAttribute::m_debuggingModes
int32_t ___m_debuggingModes_0;
public:
inline static int32_t get_offset_of_m_debuggingModes_0() { return static_cast<int32_t>(offsetof(DebuggableAttribute_tA8054EBD0FC7511695D494B690B5771658E3191B, ___m_debuggingModes_0)); }
inline int32_t get_m_debuggingModes_0() const { return ___m_debuggingModes_0; }
inline int32_t* get_address_of_m_debuggingModes_0() { return &___m_debuggingModes_0; }
inline void set_m_debuggingModes_0(int32_t value)
{
___m_debuggingModes_0 = value;
}
};
// System.Type
struct Type_t : public MemberInfo_t
{
public:
// System.RuntimeTypeHandle System.Type::_impl
RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 ____impl_9;
public:
inline static int32_t get_offset_of__impl_9() { return static_cast<int32_t>(offsetof(Type_t, ____impl_9)); }
inline RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 get__impl_9() const { return ____impl_9; }
inline RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 * get_address_of__impl_9() { return &____impl_9; }
inline void set__impl_9(RuntimeTypeHandle_tC33965ADA3E041E0C94AF05E5CB527B56482CEF9 value)
{
____impl_9 = value;
}
};
struct Type_t_StaticFields
{
public:
// System.Reflection.MemberFilter System.Type::FilterAttribute
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterAttribute_0;
// System.Reflection.MemberFilter System.Type::FilterName
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterName_1;
// System.Reflection.MemberFilter System.Type::FilterNameIgnoreCase
MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * ___FilterNameIgnoreCase_2;
// System.Object System.Type::Missing
RuntimeObject * ___Missing_3;
// System.Char System.Type::Delimiter
Il2CppChar ___Delimiter_4;
// System.Type[] System.Type::EmptyTypes
TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* ___EmptyTypes_5;
// System.Reflection.Binder System.Type::defaultBinder
Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * ___defaultBinder_6;
public:
inline static int32_t get_offset_of_FilterAttribute_0() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterAttribute_0)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterAttribute_0() const { return ___FilterAttribute_0; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterAttribute_0() { return &___FilterAttribute_0; }
inline void set_FilterAttribute_0(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterAttribute_0 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterAttribute_0), (void*)value);
}
inline static int32_t get_offset_of_FilterName_1() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterName_1)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterName_1() const { return ___FilterName_1; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterName_1() { return &___FilterName_1; }
inline void set_FilterName_1(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterName_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterName_1), (void*)value);
}
inline static int32_t get_offset_of_FilterNameIgnoreCase_2() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterNameIgnoreCase_2)); }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * get_FilterNameIgnoreCase_2() const { return ___FilterNameIgnoreCase_2; }
inline MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 ** get_address_of_FilterNameIgnoreCase_2() { return &___FilterNameIgnoreCase_2; }
inline void set_FilterNameIgnoreCase_2(MemberFilter_t48D0AA10105D186AF42428FA532D4B4332CF8B81 * value)
{
___FilterNameIgnoreCase_2 = value;
Il2CppCodeGenWriteBarrier((void**)(&___FilterNameIgnoreCase_2), (void*)value);
}
inline static int32_t get_offset_of_Missing_3() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Missing_3)); }
inline RuntimeObject * get_Missing_3() const { return ___Missing_3; }
inline RuntimeObject ** get_address_of_Missing_3() { return &___Missing_3; }
inline void set_Missing_3(RuntimeObject * value)
{
___Missing_3 = value;
Il2CppCodeGenWriteBarrier((void**)(&___Missing_3), (void*)value);
}
inline static int32_t get_offset_of_Delimiter_4() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Delimiter_4)); }
inline Il2CppChar get_Delimiter_4() const { return ___Delimiter_4; }
inline Il2CppChar* get_address_of_Delimiter_4() { return &___Delimiter_4; }
inline void set_Delimiter_4(Il2CppChar value)
{
___Delimiter_4 = value;
}
inline static int32_t get_offset_of_EmptyTypes_5() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___EmptyTypes_5)); }
inline TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* get_EmptyTypes_5() const { return ___EmptyTypes_5; }
inline TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755** get_address_of_EmptyTypes_5() { return &___EmptyTypes_5; }
inline void set_EmptyTypes_5(TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755* value)
{
___EmptyTypes_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&___EmptyTypes_5), (void*)value);
}
inline static int32_t get_offset_of_defaultBinder_6() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___defaultBinder_6)); }
inline Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * get_defaultBinder_6() const { return ___defaultBinder_6; }
inline Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 ** get_address_of_defaultBinder_6() { return &___defaultBinder_6; }
inline void set_defaultBinder_6(Binder_t2BEE27FD84737D1E79BC47FD67F6D3DD2F2DDA30 * value)
{
___defaultBinder_6 = value;
Il2CppCodeGenWriteBarrier((void**)(&___defaultBinder_6), (void*)value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// System.Void System.Diagnostics.DebuggableAttribute::.ctor(System.Diagnostics.DebuggableAttribute/DebuggingModes)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void DebuggableAttribute__ctor_m7FF445C8435494A4847123A668D889E692E55550 (DebuggableAttribute_tA8054EBD0FC7511695D494B690B5771658E3191B * __this, int32_t ___modes0, const RuntimeMethod* method);
// System.Void System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void CompilationRelaxationsAttribute__ctor_mAC3079EBC4EEAB474EED8208EF95DB39C922333B (CompilationRelaxationsAttribute_t661FDDC06629BDA607A42BD660944F039FE03AFF * __this, int32_t ___relaxations0, const RuntimeMethod* method);
// System.Void System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void RuntimeCompatibilityAttribute__ctor_m551DDF1438CE97A984571949723F30F44CF7317C (RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80 * __this, const RuntimeMethod* method);
// System.Void System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::set_WrapNonExceptionThrows(System.Boolean)
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void RuntimeCompatibilityAttribute_set_WrapNonExceptionThrows_m8562196F90F3EBCEC23B5708EE0332842883C490_inline (RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80 * __this, bool ___value0, const RuntimeMethod* method);
// System.Void UnityEngine.SerializeField::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3 (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * __this, const RuntimeMethod* method);
// System.Void System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35 (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * __this, const RuntimeMethod* method);
// System.Void UnityEngine.HeaderAttribute::.ctor(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * __this, String_t* ___header0, const RuntimeMethod* method);
// System.Void System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(System.Type)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * __this, Type_t * ___stateMachineType0, const RuntimeMethod* method);
// System.Void System.Diagnostics.DebuggerHiddenAttribute::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3 (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * __this, const RuntimeMethod* method);
// System.Void UnityEngine.HideInInspector::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void HideInInspector__ctor_mE2B7FB1D206A74BA583C7812CDB4EBDD83EB66F9 (HideInInspector_tDD5B9D3AD8D48C93E23FE6CA3ECDA5589D60CCDA * __this, const RuntimeMethod* method);
// System.Void UnityEngine.RangeAttribute::.ctor(System.Single,System.Single)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000 (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * __this, float ___min0, float ___max1, const RuntimeMethod* method);
// System.Void UnityEngine.ExecuteInEditMode::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void ExecuteInEditMode__ctor_m52849B67DB46F6CF090D45E523FAE97A10825C0A (ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 * __this, const RuntimeMethod* method);
// System.Void UnityEngine.TooltipAttribute::.ctor(System.String)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void TooltipAttribute__ctor_m1839ACEC1560968A6D0EA55D7EB4535546588042 (TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B * __this, String_t* ___tooltip0, const RuntimeMethod* method);
static void AssemblyU2DCSharp_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
DebuggableAttribute_tA8054EBD0FC7511695D494B690B5771658E3191B * tmp = (DebuggableAttribute_tA8054EBD0FC7511695D494B690B5771658E3191B *)cache->attributes[0];
DebuggableAttribute__ctor_m7FF445C8435494A4847123A668D889E692E55550(tmp, 2LL, NULL);
}
{
CompilationRelaxationsAttribute_t661FDDC06629BDA607A42BD660944F039FE03AFF * tmp = (CompilationRelaxationsAttribute_t661FDDC06629BDA607A42BD660944F039FE03AFF *)cache->attributes[1];
CompilationRelaxationsAttribute__ctor_mAC3079EBC4EEAB474EED8208EF95DB39C922333B(tmp, 8LL, NULL);
}
{
RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80 * tmp = (RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80 *)cache->attributes[2];
RuntimeCompatibilityAttribute__ctor_m551DDF1438CE97A984571949723F30F44CF7317C(tmp, NULL);
RuntimeCompatibilityAttribute_set_WrapNonExceptionThrows_m8562196F90F3EBCEC23B5708EE0332842883C490_inline(tmp, true, NULL);
}
}
static void ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_loadSceneMode(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_contentName(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_loadOnKeyPress(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_keyCode(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_ButtonLoadContentScene_U3CLoadContentU3Eb__5_0_m0F2BAB71C442DA2D6DD2175FA2F624413388AEA3(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CU3Ec_t43FDE974E52D7C6CDA8B25128E2467049C5C3F2D_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_fingertipRadius(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x48\x65\x61\x74"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatDissipateSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatGainSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatRadiusMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numWisps(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x57\x69\x73\x70\x73"), NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_seekStrength(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_velocityDampen(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_initialVelocity(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_offsetMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_colorCycleSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_baseWispColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatWispColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_fingertipColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispMat(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispSize(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_ambientNoise(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_agitatedNoise(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_fingertipVelocityColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x46\x69\x6E\x67\x65\x72\x74\x69\x70\x73"), NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x75\x64\x69\x6F"), NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionPitch(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionFadeSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numTiles(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x54\x65\x78\x74\x75\x72\x65\x20\x74\x69\x6C\x69\x6E\x67"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numColumns(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numRows(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_tileScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_tileOffsets(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_currentTileNum(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_Ephemeral_UpdateWispsTask_m6394F82B466F3D9C7A5C8C4B86D557B9A6AE04A3(CustomAttributesCache* cache)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_0_0_0_var);
s_Il2CppMethodInitialized = true;
}
{
AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * tmp = (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 *)cache->attributes[0];
AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B(tmp, il2cpp_codegen_type_get_object(U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_0_0_0_var), NULL);
}
}
static void Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_Ephemeral_UpdateWisps_m07B2A1316E992F0C63DE9164CFDE0A991940571C(CustomAttributesCache* cache)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_0_0_0_var);
s_Il2CppMethodInitialized = true;
}
{
AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * tmp = (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 *)cache->attributes[0];
AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B(tmp, il2cpp_codegen_type_get_object(U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_0_0_0_var), NULL);
}
}
static void U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_CustomAttributesCacheGenerator_U3CUpdateWispsTaskU3Ed__59_SetStateMachine_mF28B0A6C88891567ED86C4A0214C1E0B3BE12A30(CustomAttributesCache* cache)
{
{
DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * tmp = (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 *)cache->attributes[0];
DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3(tmp, NULL);
}
}
static void U3CU3Ec_t49911D0DBBA0A1916E776BDF2D6019A9A05B514B_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_CustomAttributesCacheGenerator_U3CUpdateWispsU3Ed__66_SetStateMachine_m418F25120B4C81FA7CE82086B2A6CBC48237D287(CustomAttributesCache* cache)
{
{
DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * tmp = (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 *)cache->attributes[0];
DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_U3CInitializedU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_U3CSurfacePositionU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_fingers(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x46\x69\x6E\x67\x65\x72\x20\x6F\x62\x6A\x65\x63\x74\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_palms(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_disableInactiveFingersInEditor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_fingerRigidBodies(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x46\x69\x6E\x67\x65\x72\x20\x50\x68\x79\x73\x69\x63\x73"), NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_fingerColliders(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_palmRigidBodies(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_palmColliders(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_surfaceTransform(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x53\x75\x72\x66\x61\x63\x65"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_get_Initialized_m8BCDDB4DF79FBFA9051F901D8701830BA8739FA4(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_set_Initialized_m468F44FAA1F96A6E5422A0A8123D4895E4329D4B(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_get_SurfacePosition_mF548C1A7C23931BC08953F30F9227B6265140028(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_set_SurfacePosition_m1ED8F1CEEBA5BC94A4A2AFDEC15789CCC480D5E2(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_sampler(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_oceanCollider(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_numBoids(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_coherenceAmount(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_alignmentAmount(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_separationAmount(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_fleeAmount(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_maxSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_maxForce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_minDistance(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidRespawnTime(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_surfaceBounce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_surfaceBounceSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_agitationMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_forceRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_splashPrefab(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_bounceCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_flockRotate(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_normalAudio(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x75\x64\x69\x6F"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_fleeingAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_masterVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_audioChangeSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_numBoidsFleeingMaxVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidMesh(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidMat(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_positionMap(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_flock(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_asteroids(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_impactPrefab(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_explosionRespawnDelay(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_collisionTimeoutDelay(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_despawnedMaterial(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_despawnedGradient(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_sampler(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_minRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_maxRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_agitationForce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_radiusChangeSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_gravity(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_blendShapeCurves(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x6F\x6F\x70\x20\x43\x65\x6E\x74\x65\x72"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopCenter(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerGlowGradient(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerPoppedGradient(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerGlowCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerPoppedCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerSquirmCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopBlorbPrefabs(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x6F\x6F\x70\x20\x42\x6C\x6F\x72\x62\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_bloatGradientEmission(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_bloatGradientColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_poppedGradientColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_baseGradientColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_maxDistToFinger(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_maxBloatBeforePop(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_respawnTime(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerAgitationCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_popRecoveryCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_popRecoveryScaleCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_popParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_emissionColorPropName(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerTips(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x46\x69\x6E\x67\x65\x72\x74\x69\x70\x73"), NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerTipSlimeFadeSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerTipSlimeColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopDistance(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x6F\x6F\x70\x20\x53\x6C\x69\x6D\x65"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopSlimes(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_timeLastPopped(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_growthChaosAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_growthChaosVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_growthChaosPitch(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_rotationSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_Goop_UpdateBlorbsLoop_m986AFC428EF64DB53EC5976F8BF9E8CBBC48E415(CustomAttributesCache* cache)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_0_0_0_var);
s_Il2CppMethodInitialized = true;
}
{
AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * tmp = (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 *)cache->attributes[0];
AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B(tmp, il2cpp_codegen_type_get_object(U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_0_0_0_var), NULL);
}
}
static void Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_Goop_UpdateBlorbs_mABD7F7D7F1A0B432F4FD89D33896F0AADDE82D0A(CustomAttributesCache* cache)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_0_0_0_var);
s_Il2CppMethodInitialized = true;
}
{
AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * tmp = (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 *)cache->attributes[0];
AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B(tmp, il2cpp_codegen_type_get_object(U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_0_0_0_var), NULL);
}
}
static void U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_CustomAttributesCacheGenerator_U3CUpdateBlorbsLoopU3Ed__58_SetStateMachine_m0AD947925371163FB699FEAB47B3860A98A38222(CustomAttributesCache* cache)
{
{
DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * tmp = (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 *)cache->attributes[0];
DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3(tmp, NULL);
}
}
static void U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_CustomAttributesCacheGenerator_U3CUpdateBlorbsU3Ed__59_SetStateMachine_mC0A06B4D05DD9C12B90C278C353AB2DDC3BEB13A(CustomAttributesCache* cache)
{
{
DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * tmp = (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 *)cache->attributes[0];
DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3(tmp, NULL);
}
}
static void GoopBlorb_t9629F618A80F58AC7278B62806B18766CED5F62E_CustomAttributesCacheGenerator_meshRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_lineRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_maxStretch(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_minWidth(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_maxWidth(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_droopSpeedCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_droopCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_widthCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_followCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_origin(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_target(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_inertia(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x50\x68\x79\x73\x69\x63\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_targetSeekStrength(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_inertiaStrength(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_inheritedStrength(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_gravityStrength(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_growbies(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_fingerInfluence(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_seasonRevertSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_seasonChangeSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_seasonTargets(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_mainLightColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_overallSeason(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_growbieParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_winterAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x75\x64\x69\x6F"), NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_winterAudioCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_summerAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_summerAudioCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_masterVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftHandObject(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x48\x61\x6E\x64\x20\x4F\x62\x6A\x65\x63\x74\x73"), NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightHandObject(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftHandRoot(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightHandRoot(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftJointMaps(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightJointMaps(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftJointRotOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightJointRotOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void JointMap_tCEC1674D0AC1373CD1630729F0EBE75F01E7E1BF_CustomAttributesCacheGenerator_Transform(CustomAttributesCache* cache)
{
{
HideInInspector_tDD5B9D3AD8D48C93E23FE6CA3ECDA5589D60CCDA * tmp = (HideInInspector_tDD5B9D3AD8D48C93E23FE6CA3ECDA5589D60CCDA *)cache->attributes[0];
HideInInspector__ctor_mE2B7FB1D206A74BA583C7812CDB4EBDD83EB66F9(tmp, NULL);
}
}
static void HandSurface_t72171E13A0450FF56543EEB133611ADF4B984E0B_CustomAttributesCacheGenerator_handJoints(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4A\x6F\x69\x6E\x74\x20\x6F\x62\x6A\x65\x63\x74\x73"), NULL);
}
}
static void HandSurface_t72171E13A0450FF56543EEB133611ADF4B984E0B_CustomAttributesCacheGenerator_handJointRigidBodies(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void HandSurface_t72171E13A0450FF56543EEB133611ADF4B984E0B_CustomAttributesCacheGenerator_handJointColliders(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_chunks(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_initialImpulseForce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_fingerForceDist(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_fingerPushForce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_innerCollider(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_heatIncreaseSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x48\x65\x61\x74"), NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_heatDecreaseSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_heatColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_fingertipHeatColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_baseColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_minTimeBetweenImpacts(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x75\x64\x69\x6F"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_impactClips(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_volumeCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_lavaBubbles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x42\x75\x62\x62\x6C\x65\x73"), NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_bubbleDistance(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_spawnOdds(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_bubbleCheckRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_chunkLayer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_lavaMat(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4C\x61\x76\x61"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_scrollSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_impactParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_U3COnCollisionU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_U3CSubmergedAmountU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_gravityTarget(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_particles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_particlesPrefab(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_get_OnCollision_mD08DBDB130307B7476EE0048AA1FFA5D09C63E56(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_set_OnCollision_m81FA4F0500DD9C2430CFEF95463FF07F9875F661(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_get_SubmergedAmount_mE70C23EA381F4A29EE98CD18417041DA5691FFFF(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_set_SubmergedAmount_m3198E1F1B5D613F134A0A1E1326CFAAC9D204A55(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_lineRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point1Particles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point2Particles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point1(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point2(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_jitter(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4E\x6F\x69\x73\x65"), NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_maxLightIntensity(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_noiseScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_noiseSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_minWidth(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x57\x69\x64\x74\x68"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_maxWidth(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_widthCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_boltTextures(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_fingerAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_jitterCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_point1Light(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_U3CPoint1SampleIndexU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_FingerArc_get_Point1SampleIndex_mD059D02CE72FF48BC3C2CA82E407BA4B6AC86961(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_FingerArc_set_Point1SampleIndex_mCC2A0AC52480743A3E885AA86B978ADA556ADD15(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_sampler(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_surfaceArcs(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerArcs(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerArcSources(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_randomSurfaceArcChange(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_randomFingerArcChange(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerEngageDistance(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerRandomPosRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerDisengageDistance(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_glowGradient(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_coreRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_glowSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_intensityCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_flickerCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_buzzAudioPitch(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_buzzAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfaceArc_tF31396A7883E415ECFC1C8E01ECAD9CD9DB25792_CustomAttributesCacheGenerator_gravityCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfaceArc_tF31396A7883E415ECFC1C8E01ECAD9CD9DB25792_CustomAttributesCacheGenerator_gravityResetCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfaceArc_tF31396A7883E415ECFC1C8E01ECAD9CD9DB25792_CustomAttributesCacheGenerator_arcEscapeStrength(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void LoadFirstScene_tB15D9B41665EB1A9BC1BB9B1A563C5458D6FBE7C_CustomAttributesCacheGenerator_contentName(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_mesh(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_numPointsToSample(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapResX(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapResY(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapUvTest(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapTriIndexTest(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_uvChannel(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 1.0f, 8.0f, NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Tutorial_t00E576E62CB1B76A4CEB914E180C4F6F2CC63BF3_CustomAttributesCacheGenerator_holdUpPalmText(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Tutorial_t00E576E62CB1B76A4CEB914E180C4F6F2CC63BF3_CustomAttributesCacheGenerator_menu(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CChunkImpactIntensityU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CFingerImpactIntensityU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3COnImpactU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CLastOtherColliderU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CLastImpactIntensityU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CLastImpactTypeU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CRadiusU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_impactAudio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_ChunkImpactIntensity_m1807D63C5B630D450B3E2AEA29AEB5A1E8FDACE2(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_ChunkImpactIntensity_m927159F8F8B2FD7FC95FB03F58B8F57921010FAB(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_FingerImpactIntensity_m1CE7563DEEAB831F2C036A4DFFBC11633B9BB7B3(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_FingerImpactIntensity_m220556FA6D06D229B034F68B2989B2334639F973(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_OnImpact_mE14A44BE107C2E33241E312F948D20131BF6C860(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_OnImpact_m6422199BF7D8E1D4E0A54A7FE2AB6D6B5F72385A(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_LastOtherCollider_m2520C1755860A6DD8492BB447C3BF4C7F9EE75EE(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_LastOtherCollider_mA41C25E5C29C769AA31E61E6A206C99761FCE55B(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_LastImpactIntensity_m1DD1F66AB5B866394039424880BD2B378DDC6DDF(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_LastImpactIntensity_mF69C6DD25806A0693390F08B708922DDE2D81766(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_LastImpactType_m8FC0B9188E2B96205BF90677F63604DE47F79FF7(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_LastImpactType_mB778B2D8B59D0ACD1CF5AA6C22FC0E0ACED9C5E9(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_Radius_m5705FDA4CE6B0711DD0DC0CBD6AFC799B1BA2E04(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_Radius_mD01BBBEB17A03805057D50AB3804A10556E8CF6C(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_volumePrefab(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_centralParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0Core(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x65\x6E\x20\x30"), NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0Surface(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_coreRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0RadiusMin(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0RadiusMax(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen1Count(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x65\x6E\x20\x31"), NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen1RadiusMin(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen1RadiusMax(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen2Count(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x65\x6E\x20\x32"), NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen2RadiusMin(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen2RadiusMax(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen3Count(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x65\x6E\x20\x33"), NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen3RadiusMin(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen3RadiusMax(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionColor(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_linePrefab(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionGradientGen1(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionGradientGen2(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionGradientGen3(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_driftIntensity(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x50\x68\x79\x73\x69\x63\x73"), NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_driftScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_driftTimeScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_seekForce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_impactClips(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x75\x64\x69\x6F"), NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_fingerImpactClip(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_impactVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_fingerImpactGradient(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x49\x6D\x70\x61\x63\x74\x20\x43\x6F\x6C\x6F\x72\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_volumeImpactGradient(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_chunkImpactFadeTime(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_fingerImpactFadeTime(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_baseFingerColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_drawConnections(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_minImpactParticleIntensity(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_impactParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_audio(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_domeRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_burstRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_coneRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_soundWaveRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_animator(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_notesTransforms(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_notes(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_notePrefab(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_noteParent(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_noteData(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4E\x6F\x74\x65\x20\x44\x61\x74\x61"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_pressedGradient(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4E\x6F\x74\x65\x20\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releasedGradient(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_pressedPosCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releasedPosCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_pressedOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releasedOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releaseAnimationDuration(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_timeBetweenNoteReleases(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_emissiveColorName(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_emissiveColorNameBurst(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_albedorColorName(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_defaultOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_maxRepositionDistance(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_useSpatialUnderstanding(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_moveIncrement(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_timeOut(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_spatialAwarenessMask(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_SurfacePlacement_PlaceNewSurface_m47ED70EFEA4C987DCBC1C592096F26A955649D30(CustomAttributesCache* cache)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_0_0_0_var);
s_Il2CppMethodInitialized = true;
}
{
AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * tmp = (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 *)cache->attributes[0];
AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B(tmp, il2cpp_codegen_type_get_object(U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_0_0_0_var), NULL);
}
}
static void U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_CustomAttributesCacheGenerator_U3CPlaceNewSurfaceU3Ed__14_SetStateMachine_m615B0FC5AC8486760391A9390B0CA1950CDBED30(CustomAttributesCache* cache)
{
{
DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * tmp = (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 *)cache->attributes[0];
DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 * tmp = (ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 *)cache->attributes[0];
ExecuteInEditMode__ctor_m52849B67DB46F6CF090D45E523FAE97A10825C0A(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_zOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_rotate(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scaleCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_rotateSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scaleSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_rotateOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scaleOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_randomScaleOffset(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_fingerForce(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleDriftSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleReturnSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleTransform(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubble(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_controller(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_enterBubbleClips(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_touchBubbleCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleTouchParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_RadiusMultiplier(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, -0.899999976f, 4.0f, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_TurbulenceMultiplier(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 0.100000001f, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_TurbulenceSpeed(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 10.0f, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Transparency(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Gaze(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Highlight(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Freeze(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_U3COnEnterBubbleU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_U3COnExitBubbleU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4D\x61\x69\x6E\x20\x53\x65\x74\x74\x69\x6E\x67\x73"), NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radiusMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_useVertexNoise(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_useVertexColors(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_defaultVertexColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_meshFilter(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x52\x65\x6E\x64\x65\x72\x69\x6E\x67"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_meshRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_recursionLevel(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_normalAngle(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_atomicForceCurve(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x46\x6F\x72\x63\x65\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radialForceCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbleForceCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_atomicForceMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radialForceMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbleForceMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radialForceInertia(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_atomicForceInertia(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbleForceInertia(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_turbulenceMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x54\x75\x72\x62\x75\x6C\x65\x6E\x63\x65"), NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_turbulenceSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_turbulenceScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbles(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x49\x6E\x6E\x65\x72\x20\x62\x75\x62\x62\x6C\x65\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_minInnerBubbleRadius(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_solidity(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_drawForces(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x69\x7A\x6D\x6F\x73"), NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_forceDrawSkipInterval(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_get_OnEnterBubble_mEBAAF8051AF84AD702109C8DB043CBC54C631535(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_set_OnEnterBubble_mC594F6A0CED6CE8CDF9ED0D0BDE82DCB89D819D3(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_get_OnExitBubble_m5AB5A4AF0C1CC2CF076F46389E87A9BF08730FEE(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_set_OnExitBubble_mF4AF58A854FA5F7455E5EE4BB8287A38234A9DB2(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_UpdateBubbleAsync_mDAAA6DA5F82218CE51E52EFBDF394DA10C479C13(CustomAttributesCache* cache)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_0_0_0_var);
s_Il2CppMethodInitialized = true;
}
{
AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 * tmp = (AsyncStateMachineAttribute_tBDB4B958CFB5CD3BEE1427711FFC8C358C9BA6E6 *)cache->attributes[0];
AsyncStateMachineAttribute__ctor_m9530B59D9722DE383A1703C52EBC1ED1FEFB100B(tmp, il2cpp_codegen_type_get_object(U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_0_0_0_var), NULL);
}
}
static void U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_CustomAttributesCacheGenerator_U3CUpdateBubbleAsyncU3Ed__85_SetStateMachine_m4EC7E00BED36B10F0784AD5438EA19DC94E1E7EB(CustomAttributesCache* cache)
{
{
DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 * tmp = (DebuggerHiddenAttribute_tD84728997C009D6F540FB29D88F032350E046A88 *)cache->attributes[0];
DebuggerHiddenAttribute__ctor_mB40799BB5DAFE439BEFE895836CF792B8DBEA7F3(tmp, NULL);
}
}
static void BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_drawTrails(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trailProps(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trails(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trailBubbleInertia(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trailBubbleForceMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 * tmp = (ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 *)cache->attributes[0];
ExecuteInEditMode__ctor_m52849B67DB46F6CF090D45E523FAE97A10825C0A(tmp, NULL);
}
}
static void ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator_repeatInterval(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator_repeatBlendTime(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator_repeatBlendCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_U3CActivatedOnceU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_animationTarget(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_openCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_closeCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_disableDistance(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_ContextualHandMenu_get_ActivatedOnce_mCDD4C36FFEFB15172240B6C5FD5B6107D9B18268(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_ContextualHandMenu_set_ActivatedOnce_m62012EFA052D5827C098DCD179B984C23FA3CB6D(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_U3CTargetPositionU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_U3CExplodedPositionU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_asteroidRenderer(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_hoverLight(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_trailTargetTime(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_rotationSpeed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_hoverLightExplosionColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_hoverLightNormalColor(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_growthCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_audioSource(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_impactClip(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_respawnClip(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_impactVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_respawnVolume(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_despawnedMaterial(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_spawnedMaterial(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_get_TargetPosition_m78214B3808F7828BD598FF785EBDD855654E7690(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_set_TargetPosition_m45C00CD43AE53FAFD099F9E6B1CFA1309C2A1571(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_get_ExplodedPosition_m1692B2FBC824BF23849E1556D6C68B94E4B09667(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_set_ExplodedPosition_m8F5C92828EF2D194FBCC878FD55C700E2E539381(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_neutralParticles(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x50\x61\x72\x74\x69\x63\x6C\x65\x73"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_winterParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_summerParticles(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_emissionRate(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_neutralEmissionCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_winterEmissionCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_summerEmissionCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 * tmp = (ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 *)cache->attributes[0];
ExecuteInEditMode__ctor_m52849B67DB46F6CF090D45E523FAE97A10825C0A(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_Season(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x6E\x69\x6D\x61\x74\x65\x64\x20\x46\x69\x65\x6C\x64\x73"), NULL);
}
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[1];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_ChangeSpeed(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 1.0f, 10.0f, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_influenceCenter(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_winterGrowbies(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4E\x6F\x72\x6D\x61\x6C\x20\x47\x72\x6F\x77\x62\x69\x65\x73\x20\x28\x76\x69\x73\x69\x62\x6C\x65\x20\x61\x74\x20\x61\x6C\x6C\x20\x74\x69\x6D\x65\x73\x29"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_neutralGrowbies(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_summerGrowbies(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_winterGrowthCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x47\x72\x6F\x77\x74\x68\x20\x63\x75\x72\x76\x65\x73"), NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_neutralGrowthCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_summerGrowthCurve(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_winterClips(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x75\x64\x69\x6F"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_summerClips(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_audioSource(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_volumeMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 * tmp = (ExecuteInEditMode_tAA3B5DE8B7E207BC6CAAFDB1F2502350C0546173 *)cache->attributes[0];
ExecuteInEditMode__ctor_m52849B67DB46F6CF090D45E523FAE97A10825C0A(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_U3CIsDirtyU3Ek__BackingField(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_Growth(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[1];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x41\x6E\x69\x6D\x61\x74\x65\x64\x20\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73"), NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_growthRandomness(CustomAttributesCache* cache)
{
{
TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B * tmp = (TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B *)cache->attributes[0];
TooltipAttribute__ctor_m1839ACEC1560968A6D0EA55D7EB4535546588042(tmp, il2cpp_codegen_string_new_wrapper("\x52\x61\x6E\x64\x6F\x6D\x20\x76\x61\x6C\x75\x65\x73\x20\x64\x65\x74\x65\x72\x6D\x69\x6E\x65\x64\x20\x62\x79\x20\x73\x65\x65\x64"), NULL);
}
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[1];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[2];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[3];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x53\x74\x61\x74\x69\x63\x20\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73"), NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_growthJitter(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_growthScaleMultiplier(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
{
TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B * tmp = (TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B *)cache->attributes[1];
TooltipAttribute__ctor_m1839ACEC1560968A6D0EA55D7EB4535546588042(tmp, il2cpp_codegen_string_new_wrapper("\x4D\x75\x6C\x74\x69\x70\x6C\x69\x65\x72\x20\x66\x6F\x72\x20\x73\x63\x61\x6C\x65\x20\x6F\x66\x20\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x73\x20\x69\x6E\x20\x68\x65\x69\x72\x61\x72\x63\x68\x79\x20\x66\x72\x6F\x6D\x20\x66\x69\x72\x73\x74\x20\x74\x6F\x20\x6C\x61\x73\x74"), NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_corkScrewAmount(CustomAttributesCache* cache)
{
{
TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B * tmp = (TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B *)cache->attributes[0];
TooltipAttribute__ctor_m1839ACEC1560968A6D0EA55D7EB4535546588042(tmp, il2cpp_codegen_string_new_wrapper("\x48\x6F\x77\x20\x6D\x75\x63\x68\x20\x74\x68\x65\x20\x67\x72\x6F\x77\x62\x69\x65\x73\x20\x72\x6F\x74\x61\x74\x65\x20\x6F\x6E\x20\x74\x68\x65\x69\x72\x20\x59\x20\x61\x78\x69\x73\x20\x61\x73\x20\x74\x68\x65\x79\x20\x67\x72\x6F\x77"), NULL);
}
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[1];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 0.0f, 1.0f, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_corkscrewJitter(CustomAttributesCache* cache)
{
{
RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 * tmp = (RangeAttribute_t14A6532D68168764C15E7CF1FDABCD99CB32D0C5 *)cache->attributes[0];
RangeAttribute__ctor_mC74D39A9F20DD2A0D4174F05785ABE4F0DAEF000(tmp, 1.0f, 20.0f, NULL);
}
{
TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B * tmp = (TooltipAttribute_t503A1598A4E68E91673758F50447D0EDFB95149B *)cache->attributes[1];
TooltipAttribute__ctor_m1839ACEC1560968A6D0EA55D7EB4535546588042(tmp, il2cpp_codegen_string_new_wrapper("\x48\x6F\x77\x20\x6A\x69\x74\x74\x65\x72\x79\x20\x74\x6F\x20\x6D\x61\x6B\x65\x20\x74\x68\x65\x20\x63\x6F\x72\x6B\x73\x63\x72\x65\x77\x20\x65\x66\x66\x65\x63\x74"), NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_corkscrewAxis(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_seed(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_xAxisScale(CustomAttributesCache* cache)
{
{
HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB * tmp = (HeaderAttribute_t9B431E6BA0524D46406D9C413D6A71CB5F2DD1AB *)cache->attributes[0];
HeaderAttribute__ctor_m601319E0BCE8C44A9E79B2C0ABAAD0FEF46A9F1E(tmp, il2cpp_codegen_string_new_wrapper("\x4E\x6F\x6E\x2D\x75\x6E\x69\x66\x6F\x72\x6D\x20\x73\x63\x61\x6C\x69\x6E\x67\x20\x28\x73\x65\x74\x20\x74\x6F\x20\x6C\x69\x6E\x65\x61\x72\x20\x66\x6F\x72\x20\x75\x6E\x69\x66\x6F\x72\x6D\x20\x73\x63\x61\x6C\x69\x6E\x67\x29"), NULL);
}
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[1];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_yAxisScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_zAxisScale(CustomAttributesCache* cache)
{
{
SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 * tmp = (SerializeField_t6B23EE6CC99B21C3EBD946352112832A70E67E25 *)cache->attributes[0];
SerializeField__ctor_mDE6A7673BA2C1FAD03CFEC65C6D473CC37889DD3(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_Growbies_get_IsDirty_mDA93F1481DFD6E98300EC8FC674563380667DFB0(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_Growbies_set_IsDirty_m065549E573178808FA04A00AE1F31F618DF1B5AC(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
static void U3CPrivateImplementationDetailsU3E_t6BC7664D9CD46304D39A7D175BB8FFBE0B9F4528_CustomAttributesCacheGenerator(CustomAttributesCache* cache)
{
{
CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C * tmp = (CompilerGeneratedAttribute_t39106AB982658D7A94C27DEF3C48DB2F5F7CD75C *)cache->attributes[0];
CompilerGeneratedAttribute__ctor_m9DC3E4E2DA76FE93948D44199213E2E924DCBE35(tmp, NULL);
}
}
IL2CPP_EXTERN_C const CustomAttributesCacheGenerator g_AssemblyU2DCSharp_AttributeGenerators[];
const CustomAttributesCacheGenerator g_AssemblyU2DCSharp_AttributeGenerators[476] =
{
U3CU3Ec_t43FDE974E52D7C6CDA8B25128E2467049C5C3F2D_CustomAttributesCacheGenerator,
U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_CustomAttributesCacheGenerator,
U3CU3Ec_t49911D0DBBA0A1916E776BDF2D6019A9A05B514B_CustomAttributesCacheGenerator,
U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_CustomAttributesCacheGenerator,
U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_CustomAttributesCacheGenerator,
U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_CustomAttributesCacheGenerator,
U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_CustomAttributesCacheGenerator,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator,
U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_CustomAttributesCacheGenerator,
ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator,
U3CPrivateImplementationDetailsU3E_t6BC7664D9CD46304D39A7D175BB8FFBE0B9F4528_CustomAttributesCacheGenerator,
ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_loadSceneMode,
ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_contentName,
ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_loadOnKeyPress,
ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_keyCode,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_fingertipRadius,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatDissipateSpeed,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatGainSpeed,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatRadiusMultiplier,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numWisps,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_seekStrength,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_velocityDampen,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_initialVelocity,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_offsetMultiplier,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_colorCycleSpeed,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_baseWispColor,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_heatWispColor,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_fingertipColor,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispMat,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispSize,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_ambientNoise,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_agitatedNoise,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_fingertipVelocityColor,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispAudio,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionAudio,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionVolume,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionPitch,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_wispVolume,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_distortionFadeSpeed,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numTiles,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numColumns,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_numRows,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_tileScale,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_tileOffsets,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_currentTileNum,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_U3CInitializedU3Ek__BackingField,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_U3CSurfacePositionU3Ek__BackingField,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_fingers,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_palms,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_disableInactiveFingersInEditor,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_fingerRigidBodies,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_fingerColliders,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_palmRigidBodies,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_palmColliders,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_surfaceTransform,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_sampler,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_oceanCollider,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_numBoids,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_coherenceAmount,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_alignmentAmount,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_separationAmount,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_fleeAmount,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_maxSpeed,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_maxForce,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_minDistance,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidRespawnTime,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_surfaceBounce,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_surfaceBounceSpeed,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_agitationMultiplier,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_forceRadius,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_splashPrefab,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_bounceCurve,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_flockRotate,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_normalAudio,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_fleeingAudio,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_masterVolume,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_audioChangeSpeed,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_numBoidsFleeingMaxVolume,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidMesh,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidMat,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_boidScale,
Flock_t165C420D4323CDD2A291571E7776D838DC4963AA_CustomAttributesCacheGenerator_positionMap,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_flock,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_asteroids,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_impactPrefab,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_explosionRespawnDelay,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_collisionTimeoutDelay,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_despawnedMaterial,
FlockAsteroids_tA180CDB7882C0C9699DABA48B6192F7AF65C0CB7_CustomAttributesCacheGenerator_despawnedGradient,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_sampler,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_minRadius,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_maxRadius,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_agitationForce,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_radiusChangeSpeed,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_gravity,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_blendShapeCurves,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopCenter,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerGlowGradient,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerPoppedGradient,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerGlowCurve,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerPoppedCurve,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_centerSquirmCurve,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopBlorbPrefabs,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_bloatGradientEmission,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_bloatGradientColor,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_poppedGradientColor,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_baseGradientColor,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_maxDistToFinger,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_maxBloatBeforePop,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_respawnTime,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerAgitationCurve,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_popRecoveryCurve,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_popRecoveryScaleCurve,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_popParticles,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_emissionColorPropName,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerTips,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerTipSlimeFadeSpeed,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_fingerTipSlimeColor,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopDistance,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_goopSlimes,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_timeLastPopped,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_growthChaosAudio,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_growthChaosVolume,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_growthChaosPitch,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_rotationSpeed,
GoopBlorb_t9629F618A80F58AC7278B62806B18766CED5F62E_CustomAttributesCacheGenerator_meshRenderer,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_lineRenderer,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_maxStretch,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_minWidth,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_maxWidth,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_droopSpeedCurve,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_droopCurve,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_widthCurve,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_followCurve,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_origin,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_target,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_inertia,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_targetSeekStrength,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_inertiaStrength,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_inheritedStrength,
GoopSlime_t3594F47365FC7AC759D5C52B9DDF131787DA2928_CustomAttributesCacheGenerator_gravityStrength,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_growbies,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_fingerInfluence,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_seasonRevertSpeed,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_seasonChangeSpeed,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_seasonTargets,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_mainLightColor,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_overallSeason,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_growbieParticles,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_winterAudio,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_winterAudioCurve,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_summerAudio,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_summerAudioCurve,
GrowbieSphere_tB72A23804D5373339F3765088C11E6C55ED7B04A_CustomAttributesCacheGenerator_masterVolume,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftHandObject,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightHandObject,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftHandRoot,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightHandRoot,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftJointMaps,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightJointMaps,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_leftJointRotOffset,
HandMeshSurface_tC5D2363619A5969E39D8C9A44D392572F91E456B_CustomAttributesCacheGenerator_rightJointRotOffset,
JointMap_tCEC1674D0AC1373CD1630729F0EBE75F01E7E1BF_CustomAttributesCacheGenerator_Transform,
HandSurface_t72171E13A0450FF56543EEB133611ADF4B984E0B_CustomAttributesCacheGenerator_handJoints,
HandSurface_t72171E13A0450FF56543EEB133611ADF4B984E0B_CustomAttributesCacheGenerator_handJointRigidBodies,
HandSurface_t72171E13A0450FF56543EEB133611ADF4B984E0B_CustomAttributesCacheGenerator_handJointColliders,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_chunks,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_initialImpulseForce,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_fingerForceDist,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_fingerPushForce,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_innerCollider,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_heatIncreaseSpeed,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_heatDecreaseSpeed,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_heatColor,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_fingertipHeatColor,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_baseColor,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_minTimeBetweenImpacts,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_impactClips,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_volumeCurve,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_lavaBubbles,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_bubbleDistance,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_spawnOdds,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_bubbleCheckRadius,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_chunkLayer,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_lavaMat,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_scrollSpeed,
Lava_tF6316393678D825EADEC50B5D75853F6860AFC6E_CustomAttributesCacheGenerator_impactParticles,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_U3COnCollisionU3Ek__BackingField,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_U3CSubmergedAmountU3Ek__BackingField,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_gravityTarget,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_particles,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_particlesPrefab,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_lineRenderer,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point1Particles,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point2Particles,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point1,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_point2,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_jitter,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_maxLightIntensity,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_noiseScale,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_noiseSpeed,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_minWidth,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_maxWidth,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_widthCurve,
Arc_t2B4E1B1C88B008A960144A6D0D00F1D7C6126D0F_CustomAttributesCacheGenerator_boltTextures,
FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_fingerAudio,
FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_jitterCurve,
FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_point1Light,
FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_U3CPoint1SampleIndexU3Ek__BackingField,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_sampler,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_surfaceArcs,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerArcs,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerArcSources,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_randomSurfaceArcChange,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_randomFingerArcChange,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerEngageDistance,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerRandomPosRadius,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_fingerDisengageDistance,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_glowGradient,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_coreRenderer,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_glowSpeed,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_intensityCurve,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_flickerCurve,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_buzzAudioPitch,
Lightning_t6B53C81AC1252F8CE25F605493E192B1D4CC2F39_CustomAttributesCacheGenerator_buzzAudio,
SurfaceArc_tF31396A7883E415ECFC1C8E01ECAD9CD9DB25792_CustomAttributesCacheGenerator_gravityCurve,
SurfaceArc_tF31396A7883E415ECFC1C8E01ECAD9CD9DB25792_CustomAttributesCacheGenerator_gravityResetCurve,
SurfaceArc_tF31396A7883E415ECFC1C8E01ECAD9CD9DB25792_CustomAttributesCacheGenerator_arcEscapeStrength,
LoadFirstScene_tB15D9B41665EB1A9BC1BB9B1A563C5458D6FBE7C_CustomAttributesCacheGenerator_contentName,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_mesh,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_numPointsToSample,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapResX,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapResY,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapUvTest,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_dispMapTriIndexTest,
MeshSampler_t295914DFF5598E80034DCDA62AB2368DAE057DD7_CustomAttributesCacheGenerator_uvChannel,
Tutorial_t00E576E62CB1B76A4CEB914E180C4F6F2CC63BF3_CustomAttributesCacheGenerator_holdUpPalmText,
Tutorial_t00E576E62CB1B76A4CEB914E180C4F6F2CC63BF3_CustomAttributesCacheGenerator_menu,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CChunkImpactIntensityU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CFingerImpactIntensityU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3COnImpactU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CLastOtherColliderU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CLastImpactIntensityU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CLastImpactTypeU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_U3CRadiusU3Ek__BackingField,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_impactAudio,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_volumePrefab,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_centralParticles,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0Core,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0Surface,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_coreRadius,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0RadiusMin,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen0RadiusMax,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen1Count,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen1RadiusMin,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen1RadiusMax,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen2Count,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen2RadiusMin,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen2RadiusMax,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen3Count,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen3RadiusMin,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_gen3RadiusMax,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionColor,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_linePrefab,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionGradientGen1,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionGradientGen2,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_connectionGradientGen3,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_driftIntensity,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_driftScale,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_driftTimeScale,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_seekForce,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_impactClips,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_fingerImpactClip,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_impactVolume,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_fingerImpactGradient,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_volumeImpactGradient,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_chunkImpactFadeTime,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_fingerImpactFadeTime,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_baseFingerColor,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_drawConnections,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_minImpactParticleIntensity,
Volume_tFDE94869302B57FFCE74AC2F1C013FC0AE95C9AE_CustomAttributesCacheGenerator_impactParticles,
Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_audio,
Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_domeRenderer,
Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_burstRenderer,
Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_coneRenderer,
Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_soundWaveRenderer,
Note_tAD11671700697604C063CE3D92BF2B8EBC5775F7_CustomAttributesCacheGenerator_animator,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_notesTransforms,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_notes,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_notePrefab,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_noteParent,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_noteData,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_pressedGradient,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releasedGradient,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_pressedPosCurve,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releasedPosCurve,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_pressedOffset,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releasedOffset,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_releaseAnimationDuration,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_timeBetweenNoteReleases,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_emissiveColorName,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_emissiveColorNameBurst,
Xylophone_t15D31B5D9D7453A5AD76D4E751286A7C8C226C01_CustomAttributesCacheGenerator_albedorColorName,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_defaultOffset,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_maxRepositionDistance,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_useSpatialUnderstanding,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_moveIncrement,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_timeOut,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_spatialAwarenessMask,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_zOffset,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_rotate,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scale,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scaleCurve,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_rotateSpeed,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scaleSpeed,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_rotateOffset,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_scaleOffset,
Billboard_tAC69CF54C2D2C8006AAB30B36C97891FB11F0F65_CustomAttributesCacheGenerator_randomScaleOffset,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_fingerForce,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleDriftSpeed,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleReturnSpeed,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleTransform,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubble,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_controller,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_enterBubbleClips,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_touchBubbleCurve,
Bubble_tD9D9B5E0EF32C4BA113EA178A0A32810EC952486_CustomAttributesCacheGenerator_bubbleTouchParticles,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_RadiusMultiplier,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_TurbulenceMultiplier,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_TurbulenceSpeed,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Transparency,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Gaze,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Highlight,
BubbleController_t8253B7CC736DD545ECE98461E827AEA3AFD04A9D_CustomAttributesCacheGenerator_Freeze,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_U3COnEnterBubbleU3Ek__BackingField,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_U3COnExitBubbleU3Ek__BackingField,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radius,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radiusMultiplier,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_useVertexNoise,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_useVertexColors,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_defaultVertexColor,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_meshFilter,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_meshRenderer,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_recursionLevel,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_normalAngle,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_atomicForceCurve,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radialForceCurve,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbleForceCurve,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_atomicForceMultiplier,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radialForceMultiplier,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbleForceMultiplier,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_radialForceInertia,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_atomicForceInertia,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbleForceInertia,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_turbulenceMultiplier,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_turbulenceSpeed,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_turbulenceScale,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_innerBubbles,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_minInnerBubbleRadius,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_solidity,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_drawForces,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_forceDrawSkipInterval,
BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_drawTrails,
BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trailProps,
BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trails,
BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trailBubbleInertia,
BubbleTrails_t2E856ABE6A1305972275D648E663D0CDCDD65AA8_CustomAttributesCacheGenerator_trailBubbleForceMultiplier,
ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator_repeatInterval,
ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator_repeatBlendTime,
ShaderTimeUpdater_tCB7A8603C6CD97D649387059C0322AD0C36DE24F_CustomAttributesCacheGenerator_repeatBlendCurve,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_U3CActivatedOnceU3Ek__BackingField,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_animationTarget,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_openCurve,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_closeCurve,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_disableDistance,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_U3CTargetPositionU3Ek__BackingField,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_U3CExplodedPositionU3Ek__BackingField,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_asteroidRenderer,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_hoverLight,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_trailTargetTime,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_rotationSpeed,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_hoverLightExplosionColor,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_hoverLightNormalColor,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_growthCurve,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_audioSource,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_impactClip,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_respawnClip,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_impactVolume,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_respawnVolume,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_despawnedMaterial,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_spawnedMaterial,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_neutralParticles,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_winterParticles,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_summerParticles,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_emissionRate,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_neutralEmissionCurve,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_winterEmissionCurve,
GrowbieParticles_t75FB8B250BBDA87A3475D1A4E2666A121B088D4B_CustomAttributesCacheGenerator_summerEmissionCurve,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_Season,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_ChangeSpeed,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_influenceCenter,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_winterGrowbies,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_neutralGrowbies,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_summerGrowbies,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_winterGrowthCurve,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_neutralGrowthCurve,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_summerGrowthCurve,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_winterClips,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_summerClips,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_audioSource,
GrowbieSeasons_t950534ACFA36C2231F15DB91935EB5064670582F_CustomAttributesCacheGenerator_volumeMultiplier,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_U3CIsDirtyU3Ek__BackingField,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_Growth,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_growthRandomness,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_growthJitter,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_growthScaleMultiplier,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_corkScrewAmount,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_corkscrewJitter,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_corkscrewAxis,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_seed,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_xAxisScale,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_yAxisScale,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_zAxisScale,
ButtonLoadContentScene_tB11760A90E304E539FCB6692CE04B04A9DA119E6_CustomAttributesCacheGenerator_ButtonLoadContentScene_U3CLoadContentU3Eb__5_0_m0F2BAB71C442DA2D6DD2175FA2F624413388AEA3,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_Ephemeral_UpdateWispsTask_m6394F82B466F3D9C7A5C8C4B86D557B9A6AE04A3,
Ephemeral_t92AB7EAE5C2E7D8ED914E17A58FB9CC2117255A5_CustomAttributesCacheGenerator_Ephemeral_UpdateWisps_m07B2A1316E992F0C63DE9164CFDE0A991940571C,
U3CUpdateWispsTaskU3Ed__59_tD02A9C79285C9925DF565090B545A7533139D5E3_CustomAttributesCacheGenerator_U3CUpdateWispsTaskU3Ed__59_SetStateMachine_mF28B0A6C88891567ED86C4A0214C1E0B3BE12A30,
U3CUpdateWispsU3Ed__66_t9B924AC665FDA18DB76B472F5FDFF6FD45CF45A9_CustomAttributesCacheGenerator_U3CUpdateWispsU3Ed__66_SetStateMachine_m418F25120B4C81FA7CE82086B2A6CBC48237D287,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_get_Initialized_m8BCDDB4DF79FBFA9051F901D8701830BA8739FA4,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_set_Initialized_m468F44FAA1F96A6E5422A0A8123D4895E4329D4B,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_get_SurfacePosition_mF548C1A7C23931BC08953F30F9227B6265140028,
FingerSurface_t5E68C52AF4D5D94C9B95DCBB8A31672B2E011C21_CustomAttributesCacheGenerator_FingerSurface_set_SurfacePosition_m1ED8F1CEEBA5BC94A4A2AFDEC15789CCC480D5E2,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_Goop_UpdateBlorbsLoop_m986AFC428EF64DB53EC5976F8BF9E8CBBC48E415,
Goop_t8741962FF5D05169A8C0927E6362E6C5B3F05F47_CustomAttributesCacheGenerator_Goop_UpdateBlorbs_mABD7F7D7F1A0B432F4FD89D33896F0AADDE82D0A,
U3CUpdateBlorbsLoopU3Ed__58_t01AD4077C07F2E5FBCD547BCF01C199EA8A6DE62_CustomAttributesCacheGenerator_U3CUpdateBlorbsLoopU3Ed__58_SetStateMachine_m0AD947925371163FB699FEAB47B3860A98A38222,
U3CUpdateBlorbsU3Ed__59_t7C83DFEA42433323662D1E49915D62A60C67D07B_CustomAttributesCacheGenerator_U3CUpdateBlorbsU3Ed__59_SetStateMachine_mC0A06B4D05DD9C12B90C278C353AB2DDC3BEB13A,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_get_OnCollision_mD08DBDB130307B7476EE0048AA1FFA5D09C63E56,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_set_OnCollision_m81FA4F0500DD9C2430CFEF95463FF07F9875F661,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_get_SubmergedAmount_mE70C23EA381F4A29EE98CD18417041DA5691FFFF,
LavaChunk_t7945C6A24CC9DA90E66462FC75209524D94D0759_CustomAttributesCacheGenerator_LavaChunk_set_SubmergedAmount_m3198E1F1B5D613F134A0A1E1326CFAAC9D204A55,
FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_FingerArc_get_Point1SampleIndex_mD059D02CE72FF48BC3C2CA82E407BA4B6AC86961,
FingerArc_t7D7126A2D8F210911C884E421AB742A5CB025131_CustomAttributesCacheGenerator_FingerArc_set_Point1SampleIndex_mCC2A0AC52480743A3E885AA86B978ADA556ADD15,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_ChunkImpactIntensity_m1807D63C5B630D450B3E2AEA29AEB5A1E8FDACE2,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_ChunkImpactIntensity_m927159F8F8B2FD7FC95FB03F58B8F57921010FAB,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_FingerImpactIntensity_m1CE7563DEEAB831F2C036A4DFFBC11633B9BB7B3,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_FingerImpactIntensity_m220556FA6D06D229B034F68B2989B2334639F973,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_OnImpact_mE14A44BE107C2E33241E312F948D20131BF6C860,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_OnImpact_m6422199BF7D8E1D4E0A54A7FE2AB6D6B5F72385A,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_LastOtherCollider_m2520C1755860A6DD8492BB447C3BF4C7F9EE75EE,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_LastOtherCollider_mA41C25E5C29C769AA31E61E6A206C99761FCE55B,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_LastImpactIntensity_m1DD1F66AB5B866394039424880BD2B378DDC6DDF,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_LastImpactIntensity_mF69C6DD25806A0693390F08B708922DDE2D81766,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_LastImpactType_m8FC0B9188E2B96205BF90677F63604DE47F79FF7,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_LastImpactType_mB778B2D8B59D0ACD1CF5AA6C22FC0E0ACED9C5E9,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_get_Radius_m5705FDA4CE6B0711DD0DC0CBD6AFC799B1BA2E04,
ChunkImpacts_tB59C9E34B4576CCB866AC2D06CEF3A7DA8D438EE_CustomAttributesCacheGenerator_ChunkImpacts_set_Radius_mD01BBBEB17A03805057D50AB3804A10556E8CF6C,
SurfacePlacement_t35A298C9B4CDA8A63D6B83A1A487896E0501FA65_CustomAttributesCacheGenerator_SurfacePlacement_PlaceNewSurface_m47ED70EFEA4C987DCBC1C592096F26A955649D30,
U3CPlaceNewSurfaceU3Ed__14_t5F8C7ACBE6604140064D6DA6F94C6395BC55B693_CustomAttributesCacheGenerator_U3CPlaceNewSurfaceU3Ed__14_SetStateMachine_m615B0FC5AC8486760391A9390B0CA1950CDBED30,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_get_OnEnterBubble_mEBAAF8051AF84AD702109C8DB043CBC54C631535,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_set_OnEnterBubble_mC594F6A0CED6CE8CDF9ED0D0BDE82DCB89D819D3,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_get_OnExitBubble_m5AB5A4AF0C1CC2CF076F46389E87A9BF08730FEE,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_set_OnExitBubble_mF4AF58A854FA5F7455E5EE4BB8287A38234A9DB2,
BubbleSimple_t3C427985AECCD3D888AA2F905DC5705F3D188FC6_CustomAttributesCacheGenerator_BubbleSimple_UpdateBubbleAsync_mDAAA6DA5F82218CE51E52EFBDF394DA10C479C13,
U3CUpdateBubbleAsyncU3Ed__85_tCAB394B6D7A8ACCB602C35712CB0487CFF941C6B_CustomAttributesCacheGenerator_U3CUpdateBubbleAsyncU3Ed__85_SetStateMachine_m4EC7E00BED36B10F0784AD5438EA19DC94E1E7EB,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_ContextualHandMenu_get_ActivatedOnce_mCDD4C36FFEFB15172240B6C5FD5B6107D9B18268,
ContextualHandMenu_t759A2D8933D90C156119BC05B6F115D426C128F5_CustomAttributesCacheGenerator_ContextualHandMenu_set_ActivatedOnce_m62012EFA052D5827C098DCD179B984C23FA3CB6D,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_get_TargetPosition_m78214B3808F7828BD598FF785EBDD855654E7690,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_set_TargetPosition_m45C00CD43AE53FAFD099F9E6B1CFA1309C2A1571,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_get_ExplodedPosition_m1692B2FBC824BF23849E1556D6C68B94E4B09667,
FlockAsteroid_t6030769D069F2D9FB65348863141CC98A6525F4B_CustomAttributesCacheGenerator_FlockAsteroid_set_ExplodedPosition_m8F5C92828EF2D194FBCC878FD55C700E2E539381,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_Growbies_get_IsDirty_mDA93F1481DFD6E98300EC8FC674563380667DFB0,
Growbies_tA55C49930F25BC15862295D5DFE1C24FE0A786C8_CustomAttributesCacheGenerator_Growbies_set_IsDirty_m065549E573178808FA04A00AE1F31F618DF1B5AC,
AssemblyU2DCSharp_CustomAttributesCacheGenerator,
};
IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void RuntimeCompatibilityAttribute_set_WrapNonExceptionThrows_m8562196F90F3EBCEC23B5708EE0332842883C490_inline (RuntimeCompatibilityAttribute_tFF99AB2963098F9CBCD47A20D9FD3D51C17C1C80 * __this, bool ___value0, const RuntimeMethod* method)
{
{
bool L_0 = ___value0;
__this->set_m_wrapNonExceptionThrows_0(L_0);
return;
}
}
| 59.911542
| 381
| 0.896959
|
JBrentJ
|
a6f14a7d1edc2fc844996ba02934d8967a12f826
| 1,373
|
hpp
|
C++
|
threadpool.hpp
|
wangAlpha/SimpleDB
|
0b37bd6a2481b266fc894d82d410759c39d06a72
|
[
"MIT"
] | 8
|
2020-03-10T09:19:54.000Z
|
2021-12-03T08:51:04.000Z
|
threadpool.hpp
|
wangAlpha/SimpleDB
|
0b37bd6a2481b266fc894d82d410759c39d06a72
|
[
"MIT"
] | null | null | null |
threadpool.hpp
|
wangAlpha/SimpleDB
|
0b37bd6a2481b266fc894d82d410759c39d06a72
|
[
"MIT"
] | 1
|
2021-12-03T08:51:06.000Z
|
2021-12-03T08:51:06.000Z
|
#pragma once
#include "core.hpp"
// 线程池
class ThreadPool {
public:
explicit ThreadPool(size_t const thread_count)
: data_(std::make_shared<data>()) {
for (size_t i = 0; i < thread_count; ++i) {
std::thread([data = data_] {
std::unique_lock<std::mutex> lock(data->mutex_);
for (;;) {
if (!data->tasks_.empty()) {
auto task = std::move(data->tasks_.front());
data->tasks_.pop();
lock.unlock();
task();
lock.lock();
} else if (data->is_shutdown_) {
break;
} else {
data->cond_.wait(lock);
}
}
})
.detach();
}
}
ThreadPool() = default;
ThreadPool(ThreadPool&&) = default;
~ThreadPool() {
if (bool(data_)) {
{
std::lock_guard<std::mutex> lock(data_->mutex_);
data_->is_shutdown_ = true;
}
data_->cond_.notify_all();
}
}
// 任务提交
template <class Fn>
void execute(Fn&& task) {
{
std::lock_guard<std::mutex> lock(data_->mutex_);
data_->tasks_.emplace(std::forward<Fn>(task));
}
data_->cond_.notify_one();
}
private:
struct data {
std::mutex mutex_;
std::condition_variable cond_;
bool is_shutdown_ = false;
std::queue<std::function<void()> > tasks_;
};
std::shared_ptr<data> data_;
};
| 22.883333
| 56
| 0.529497
|
wangAlpha
|
a6f905302c83c84fad7f0df79783718e0125ab77
| 4,498
|
tpp
|
C++
|
Turtle/src.tpp/Upp_TurtleServer_en-us.tpp
|
mirek-fidler/Turtle
|
fd413460c3d92c9a85fc620f6f3db50d96f3be2f
|
[
"BSD-2-Clause"
] | 2
|
2021-01-07T20:30:16.000Z
|
2021-02-11T21:33:07.000Z
|
Turtle/src.tpp/Upp_TurtleServer_en-us.tpp
|
mirek-fidler/Turtle
|
fd413460c3d92c9a85fc620f6f3db50d96f3be2f
|
[
"BSD-2-Clause"
] | null | null | null |
Turtle/src.tpp/Upp_TurtleServer_en-us.tpp
|
mirek-fidler/Turtle
|
fd413460c3d92c9a85fc620f6f3db50d96f3be2f
|
[
"BSD-2-Clause"
] | null | null | null |
topic "TurtleServer";
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
[l288;2 $$2,2#27521748481378242620020725143825:desc]
[0 $$3,0#96390100711032703541132217272105:end]
[H6;0 $$4,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
[b42;2 $$9,9#13035079074754324216151401829390:normal]
[2 $$0,0#00000000000000000000000000000000:Default]
[{_}
[ {{10000@(113.42.0) [s0;%% [*@7;4 TurtleServer]]}}&]
[s2; &]
[s1;:Upp`:`:TurtleServer`:`:class: [@(0.0.255)3 class][3 _][*3 TurtleServer][3 _:_][@(0.0.255)3 p
ublic][3 _][*@3;3 VirtualGui]&]
[s2;#%% This class implements a remote gui virtualization server
for U`+`+ applications. By utilizing the modern web technologies
such as HTML`-5 canvas and websockets, TurtleServer allows U`+`+
gui applications to be accessed remotely via modern web browsers,
or, possibly, via specialized client software that understands
the Turtle wire protocol.&]
[s3;%% &]
[ {{10000F(128)G(128)@1 [s0;%% [* Public Method List]]}}&]
[s3; &]
[s5;:Upp`:`:TurtleServer`:`:Bind`(const Upp`:`:String`&`): [_^Upp`:`:TurtleServer^ Turt
leServer][@(0.0.255) `&]_[* Bind]([@(0.0.255) const]_[_^Upp`:`:String^ String][@(0.0.255) `&
]_[*@3 addr])&]
[s2;%% Sets the server bind address to [%-*@3 addr]. Default is `"0.0.0.0`".
Returns `*this for method chaining.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:Host`(const Upp`:`:String`&`): [_^Upp`:`:TurtleServer^ Turt
leServer][@(0.0.255) `&]_[* Host]([@(0.0.255) const]_[_^Upp`:`:String^ String][@(0.0.255) `&
]_[*@3 host])&]
[s2;%% Sets the host URL to [%-*@3 host]. Default URL is `"localhost`".
Returns `*this for method chaining.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:HtmlPort`(int`): [_^Upp`:`:TurtleServer^ TurtleServer][@(0.0.255) `&
]_[* HtmlPort]([@(0.0.255) int]_[*@3 port])&]
[s2;%% Sets the connection port number for serving the html file.
Default is 8888. Returns `*this for method chaining.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:WsPort`(int`): [_^Upp`:`:TurtleServer^ TurtleServer][@(0.0.255) `&
]_[* WsPort]([@(0.0.255) int]_[*@3 port])&]
[s2;%% Sets the connection port number for websocket connection.
Default is 8887. Returns `*this for method chaining.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:MaxConnections`(int`): [_^Upp`:`:TurtleServer^ TurtleServer
][@(0.0.255) `&]_[* MaxConnections]([@(0.0.255) int]_[*@3 limit])&]
[s2;%% Sets a limit to the maximum number of concurrent client conntections.
Default max. connection limit is 100. Returns `*this for method
chaining.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:DebugMode`(bool`): [@(0.0.255) static]
[@(0.0.255) void]_[* DebugMode]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
[s6;%% POSIX only&]
[s2;%% If true, the server will not spawn child processes (no forking).
Useful for debugging purposes.&]
[s3;%% &]
[ {{10000F(128)G(128)@1 [s0;%% [* Constructor detail]]}}&]
[s3; &]
[s5;:Upp`:`:TurtleServer`:`:TurtleServer`(`): [* TurtleServer]()&]
[s2;%% Default constructor. Initializes the server bind address to
`"0.0.0.0`", the host URL to `"localhost`", and the connection
port number to 8888.&]
[s3; &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:TurtleServer`(const Upp`:`:String`&`,int`): [* TurtleServer
]([@(0.0.255) const]_[_^Upp`:`:String^ String][@(0.0.255) `&]_[*@3 host],
[@(0.0.255) int]_[*@3 port])&]
[s2;%% Constructor overload. Initializes the host URL and the connection
port number to provided values.&]
[s3;%% &]
[s4; &]
[s5;:Upp`:`:TurtleServer`:`:TurtleServer`(const Upp`:`:String`&`,Upp`:`:String`&`,int`): [* T
urtleServer]([@(0.0.255) const]_[_^Upp`:`:String^ String][@(0.0.255) `&]_[*@3 ip],
[_^Upp`:`:String^ String][@(0.0.255) `&]_[*@3 host], [@(0.0.255) int]_[*@3 port])&]
[s2;%% Constructor overload. Initializes the server bind adrress,
the host URL and the connection port number to provided values.&]
[s3;%% &]
[ {{10000F(128)G(128)@1 [s0;%% [* Function List]]}}&]
[s3;%% &]
[s5;:Upp`:`:RunTurtleGui`(Upp`:`:TurtleServer`&`,Upp`:`:Event`<`>`): [@(0.0.255) void]_
[* RunTurtleGui]([_^Upp`:`:TurtleServer^ TurtleServer][@(0.0.255) `&]_[*@3 gui],
[_^Upp`:`:Event^ Event]<>_[*@3 app`_main])&]
[s2;%% Starts the Turtle GUI virtualization server and runs a U`+`+
GUI application over it.&]
[s3;%% &]
[s0;%% ]]
| 47.851064
| 97
| 0.644731
|
mirek-fidler
|
a6fab4381de05117acc1f8055187147dc739c4b2
| 16,310
|
cpp
|
C++
|
src/bin2llvmir/analyses/reaching_definitions.cpp
|
bambooeric/retdec
|
faa531edfcc2030221856232b30a794f5dbcc503
|
[
"MIT",
"Zlib",
"BSD-3-Clause"
] | 1
|
2020-08-29T21:43:47.000Z
|
2020-08-29T21:43:47.000Z
|
src/bin2llvmir/analyses/reaching_definitions.cpp
|
bambooeric/retdec
|
faa531edfcc2030221856232b30a794f5dbcc503
|
[
"MIT",
"Zlib",
"BSD-3-Clause"
] | null | null | null |
src/bin2llvmir/analyses/reaching_definitions.cpp
|
bambooeric/retdec
|
faa531edfcc2030221856232b30a794f5dbcc503
|
[
"MIT",
"Zlib",
"BSD-3-Clause"
] | null | null | null |
/**
* @file src/bin2llvmir/analyses/reaching_definitions.cpp
* @brief Reaching definitions analysis builds UD and DU chains.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <iomanip>
#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <llvm/ADT/PostOrderIterator.h>
#include <llvm/IR/CFG.h>
#include <llvm/IR/Instruction.h>
#include <llvm/IR/Instructions.h>
#include <llvm/Support/raw_ostream.h>
#include "retdec/utils/time.h"
#include "retdec/bin2llvmir/analyses/reaching_definitions.h"
#include "retdec/bin2llvmir/providers/asm_instruction.h"
#include "retdec/bin2llvmir/providers/names.h"
#define debug_enabled false
#include "retdec/bin2llvmir/utils/llvm.h"
using namespace retdec::utils;
using namespace llvm;
namespace retdec {
namespace bin2llvmir {
//
//=============================================================================
// ReachingDefinitionsAnalysis
//=============================================================================
//
bool ReachingDefinitionsAnalysis::runOnModule(
Module& M,
Abi* abi,
bool trackFlagRegs)
{
_trackFlagRegs = trackFlagRegs;
_abi = abi;
_specialGlobal = AsmInstruction::getLlvmToAsmGlobalVariable(&M);
clear();
initializeBasicBlocks(M);
run();
_run = true;
return false;
}
bool ReachingDefinitionsAnalysis::runOnFunction(
llvm::Function& F,
Abi* abi,
bool trackFlagRegs)
{
_trackFlagRegs = trackFlagRegs;
_abi = abi;
_specialGlobal = AsmInstruction::getLlvmToAsmGlobalVariable(F.getParent());
clear();
initializeBasicBlocks(F);
run();
_run = true;
return false;
}
void ReachingDefinitionsAnalysis::run()
{
initializeBasicBlocksPrev();
initializeKillGenSets();
propagate();
initializeDefsAndUses();
LOG << *this << "\n";
clearInternal();
}
void ReachingDefinitionsAnalysis::initializeBasicBlocks(llvm::Module& M)
{
for (Function& F : M)
{
initializeBasicBlocks(F);
}
}
void ReachingDefinitionsAnalysis::initializeBasicBlocks(llvm::Function& F)
{
for (BasicBlock& B : F)
{
BasicBlockEntry bbe(&B);
int insnPos = -1;
for (Instruction& I : B)
{
++insnPos;
if (auto* l = dyn_cast<LoadInst>(&I))
{
if (!isa<GlobalVariable>(l->getPointerOperand())
&& !isa<AllocaInst>(l->getPointerOperand()))
{
continue;
}
if (!_trackFlagRegs
&& _abi
&& _abi->isFlagRegister(l->getPointerOperand()))
{
continue;
}
bbe.uses.push_back(Use(l, l->getPointerOperand(), insnPos));
}
else if (auto* p2i = dyn_cast<PtrToIntInst>(&I))
{
if (!isa<GlobalVariable>(p2i->getPointerOperand())
&& !isa<AllocaInst>(p2i->getPointerOperand()))
{
continue;
}
if (!_trackFlagRegs
&& _abi
&& _abi->isFlagRegister(p2i->getPointerOperand()))
{
continue;
}
bbe.uses.push_back(Use(p2i, p2i->getPointerOperand(), insnPos));
}
else if (auto* gep = dyn_cast<GetElementPtrInst>(&I))
{
if (!isa<GlobalVariable>(gep->getPointerOperand())
&& !isa<AllocaInst>(gep->getPointerOperand()))
{
continue;
}
if (!_trackFlagRegs
&& _abi
&& _abi->isFlagRegister(gep->getPointerOperand()))
{
continue;
}
bbe.uses.push_back(Use(gep, gep->getPointerOperand(), insnPos));
}
else if (auto* s = dyn_cast<StoreInst>(&I))
{
if (!isa<GlobalVariable>(s->getPointerOperand())
&& !isa<AllocaInst>(s->getPointerOperand()))
{
continue;
}
if (!_trackFlagRegs
&& _abi
&& _abi->isFlagRegister(s->getPointerOperand()))
{
continue;
}
if (I.getOperand(1) == _specialGlobal)
{
continue;
}
bbe.defs.push_back(Definition(s, s->getPointerOperand(), insnPos));
}
else if (auto* a = dyn_cast<AllocaInst>(&I))
{
bbe.defs.push_back(Definition(a, a, insnPos));
}
else if (auto* call = dyn_cast<CallInst>(&I))
{
unsigned args = call->getNumArgOperands();
for (unsigned i=0; i<args; ++i)
{
Value *a = call->getArgOperand(i);
if (!_trackFlagRegs
&& _abi
&& _abi->isFlagRegister(a))
{
continue;
}
if (isa<AllocaInst>(a) || isa<GlobalVariable>(a))
{
bbe.uses.push_back(Use(call, a, insnPos));
}
}
// TODO - can allocated object be read in function call?
// is this ok?
}
else
{
// Maybe, there are other users or definitions.
}
}
bbMap[&F][&B] = bbe;
}
}
void ReachingDefinitionsAnalysis::clear()
{
bbMap.clear();
_run = false;
}
bool ReachingDefinitionsAnalysis::wasRun() const
{
return _run;
}
/**
* Clear internal structures used to compute RDA, but not needed to use it once
* it is computed.
*/
void ReachingDefinitionsAnalysis::clearInternal()
{
for (auto& pair1 : bbMap)
for (auto& pair : pair1.second)
{
BasicBlockEntry& bb = pair.second;
bb.defsOut.clear();
bb.genDefs.clear();
bb.killDefs.clear();
}
}
void ReachingDefinitionsAnalysis::initializeBasicBlocksPrev()
{
for (auto &pair1 : bbMap)
for (auto& pair : pair1.second)
{
auto B = pair.first;
auto &entry = pair.second;
for (auto PI = pred_begin(B), E = pred_end(B); PI != E; ++PI)
{
auto* pred = *PI;
auto p = pair1.second.find(pred);
assert(p != pair1.second.end() && "we should have all BBs stored in bbMap");
entry.prevBBs.insert( &p->second );
}
}
}
void ReachingDefinitionsAnalysis::initializeKillGenSets()
{
for (auto &pair1 : bbMap)
for (auto& pair : pair1.second)
{
pair.second.initializeKillDefSets();
}
}
void ReachingDefinitionsAnalysis::propagate()
{
for (auto &pair1 : bbMap)
{
const Function* fnc = pair1.first;
std::vector<BasicBlockEntry*> workList;
workList.reserve(pair1.second.size());
ReversePostOrderTraversal<const Function*> RPOT(fnc); // Expensive to create
for (auto I = RPOT.begin(); I != RPOT.end(); ++I)
{
const BasicBlock* bb = *I;
auto fIt = pair1.second.find(bb);
assert(fIt != pair1.second.end());
workList.push_back(&(fIt->second));
fIt->second.changed = true;
}
bool changed = true;
while (changed)
{
changed = false;
for (auto* bbe : workList)
{
changed |= bbe->initDefsOut();
}
}
}
}
void ReachingDefinitionsAnalysis::initializeDefsAndUses()
{
for (auto &pair1 : bbMap)
for (auto& pair : pair1.second)
{
BasicBlockEntry &bb = pair.second;
for (Use &u : bb.uses)
{
for (auto dIt = bb.defs.rbegin(); dIt != bb.defs.rend(); ++dIt)
{
Definition &d = *dIt;
if (d.getSource() != u.src)
{
continue;
}
if (d.dominates(&u))
{
d.uses.insert(&u);
u.defs.insert(&d);
break;
}
}
if (u.defs.empty())
{
for (auto p : bb.prevBBs)
for (auto d : p->defsOut)
{
if (d->getSource() == u.src)
{
d->uses.insert(&u);
u.defs.insert(d);
}
}
}
}
}
}
const BasicBlockEntry& ReachingDefinitionsAnalysis::getBasicBlockEntry(
const Instruction* I) const
{
auto* F = I->getFunction();
auto pair1 = bbMap.find(F);
assert(pair1 != bbMap.end() && "we do not have this function in bbMap");
auto* BB = I->getParent();
auto pair = pair1->second.find(BB);
assert(pair != pair1->second.end() && "we do not have this basic block in bbMap");
return pair->second;
}
const DefSet& ReachingDefinitionsAnalysis::defsFromUse(const Instruction* I) const
{
return getBasicBlockEntry(I).defsFromUse(I);
}
const UseSet& ReachingDefinitionsAnalysis::usesFromDef(const Instruction* I) const
{
return getBasicBlockEntry(I).usesFromDef(I);
}
const Definition* ReachingDefinitionsAnalysis::getDef(const Instruction* I) const
{
return getBasicBlockEntry(I).getDef(I);
}
const Use* ReachingDefinitionsAnalysis::getUse(const Instruction* I) const
{
return getBasicBlockEntry(I).getUse(I);
}
std::ostream& operator<<(std::ostream& out, const ReachingDefinitionsAnalysis& rda)
{
for (auto &pair1 : rda.bbMap)
for (auto& pair : pair1.second)
{
out << pair.second;
}
return out;
}
//
//=============================================================================
// BasicBlockEntry
//=============================================================================
//
int BasicBlockEntry::newUID = 0;
BasicBlockEntry::BasicBlockEntry(const llvm::BasicBlock* b) :
bb(b),
id(newUID++)
{
}
void BasicBlockEntry::initializeKillDefSets()
{
killDefs.clear();
genDefs.clear();
for (auto dIt = defs.rbegin(); dIt != defs.rend(); ++dIt)
{
Definition& d = *dIt;
bool added = (killDefs.insert(d.getSource())).second;
if (added)
{
genDefs.insert(&d);
}
}
}
/**
* REACH_in[B] = Sum (p in pred[B]) (REACH_out[p])
* REACH_out[B] = GEN[B] + ( REACH_in[B] - KILL[B] )
*/
Changed BasicBlockEntry::initDefsOut()
{
auto oldSz = defsOut.size();
if (defsOut.empty() && !genDefs.empty())
{
defsOut = std::move(genDefs);
}
for (auto* p : prevBBs)
{
if (p->changed)
{
for (auto* d : p->defsOut)
{
if (killDefs.find(d->getSource()) == killDefs.end())
{
defsOut.insert(d);
}
}
}
}
changed = oldSz != defsOut.size();
return changed;
}
std::string BasicBlockEntry::getName() const
{
std::stringstream out;
std::string name = bb->getName().str();
if (name.empty())
out << names::generatedBasicBlockPrefix << id;
else
out << name;
return out.str();
}
const DefSet& BasicBlockEntry::defsFromUse(const Instruction* I) const
{
static DefSet emptyDefSet;
auto* u = getUse(I);
return u ? u->defs : emptyDefSet;
}
const UseSet& BasicBlockEntry::usesFromDef(const Instruction* I) const
{
static UseSet emptyUseSet;
auto* d = getDef(I);
return d ? d->uses : emptyUseSet;
}
const Definition* BasicBlockEntry::getDef(const Instruction* I) const
{
auto dIt = find(
defs.begin(),
defs.end(),
Definition(const_cast<Instruction*>(I), nullptr, 0));
return dIt != defs.end() ? &(*dIt) : nullptr;
}
const Use* BasicBlockEntry::getUse(const Instruction* I) const
{
auto uIt = find(
uses.begin(),
uses.end(),
Use(const_cast<Instruction*>(I), nullptr, 0));
return uIt != uses.end() ? &(*uIt) : nullptr;
}
std::ostream& operator<<(std::ostream& out, const BasicBlockEntry& bbe)
{
out << "Basic Block = " << bbe.getName() << "\n";
out << "\n\tPrev:\n";
for (auto prev : bbe.prevBBs)
{
out << "\t\t" << prev->getName() << "\n";
}
out << "\n\tDef:\n";
for (auto d : bbe.defs)
{
out << "\t\t" << llvmObjToString(d.def) << "\n";
for (auto u : d.uses)
out << "\t\t\t" << llvmObjToString(u->use) << "\n";
}
out << "\n\tUses:\n";
for (auto u : bbe.uses)
{
out << "\t\t" << llvmObjToString(u.use) << "\n";
for (auto d : u.defs)
out << "\t\t\t" << llvmObjToString(d->def) << "\n";
}
out << "\n";
return out;
}
//
//=============================================================================
// Definition
//=============================================================================
//
Definition::Definition(llvm::Instruction* d, llvm::Value* s, unsigned bbPos) :
def(d),
src(s),
posInBb(bbPos)
{
}
bool Definition::operator==(const Definition& o) const
{
return def == o.def;
}
llvm::Value* Definition::getSource()
{
return src;
}
/**
* Convenience method so that we don't have to check integer positions.
* However, this does not check that the given @a use is indeed an use of this
* definition - users of this method must make sure that it is.
*/
bool Definition::dominates(const Use* use) const
{
return def->getParent() == use->use->getParent() && posInBb < use->posInBb;
}
//
//=============================================================================
// Use
//=============================================================================
//
Use::Use(llvm::Instruction* u, llvm::Value* s, unsigned bbPos) :
use(u),
src(s),
posInBb(bbPos)
{
}
bool Use::operator==(const Use& o) const
{
return use == o.use;
}
bool Use::isUndef() const
{
for (auto* d : defs)
{
if (isa<AllocaInst>(d->def) || isa<GlobalVariable>(d->def))
{
return true;
}
}
return false;
}
//
//=============================================================================
// On-demand methods.
//=============================================================================
//
/**
* Find the last definition of value \p v in basic block \p bb.
* If \p start is defined (not \c nullptr), start the reverse iteration search
* from this instruction, otherwise start from the basic block's back.
* \return Instruction defining \p v (at most one definition is possible in BB),
* or \c nullptr if definition not found.
*/
llvm::Instruction* defInBasicBlock(
llvm::Value* v,
llvm::BasicBlock* bb,
llvm::Instruction* start = nullptr)
{
auto* prev = start;
if (prev == nullptr && !bb->empty())
{
prev = &bb->back();
}
while (prev)
{
if (auto* s = dyn_cast<StoreInst>(prev))
{
if (s->getPointerOperand() == v)
{
return s;
}
}
else if (prev == v) // AllocaInst
{
return prev;
}
prev = prev->getPrevNode();
}
return nullptr;
}
/**
* Find all uses of value \p v in basic block \p bb and add them to \p uses.
* If \p start is defined (not \c nullptr), start the iteration search from
* this instruction, otherwise start from the basic block's front.
* \return \c True if the basic block kills the value, \p false otherwise.
*/
bool usesInBasicBlock(
llvm::Value* v,
llvm::BasicBlock* bb,
std::set<llvm::Instruction*>& uses,
llvm::Instruction* start = nullptr)
{
auto* next = start;
if (next == nullptr && !bb->empty())
{
next = &bb->front();
}
while (next)
{
if (auto* s = dyn_cast<StoreInst>(next))
{
if (s->getPointerOperand() == v)
{
return true;
}
}
for (auto& op : next->operands())
{
if (op == v)
{
uses.insert(next);
}
}
next = next->getNextNode();
}
return false;
}
std::set<llvm::Instruction*> ReachingDefinitionsAnalysis::defsFromUse_onDemand(
llvm::Instruction* I)
{
std::set<llvm::Instruction*> ret;
auto* l = dyn_cast<LoadInst>(I);
if (l == nullptr)
{
return ret;
}
if (!isa<GlobalVariable>(l->getPointerOperand())
&& !isa<AllocaInst>(l->getPointerOperand()))
{
return ret;
}
// Try to find in the same basic block.
//
if (auto* d = defInBasicBlock(l->getPointerOperand(), l->getParent(), l))
{
ret.insert(d);
return ret;
}
std::set<llvm::BasicBlock*> searchedBbs;
std::vector<llvm::BasicBlock*> worklistBbs;
auto preds = predecessors(l->getParent());
std::copy(preds.begin(), preds.end(), std::back_inserter(worklistBbs));
// Try to find in all predecessing basic blocks.
//
while (!worklistBbs.empty())
{
auto* bb = worklistBbs.back();
worklistBbs.pop_back();
searchedBbs.insert(bb);
if (auto* d = defInBasicBlock(l->getPointerOperand(), bb))
{
ret.insert(d);
// Definition found -> predecessors not added.
}
else
{
// No definition found -> add predecessors.
for (auto* p : predecessors(bb))
{
if (searchedBbs.count(p) == 0)
{
worklistBbs.push_back(p);
}
}
}
}
return ret;
}
std::set<llvm::Instruction*> ReachingDefinitionsAnalysis::usesFromDef_onDemand(
llvm::Instruction* I)
{
std::set<llvm::Instruction*> ret;
Value* val = nullptr;
if (auto* s = dyn_cast<StoreInst>(I))
{
val = s->getPointerOperand();
}
else if (auto* a = dyn_cast<AllocaInst>(I))
{
val = a;
}
if (val == nullptr || !(isa<GlobalVariable>(val) || isa<AllocaInst>(val)))
{
return ret;
}
// Try to find in the same basic block.
//
if (usesInBasicBlock(val, I->getParent(), ret, I->getNextNode()))
{
return ret;
}
std::set<llvm::BasicBlock*> searchedBbs;
std::vector<llvm::BasicBlock*> worklistBbs;
auto succs = successors(I->getParent());
std::copy(succs.begin(), succs.end(), std::back_inserter(worklistBbs));
// Try to find in all predecessing basic blocks.
//
while (!worklistBbs.empty())
{
auto* bb = worklistBbs.back();
worklistBbs.pop_back();
searchedBbs.insert(bb);
if (usesInBasicBlock(val, bb, ret))
{
// BB kills value -> successors not added.
}
else
{
// BB does not kill value -> add successors.
for (auto* p : successors(bb))
{
if (searchedBbs.count(p) == 0)
{
worklistBbs.push_back(p);
}
}
}
}
return ret;
}
} // namespace bin2llvmir
} // namespace retdec
| 20.593434
| 83
| 0.605886
|
bambooeric
|
4700e412fc67c47b1dddda0183a03d6f35c0a14d
| 1,730
|
cpp
|
C++
|
leetcode/problems/easy/1886-determine-whether-matrix-can-be-obtained-by-rotation.cpp
|
wingkwong/competitive-programming
|
e8bf7aa32e87b3a020b63acac20e740728764649
|
[
"MIT"
] | 18
|
2020-08-27T05:27:50.000Z
|
2022-03-08T02:56:48.000Z
|
leetcode/problems/easy/1886-determine-whether-matrix-can-be-obtained-by-rotation.cpp
|
wingkwong/competitive-programming
|
e8bf7aa32e87b3a020b63acac20e740728764649
|
[
"MIT"
] | null | null | null |
leetcode/problems/easy/1886-determine-whether-matrix-can-be-obtained-by-rotation.cpp
|
wingkwong/competitive-programming
|
e8bf7aa32e87b3a020b63acac20e740728764649
|
[
"MIT"
] | 1
|
2020-10-13T05:23:58.000Z
|
2020-10-13T05:23:58.000Z
|
/*
Determine Whether Matrix Can Be Obtained By Rotation
https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/
Given two n x n binary matrices mat and target, return true if it is possible to make mat equal to target by rotating mat in 90-degree increments, or false otherwise.
Example 1:
Input: mat = [[0,1],[1,0]], target = [[1,0],[0,1]]
Output: true
Explanation: We can rotate mat 90 degrees clockwise to make mat equal target.
Example 2:
Input: mat = [[0,1],[1,1]], target = [[1,0],[0,1]]
Output: false
Explanation: It is impossible to make mat equal to target by rotating mat.
Example 3:
Input: mat = [[0,0,0],[0,1,0],[1,1,1]], target = [[1,1,1],[0,1,0],[0,0,0]]
Output: true
Explanation: We can rotate mat 90 degrees clockwise two times to make mat equal target.
Constraints:
n == mat.length == target.length
n == mat[i].length == target[i].length
1 <= n <= 10
mat[i][j] and target[i][j] are either 0 or 1.
*/
class Solution {
public:
vector<vector<int>> rotate(vector<vector<int>>& mat) {
int n = mat.size();
for(int i = 0; i < n / 2; i++) {
for(int j = i; j < n - i - 1; j++) {
int x = mat[i][j];
mat[i][j] = mat[j][n - 1 - i];
mat[j][n - 1 - i] = mat[n - 1 - i][n - 1 - j];
mat[n - 1 - i][n - 1 - j] = mat[n - 1 - j][i];
mat[n - 1 - j][i] = x;
}
}
return mat;
}
bool findRotation(vector<vector<int>>& mat, vector<vector<int>>& target) {
for(int i = 0; i < 4; i++) {
vector<vector<int>> rotated_mat = rotate(mat);
if(rotated_mat == target) return true;
}
return false;
}
};
| 28.833333
| 166
| 0.558382
|
wingkwong
|
47017aa7672e04bfe6042463eb8d3c51ccec6ced
| 2,340
|
cpp
|
C++
|
topcoder/srm/src/SRM648/AB.cpp
|
Johniel/contests
|
b692eff913c20e2c1eb4ff0ce3cd4c57900594e0
|
[
"Unlicense"
] | null | null | null |
topcoder/srm/src/SRM648/AB.cpp
|
Johniel/contests
|
b692eff913c20e2c1eb4ff0ce3cd4c57900594e0
|
[
"Unlicense"
] | 19
|
2016-05-04T02:46:31.000Z
|
2021-11-27T06:18:33.000Z
|
topcoder/srm/src/SRM648/AB.cpp
|
Johniel/contests
|
b692eff913c20e2c1eb4ff0ce3cd4c57900594e0
|
[
"Unlicense"
] | null | null | null |
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
int f(string s)
{
int sum = 0;
for (int i = 0; i < s.size(); ++i) {
for (int j = i + 1; j < s.size(); ++j) {
sum += (s[i] == 'A' && s[j] == 'B');
}
}
return sum;
}
string bt(string s, int idx, const int K)
{
if (idx == s.size()) {
return f(s) == K ? s : "";
}
string t = s;
t[idx] = 'A';
int m = f(t);
if (m == K) return t;
return m <= K ? bt(t, idx + 1, K) : bt(s, idx + 1, K);
}
class AB {
public:
string createString(int N, int K)
{
string t = bt(string(N, 'B'), 0, K);
return f(t) == K ? t : "";
}
// BEGIN CUT HERE
public:
void run_test(int Case) { if ((Case == -1) || (Case == 0)) test_case_0(); if ((Case == -1) || (Case == 1)) test_case_1(); if ((Case == -1) || (Case == 2)) test_case_2(); if ((Case == -1) || (Case == 3)) test_case_3(); }
private:
template <typename T> string print_array(const vector<T> &V) { ostringstream os; os << "{ "; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << '\"' << *iter << "\","; os << " }"; return os.str(); }
void verify_case(int Case, const string &Expected, const string &Received) { cerr << "Test Case #" << Case << "..."; if (Expected == Received) cerr << "PASSED" << endl; else { cerr << "FAILED" << endl; cerr << "\tExpected: \"" << Expected << '\"' << endl; cerr << "\tReceived: \"" << Received << '\"' << endl; } }
void test_case_0() { int Arg0 = 3; int Arg1 = 2; string Arg2 = "ABB"; verify_case(0, Arg2, createString(Arg0, Arg1)); }
void test_case_1() { int Arg0 = 2; int Arg1 = 0; string Arg2 = "BA"; verify_case(1, Arg2, createString(Arg0, Arg1)); }
void test_case_2() { int Arg0 = 5; int Arg1 = 8; string Arg2 = ""; verify_case(2, Arg2, createString(Arg0, Arg1)); }
void test_case_3() { int Arg0 = 10; int Arg1 = 12; string Arg2 = "BAABBABAAB"; verify_case(3, Arg2, createString(Arg0, Arg1)); }
// END CUT HERE
};
// BEGIN CUT HERE
int main() {
AB ___test;
___test.run_test(-1);
for (int i = 1; i <= 50; ++i) {
cout << i << endl;
for (int j = 0; j <= 50; ++j) {
cout << j << ' ' << ___test.createString(i, j) << endl;
}
}
}
// END CUT HERE
| 32.054795
| 314
| 0.550427
|
Johniel
|
4707e2afe1cc405c8596ef711d31ec93dfcae69f
| 549
|
hh
|
C++
|
src/nn/src/include/dataset.hh
|
juliia5m/knu_voice
|
1f5d150ded23af4c152b8d20f1ab4ecec77b40e1
|
[
"Apache-2.0"
] | 717
|
2015-01-03T15:25:46.000Z
|
2022-03-30T12:45:45.000Z
|
src/nn/src/include/dataset.hh
|
juliia5m/knu_voice
|
1f5d150ded23af4c152b8d20f1ab4ecec77b40e1
|
[
"Apache-2.0"
] | 91
|
2015-03-19T09:25:23.000Z
|
2021-05-19T08:51:26.000Z
|
src/nn/src/include/dataset.hh
|
juliia5m/knu_voice
|
1f5d150ded23af4c152b8d20f1ab4ecec77b40e1
|
[
"Apache-2.0"
] | 315
|
2015-01-21T00:06:00.000Z
|
2022-03-29T08:13:36.000Z
|
/*
* $File: dataset.hh
* $Date: Sun Sep 08 08:47:09 2013 +0800
* $Author: Xinyu Zhou <zxytim[at]gmail[dot]com>
*/
#pragma once
#include "type.hh"
#include <vector>
typedef std::vector<std::pair<int, real_t> > Instance;
typedef std::vector<Instance> Dataset;
typedef std::vector<Instance *> RefDataset;
typedef std::vector<const Instance *> ConstRefDataset;
typedef std::vector<int> Labels;
typedef std::vector<real_t> RealLabels;
typedef std::vector<real_t> Vector;
/**
* vim: syntax=cpp11 foldmethod=marker
*/
| 21.115385
| 56
| 0.679417
|
juliia5m
|
470b9a04555479a3863c18af99b1010e5cd5b023
| 4,643
|
cpp
|
C++
|
uwsim_resources/uwsim_osgocean/src/osgOcean/WaterTrochoids.cpp
|
epsilonorion/usv_lsa_sim_copy
|
d189f172dc1d265b7688c7dc8375a65ac4a9c048
|
[
"Apache-2.0"
] | 1
|
2020-11-30T09:55:33.000Z
|
2020-11-30T09:55:33.000Z
|
uwsim_resources/uwsim_osgocean/src/osgOcean/WaterTrochoids.cpp
|
epsilonorion/usv_lsa_sim_copy
|
d189f172dc1d265b7688c7dc8375a65ac4a9c048
|
[
"Apache-2.0"
] | null | null | null |
uwsim_resources/uwsim_osgocean/src/osgOcean/WaterTrochoids.cpp
|
epsilonorion/usv_lsa_sim_copy
|
d189f172dc1d265b7688c7dc8375a65ac4a9c048
|
[
"Apache-2.0"
] | 2
|
2020-11-21T19:50:54.000Z
|
2020-12-27T09:35:29.000Z
|
/*
* This source file is part of the osgOcean library
*
* Copyright (C) 2009 Kim Bale
* Copyright (C) 2009 The University of Hull, UK
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3 of the License, or (at your option) any later
* version.
* 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 Lesser General Public License for more details.
* http://www.gnu.org/copyleft/lesser.txt.
*/
#include <osgOcean/WaterTrochoids>
using namespace osgOcean;
WaterTrochoids::WaterTrochoids(void)
:_amplitude (0.1f)
,_amplitudeMul (0.5f)
,_lambda0 (14.0f)
,_lambdaMul (1.2f)
,_direction (1.00f)
,_angleDev (0.2f)
{
}
WaterTrochoids::WaterTrochoids( float amplitude,
float amplitudeMul,
float baseWavelen,
float wavelenMul,
float direction,
float angleDev )
:_amplitude (amplitude)
,_amplitudeMul (amplitudeMul)
,_lambda0 (baseWavelen)
,_lambdaMul (wavelenMul)
,_direction (direction)
,_angleDev (angleDev)
{
}
WaterTrochoids::WaterTrochoids( const WaterTrochoids& copy )
:_amplitude (copy._amplitude)
,_amplitudeMul (copy._amplitudeMul)
,_lambda0 (copy._lambda0)
,_lambdaMul (copy._lambdaMul)
,_direction (copy._direction)
,_angleDev (copy._angleDev)
,_waves (copy._waves)
{
}
WaterTrochoids::~WaterTrochoids(void)
{
}
void WaterTrochoids::updateWaves(float time)
{
for (std::vector<Wave>::iterator wave = _waves.begin();
wave != _waves.end();
++wave )
{
wave->phase = wave->w*time+wave->phi0;
}
}
void WaterTrochoids::createWaves(void)
{
const float wavesDirX = cos(_direction);
const float wavesDirY = sin(_direction);
_waves.resize(NUM_WAVES);
float A = 1.0f;
float lambda = _lambda0;
for (int i = 0; i < NUM_WAVES; i++)
{
// Randomly rotate the wave around a main direction
float rads = _angleDev * nextRandomDouble(-1,1);
float rx = cos(rads);
float ry = sin(rads);
// Initialize wave vector
float k = 2.f*osg::PI/lambda;
_waves[i].kx = k*(wavesDirX * rx + wavesDirY * ry);
_waves[i].ky = k*(wavesDirX * -ry + wavesDirY * rx);
_waves[i].kmod = k;
// Initialize the wave amplitude
_waves[i].A = A*_amplitude;
_waves[i].Ainvk = _waves[i].A/_waves[i].kmod;
// Initialize the wave frequency, using a standard formula
_waves[i].w = sqrt(9.8f*k);
// Initialize the wave initial phase
_waves[i].phi0 = nextRandomDouble(0, osg::PI*2.f);
// Move to next wave
lambda *= _lambdaMul;
A *= _amplitudeMul;
}
}
void WaterTrochoids::packWaves(osg::FloatArray* constants) const
{
constants->resize( _waves.size() * 5);
unsigned int ptr = 0;
unsigned int itr = _waves.size()/4;
for(unsigned i = 0, j = 0; i < itr; i++, j += 4)
{
// kx
(*constants)[ptr+0] = _waves[j+0].kx;
(*constants)[ptr+1] = _waves[j+1].kx;
(*constants)[ptr+2] = _waves[j+2].kx;
(*constants)[ptr+3] = _waves[j+3].kx;
ptr += 4;
// ky
(*constants)[ptr+0] = _waves[j+0].ky;
(*constants)[ptr+1] = _waves[j+1].ky;
(*constants)[ptr+2] = _waves[j+2].ky;
(*constants)[ptr+3] = _waves[j+3].ky;
ptr += 4;
// amplitude / k
(*constants)[ptr+0] = _waves[j+0].Ainvk;
(*constants)[ptr+1] = _waves[j+1].Ainvk;
(*constants)[ptr+2] = _waves[j+2].Ainvk;
(*constants)[ptr+3] = _waves[j+3].Ainvk;
ptr += 4;
// amplitude
(*constants)[ptr+0] = _waves[j+0].A;
(*constants)[ptr+1] = _waves[j+1].A;
(*constants)[ptr+2] = _waves[j+2].A;
(*constants)[ptr+3] = _waves[j+3].A;
ptr += 4;
// phase
(*constants)[ptr+0] = _waves[j+0].phase;
(*constants)[ptr+1] = _waves[j+1].phase;
(*constants)[ptr+2] = _waves[j+2].phase;
(*constants)[ptr+3] = _waves[j+3].phase;
ptr += 4;
}
}
| 30.546053
| 88
| 0.556752
|
epsilonorion
|
470bc8fa13523b710f85f15f6066282fa08b5b52
| 11,105
|
cpp
|
C++
|
test/audioplayertest.cpp
|
p-edelman/Transcribe
|
efa36298c48522d2fc25db4f26ae192fdbef1e23
|
[
"Apache-2.0"
] | 2
|
2017-07-28T17:08:57.000Z
|
2017-12-16T10:09:30.000Z
|
test/audioplayertest.cpp
|
p-edelman/Transcribe
|
efa36298c48522d2fc25db4f26ae192fdbef1e23
|
[
"Apache-2.0"
] | 1
|
2017-08-19T10:42:08.000Z
|
2017-10-08T14:46:34.000Z
|
test/audioplayertest.cpp
|
p-edelman/Transcribe
|
efa36298c48522d2fc25db4f26ae192fdbef1e23
|
[
"Apache-2.0"
] | null | null | null |
#include "audioplayertest.h"
AudioPlayerTest::AudioPlayerTest() {
m_noise_file = QString(SRCDIR);
m_noise_file += "files/noise.wav";
m_silence_file = QString(SRCDIR);
m_silence_file += "files/silence.wav";
m_player = new AudioPlayer();
m_player->openFile(m_noise_file);
}
void AudioPlayerTest::init() {
// Stop the audio playback
m_player->togglePlayPause(false);
// Reset the audio position to start of stream
m_player->setPosition(0);
}
/** Test the initialization of the AudioPlayer. */
void AudioPlayerTest::initAudioPlayer() {
AudioPlayer player;
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
QCOMPARE((int)player.getDuration(), 0);
QCOMPARE((int)player.getPosition(), 0);
QCOMPARE(player.getFilePath(), QString(""));
}
/** Test loading of a simple wav file. This should result in the raising of one
* or more durationChanged() signals and a positive result from getDuration().
*/
void AudioPlayerTest::loadFile() {
AudioPlayer player;
QSignalSpy duration_spy(&player, SIGNAL(durationChanged()));
QSignalSpy error_spy(&player, SIGNAL(error(const QString&)));
player.openFile(m_noise_file);
QTest::qWait(200);
QVERIFY(duration_spy.count() > 0);
QCOMPARE(error_spy.count(), 0);
QCOMPARE((int)player.getDuration(), 6);
QCOMPARE(player.getFilePath(), m_noise_file);
}
/** When loading an empty file, the error() signal should be emitted. */
void AudioPlayerTest::loadErrorneousFile() {
AudioPlayer player;
QSignalSpy spy(&player, SIGNAL(error(const QString&)));
QString empty_file = QString(SRCDIR);
empty_file += "files/empty.wav";
player.openFile(empty_file);
QTest::qWait(200);
QCOMPARE(spy.count(), 1);
QList<QVariant> signal = spy.takeFirst();
QVERIFY(signal.at(0).toString().startsWith("The audio file can't be loaded."));
// We shouldn't be able to play the audio
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
player.togglePlayPause(true);
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
QCOMPARE(player.getFilePath(), empty_file); // Even when the file fails to
// load, the file name should be
// reported.
}
/** We should be able to load a different file. After loading, we should be in
* the PAUSED state. */
void AudioPlayerTest::loadDifferentFile() {
AudioPlayer player;
QSignalSpy spy(&player, SIGNAL(durationChanged()));
// Open the first audio file
player.openFile(m_noise_file);
QTest::qWait(200);
QVERIFY(spy.count() > 0); // durationChanged should have been emitted
QCOMPARE((int)player.getDuration(), 6); // noise.wav has a duration of 6 seconds
QCOMPARE(player.getState(), // We should be initalized in paused state
AudioPlayer::PAUSED);
QCOMPARE(player.getFilePath(), m_noise_file);
player.togglePlayPause(true);
QCOMPARE(player.getState(), AudioPlayer::PLAYING);
// Open alternative audio file
int num_signals = spy.count();
player.openFile(m_silence_file);
QTest::qWait(200);
QVERIFY(spy.count() > num_signals); // durationChanged should have been emitted
QCOMPARE((int)player.getDuration(), 7); // silence.wav has a duration of 7 seconds
QCOMPARE(player.getState(), // We should be initalized in paused state
AudioPlayer::PAUSED);
QCOMPARE(player.getFilePath(), m_silence_file);
}
/** Test if we can toggle between PLAYING and PAUSED state without setting the
* desired state explicitely (the strict sense of 'toggle') */
void AudioPlayerTest::togglePlayPause() {
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
m_player->togglePlayPause();
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
m_player->togglePlayPause();
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
}
/** Test if we can toggle between PLAYING and PAUSED state by setting the
* desired state explicitely (the strict sense of 'toggle') */
void AudioPlayerTest::togglePlayPauseWithArgument() {
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
m_player->togglePlayPause(true);
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
m_player->togglePlayPause(false);
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
}
/** Test if we can toggle between PLAYING and WAITING state. */
void AudioPlayerTest::toggleWaiting() {
m_player->togglePlayPause(true);
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
m_player->toggleWaiting(true);
QCOMPARE(m_player->getState(), AudioPlayer::WAITING);
m_player->toggleWaiting(false);
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
}
/** Test if the positionChangedSignal is emitted during playback and if the
* position is reported correctly. */
void AudioPlayerTest::positionChangedSignal() {
QSignalSpy spy(m_player, SIGNAL(positionChanged()));
m_player->togglePlayPause(true);
QTest::qWait(100);
int num_signals = spy.count();
QVERIFY(num_signals > 1); // At least one signal because of play start
// Play for 1100 ms. This should emit exactly one signal since the 'starting
// signals'
QTest::qWait(1100);
QCOMPARE(spy.count(), num_signals + 1); // Position changed signal
m_player->togglePlayPause(false);
QCOMPARE(spy.count(), num_signals + 2); // Signal because of play stop
QCOMPARE((int)m_player->getPosition(), 1); // Position should be at 1 second
}
/** Test for seeking and position changed signal changed signal. */
void AudioPlayerTest::seek() {
// We can't reuse the general AudioPlayer here, because it relies on this
// functionality to work correctly. So we need to create a separate instance.
AudioPlayer player;
player.openFile(m_noise_file);
QTest::qWait(200);
QSignalSpy spy(&player, SIGNAL(positionChanged()));
player.togglePlayPause(true);
// Seek forward
int num_signals = spy.count();
player.skipSeconds(4);
QVERIFY(spy.count() > num_signals);
QCOMPARE((int)player.getPosition(), 4);
// Seek backward
num_signals = spy.count();
player.skipSeconds(-2);
QVERIFY(spy.count() > num_signals);
QCOMPARE((int)player.getPosition(), 2);
// Make sure we can't seek before beginning
num_signals = spy.count();
player.skipSeconds(-10);
QVERIFY(spy.count() > num_signals);
QCOMPARE((int)player.getPosition(), 0);
// Make sure we can't seek past the end
num_signals = spy.count();
player.skipSeconds(20);
QVERIFY(spy.count() > num_signals);
QCOMPARE((int)player.getPosition(), 6);
QTest::qWait(200);
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
player.togglePlayPause(false);
}
/** Test for setting the audio position explicitely. */
void AudioPlayerTest::setPosition() {
QCOMPARE((int)m_player->getPosition(), 0);
m_player->setPosition(3);
QCOMPARE((int)m_player->getPosition(), 3);
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
// Make sure we can't set negative time
m_player->setPosition(-1);
QVERIFY(m_player->getPosition() == 0);
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
// Make sure we can't set time past the end
m_player->setPosition(100);
QCOMPARE((int)m_player->getPosition(), 6);
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
// --- Now do the same while playing
m_player->togglePlayPause(true);
m_player->setPosition(0);
QCOMPARE((int)m_player->getPosition(), 0);
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
m_player->setPosition(3);
QCOMPARE((int)m_player->getPosition(), 3);
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
// Make sure we can't set negative time
m_player->setPosition(-1);
QVERIFY(m_player->getPosition() == 0);
QCOMPARE(m_player->getState(), AudioPlayer::PLAYING);
// Make sure we can't set time past the end
m_player->setPosition(100);
QTest::qWait(100);
QCOMPARE((int)m_player->getPosition(), 6);
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
// Make sure we don't resume playing because just because of the seeking
m_player->setPosition(3);
QVERIFY(m_player->getPosition() == 3);
QCOMPARE(m_player->getState(), AudioPlayer::PAUSED);
}
/** Test if durations and positions are properly rounded to whole seconds. */
void AudioPlayerTest::timeRounding() {
// Our test file takes 5.8 seconds, which should round the result to 6
QCOMPARE((int)m_player->getDuration(), 6);
// Load the silence file, which takes 7.0 seconds and should be rounded to 7
AudioPlayer player;
player.openFile(m_silence_file);
QTest::qWait(200);
QCOMPARE((int)player.getDuration(), 7);
// Make sure we're rounded to the nearest number of seconds in our position
m_player->togglePlayPause(true);
QTest::qWait(600);
m_player->togglePlayPause(false);
QCOMPARE((int)m_player->getPosition(), 1);
m_player->togglePlayPause(true);
QTest::qWait(600);
m_player->togglePlayPause(false);
QCOMPARE((int)m_player->getPosition(), 1);
m_player->togglePlayPause(true);
QTest::qWait(600);
m_player->togglePlayPause(false);
QCOMPARE((int)m_player->getPosition(), 2);
}
/** Test for the accepted state transmissions.
* This method re-tests some of the functionality previously verified. We
* still keep the different tests though, as they aim for different concepts
* which we now have out there in the open. */
void AudioPlayerTest::stateTransitions() {
// We can't reuse the general AudioPlayer here, because it relies on this
// functionality to work correctly. So we need to create a separate instance.
AudioPlayer player;
player.openFile(m_noise_file);
QTest::qWait(200);
QSignalSpy spy(&player, SIGNAL(stateChanged()));
// paused -> playing: ok
player.togglePlayPause(true);
QCOMPARE(player.getState(), AudioPlayer::PLAYING);
QCOMPARE(spy.count(), 1);
// playing -> playing: ok
player.togglePlayPause(true);
QCOMPARE(player.getState(), AudioPlayer::PLAYING);
QCOMPARE(spy.count(), 1); // No signal emitted
// playing -> waiting: ok
player.toggleWaiting(true);
QCOMPARE(player.getState(), AudioPlayer::WAITING);
QCOMPARE(spy.count(), 2);
// waiting -> waiting: ok
player.toggleWaiting(true);
QCOMPARE(player.getState(), AudioPlayer::WAITING);
QCOMPARE(spy.count(), 2); // No signal emitted
// waiting -> playing: ok
player.toggleWaiting(false);
QCOMPARE(player.getState(), AudioPlayer::PLAYING);
QCOMPARE(spy.count(), 3);
// playing -> paused: ok
player.togglePlayPause(false);
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
QCOMPARE(spy.count(), 4);
// paused -> paused: ok
player.togglePlayPause(false);
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
QCOMPARE(spy.count(), 4); // No signal emitted
// paused -> waiting: fail
player.toggleWaiting(true);
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
QCOMPARE(spy.count(), 4); // No signal emitted
// waiting -> paused: ok
player.togglePlayPause(true);
player.toggleWaiting(true);
QCOMPARE(spy.count(), 6);
QCOMPARE(player.getState(), AudioPlayer::WAITING);
player.togglePlayPause(false);
QCOMPARE(player.getState(), AudioPlayer::PAUSED);
QCOMPARE(spy.count(), 7);
}
| 33.753799
| 85
| 0.711121
|
p-edelman
|
470c8ee4b934bb2b70623fc622a9a7c999e71882
| 1,716
|
cpp
|
C++
|
default.cpp
|
LucasGMeneses/OpenGL_labs
|
ddf753c29cc2fcb07cd0ad04b16f03958b8e452f
|
[
"MIT"
] | null | null | null |
default.cpp
|
LucasGMeneses/OpenGL_labs
|
ddf753c29cc2fcb07cd0ad04b16f03958b8e452f
|
[
"MIT"
] | null | null | null |
default.cpp
|
LucasGMeneses/OpenGL_labs
|
ddf753c29cc2fcb07cd0ad04b16f03958b8e452f
|
[
"MIT"
] | 1
|
2020-11-24T16:27:14.000Z
|
2020-11-24T16:27:14.000Z
|
/*
* To compile with windows -lfreeglut -lglu32 -lopengl32
* To compile linux -lglut -lGL -lGLU -lm
*/
#include <GL/freeglut.h> // ou glut.h - GLUT, include glu.h and gl.h
#include <math.h>
#include <stdio.h>
/* Initialize OpenGL Graphics */
void init() {
// Set "clearing" or background color
glClearColor(0, 0, 0, 1); // Black and opaque
}
/* Handler for window-repaint event. Call back when the window first appears and
whenever the window needs to be re-painted. */
void display() {
glClear(GL_COLOR_BUFFER_BIT); // Clear the color buffer (background)
//draw objects//
glFlush(); // Render now
}
/* Handler for window re-size event. Called back when the window first appears and
whenever the window is re-sized with its new width and height */
void reshape(GLsizei width, GLsizei height) { // GLsizei for non-negative integer
// Compute aspect ratio of the new window
}
/* Main function: GLUT runs as a console application starting at main() */
int main(int argc, char** argv) {
glutInit(&argc, argv); // Initialize GLUT
glutInitWindowSize(480, 480); // Set the window's initial width & height - non-square
glutInitWindowPosition(50, 50); // Position the window's initial top-left corner
glutCreateWindow("Window"); // Create window with the given title
glutDisplayFunc(display); // Register callback handler for window re-paint event
glutIdleFunc(display);
glutReshapeFunc(reshape); // Register callback handler for window re-size event
init(); // Our own OpenGL initialization
glutMainLoop(); // Enter the infinite event-processing loop
return 0;
}
| 35.75
| 90
| 0.67366
|
LucasGMeneses
|
4710910ee61020d26beefb3ffa8bf298b31fbecf
| 18,273
|
cpp
|
C++
|
euchar/cppbinding/curve.cpp
|
gbeltramo/euchar
|
3852a0800f078b26c125b83e28465ec66212cbec
|
[
"MIT"
] | null | null | null |
euchar/cppbinding/curve.cpp
|
gbeltramo/euchar
|
3852a0800f078b26c125b83e28465ec66212cbec
|
[
"MIT"
] | null | null | null |
euchar/cppbinding/curve.cpp
|
gbeltramo/euchar
|
3852a0800f078b26c125b83e28465ec66212cbec
|
[
"MIT"
] | null | null | null |
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <numeric> // std::partial_sum, std::iota
#include <algorithm> // std::copy, std::lower_bound
using namespace std;
//================================================
int sum_bool_2d(vector<vector<bool>> matrix)
{
size_t numI = matrix.size();
size_t numJ = matrix[0].size();
int total = 0;
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
if (matrix[i][j] == true)
total += 1;
}
}
return total;
}
//================================================
vector<vector<int>> pad_2d(const vector<vector<int>> &image, int M)
{
size_t numI = image.size();
size_t numJ = image[0].size();
vector<vector<int>> padded(numI+2, vector<int>(numJ+2, M));
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
padded[i+1][j+1] = image[i][j];
}
}
return padded;
}
//================================================
vector<vector<bool>> threshold_image_2d(const vector<vector<int>> &image, int value)
{
size_t numI = image.size();
size_t numJ = image[0].size();
vector<vector<bool>> binary_thresh(numI, vector<bool>(numJ, false));
// Loop over all pixel in original image
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
if (image[i][j] <= value)
{
binary_thresh[i][j] = true;
}
}
}
return binary_thresh;
}
//================================================
vector<vector<bool>> elementwise_AND_2d(const vector<vector<bool>> &image1, const vector<vector<bool>> &image2)
{
size_t numI = image1.size();
size_t numJ = image1[0].size();
vector<vector<bool>> result(numI, vector<bool>(numJ, false));
// Loop over all pixel in original image
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
if (image1[i][j] == true && image2[i][j] == true) {
result[i][j] = true;
}
}
}
return result;
}
//================================================
vector<vector<int>> neigh_pixel_2d(const vector<vector<int>> &padded, size_t i , size_t j)
{
vector<vector<int>> neigh_3_3(3, vector<int>(3, 0));
neigh_3_3[0][0] = padded[i-1][j-1];
neigh_3_3[1][0] = padded[i][j-1];
neigh_3_3[2][0] = padded[i+1][j-1];
neigh_3_3[0][1] = padded[i-1][j];
neigh_3_3[1][1] = padded[i][j];
neigh_3_3[2][1] = padded[i+1][j];
neigh_3_3[0][2] = padded[i-1][j+1];
neigh_3_3[1][2] = padded[i][j+1];
neigh_3_3[2][2] = padded[i+1][j+1];
return neigh_3_3;
}
//================================================
vector<vector<bool>> binary_neigh_pixel_2d(const vector<vector<int>> &padded, size_t i , size_t j , int pixel_value)
{
vector<vector<int>> neigh_3_3 = neigh_pixel_2d(padded, i, j);
vector<vector<bool>> binary_neigh_3_3(3, vector<bool>(3, false));
for (size_t i = 0; i < 3; ++i) {
for (size_t j = 0; j < 3; ++j) {
// need to take account of order pixels
// strinct inequality after central pixel
size_t k = j + i*3;
if (k < 5) { // up to central pixel included
if (neigh_3_3[i][j] <= pixel_value)
binary_neigh_3_3[i][j] = true;
} else {
if (neigh_3_3[i][j] < pixel_value)
binary_neigh_3_3[i][j] = true;
}
}
}
return binary_neigh_3_3;
}
//================================================
int char_binary_image_2d(vector<vector<bool>> input)
{
// Input shape: binary image number of rows and columns
size_t numI = input.size();
size_t numJ = input[0].size();
// Matrices for vectices, horizontal edges and vertical edges
vector<vector<bool>> V(numI+1, vector<bool>(numJ+1, false));
vector<vector<bool>> Eh(numI+1, vector<bool>(numJ, false));
vector<vector<bool>> Ev(numI, vector<bool>(numJ+1, false));
// Loop over pixels to update V, Eh, Ev
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
if (input[i][j] == true) {
V[i][j] = true;
V[i+1][j] = true;
V[i][j+1] = true;
V[i+1][j+1] = true;
Eh[i][j] = true;
Eh[i+1][j] = true;
Ev[i][j] = true;
Ev[i][j+1] = true;
}
}
}
// Sum of elements in the matrices
int v = sum_bool_2d(V);
int eh = sum_bool_2d(Eh);
int ev = sum_bool_2d(Ev);
int f = sum_bool_2d(input);
int EC = v - eh - ev + f;
return EC;
}
//================================================
size_t number_from_neigh_2d(vector<vector<bool>> neigh)
{
const vector<size_t> powers_of_two = {1, 2, 4, 8, 0,
16, 32, 64, 128};
size_t num = 0;
for (size_t i = 0; i < 3; ++i) {
for (size_t j = 0; j < 3; ++j) {
if (neigh[i][j] == true) {
num |= powers_of_two[j+i*3];
}
}
}
return num;
}
//================================================
int sum_bool_3d(vector<vector<vector<bool>>> matrix)
{
size_t numI = matrix.size();
size_t numJ = matrix[0].size();
size_t numK = matrix[0][0].size();
int total = 0;
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
for (size_t k = 0; k < numK; ++k) {
if (matrix[i][j][k] == true)
total += 1;
}
}
}
return total;
}
//================================================
vector<vector<vector<int>>> pad_3d(const vector<vector<vector<int>>> &image, int M)
{
size_t numI = image.size();
size_t numJ = image[0].size();
size_t numK = image[0][0].size();
vector<vector<vector<int>>> padded(numI+2, vector<vector<int>>(numJ+2, vector<int>(numK+2, M)));
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
for (size_t k = 0; k < numK; ++k) {
padded[i+1][j+1][k+1] = image[i][j][k];
}
}
}
return padded;
}
//================================================
vector<vector<vector<bool>>> threshold_image_3d(const vector<vector<vector<int>>> &image, int value)
{
size_t numI = image.size();
size_t numJ = image[0].size();
size_t numK = image[0][0].size();
vector<vector<vector<bool>>> binary_thresh(numI, vector<vector<bool>>(numJ, vector<bool>(numK, false)));
// Loop over all pixel in original image
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
for (size_t k = 0; k < numK; ++k) {
if (image[i][j][k] <= value) {
binary_thresh[i][j][k] = true;
}
}
}
}
return binary_thresh;
}
//================================================
vector<vector<vector<bool>>> elementwise_AND_3d(const vector<vector<vector<bool>>> &image1, const vector<vector<vector<bool>>> &image2)
{
size_t numI = image1.size();
size_t numJ = image1[0].size();
size_t numK = image1[0][0].size();
vector<vector<vector<bool>>> result(numI, vector<vector<bool>>(numJ, vector<bool>(numK, false)));
// Loop over all pixel in original image
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
for (size_t k = 0; k < numK; ++k) {
if (image1[i][j][k] == true && image2[i][j][k] == true) {
result[i][j][k] = true;
}
}
}
}
return result;
}
//================================================
vector<vector<vector<int>>> neigh_voxel_3d(const vector<vector<vector<int>>> &padded, size_t i , size_t j , size_t k)
{
vector<vector<vector<int>>> neigh_3_3_3(3, vector<vector<int>>(3, vector<int>(3, 0)));
neigh_3_3_3[0][0][0] = padded[i-1][j-1][k-1];
neigh_3_3_3[1][0][0] = padded[i][j-1][k-1];
neigh_3_3_3[2][0][0] = padded[i+1][j-1][k-1];
neigh_3_3_3[0][1][0] = padded[i-1][j][k-1];
neigh_3_3_3[1][1][0] = padded[i][j][k-1];
neigh_3_3_3[2][1][0] = padded[i+1][j][k-1];
neigh_3_3_3[0][2][0] = padded[i-1][j+1][k-1];
neigh_3_3_3[1][2][0] = padded[i][j+1][k-1];
neigh_3_3_3[2][2][0] = padded[i+1][j+1][k-1];
neigh_3_3_3[0][0][1] = padded[i-1][j-1][k];
neigh_3_3_3[1][0][1] = padded[i][j-1][k];
neigh_3_3_3[2][0][1] = padded[i+1][j-1][k];
neigh_3_3_3[0][1][1] = padded[i-1][j][k];
neigh_3_3_3[1][1][1] = padded[i][j][k];
neigh_3_3_3[2][1][1] = padded[i+1][j][k];
neigh_3_3_3[0][2][1] = padded[i-1][j+1][k];
neigh_3_3_3[1][2][1] = padded[i][j+1][k];
neigh_3_3_3[2][2][1] = padded[i+1][j+1][k];
neigh_3_3_3[0][0][2] = padded[i-1][j-1][k+1];
neigh_3_3_3[1][0][2] = padded[i][j-1][k+1];
neigh_3_3_3[2][0][2] = padded[i+1][j-1][k+1];
neigh_3_3_3[0][1][2] = padded[i-1][j][k+1];
neigh_3_3_3[1][1][2] = padded[i][j][k+1];
neigh_3_3_3[2][1][2] = padded[i+1][j][k+1];
neigh_3_3_3[0][2][2] = padded[i-1][j+1][k+1];
neigh_3_3_3[1][2][2] = padded[i][j+1][k+1];
neigh_3_3_3[2][2][2] = padded[i+1][j+1][k+1];
return neigh_3_3_3;
}
//================================================
vector<vector<vector<bool>>> binary_neigh_voxel_3d(const vector<vector<vector<int>>> &padded, size_t i , size_t j , size_t k, int voxel_value)
{
vector<vector<vector<int>>> neigh_3_3_3 = neigh_voxel_3d(padded, i, j, k);
vector<vector<vector<bool>>> binary_neigh_3_3_3(3, vector<vector<bool>>(3, vector<bool>(3, false)));
for (size_t i = 0; i < 3; ++i) {
for (size_t j = 0; j < 3; ++j) {
for (size_t k = 0; k < 3; ++k) {
// need to take account of order pixels
// strinct inequality after central pixel
size_t s = k + j*3 + i*9;
if (s < 14) { // up to central pixel included
if (neigh_3_3_3[i][j][k] <= voxel_value)
binary_neigh_3_3_3[i][j][k] = true;
} else {
if (neigh_3_3_3[i][j][k] < voxel_value)
binary_neigh_3_3_3[i][j][k] = true;
}
}
}
}
return binary_neigh_3_3_3;
}
//================================================
int char_binary_image_3d(vector<vector<vector<bool>>> input)
{
size_t numI = input.size();
size_t numJ = input[0].size();
size_t numK = input[0][0].size();
vector<vector<vector<bool>>> V(numI+1, vector<vector<bool>>(numJ+1, vector<bool>(numK+1, false)));
vector<vector<vector<bool>>> Ei(numI, vector<vector<bool>>(numJ+1, vector<bool>(numK+1, false)));
vector<vector<vector<bool>>> Ej(numI+1, vector<vector<bool>>(numJ, vector<bool>(numK+1, false)));
vector<vector<vector<bool>>> Ek(numI+1, vector<vector<bool>>(numJ+1, vector<bool>(numK, false)));
vector<vector<vector<bool>>> Fij(numI, vector<vector<bool>>(numJ, vector<bool>(numK+1, false)));
vector<vector<vector<bool>>> Fik(numI, vector<vector<bool>>(numJ+1, vector<bool>(numK, false)));
vector<vector<vector<bool>>> Fjk(numI+1, vector<vector<bool>>(numJ, vector<bool>(numK, false)));
vector<vector<vector<bool>>> C(numI, vector<vector<bool>>(numJ, vector<bool>(numK, false)));
for (size_t i = 0; i < numI; ++i) {
for (size_t j = 0; j < numJ; ++j) {
for (size_t k = 0; k < numK; ++k) {
if (input[i][j][k] == true) {
V[i][j][k] = true;
V[i+1][j][k] = true;
V[i][j+1][k] = true;
V[i][j][k+1] = true;
V[i+1][j+1][k] = true;
V[i+1][j][k+1] = true;
V[i][j+1][k+1] = true;
V[i+1][j+1][k+1] = true;
Ei[i][j][k] = true;
Ei[i][j+1][k] = true;
Ei[i][j][k+1] = true;
Ei[i][j+1][k+1] = true;
Ej[i][j][k] = true;
Ej[i+1][j][k] = true;
Ej[i][j][k+1] = true;
Ej[i+1][j][k+1] = true;
Ek[i][j][k] = true;
Ek[i][j+1][k] = true;
Ek[i+1][j][k] = true;
Ek[i+1][j+1][k] = true;
Fij[i][j][k] = true;
Fij[i][j][k+1] = true;
Fik[i][j][k] = true;
Fik[i][j+1][k] = true;
Fjk[i][j][k] = true;
Fjk[i+1][j][k] = true;
C[i][j][k] = true;
}
}
}
}
int v = sum_bool_3d(V);
int ei = sum_bool_3d(Ei);
int ej = sum_bool_3d(Ej);
int ek = sum_bool_3d(Ek);
int fij = sum_bool_3d(Fij);
int fik = sum_bool_3d(Fik);
int fjk = sum_bool_3d(Fjk);
int c = sum_bool_3d(C);
int EC = v - ei - ej - ek + fij + fik + fjk - c;
return EC;
}
//================================================
size_t number_from_neigh_3d(vector<vector<vector<bool>>> neigh)
{
size_t num = 0;
for (size_t i = 0; i < 3; ++i) {
for (size_t j = 0; j < 3; ++j){
for (size_t k = 0; k < 3; ++k) {
size_t bits_shift = static_cast<size_t>(1ULL << (k + j*3 + i * 9));
size_t bits_shift_minus_1 = static_cast<size_t>(1ULL << (k + j*3 + i * 9 - 1));
if (bits_shift < 8192) { // 2^13 == 8192, and 14th
// voxel is central one
if (neigh[i][j][k] == true)
num |= bits_shift;
} else if (bits_shift > 8192)
{
if (neigh[i][j][k] == true)
num |= bits_shift_minus_1;
}
}
}
}
return num;
}
//================================================
vector<int> naive_image_2d(vector<vector<int>> image, int M)
{
vector<int> ecc(M+1, 0);
for (size_t i = 0; i < M+1; ++i) {
vector<vector<bool>> thresh_image = threshold_image_2d(image, static_cast<int>(i));
ecc[i] = char_binary_image_2d(thresh_image);
}
return ecc;
}
//================================================
vector<int> image_2d(const vector<vector<int>> & image,
const vector<int> &vector_euler_changes,
int M)
{
size_t numI = image.size();
size_t numJ = image[0].size();
vector<int> ecc(M+1, 0);
vector<vector<int>> padded = pad_2d(image, M+1);
for (size_t i = 1; i < numI+1; ++i) {
for (size_t j = 1; j < numJ+1; ++j) {
int pixel_value = padded[i][j];
vector<vector<bool>> binary_neigh_3_3 = binary_neigh_pixel_2d(padded, i, j, pixel_value);
size_t num = number_from_neigh_2d(binary_neigh_3_3);
ecc[static_cast<size_t>(pixel_value)] += static_cast<int>(vector_euler_changes[num]);
}
}
// Cumulative sum of euler changes
partial_sum(ecc.begin(), ecc.end(), ecc.begin());
return ecc;
}
//================================================
vector<int> naive_image_3d(vector<vector<vector<int>>> image, int M)
{
vector<int> ecc(M+1, 0);
for (size_t i = 0; i < M+1; ++i) {
vector<vector<vector<bool>>> binary_thresh = threshold_image_3d(image, static_cast<int>(i));
ecc[i] = char_binary_image_3d(binary_thresh);
}
return ecc;
}
//================================================
vector<int> image_3d(const vector<vector<vector<int>>> &image,
const vector<int> &vector_euler_changes,
int M)
{
size_t numI = image.size();
size_t numJ = image[0].size();
size_t numK = image[0][0].size();
vector<int> ecc(M+1, 0);
vector<vector<vector<int>>> padded = pad_3d(image, M+1);
for (size_t i = 1; i < numI+1; ++i) {
for (size_t j = 1; j < numJ+1; ++j) {
for (size_t k = 1; k < numK+1; ++k) {
int voxel_value = padded[i][j][k];
vector<vector<vector<bool>>> binary_neigh_3_3_3 = binary_neigh_voxel_3d(padded, i, j, k, voxel_value);
size_t num = number_from_neigh_3d(binary_neigh_3_3_3);
ecc[static_cast<size_t>(voxel_value)] += static_cast<int>(vector_euler_changes[num]);
}
}
}
// Cumulative sum of euler changes
partial_sum(ecc.begin(), ecc.end(), ecc.begin());
return ecc;
}
//================================================
vector<int> filtration(vector<int> dim_simplices,
vector<double> parametrization,
vector<double> bins)
{
size_t num_elements = bins.size();
vector<int> euler_char_curve(num_elements, 0);
// possible changes due to addition of vertex edge or triangle
vector<int> possible_changes{1, -1, 1, -1};
// loop on simplices and update euler curve
for (size_t i = 0; i < dim_simplices.size(); ++i) {
size_t dim_simplex = dim_simplices[i];
double par = parametrization[i];
vector<double>::iterator lower;
lower = lower_bound(bins.begin(), bins.end(), par);
euler_char_curve[(lower - bins.begin())] += possible_changes[dim_simplex];
}
int tmp = euler_char_curve[0];
for (size_t s = 1; s < euler_char_curve.size(); ++s) {
euler_char_curve[s] += tmp;
tmp = euler_char_curve[s];
}
return euler_char_curve;
}
//================================================
PYBIND11_MODULE(curve, m) {
m.doc() = "Euler characteristic curves cpp bindings.";
m.def("naive_image_2d", &naive_image_2d);
m.def("image_2d", &image_2d);
m.def("naive_image_3d", &naive_image_3d);
m.def("image_3d", &image_3d);
m.def("filtration", &filtration);
#ifdef VERSION_INFO
m.attr("__version__") = VERSION_INFO;
#else
m.attr("__version__") = "dev";
#endif
}
| 30.710924
| 142
| 0.482734
|
gbeltramo
|
4710d506446d1b3aa5751a08b09a174046f1085a
| 36,512
|
cpp
|
C++
|
src/renderer/vulkan/renderpass/Culling.cpp
|
Ryp/Reaper
|
ccaef540013db7e8bf873db6e597e9036184d100
|
[
"MIT"
] | 11
|
2016-11-07T07:47:46.000Z
|
2018-07-19T16:04:45.000Z
|
src/renderer/vulkan/renderpass/Culling.cpp
|
Ryp/Reaper
|
ccaef540013db7e8bf873db6e597e9036184d100
|
[
"MIT"
] | null | null | null |
src/renderer/vulkan/renderpass/Culling.cpp
|
Ryp/Reaper
|
ccaef540013db7e8bf873db6e597e9036184d100
|
[
"MIT"
] | null | null | null |
////////////////////////////////////////////////////////////////////////////////
/// Reaper
///
/// Copyright (c) 2015-2022 Thibault Schueller
/// This file is distributed under the MIT License
////////////////////////////////////////////////////////////////////////////////
#include "Culling.h"
#include "renderer/PrepareBuckets.h"
#include "renderer/vulkan/Backend.h"
#include "renderer/vulkan/Barrier.h"
#include "renderer/vulkan/CommandBuffer.h"
#include "renderer/vulkan/ComputeHelper.h"
#include "renderer/vulkan/Debug.h"
#include "renderer/vulkan/GpuProfile.h"
#include "renderer/vulkan/MeshCache.h"
#include "renderer/vulkan/Shader.h"
#include "common/Log.h"
#include "common/ReaperRoot.h"
#include <array>
#include <glm/gtc/matrix_transform.hpp>
#include "renderer/shader/share/meshlet.hlsl"
#include "renderer/shader/share/meshlet_culling.hlsl"
namespace Reaper
{
constexpr u32 IndexSizeBytes = 4;
constexpr u32 MaxCullPassCount = 4;
constexpr u32 MaxCullInstanceCount = 512 * MaxCullPassCount;
constexpr u32 MaxSurvivingMeshletsPerPass = 200;
// Worst case if all meshlets of all passes aren't culled.
// This shouldn't happen, we can probably cut this by half and raise a warning when we cross the limit.
constexpr u64 DynamicIndexBufferSizeBytes =
MaxSurvivingMeshletsPerPass * MaxCullPassCount * MeshletMaxTriangleCount * 3 * IndexSizeBytes;
constexpr u32 MaxIndirectDrawCountPerPass = MaxSurvivingMeshletsPerPass;
namespace
{
std::vector<VkDescriptorSet> create_descriptor_sets(VulkanBackend& backend, VkDescriptorSetLayout set_layout,
u32 count)
{
std::vector<VkDescriptorSetLayout> layouts(count, set_layout);
std::vector<VkDescriptorSet> sets(layouts.size());
const VkDescriptorSetAllocateInfo allocInfo = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, nullptr,
backend.global_descriptor_pool, static_cast<u32>(layouts.size()),
layouts.data()};
Assert(vkAllocateDescriptorSets(backend.device, &allocInfo, sets.data()) == VK_SUCCESS);
return sets;
}
void update_cull_meshlet_descriptor_sets(VulkanBackend& backend, CullResources& resources,
const BufferInfo& meshletBuffer, u32 pass_index)
{
VkDescriptorSet descriptor_set = resources.cull_meshlet_descriptor_sets[pass_index];
const VkDescriptorBufferInfo meshlets = default_descriptor_buffer_info(meshletBuffer);
const VkDescriptorBufferInfo instanceParams =
default_descriptor_buffer_info(resources.cullInstanceParamsBuffer);
const VkDescriptorBufferInfo counters = get_vk_descriptor_buffer_info(
resources.countersBuffer, BufferSubresource{pass_index * CountersCount, CountersCount});
const VkDescriptorBufferInfo meshlet_offsets = get_vk_descriptor_buffer_info(
resources.dynamicMeshletBuffer,
BufferSubresource{pass_index * MaxSurvivingMeshletsPerPass, MaxSurvivingMeshletsPerPass});
std::vector<VkWriteDescriptorSet> writes = {
create_buffer_descriptor_write(descriptor_set, 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &meshlets),
create_buffer_descriptor_write(descriptor_set, 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &instanceParams),
create_buffer_descriptor_write(descriptor_set, 2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &counters),
create_buffer_descriptor_write(descriptor_set, 3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &meshlet_offsets),
};
vkUpdateDescriptorSets(backend.device, static_cast<u32>(writes.size()), writes.data(), 0, nullptr);
}
void update_culling_descriptor_sets(VulkanBackend& backend, CullResources& resources,
const BufferInfo& staticIndexBuffer, const BufferInfo& vertexBufferPosition,
u32 pass_index)
{
VkDescriptorSet descriptor_set = resources.cull_triangles_descriptor_sets[pass_index];
const VkDescriptorBufferInfo meshlets = get_vk_descriptor_buffer_info(
resources.dynamicMeshletBuffer,
BufferSubresource{pass_index * MaxSurvivingMeshletsPerPass, MaxSurvivingMeshletsPerPass});
const VkDescriptorBufferInfo indices = default_descriptor_buffer_info(staticIndexBuffer);
const VkDescriptorBufferInfo vertexPositions = default_descriptor_buffer_info(vertexBufferPosition);
const VkDescriptorBufferInfo instanceParams =
default_descriptor_buffer_info(resources.cullInstanceParamsBuffer);
const VkDescriptorBufferInfo indicesOut = get_vk_descriptor_buffer_info(
resources.dynamicIndexBuffer,
BufferSubresource{pass_index * DynamicIndexBufferSizeBytes, DynamicIndexBufferSizeBytes});
const VkDescriptorBufferInfo drawCommandOut = get_vk_descriptor_buffer_info(
resources.indirectDrawBuffer,
BufferSubresource{pass_index * MaxIndirectDrawCountPerPass, MaxIndirectDrawCountPerPass});
const VkDescriptorBufferInfo countersOut = get_vk_descriptor_buffer_info(
resources.countersBuffer, BufferSubresource{pass_index * CountersCount, CountersCount});
std::vector<VkWriteDescriptorSet> writes = {
create_buffer_descriptor_write(descriptor_set, 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &meshlets),
create_buffer_descriptor_write(descriptor_set, 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &indices),
create_buffer_descriptor_write(descriptor_set, 2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &vertexPositions),
create_buffer_descriptor_write(descriptor_set, 3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &instanceParams),
create_buffer_descriptor_write(descriptor_set, 4, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &indicesOut),
create_buffer_descriptor_write(descriptor_set, 5, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &drawCommandOut),
create_buffer_descriptor_write(descriptor_set, 6, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &countersOut),
};
vkUpdateDescriptorSets(backend.device, static_cast<u32>(writes.size()), writes.data(), 0, nullptr);
}
void update_cull_prepare_indirect_descriptor_set(VulkanBackend& backend, CullResources& resources,
VkDescriptorSet descriptor_set)
{
const VkDescriptorBufferInfo counters = default_descriptor_buffer_info(resources.countersBuffer);
const VkDescriptorBufferInfo indirectCommands =
default_descriptor_buffer_info(resources.indirectDispatchBuffer);
std::vector<VkWriteDescriptorSet> writes = {
create_buffer_descriptor_write(descriptor_set, 0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &counters),
create_buffer_descriptor_write(descriptor_set, 1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &indirectCommands),
};
vkUpdateDescriptorSets(backend.device, static_cast<u32>(writes.size()), writes.data(), 0, nullptr);
}
SimplePipeline create_meshlet_prepare_indirect_pipeline(ReaperRoot& root, VulkanBackend& backend)
{
const char* fileName = "./build/shader/prepare_fine_culling_indirect.comp.spv";
const char* entryPoint = "main";
VkSpecializationInfo* specialization = nullptr;
VkShaderModule computeShader = vulkan_create_shader_module(backend.device, fileName);
std::vector<VkDescriptorSetLayoutBinding> descriptorSetLayoutBinding = {
VkDescriptorSetLayoutBinding{0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
};
VkDescriptorSetLayoutCreateInfo descriptorSetLayoutInfo = {
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0,
static_cast<u32>(descriptorSetLayoutBinding.size()), descriptorSetLayoutBinding.data()};
VkDescriptorSetLayout descriptorSetLayout = VK_NULL_HANDLE;
Assert(vkCreateDescriptorSetLayout(backend.device, &descriptorSetLayoutInfo, nullptr, &descriptorSetLayout)
== VK_SUCCESS);
log_debug(root, "vulkan: created descriptor set layout with handle: {}",
static_cast<void*>(descriptorSetLayout));
const VkPushConstantRange cullPushConstantRange = {VK_SHADER_STAGE_COMPUTE_BIT, 0,
sizeof(CullMeshletPushConstants)};
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
nullptr,
VK_FLAGS_NONE,
1,
&descriptorSetLayout,
1,
&cullPushConstantRange};
VkPipelineLayout pipelineLayout = VK_NULL_HANDLE;
Assert(vkCreatePipelineLayout(backend.device, &pipelineLayoutInfo, nullptr, &pipelineLayout) == VK_SUCCESS);
log_debug(root, "vulkan: created pipeline layout with handle: {}", static_cast<void*>(pipelineLayout));
VkPipelineShaderStageCreateInfo shaderStage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
nullptr,
0,
VK_SHADER_STAGE_COMPUTE_BIT,
computeShader,
entryPoint,
specialization};
VkComputePipelineCreateInfo pipelineCreateInfo = {VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
nullptr,
0,
shaderStage,
pipelineLayout,
VK_NULL_HANDLE, // do not care about pipeline derivatives
0};
VkPipeline pipeline = VK_NULL_HANDLE;
VkPipelineCache cache = VK_NULL_HANDLE;
Assert(vkCreateComputePipelines(backend.device, cache, 1, &pipelineCreateInfo, nullptr, &pipeline)
== VK_SUCCESS);
vkDestroyShaderModule(backend.device, computeShader, nullptr);
log_debug(root, "vulkan: created compute pipeline with handle: {}", static_cast<void*>(pipeline));
return SimplePipeline{pipeline, pipelineLayout, descriptorSetLayout};
}
SimplePipeline create_cull_meshlet_pipeline(ReaperRoot& root, VulkanBackend& backend)
{
const char* fileName = "./build/shader/cull_meshlet.comp.spv";
const char* entryPoint = "main";
VkSpecializationInfo* specialization = nullptr;
VkShaderModule computeShader = vulkan_create_shader_module(backend.device, fileName);
std::vector<VkDescriptorSetLayoutBinding> descriptorSetLayoutBinding = {
VkDescriptorSetLayoutBinding{0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
};
VkDescriptorSetLayoutCreateInfo descriptorSetLayoutInfo = {
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0,
static_cast<u32>(descriptorSetLayoutBinding.size()), descriptorSetLayoutBinding.data()};
VkDescriptorSetLayout descriptorSetLayout = VK_NULL_HANDLE;
Assert(vkCreateDescriptorSetLayout(backend.device, &descriptorSetLayoutInfo, nullptr, &descriptorSetLayout)
== VK_SUCCESS);
log_debug(root, "vulkan: created descriptor set layout with handle: {}",
static_cast<void*>(descriptorSetLayout));
const VkPushConstantRange cullPushConstantRange = {VK_SHADER_STAGE_COMPUTE_BIT, 0,
sizeof(CullMeshletPushConstants)};
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
nullptr,
VK_FLAGS_NONE,
1,
&descriptorSetLayout,
1,
&cullPushConstantRange};
VkPipelineLayout pipelineLayout = VK_NULL_HANDLE;
Assert(vkCreatePipelineLayout(backend.device, &pipelineLayoutInfo, nullptr, &pipelineLayout) == VK_SUCCESS);
log_debug(root, "vulkan: created pipeline layout with handle: {}", static_cast<void*>(pipelineLayout));
VkPipelineShaderStageCreateInfo shaderStage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
nullptr,
0,
VK_SHADER_STAGE_COMPUTE_BIT,
computeShader,
entryPoint,
specialization};
VkComputePipelineCreateInfo pipelineCreateInfo = {VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
nullptr,
0,
shaderStage,
pipelineLayout,
VK_NULL_HANDLE, // do not care about pipeline derivatives
0};
VkPipeline pipeline = VK_NULL_HANDLE;
VkPipelineCache cache = VK_NULL_HANDLE;
Assert(vkCreateComputePipelines(backend.device, cache, 1, &pipelineCreateInfo, nullptr, &pipeline)
== VK_SUCCESS);
vkDestroyShaderModule(backend.device, computeShader, nullptr);
log_debug(root, "vulkan: created compute pipeline with handle: {}", static_cast<void*>(pipeline));
return SimplePipeline{pipeline, pipelineLayout, descriptorSetLayout};
}
SimplePipeline create_cull_triangles_pipeline(ReaperRoot& root, VulkanBackend& backend)
{
std::vector<VkDescriptorSetLayoutBinding> descriptorSetLayoutBinding = {
VkDescriptorSetLayoutBinding{0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{4, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{5, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
VkDescriptorSetLayoutBinding{6, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
};
VkDescriptorSetLayoutCreateInfo descriptorSetLayoutInfo = {
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, nullptr, 0,
static_cast<u32>(descriptorSetLayoutBinding.size()), descriptorSetLayoutBinding.data()};
VkDescriptorSetLayout descriptorSetLayout = VK_NULL_HANDLE;
Assert(vkCreateDescriptorSetLayout(backend.device, &descriptorSetLayoutInfo, nullptr, &descriptorSetLayout)
== VK_SUCCESS);
log_debug(root, "vulkan: created descriptor set layout with handle: {}",
static_cast<void*>(descriptorSetLayout));
const VkPushConstantRange cullPushConstantRange = {VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(CullPushConstants)};
VkPipelineLayoutCreateInfo pipelineLayoutInfo = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
nullptr,
VK_FLAGS_NONE,
1,
&descriptorSetLayout,
1,
&cullPushConstantRange};
VkPipelineLayout pipelineLayout = VK_NULL_HANDLE;
Assert(vkCreatePipelineLayout(backend.device, &pipelineLayoutInfo, nullptr, &pipelineLayout) == VK_SUCCESS);
log_debug(root, "vulkan: created pipeline layout with handle: {}", static_cast<void*>(pipelineLayout));
const char* fileName = "./build/shader/cull_triangle_batch.comp.spv";
const char* entryPoint = "main";
VkSpecializationInfo* specialization = nullptr;
VkShaderModule computeShader = vulkan_create_shader_module(backend.device, fileName);
VkPipelineShaderStageCreateInfo shaderStage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
nullptr,
0,
VK_SHADER_STAGE_COMPUTE_BIT,
computeShader,
entryPoint,
specialization};
VkComputePipelineCreateInfo pipelineCreateInfo = {VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
nullptr,
0,
shaderStage,
pipelineLayout,
VK_NULL_HANDLE, // do not care about pipeline derivatives
0};
VkPipeline pipeline = VK_NULL_HANDLE;
VkPipelineCache cache = VK_NULL_HANDLE;
Assert(vkCreateComputePipelines(backend.device, cache, 1, &pipelineCreateInfo, nullptr, &pipeline)
== VK_SUCCESS);
vkDestroyShaderModule(backend.device, computeShader, nullptr);
log_debug(root, "vulkan: created compute pipeline with handle: {}", static_cast<void*>(pipeline));
return SimplePipeline{pipeline, pipelineLayout, descriptorSetLayout};
}
} // namespace
CullResources create_culling_resources(ReaperRoot& root, VulkanBackend& backend)
{
CullResources resources;
resources.cullMeshletPipe = create_cull_meshlet_pipeline(root, backend);
resources.cullMeshletPrepIndirect = create_meshlet_prepare_indirect_pipeline(root, backend);
resources.cullTrianglesPipe = create_cull_triangles_pipeline(root, backend);
resources.cullInstanceParamsBuffer = create_buffer(
root, backend.device, "Culling instance constants",
DefaultGPUBufferProperties(MaxCullInstanceCount, sizeof(CullMeshInstanceParams), GPUBufferUsage::StorageBuffer),
backend.vma_instance, MemUsage::CPU_To_GPU);
resources.countersBuffer =
create_buffer(root, backend.device, "Meshlet counters",
DefaultGPUBufferProperties(CountersCount * MaxCullPassCount, sizeof(u32),
GPUBufferUsage::IndirectBuffer | GPUBufferUsage::TransferSrc
| GPUBufferUsage::TransferDst | GPUBufferUsage::StorageBuffer),
backend.vma_instance);
resources.countersBufferCPU = create_buffer(
root, backend.device, "Meshlet counters CPU",
DefaultGPUBufferProperties(CountersCount * MaxCullPassCount, sizeof(u32), GPUBufferUsage::TransferDst),
backend.vma_instance, MemUsage::CPU_Only);
resources.dynamicMeshletBuffer =
create_buffer(root, backend.device, "Dynamic meshlet offsets",
DefaultGPUBufferProperties(MaxSurvivingMeshletsPerPass * MaxCullPassCount, sizeof(MeshletOffsets),
GPUBufferUsage::StorageBuffer),
backend.vma_instance);
resources.indirectDispatchBuffer =
create_buffer(root, backend.device, "Indirect dispatch buffer",
DefaultGPUBufferProperties(MaxCullPassCount, sizeof(VkDispatchIndirectCommand),
GPUBufferUsage::IndirectBuffer | GPUBufferUsage::StorageBuffer),
backend.vma_instance);
resources.dynamicIndexBuffer =
create_buffer(root, backend.device, "Dynamic indices",
DefaultGPUBufferProperties(DynamicIndexBufferSizeBytes * MaxCullPassCount, 1,
GPUBufferUsage::IndexBuffer | GPUBufferUsage::StorageBuffer),
backend.vma_instance);
resources.indirectDrawBuffer = create_buffer(
root, backend.device, "Indirect draw buffer",
DefaultGPUBufferProperties(MaxIndirectDrawCountPerPass * MaxCullPassCount, sizeof(VkDrawIndexedIndirectCommand),
GPUBufferUsage::IndirectBuffer | GPUBufferUsage::StorageBuffer),
backend.vma_instance);
Assert(MaxIndirectDrawCountPerPass < backend.physicalDeviceProperties.limits.maxDrawIndirectCount);
// FIXME
resources.cull_meshlet_descriptor_sets =
create_descriptor_sets(backend, resources.cullMeshletPipe.descSetLayout, 4);
resources.cull_prepare_descriptor_set =
create_descriptor_sets(backend, resources.cullMeshletPrepIndirect.descSetLayout, 1).front();
resources.cull_triangles_descriptor_sets =
create_descriptor_sets(backend, resources.cullTrianglesPipe.descSetLayout, 4);
const VkEventCreateInfo event_info = {
VK_STRUCTURE_TYPE_EVENT_CREATE_INFO,
nullptr,
VK_FLAGS_NONE,
};
Assert(vkCreateEvent(backend.device, &event_info, nullptr, &resources.countersReadyEvent) == VK_SUCCESS);
VulkanSetDebugName(backend.device, resources.countersReadyEvent, "Counters ready event");
return resources;
}
namespace
{
void destroy_simple_pipeline(VkDevice device, SimplePipeline simple_pipeline)
{
vkDestroyPipeline(device, simple_pipeline.pipeline, nullptr);
vkDestroyPipelineLayout(device, simple_pipeline.pipelineLayout, nullptr);
vkDestroyDescriptorSetLayout(device, simple_pipeline.descSetLayout, nullptr);
}
} // namespace
void destroy_culling_resources(VulkanBackend& backend, CullResources& resources)
{
vmaDestroyBuffer(backend.vma_instance, resources.countersBuffer.handle, resources.countersBuffer.allocation);
vmaDestroyBuffer(backend.vma_instance, resources.countersBufferCPU.handle, resources.countersBufferCPU.allocation);
vmaDestroyBuffer(backend.vma_instance, resources.cullInstanceParamsBuffer.handle,
resources.cullInstanceParamsBuffer.allocation);
vmaDestroyBuffer(backend.vma_instance, resources.dynamicIndexBuffer.handle,
resources.dynamicIndexBuffer.allocation);
vmaDestroyBuffer(backend.vma_instance, resources.indirectDispatchBuffer.handle,
resources.indirectDispatchBuffer.allocation);
vmaDestroyBuffer(backend.vma_instance, resources.dynamicMeshletBuffer.handle,
resources.dynamicMeshletBuffer.allocation);
vmaDestroyBuffer(backend.vma_instance, resources.indirectDrawBuffer.handle,
resources.indirectDrawBuffer.allocation);
destroy_simple_pipeline(backend.device, resources.cullMeshletPipe);
destroy_simple_pipeline(backend.device, resources.cullMeshletPrepIndirect);
destroy_simple_pipeline(backend.device, resources.cullTrianglesPipe);
vkDestroyEvent(backend.device, resources.countersReadyEvent, nullptr);
}
void upload_culling_resources(VulkanBackend& backend, const PreparedData& prepared, CullResources& resources)
{
REAPER_PROFILE_SCOPE_FUNC();
if (prepared.cull_mesh_instance_params.empty())
return;
upload_buffer_data(backend.device, backend.vma_instance, resources.cullInstanceParamsBuffer,
prepared.cull_mesh_instance_params.data(),
prepared.cull_mesh_instance_params.size() * sizeof(CullMeshInstanceParams));
}
void update_culling_pass_descriptor_sets(VulkanBackend& backend, const PreparedData& prepared, CullResources& resources,
const MeshCache& mesh_cache)
{
for (const CullPassData& cull_pass : prepared.cull_passes)
{
Assert(cull_pass.pass_index < MaxCullPassCount);
update_cull_meshlet_descriptor_sets(backend, resources, mesh_cache.meshletBuffer, cull_pass.pass_index);
update_culling_descriptor_sets(backend, resources, mesh_cache.indexBuffer, mesh_cache.vertexBufferPosition,
cull_pass.pass_index);
}
update_cull_prepare_indirect_descriptor_set(backend, resources, resources.cull_prepare_descriptor_set);
}
void record_culling_command_buffer(ReaperRoot& root, CommandBuffer& cmdBuffer, const PreparedData& prepared,
CullResources& resources)
{
u64 total_meshlet_count = 0;
std::vector<u64> meshlet_count_per_pass;
const u32 clear_value = 0;
vkCmdFillBuffer(cmdBuffer.handle, resources.countersBuffer.handle, 0, VK_WHOLE_SIZE, clear_value);
{
REAPER_GPU_SCOPE_COLOR(cmdBuffer, "Barrier", MP_RED);
const GPUMemoryAccess src = {VK_PIPELINE_STAGE_2_CLEAR_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT};
const GPUMemoryAccess dst = {VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT,
VK_ACCESS_2_SHADER_WRITE_BIT | VK_ACCESS_2_SHADER_READ_BIT};
const VkMemoryBarrier2 memoryBarrier = get_vk_memory_barrier(src, dst);
const VkDependencyInfo dependencies = get_vk_memory_barrier_depency_info(1, &memoryBarrier);
vkCmdPipelineBarrier2(cmdBuffer.handle, &dependencies);
}
{
VulkanDebugLabelCmdBufferScope s(cmdBuffer.handle, "Cull Meshes");
vkCmdBindPipeline(cmdBuffer.handle, VK_PIPELINE_BIND_POINT_COMPUTE, resources.cullMeshletPipe.pipeline);
for (const CullPassData& cull_pass : prepared.cull_passes)
{
u64& pass_meshlet_count = meshlet_count_per_pass.emplace_back();
pass_meshlet_count = 0;
vkCmdBindDescriptorSets(cmdBuffer.handle, VK_PIPELINE_BIND_POINT_COMPUTE,
resources.cullMeshletPipe.pipelineLayout, 0, 1,
&resources.cull_meshlet_descriptor_sets[cull_pass.pass_index], 0, nullptr);
for (const CullCmd& command : cull_pass.cull_commands)
{
vkCmdPushConstants(cmdBuffer.handle, resources.cullMeshletPipe.pipelineLayout,
VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(command.push_constants),
&command.push_constants);
const u32 group_count_x = div_round_up(command.push_constants.meshlet_count, MeshletCullThreadCount);
vkCmdDispatch(cmdBuffer.handle, group_count_x, command.instance_count, 1);
pass_meshlet_count += command.push_constants.meshlet_count;
}
total_meshlet_count += pass_meshlet_count;
}
}
{
REAPER_GPU_SCOPE_COLOR(cmdBuffer, "Barrier", MP_RED);
const GPUMemoryAccess src = {VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_WRITE_BIT};
const GPUMemoryAccess dst = {VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_READ_BIT};
const VkMemoryBarrier2 memoryBarrier = get_vk_memory_barrier(src, dst);
const VkDependencyInfo dependencies = get_vk_memory_barrier_depency_info(1, &memoryBarrier);
vkCmdPipelineBarrier2(cmdBuffer.handle, &dependencies);
}
{
VulkanDebugLabelCmdBufferScope s(cmdBuffer.handle, "Indirect Prepare");
vkCmdBindPipeline(cmdBuffer.handle, VK_PIPELINE_BIND_POINT_COMPUTE, resources.cullMeshletPrepIndirect.pipeline);
vkCmdBindDescriptorSets(cmdBuffer.handle, VK_PIPELINE_BIND_POINT_COMPUTE,
resources.cullMeshletPrepIndirect.pipelineLayout, 0, 1,
&resources.cull_prepare_descriptor_set, 0, nullptr);
const u32 group_count_x = div_round_up(prepared.cull_passes.size(), PrepareIndirectDispatchThreadCount);
vkCmdDispatch(cmdBuffer.handle, group_count_x, 1, 1);
}
{
REAPER_GPU_SCOPE_COLOR(cmdBuffer, "Barrier", MP_RED);
const GPUMemoryAccess src = {VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_WRITE_BIT};
const GPUMemoryAccess dst = {VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_READ_BIT};
const VkMemoryBarrier2 memoryBarrier = get_vk_memory_barrier(src, dst);
const VkDependencyInfo dependencies = get_vk_memory_barrier_depency_info(1, &memoryBarrier);
vkCmdPipelineBarrier2(cmdBuffer.handle, &dependencies);
}
{
VulkanDebugLabelCmdBufferScope s(cmdBuffer.handle, "Cull Triangles");
vkCmdBindPipeline(cmdBuffer.handle, VK_PIPELINE_BIND_POINT_COMPUTE, resources.cullTrianglesPipe.pipeline);
for (const CullPassData& cull_pass : prepared.cull_passes)
{
vkCmdBindDescriptorSets(cmdBuffer.handle, VK_PIPELINE_BIND_POINT_COMPUTE,
resources.cullTrianglesPipe.pipelineLayout, 0, 1,
&resources.cull_triangles_descriptor_sets[cull_pass.pass_index], 0, nullptr);
CullPushConstants consts;
consts.output_size_ts = cull_pass.output_size_ts;
vkCmdPushConstants(cmdBuffer.handle, resources.cullTrianglesPipe.pipelineLayout,
VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(consts), &consts);
vkCmdDispatchIndirect(cmdBuffer.handle, resources.indirectDispatchBuffer.handle,
cull_pass.pass_index * sizeof(VkDispatchIndirectCommand));
}
}
{
REAPER_GPU_SCOPE_COLOR(cmdBuffer, "Barrier", MP_RED);
const GPUMemoryAccess src = {VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT, VK_ACCESS_2_SHADER_WRITE_BIT};
const GPUMemoryAccess dst = {VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT | VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT,
VK_ACCESS_2_INDEX_READ_BIT | VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT};
const VkMemoryBarrier2 memoryBarrier = get_vk_memory_barrier(src, dst);
const VkDependencyInfo dependencies = get_vk_memory_barrier_depency_info(1, &memoryBarrier);
vkCmdPipelineBarrier2(cmdBuffer.handle, &dependencies);
}
{
REAPER_GPU_SCOPE(cmdBuffer, "Copy counters");
VkBufferCopy2 region = {};
region.sType = VK_STRUCTURE_TYPE_BUFFER_COPY_2;
region.pNext = nullptr;
region.srcOffset = 0;
region.dstOffset = 0;
region.size =
resources.countersBuffer.properties.element_count * resources.countersBuffer.properties.element_size_bytes;
const VkCopyBufferInfo2 copy = {VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2, nullptr, resources.countersBuffer.handle,
resources.countersBufferCPU.handle, 1, ®ion};
vkCmdCopyBuffer2(cmdBuffer.handle, ©);
vkCmdResetEvent2(cmdBuffer.handle, resources.countersReadyEvent, VK_PIPELINE_STAGE_2_TRANSFER_BIT);
const GPUResourceAccess src = {VK_PIPELINE_STAGE_2_TRANSFER_BIT, VK_ACCESS_2_TRANSFER_WRITE_BIT};
const GPUResourceAccess dst = {VK_PIPELINE_STAGE_2_HOST_BIT, VK_ACCESS_2_HOST_READ_BIT};
const GPUBufferView view = default_buffer_view(resources.countersBufferCPU.properties);
VkBufferMemoryBarrier2 bufferBarrier =
get_vk_buffer_barrier(resources.countersBufferCPU.handle, view, src, dst);
const VkDependencyInfo dependencies = VkDependencyInfo{
VK_STRUCTURE_TYPE_DEPENDENCY_INFO, nullptr, VK_FLAGS_NONE, 0, nullptr, 1, &bufferBarrier, 0, nullptr};
vkCmdSetEvent2(cmdBuffer.handle, resources.countersReadyEvent, &dependencies);
}
log_debug(root, "CPU mesh stats:");
for (auto meshlet_count : meshlet_count_per_pass)
{
log_debug(root, "- pass total submitted meshlets = {}, approx. triangles = {}", meshlet_count,
meshlet_count * MeshletMaxTriangleCount);
}
log_debug(root, "- total submitted meshlets = {}, approx. triangles = {}", total_meshlet_count,
total_meshlet_count * MeshletMaxTriangleCount);
}
std::vector<CullingStats> get_gpu_culling_stats(VulkanBackend& backend, const PreparedData& prepared,
CullResources& resources)
{
VmaAllocationInfo allocation_info;
vmaGetAllocationInfo(backend.vma_instance, resources.countersBufferCPU.allocation, &allocation_info);
void* mapped_data_ptr = nullptr;
Assert(vkMapMemory(backend.device, allocation_info.deviceMemory, allocation_info.offset, allocation_info.size, 0,
&mapped_data_ptr)
== VK_SUCCESS);
VkMappedMemoryRange staging_range = {};
staging_range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
staging_range.memory = allocation_info.deviceMemory;
staging_range.offset = allocation_info.offset;
staging_range.size = VK_WHOLE_SIZE;
vkInvalidateMappedMemoryRanges(backend.device, 1, &staging_range);
Assert(mapped_data_ptr);
std::vector<CullingStats> stats;
for (u32 i = 0; i < prepared.cull_passes.size(); i++)
{
CullingStats& s = stats.emplace_back();
s.pass_index = i;
s.surviving_meshlet_count = static_cast<u32*>(mapped_data_ptr)[i * CountersCount + MeshletCounterOffset];
s.surviving_triangle_count = static_cast<u32*>(mapped_data_ptr)[i * CountersCount + TriangleCounterOffset];
s.indirect_draw_command_count =
static_cast<u32*>(mapped_data_ptr)[i * CountersCount + DrawCommandCounterOffset];
}
vkUnmapMemory(backend.device, allocation_info.deviceMemory);
return stats;
}
namespace
{
constexpr VkIndexType get_vk_culling_index_type()
{
if constexpr (IndexSizeBytes == 2)
return VK_INDEX_TYPE_UINT16;
else
{
static_assert(IndexSizeBytes == 4, "Invalid index size");
return VK_INDEX_TYPE_UINT32;
}
}
} // namespace
CullingDrawParams get_culling_draw_params(u32 pass_index)
{
CullingDrawParams params;
params.counter_buffer_offset = (pass_index * CountersCount + DrawCommandCounterOffset) * sizeof(u32);
params.index_buffer_offset = pass_index * DynamicIndexBufferSizeBytes;
params.index_type = get_vk_culling_index_type();
params.command_buffer_offset = pass_index * MaxIndirectDrawCountPerPass * sizeof(VkDrawIndexedIndirectCommand);
params.command_buffer_max_count = MaxIndirectDrawCountPerPass;
return params;
}
} // namespace Reaper
| 52.16
| 120
| 0.659482
|
Ryp
|
47116d2b7b8cf557348c96fd02077b17a2dfac8f
| 328
|
hpp
|
C++
|
test/base_test.hpp
|
mexicowilly/Espadin
|
f33580d2c77c5efe92c05de0816ec194e87906f0
|
[
"Apache-2.0"
] | null | null | null |
test/base_test.hpp
|
mexicowilly/Espadin
|
f33580d2c77c5efe92c05de0816ec194e87906f0
|
[
"Apache-2.0"
] | null | null | null |
test/base_test.hpp
|
mexicowilly/Espadin
|
f33580d2c77c5efe92c05de0816ec194e87906f0
|
[
"Apache-2.0"
] | null | null | null |
#if !defined(ESPADIN_BASE_TEST_HPP_)
#define ESPADIN_BASE_TEST_HPP_
#include <espadin/drive.hpp>
namespace espadin::test
{
class base
{
protected:
static std::string parent_id;
base();
std::string create_doc(const std::string& name);
void trash(const std::string& file_id);
drive drive_;
};
}
#endif
| 13.12
| 52
| 0.70122
|
mexicowilly
|
4719a37fc250e61a70c06359c27b9d35b8503218
| 3,507
|
cpp
|
C++
|
sp/main.cpp
|
afmenez/xfspp
|
202c8b819d6fe9e1a669f6042e9724ad7415cedd
|
[
"MIT"
] | 25
|
2017-03-30T04:58:10.000Z
|
2022-01-26T22:34:03.000Z
|
sp/main.cpp
|
afmenez/xfspp
|
202c8b819d6fe9e1a669f6042e9724ad7415cedd
|
[
"MIT"
] | 4
|
2019-08-26T06:14:47.000Z
|
2022-02-23T18:48:11.000Z
|
sp/main.cpp
|
afmenez/xfspp
|
202c8b819d6fe9e1a669f6042e9724ad7415cedd
|
[
"MIT"
] | 10
|
2017-04-10T09:52:58.000Z
|
2021-09-30T13:42:22.000Z
|
/* sp/main.cpp
*
* Copyright (C) 2007 Antonio Di Monaco
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include "xfsspi.h"
#include "win32/synch.hpp"
namespace
{
HINSTANCE dllInstance;
HANDLE mutexHandle = NULL;
struct Context
{
} *_ctx = nullptr;
void initializeContext()
{
if (!_ctx)
{
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
if (!_ctx)
_ctx = new Context;
}
}
}
extern "C" HRESULT WINAPI WFPCancelAsyncRequest(HSERVICE hService, REQUESTID RequestID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPClose(HSERVICE hService, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPDeregister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPExecute(HSERVICE hService, DWORD dwCommand, LPVOID lpCmdData, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPGetInfo(HSERVICE hService, DWORD dwCategory, LPVOID lpQueryDetails, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPLock(HSERVICE hService, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPOpen(HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPRegister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPSetTraceLevel(HSERVICE hService, DWORD dwTraceLevel)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPUnloadService(void)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" HRESULT WINAPI WFPUnlock(HSERVICE hService, HWND hWnd, REQUESTID ReqID)
{
initializeContext();
Windows::Synch::Locker< HANDLE > lock(mutexHandle);
return WFS_SUCCESS;
}
extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
dllInstance = hinstDLL;
mutexHandle = CreateMutex(NULL,FALSE,NULL);
break;
case DLL_PROCESS_DETACH:
CloseHandle(mutexHandle);
delete _ctx;
break;
default:
break;
}
return TRUE;
}
| 22.921569
| 304
| 0.697177
|
afmenez
|
4719ffba36ee3ce93b51efffee4973d79e571aaa
| 729
|
cpp
|
C++
|
workspace/hellotest/src/Test.cpp
|
PeterSommerlad/workshopworkspace
|
5e5eb9c42280a4aba27ee196d3003fd54a5e3607
|
[
"MIT"
] | 2
|
2021-08-28T11:43:58.000Z
|
2021-09-07T08:10:05.000Z
|
workspace/hellotest/src/Test.cpp
|
PeterSommerlad/workshopworkspace
|
5e5eb9c42280a4aba27ee196d3003fd54a5e3607
|
[
"MIT"
] | null | null | null |
workspace/hellotest/src/Test.cpp
|
PeterSommerlad/workshopworkspace
|
5e5eb9c42280a4aba27ee196d3003fd54a5e3607
|
[
"MIT"
] | null | null | null |
#include "sayhello.h"
#include "cute.h"
#include "ide_listener.h"
#include "xml_listener.h"
#include "cute_runner.h"
#include <sstream>
void createDefaultCounterIsZero() {
std::ostringstream out{};
sayhello(out);
ASSERT_EQUAL("Hello, World\n",out.str());
}
bool runAllTests(int argc, char const *argv[]) {
cute::suite s { };
//TODO add your test here
s.push_back(CUTE(createDefaultCounterIsZero));
cute::xml_file_opener xmlfile(argc, argv);
cute::xml_listener<cute::ide_listener<>> lis(xmlfile.out);
auto runner = cute::makeRunner(lis, argc, argv);
bool success = runner(s, "AllTests");
return success;
}
int main(int argc, char const *argv[]) {
return runAllTests(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE;
}
| 25.137931
| 65
| 0.717421
|
PeterSommerlad
|
471c640c252c83a002cdd3f0356636abcac55d67
| 607
|
cpp
|
C++
|
cozybirdFX/UIIntField.cpp
|
HenryLoo/cozybirdFX
|
0ef522d9a8304c190c8a586a4de6452c6bc9edfe
|
[
"BSD-3-Clause"
] | null | null | null |
cozybirdFX/UIIntField.cpp
|
HenryLoo/cozybirdFX
|
0ef522d9a8304c190c8a586a4de6452c6bc9edfe
|
[
"BSD-3-Clause"
] | null | null | null |
cozybirdFX/UIIntField.cpp
|
HenryLoo/cozybirdFX
|
0ef522d9a8304c190c8a586a4de6452c6bc9edfe
|
[
"BSD-3-Clause"
] | null | null | null |
#include "UIIntField.h"
UIIntField::UIIntField(std::string label, int maxChars, glm::vec2 size,
glm::vec2 position) :
UIField(label, maxChars, size, position)
{
}
void UIIntField::setValue(int value)
{
UIField::setValue(std::to_string(value));
}
bool UIIntField::getValue(int &output)
{
try
{
output = std::stoi(m_value);
return isNewValue();
}
catch (std::exception &)
{
return false;
}
}
bool UIIntField::formatValue()
{
try
{
int val{ m_value.empty() ? 0 : std::stoi(m_value) };
m_value = std::to_string(val);
return true;
}
catch (std::exception &)
{
return false;
}
}
| 15.175
| 72
| 0.662273
|
HenryLoo
|
4726bf017d83ca5a8e1b88c88689f30c3b3585d6
| 381
|
cpp
|
C++
|
src/custom/ucrt/common/stdio/fputc.cpp
|
ntoskrnl7/crtsys
|
2948afde9496d4e873dc067d1d0e8a545ce894bc
|
[
"MIT"
] | null | null | null |
src/custom/ucrt/common/stdio/fputc.cpp
|
ntoskrnl7/crtsys
|
2948afde9496d4e873dc067d1d0e8a545ce894bc
|
[
"MIT"
] | null | null | null |
src/custom/ucrt/common/stdio/fputc.cpp
|
ntoskrnl7/crtsys
|
2948afde9496d4e873dc067d1d0e8a545ce894bc
|
[
"MIT"
] | null | null | null |
#include "../../../common/crt/crt_internal.h"
EXTERN_C
int __cdecl fputc(int const c, FILE *const stream) {
if (stream == stdout) {
DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "%c", c);
return c;
} else if (stream == stderr) {
DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "%c", c);
return c;
}
// untested :-(
KdBreakPoint();
return 0;
}
| 25.4
| 65
| 0.645669
|
ntoskrnl7
|
4728461966a6bdc3f46f8f6eefba89e8d41eec6a
| 7,013
|
cpp
|
C++
|
src/tibb/src/TiTitaniumObject.cpp
|
ssaracut/titanium_mobile_blackberry
|
952a8100086dcc625584e33abc2dc03340cbb219
|
[
"Apache-2.0"
] | 3
|
2015-03-07T15:41:18.000Z
|
2015-11-05T05:07:45.000Z
|
src/tibb/src/TiTitaniumObject.cpp
|
ssaracut/titanium_mobile_blackberry
|
952a8100086dcc625584e33abc2dc03340cbb219
|
[
"Apache-2.0"
] | 1
|
2015-04-12T11:50:33.000Z
|
2015-04-12T21:13:19.000Z
|
src/tibb/src/TiTitaniumObject.cpp
|
ssaracut/titanium_mobile_blackberry
|
952a8100086dcc625584e33abc2dc03340cbb219
|
[
"Apache-2.0"
] | 5
|
2015-01-13T17:14:41.000Z
|
2015-05-25T16:54:26.000Z
|
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "TiTitaniumObject.h"
#include "TiAccelerometer.h"
#include "TiBufferObject.h"
#include "TiBufferStreamObject.h"
#include "TiCodecObject.h"
#include "TiGenericFunctionObject.h"
#include "TiGesture.h"
#include "TiMessageStrings.h"
#include "TiLocaleObject.h"
#include "TiStreamObject.h"
#include "TiUIObject.h"
#include "TiMap.h"
#include "TiMedia.h"
#include "TiNetwork.h"
#include "TiDatabase.h"
#include "TiAnalyticsObject.h"
#include "TiV8EventContainerFactory.h"
#include "Contacts/ContactsModule.h"
#include <TiCore.h>
#include "V8Utils.h"
#include <fstream>
using namespace titanium;
static const string rootFolder = "app/native/assets/";
TiTitaniumObject::TiTitaniumObject()
: TiProxy("Ti")
{
objectFactory_ = NULL;
}
TiTitaniumObject::~TiTitaniumObject()
{
}
TiObject* TiTitaniumObject::createObject(NativeObjectFactory* objectFactory)
{
TiTitaniumObject* obj = new TiTitaniumObject;
obj->objectFactory_ = objectFactory;
return obj;
}
void TiTitaniumObject::onCreateStaticMembers()
{
TiProxy::onCreateStaticMembers();
ADD_STATIC_TI_VALUE("buildDate", String::New(__DATE__), this);
// TODO: remove hard coded version number
ADD_STATIC_TI_VALUE("version", Number::New(2.0), this);
TiGenericFunctionObject::addGenericFunctionToParent(this, "globalInclude", this, _globalInclude);
TiGenericFunctionObject::addGenericFunctionToParent(this, "createBuffer", this, _createBuffer);
TiUIObject::addObjectToParent(this, objectFactory_);
TiMap::addObjectToParent(this, objectFactory_);
TiMedia::addObjectToParent(this, objectFactory_);
TiCodecObject::addObjectToParent(this);
TiNetwork::addObjectToParent(this, objectFactory_);
TiAnalyticsObject::addObjectToParent(this, objectFactory_);
TiDatabase::addObjectToParent(this, objectFactory_);
TiBufferStreamObject::addObjectToParent(this);
TiStreamObject::addObjectToParent(this);
TiLocaleObject::addObjectToParent(this);
TiGesture::addObjectToParent(this, objectFactory_);
TiAccelerometer::addObjectToParent(this, objectFactory_);
ContactsModule::addObjectToParent(this, objectFactory_);
}
bool TiTitaniumObject::canAddMembers() const
{
// return false;
return true;
}
static Handle<Value> includeJavaScript(string id, string parentFolder, bool* error) {
// CommonJS path rules
if (id.find("/") == 0) {
id.replace(id.find("/"), std::string("/").length(), rootFolder);
}
else if (id.find("./") == 0) {
id.replace(id.find("./"), std::string("./").length(), parentFolder);
}
else if (id.find("../") == 0) {
// count ../../../ in id and strip off back of parentFolder
int count = 0;
size_t idx = 0;
size_t pos = 0;
while (true) {
idx = id.find("../", pos);
if (idx == std::string::npos) {
break;
} else {
pos = idx + 3;
count++;
}
}
// strip leading ../../ off module id
id = id.substr(pos);
// strip paths off the parent folder
idx = 0;
pos = parentFolder.size();
for (int i = 0; i < count; i++) {
idx = parentFolder.find_last_of("/", pos);
pos = idx - 1;
}
if (idx == std::string::npos) {
*error = true;
return ThrowException(String::New("Unable to find module"));
}
parentFolder = parentFolder.substr(0, idx + 1);
id = parentFolder + id;
}
else {
string tempId = rootFolder + id;
ifstream ifs((tempId).c_str());
if (!ifs) {
id = parentFolder + id;
}
else {
id = rootFolder + id;
}
}
string filename = id;
string javascript;
{
ifstream ifs((filename).c_str());
if (!ifs)
{
*error = true;
Local<Value> taggedMessage = String::New((string(Ti::Msg::No_such_native_module) + " " + id).c_str());
return ThrowException(taggedMessage);
}
getline(ifs, javascript, string::traits_type::to_char_type(string::traits_type::eof()));
ifs.close();
}
// wrap the module
{
size_t idx = filename.find_last_of("/");
parentFolder = filename.substr(0, idx + 1);
const char* _parent = parentFolder.c_str();
string preWrap = "Ti.include = function () {"
"var i_args = Array.prototype.slice.call(arguments);"
"for(var i = 0, len = i_args.length; i < len; i++) {"
"Ti.globalInclude([i_args[i]], '" + parentFolder + "');"
"}"
"};";
javascript = preWrap + javascript;
}
TryCatch tryCatch;
Handle<Script> compiledScript = Script::Compile(String::New(javascript.c_str()), String::New(filename.c_str()));
if (compiledScript.IsEmpty())
{
Ti::TiErrorScreen::ShowWithTryCatch(tryCatch);
return Undefined();
}
Local<Value> result = compiledScript->Run();
if (result.IsEmpty())
{
Ti::TiErrorScreen::ShowWithTryCatch(tryCatch);
return Undefined();
}
return result;
}
Handle<Value> TiTitaniumObject::_globalInclude(void*, TiObject*, const Arguments& args)
{
if (!args.Length()) {
return Undefined();
}
bool error = false;
if (args[0]->IsArray()) {
Local<Array> ids = Local<Array>::Cast(args[0]);
uint32_t count = ids->Length();
string parentFolder = *String::Utf8Value(args[1]);
for (uint32_t i = 0; i < count; i++) {
string id = *String::Utf8Value(ids->Get(i));
Handle<Value> result = includeJavaScript(id, parentFolder, &error);
if (error) return result;
}
}
else {
for (uint32_t i = 0; i < args.Length(); i++) {
string id = *String::Utf8Value(args[i]);
Handle<Value> result = includeJavaScript(id, rootFolder, &error);
if (error) return result;
}
}
return Undefined();
}
Handle<Value> TiTitaniumObject::_createBuffer(void* userContext, TiObject*, const Arguments& args)
{
HandleScope handleScope;
TiTitaniumObject* obj = (TiTitaniumObject*) userContext;
Handle<ObjectTemplate> global = getObjectTemplateFromJsObject(args.Holder());
Handle<Object> result = global->NewInstance();
TiBufferObject* newBuffer = TiBufferObject::createBuffer(obj->objectFactory_);
newBuffer->setValue(result);
if ((args.Length() > 0) && (args[0]->IsObject()))
{
Local<Object> settingsObj = Local<Object>::Cast(args[0]);
newBuffer->setParametersFromObject(newBuffer, settingsObj);
}
setTiObjectToJsObject(result, newBuffer);
return handleScope.Close(result);
}
| 30.491304
| 116
| 0.626551
|
ssaracut
|
472c13c8bac9a4f62364f5a302fcda89a0af9315
| 1,776
|
cpp
|
C++
|
src/dot.cpp
|
Xazax-hun/conceptanalysis
|
d552889345ad2c8aff294bff21b1788f126b312a
|
[
"Apache-2.0"
] | null | null | null |
src/dot.cpp
|
Xazax-hun/conceptanalysis
|
d552889345ad2c8aff294bff21b1788f126b312a
|
[
"Apache-2.0"
] | null | null | null |
src/dot.cpp
|
Xazax-hun/conceptanalysis
|
d552889345ad2c8aff294bff21b1788f126b312a
|
[
"Apache-2.0"
] | null | null | null |
#include "include/dot.h"
#include <sstream>
namespace {
Concept minimizedForDisplay(int conc, const Lattice& l, const ConceptContext& data) {
std::set<int> preds;
std::set<int> succs;
for (auto e : l.less) {
if (conc == e.second)
preds.insert(e.first);
if (conc == e.first)
succs.insert(e.second);
}
bitset oldAttrs(data.attributeNames.size(), false);
for (auto pred : preds)
oldAttrs = set_union(oldAttrs, l.concepts[pred].attributes);
bitset newAttrs = set_subtract(l.concepts[conc].attributes, oldAttrs);
bitset oldObjs(data.objectNames.size(), false);
for (auto succ : succs)
oldObjs = set_union(oldObjs, l.concepts[succ].objects);
bitset newObjs = set_subtract(l.concepts[conc].objects, oldObjs);
return {newObjs, newAttrs};
}
} // anonymous namespace
// TODO: introduce proper escaping.
std::string renderDot(const Lattice& l, const ConceptContext& data) {
std::stringstream dot;
dot << "digraph concept_lattice {\n";
dot << "splines = false\n";
dot << "edge [dir=none tailport=\"s\" headport=\"n\"]\n";
dot << "node [shape=record]\n\n";
for (unsigned i = 0; i < l.concepts.size(); ++i) {
auto conc = minimizedForDisplay(i, l, data);
dot << "node" << i << " [label=\"";
for (int i : to_sparse(conc.objects)) {
dot << data.objectNames[i] << " ";
}
dot << "|";
for (int i : to_sparse(conc.attributes)) {
dot << data.attributeNames[i] << " ";
}
dot << "\"];\n";
}
dot << "\n";
for (auto e : l.less) {
dot << "node" << e.first << " -> " << "node" << e.second << ";\n";
}
dot << "}\n";
return std::move(dot).str();
}
| 29.6
| 85
| 0.561937
|
Xazax-hun
|
472c5da2e930d392c22ee1c4e325cce03f433956
| 1,241
|
cpp
|
C++
|
lanqiao/2022/b.cpp
|
Zilanlann/cp-code
|
0500acbf6fb05a66f7bdbdf0e0a8bd6170126a4a
|
[
"MIT"
] | 3
|
2022-03-30T14:14:57.000Z
|
2022-03-31T04:30:32.000Z
|
lanqiao/2022/b.cpp
|
Zilanlann/cp-code
|
0500acbf6fb05a66f7bdbdf0e0a8bd6170126a4a
|
[
"MIT"
] | null | null | null |
lanqiao/2022/b.cpp
|
Zilanlann/cp-code
|
0500acbf6fb05a66f7bdbdf0e0a8bd6170126a4a
|
[
"MIT"
] | null | null | null |
#include <bits/stdc++.h>
using namespace std;
bool solve(string v) {
for (int i = 0; i < 8 - 2; i++) {
if (v[i + 2] == v[i + 1] + 1 && v[i + 1] == v[i] + 1) {
return true;
}
}
return false;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
//IO
//freopen("bout.txt", "w", stdout);
int cnt = 0;
string s = "2022";
for (int i = 1; i <= 12; i++) {
string str = s;
if (i < 10) {
str += '0';
}
str += to_string(i);
if (i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12) {
for (int j = 1; j <= 31; j++) {
string v = str;
if (j < 10) {
v += '0';
}
v += to_string(j);
if (solve(v)) cnt++;
//cout << v << '\n';
}
}
else if (i == 4 || i == 6 || i == 9 || i == 11) {
for (int j = 1; j <= 30; j++) {
string v = str;
if (j < 10) {
v += '0';
}
v += to_string(j);
if (solve(v)) cnt++;
//cout << v << '\n';
}
}
else {
for (int j = 1; j <= 28; j++) {
string v = str;
if (j < 10) {
v += '0';
}
v += to_string(j);
if (solve(v)) cnt++;
//cout << v << "\n";
}
}
}
cout << cnt << "\n";
return 0;
}
| 18.522388
| 78
| 0.362611
|
Zilanlann
|
472f9ace358db5d80a235e2ea0ee961ee0f74f09
| 970
|
cpp
|
C++
|
lib/homie/node/node.cpp
|
2SmartCloud/2smart-cloud-esp8266-boilerplate
|
c40dace65f5ce5f27677b039ae8bb1e123a66723
|
[
"MIT"
] | 2
|
2021-11-16T15:21:09.000Z
|
2021-11-19T17:07:37.000Z
|
lib/homie/node/node.cpp
|
2SmartCloud/2smart-cloud-esp8266-sonoff-s20
|
721e6f159fe4d7b2a630e21cd012507d8bb5085b
|
[
"MIT"
] | null | null | null |
lib/homie/node/node.cpp
|
2SmartCloud/2smart-cloud-esp8266-sonoff-s20
|
721e6f159fe4d7b2a630e21cd012507d8bb5085b
|
[
"MIT"
] | null | null | null |
#include "node.h"
#include <utility>
Node::Node(const char* name, const char* id, Device* device) {
name_ = name;
id_ = id;
device_ = device;
}
bool Node::Init(Homie* homie) {
homie_ = homie;
homie->Publish(*this, "name", name_, true);
homie->Publish(*this, "state", state_, true);
bool status = true;
for (auto it = begin(properties_); it != end(properties_); ++it) {
if (!(*it->second).Init(homie_)) status = false;
}
return status;
}
void Node::AddProperty(Property* property) {
properties_.insert(std::pair<String, Property*>((property->GetId()).c_str(), property));
}
String Node::GetId() const { return id_; }
Device* Node::GetDevice() const { return this->device_; }
Property* Node::GetProperty(String id) { return properties_.find(id)->second; }
void Node::HandleCurrentState() {
for (auto it = begin(properties_); it != end(properties_); ++it) {
(*it->second).HandleCurrentState();
}
}
| 26.944444
| 92
| 0.63299
|
2SmartCloud
|
47325ac39c029ba65ebc59db7c4736ee05d3eb80
| 282
|
cpp
|
C++
|
Schweizer-Messer/numpy_eigen/src/autogen_test_module/test_D_5_float.cpp
|
mmmspatz/kalibr
|
e2e881e5d25d378f0c500c67e00532ee1c1082fd
|
[
"BSD-4-Clause"
] | null | null | null |
Schweizer-Messer/numpy_eigen/src/autogen_test_module/test_D_5_float.cpp
|
mmmspatz/kalibr
|
e2e881e5d25d378f0c500c67e00532ee1c1082fd
|
[
"BSD-4-Clause"
] | null | null | null |
Schweizer-Messer/numpy_eigen/src/autogen_test_module/test_D_5_float.cpp
|
mmmspatz/kalibr
|
e2e881e5d25d378f0c500c67e00532ee1c1082fd
|
[
"BSD-4-Clause"
] | null | null | null |
#include <eigen3/Eigen/Core>
#include <numpy_eigen/boost_python_headers.hpp>
Eigen::Matrix<float, Eigen::Dynamic, 5> test_float_D_5(const Eigen::Matrix<float, Eigen::Dynamic, 5> & M)
{
return M;
}
void export_float_D_5()
{
boost::python::def("test_float_D_5",test_float_D_5);
}
| 21.692308
| 105
| 0.744681
|
mmmspatz
|
47343ea6154bcd0c7bc45a4d0d7dfe96fd63044f
| 3,974
|
hpp
|
C++
|
palette.hpp
|
rsenn/qjs-opencv
|
8035073ad8360636b816700325d92f4934e47e63
|
[
"MIT"
] | null | null | null |
palette.hpp
|
rsenn/qjs-opencv
|
8035073ad8360636b816700325d92f4934e47e63
|
[
"MIT"
] | null | null | null |
palette.hpp
|
rsenn/qjs-opencv
|
8035073ad8360636b816700325d92f4934e47e63
|
[
"MIT"
] | null | null | null |
#ifndef PALETTE_HPP
#define PALETTE_HPP
#include "jsbindings.hpp"
#include "js_array.hpp"
#include <opencv2/core/hal/interface.h>
#include <opencv2/core/mat.hpp>
#include <opencv2/core/mat.inl.hpp>
#include <cstdio>
template<class Container>
static inline void
palette_read(JSContext* ctx, JSValueConst arr, Container& out, float factor = 1.0f) {
size_t i, len = js_array_length(ctx, arr);
for(i = 0; i < len; i++) {
cv::Scalar scalar;
JSColorData<uint8_t> color;
JSValue item = JS_GetPropertyUint32(ctx, arr, i);
js_array_to(ctx, item, scalar);
JS_FreeValue(ctx, item);
std::transform(&scalar[0], &scalar[4], color.arr.begin(), [factor](double val) -> uint8_t { return val * factor; });
out.push_back(color);
}
}
template<class Pixel>
static inline void
palette_apply(const cv::Mat& src, JSOutputArray dst, Pixel palette[256]) {
cv::Mat result(src.size(), CV_8UC3);
// printf("result.size() = %ux%u\n", result.cols, result.rows);
// printf("result.channels() = %u\n", result.channels());
// printf("src.elemSize() = %zu\n", src.elemSize());
// printf("result.elemSize() = %zu\n", result.elemSize());
// printf("result.ptr<Pixel>(0,1) - result.ptr<Pixel>(0,0) = %zu\n", reinterpret_cast<uchar*>(result.ptr<Pixel>(0, 1)) -
// reinterpret_cast<uchar*>(result.ptr<Pixel>(0, 0)));
for(int y = 0; y < src.rows; y++) {
for(int x = 0; x < src.cols; x++) {
uchar index = src.at<uchar>(y, x);
result.at<Pixel>(y, x) = palette[index];
}
}
result.copyTo(dst.getMatRef());
}
static inline float
square(float x) {
return x * x;
}
template<class ColorType>
static inline JSColorData<float>
color3f(const ColorType& c) {
JSColorData<float> ret;
ret.b = float(c.b) / 255.0;
ret.g = float(c.g) / 255.0;
ret.r = float(c.r) / 255.0;
return ret;
}
template<class ColorType>
static inline float
color_distance_squared(const ColorType& c1, const ColorType& c2) {
JSColorData<float> a = color3f(c1), b = color3f(c2);
// NOTE: from https://www.compuphase.com/cmetric.htm
float mean_r = (a.r + b.r) * 0.5f;
float dr = a.r - b.r;
float dg = a.g - b.g;
float db = a.b - b.b;
return ((2.0f + mean_r * (1.0f / 256.0f)) * square(dr) + (4.0f * square(dg)) + (2.0f + ((255.0f - mean_r) * (1.0f / 256.0f))) * square(db));
}
template<class ColorType>
static inline int
find_nearest(const ColorType& color, const std::vector<ColorType>& palette, int skip = -1) {
int index, ret = -1, size = palette.size();
float distance = std::numeric_limits<float>::max();
for(index = 0; index < size; index++) {
if(index == skip)
continue;
float newdist = color_distance_squared(color, palette[index]);
if(newdist < distance) {
distance = newdist;
ret = index;
}
}
return ret;
}
template<class ColorType>
static inline void
palette_match(const cv::Mat& src, JSOutputArray dst, const std::vector<ColorType>& palette, int transparent = -1) {
cv::Mat result(src.rows, src.cols, CV_8U);
const uchar* ptr(src.ptr());
size_t step(src.step);
size_t elem_size(src.elemSize());
if(transparent == -1) {
for(int y = 0; y < src.rows; y++) {
for(int x = 0; x < src.cols; x++) {
const ColorType& color = *reinterpret_cast<const ColorType*>(ptr + (x * elem_size));
int index = find_nearest(color, palette);
if((int)(unsigned int)(uchar)index == index)
result.at<uchar>(y, x) = index;
}
ptr += step;
}
} else {
for(int y = 0; y < src.rows; y++) {
for(int x = 0; x < src.cols; x++) {
const ColorType& color = *reinterpret_cast<const ColorType*>(ptr + (x * elem_size));
int index = color.a > 127 ? find_nearest(color, palette, transparent) : transparent;
if((int)(unsigned int)(uchar)index == index)
result.at<uchar>(y, x) = index;
}
ptr += step;
}
}
dst.assign(result); // result.copyTo(dst.getMatRef());
}
#endif /* PALETTE_HPP */
| 28.797101
| 142
| 0.624811
|
rsenn
|
473606e9e57605d14cc36446bfc8f714886ae17d
| 4,619
|
cpp
|
C++
|
documents/code/Chapter7/MarchingTetrahedra/TetrahedraMarcher.cpp
|
evertonantunes/OpenGLPlayground
|
1a7a9caaf81b250b90585dcdc128f6d55e391f7e
|
[
"MIT"
] | null | null | null |
documents/code/Chapter7/MarchingTetrahedra/TetrahedraMarcher.cpp
|
evertonantunes/OpenGLPlayground
|
1a7a9caaf81b250b90585dcdc128f6d55e391f7e
|
[
"MIT"
] | null | null | null |
documents/code/Chapter7/MarchingTetrahedra/TetrahedraMarcher.cpp
|
evertonantunes/OpenGLPlayground
|
1a7a9caaf81b250b90585dcdc128f6d55e391f7e
|
[
"MIT"
] | null | null | null |
#include "TetrahedraMarcher.h"
#include <fstream>
#include "Tables.h"
TetrahedraMarcher::TetrahedraMarcher(void)
{
XDIM = 256;
YDIM = 256;
ZDIM = 256;
pVolume = NULL;
}
TetrahedraMarcher::~TetrahedraMarcher(void)
{
if(pVolume!=NULL) {
delete [] pVolume;
pVolume = NULL;
}
}
void TetrahedraMarcher::SetVolumeDimensions(const int xdim, const int ydim, const int zdim) {
XDIM = xdim;
YDIM = ydim;
ZDIM = zdim;
invDim.x = 1.0f/XDIM;
invDim.y = 1.0f/YDIM;
invDim.z = 1.0f/ZDIM;
}
void TetrahedraMarcher::SetNumSamplingVoxels(const int x, const int y, const int z) {
X_SAMPLING_DIST = x;
Y_SAMPLING_DIST = y;
Z_SAMPLING_DIST = z;
}
void TetrahedraMarcher::SetIsosurfaceValue(const GLubyte value) {
isoValue = value;
}
bool TetrahedraMarcher::LoadVolume(const std::string& filename) {
std::ifstream infile(filename.c_str(), std::ios_base::binary);
if(infile.good()) {
pVolume = new GLubyte[XDIM*YDIM*ZDIM];
infile.read(reinterpret_cast<char*>(pVolume), XDIM*YDIM*ZDIM*sizeof(GLubyte));
infile.close();
return true;
} else {
return false;
}
}
void TetrahedraMarcher::SampleVoxel(const int x, const int y, const int z, glm::vec3 scale) {
GLubyte cubeCornerValues[8];
int flagIndex, edgeFlags, i;
glm::vec3 edgeVertices[12];
glm::vec3 edgeNormals[12];
//Make a local copy of the values at the cube's corners
for( i = 0; i < 8; i++) {
cubeCornerValues[i] = SampleVolume( x + (int)(a2fVertexOffset[i][0]*scale.x),
y + (int)(a2fVertexOffset[i][1]*scale.y),
z + (int)(a2fVertexOffset[i][2]*scale.z));
}
//Find which vertices are inside of the surface and which are outside
//Obtain a flagIndex based on if the value at the cube vertex is less
//than the given isovalue
flagIndex = 0;
for( i= 0; i<8; i++) {
if(cubeCornerValues[i] <= isoValue)
flagIndex |= 1<<i;
}
//Find which edges are intersected by the surface
edgeFlags = aiCubeEdgeFlags[flagIndex];
//If the cube is entirely inside or outside of the surface, then there will be no intersections
if(edgeFlags == 0)
{
return;
}
//for all edges
for(i = 0; i < 12; i++)
{
//if there is an intersection on this edge
if(edgeFlags & (1<<i))
{
//get the offset
float offset = GetOffset(cubeCornerValues[ a2iEdgeConnection[i][0] ], cubeCornerValues[ a2iEdgeConnection[i][1] ]);
//use offset to get the vertex position
edgeVertices[i].x = x + (a2fVertexOffset[ a2iEdgeConnection[i][0] ][0] + offset * a2fEdgeDirection[i][0])*scale.x ;
edgeVertices[i].y = y + (a2fVertexOffset[ a2iEdgeConnection[i][0] ][1] + offset * a2fEdgeDirection[i][1])*scale.y ;
edgeVertices[i].z = z + (a2fVertexOffset[ a2iEdgeConnection[i][0] ][2] + offset * a2fEdgeDirection[i][2])*scale.z ;
//use the vertex position to get the normal
edgeNormals[i] = GetNormal( (int)edgeVertices[i].x , (int)edgeVertices[i].y , (int)edgeVertices[i].z );
}
}
//Draw the triangles that were found. There can be up to five per cube
for(i = 0; i< 5; i++)
{
if(a2iTriangleConnectionTable[flagIndex][3*i] < 0)
break;
for(int j= 0; j< 3; j++)
{
int vertex = a2iTriangleConnectionTable[flagIndex][3*i+j];
Vertex v;
v.normal = (edgeNormals[vertex]);
v.pos = (edgeVertices[vertex])*invDim;
vertices.push_back(v);
}
}
}
void TetrahedraMarcher::MarchVolume() {
vertices.clear();
int dx = XDIM/X_SAMPLING_DIST;
int dy = YDIM/Y_SAMPLING_DIST;
int dz = ZDIM/Z_SAMPLING_DIST;
glm::vec3 scale = glm::vec3(dx,dy,dz);
for(int z=0;z<ZDIM;z+=dz) {
for(int y=0;y<YDIM;y+=dy) {
for(int x=0;x<XDIM;x+=dx) {
SampleVoxel(x,y,z, scale);
}
}
}
}
size_t TetrahedraMarcher::GetTotalVertices() {
return vertices.size();
}
Vertex* TetrahedraMarcher::GetVertexPointer() {
return &vertices[0];
}
GLubyte TetrahedraMarcher::SampleVolume(const int x, const int y, const int z) {
int index = (x+(y*XDIM)) + z*(XDIM*YDIM);
if(index<0)
index = 0;
if(index >= XDIM*YDIM*ZDIM)
index = (XDIM*YDIM*ZDIM)-1;
return pVolume[index];
}
glm::vec3 TetrahedraMarcher::GetNormal (const int x, const int y, const int z) {
glm::vec3 N;
N.x = (SampleVolume(x-1,y,z)-SampleVolume(x+1,y,z))*0.5f ;
N.y = (SampleVolume(x,y-1,z)-SampleVolume(x,y+1,z))*0.5f ;
N.z = (SampleVolume(x,y,z-1)-SampleVolume(x,y,z+1))*0.5f ;
return glm::normalize(N);
}
float TetrahedraMarcher::GetOffset(const GLubyte v1, const GLubyte v2) {
float delta = (float)(v2-v1);
if(delta == 0)
return 0.5f;
else
return (isoValue-v1)/delta;
}
| 27.993939
| 120
| 0.652739
|
evertonantunes
|
473731e1e9bd21c7cc06f33cff6cb8fdac9b44c1
| 18,378
|
cpp
|
C++
|
Max Objects/macOS/sofa~.mxo/Contents/Resources/SOFA/src/SOFADate.cpp
|
APL-Huddersfield/SOFA-for-Max
|
55e2dbe4b6ffa9e948cfaae2f134fbc00f5b354f
|
[
"BSD-3-Clause"
] | 15
|
2019-03-31T22:03:21.000Z
|
2022-02-25T04:15:49.000Z
|
Max Objects/macOS/sofa~.mxo/Contents/Resources/SOFA/src/SOFADate.cpp
|
APL-Huddersfield/SOFA-for-Max
|
55e2dbe4b6ffa9e948cfaae2f134fbc00f5b354f
|
[
"BSD-3-Clause"
] | 1
|
2022-03-15T16:14:57.000Z
|
2022-03-30T11:05:04.000Z
|
Max Objects/macOS/sofa~.mxo/Contents/Resources/SOFA/src/SOFADate.cpp
|
APL-Huddersfield/SOFA-for-Max
|
55e2dbe4b6ffa9e948cfaae2f134fbc00f5b354f
|
[
"BSD-3-Clause"
] | 2
|
2019-03-31T22:04:08.000Z
|
2020-12-31T08:49:54.000Z
|
/*
Copyright (c) 2013--2017, UMR STMS 9912 - Ircam-Centre Pompidou / CNRS / UPMC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
Spatial acoustic data file format - AES69-2015 - Standard for File Exchange - Spatial Acoustic Data File Format
http://www.aes.org
SOFA (Spatially Oriented Format for Acoustics)
http://www.sofaconventions.org
*/
/************************************************************************************/
/*!
* @file SOFADate.cpp
* @brief Useful methods to represent and manipulate date and time
* @author Thibaut Carpentier, UMR STMS 9912 - Ircam-Centre Pompidou / CNRS / UPMC
*
* @date 10/05/2013
*
*/
/************************************************************************************/
#include "../src/SOFADate.h"
#include "../src/SOFAString.h"
#include "../src/SOFAHostArchitecture.h"
#include <sstream>
#include <iostream>
#if( SOFA_UNIX == 1 || SOFA_MAC == 1 )
#include <time.h>
#include <sys/time.h>
#endif
#if( SOFA_MAC == 1 )
#include <sys/time.h>
#include <mach/mach_time.h>
#endif
using namespace sofa;
#if ( SOFA_WINDOWS == 1 )
#include <windows.h>
#include <time.h>
#include <sys/timeb.h>
#define literal64bit(longLiteral) ((__int64) longLiteral)
#else
#define literal64bit(longLiteral) (longLiteral##LL)
#endif
namespace DateHelper
{
static struct tm ConvertMillisecondsToLocalTime (const long long millis)
{
struct tm result;
#if ( SOFA_WINDOWS == 1 )
const __int64 seconds = millis / 1000;
#else
const long long seconds = millis / 1000;
#endif
if (seconds < literal64bit (86400) || seconds >= literal64bit (2145916800))
{
// use extended maths for dates beyond 1970 to 2037..
const int timeZoneAdjustment = 31536000 - (int) ( sofa::Date(1971, 0, 1, 0, 0).GetMillisecondsSinceEpoch() / 1000);
const long long jdm = seconds + timeZoneAdjustment + literal64bit (210866803200);
const int days = (int) (jdm / literal64bit (86400));
const int a = 32044 + days;
const int b = (4 * a + 3) / 146097;
const int c = a - (b * 146097) / 4;
const int d = (4 * c + 3) / 1461;
const int e = c - (d * 1461) / 4;
const int m = (5 * e + 2) / 153;
result.tm_mday = e - (153 * m + 2) / 5 + 1;
result.tm_mon = m + 2 - 12 * (m / 10);
result.tm_year = b * 100 + d - 6700 + (m / 10);
result.tm_wday = (days + 1) % 7;
result.tm_yday = -1;
int t = (int) (jdm % literal64bit (86400));
result.tm_hour = t / 3600;
t %= 3600;
result.tm_min = t / 60;
result.tm_sec = t % 60;
result.tm_isdst = -1;
}
else
{
time_t now = static_cast <time_t> (seconds);
#if ( SOFA_WINDOWS == 1 )
#ifdef _INC_TIME_INL
if (now >= 0 && now <= 0x793406fff)
{
localtime_s (&result, &now);
}
else
{
memset( &result, 0, sizeof (result) );
}
#else
result = *localtime (&now);
#endif
#else
// more thread-safe
localtime_r (&now, &result);
#endif
}
return result;
}
static int extendedModulo (const long long value, const int modulo)
{
return (int) (value >= 0 ? (value % modulo)
: (value - ((value / modulo) + 1) * modulo));
}
}
Date Date::GetCurrentDate()
{
return Date( Date::GetCurrentSystemTime() );
}
/************************************************************************************/
/*!
* @brief Creates a Date object
*
* @details This default constructor creates a time of 1st January 1970, (which is
* represented internally as 0ms).
*/
/************************************************************************************/
Date::Date()
: millisSinceEpoch( 0 )
{
}
/************************************************************************************/
/*!
* @brief Copy constructor
*
*/
/************************************************************************************/
Date::Date( const Date &other )
: millisSinceEpoch( other.millisSinceEpoch )
{
}
/************************************************************************************/
/*!
* @brief Copy operator
*
*/
/************************************************************************************/
Date & Date::operator= (const Date &other)
{
millisSinceEpoch = other.millisSinceEpoch;
return *this;
}
/************************************************************************************/
/*!
* @brief Creates a Date object based on a number of milliseconds.
*
* @details The internal millisecond count is set to 0 (1st January 1970). To create a
* time object set to the current time, use GetCurrentTime().
*/
/************************************************************************************/
Date::Date(const long long millisecondsSinceEpoch)
: millisSinceEpoch( millisecondsSinceEpoch )
{
}
long long Date::GetMillisecondsSinceEpoch() const
{
return millisSinceEpoch;
}
/************************************************************************************/
/*!
* @brief Creates a date from a string literal in ISO8601 format
* i.e. yyyy-mm-dd HH:MM:SS
* @param[in] -
* @param[out] -
* @param[in, out] -
* @return -
*
*/
/************************************************************************************/
Date::Date(const std::string &iso8601)
: millisSinceEpoch( 0 )
{
const bool valid = Date::IsValid( iso8601 );
if( valid == true )
{
const std::string yyyy = iso8601.substr( 0, 4 );
const std::string mm = iso8601.substr( 5, 2 );
const std::string dd = iso8601.substr( 8, 2 );
const std::string hh = iso8601.substr( 11, 2 );
const std::string min = iso8601.substr( 14, 2 );
const std::string sec = iso8601.substr( 17, 2 );
const int year = atoi( yyyy.c_str() );
const int month = atoi( mm.c_str() );
const int day = atoi( dd.c_str() );
const int hours = atoi( hh.c_str() );
const int minutes = atoi( min.c_str() );
const int seconds = atoi( sec.c_str() );
if( year < 0 || month < 0 || day < 0 || hours < 0 || minutes < 0 || seconds < 0)
{
SOFA_ASSERT( false );
}
const sofa::Date tmp( year, month, day, hours, minutes, seconds );
*this = tmp;
}
}
/************************************************************************************/
/*!
* @brief Creates a Date from a set of date components
* @param[in] year : the year, in 4-digit format, e.g. 2004
* @param[in] month : the month, in the range 1 to 12
* @param[in] day : the day of the month, in the range 1 to 31
* @param[in] hours : hours in 24-hour clock format, 0 to 23
* @param[in] minutes : minutes 0 to 59
* @param[in] seconds :seconds 0 to 59
* @param[in] milliseconds : milliseconds 0 to 999
*
*/
/************************************************************************************/
Date::Date (const unsigned int year,
const unsigned int month_,
const unsigned int day,
const unsigned int hours,
const unsigned int minutes,
const unsigned int seconds,
const unsigned int milliseconds)
: millisSinceEpoch( 0 )
{
SOFA_ASSERT( year > 100 ); // year must be a 4-digit version
SOFA_ASSERT( month_ >= 1 && month_ <= 12);
SOFA_ASSERT( day >= 1 && day <= 31);
const unsigned int month = month_ - 1; ///< struct tm use [0-11] for month range
if( year < 1971 || year >= 2038 )
{
// use extended maths for dates beyond 1970 to 2037..
const int timeZoneAdjustment = 0;
const int a = (13 - month) / 12;
const int y = year + 4800 - a;
const int jd = day + (153 * (month + 12 * a - 2) + 2) / 5
+ (y * 365) + (y / 4) - (y / 100) + (y / 400)
- 32045;
const long long s = ((long long) jd) * literal64bit (86400) - literal64bit (210866803200);
millisSinceEpoch = 1000 * (s + (hours * 3600 + minutes * 60 + seconds - timeZoneAdjustment))
+ milliseconds;
}
else
{
struct tm t;
t.tm_year = year - 1900;
t.tm_mon = month;
t.tm_mday = day;
t.tm_hour = hours;
t.tm_min = minutes;
t.tm_sec = seconds;
t.tm_isdst = -1;
millisSinceEpoch = 1000 * (long long) mktime (&t);
if (millisSinceEpoch < 0)
{
millisSinceEpoch = 0;
}
else
{
millisSinceEpoch += milliseconds;
}
}
}
unsigned long long Date::getMillisecondsSinceStartup()
{
#if( SOFA_WINDOWS == 1 )
return (unsigned long long) timeGetTime();
#elif( SOFA_MAC == 1 )
const int64_t kOneMillion = 1000 * 1000;
static mach_timebase_info_data_t s_timebase_info;
if( s_timebase_info.denom == 0 )
{
(void) mach_timebase_info( &s_timebase_info );
}
// mach_absolute_time() returns billionth of seconds,
// so divide by one million to get milliseconds
return (unsigned long long)( (mach_absolute_time() * s_timebase_info.numer) / (kOneMillion * s_timebase_info.denom) );
#elif( SOFA_UNIX == 1 )
timespec t;
clock_gettime( CLOCK_MONOTONIC, &t );
return t.tv_sec * 1000 + t.tv_nsec / 1000000;
#else
#error "Unknown host architecture"
#endif
}
/************************************************************************************/
/*!
* @brief Returns the current system time
*
* @details Returns the number of milliseconds since midnight jan 1st 1970
*/
/************************************************************************************/
long long Date::GetCurrentSystemTime()
{
static unsigned int lastCounterResult = 0xffffffff;
static long long correction = 0;
const unsigned int now = (unsigned int) Date::getMillisecondsSinceStartup();
// check the counter hasn't wrapped (also triggered the first time this function is called)
if( now < lastCounterResult )
{
// double-check it's actually wrapped, in case multi-cpu machines have timers that drift a bit.
if ( lastCounterResult == 0xffffffff || now < lastCounterResult - 10 )
{
// get the time once using normal library calls, and store the difference needed to
// turn the millisecond counter into a real time.
#if ( SOFA_WINDOWS == 1 )
struct _timeb t;
#ifdef _INC_TIME_INL
_ftime_s (&t);
#else
_ftime (&t);
#endif
correction = (((long long) t.time) * 1000 + t.millitm) - now;
#else
struct timeval tv;
struct timezone tz;
gettimeofday (&tv, &tz);
correction = (((long long) tv.tv_sec) * 1000 + tv.tv_usec / 1000) - now;
#endif
}
}
lastCounterResult = now;
return correction + now;
}
unsigned int Date::GetYear() const
{
return DateHelper::ConvertMillisecondsToLocalTime( this->millisSinceEpoch ).tm_year + 1900;
}
unsigned int Date::GetMonth() const
{
///@n returns month in the range [1-12]
return DateHelper::ConvertMillisecondsToLocalTime( this->millisSinceEpoch ).tm_mon + 1;
}
unsigned int Date::GetDay() const
{
return DateHelper::ConvertMillisecondsToLocalTime( this->millisSinceEpoch ).tm_mday;
}
unsigned int Date::GetHours() const
{
return DateHelper::ConvertMillisecondsToLocalTime( this->millisSinceEpoch ).tm_hour;
}
unsigned int Date::GetMinutes() const
{
return DateHelper::ConvertMillisecondsToLocalTime( this->millisSinceEpoch ).tm_min;
}
unsigned int Date::GetSeconds() const
{
return DateHelper::extendedModulo ( this->millisSinceEpoch / 1000, 60 );
}
unsigned int Date::GetMilliSeconds() const
{
return DateHelper::extendedModulo( this->millisSinceEpoch, 1000 );
}
std::string Date::ToISO8601() const
{
const unsigned int yyyy = GetYear();
const unsigned int mm = GetMonth();
const unsigned int dd = GetDay();
const unsigned int hh = GetHours();
const unsigned int min = GetMinutes();
const unsigned int ss = GetSeconds();
std::ostringstream str;
str << yyyy;
str << "-";
if( mm < 10 )
{
/// zero-pad
str << "0";
}
str << mm;
str << "-";
if( dd < 10 )
{
/// zero-pad
str << "0";
}
str << dd;
str << " ";
if( hh < 10 )
{
/// zero-pad
str << "0";
}
str << hh;
str << ":";
if( min < 10 )
{
/// zero-pad
str << "0";
}
str << min;
str << ":";
if( ss < 10 )
{
/// zero-pad
str << "0";
}
str << ss;
return str.str();
}
bool Date::IsValid() const
{
const unsigned int d = GetDay();
const unsigned int m = GetMonth();
const unsigned int y = GetYear();
const unsigned int hh = GetHours();
const unsigned int min = GetMinutes();
const unsigned int sec = GetSeconds();
if( d < 1 || d > 31 )
{
return false;
}
if( m < 1 || m > 12 )
{
return false;
}
if( y < 100 )
{
return false;
}
if( m == 4 || m == 6 || m == 9 || m == 11 )
{
if( d > 30 )
{
return false;
}
}
if( m == 2 && d > 29 )
{
return false;
}
if( hh > 24 )
{
return false;
}
if( min > 59 )
{
return false;
}
if( sec > 60 )
{
return false;
}
return true;
}
/************************************************************************************/
/*!
* @brief Returns true if a string represents a Date with ISO8601 format
* i.e. yyyy-mm-dd HH:MM:SS
* @param[in] -
* @param[out] -
* @param[in, out] -
* @return -
*
*/
/************************************************************************************/
bool Date::IsValid(const std::string &iso8601)
{
const std::size_t length = iso8601.length();
if( length != 19 )
{
return false;
}
const char * content = iso8601.c_str();
if( sofa::String::IsInt( content[0] ) == false
|| sofa::String::IsInt( content[1] ) == false
|| sofa::String::IsInt( content[2] ) == false
|| sofa::String::IsInt( content[3] ) == false
|| sofa::String::IsInt( content[5] ) == false
|| sofa::String::IsInt( content[6] ) == false
|| sofa::String::IsInt( content[8] ) == false
|| sofa::String::IsInt( content[9] ) == false
|| sofa::String::IsInt( content[11] ) == false
|| sofa::String::IsInt( content[12] ) == false
|| sofa::String::IsInt( content[14] ) == false
|| sofa::String::IsInt( content[15] ) == false
|| sofa::String::IsInt( content[17] ) == false
|| sofa::String::IsInt( content[18] ) == false
)
{
return false;
}
if( content[4] != '-' || content[7] != '-' )
{
return false;
}
if( content[10] != ' ' )
{
return false;
}
if( content[13] != ':' || content[16] != ':' )
{
return false;
}
const std::string yyyy = iso8601.substr( 0, 4 );
const std::string mm = iso8601.substr( 5, 2 );
const std::string dd = iso8601.substr( 8, 2 );
const std::string hh = iso8601.substr( 11, 2 );
const std::string min = iso8601.substr( 14, 2 );
const std::string sec = iso8601.substr( 17, 2 );
const int year = sofa::String::String2Int( yyyy );
const int month = sofa::String::String2Int( mm );
const int day = sofa::String::String2Int( dd );
const int hours = sofa::String::String2Int( hh );
const int minutes = sofa::String::String2Int( min );
const int seconds = sofa::String::String2Int( sec );
if( year < 0 || month < 0 || day < 0 || hours < 0 || minutes < 0 || seconds < 0)
{
return false;
}
const sofa::Date tmp( year, month, day, hours, minutes, seconds );
return tmp.IsValid();
}
| 29.594203
| 127
| 0.512188
|
APL-Huddersfield
|
473b00feadf6feea3657aeebfd555c7af7f8ed95
| 635
|
hpp
|
C++
|
BaCa_P2/zadanieA/src/BitSetLib.hpp
|
arhmichal/P2_BaCa
|
2567897544c907dac60290c3b727fc170310786c
|
[
"MIT"
] | 1
|
2018-03-21T18:29:29.000Z
|
2018-03-21T18:29:29.000Z
|
BaCa_P2/zadanieA/src/BitSetLib.hpp
|
arhmichal/P2_BaCa
|
2567897544c907dac60290c3b727fc170310786c
|
[
"MIT"
] | null | null | null |
BaCa_P2/zadanieA/src/BitSetLib.hpp
|
arhmichal/P2_BaCa
|
2567897544c907dac60290c3b727fc170310786c
|
[
"MIT"
] | null | null | null |
#pragma once
#include <iostream>
#include <string>
#include <sstream>
void Emplace(std::string, int*);
void Insert(std::string, int*);
void Erase(std::string, int*);
void Print(int, std::string*);
bool Emptiness(int);
bool Nonempty(int);
bool Member(std::string, int);
bool Disjoint(int, int);
bool Conjunctive(int, int);
bool Equality(int, int);
bool Inclusion(int, int);
void Union(int, int, int*);
void Intersection(int, int, int*);
void Symmetric(int, int, int*);
void Difference(int, int, int*);
void Complement(int, int*);
bool LessThen(int, int);
bool LessEqual(int, int);
bool GreatEqual(int, int);
bool GreatThen(int, int);
| 23.518519
| 34
| 0.711811
|
arhmichal
|
4741de12653948415081686fc85895d4ff90ccb1
| 3,515
|
cpp
|
C++
|
QVES-App/DataPanel.cpp
|
joaconigro/QVES
|
66498286838a60dbc7d3c1bd7bc7644208ae05a3
|
[
"MIT"
] | 2
|
2017-08-09T17:32:47.000Z
|
2018-04-03T11:05:12.000Z
|
QVES-App/DataPanel.cpp
|
joaconigro/QVES
|
66498286838a60dbc7d3c1bd7bc7644208ae05a3
|
[
"MIT"
] | null | null | null |
QVES-App/DataPanel.cpp
|
joaconigro/QVES
|
66498286838a60dbc7d3c1bd7bc7644208ae05a3
|
[
"MIT"
] | 2
|
2017-10-19T04:44:37.000Z
|
2019-04-29T08:59:44.000Z
|
#include "DataPanel.h"
#include "ui_DataPanel.h"
DataPanel::DataPanel(QVESModelDelegate *delegate, QWidget *parent) :
QWidget(parent),
ui(new Ui::DataPanel),
mainDelegate(delegate)
{
ui->setupUi(this);
ui->radioButtonField->setChecked(true);
mResetSelection = false;
selectionModel = nullptr;
changeShowedData();
ui->tableView->setItemDelegate(new TableDelegate);
ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
connect(ui->comboBoxCurrentVes, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, &DataPanel::currentVESIndexChanged);
connect(ui->comboBoxVesModel, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), this, &DataPanel::currentVESModelIndexChanged);
}
DataPanel::~DataPanel()
{
delete ui;
}
void DataPanel::setMyModel()
{
ui->tableView->reset();
ui->tableView->setModel(mainDelegate->currentModel());
selectionModel = ui->tableView->selectionModel();
connect(selectionModel, &QItemSelectionModel::selectionChanged, this, &DataPanel::selectionChanged);
for (int c = 0; c < ui->tableView->horizontalHeader()->count(); ++c)
{
ui->tableView->horizontalHeader()->setSectionResizeMode(c, QHeaderView::Stretch);
}
loadVESNames();
loadModelNames();
if (mResetSelection){
selectionModel->select(mPreviousIndex, QItemSelectionModel::Select);
mResetSelection = false;
}
}
void DataPanel::loadVESNames()
{
ui->comboBoxCurrentVes->clear();
ui->comboBoxCurrentVes->addItems(mainDelegate->vesNames());
ui->comboBoxCurrentVes->blockSignals(true);
ui->comboBoxCurrentVes->setCurrentIndex(mainDelegate->currentVESIndex());
ui->comboBoxCurrentVes->blockSignals(false);
}
void DataPanel::loadModelNames()
{
ui->comboBoxVesModel->clear();
ui->comboBoxVesModel->addItems(mainDelegate->modelNames());
ui->comboBoxVesModel->setCurrentIndex(mainDelegate->currentVESModelIndex());
}
void DataPanel::changeShowedData()
{
if(ui->radioButtonField->isChecked()){
mSelectedData = TableModel::DataType::Field;
ui->tableView->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed);
}else if (ui->radioButtonSplice->isChecked()) {
mSelectedData = TableModel::DataType::Splice;
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
}else if (ui->radioButtonCalculated->isChecked()) {
mSelectedData = TableModel::DataType::Calculated;
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
}else if (ui->radioButtonModeled->isChecked()) {
mSelectedData = TableModel::DataType::Model;
ui->tableView->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed);
}
if (selectionModel)
selectionModel->clearSelection();
emit showedDataChanged(mSelectedData);
}
void DataPanel::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
{
Q_UNUSED(selected)
Q_UNUSED(deselected)
QList<int> indices;
int i;
foreach (const auto &s, selectionModel->selectedIndexes()) {
i = s.row();
if(!(indices.contains(i)))
indices.append(i);
}
emit rowSelectionChanged(indices, mSelectedData);
}
void DataPanel::restoreSelection(const QModelIndex &index)
{
mPreviousIndex = index;
mResetSelection = true;
}
| 33.47619
| 144
| 0.714651
|
joaconigro
|
474334400e6b7b54ea439df22a9af425ed1fedb4
| 1,425
|
cpp
|
C++
|
learn_opencv3.1.0/source/chapter/chapter_030.cpp
|
k9bao/learn_opencv
|
6fc6ec435ed2223d43f6a79c97ceb2475f7bf5c3
|
[
"Apache-2.0"
] | null | null | null |
learn_opencv3.1.0/source/chapter/chapter_030.cpp
|
k9bao/learn_opencv
|
6fc6ec435ed2223d43f6a79c97ceb2475f7bf5c3
|
[
"Apache-2.0"
] | null | null | null |
learn_opencv3.1.0/source/chapter/chapter_030.cpp
|
k9bao/learn_opencv
|
6fc6ec435ed2223d43f6a79c97ceb2475f7bf5c3
|
[
"Apache-2.0"
] | null | null | null |
#include <iostream>
#include <math.h>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
Mat src, dst;
const char *output_win = "findcontours-demo";
int threshold_value = 100;
int threshold_max = 255;
RNG rng;
void Demo_Contours(int, void *);
int main(int argc, char **argv) {
src = imread("happyfish.png");
if (src.empty()) {
printf("could not load image...\n");
return -1;
}
namedWindow("input-image", CV_WINDOW_AUTOSIZE);
namedWindow(output_win, CV_WINDOW_AUTOSIZE);
imshow("input-image", src);
cvtColor(src, src, CV_BGR2GRAY);
const char *trackbar_title = "Threshold Value:";
createTrackbar(trackbar_title, output_win, &threshold_value, threshold_max, Demo_Contours);
Demo_Contours(0, 0);
waitKey(0);
return 0;
}
void Demo_Contours(int, void *) {
Mat canny_output;
vector<vector<Point>> contours;
vector<Vec4i> hierachy;
Canny(src, canny_output, threshold_value, threshold_value * 2, 3, false);
findContours(canny_output, contours, hierachy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0));
dst = Mat::zeros(src.size(), CV_8UC3);
RNG rng(12345);
for (size_t i = 0; i < contours.size(); i++) {
Scalar color = Scalar(rng.uniform(0, 255), rng.uniform(0, 255), rng.uniform(0, 255));
drawContours(dst, contours, i, color, 2, 8, hierachy, 0, Point(0, 0));
}
imshow(output_win, dst);
}
| 30.319149
| 96
| 0.666667
|
k9bao
|
4745f641e7c0cbfd95ff7354442d29603f99b28e
| 941
|
cpp
|
C++
|
src/tools/qt-gui/src/editkeycommand.cpp
|
D-os/libelektra
|
e39f439bfa5ff1fe56e6c8c7ee290913449d1dde
|
[
"BSD-3-Clause"
] | null | null | null |
src/tools/qt-gui/src/editkeycommand.cpp
|
D-os/libelektra
|
e39f439bfa5ff1fe56e6c8c7ee290913449d1dde
|
[
"BSD-3-Clause"
] | null | null | null |
src/tools/qt-gui/src/editkeycommand.cpp
|
D-os/libelektra
|
e39f439bfa5ff1fe56e6c8c7ee290913449d1dde
|
[
"BSD-3-Clause"
] | null | null | null |
#include "editkeycommand.hpp"
EditKeyCommand::EditKeyCommand(TreeViewModel* model, int index, DataContainer* data, QUndoCommand* parent)
: QUndoCommand(parent)
, m_model(model)
, m_index(index)
, m_oldName(data->oldName())
, m_oldValue(data->oldValue())
, m_oldMetaData(data->oldMetadata())
, m_newName(data->newName())
, m_newValue(data->newValue())
, m_newMetaData(data->newMetadata())
{
setText("edit");
}
void EditKeyCommand::undo()
{
QModelIndex index = m_model->index(m_index);
m_model->setData(index, m_oldName, TreeViewModel::NameRole);
m_model->setData(index, m_oldValue, TreeViewModel::ValueRole);
m_model->model().at(m_index)->setMeta(m_oldMetaData);
}
void EditKeyCommand::redo()
{
QModelIndex index = m_model->index(m_index);
m_model->setData(index, m_newName, TreeViewModel::NameRole);
m_model->setData(index, m_newValue, TreeViewModel::ValueRole);
m_model->model().at(m_index)->setMeta(m_newMetaData);
}
| 29.40625
| 106
| 0.746015
|
D-os
|
4749bff31a4155950511394e49ba3aece171cec7
| 4,431
|
cpp
|
C++
|
src/Utils/HttpParser.cpp
|
lkmaks/caos-http-web-server-by-Lavrik-Karmazin
|
a2bd3ca9a7f0418e331a7a7f9b874e6c876c8739
|
[
"MIT"
] | null | null | null |
src/Utils/HttpParser.cpp
|
lkmaks/caos-http-web-server-by-Lavrik-Karmazin
|
a2bd3ca9a7f0418e331a7a7f9b874e6c876c8739
|
[
"MIT"
] | null | null | null |
src/Utils/HttpParser.cpp
|
lkmaks/caos-http-web-server-by-Lavrik-Karmazin
|
a2bd3ca9a7f0418e331a7a7f9b874e6c876c8739
|
[
"MIT"
] | null | null | null |
#include <string>
#include <vector>
#include <map>
#include "HttpParser.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include "GeneralUtils.h"
#include "Debug.hpp"
typedef std::string::size_type size_type;
bool is_substr(const std::string &t, const std::string &s, int pos) {
// is t a susbtr of s from position pos in s
// pos is correct position in s
if (pos + t.size() > s.size()) {
return false;
}
for (int i = 0; i < t.size(); ++i) {
if (t[i] != s[pos + i]) {
return false;
}
}
return true;
}
bool is_okay_uri(const std::string &uri) {
return true; // for now
}
bool is_ok_http_firstline(const std::string &data, int end_pos,
std::vector<std::string> &http_methods, HttpFirstLine &first_line) {
std::string right_method;
for (auto &method : http_methods) {
if (is_substr(method, data, 0)) {
right_method = method;
}
}
if (right_method.empty()) {
return false;
}
std::string ending("HTTP/1.1");
if (!is_substr(ending, data, (int)end_pos - (int)ending.size())) {
return false;
}
int uri_len = end_pos - (int)(right_method.size() + ending.size() + 2);
if (uri_len <= 0 ||
data[right_method.size()] != ' ' ||
data[end_pos - ending.size() - 1] != ' ') {
return false;
}
std::string uri = data.substr(right_method.size() + 1, uri_len);
if (!is_okay_uri(uri)) {
return false;
}
first_line.method = right_method;
first_line.uri = uri;
return true;
}
bool is_ok_header_section(const std::string &data, int start_pos, int end_pos, HttpHeaders &headers) {
std::map<std::string, std::string> result;
size_type i = start_pos;
while (i < end_pos) {
size_type j = data.find("\r\n", i);
if (j == std::string::npos) {
j = data.size();
}
std::string cur_str = data.substr(i, j - i);
size_type pos = cur_str.find(": ");
if (pos == std::string::npos) {
return false;
}
std::string left = cur_str.substr(0, pos);
std::string right = cur_str.substr(pos + 2, cur_str.size() - (pos + 2));
result[left] = right;
i = j + 2;
}
headers.dict = std::move(result);
return true;
}
bool is_http_end_of_line(const std::string &data, int pos) {
if (pos == 0) {
return false;
}
return data.substr(pos - 1, 2) == "\r\n";
}
bool is_http_end_of_headers(const std::string &data, int pos) {
if (pos < 3) {
return false;
}
return data.substr(pos - 3, 4) == "\r\n\r\n";
}
bool is_ok_path(const std::string &path) {
// check if path is of template:
// /{s_1}/.../{s_n}, s_i does not contain '/', is not '.' or '..', is not empty
auto arr = split(path, '/');
if (arr.empty()) {
return false;
}
if (arr[0] != "") {
return false;
}
for (int i = 1; i < arr.size(); ++i) {
if (arr[i] == "" || arr[i] == "." || arr[i] == "..") {
return false;
}
}
return true;
}
bool file_exists(const std::string &path) {
// assume is_ok_path(path)
FILE *file = fopen(path.c_str(), "r");
if (!file) {
return false;
}
fclose(file);
return true;
}
bool is_gettable_file(const std::string &path, Config &config) {
// assume is_ok_path(path),
// file_exists(path) == true
struct stat statbuf;
int status = lstat(path.c_str(), &statbuf);
if (!(status == 0 && S_ISREG(statbuf.st_mode))) {
return false;
}
int pos = config.data_dir.size() + 2; // after / after data_dir
auto pos2 = path.find("/", pos); // that will be '/' after hostname dir
return is_substr("static/", path, pos2 + 1); // have to go through static dir (dir_1 == static)
}
bool is_ok_qvalue_list(const std::string &str, std::vector<std::string> &mime_types) {
auto vec = split(str, ',');
for (auto &part : vec) {
mime_types.push_back(part.substr(0, part.find(';')));
}
return true; // tolerancy, for now
}
int file_size(const std::string &path) {
// assume is_ok_path(path), file_exists(path)
struct stat statbuf;
lstat(path.c_str(), &statbuf);
return statbuf.st_size;
}
std::string file_contents(const std::string &path) {
// assume is_ok_path(path), file_exists(path)
FILE *file = fopen(path.c_str(), "r");
int chunk_size = 256;
char buf[chunk_size];
std::string res;
int cnt;
while ((cnt = fread(buf, 1, chunk_size, file)) > 0) {
for (int i = 0; i < cnt; ++i) {
res.push_back(buf[i]);
}
}
return res;
}
| 24.213115
| 102
| 0.60009
|
lkmaks
|
4749d5691fdc3d53230a2008b7ea862ed6cc64a6
| 8,947
|
cpp
|
C++
|
src/Game/Terrain/Block.cpp
|
NikiNatov/Minecraft_Clone
|
f3c04d595f06ceca2c060f44d67d2b4be751896c
|
[
"Apache-2.0"
] | null | null | null |
src/Game/Terrain/Block.cpp
|
NikiNatov/Minecraft_Clone
|
f3c04d595f06ceca2c060f44d67d2b4be751896c
|
[
"Apache-2.0"
] | null | null | null |
src/Game/Terrain/Block.cpp
|
NikiNatov/Minecraft_Clone
|
f3c04d595f06ceca2c060f44d67d2b4be751896c
|
[
"Apache-2.0"
] | null | null | null |
#include "pch.h"
#include "Block.h"
#include "Graphics\SpriteManager.h"
std::vector<ScopedPtr<Block>> Block::s_Blocks;
Block::Block(BlockID id)
: m_ID(id)
{
glm::vec3 positions[8];
positions[0] = { 0.0f, 0.0f, 1.0f };
positions[1] = { 1.0f, 0.0f, 1.0f };
positions[2] = { 1.0f, 1.0f, 1.0f };
positions[3] = { 0.0f, 1.0f, 1.0f };
positions[4] = { 0.0f, 0.0f, 0.0f };
positions[5] = { 1.0f, 0.0f, 0.0f };
positions[6] = { 1.0f, 1.0f, 0.0f };
positions[7] = { 0.0f, 1.0f, 0.0f };
glm::vec3 normals[6];
normals[(uint8_t)BlockFaceID::Front] = { 0.0f, 0.0f, 1.0f };
normals[(uint8_t)BlockFaceID::Back] = { 0.0f, 0.0f, -1.0f };
normals[(uint8_t)BlockFaceID::Left] = { -1.0f, 0.0f, 0.0f };
normals[(uint8_t)BlockFaceID::Right] = { 1.0f, 0.0f, 0.0f };
normals[(uint8_t)BlockFaceID::Up] = { 0.0f, 1.0f, 0.0f };
normals[(uint8_t)BlockFaceID::Down] = { 0.0f, -1.0f, 0.0f };
// Front face
m_Faces[(uint8_t)BlockFaceID::Front].Vertices[0].Position = positions[0];
m_Faces[(uint8_t)BlockFaceID::Front].Vertices[1].Position = positions[1];
m_Faces[(uint8_t)BlockFaceID::Front].Vertices[2].Position = positions[2];
m_Faces[(uint8_t)BlockFaceID::Front].Vertices[3].Position = positions[3];
for (int i = 0; i < 4; i++)
{
m_Faces[(uint8_t)BlockFaceID::Front].Vertices[i].Normal = normals[(uint8_t)BlockFaceID::Front];
m_Faces[(uint8_t)BlockFaceID::Front].Vertices[i].LightLevel = 0.8f;
}
// Back face
m_Faces[(uint8_t)BlockFaceID::Back].Vertices[0].Position = positions[4];
m_Faces[(uint8_t)BlockFaceID::Back].Vertices[1].Position = positions[5];
m_Faces[(uint8_t)BlockFaceID::Back].Vertices[2].Position = positions[6];
m_Faces[(uint8_t)BlockFaceID::Back].Vertices[3].Position = positions[7];
for (int i = 0; i < 4; i++)
{
m_Faces[(uint8_t)BlockFaceID::Back].Vertices[i].Normal = normals[(uint8_t)BlockFaceID::Back];
m_Faces[(uint8_t)BlockFaceID::Back].Vertices[i].LightLevel = 0.8f;
}
// Left face
m_Faces[(uint8_t)BlockFaceID::Left].Vertices[0].Position = positions[4];
m_Faces[(uint8_t)BlockFaceID::Left].Vertices[1].Position = positions[0];
m_Faces[(uint8_t)BlockFaceID::Left].Vertices[2].Position = positions[3];
m_Faces[(uint8_t)BlockFaceID::Left].Vertices[3].Position = positions[7];
for (int i = 0; i < 4; i++)
{
m_Faces[(uint8_t)BlockFaceID::Left].Vertices[i].Normal = normals[(uint8_t)BlockFaceID::Left];
m_Faces[(uint8_t)BlockFaceID::Left].Vertices[i].LightLevel = 0.6f;
}
// Right face
m_Faces[(uint8_t)BlockFaceID::Right].Vertices[0].Position = positions[1];
m_Faces[(uint8_t)BlockFaceID::Right].Vertices[1].Position = positions[5];
m_Faces[(uint8_t)BlockFaceID::Right].Vertices[2].Position = positions[6];
m_Faces[(uint8_t)BlockFaceID::Right].Vertices[3].Position = positions[2];
for (int i = 0; i < 4; i++)
{
m_Faces[(uint8_t)BlockFaceID::Right].Vertices[i].Normal = normals[(uint8_t)BlockFaceID::Right];
m_Faces[(uint8_t)BlockFaceID::Right].Vertices[i].LightLevel = 0.6f;
}
// Up face
m_Faces[(uint8_t)BlockFaceID::Up].Vertices[0].Position = positions[3];
m_Faces[(uint8_t)BlockFaceID::Up].Vertices[1].Position = positions[2];
m_Faces[(uint8_t)BlockFaceID::Up].Vertices[2].Position = positions[6];
m_Faces[(uint8_t)BlockFaceID::Up].Vertices[3].Position = positions[7];
for (int i = 0; i < 4; i++)
{
m_Faces[(uint8_t)BlockFaceID::Up].Vertices[i].Normal = normals[(uint8_t)BlockFaceID::Up];
m_Faces[(uint8_t)BlockFaceID::Up].Vertices[i].LightLevel = 1.0f;
}
// Down face
m_Faces[(uint8_t)BlockFaceID::Down].Vertices[0].Position = positions[0];
m_Faces[(uint8_t)BlockFaceID::Down].Vertices[1].Position = positions[1];
m_Faces[(uint8_t)BlockFaceID::Down].Vertices[2].Position = positions[5];
m_Faces[(uint8_t)BlockFaceID::Down].Vertices[3].Position = positions[4];
for (int i = 0; i < 4; i++)
{
m_Faces[(uint8_t)BlockFaceID::Down].Vertices[i].Normal = normals[(uint8_t)BlockFaceID::Down];
m_Faces[(uint8_t)BlockFaceID::Down].Vertices[i].LightLevel = 0.4f;
}
SetBlockTextures(id);
}
void Block::SetBlockTextures(BlockID block)
{
Ref<SubTexture2D> upFace, downFace, leftFace, rightFace, frontFace, backFace;
switch (block)
{
case BlockID::Grass:
{
upFace = SpriteManager::GetSprite("GrassTop");
downFace = SpriteManager::GetSprite("Dirt");
leftFace = SpriteManager::GetSprite("GrassSide");
rightFace = SpriteManager::GetSprite("GrassSide");
frontFace = SpriteManager::GetSprite("GrassSide");
backFace = SpriteManager::GetSprite("GrassSide");
break;
}
case BlockID::Dirt:
{
upFace = SpriteManager::GetSprite("Dirt");
downFace = SpriteManager::GetSprite("Dirt");
leftFace = SpriteManager::GetSprite("Dirt");
rightFace = SpriteManager::GetSprite("Dirt");
frontFace = SpriteManager::GetSprite("Dirt");
backFace = SpriteManager::GetSprite("Dirt");
break;
}
case BlockID::Stone:
{
upFace = SpriteManager::GetSprite("Stone");
downFace = SpriteManager::GetSprite("Stone");
leftFace = SpriteManager::GetSprite("Stone");
rightFace = SpriteManager::GetSprite("Stone");
frontFace = SpriteManager::GetSprite("Stone");
backFace = SpriteManager::GetSprite("Stone");
break;
}
case BlockID::Bedrock:
{
upFace = SpriteManager::GetSprite("Bedrock");
downFace = SpriteManager::GetSprite("Bedrock");
leftFace = SpriteManager::GetSprite("Bedrock");
rightFace = SpriteManager::GetSprite("Bedrock");
frontFace = SpriteManager::GetSprite("Bedrock");
backFace = SpriteManager::GetSprite("Bedrock");
break;
}
case BlockID::Water:
{
upFace = SpriteManager::GetSprite("Water");
downFace = SpriteManager::GetSprite("Water");
leftFace = SpriteManager::GetSprite("Water");
rightFace = SpriteManager::GetSprite("Water");
frontFace = SpriteManager::GetSprite("Water");
backFace = SpriteManager::GetSprite("Water");
break;
}
case BlockID::Sand:
{
upFace = SpriteManager::GetSprite("Sand");
downFace = SpriteManager::GetSprite("Sand");
leftFace = SpriteManager::GetSprite("Sand");
rightFace = SpriteManager::GetSprite("Sand");
frontFace = SpriteManager::GetSprite("Sand");
backFace = SpriteManager::GetSprite("Sand");
break;
}
case BlockID::Wood:
{
upFace = SpriteManager::GetSprite("WoodTop");
downFace = SpriteManager::GetSprite("WoodTop");
leftFace = SpriteManager::GetSprite("Wood");
rightFace = SpriteManager::GetSprite("Wood");
frontFace = SpriteManager::GetSprite("Wood");
backFace = SpriteManager::GetSprite("Wood");
break;
}
case BlockID::Leaf:
{
upFace = SpriteManager::GetSprite("Leaf");
downFace = SpriteManager::GetSprite("Leaf");
leftFace = SpriteManager::GetSprite("Leaf");
rightFace = SpriteManager::GetSprite("Leaf");
frontFace = SpriteManager::GetSprite("Leaf");
backFace = SpriteManager::GetSprite("Leaf");
break;
}
case BlockID::Plank:
{
upFace = SpriteManager::GetSprite("Plank");
downFace = SpriteManager::GetSprite("Plank");
leftFace = SpriteManager::GetSprite("Plank");
rightFace = SpriteManager::GetSprite("Plank");
frontFace = SpriteManager::GetSprite("Plank");
backFace = SpriteManager::GetSprite("Plank");
break;
}
case BlockID::Glass:
{
upFace = SpriteManager::GetSprite("Glass");
downFace = SpriteManager::GetSprite("Glass");
leftFace = SpriteManager::GetSprite("Glass");
rightFace = SpriteManager::GetSprite("Glass");
frontFace = SpriteManager::GetSprite("Glass");
backFace = SpriteManager::GetSprite("Glass");
break;
}
}
for (int i = 0; i < 4; i++)
{
m_Faces[(int8_t)BlockFaceID::Up].Vertices[i].TexCoord = upFace->GetTextureCoords()[i];
m_Faces[(int8_t)BlockFaceID::Down].Vertices[i].TexCoord = downFace->GetTextureCoords()[i];
m_Faces[(int8_t)BlockFaceID::Left].Vertices[i].TexCoord = leftFace->GetTextureCoords()[i];
m_Faces[(int8_t)BlockFaceID::Right].Vertices[i].TexCoord = rightFace->GetTextureCoords()[i];
m_Faces[(int8_t)BlockFaceID::Front].Vertices[i].TexCoord = frontFace->GetTextureCoords()[i];
m_Faces[(int8_t)BlockFaceID::Back].Vertices[i].TexCoord = backFace->GetTextureCoords()[i];
}
}
void Block::CreateBlockTemplates()
{
s_Blocks.resize(10);
s_Blocks[(int8_t)BlockID::Grass] = CreateScoped<Block>(BlockID::Grass);
s_Blocks[(int8_t)BlockID::Dirt] = CreateScoped<Block>(BlockID::Dirt);
s_Blocks[(int8_t)BlockID::Stone] = CreateScoped<Block>(BlockID::Stone);
s_Blocks[(int8_t)BlockID::Bedrock] = CreateScoped<Block>(BlockID::Bedrock);
s_Blocks[(int8_t)BlockID::Water] = CreateScoped<Block>(BlockID::Water);
s_Blocks[(int8_t)BlockID::Sand] = CreateScoped<Block>(BlockID::Sand);
s_Blocks[(int8_t)BlockID::Wood] = CreateScoped<Block>(BlockID::Wood);
s_Blocks[(int8_t)BlockID::Leaf] = CreateScoped<Block>(BlockID::Leaf);
s_Blocks[(int8_t)BlockID::Plank] = CreateScoped<Block>(BlockID::Plank);
s_Blocks[(int8_t)BlockID::Glass] = CreateScoped<Block>(BlockID::Glass);
}
| 37.592437
| 97
| 0.692858
|
NikiNatov
|
e6df7175e64f904976d2bdc4555fd81e363172fd
| 656
|
cpp
|
C++
|
Subiecte 2009/V16 II 5.cpp
|
jbara2002/Informatica_LCIB
|
ff9db6d7d6119ba835750cc2d408079f76b852df
|
[
"CC0-1.0"
] | 1
|
2022-03-31T21:45:03.000Z
|
2022-03-31T21:45:03.000Z
|
Subiecte 2009/V16 II 5.cpp
|
jbara2002/Informatica_LCIB
|
ff9db6d7d6119ba835750cc2d408079f76b852df
|
[
"CC0-1.0"
] | null | null | null |
Subiecte 2009/V16 II 5.cpp
|
jbara2002/Informatica_LCIB
|
ff9db6d7d6119ba835750cc2d408079f76b852df
|
[
"CC0-1.0"
] | null | null | null |
#include <iostream>
using namespace std;
int main()
{
int a[16][16], n, i, j;
cin >> n;
for(i=1; i<=n; i++)
{
for(j=1; j<=n; j++)
{
if(i+j==n+1) /// Suntem pe diagonala secundara.
{
a[i][j] = 4;
}
else if(i==j) /// Suntem pe diagonala principala.
{
a[i][j] = 4;
}
else
{
a[i][j] = 3;
}
}
}
for(i=1; i<=n; i++)
{
for(j=1; j<=n; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}
return 0;
}
| 15.619048
| 62
| 0.291159
|
jbara2002
|
e6e13e4fb4ad558e7a2c66389e0817740bdaf028
| 432
|
cpp
|
C++
|
src/format.cpp
|
julesser/CppND-System-Monitor
|
8480d73ef2bb9c70d1c4e0eba7dbb861f87c05de
|
[
"MIT"
] | null | null | null |
src/format.cpp
|
julesser/CppND-System-Monitor
|
8480d73ef2bb9c70d1c4e0eba7dbb861f87c05de
|
[
"MIT"
] | null | null | null |
src/format.cpp
|
julesser/CppND-System-Monitor
|
8480d73ef2bb9c70d1c4e0eba7dbb861f87c05de
|
[
"MIT"
] | null | null | null |
#include "format.h"
#include <string>
using std::string;
// DONE: Complete this helper function
// INPUT: Long int measuring seconds
// OUTPUT: HH:MM:SS
string Format::ElapsedTime(long seconds) {
int min = int((seconds / (60)) % 60);
int sec = int(seconds % (60));
int hrs = int(min / (60 * 60));
string time = std::to_string(hrs) + ":" + std::to_string(min) + ":" +
std::to_string(sec);
return time;
}
| 24
| 71
| 0.611111
|
julesser
|
e6e82a72fea08c5bea940bc545aca53d20de3d6a
| 66,403
|
cpp
|
C++
|
EndlessReachHD/Private/EndlessReachHDPawn.cpp
|
Soverance/EndlessReachHD
|
1e670fa265e78ea8c8c30d510282a39176c7215d
|
[
"Apache-2.0"
] | 11
|
2017-07-25T11:57:28.000Z
|
2020-10-24T04:26:20.000Z
|
EndlessReachHD/Private/EndlessReachHDPawn.cpp
|
Soverance/EndlessReachHD
|
1e670fa265e78ea8c8c30d510282a39176c7215d
|
[
"Apache-2.0"
] | null | null | null |
EndlessReachHD/Private/EndlessReachHDPawn.cpp
|
Soverance/EndlessReachHD
|
1e670fa265e78ea8c8c30d510282a39176c7215d
|
[
"Apache-2.0"
] | 4
|
2018-03-30T10:53:09.000Z
|
2020-06-27T22:40:14.000Z
|
// © 2012 - 2019 Soverance Studios
// https://soverance.com
// 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 "EndlessReachHD.h"
#include "EndlessReachHDPawn.h"
#include "Enemies/EnemyMaster.h"
#include "Environment/Asteroid.h"
#include "Pickups/PickupMaster.h"
#include "Pickups/Orb.h"
#include "Pickups/FuelCell.h"
#include "Pickups/Laser.h"
#include "Pickups/BombCore.h"
#include "Projectiles/Cannonball.h"
#include "Projectiles/Bomb.h"
#include "TimerManager.h"
// Create bindings for input - these are originally declared in DefaultInput.ini
// AXIS
const FName AEndlessReachHDPawn::MoveForwardBinding("MoveForward");
const FName AEndlessReachHDPawn::MoveRightBinding("MoveRight");
const FName AEndlessReachHDPawn::FireForwardBinding("FireForward");
const FName AEndlessReachHDPawn::FireRightBinding("FireRight");
// ACTIONS
const FName AEndlessReachHDPawn::LaserBinding("Laser");
const FName AEndlessReachHDPawn::ThrustersBinding("Thrusters");
const FName AEndlessReachHDPawn::ActionBinding("Action");
const FName AEndlessReachHDPawn::BackBinding("Back");
const FName AEndlessReachHDPawn::DebugBinding("Debug");
const FName AEndlessReachHDPawn::MenuBinding("Menu");
const FName AEndlessReachHDPawn::LeftBinding("Left");
const FName AEndlessReachHDPawn::RightBinding("Right");
// Construct pawn
AEndlessReachHDPawn::AEndlessReachHDPawn()
{
// Ship Default Specs
CurrentHP = 1000;
MaxHP = 1000;
ATK = 25.0f;
DEF = 25.0f;
OrbCount = 0;
bCanMove = true;
MoveSpeed = 50.0f;
MaxVelocity = 500.0f;
MaxThrustVelocity = 1000.0f;
FanSpeed = 50.0f;
FuelLevel = 1000.0f;
MaxFuel = 1000.0f;
bThustersActive = false;
bLowFuel = false;
bMissilesEnabled = false;
bMagnetEnabled = false;
GunOffset = FVector(140.f, 0.f, 0.f);
FireRate = 0.2f;
bCanFire = true;
bLaserUnlocked = false;
bLaserEnabled = false;
LaserChargeCount = 0;
LaserChargeMax = 0;
bIsDocked = false;
bBombsUnlocked = false;
bCanFireBomb = true;
BombCount = 0;
BombMax = 0;
LookSensitivity = 5.0f;
CamRotSpeed = 5.0f;
ClampDegreeMin = -40.0f;
ClampDegreeMax = 40.0f;
RollX = 0;
PitchY = 0;
YawZ = 0;
bIsDead = false;
// Upgrade Level Initialization
ShipTypeLevel = 0;
HealthLevel = 0;
ThrustersLevel = 0;
CannonLevel = 0;
LaserLevel = 0;
MagnetLevel = 0;
MissilesLevel = 0;
ShieldLevel = 0;
BombLevel = 0;
// Ship Body
static ConstructorHelpers::FObjectFinder<UStaticMesh> ShipMesh(TEXT("/Game/ShipScout_Upgrades/Meshes/SM_ShipScout_Set1_Body.SM_ShipScout_Set1_Body"));
ShipMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("ShipBody"));
RootComponent = ShipMeshComponent;
ShipMeshComponent->SetCollisionProfileName(UCollisionProfile::Pawn_ProfileName);
ShipMeshComponent->SetStaticMesh(ShipMesh.Object);
ShipMeshComponent->SetRelativeRotation(FRotator(0, -90, 0));
ShipMeshComponent->SetWorldScale3D(FVector(0.3f, 0.3f, 0.3f));
ShipMeshComponent->SetSimulatePhysics(true);
ShipMeshComponent->BodyInstance.bLockZTranslation = true;
ShipMeshComponent->BodyInstance.bLockXRotation = true;
ShipMeshComponent->BodyInstance.bLockYRotation = true;
// Gun Attachments
static ConstructorHelpers::FObjectFinder<UStaticMesh> ShipGuns(TEXT("/Game/ShipScout_Upgrades/Meshes/SM_ShipScout_Set1_Attachments.SM_ShipScout_Set1_Attachments"));
ShipMeshGuns = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("ShipGuns"));
ShipMeshGuns->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);
ShipMeshGuns->SetStaticMesh(ShipGuns.Object);
// Left Fan
static ConstructorHelpers::FObjectFinder<UStaticMesh> LeftFan(TEXT("/Game/ShipScout_Upgrades/Meshes/SM_ShipScout_Set1_Fan.SM_ShipScout_Set1_Fan"));
ShipMeshFanL = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("LeftFan"));
ShipMeshFanL->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);
ShipMeshFanL->SetStaticMesh(LeftFan.Object);
// Left Fan Rotation
RotatingMovement_FanL = CreateDefaultSubobject<URotatingMovementComponent>(TEXT("RotatingMovement_FanL"));
RotatingMovement_FanL->SetUpdatedComponent(ShipMeshFanL); // set the updated component
RotatingMovement_FanL->RotationRate = FRotator(0,FanSpeed,0);
// Right Fan
static ConstructorHelpers::FObjectFinder<UStaticMesh> RightFan(TEXT("/Game/ShipScout_Upgrades/Meshes/SM_ShipScout_Set1_Fan.SM_ShipScout_Set1_Fan"));
ShipMeshFanR = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("RightFan"));
ShipMeshFanR->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);
ShipMeshFanR->SetStaticMesh(RightFan.Object);
// Right Fan Rotation
RotatingMovement_FanR = CreateDefaultSubobject<URotatingMovementComponent>(TEXT("RotatingMovement_FanR"));
RotatingMovement_FanR->SetUpdatedComponent(ShipMeshFanR); // set the updated component
RotatingMovement_FanR->RotationRate = FRotator(0, (FanSpeed * -1), 0);
// Tail Fan
static ConstructorHelpers::FObjectFinder<UStaticMesh> TailFan(TEXT("/Game/ShipScout_Upgrades/Meshes/SM_ShipScout_Set1_Fan_Back.SM_ShipScout_Set1_Fan_Back"));
ShipMeshFanT = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("TailFan"));
ShipMeshFanT->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);
ShipMeshFanT->SetStaticMesh(TailFan.Object);
// Tail Fan Rotation
RotatingMovement_FanT = CreateDefaultSubobject<URotatingMovementComponent>(TEXT("RotatingMovement_FanT"));
RotatingMovement_FanT->SetUpdatedComponent(ShipMeshFanT); // set the updated component
RotatingMovement_FanT->RotationRate = FRotator(0, 0, (FanSpeed * -1));
// basic weapon pulse audio
static ConstructorHelpers::FObjectFinder<USoundBase> FireAudio(TEXT("/Game/Audio/Guns/PlayerTurret_Pulse1_Cue.PlayerTurret_Pulse1_Cue"));
FireSound = FireAudio.Object;
// low fuel warning audio
static ConstructorHelpers::FObjectFinder<USoundCue> LowFuelAudio(TEXT("/Game/Audio/Ship/PlayerShip_LowFuelWarning_Cue.PlayerShip_LowFuelWarning_Cue"));
S_LowFuelWarning = LowFuelAudio.Object;
LowFuelWarningSound = CreateDefaultSubobject<UAudioComponent>(TEXT("LowFuelWarningSound"));
LowFuelWarningSound->SetupAttachment(RootComponent);
LowFuelWarningSound->SetSound(S_LowFuelWarning);
LowFuelWarningSound->bAutoActivate = false;
// engine idle noise audio
static ConstructorHelpers::FObjectFinder<USoundCue> EngineIdleAudio(TEXT("/Game/Audio/Ship/PlayerShip_EngineIdle_Cue.PlayerShip_EngineIdle_Cue"));
S_EngineIdle = EngineIdleAudio.Object;
EngineIdleSound = CreateDefaultSubobject<UAudioComponent>(TEXT("EngineIdleSound"));
EngineIdleSound->SetupAttachment(RootComponent);
EngineIdleSound->SetSound(S_EngineIdle);
EngineIdleSound->bAutoActivate = true;
EngineIdleSound->VolumeMultiplier = 0.4f;
// engine thrust noise audio
static ConstructorHelpers::FObjectFinder<USoundCue> EngineThrustAudio(TEXT("/Game/Audio/Ship/PlayerShip_EngineThrust_Cue.PlayerShip_EngineThrust_Cue"));
S_EngineThrust = EngineThrustAudio.Object;
EngineThrustSound = CreateDefaultSubobject<UAudioComponent>(TEXT("EngineThrustSound"));
EngineThrustSound->SetupAttachment(RootComponent);
EngineThrustSound->SetSound(S_EngineThrust);
EngineThrustSound->bAutoActivate = false;
// beam cannon noise audio
static ConstructorHelpers::FObjectFinder<USoundCue> LaserAudio(TEXT("/Game/Audio/Guns/ForwardGun_Laser_Cue.ForwardGun_Laser_Cue"));
S_Laser = LaserAudio.Object;
LaserSound = CreateDefaultSubobject<UAudioComponent>(TEXT("LaserSound"));
LaserSound->SetupAttachment(RootComponent);
LaserSound->SetSound(S_Laser);
LaserSound->bAutoActivate = false;
// bomb shot audio
static ConstructorHelpers::FObjectFinder<USoundBase> BombAudio(TEXT("/Game/Audio/Guns/Bomb_FireShot_Cue.Bomb_FireShot_Cue"));
BombSound = BombAudio.Object;
// Thruster Visual Effect
static ConstructorHelpers::FObjectFinder<UParticleSystem> ThrusterParticleObject(TEXT("/Game/Particles/Emitter/P_BlossomJet.P_BlossomJet"));
P_ThrusterFX = ThrusterParticleObject.Object;
ThrusterFX = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("ThrusterFX"));
ThrusterFX->SetupAttachment(ShipMeshComponent, FName("ThrusterEffectSocket"));
ThrusterFX->SetTemplate(P_ThrusterFX);
ThrusterFX->SetWorldScale3D(FVector(1.0f, 1.0f, 1.0f));
ThrusterFX->bAutoActivate = false;
// Thruster Force Feedback
static ConstructorHelpers::FObjectFinder<UForceFeedbackEffect> ThrustFeedback(TEXT("/Game/ForceFeedback/FF_ShipThrusters.FF_ShipThrusters"));
ThrusterFeedback = ThrustFeedback.Object;
// Beam Cannon Force Feedback
static ConstructorHelpers::FObjectFinder<UForceFeedbackEffect> CannonFeedback(TEXT("/Game/ForceFeedback/FF_Laser.FF_Laser"));
LaserFeedback = CannonFeedback.Object;
// Distortion Visual Effect
static ConstructorHelpers::FObjectFinder<UParticleSystem> DistortionParticleObject(TEXT("/Game/Particles/Emitter/DistortionWave.DistortionWave"));
P_DistortionFX = DistortionParticleObject.Object;
DistortionFX = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("DistortionFX"));
DistortionFX->SetupAttachment(ShipMeshComponent, FName("DistortionEffectSocket"));
DistortionFX->SetTemplate(P_DistortionFX);
DistortionFX->SetWorldScale3D(FVector(0.3f, 0.3f, 0.3f));
DistortionFX->bAutoActivate = true;
// Player HUD Widget
static ConstructorHelpers::FClassFinder<UUserWidget> HUDWidget(TEXT("/Game/Widgets/BP_PlayerHUD.BP_PlayerHUD_C"));
W_PlayerHUD = HUDWidget.Class;
// Hangar Menu Widget
static ConstructorHelpers::FClassFinder<UUserWidget> HangarMenuWidget(TEXT("/Game/Widgets/BP_HangarMenu.BP_HangarMenu_C"));
W_HangarMenu = HangarMenuWidget.Class;
// Create a camera boom...
CameraBoom_TopDown = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom_TopDown"));
CameraBoom_TopDown->SetupAttachment(RootComponent);
CameraBoom_TopDown->bAbsoluteRotation = true; // Don't want arm to rotate when ship does
CameraBoom_TopDown->TargetArmLength = 1200.f;
CameraBoom_TopDown->RelativeRotation = FRotator(-80.0f, 0.0f, 0.0f);
CameraBoom_TopDown->bDoCollisionTest = false; // don't want to pull this camera in when it collides with level
// Create a camera...
Camera_TopDown = CreateDefaultSubobject<UCameraComponent>(TEXT("TopDownCamera"));
Camera_TopDown->SetupAttachment(CameraBoom_TopDown, USpringArmComponent::SocketName);
Camera_TopDown->bUsePawnControlRotation = false; // Camera does not rotate relative to arm
// Create a camera boom...
CameraBoom_Rotational = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom_Rotational"));
CameraBoom_Rotational->SetupAttachment(RootComponent);
CameraBoom_Rotational->bAbsoluteRotation = true; // Don't want arm to rotate when ship does
CameraBoom_Rotational->TargetArmLength = 500.f;
CameraBoom_Rotational->RelativeRotation = FRotator(0.0f, 0.0f, 0.0f);
CameraBoom_Rotational->bDoCollisionTest = false; // I actually did want this camera to collide with the environment, but it was causing issues inside the hangar... it's fine at the short arm length. I didn't want to make zoom feature anyway...
// Create a camera...
Camera_Rotational = CreateDefaultSubobject<UCameraComponent>(TEXT("RotationalCamera"));
Camera_Rotational->SetupAttachment(CameraBoom_Rotational, USpringArmComponent::SocketName);
Camera_Rotational->bUsePawnControlRotation = false; // Camera does not rotate relative to arm
// configure Aggro Radius
AggroRadius = CreateDefaultSubobject<USphereComponent>(TEXT("AggroRadius"));
AggroRadius->SetCollisionProfileName(UCollisionProfile::PhysicsActor_ProfileName);
AggroRadius->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);
AggroRadius->OnComponentBeginOverlap.AddDynamic(this, &AEndlessReachHDPawn::AggroRadiusBeginOverlap); // set up a notification for when this component hits something
AggroRadius->SetSphereRadius(5000); // 5000 max range for aggro by default... we'll try it out for now
AggroRadius->bHiddenInGame = true;
// configure Magnet Radius
MagnetRadius = CreateDefaultSubobject<USphereComponent>(TEXT("MagnetRadius"));
MagnetRadius->SetCollisionProfileName(UCollisionProfile::PhysicsActor_ProfileName);
MagnetRadius->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap);
MagnetRadius->SetSphereRadius(1000); // 3000 seems to be a pretty good max range? maybe 4000 would work too...
MagnetRadius->bHiddenInGame = true;
// Beam Cannon Visual Effect
static ConstructorHelpers::FObjectFinder<UParticleSystem> LaserParticleObject(TEXT("/Game/ShipScout_Upgrades/Particles/P_GreenBeam.P_GreenBeam"));
P_LaserFX = LaserParticleObject.Object;
LaserFX = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("LaserFX"));
LaserFX->SetupAttachment(ShipMeshComponent, FName("LaserEffectSocket"));
LaserFX->SetTemplate(P_LaserFX);
LaserFX->SetRelativeRotation(FRotator(0, 90, 0));
LaserFX->SetWorldScale3D(FVector(1.0f, 1.0f, 1.0f));
LaserFX->bAutoActivate = false;
// configure Beam Cannon Radius
LaserRadius = CreateDefaultSubobject<UBoxComponent>(TEXT("LaserRadius"));
LaserRadius->SetCollisionProfileName(UCollisionProfile::PhysicsActor_ProfileName);
LaserRadius->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap);
LaserRadius->OnComponentBeginOverlap.AddDynamic(this, &AEndlessReachHDPawn::LaserBeginOverlap); // set up a notification for when this component hits something
LaserRadius->SetBoxExtent(FVector(250, 3000, 250));
LaserRadius->bHiddenInGame = true;
// configure Beam Cannon Cam shake
static ConstructorHelpers::FObjectFinder<UClass> LaserCamShakeObject(TEXT("/Game/CamShakes/CS_Laser.CS_Laser_C"));
LaserCamShake = LaserCamShakeObject.Object;
// configure Thruster Cam shake
static ConstructorHelpers::FObjectFinder<UClass> ThrusterCamShakeObject(TEXT("/Game/CamShakes/CS_Thrusters.CS_Thrusters_C"));
ThrusterCamShake = ThrusterCamShakeObject.Object;
// Create Combat Text Component
CombatTextComponent = CreateDefaultSubobject<UCombatTextComponent>(TEXT("Combat Text Component"));
}
void AEndlessReachHDPawn::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent)
{
check(PlayerInputComponent);
// set up gameplay key bindings
// AXIS
PlayerInputComponent->BindAxis(MoveForwardBinding);
PlayerInputComponent->BindAxis(MoveRightBinding);
PlayerInputComponent->BindAxis(FireForwardBinding);
PlayerInputComponent->BindAxis(FireRightBinding);
// ACTIONS
PlayerInputComponent->BindAction(LaserBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::FireLaser);
PlayerInputComponent->BindAction(LaserBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::LaserManualCutoff);
PlayerInputComponent->BindAction(ThrustersBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::FireThrusters);
PlayerInputComponent->BindAction(ThrustersBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::StopThrusters);
PlayerInputComponent->BindAction(DebugBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::StartDebug);
PlayerInputComponent->BindAction(DebugBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::StopDebug);
PlayerInputComponent->BindAction(LeftBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::MenuLeft);
//PlayerInputComponent->BindAction(LeftBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::MenuLeft);
PlayerInputComponent->BindAction(RightBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::MenuRight);
//PlayerInputComponent->BindAction(RightBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::MenuRight);
PlayerInputComponent->BindAction(ActionBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::ActionInput);
//PlayerInputComponent->BindAction(ActionBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::MenuAction);
PlayerInputComponent->BindAction(BackBinding, EInputEvent::IE_Pressed, this, &AEndlessReachHDPawn::BackInput);
//PlayerInputComponent->BindAction(BackBinding, EInputEvent::IE_Released, this, &AEndlessReachHDPawn::MenuBack);
}
// Called when the game starts or when spawned
void AEndlessReachHDPawn::BeginPlay()
{
Super::BeginPlay();
// delay configuration of some components so that the world can be brought online first
FTimerHandle ConfigDelay;
GetWorldTimerManager().SetTimer(ConfigDelay, this, &AEndlessReachHDPawn::ConfigureShip, 0.25f, false);
}
// Debug Test Function
void AEndlessReachHDPawn::StartDebug()
{
Camera_TopDown->SetActive(false, false); // disable top down cam
Camera_Rotational->SetActive(true, false); // enable rotational cam
FViewTargetTransitionParams params;
APlayerController* PlayerController = Cast<APlayerController>(GetController());
PlayerController->SetViewTarget(this, params); // set new camera
bIsDocked = true; // DOCKED
}
// Debug Test Function
void AEndlessReachHDPawn::StopDebug()
{
Camera_TopDown->SetActive(true, false); // enable top down cam
Camera_Rotational->SetActive(false, false); // disable rotational cam
FViewTargetTransitionParams params;
APlayerController* PlayerController = Cast<APlayerController>(GetController());
PlayerController->SetViewTarget(this, params); // set new camera
bIsDocked = false; // UNDOCKED
}
// Configure the Ship's default settings - mostly finishing up attaching actors that require the world to have been brought online
void AEndlessReachHDPawn::ConfigureShip()
{
// Configure Physics Constraint Components to maintain attachment of the ship's objects, like fans, magnet, etc
// we need to use constraints because the ship's body is simulating physics
// We want the guns, fans, and magnet to be stationary and stay exactly where they're attached, which means we're using them more like simple sockets (which sort of defeats the purpose of these physics constraints...)
FConstraintInstance ConstraintInstance_Static; // a basic constraint instance with no intention to move - will function more as a socket than a physics constraint
UCommonLibrary::SetLinearLimits(ConstraintInstance_Static, true, 0, 0, 0, 0, false, 0, 0);
UCommonLibrary::SetAngularLimits(ConstraintInstance_Static, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
// Left Fan Constraint
ShipConstraintFanL = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create left fan constraint
ShipConstraintFanL->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
ShipConstraintFanL->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
ShipConstraintFanL->SetRelativeLocation(FVector(240, 30, 30)); // set default location of constraint
ShipConstraintFanL->SetConstrainedComponents(ShipMeshComponent, NAME_None, ShipMeshFanL, NAME_None); // constrain the left fan to the ship body
ShipMeshFanL->AttachToComponent(ShipConstraintFanL, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach left fan to constraint
ShipMeshFanL->SetRelativeLocation(FVector(0, 0, 0)); // reset fan location
// Right Fan Constraint
ShipConstraintFanR = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create right fan constraint
ShipConstraintFanR->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
ShipConstraintFanR->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
ShipConstraintFanR->SetRelativeLocation(FVector(-240, 30, 30)); // set default location of constraint
ShipConstraintFanR->SetConstrainedComponents(ShipMeshComponent, NAME_None, ShipMeshFanR, NAME_None); // constrain the right fan to the ship body
ShipMeshFanR->AttachToComponent(ShipConstraintFanR, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach left fan to constraint
ShipMeshFanR->SetRelativeLocation(FVector(0, 0, 0)); // reset fan location
// Tail Fan Constraint
ShipConstraintFanT = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create tail fan constraint
ShipConstraintFanT->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
ShipConstraintFanT->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
ShipConstraintFanT->SetRelativeLocation(FVector(0, -400, 130)); // set default location of constraint
ShipConstraintFanT->SetConstrainedComponents(ShipMeshComponent, NAME_None, ShipMeshFanT, NAME_None); // constrain the tail fan to the ship body
ShipMeshFanT->AttachToComponent(ShipConstraintFanT, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach left fan to constraint
ShipMeshFanT->SetRelativeLocation(FVector(0, 0, 0)); // reset fan location
// Gun Attachment Constraint
ShipConstraintGuns = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create gun attachment constraint
ShipConstraintGuns->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
ShipConstraintGuns->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
ShipConstraintGuns->SetRelativeLocation(FVector(0, 0, 0)); // set default location of constraint
ShipConstraintGuns->SetConstrainedComponents(ShipMeshComponent, NAME_None, ShipMeshGuns, NAME_None); // constrain the guns to the ship body
ShipMeshGuns->AttachToComponent(ShipConstraintGuns, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach guns to constraint
ShipMeshGuns->SetRelativeLocation(FVector(0, 0, 0)); // reset gun location
// Beam Cannon Attachment Constraint
LaserConstraint = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create beam cannon constraint
LaserConstraint->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
LaserConstraint->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
LaserConstraint->SetRelativeLocation(FVector(0, 0, 0)); // set default location of constraint
LaserConstraint->SetConstrainedComponents(ShipMeshComponent, NAME_None, LaserRadius, NAME_None); // constrain beam cannon to the ship body
LaserRadius->AttachToComponent(LaserConstraint, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach beam cannon to constraint
LaserRadius->SetRelativeLocation(FVector(0, 2500, 0)); // reset beam cannon location
// Aggro Constraint
AggroConstraint = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create Aggro constraint
AggroConstraint->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
AggroConstraint->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
AggroConstraint->SetRelativeLocation(FVector(0, 0, 0)); // set default location of constraint
AggroConstraint->SetConstrainedComponents(ShipMeshComponent, NAME_None, AggroRadius, NAME_None); // constrain the Aggro radius to the ship body
AggroRadius->AttachToComponent(AggroConstraint, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach radius to constraint
AggroRadius->SetRelativeLocation(FVector(0, 0, 0)); // reset radius location
// Magnet Constraint
MagnetConstraint = NewObject<UPhysicsConstraintComponent>(ShipMeshComponent); // create magnet constraint
MagnetConstraint->ConstraintInstance = ConstraintInstance_Static; // set constraint instance
MagnetConstraint->AttachToComponent(ShipMeshComponent, FAttachmentTransformRules::SnapToTargetIncludingScale, NAME_None); // attach constraint to ship - can add a socket if necessary
MagnetConstraint->SetRelativeLocation(FVector(0, 0, 0)); // set default location of constraint
MagnetConstraint->SetConstrainedComponents(ShipMeshComponent, NAME_None, MagnetRadius, NAME_None); // constrain the magnet radios to the ship body
MagnetRadius->AttachToComponent(MagnetConstraint, FAttachmentTransformRules::SnapToTargetIncludingScale); // Attach magnet to constraint
MagnetRadius->SetRelativeLocation(FVector(0, 0, 0)); // reset magnet location
InitializeAllWidgets(); // init widgets
}
void AEndlessReachHDPawn::Tick(float DeltaSeconds)
{
// Find movement direction
const float ForwardValue = GetInputAxisValue(MoveForwardBinding);
const float RightValue = GetInputAxisValue(MoveRightBinding);
// Clamp max size so that (X=1, Y=1) doesn't cause faster movement in diagonal directions
const FVector MoveDirection = FVector(ForwardValue, RightValue, 0.0f).GetClampedToMaxSize(1.0f);
// Calculate movement
const FVector Movement = MoveDirection * MoveSpeed * DeltaSeconds;
// If stick is being pressed, MOVE
if (Movement.SizeSquared() > 0.0f)
{
// verify that movement is possible
// We don't bother to make this check when the stick is not being pressed
if (bCanMove)
{
ShipMeshComponent->SetLinearDamping(0.01f); // RESET LINEAR DAMPING
ShipMeshComponent->SetAngularDamping(0.01f); // RESET ANGULAR DAMPING
const FRotator NewRotation = Movement.Rotation();
const FRotator CorrectedRotation = FRotator(NewRotation.Pitch, (NewRotation.Yaw - 90), NewRotation.Roll); // correct rotation because of the ship's offset pivot point
FHitResult Hit(1.0f);
EngineIdleSound->VolumeMultiplier = 0.75f; // increase engine noise
RootComponent->MoveComponent(Movement, FMath::Lerp(GetActorRotation(), CorrectedRotation, 0.05f), true, &Hit); // move ship with smooth rotation - (LINEAR) MOVEMENT METHOD
// if the thrusters are not active and the ship is under max velocity, we'll allow light impulse to be applied with the analog stick
if (GetVelocity().Size() < MaxVelocity)
{
ShipMeshComponent->AddImpulseAtLocation(MoveDirection * MaxVelocity, GetActorLocation()); // Apply impulse thrust - (PHYSICS) MOVEMENT METHOD
}
if (Hit.IsValidBlockingHit())
{
const FVector Normal2D = Hit.Normal.GetSafeNormal2D();
const FVector Deflection = FVector::VectorPlaneProject(Movement, Normal2D) * (1.0f - Hit.Time);
RootComponent->MoveComponent(Deflection, NewRotation, true);
}
// increase fan speed while moving
if (FanSpeed < 500)
{
FanSpeed++; // increment fan speed
UpdateFanSpeed();
}
// THRUSTER CONTROL
if (bThustersActive)
{
// if you have fuel available when thrusters are activated
if (FuelLevel > 0)
{
FuelLevel--; // CONSUME FUEL
// Do not add thrust if ship has already reached maximum thrust velocity
if (GetVelocity().Size() < MaxThrustVelocity)
{
ShipMeshComponent->AddImpulseAtLocation(MoveDirection * MaxThrustVelocity, GetActorLocation()); // Apply impulse thrust
}
}
// if you're still using thrusters when you're out of fuel, we'll slow you down a lot as you overload the ship
// TO DO: maybe add an overheating visual effect, and maybe allow the ship to explode if you continue thrusting with no fuel
if (FuelLevel <= (MaxFuel * 0.1f))
{
if (!bLowFuel)
{
LowFuelSafety();
}
}
if (FuelLevel <= 0)
{
StopThrusters(); // if you completely run out of fuel, call full stop on thrusters
}
}
}
// if bCanMove becomes false
else
{
StopThrusters(); // stop thrusters
ShipMeshComponent->SetLinearDamping(2.5f); // Increase linear damping to slow down translation
ShipMeshComponent->SetAngularDamping(2.5f); // Increase angular damping to slow down rotation
}
}
// When analog stick is no longer being pressed, STOP
if (Movement.SizeSquared() <= 0.0f)
{
EngineIdleSound->VolumeMultiplier = 0.4f; // decrease engine noise
// decrease fan speed while idling
if (FanSpeed > 50)
{
FanSpeed--; // decrement fan speed
UpdateFanSpeed();
}
if (bLowFuel)
{
StopThrusters(); // if you stopped moving while low on fuel, then we call full stop on the thrusters (to disable audio and reset bLowFuel)
}
ShipMeshComponent->SetLinearDamping(0.5f); // Increase linear damping to slow down translation
ShipMeshComponent->SetAngularDamping(0.5f); // Increase angular damping to slow down rotation
}
// Create fire direction vector
const float FireForwardValue = GetInputAxisValue(FireForwardBinding);
const float FireRightValue = GetInputAxisValue(FireRightBinding);
const FVector FireDirection = FVector(FireForwardValue, FireRightValue, 0.f);
//ShipMeshGuns->SetRelativeRotation(FRotationMatrix::MakeFromX(FireDirection).Rotator()); // rotate guns to face firing direction - removed because it looks weird (ship was not modeled to support a turret feature)
// If you're undocked, you must be flying, so try firing a shot
if (!bIsDocked)
{
// Try and fire a shot
FireShot(FireDirection);
UpdatePlayerHUD(); // Update Player HUD with new information
}
// if you are docked, we'll let you rotate the camera to get a good look at your ship
if (bIsDocked)
{
CameraControl_RotateVertical(GetInputAxisValue(FireForwardBinding)); // update boom vertical rotation
CameraControl_RotateHorizontal(GetInputAxisValue(FireRightBinding)); // update boom horizontal rotation
//UpdateHangarMenu(); // Update Hangar Menu with new information
}
// DEBUG: WRITE VELOCITY TO SCREEN EACH FRAME
//GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Magenta, FString::Printf(TEXT("Velocity: %f"), GetVelocity().Size()));
// DEBUG: WRITE FUEL LEVEL TO SCREEN EACH FRAME
//GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Blue, FString::Printf(TEXT("Fuel Level: %f"), FuelLevel));
}
// Initialize all widgets
void AEndlessReachHDPawn::InitializeAllWidgets()
{
// Spawn and attach the PlayerHUD
if (!PlayerHUD)
{
PlayerHUD = CreateWidget<UPlayerHUD>(GetWorld(), W_PlayerHUD); // creates the player hud widget
if (!bIsDocked)
{
PlayerHUD->AddToViewport(); // add player hud to viewport
}
}
if (!HangarMenu)
{
HangarMenu = CreateWidget<UHangarMenu>(GetWorld(), W_HangarMenu); // creates the hangar menu widget
}
if (HangarMenu)
{
if (bIsDocked)
{
HangarMenu->AddToViewport(); // add hangar menu to viewport
UpdateHangarMenu(); // refresh the hangar menu with default information
}
}
}
// Update the HUD with new information each frame
void AEndlessReachHDPawn::UpdatePlayerHUD()
{
if (PlayerHUD)
{
if (PlayerHUD->IsInViewport())
{
PlayerHUD->Player_CurrentHP = CurrentHP; // set current hp
PlayerHUD->Player_MaxHP = MaxHP; // set max hp
PlayerHUD->Player_CurrentFuel = FuelLevel; // set fuel level
PlayerHUD->Player_MaxFuel = MaxFuel; // set max fuel level
PlayerHUD->Player_OrbCount = UCommonLibrary::GetFloatAsTextWithPrecision(OrbCount, 0, false); // set current orb count
}
}
}
// Update the Hangar Menu with new information
void AEndlessReachHDPawn::UpdateHangarMenu()
{
if (HangarMenu)
{
if (HangarMenu->IsInViewport())
{
HangarMenu->Player_OrbCount = UCommonLibrary::GetFloatAsTextWithPrecision(OrbCount, 0, false); // set current orb count
}
}
}
void AEndlessReachHDPawn::FireShot(FVector FireDirection)
{
// If we it's ok to fire again
if (bCanFire)
{
// If we are pressing fire stick in a direction
if (FireDirection.SizeSquared() > 0.0f)
{
const FRotator FireRotation = FireDirection.Rotation();
// Spawn projectile at an offset from this pawn
const FVector SpawnLocation = GetActorLocation() + FireRotation.RotateVector(GunOffset);
UWorld* const World = GetWorld();
if (World != NULL)
{
// FIRE PROJECTILE
ACannonball* Pulse = World->SpawnActor<ACannonball>(SpawnLocation, FireRotation); // spawn projectile
Pulse->Player = this;
// The following is velocity inheritance code for the projectile... it's almost working, but not quite, so commented out for now
//float InheritanceMod = 1.0f; // set inheritance level to 100%
//FVector Inheritance = GetControlRotation().UnrotateVector(GetVelocity()); // unrotate the player's velocity vector
//FVector NewVelocity = ((Inheritance * InheritanceMod) + ProjectileDefaultVelocity); // add inherited velocity to the projectile's default velocity - THIS LINE IS INCORRECT
//Pulse->GetProjectileMovement()->SetVelocityInLocalSpace(NewVelocity); // update projectile velocity
//GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Red, FString::Printf(TEXT("Updated Projectile Velocity: %f"), Pulse->GetVelocity().Size()));
}
bCanFire = false;
World->GetTimerManager().SetTimer(TimerHandle_ShotTimerExpired, this, &AEndlessReachHDPawn::ShotTimerExpired, FireRate);
// try and play the sound if specified
if (FireSound != nullptr)
{
UGameplayStatics::PlaySoundAtLocation(this, FireSound, GetActorLocation()); // play sound
}
//bCanFire = false;
}
}
}
// Rotational Camera Control (only accessible when docked)
void AEndlessReachHDPawn::CameraControl_RotateHorizontal(float horizontal)
{
bool bLookHorizontalInvert = true; // for now, we're just defaulting to inverted controls. in the future, this setting may be changed within the options menu
switch (bLookHorizontalInvert)
{
case true:
LookSensitivity = LookSensitivity * 1; // do nothing for inverted controls
break;
case false:
LookSensitivity = LookSensitivity * -1; // multiply by -1 for standard controls
break;
}
// I thought I could store this current rotation update block earlier in the tick function, so that it could be used for both the horizontal and vertical rotation functions...
// however, when I did that, the camera movement would only update one direction at a time (instead of both horizontal+vertical simultaneously)
// therefore, this update block exists in both camera control functions
RollX = CameraBoom_Rotational->GetComponentRotation().Roll; // store current boom roll
PitchY = CameraBoom_Rotational->GetComponentRotation().Pitch; // store current boom pitch
YawZ = CameraBoom_Rotational->GetComponentRotation().Yaw; // store current boom yaw
// if vertical == 0.0f then do nothing...
if (horizontal > 0.1f)
{
CameraBoom_Rotational->SetWorldRotation(FRotator(PitchY, FMath::FInterpTo(YawZ, YawZ + LookSensitivity, GetWorld()->GetDeltaSeconds(), CamRotSpeed), RollX));
}
if (horizontal < -0.1f)
{
CameraBoom_Rotational->SetWorldRotation(FRotator(PitchY, FMath::FInterpTo(YawZ, YawZ - LookSensitivity, GetWorld()->GetDeltaSeconds(), CamRotSpeed), RollX));
}
}
// Rotational Camera Control (only accessible when docked)
void AEndlessReachHDPawn::CameraControl_RotateVertical(float vertical)
{
bool bLookVerticalInvert = true; // for now, we're just defaulting to inverted controls. in the future, this setting may be changed within the options menu
switch (bLookVerticalInvert)
{
case true:
LookSensitivity = LookSensitivity * 1; // do nothing for inverted controls
break;
case false:
LookSensitivity = LookSensitivity * -1; // multiply by -1 for standard controls
break;
}
// I thought I could store this current rotation update block earlier in the tick function, so that it could be used for both the horizontal and vertical rotation functions...
// however, when I did that, the camera movement would only update one direction at a time (instead of both horizontal+vertical simultaneously)
// therefore, this update block exists in both camera control functions
RollX = CameraBoom_Rotational->GetComponentRotation().Roll; // store current boom roll
PitchY = CameraBoom_Rotational->GetComponentRotation().Pitch; // store current boom pitch
YawZ = CameraBoom_Rotational->GetComponentRotation().Yaw; // store current boom yaw
// if vertical == 0.0f then do nothing...
if (vertical > 0.1f)
{
float ClampedPitchLerp = FMath::Clamp(FMath::FInterpTo(PitchY, PitchY + LookSensitivity, GetWorld()->GetDeltaSeconds(), CamRotSpeed), ClampDegreeMin, ClampDegreeMax);
CameraBoom_Rotational->SetWorldRotation(FRotator(ClampedPitchLerp, YawZ, RollX));
}
if (vertical < -0.1f)
{
float ClampedPitchLerp = FMath::Clamp(FMath::FInterpTo(PitchY, PitchY - LookSensitivity, GetWorld()->GetDeltaSeconds(), CamRotSpeed), ClampDegreeMin, ClampDegreeMax);
CameraBoom_Rotational->SetWorldRotation(FRotator(ClampedPitchLerp, YawZ, RollX));
}
}
void AEndlessReachHDPawn::ShotTimerExpired()
{
bCanFire = true;
bCanFireBomb = true;
}
void AEndlessReachHDPawn::UpdateFanSpeed()
{
// apply rotation speed
RotatingMovement_FanL->RotationRate = FRotator(0, FanSpeed, 0);
RotatingMovement_FanR->RotationRate = FRotator(0, (FanSpeed * -1), 0);
RotatingMovement_FanT->RotationRate = FRotator(0, 0, (FanSpeed * -1));
}
void AEndlessReachHDPawn::FireLaser()
{
if (!bIsDocked)
{
if (bLaserUnlocked)
{
if (bLaserEnabled) // if the laser is already enabled when this function is called, it means the player was still holding the button and had charges remaining, so we essentially loop the firing mechanism
{
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0); // Get Player Controller
PlayerController->ClientPlayForceFeedback(LaserFeedback, false, false, FName(TEXT("Laser"))); // Play Laser Force Feedback
PlayerController->ClientPlayCameraShake(LaserCamShake); // play laser cam shake
UseLaserCharge(); // use a laser charge
// laser firing duration
FTimerHandle LaserDelay;
GetWorldTimerManager().SetTimer(LaserDelay, this, &AEndlessReachHDPawn::StopLaser, 3.0f, false);
}
// if the laser has yet to be enabled...
if (!bLaserEnabled)
{
if (LaserChargeCount > 0 && LaserChargeCount <= LaserChargeMax) // if laser charges is greater than zero but less or equal to than max...
{
bLaserEnabled = true; // enable laser
if (!LaserSound->IsPlaying()) // if the laser sound is not already playing...
{
LaserSound->Play(); // play laser sfx
}
LaserFX->Activate(); // play laser vfx
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0); // Get Player Controller
PlayerController->ClientPlayForceFeedback(LaserFeedback, false, false, FName(TEXT("Laser"))); // Play Laser Force Feedback
PlayerController->ClientPlayCameraShake(LaserCamShake); // play laser cam shake
UseLaserCharge(); // use a laser charge
// laser firing duration
FTimerHandle LaserDelay;
GetWorldTimerManager().SetTimer(LaserDelay, this, &AEndlessReachHDPawn::StopLaser, 3.0f, false);
}
}
}
}
}
void AEndlessReachHDPawn::StopLaser()
{
if (bLaserEnabled)
{
if (LaserChargeCount > 0)
{
FireLaser(); // fire laser again! (player is still holding the button and still has charges remaining)
}
else
{
LaserManualCutoff(); // force laser shutdown if there isn't at least one charge remaining
}
}
if (!bLaserEnabled)
{
bLaserEnabled = false;
LaserFX->Deactivate();
LaserSound->FadeOut(0.5f, 0);
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0); // Get Player Controller
PlayerController->ClientStopForceFeedback(LaserFeedback, FName(TEXT("Laser"))); // Stop Beam Cannon force feedback
}
}
void AEndlessReachHDPawn::UseLaserCharge()
{
switch (LaserChargeCount)
{
case 0: // if none
break;
case 1: // if one
PlayerHUD->DischargeLaser_Stage1(); // discharge laser stage 1 hud anim
break;
case 2: // if two
PlayerHUD->DischargeLaser_Stage2(); // discharge laser stage 2 hud anim
break;
case 3: // if three
PlayerHUD->DischargeLaser_Stage3(); // discharge laser stage 3 hud anim
break;
case 4: // if four
PlayerHUD->DischargeLaser_Stage4(); // discharge laser stage 4 hud anim
break;
case 5: // if five
PlayerHUD->DischargeLaser_Stage5(); // discharge laser stage 5 hud anim
break;
}
if (LaserChargeCount > 0) // if one or more laser charges...
{
LaserChargeCount--; // decrease laser charge count
}
}
void AEndlessReachHDPawn::LaserManualCutoff()
{
bLaserEnabled = false;
StopLaser(); // stop laser
}
void AEndlessReachHDPawn::LaserBeginOverlap(UPrimitiveComponent * HitComp, AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
if (bLaserEnabled) // verify beam cannon is enabled before proceeding
{
if ((OtherActor != NULL) && (OtherActor != this) && (OtherComp != NULL))
{
if (OtherComp->IsSimulatingPhysics())
{
OtherComp->AddImpulseAtLocation(GetVelocity() * 20.0f, GetActorLocation()); // apply small physics impulse to any physics object you hit
}
AAsteroid* Asteroid = Cast<AAsteroid>(OtherActor); // if object is an asteroid...
if (Asteroid)
{
Asteroid->OnDestroyAsteroid.Broadcast(); // Broadcast Asteroid Destruction
}
AEnemyMaster* Enemy = Cast<AEnemyMaster>(OtherActor); // if object is an enemy...
if (Enemy)
{
Enemy->EnemyTakeDamage(PlayerDealDamage(ATK + 250));
}
}
}
}
void AEndlessReachHDPawn::AggroRadiusBeginOverlap(UPrimitiveComponent * HitComp, AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
if ((OtherActor != NULL) && (OtherActor != this) && (OtherComp != NULL))
{
//AEnemyMaster* Enemy = Cast<AEnemyMaster>(OtherActor); // if the object is an enemy
//if (Enemy)
//{
// // calling this here will manually force trigger the enemy's aggro function, and immediately attack the player when he gets in range
// // in general, we leave it up to the Unreal A.I. system to perform this action
// // but this is here for debug purposes, if necessary
// Enemy->Aggro(this);
//}
}
}
// This function sets the DamageOutput variable, based on the BaseAtk value of an attack. Returns the ultimate value of damage dealt to an enemy.
float AEndlessReachHDPawn::PlayerDealDamage(float BaseAtk)
{
// The next three lines are pure Black Magic
float mod1 = ((BaseAtk + ATK) / 32);
float mod2 = ((BaseAtk * ATK) / 64);
float mod3 = (((mod1 * mod2) + ATK) * 40);
float adjusted = mod3; // set adjusted to base value of mod3
return adjusted; // Set Damage Output
}
// This function deals damage to the player, based on a DamageTaken value supplied by an enemy. This function is usually called by the enemy itself.
void AEndlessReachHDPawn::PlayerTakeDamage(float DamageTaken)
{
if (!bIsDead) // take no damage if you're already dead!
{
//IsHit = true;
// Calculate damage taken
float critical = FMath::FRandRange(1, 1.5f); // sets a random critical rate
float mod1 = (critical * (DEF - 512) * DamageTaken);
float mod2 = (mod1 / (16 * 512));
float mod3 = FMath::Abs(mod2);
float FinalDamage = mod3;
CurrentHP = (CurrentHP - FinalDamage); // apply new HP value
if (critical > 1.4f)
{
// Display Critical Damage
CombatTextComponent->ShowCombatText(ECombatTextTypes::TT_CritDmg, UCommonLibrary::GetFloatAsTextWithPrecision(FinalDamage, 0, true));
}
else
{
// Display Normal Damage
CombatTextComponent->ShowCombatText(ECombatTextTypes::TT_Damage, UCommonLibrary::GetFloatAsTextWithPrecision(FinalDamage, 0, true));
}
ForceHPCaps();
}
}
// Force HP Caps keeps the enemy's HP between 0 and Max
bool AEndlessReachHDPawn::ForceHPCaps()
{
bool Kill = false;
if (CurrentHP > MaxHP) // if HP is greater than 0
{
CurrentHP = MaxHP;
}
else if (CurrentHP < 0) // if HP is less than 0
{
CurrentHP = 0;
Kill = true;
}
if (Kill)
{
//Death(); // Start the Death sequence
}
return Kill;
}
void AEndlessReachHDPawn::FireThrusters()
{
if (!bIsDocked)
{
bThustersActive = true;
if (FuelLevel > 0)
{
EnableThrusterFX();
MakeNoise(1, this, GetActorLocation(), 2500); // Report to Enemy A.I. that we've made an audible sound. This noise will alert enemies to your location!
}
}
}
void AEndlessReachHDPawn::StopThrusters()
{
if (!bIsDocked)
{
bThustersActive = false;
bLowFuel = false;
DisableThrusterFX();
}
}
// This feature makes it harder to completely run out of fuel, and plays an audio warning when near empty
void AEndlessReachHDPawn::LowFuelSafety()
{
if (FuelLevel > 0)
{
bLowFuel = true;
LowFuelWarningSound->Play(); // play audio
ShipMeshComponent->SetLinearDamping(2.0f); // Increase linear damping to slow down translation
ShipMeshComponent->SetAngularDamping(2.0f); // Increase angular damping to slow down rotation
}
}
// thruster effects were separated from the main Fire/StopThrusters() functions so that the effects could be activated during cutscenes (as opposed to just manually by the player)
void AEndlessReachHDPawn::EnableThrusterFX()
{
EngineThrustSound->Play();
ThrusterFX->Activate();
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0); // Get Player Controller
PlayerController->ClientPlayForceFeedback(ThrusterFeedback, false, false, FName(TEXT("Thruster"))); // Play Thruster Force Feedback
PlayerController->ClientPlayCameraShake(ThrusterCamShake); // play cam shake
}
void AEndlessReachHDPawn::DisableThrusterFX()
{
ThrusterFX->Deactivate();
EngineThrustSound->FadeOut(0.25f, 0);
LowFuelWarningSound->FadeOut(0.05f, 0);
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0); // Get Player Controller
PlayerController->ClientStopForceFeedback(ThrusterFeedback, FName(TEXT("Thruster"))); // Stop Thruster Feedback
//PlayerController->ClientStopCameraShake(ThrusterCamShake); // we don't need to manually stop the cam shakes, because that causes them to look unnatural
}
void AEndlessReachHDPawn::EngageDockingClamps()
{
Camera_TopDown->SetActive(false, false); // disable top down cam
Camera_Rotational->SetActive(true, false); // enable rotational cam
FViewTargetTransitionParams params;
APlayerController* PlayerController = Cast<APlayerController>(GetController());
PlayerController->SetViewTarget(this, params); // set new camera
bIsDocked = true; // DOCKED
bCanMove = false; // no movement while docked
bCanFire = false; // no weapons while docked
if (PlayerHUD) // error checking
{
PlayerHUD->RemoveFromViewport(); // remove the player hud from the viewport
}
if (HangarMenu)
{
HangarMenu->AddToViewport(); // add the hangar menu to the viewport
UpdateHangarMenu(); // refresh the hangar menu with updated information
HangarMenu->ReturnToUpgradeMenu(); // return to the upgrade menu (this is really only necessary for subsequent docking entries after a level load)
}
else
{
InitializeAllWidgets(); // reinitialize widgets, since the hangar menu apparantly failed to load
}
}
void AEndlessReachHDPawn::ReleaseDockingClamps()
{
Camera_TopDown->SetActive(true, false); // enable top down cam
Camera_Rotational->SetActive(false, false); // disable rotational cam
FViewTargetTransitionParams params;
APlayerController* PlayerController = Cast<APlayerController>(GetController());
PlayerController->SetViewTarget(this, params); // set new camera
bIsDocked = false; // UNDOCKED
bCanMove = true; // restore movement
bCanFire = true; // arm weapons
if (HangarMenu) // error checking
{
HangarMenu->RemoveFromViewport(); // remove hangar menu from the viewport
}
if (PlayerHUD) // error checking
{
PlayerHUD->AddToViewport(); // add the player hud to the viewport
}
}
void AEndlessReachHDPawn::FireBomb()
{
if (bBombsUnlocked)
{
if (bCanFireBomb)
{
if (BombCount > 0 && BombCount <= BombMax)
{
// Find movement direction
const float ForwardValue = GetInputAxisValue(MoveForwardBinding);
const float RightValue = GetInputAxisValue(MoveRightBinding);
// Clamp max size so that (X=1, Y=1) doesn't cause faster movement in diagonal directions
const FVector MoveDirection = FVector(ForwardValue, RightValue, 0.0f).GetClampedToMaxSize(1.0f);
// Spawn projectile at an offset from this pawn
const FRotator FireRotation = MoveDirection.Rotation();
const FVector SpawnLocation = GetActorLocation() + FireRotation.RotateVector(GunOffset);
UWorld* const World = GetWorld();
if (World != NULL)
{
// FIRE PROJECTILE
ABomb* Bomb = World->SpawnActor<ABomb>(SpawnLocation, FireRotation); // spawn projectile
Bomb->Player = this;
// The following is velocity inheritance code for the projectile... it's almost working, but not quite, so commented out for now
//float InheritanceMod = 1.0f; // set inheritance level to 100%
//FVector Inheritance = GetControlRotation().UnrotateVector(GetVelocity()); // unrotate the player's velocity vector
//FVector NewVelocity = ((Inheritance * InheritanceMod) + ProjectileDefaultVelocity); // add inherited velocity to the projectile's default velocity - THIS LINE IS INCORRECT
//Pulse->GetProjectileMovement()->SetVelocityInLocalSpace(NewVelocity); // update projectile velocity
//GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Red, FString::Printf(TEXT("Updated Projectile Velocity: %f"), Pulse->GetVelocity().Size()));
}
// Reduce bomb count by one for each bomb fired
if (BombCount > 0)
{
BombCount--;
}
else
{
BombCount = 0; // bomb count cannot be less than zero
}
bCanFireBomb = false;
World->GetTimerManager().SetTimer(TimerHandle_ShotTimerExpired, this, &AEndlessReachHDPawn::ShotTimerExpired, FireRate);
// try and play the sound if specified
if (BombSound != nullptr)
{
UGameplayStatics::PlaySoundAtLocation(this, BombSound, GetActorLocation()); // play sound
}
bCanFireBomb = false;
}
}
}
}
// Menu Left Control
void AEndlessReachHDPawn::MenuLeft()
{
if (bIsDocked)
{
if(HangarMenu)
{
if (HangarMenu->IsInViewport())
{
HangarMenu->MoveLeft();
}
}
}
}
// Menu Right Control
void AEndlessReachHDPawn::MenuRight()
{
if (bIsDocked)
{
if (HangarMenu)
{
if (HangarMenu->IsInViewport())
{
HangarMenu->MoveRight();
}
}
}
}
// Get Upgrade Cost
int32 AEndlessReachHDPawn::GetUpgradeCost(int32 UpgradeIndex, int32 PowerLevel)
{
// cost of the upgrade for the specified level
int32 UpgradeCost = 0;
switch (UpgradeIndex)
{
// SHIP TYPE UPGRADE
case 0:
switch (PowerLevel)
{
case 0:
UpgradeCost = 1750;
break;
case 1:
UpgradeCost = 2500;
break;
case 2:
UpgradeCost = 3250;
break;
case 3:
UpgradeCost = 4500;
break;
case 4:
UpgradeCost = 6000;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// HEALTH UPGRADE
case 1:
switch (PowerLevel)
{
case 0:
UpgradeCost = 250;
break;
case 1:
UpgradeCost = 500;
break;
case 2:
UpgradeCost = 750;
break;
case 3:
UpgradeCost = 1000;
break;
case 4:
UpgradeCost = 1500;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// THURSTERS UPGRADE
case 2:
switch (PowerLevel)
{
case 0:
UpgradeCost = 500;
break;
case 1:
UpgradeCost = 750;
break;
case 2:
UpgradeCost = 1000;
break;
case 3:
UpgradeCost = 1250;
break;
case 4:
UpgradeCost = 1500;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// MAIN CANNON UPGRADE
case 3:
switch (PowerLevel)
{
case 0:
UpgradeCost = 500;
break;
case 1:
UpgradeCost = 750;
break;
case 2:
UpgradeCost = 1000;
break;
case 3:
UpgradeCost = 1250;
break;
case 4:
UpgradeCost = 1500;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// LASER UPGRADE
case 4:
switch (PowerLevel)
{
case 0:
UpgradeCost = 1000;
break;
case 1:
UpgradeCost = 1500;
break;
case 2:
UpgradeCost = 2000;
break;
case 3:
UpgradeCost = 2500;
break;
case 4:
UpgradeCost = 3000;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// MAGNET UPGRADE
case 5:
switch (PowerLevel)
{
case 0:
UpgradeCost = 1000;
break;
case 1:
UpgradeCost = 1500;
break;
case 2:
UpgradeCost = 2000;
break;
case 3:
UpgradeCost = 2500;
break;
case 4:
UpgradeCost = 3000;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// MISSILES UPGRADE
case 6:
switch (PowerLevel)
{
case 0:
UpgradeCost = 1500;
break;
case 1:
UpgradeCost = 2250;
break;
case 2:
UpgradeCost = 3000;
break;
case 3:
UpgradeCost = 3750;
break;
case 4:
UpgradeCost = 4500;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// ENERGY SHIELD UPGRADE
case 7:
switch (PowerLevel)
{
case 0:
UpgradeCost = 1500;
break;
case 1:
UpgradeCost = 2250;
break;
case 2:
UpgradeCost = 3000;
break;
case 3:
UpgradeCost = 3750;
break;
case 4:
UpgradeCost = 4500;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
// BOMB LEVEL
case 8:
switch (PowerLevel)
{
case 0:
UpgradeCost = 2000;
break;
case 1:
UpgradeCost = 3000;
break;
case 2:
UpgradeCost = 4000;
break;
case 3:
UpgradeCost = 5000;
break;
case 4:
UpgradeCost = 6000;
break;
case 5:
UpgradeCost = 99999;
break;
}
break;
}
return UpgradeCost;
}
// Upgrade Health
void AEndlessReachHDPawn::UpgradeHealth(int32 UpgradeCost, int32 Level, int32 NextUpgradeCost)
{
if (OrbCount > UpgradeCost)
{
OrbCount = OrbCount - UpgradeCost; // subtract Cost from OrbCount
HealthLevel = Level; // set health upgrade level
MaxHP = (MaxHP + (MaxHP * 0.5f)); // Add 50% of current max HP for each upgrade
HangarMenu->SetUpgradeLevel(HealthLevel, NextUpgradeCost); // set the new upgrade information within the hangar menu
UpdateHangarMenu(); // update the hangar menu display
}
else
{
HangarMenu->NotifyError();
}
}
// Upgrade Thrusters
void AEndlessReachHDPawn::UpgradeThrusters(int32 UpgradeCost, int32 Level, int32 NextUpgradeCost)
{
if (OrbCount > UpgradeCost)
{
OrbCount = OrbCount - UpgradeCost; // subtract Cost from OrbCount
ThrustersLevel = Level; // set thrusters upgrade level
MaxFuel = (MaxFuel + (MaxFuel * 0.5f)); // Add 50% of current max fuel for each upgrade
HangarMenu->SetUpgradeLevel(ThrustersLevel, NextUpgradeCost); // set the new upgrade information within the hangar menu
UpdateHangarMenu(); // update the hangar menu display
}
else
{
HangarMenu->NotifyError();
}
}
// Upgrade Main Cannon
void AEndlessReachHDPawn::UpgradeCannon(int32 UpgradeCost, int32 Level, int32 NextUpgradeCost, float NewFireRate)
{
if (OrbCount > UpgradeCost)
{
OrbCount = OrbCount - UpgradeCost; // subtract Cost from OrbCount
CannonLevel = Level; // set Cannon upgrade level
FireRate = NewFireRate; // set new fire rate
HangarMenu->SetUpgradeLevel(CannonLevel, NextUpgradeCost); // set the new upgrade information within the hangar menu
UpdateHangarMenu(); // update the hangar menu display
}
else
{
HangarMenu->NotifyError();
}
}
// Upgrade Laser
void AEndlessReachHDPawn::UpgradeLaser(int32 UpgradeCost, int32 Level, int32 NextUpgradeCost)
{
if (OrbCount > UpgradeCost)
{
// if laser charge max is less than five, increase max by one for each upgrade
if (LaserChargeMax < 5)
{
LaserChargeMax++;
}
else
{
LaserChargeMax = 5; // force the laser charge max to five if it exceeds for some reason
}
OrbCount = OrbCount - UpgradeCost; // subtract Cost from OrbCount
LaserLevel = Level; // set laser upgrade level
HangarMenu->SetUpgradeLevel(LaserLevel, NextUpgradeCost); // set the new upgrade information within the hangar menu
UpdateHangarMenu(); // update the hangar menu display
}
else
{
HangarMenu->NotifyError();
}
}
// Upgrade Magnet
void AEndlessReachHDPawn::UpgradeMagnet(int32 UpgradeCost, int32 Level, int32 NextUpgradeCost, int32 NewMagnetRadius)
{
if (OrbCount > UpgradeCost)
{
OrbCount = OrbCount - UpgradeCost; // subtract Cost from OrbCount
MagnetLevel = Level; // set magnet upgrade level
MagnetRadius->SetSphereRadius(NewMagnetRadius);
HangarMenu->SetUpgradeLevel(MagnetLevel, NextUpgradeCost); // set the new upgrade information within the hangar menu
UpdateHangarMenu(); // update the hangar menu display
}
else
{
HangarMenu->NotifyError();
}
}
// Upgrade Bomb
void AEndlessReachHDPawn::UpgradeBomb(int32 UpgradeCost, int32 Level, int32 NextUpgradeCost)
{
if (OrbCount > UpgradeCost)
{
// if bomb max is less than five, increase max by one for each upgrade
if (BombMax < 5)
{
BombMax++;
}
else
{
BombMax = 5; // force the bomb max to five if it exceeds for some reason
}
OrbCount = OrbCount - UpgradeCost; // subtract Cost from OrbCount
BombLevel = Level; // set bomb upgrade level
HangarMenu->SetUpgradeLevel(BombLevel, NextUpgradeCost); // set the new upgrade information within the hangar menu
UpdateHangarMenu(); // update the hangar menu display
}
else
{
HangarMenu->NotifyError();
}
}
// Action Button Control
void AEndlessReachHDPawn::ActionInput()
{
if (bIsDocked)
{
if (HangarMenu)
{
if (HangarMenu->IsInViewport())
{
if (!HangarMenu->bIsPromptingExit)
{
switch (HangarMenu->MenuIndex)
{
// SHIP TYPE UPGRADE - INDEX 0
case 0:
switch (ShipTypeLevel)
{
case 0:
//UpgradeCost = GetUpgradeCost(0, 0);
break;
case 1:
//UpgradeCost = GetUpgradeCost(0, 1);
break;
case 2:
//UpgradeCost = GetUpgradeCost(0, 2);
break;
case 3:
//UpgradeCost = GetUpgradeCost(0, 3);
break;
case 4:
//UpgradeCost = GetUpgradeCost(0, 4);
break;
case 5:
//UpgradeCost = GetUpgradeCost(0, 5);
break;
}
break;
// HEALTH UPGRADE - INDEX 1
case 1:
switch (HealthLevel)
{
case 0:
UpgradeHealth(GetUpgradeCost(1, 0), 1, GetUpgradeCost(1, 1));
break;
case 1:
UpgradeHealth(GetUpgradeCost(1, 1), 2, GetUpgradeCost(1, 2));
break;
case 2:
UpgradeHealth(GetUpgradeCost(1, 2), 3, GetUpgradeCost(1, 3));
break;
case 3:
UpgradeHealth(GetUpgradeCost(1, 3), 4, GetUpgradeCost(1, 4));
break;
case 4:
UpgradeHealth(GetUpgradeCost(1, 4), 5, GetUpgradeCost(1, 5));
break;
case 5:
break;
}
break;
// THURSTERS UPGRADE - INDEX 2
case 2:
switch (ThrustersLevel)
{
case 0:
UpgradeThrusters(GetUpgradeCost(2, 0), 1, GetUpgradeCost(2, 1));
break;
case 1:
UpgradeThrusters(GetUpgradeCost(2, 1), 2, GetUpgradeCost(2, 2));
break;
case 2:
UpgradeThrusters(GetUpgradeCost(2, 2), 3, GetUpgradeCost(2, 3));
break;
case 3:
UpgradeThrusters(GetUpgradeCost(2, 3), 4, GetUpgradeCost(2, 4));
break;
case 4:
UpgradeThrusters(GetUpgradeCost(2, 4), 5, GetUpgradeCost(2, 5));
break;
case 5:
break;
}
break;
// MAIN CANNON UPGRADE - INDEX 3
case 3:
switch (CannonLevel)
{
case 0:
UpgradeCannon(GetUpgradeCost(3, 0), 1, GetUpgradeCost(3, 1), 0.175f);
break;
case 1:
UpgradeCannon(GetUpgradeCost(3, 1), 2, GetUpgradeCost(3, 2), 0.15f);
break;
case 2:
UpgradeCannon(GetUpgradeCost(3, 2), 3, GetUpgradeCost(3, 3), 0.125f);
break;
case 3:
UpgradeCannon(GetUpgradeCost(3, 3), 4, GetUpgradeCost(3, 4), 0.1f);
break;
case 4:
UpgradeCannon(GetUpgradeCost(3, 4), 5, GetUpgradeCost(3, 5), 0.075f);
break;
case 5:
break;
}
break;
// LASER UPGRADE - INDEX 4
case 4:
switch (LaserLevel)
{
case 0:
UpgradeLaser(GetUpgradeCost(4, 0), 1, GetUpgradeCost(4, 1));
bLaserUnlocked = true;
break;
case 1:
UpgradeLaser(GetUpgradeCost(4, 1), 2, GetUpgradeCost(4, 2));
break;
case 2:
UpgradeLaser(GetUpgradeCost(4, 2), 3, GetUpgradeCost(4, 3));
break;
case 3:
UpgradeLaser(GetUpgradeCost(4, 3), 4, GetUpgradeCost(4, 4));
break;
case 4:
UpgradeLaser(GetUpgradeCost(4, 4), 5, GetUpgradeCost(4, 5));
break;
case 5:
break;
}
break;
// MAGNET UPGRADE - INDEX 5
case 5:
switch (MagnetLevel)
{
case 0:
UpgradeMagnet(GetUpgradeCost(5, 0), 1, GetUpgradeCost(5, 1), 1000);
bMagnetEnabled = true;
break;
case 1:
UpgradeMagnet(GetUpgradeCost(5, 1), 2, GetUpgradeCost(5, 2), 1500);
break;
case 2:
UpgradeMagnet(GetUpgradeCost(5, 2), 3, GetUpgradeCost(5, 3), 2000);
break;
case 3:
UpgradeMagnet(GetUpgradeCost(5, 3), 4, GetUpgradeCost(5, 4), 2500);
break;
case 4:
UpgradeMagnet(GetUpgradeCost(5, 4), 5, GetUpgradeCost(5, 5), 3000);
break;
case 5:
break;
}
break;
// MISSILES UPGRADE - INDEX 6
case 6:
switch (MissilesLevel)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
}
break;
// ENERGY SHIELD UPGRADE - INDEX 7
case 7:
switch (ShieldLevel)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
}
break;
// BOMB LEVEL - INDEX 8
case 8:
switch (BombLevel)
{
case 0:
UpgradeBomb(GetUpgradeCost(8, 0), 1, GetUpgradeCost(8, 1));
bBombsUnlocked = true;
break;
case 1:
UpgradeBomb(GetUpgradeCost(8, 1), 2, GetUpgradeCost(8, 2));
break;
case 2:
UpgradeBomb(GetUpgradeCost(8, 2), 3, GetUpgradeCost(8, 3));
break;
case 3:
UpgradeBomb(GetUpgradeCost(8, 3), 4, GetUpgradeCost(8, 4));
break;
case 4:
UpgradeBomb(GetUpgradeCost(8, 4), 5, GetUpgradeCost(8, 5));
break;
case 5:
break;
}
break;
}
}
else
{
switch (HangarMenu->ExitPromptIndex)
{
case 0:
HangarMenu->InitLaunchSequence();
break;
case 1:
HangarMenu->ReturnToUpgradeMenu();
break;
}
}
}
}
}
}
// Back Button Control
void AEndlessReachHDPawn::BackInput()
{
if (bIsDocked)
{
if (HangarMenu)
{
if (HangarMenu->IsInViewport())
{
if (!HangarMenu->bIsPromptingExit)
{
HangarMenu->PromptExit();
}
}
}
}
if (!bIsDocked)
{
if (bCanFireBomb)
{
if (BombCount > 0)
{
FireBomb();
}
}
}
}
// Show combat damage text function
void AEndlessReachHDPawn::ShowCombatDamageText(bool bIsCritical, float Damage)
{
if (bIsCritical)
{
// CRITICAL DAMAGE
CombatTextComponent->ShowCombatText(ECombatTextTypes::TT_CritDmg, UCommonLibrary::GetFloatAsTextWithPrecision(Damage, 0, true)); // show combat text
}
else
{
// STANDARD DAMAGE
CombatTextComponent->ShowCombatText(ECombatTextTypes::TT_Damage, UCommonLibrary::GetFloatAsTextWithPrecision(Damage, 0, true)); // show combat text
}
}
// Add Status Effect Icon to HUD
void AEndlessReachHDPawn::AddStatusEffectIcon(FName ID, UTexture2D* Icon, bool bShouldBlink)
{
if (PlayerHUD)
{
//PlayerHUD->
}
}
// Generate reward drops for defeating an enemy or destroying an environment object
void AEndlessReachHDPawn::GenerateDrops(bool bDropsOrbs, FVector TargetLocation)
{
FActorSpawnParameters Params;
Params.OverrideLevel = GetLevel(); // make pickup drops spawn within the streaming level so they can be properly unloaded
if (bDropsOrbs)
{
int32 DroppedOrbCount = FMath::RandRange(0, 15); // drop a random amount of orbs
//int32 DroppedOrbCount = 100; // drop a static amount of orbs
const FTransform Settings = FTransform(FRotator(0, 0, 0), TargetLocation, FVector(1, 1, 1)); // cache transform settings
for (int32 i = 0; i < DroppedOrbCount; i++)
{
AOrb* Orb = GetWorld()->SpawnActor<AOrb>(AOrb::StaticClass(), Settings, Params);
}
}
// FUEL CELL
int32 FuelDropChance = FMath::RandRange(0, 9); // get a random number to determine whether or not this drop will include a fuel cell
const FTransform FuelSettings = FTransform(FRotator(0, 0, 0), TargetLocation, FVector(0.25f, 0.25f, 0.25f)); // cache transform settings
// drop fuel @ 50%
if (FuelDropChance > 4)
{
AFuelCell* Fuel = GetWorld()->SpawnActor<AFuelCell>(AFuelCell::StaticClass(), FuelSettings, Params); // spawn fuel cell
}
// LASER CHARGE
int32 LaserDropChance = FMath::RandRange(0, 9); // get a random number to determine whether or not this drop will include a laser charge
const FTransform LaserSettings = FTransform(FRotator(0, 0, 0), TargetLocation, FVector(0.25f, 0.25f, 0.25f)); // cache transform settings
// drop fuel @ 20%
if (LaserDropChance > 7)
{
ALaser* Laser = GetWorld()->SpawnActor<ALaser>(ALaser::StaticClass(), LaserSettings, Params); // spawn laser charge
}
// BOMB CORE
int32 BombCoreDropChance = FMath::RandRange(0, 9); // get a random number to determine whether or not this drop will include a bomb core
const FTransform BombCoreSettings = FTransform(FRotator(0, 0, 0), TargetLocation, FVector(0.25f, 0.25f, 0.25f)); // cache transform settings
// drop fuel @ 20%
if (BombCoreDropChance > 7)
{
ABombCore* BombCore = GetWorld()->SpawnActor<ABombCore>(ABombCore::StaticClass(), BombCoreSettings, Params); // spawn fuel
}
}
| 36.167211
| 245
| 0.729425
|
Soverance
|
e6ec92140e30412542c541d2d928bb491d8a3d90
| 3,473
|
cpp
|
C++
|
solvers/src/solvers/CuSparseSolver.cpp
|
zurutech/stand
|
a341f691d991072a61d07aac6fa7e634e2d112d3
|
[
"Apache-2.0"
] | 9
|
2022-01-17T07:30:49.000Z
|
2022-01-20T17:27:52.000Z
|
solvers/src/solvers/CuSparseSolver.cpp
|
zurutech/stand
|
a341f691d991072a61d07aac6fa7e634e2d112d3
|
[
"Apache-2.0"
] | null | null | null |
solvers/src/solvers/CuSparseSolver.cpp
|
zurutech/stand
|
a341f691d991072a61d07aac6fa7e634e2d112d3
|
[
"Apache-2.0"
] | null | null | null |
/* Copyright 2022 Zuru Tech HK Limited.
*
* 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 <chrono>
#include <functional>
#include <vector>
#include <cuda_runtime.h>
#include <cusolverSp.h>
#include <cusparse_v2.h>
#include <solvers/CuSparseSolver.hpp>
#include <solvers/SparseSystem.hpp>
namespace solvers {
Eigen::VectorXd CuSparseSolver::solve(const SparseSystem& system,
double& duration) const
{
auto [crow_index, col_index, values, b] = system.toStdCSR();
const auto n = static_cast<int>(b.size());
const auto nnz = static_cast<int>(values.size());
cusparseMatDescr_t A_description = nullptr;
cusparseCreateMatDescr(&A_description);
int* cuda_crow_index;
int* cuda_col_index;
double* cuda_values;
double* cuda_b;
double* cuda_sol;
cusolverSpHandle_t cusolver_handler = nullptr;
cusolverSpCreate(&cusolver_handler);
cudaMalloc(reinterpret_cast<void**>(&cuda_values), sizeof(double) * nnz);
cudaMalloc(reinterpret_cast<void**>(&cuda_crow_index),
sizeof(int) * (n + 1));
cudaMalloc(reinterpret_cast<void**>(&cuda_col_index), sizeof(int) * nnz);
cudaMalloc(reinterpret_cast<void**>(&cuda_b), sizeof(double) * n);
cudaMalloc(reinterpret_cast<void**>(&cuda_sol), sizeof(double) * n);
cudaMemcpy(cuda_values, values.data(), sizeof(double) * nnz,
cudaMemcpyHostToDevice);
cudaMemcpy(cuda_crow_index, crow_index.data(), sizeof(int) * (n + 1),
cudaMemcpyHostToDevice);
cudaMemcpy(cuda_col_index, col_index.data(), sizeof(int) * nnz,
cudaMemcpyHostToDevice);
cudaMemcpy(cuda_b, b.data(), sizeof(double) * n, cudaMemcpyHostToDevice);
const std::vector<std::function<cusolverStatus_t(
cusolverSpHandle_t, int, int, cusparseMatDescr_t, const double*,
const int*, const int*, const double*, double, int, double*, int*)>>
solver_function = {cusolverSpDcsrlsvqr, cusolverSpDcsrlsvchol};
const double tolerance = 1e-12;
int singularity = 0;
std::chrono::time_point start = std::chrono::high_resolution_clock::now();
solver_function[static_cast<int>(_method)](
cusolver_handler, n, nnz, A_description, cuda_values, cuda_crow_index,
cuda_col_index, cuda_b, tolerance, static_cast<int>(_reorder), cuda_sol,
&singularity);
cudaDeviceSynchronize();
std::chrono::time_point end = std::chrono::high_resolution_clock::now();
Eigen::VectorXd result(n);
cudaMemcpy(result.data(), cuda_sol, sizeof(double) * n,
cudaMemcpyDeviceToHost);
cudaFree(cuda_crow_index);
cudaFree(cuda_col_index);
cudaFree(cuda_values);
cudaFree(cuda_b);
cudaFree(cuda_sol);
cusolverSpDestroy(cusolver_handler);
cudaDeviceReset();
std::chrono::duration<double> time_difference = end - start;
duration = time_difference.count();
return result;
}
} // namespace solvers
| 37.344086
| 80
| 0.69738
|
zurutech
|
e6f062fcb872ce77d5c9e3e6edab326aed749883
| 3,943
|
cpp
|
C++
|
XRVessels/XR2Ravenstar/XR2Ravenstar/XR2PostSteps.cpp
|
dbeachy1/XRVessels
|
8dd2d879886154de2f31fa75393d8a6ac56a2089
|
[
"MIT"
] | 10
|
2021-08-20T05:49:10.000Z
|
2022-01-07T13:00:20.000Z
|
XRVessels/XR2Ravenstar/XR2Ravenstar/XR2PostSteps.cpp
|
dbeachy1/XRVessels
|
8dd2d879886154de2f31fa75393d8a6ac56a2089
|
[
"MIT"
] | null | null | null |
XRVessels/XR2Ravenstar/XR2Ravenstar/XR2PostSteps.cpp
|
dbeachy1/XRVessels
|
8dd2d879886154de2f31fa75393d8a6ac56a2089
|
[
"MIT"
] | 4
|
2021-09-11T12:08:01.000Z
|
2022-02-09T00:16:19.000Z
|
/**
XR Vessel add-ons for OpenOrbiter Space Flight Simulator
Copyright (C) 2006-2021 Douglas Beachy
This program 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
any later version.
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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Email: mailto:doug.beachy@outlook.com
Web: https://www.alteaaerospace.com
**/
// ==============================================================
// XR2Ravenstar implementation class
//
// XR2PrePostSteps.cpp
// Class defining custom clbkPostStep callbacks for the XR2 Ravenstar
// ==============================================================
#include "XR2PostSteps.h"
#include "XR2AreaIDs.h"
#include "XR2Areas.h"
//---------------------------------------------------------------------------
XR2AnimationPostStep::XR2AnimationPostStep(XR2Ravenstar &vessel) :
XR2PrePostStep(vessel)
{
}
void XR2AnimationPostStep::clbkPrePostStep(const double simt, const double simdt, const double mjd)
{
// animate doors that require hydraulic pressure
if (GetXR2().CheckHydraulicPressure(false, false)) // do not log a warning nor play an error beep here! We are merely querying the state.
{
AnimateBayDoors(simt, simdt, mjd);
}
}
void XR2AnimationPostStep::AnimateBayDoors(const double simt, const double simdt, const double mjd)
{
// animate the payload bay doors
if (GetXR2().bay_status >= DoorStatus::DOOR_CLOSING) // closing or opening
{
double da = simdt * BAY_OPERATING_SPEED;
if (GetXR2().bay_status == DoorStatus::DOOR_CLOSING)
{
if (GetXR2().bay_proc > 0.0)
GetXR2().bay_proc = max(0.0, GetXR2().bay_proc - da);
else
{
GetXR2().bay_status = DoorStatus::DOOR_CLOSED;
GetVessel().TriggerRedrawArea(AID_BAYDOORSINDICATOR);
}
}
else // door is opening or open
{
if (GetXR2().bay_proc < 1.0)
GetXR2().bay_proc = min (1.0, GetXR2().bay_proc + da);
else
{
GetXR2().bay_status = DoorStatus::DOOR_OPEN;
GetVessel().TriggerRedrawArea(AID_BAYDOORSINDICATOR);
}
}
GetXR2().SetXRAnimation(GetXR2().anim_bay, GetXR2().bay_proc);
}
}
//---------------------------------------------------------------------------
XR2DoorSoundsPostStep::XR2DoorSoundsPostStep(XR2Ravenstar &vessel) :
DoorSoundsPostStep(vessel)
{
// set transition state processing to FALSE so we don't play an initial thump when a scenario loads
#define INIT_DOORSOUND(idx, doorStatus, xr1SoundID, label) \
m_doorSounds[idx].pDoorStatus = &(GetXR2().doorStatus); \
m_doorSounds[idx].prevDoorStatus = DoorStatus::NOT_SET; \
m_doorSounds[idx].soundID = GetXR1().xr1SoundID; \
m_doorSounds[idx].processAPUTransitionState = false; \
m_doorSounds[idx].pLabel = label
// initialize door sound structures for all new doors
INIT_DOORSOUND(0, bay_status, dPayloadBayDoors, "Bay Doors");
}
void XR2DoorSoundsPostStep::clbkPrePostStep(const double simt, const double simdt, const double mjd)
{
// call the superclass to handle all the normal doors
DoorSoundsPostStep::clbkPrePostStep(simt, simdt, mjd);
// handle all our custom door sounds
const int doorCount = (sizeof(m_doorSounds) / sizeof(DoorSound));
for (int i=0; i < doorCount; i++)
PlayDoorSound(m_doorSounds[i], simt);
}
| 37.198113
| 146
| 0.632767
|
dbeachy1
|
e6f0d9a145d8f4d7c84c00ba9fa45928e9a5c638
| 7,374
|
cc
|
C++
|
src/tests/grid/test_distribution_regular_bands.cc
|
twsearle/atlas
|
a1916fd521f9935f846004e6194f80275de4de83
|
[
"Apache-2.0"
] | 67
|
2018-03-01T06:56:49.000Z
|
2022-03-08T18:44:47.000Z
|
src/tests/grid/test_distribution_regular_bands.cc
|
twsearle/atlas
|
a1916fd521f9935f846004e6194f80275de4de83
|
[
"Apache-2.0"
] | 93
|
2018-12-07T17:38:04.000Z
|
2022-03-31T10:04:51.000Z
|
src/tests/grid/test_distribution_regular_bands.cc
|
twsearle/atlas
|
a1916fd521f9935f846004e6194f80275de4de83
|
[
"Apache-2.0"
] | 33
|
2018-02-28T17:06:19.000Z
|
2022-01-20T12:12:27.000Z
|
/*
* (C) Copyright 2013 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergovernmental organisation
* nor does it submit to any jurisdiction.
*/
#include <algorithm>
#include <cstdint>
#include <iomanip>
#include <sstream>
#include "atlas/array.h"
#include "atlas/field.h"
#include "atlas/functionspace.h"
#include "atlas/grid.h"
#include "atlas/grid/detail/distribution/BandsDistribution.h"
#include "atlas/grid/detail/distribution/SerialDistribution.h"
#include "atlas/parallel/mpi/mpi.h"
#include "atlas/parallel/omp/omp.h"
#include "atlas/util/Config.h"
#include "tests/AtlasTestEnvironment.h"
using Grid = atlas::Grid;
using Config = atlas::util::Config;
namespace atlas {
namespace test {
atlas::FieldSet getIJ(const atlas::functionspace::StructuredColumns& fs) {
atlas::FieldSet ij;
// auto i = atlas::array::make_view<int, 1>( fs.index_i() );
// auto j = atlas::array::make_view<int, 1>( fs.index_j() );
ij.add(fs.index_i());
ij.add(fs.index_j());
return ij;
}
//-----------------------------------------------------------------------------
CASE("test_bands") {
int nproc = mpi::size();
StructuredGrid grid = Grid("L200x101");
grid::Distribution dist(grid, atlas::util::Config("type", "checkerboard") | Config("bands", nproc));
for (int i = 1; i < grid.size(); i++) {
EXPECT(dist.partition(i - 1) <= dist.partition(i));
}
}
CASE("test_regular_bands") {
int nproc = mpi::size();
std::vector<std::string> gridnames = {"L40x21", "L40x20", "Slat100x50"};
for (auto gridname : gridnames) {
SECTION(gridname) {
auto grid = RegularGrid(gridname);
const int nx = grid.nx();
const int ny = grid.ny();
bool equivalent_with_checkerboard =
(ny % nproc) == 0; // Compare regular band & checkerboard distributions when possible
grid::Distribution checkerboard(grid, grid::Partitioner("checkerboard", Config("bands", nproc)));
grid::Distribution regularbands(grid, grid::Partitioner("regular_bands"));
EXPECT(regularbands.footprint() < 100);
const auto& nb_pts2 = regularbands.nb_pts();
int count = 0;
for (int i = 0; i < grid.size(); i++) {
if (regularbands.partition(i) == mpi::rank()) {
count++;
}
}
EXPECT_EQ(count, nb_pts2[mpi::rank()]);
if (equivalent_with_checkerboard) {
for (int i = 0; i < grid.size(); i++) {
EXPECT_EQ(checkerboard.partition(i), regularbands.partition(i));
}
}
else {
Log::warning() << "WARNING: checkerboard not expected to be equal!" << std::endl;
}
// Expect each points with constant latitude to be on the same partition as the first on each latitude.
for (int iy = 0, jglo = 0; iy < ny; iy++) {
int jglo0 = jglo;
for (int ix = 0; ix < nx; ix++, jglo++) {
EXPECT_EQ(regularbands.partition(jglo), regularbands.partition(jglo0));
}
}
functionspace::StructuredColumns fs_checkerboard(grid, checkerboard,
Config("halo", 1) | Config("periodic_points", true));
functionspace::StructuredColumns fs_regularbands(grid, regularbands,
Config("halo", 1) | Config("periodic_points", true));
auto ij1 = getIJ(fs_checkerboard);
auto ij2 = getIJ(fs_regularbands);
fs_checkerboard.haloExchange(ij1);
fs_regularbands.haloExchange(ij2);
if (equivalent_with_checkerboard) {
EXPECT_EQ(fs_regularbands.size(), fs_checkerboard.size());
EXPECT_EQ(fs_regularbands.sizeOwned(), fs_checkerboard.sizeOwned());
auto i1 = array::make_view<idx_t, 1>(ij1[0]);
auto j1 = array::make_view<idx_t, 1>(ij1[1]);
auto i2 = array::make_view<idx_t, 1>(ij2[0]);
auto j2 = array::make_view<idx_t, 1>(ij2[1]);
for (int k = 0; k < fs_checkerboard.sizeOwned(); k++) {
EXPECT_EQ(i1[k], i2[k]);
EXPECT_EQ(j1[k], j2[k]);
}
}
for (int j = fs_regularbands.j_begin_halo(); j < fs_regularbands.j_end_halo(); j++) {
EXPECT_EQ(fs_regularbands.i_begin_halo(j), -1);
EXPECT_EQ(fs_regularbands.i_end_halo(j), nx + 2);
}
}
}
}
CASE("test regular_bands performance test") {
// auto grid = StructuredGrid( "L40000x20000" ); //-- > test takes too long( less than 15 seconds )
// Example timings for L40000x20000:
// └─test regular_bands performance test │ 1 │ 11.90776s
// ├─inline access │ 1 │ 3.52238s
// ├─virtual access │ 1 │ 4.11881s
// └─virtual cached access │ 1 │ 4.02159s
auto grid = StructuredGrid("L5000x2500"); // -> negligible time.
auto dist = grid::Distribution(grid, grid::Partitioner("regular_bands"));
auto& dist_direct = dynamic_cast<const grid::detail::distribution::BandsDistribution<int32_t>&>(*dist.get());
// Trick to prevent the compiler from compiling out a loop if it sees the result was not used.
struct DoNotCompileOut {
int x = 0;
~DoNotCompileOut() { Log::debug() << x << std::endl; }
ATLAS_ALWAYS_INLINE void operator()(int p) { x = p; }
} do_not_compile_out;
gidx_t size = grid.size();
ATLAS_TRACE_SCOPE("inline access") {
for (gidx_t n = 0; n < size; ++n) {
// inline function call
do_not_compile_out(dist_direct.function(n));
}
}
ATLAS_TRACE_SCOPE("virtual access") {
for (gidx_t n = 0; n < size; ++n) {
// virtual function call
do_not_compile_out(dist.partition(n));
}
}
ATLAS_TRACE_SCOPE("virtual cached access") {
gidx_t n = 0;
grid::Distribution::partition_t part(grid.nxmax());
for (idx_t j = 0; j < grid.ny(); ++j) {
const idx_t nx = grid.nx(j);
dist.partition(n, n + nx, part);
// this is one virtual call, which in turn has inline-access for nx(j) evaluations
int* P = part.data();
for (idx_t i = 0; i < nx; ++i) {
do_not_compile_out(P[i]);
}
n += grid.nx(j);
}
}
}
CASE("test regular_bands with a very large grid") {
auto grid = StructuredGrid(sizeof(atlas::idx_t) == 4 ? "L40000x20000" : "L160000x80000");
auto dist = grid::Distribution(grid, grid::Partitioner("regular_bands"));
}
//-----------------------------------------------------------------------------
} // namespace test
} // namespace atlas
int main(int argc, char** argv) {
return atlas::test::run(argc, argv);
}
| 35.282297
| 115
| 0.555194
|
twsearle
|
e6f180d9dc9c90ff8c5aea882d4336024b7c6b0b
| 2,876
|
cpp
|
C++
|
etc/berlekamp_massey with kitamasa.cpp
|
jinhan814/algorithms-implementation
|
b5185f98c5d5d34c0f98de645e5b755fcf75c120
|
[
"MIT"
] | null | null | null |
etc/berlekamp_massey with kitamasa.cpp
|
jinhan814/algorithms-implementation
|
b5185f98c5d5d34c0f98de645e5b755fcf75c120
|
[
"MIT"
] | null | null | null |
etc/berlekamp_massey with kitamasa.cpp
|
jinhan814/algorithms-implementation
|
b5185f98c5d5d34c0f98de645e5b755fcf75c120
|
[
"MIT"
] | null | null | null |
/*
* BOJ 13976
* https://www.acmicpc.net/problem/13976
* reference : https://www.secmem.org/blog/2019/05/17/BerlekampMassey/, https://justicehui.github.io/hard-algorithm/2021/03/13/kitamasa/
*/
#include <bits/stdc++.h>
#define fastio cin.tie(0)->sync_with_stdio(0)
using namespace std;
constexpr int MOD = 1e9 + 7;
using ll = long long;
using poly = vector<ll>;
ll Pow(ll x, ll n) {
ll ret = 1;
for (; n; n >>= 1) {
if (n & 1) ret = ret * x % MOD;
x = x * x % MOD;
}
return ret;
}
poly BerlekampMassey(const poly v) {
poly ls, ret; ll lf, ld;
for (ll i = 0, t = 0; i < v.size(); i++, t = 0) {
for (ll j = 0; j < ret.size(); j++) t = (t + 1ll * v[i - j - 1] * ret[j]) % MOD;
if ((t - v[i]) % MOD == 0) continue;
if (ret.empty()) { ret.resize(i + 1), lf = i, ld = (t - v[i]) % MOD; continue; }
const ll k = -(v[i] - t) * Pow(ld, MOD - 2) % MOD;
poly cur(i - lf - 1); cur.push_back(k);
for (const auto& j : ls) cur.push_back(-j * k % MOD);
if (cur.size() < ret.size()) cur.resize(ret.size());
for (ll j = 0; j < ret.size(); j++) cur[j] = (cur[j] + ret[j]) % MOD;
if (i - lf + (ll)ls.size() >= (ll)ret.size()) ls = ret, lf = i, ld = (t - v[i]) % MOD;
ret = cur;
}
for (auto& i : ret) i = (i % MOD + MOD) % MOD;
reverse(ret.begin(), ret.end());
return ret;
}
struct {
static int Mod(ll x) {
x %= MOD;
return x < 0 ? x + MOD : x;
}
poly Mul(const poly& a, const poly& b) {
poly ret(a.size() + b.size() - 1);
for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) {
ret[i + j] = (ret[i + j] + a[i] * b[j]) % MOD;
}
return ret;
}
poly Div(const poly& a, const poly& b) {
poly ret(a.begin(), a.end());
for (int i = ret.size() - 1; i >= b.size() - 1; i--) for (int j = 0; j < b.size(); j++) {
ret[i + j - b.size() + 1] = Mod(ret[i + j - b.size() + 1] - ret[i] * b[j]);
}
ret.resize(b.size() - 1);
return ret;
}
ll operator() (poly rec, poly dp, ll n) {
if (dp.size() > rec.size()) dp.resize(rec.size());
poly d = { 1 }, xn = { 0, 1 };
poly f(rec.size() + 1); f.back() = 1;
for (int i = 0; i < rec.size(); i++) f[i] = Mod(-rec[i]);
while (n) {
if (n & 1) d = Div(Mul(d, xn), f);
n >>= 1; xn = Div(Mul(xn, xn), f);
}
ll ret = 0;
for (int i = 0; i < dp.size(); i++) ret = Mod(ret + dp[i] * d[i]);
return ret;
}
} Kitamasa;
int main() {
fastio;
poly dp = { 0, 3, 0, 11, 0, 41, 0, 153, 0, 571 };
poly rec = BerlekampMassey(dp);
ll n; cin >> n;
cout << Kitamasa(rec, dp, n - 1) << '\n';
}
| 34.238095
| 137
| 0.439847
|
jinhan814
|
e6f3a9d714382f24aa494d9f82a0f0b7864e084c
| 2,747
|
cpp
|
C++
|
Snake/AIs/StupidAI/StupidAI.cpp
|
Madsy/GameAutomata
|
e32f0442f3238c6110a39dff509244dbec2d60be
|
[
"BSD-3-Clause"
] | 2
|
2015-08-17T17:22:40.000Z
|
2015-11-17T05:15:20.000Z
|
Snake/AIs/StupidAI/StupidAI.cpp
|
Madsy/GameAutomata
|
e32f0442f3238c6110a39dff509244dbec2d60be
|
[
"BSD-3-Clause"
] | null | null | null |
Snake/AIs/StupidAI/StupidAI.cpp
|
Madsy/GameAutomata
|
e32f0442f3238c6110a39dff509244dbec2d60be
|
[
"BSD-3-Clause"
] | null | null | null |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include "../../shared/SnakeGame.hpp"
Direction AIMove(int player, SnakeGameInfo& state)
{
Point head, newHead, foodDelta;
const Direction startMoves[4] = { Up, Down, Left, Right };
Direction d;
std::vector<Direction> possibleMoves;
head = state.snakes[player].bodyParts[0];
foodDelta.x = state.foodPosition.x - head.x;
foodDelta.y = state.foodPosition.y - head.y;
if(foodDelta.x < 0){
possibleMoves.push_back(Left);
} else if(foodDelta.x > 0){
possibleMoves.push_back(Right);
}
if(foodDelta.y < 0){
possibleMoves.push_back(Up);
} else if(foodDelta.y > 0){
possibleMoves.push_back(Down);
}
/* Try to get closer to the food first */
if(!possibleMoves.empty()){
std::random_shuffle(possibleMoves.begin(), possibleMoves.end());
for(int i=0; i<possibleMoves.size(); ++i){
newHead = snakeComputeNewHead(head, possibleMoves[i]);
bool collideWithBorder = snakeIsCellBorder(newHead.x, newHead.y, state.level);
bool collideWithSnake = snakeIsCellSnake(newHead.x, newHead.y, -1, state.snakes);
if(!collideWithBorder && !collideWithSnake){
return possibleMoves[i];
}
}
}
/* If none of the directions that brings us closer to the food is safe, then try any
safe direction. If we die anyway (for example, spiral of death), return Up as a last resort */
possibleMoves.clear();
for(int i = 0; i < 4; ++i){
newHead = snakeComputeNewHead(head, startMoves[i]);
bool collideWithBorder = snakeIsCellBorder(newHead.x, newHead.y, state.level);
bool collideWithSnake = snakeIsCellSnake(newHead.x, newHead.y, -1, state.snakes);
/* If cell is free of walls and snakes, it is a possible move */
if(!collideWithBorder && !collideWithSnake)
possibleMoves.push_back(startMoves[i]);
}
std::random_shuffle(possibleMoves.begin(), possibleMoves.end());
/* If no moves are possible, go up and die */
if(possibleMoves.empty()) d = Up;
else d = possibleMoves[0];
return d;
}
void readGameState(SnakeGameInfo& state)
{
std::vector<std::string> strm;
std::string line;
char szbuf[512];
while(std::getline(std::cin, line)){
if(line == "END") break;
strm.push_back(line);
};
snakeSerializeStreamToState(state, strm);
}
int main(int argc, char* argv[])
{
SnakeGameInfo state;
Direction d;
readGameState(state);
while(state.snakes[state.currentPlayer].alive){
d = AIMove(state.currentPlayer, state);
switch(d){
case Up: std::cout << 'u'; break;
case Down: std::cout << 'd'; break;
case Left: std::cout << 'l'; break;
default: std::cout << 'r'; break;
}
std::cout.flush();
readGameState(state);
}
return 0;
}
| 29.858696
| 99
| 0.670186
|
Madsy
|
e6f3b6ad777fa3f65581e10e8cc18bd21f3e1082
| 18,343
|
hpp
|
C++
|
include/GlobalNamespace/SliderInteractionManager.hpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
include/GlobalNamespace/SliderInteractionManager.hpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
include/GlobalNamespace/SliderInteractionManager.hpp
|
RedBrumbler/BeatSaber-Quest-Codegen
|
73dda50b5a3e51f10d86b766dcaa24b0c6226e25
|
[
"Unlicense"
] | null | null | null |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.MonoBehaviour
#include "UnityEngine/MonoBehaviour.hpp"
// Including type: ColorType
#include "GlobalNamespace/ColorType.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
// Completed includes
// Begin forward declares
// Forward declaring namespace: GlobalNamespace
namespace GlobalNamespace {
// Forward declaring type: BeatmapObjectManager
class BeatmapObjectManager;
// Forward declaring type: SliderController
class SliderController;
}
// Forward declaring namespace: System
namespace System {
// Forward declaring type: Action`1<T>
template<typename T>
class Action_1;
// Forward declaring type: Action
class Action;
}
// Forward declaring namespace: System::Collections::Generic
namespace System::Collections::Generic {
// Forward declaring type: List`1<T>
template<typename T>
class List_1;
}
// Completed forward declares
// Type namespace:
namespace GlobalNamespace {
// Forward declaring type: SliderInteractionManager
class SliderInteractionManager;
}
#include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
NEED_NO_BOX(::GlobalNamespace::SliderInteractionManager);
DEFINE_IL2CPP_ARG_TYPE(::GlobalNamespace::SliderInteractionManager*, "", "SliderInteractionManager");
// Type namespace:
namespace GlobalNamespace {
// Size: 0x48
#pragma pack(push, 1)
// Autogenerated type: SliderInteractionManager
// [TokenAttribute] Offset: FFFFFFFF
class SliderInteractionManager : public ::UnityEngine::MonoBehaviour {
public:
#ifdef USE_CODEGEN_FIELDS
public:
#else
#ifdef CODEGEN_FIELD_ACCESSIBILITY
CODEGEN_FIELD_ACCESSIBILITY:
#else
protected:
#endif
#endif
// private ColorType _colorType
// Size: 0x4
// Offset: 0x18
::GlobalNamespace::ColorType colorType;
// Field size check
static_assert(sizeof(::GlobalNamespace::ColorType) == 0x4);
// Padding between fields: colorType and: beatmapObjectManager
char __padding0[0x4] = {};
// [InjectAttribute] Offset: 0x124FC68
// private readonly BeatmapObjectManager _beatmapObjectManager
// Size: 0x8
// Offset: 0x20
::GlobalNamespace::BeatmapObjectManager* beatmapObjectManager;
// Field size check
static_assert(sizeof(::GlobalNamespace::BeatmapObjectManager*) == 0x8);
// private System.Single <saberInteractionParam>k__BackingField
// Size: 0x4
// Offset: 0x28
float saberInteractionParam;
// Field size check
static_assert(sizeof(float) == 0x4);
// Padding between fields: saberInteractionParam and: sliderWasAddedToActiveSlidersEvent
char __padding2[0x4] = {};
// private System.Action`1<System.Single> sliderWasAddedToActiveSlidersEvent
// Size: 0x8
// Offset: 0x30
::System::Action_1<float>* sliderWasAddedToActiveSlidersEvent;
// Field size check
static_assert(sizeof(::System::Action_1<float>*) == 0x8);
// private System.Action allSliderWereRemovedFromActiveSlidersEvent
// Size: 0x8
// Offset: 0x38
::System::Action* allSliderWereRemovedFromActiveSlidersEvent;
// Field size check
static_assert(sizeof(::System::Action*) == 0x8);
// private readonly System.Collections.Generic.List`1<SliderController> _activeSliders
// Size: 0x8
// Offset: 0x40
::System::Collections::Generic::List_1<::GlobalNamespace::SliderController*>* activeSliders;
// Field size check
static_assert(sizeof(::System::Collections::Generic::List_1<::GlobalNamespace::SliderController*>*) == 0x8);
public:
// Deleting conversion operator: operator ::System::IntPtr
constexpr operator ::System::IntPtr() const noexcept = delete;
// Get instance field reference: private ColorType _colorType
::GlobalNamespace::ColorType& dyn__colorType();
// Get instance field reference: private readonly BeatmapObjectManager _beatmapObjectManager
::GlobalNamespace::BeatmapObjectManager*& dyn__beatmapObjectManager();
// Get instance field reference: private System.Single <saberInteractionParam>k__BackingField
float& dyn_$saberInteractionParam$k__BackingField();
// Get instance field reference: private System.Action`1<System.Single> sliderWasAddedToActiveSlidersEvent
::System::Action_1<float>*& dyn_sliderWasAddedToActiveSlidersEvent();
// Get instance field reference: private System.Action allSliderWereRemovedFromActiveSlidersEvent
::System::Action*& dyn_allSliderWereRemovedFromActiveSlidersEvent();
// Get instance field reference: private readonly System.Collections.Generic.List`1<SliderController> _activeSliders
::System::Collections::Generic::List_1<::GlobalNamespace::SliderController*>*& dyn__activeSliders();
// public ColorType get_colorType()
// Offset: 0x2AA189C
::GlobalNamespace::ColorType get_colorType();
// public System.Single get_saberInteractionParam()
// Offset: 0x2AA18A4
float get_saberInteractionParam();
// private System.Void set_saberInteractionParam(System.Single value)
// Offset: 0x2AA18AC
void set_saberInteractionParam(float value);
// public System.Void add_sliderWasAddedToActiveSlidersEvent(System.Action`1<System.Single> value)
// Offset: 0x2AA1524
void add_sliderWasAddedToActiveSlidersEvent(::System::Action_1<float>* value);
// public System.Void remove_sliderWasAddedToActiveSlidersEvent(System.Action`1<System.Single> value)
// Offset: 0x2AA173C
void remove_sliderWasAddedToActiveSlidersEvent(::System::Action_1<float>* value);
// public System.Void add_allSliderWereRemovedFromActiveSlidersEvent(System.Action value)
// Offset: 0x2AA15C8
void add_allSliderWereRemovedFromActiveSlidersEvent(::System::Action* value);
// public System.Void remove_allSliderWereRemovedFromActiveSlidersEvent(System.Action value)
// Offset: 0x2AA17E0
void remove_allSliderWereRemovedFromActiveSlidersEvent(::System::Action* value);
// protected System.Void Start()
// Offset: 0x2AA18B4
void Start();
// protected System.Void OnDestroy()
// Offset: 0x2AA198C
void OnDestroy();
// protected System.Void Update()
// Offset: 0x2AA1A78
void Update();
// private System.Void AddActiveSlider(SliderController newSliderController)
// Offset: 0x2AA1BE0
void AddActiveSlider(::GlobalNamespace::SliderController* newSliderController);
// private System.Void RemoveActiveSlider(SliderController sliderController)
// Offset: 0x2AA1DA4
void RemoveActiveSlider(::GlobalNamespace::SliderController* sliderController);
// private System.Void HandleSliderWasSpawned(SliderController sliderController)
// Offset: 0x2AA1E3C
void HandleSliderWasSpawned(::GlobalNamespace::SliderController* sliderController);
// private System.Void HandleSliderWasDespawned(SliderController sliderController)
// Offset: 0x2AA1E74
void HandleSliderWasDespawned(::GlobalNamespace::SliderController* sliderController);
// public System.Void .ctor()
// Offset: 0x2AA1EAC
// Implemented from: UnityEngine.MonoBehaviour
// Base method: System.Void MonoBehaviour::.ctor()
// Base method: System.Void Behaviour::.ctor()
// Base method: System.Void Component::.ctor()
// Base method: System.Void Object::.ctor()
// Base method: System.Void Object::.ctor()
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static SliderInteractionManager* New_ctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::GlobalNamespace::SliderInteractionManager::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<SliderInteractionManager*, creationType>()));
}
}; // SliderInteractionManager
#pragma pack(pop)
static check_size<sizeof(SliderInteractionManager), 64 + sizeof(::System::Collections::Generic::List_1<::GlobalNamespace::SliderController*>*)> __GlobalNamespace_SliderInteractionManagerSizeCheck;
static_assert(sizeof(SliderInteractionManager) == 0x48);
}
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::get_colorType
// Il2CppName: get_colorType
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<::GlobalNamespace::ColorType (GlobalNamespace::SliderInteractionManager::*)()>(&GlobalNamespace::SliderInteractionManager::get_colorType)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "get_colorType", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::get_saberInteractionParam
// Il2CppName: get_saberInteractionParam
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<float (GlobalNamespace::SliderInteractionManager::*)()>(&GlobalNamespace::SliderInteractionManager::get_saberInteractionParam)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "get_saberInteractionParam", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::set_saberInteractionParam
// Il2CppName: set_saberInteractionParam
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(float)>(&GlobalNamespace::SliderInteractionManager::set_saberInteractionParam)> {
static const MethodInfo* get() {
static auto* value = &::il2cpp_utils::GetClassFromName("System", "Single")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "set_saberInteractionParam", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{value});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::add_sliderWasAddedToActiveSlidersEvent
// Il2CppName: add_sliderWasAddedToActiveSlidersEvent
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::System::Action_1<float>*)>(&GlobalNamespace::SliderInteractionManager::add_sliderWasAddedToActiveSlidersEvent)> {
static const MethodInfo* get() {
static auto* value = &::il2cpp_utils::MakeGeneric(::il2cpp_utils::GetClassFromName("System", "Action`1"), ::std::vector<const Il2CppClass*>{::il2cpp_utils::GetClassFromName("System", "Single")})->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "add_sliderWasAddedToActiveSlidersEvent", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{value});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::remove_sliderWasAddedToActiveSlidersEvent
// Il2CppName: remove_sliderWasAddedToActiveSlidersEvent
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::System::Action_1<float>*)>(&GlobalNamespace::SliderInteractionManager::remove_sliderWasAddedToActiveSlidersEvent)> {
static const MethodInfo* get() {
static auto* value = &::il2cpp_utils::MakeGeneric(::il2cpp_utils::GetClassFromName("System", "Action`1"), ::std::vector<const Il2CppClass*>{::il2cpp_utils::GetClassFromName("System", "Single")})->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "remove_sliderWasAddedToActiveSlidersEvent", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{value});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::add_allSliderWereRemovedFromActiveSlidersEvent
// Il2CppName: add_allSliderWereRemovedFromActiveSlidersEvent
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::System::Action*)>(&GlobalNamespace::SliderInteractionManager::add_allSliderWereRemovedFromActiveSlidersEvent)> {
static const MethodInfo* get() {
static auto* value = &::il2cpp_utils::GetClassFromName("System", "Action")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "add_allSliderWereRemovedFromActiveSlidersEvent", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{value});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::remove_allSliderWereRemovedFromActiveSlidersEvent
// Il2CppName: remove_allSliderWereRemovedFromActiveSlidersEvent
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::System::Action*)>(&GlobalNamespace::SliderInteractionManager::remove_allSliderWereRemovedFromActiveSlidersEvent)> {
static const MethodInfo* get() {
static auto* value = &::il2cpp_utils::GetClassFromName("System", "Action")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "remove_allSliderWereRemovedFromActiveSlidersEvent", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{value});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::Start
// Il2CppName: Start
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)()>(&GlobalNamespace::SliderInteractionManager::Start)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "Start", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::OnDestroy
// Il2CppName: OnDestroy
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)()>(&GlobalNamespace::SliderInteractionManager::OnDestroy)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "OnDestroy", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::Update
// Il2CppName: Update
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)()>(&GlobalNamespace::SliderInteractionManager::Update)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "Update", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::AddActiveSlider
// Il2CppName: AddActiveSlider
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::GlobalNamespace::SliderController*)>(&GlobalNamespace::SliderInteractionManager::AddActiveSlider)> {
static const MethodInfo* get() {
static auto* newSliderController = &::il2cpp_utils::GetClassFromName("", "SliderController")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "AddActiveSlider", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{newSliderController});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::RemoveActiveSlider
// Il2CppName: RemoveActiveSlider
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::GlobalNamespace::SliderController*)>(&GlobalNamespace::SliderInteractionManager::RemoveActiveSlider)> {
static const MethodInfo* get() {
static auto* sliderController = &::il2cpp_utils::GetClassFromName("", "SliderController")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "RemoveActiveSlider", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{sliderController});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::HandleSliderWasSpawned
// Il2CppName: HandleSliderWasSpawned
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::GlobalNamespace::SliderController*)>(&GlobalNamespace::SliderInteractionManager::HandleSliderWasSpawned)> {
static const MethodInfo* get() {
static auto* sliderController = &::il2cpp_utils::GetClassFromName("", "SliderController")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "HandleSliderWasSpawned", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{sliderController});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::HandleSliderWasDespawned
// Il2CppName: HandleSliderWasDespawned
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::SliderInteractionManager::*)(::GlobalNamespace::SliderController*)>(&GlobalNamespace::SliderInteractionManager::HandleSliderWasDespawned)> {
static const MethodInfo* get() {
static auto* sliderController = &::il2cpp_utils::GetClassFromName("", "SliderController")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::SliderInteractionManager*), "HandleSliderWasDespawned", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{sliderController});
}
};
// Writing MetadataGetter for method: GlobalNamespace::SliderInteractionManager::New_ctor
// Il2CppName: .ctor
// Cannot get method pointer of value based method overload from template for constructor!
// Try using FindMethod instead!
| 59.749186
| 239
| 0.774737
|
RedBrumbler
|
e6fb7a55a534790d4ee470e7dc39cc86affa0e9e
| 721
|
hpp
|
C++
|
sprout/tuple/indexes.hpp
|
jwakely/Sprout
|
a64938fad0a64608f22d39485bc55a1e0dc07246
|
[
"BSL-1.0"
] | 1
|
2018-09-21T23:50:44.000Z
|
2018-09-21T23:50:44.000Z
|
sprout/tuple/indexes.hpp
|
jwakely/Sprout
|
a64938fad0a64608f22d39485bc55a1e0dc07246
|
[
"BSL-1.0"
] | null | null | null |
sprout/tuple/indexes.hpp
|
jwakely/Sprout
|
a64938fad0a64608f22d39485bc55a1e0dc07246
|
[
"BSL-1.0"
] | null | null | null |
#ifndef SPROUT_TUPLE_INDEXES_HPP
#define SPROUT_TUPLE_INDEXES_HPP
#include <sprout/config.hpp>
#include <sprout/index_tuple.hpp>
#include <sprout/index_tuple/detail/make_indexes_helper.hpp>
#include <sprout/tuple/tuple.hpp>
namespace sprout {
namespace tuples {
//
// tuple_indexes
//
template<typename Tuple>
struct tuple_indexes
: public sprout::detail::make_indexes_helper<
sprout::index_range<0, sprout::tuples::tuple_size<Tuple>::value>
>
{};
} // namespace tuples
//
// tuple_indexes
//
template<typename Tuple>
struct tuple_indexes
: public sprout::tuples::tuple_indexes<Tuple>
{};
} // namespace sprout
#endif // #ifndef SPROUT_TUPLE_INDEXES_HPP
| 22.53125
| 69
| 0.708738
|
jwakely
|
e6fced42eecd74e756b76964d9ff0b95b731355f
| 2,762
|
hh
|
C++
|
prothos/runtime/runtime/FlowGraph.hh
|
ManyThreads/prothos
|
dd77c46df1dde323ccdfeac3319ba1dd2ea15ce1
|
[
"MIT"
] | 1
|
2017-03-09T10:18:54.000Z
|
2017-03-09T10:18:54.000Z
|
prothos/runtime/runtime/FlowGraph.hh
|
ManyThreads/prothos
|
dd77c46df1dde323ccdfeac3319ba1dd2ea15ce1
|
[
"MIT"
] | 9
|
2018-10-02T11:41:07.000Z
|
2019-02-07T14:39:52.000Z
|
prothos/runtime/runtime/FlowGraph.hh
|
ManyThreads/prothos
|
dd77c46df1dde323ccdfeac3319ba1dd2ea15ce1
|
[
"MIT"
] | 1
|
2021-12-10T16:40:56.000Z
|
2021-12-10T16:40:56.000Z
|
#pragma once
#include "runtime/FlowGraph_impl.hh"
namespace Prothos {
namespace FlowGraph {
class Graph {
public:
Graph() {}
};
class GraphNode {
public:
GraphNode(Graph &g)
: g(g)
{}
private:
Graph &g;
};
template<typename T>
inline void makeEdge(Internal::Sender<T> &s, Internal::Receiver<T> &r) {
s.registerSuccessor(r);
r.registerPredecessor(s);
}
template<typename T>
inline void removeEdge(Internal::Sender<T> &s, Internal::Receiver<T> &r) {
s.removeSuccessor(r);
r.removePredecessor(s);
}
template<typename Input, typename Output>
class FunctionNode : public GraphNode, public Internal::FunctionInput<Input, Output>, public Internal::Sender<Output> {
public:
template<typename Body>
FunctionNode(Graph &g, Body body)
: GraphNode(g)
, Internal::FunctionInput<Input, Output>(body)
{}
std::vector<Internal::Receiver<Output>*> successors() override {
return Internal::Sender<Output>::successors();
}
};
template <typename OutTuple>
class JoinNode : public GraphNode, public Internal::JoinInput<OutTuple>, public Internal::Sender<OutTuple> {
public:
JoinNode(Graph &g)
: GraphNode(g)
{}
std::vector<Internal::Receiver<OutTuple>*> successors() {
return Internal::Sender<OutTuple>::successors();
}
};
template<typename Output>
class SourceNode : public GraphNode, public Internal::Sender<Output> {
public:
typedef Internal::SourceBody<Output&, bool> SourceBodyType;
template<typename Body>
SourceNode(Graph &g, Body body)
: GraphNode(g)
, myBody(new Internal::SourceBodyLeaf<Output&, bool, Body>(body))
{}
~SourceNode() {
delete myBody;
}
std::vector<Internal::Receiver<Output>*> successors() {
return Internal::Sender<Output>::successors();
}
void activate() {
new Internal::SourceTask<SourceNode, Output>(*this);
}
private:
bool applyBody(Output &m) {
return (*myBody)(m);
}
SourceBodyType *myBody;
template<typename NodeType, typename Out> friend class Internal::SourceTask;
};
template<typename Input, typename Output, size_t Ports>
class ConditionalNode : public GraphNode, public Internal::CondInput<Input, Output, Ports>{
public:
template<typename Body>
ConditionalNode(Graph &g, Body body)
: GraphNode(g)
, Internal::CondInput<Input, Output, Ports>(body)
{}
std::vector<Internal::Receiver<Output>*> successors(size_t port) override {
ASSERT(port < Ports);
return sender[port].successors();
}
Internal::Sender<Output>& get(size_t port){
ASSERT(port < Ports);
return sender[port];
}
private:
Internal::Sender<Output> sender[Ports];
};
} // FlowGraph
} // Prothos
| 21.920635
| 119
| 0.669442
|
ManyThreads
|
e6fd33400e83c691970a57f89d22cb2ae8921bf6
| 270
|
cpp
|
C++
|
Pacote-Download/C-C++/repeticao4.cpp
|
AbnerSantos25/Arquivos-em-C
|
fe20725012ca1c2f1976b93f8520b6b528b249d9
|
[
"MIT"
] | null | null | null |
Pacote-Download/C-C++/repeticao4.cpp
|
AbnerSantos25/Arquivos-em-C
|
fe20725012ca1c2f1976b93f8520b6b528b249d9
|
[
"MIT"
] | null | null | null |
Pacote-Download/C-C++/repeticao4.cpp
|
AbnerSantos25/Arquivos-em-C
|
fe20725012ca1c2f1976b93f8520b6b528b249d9
|
[
"MIT"
] | null | null | null |
#include <stdio.h>
int main()
{
int num, fat=1;
printf("calcula o fatorial de um numero\n");
printf("informe o numero: ");
scanf("%d",&num);
for(int i=num; i>=1; i--)
fat *= i;
printf("o fatorial de %d e %d",num,fat);
return 0;
}
| 18
| 48
| 0.525926
|
AbnerSantos25
|
e6fdb753db279599a480bf07b6306068a80e8354
| 7,414
|
cpp
|
C++
|
software/esp32-firmware/src/uart_thread.cpp
|
vhs/vhs-door-nfc
|
55b8210d7b07a5c6fa26bc40fae8362b504addd6
|
[
"Apache-2.0"
] | null | null | null |
software/esp32-firmware/src/uart_thread.cpp
|
vhs/vhs-door-nfc
|
55b8210d7b07a5c6fa26bc40fae8362b504addd6
|
[
"Apache-2.0"
] | 1
|
2019-02-01T23:03:20.000Z
|
2019-02-02T19:48:57.000Z
|
software/esp32-firmware/src/uart_thread.cpp
|
vhs/vhs-door-nfc
|
55b8210d7b07a5c6fa26bc40fae8362b504addd6
|
[
"Apache-2.0"
] | 1
|
2020-02-16T06:43:42.000Z
|
2020-02-16T06:43:42.000Z
|
#include <stdio.h>
#include <string.h>
#include <sys/unistd.h>
#include <sys/stat.h>
#include <time.h>
#include <sys/time.h>
#include <assert.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include <esp_types.h>
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "esp_task_wdt.h"
#include "esp_log.h"
#include "driver/uart.h"
#include "rom/uart.h"
#include "utils.h"
#include "uart_thread.h"
#include "main_thread.h"
#define TAG "UART"
TaskHandle_t UART_taskHandle = NULL;
QueueHandle_t UART_queueHandle = NULL;
static StaticQueue_t UART_queueStructure;
static UartNotification UART_queueStorage[8] = {};
#define UART_FLUSH() while (uart_rx_one_char(&ch) == ESP_OK)
#define UART_WAIT_KEY() \
while (uart_rx_one_char(&ch) != ESP_OK) \
vTaskDelay(1 / portTICK_PERIOD_MS)
#define STM32_UART_TXD (GPIO_NUM_4)
#define STM32_UART_RXD (GPIO_NUM_36)
#define STM32_UART_RTS (UART_PIN_NO_CHANGE)
#define STM32_UART_CTS (UART_PIN_NO_CHANGE)
#define STM32_UART_BUFFER_SIZE 1024
static char stm32UartBuffer[STM32_UART_BUFFER_SIZE] = {};
static void uart_task(void* pvParameters) {
ESP_LOGI(TAG, "UART task running...");
const char* UART_cmd_ready = "ESP32_READY\n";
const char* UART_cmd_play_beep_01 = "PLAY_BEEP_01\n";
const char* UART_cmd_play_beep_02 = "PLAY_BEEP_02\n";
const char* UART_cmd_play_beep_03 = "PLAY_BEEP_03\n";
const char* UART_cmd_play_beep_04 = "PLAY_BEEP_04\n";
const char* UART_cmd_play_beep_05 = "PLAY_BEEP_05\n";
const char* UART_cmd_play_beep_06 = "PLAY_BEEP_06\n";
const char* UART_cmd_play_buzzer_01 = "PLAY_BUZZER_01\n";
const char* UART_cmd_play_buzzer_02 = "PLAY_BUZZER_02\n";
const char* UART_cmd_play_success = "PLAY_SUCCESS\n";
const char* UART_cmd_play_failure = "PLAY_FAILURE\n";
const char* UART_cmd_play_smb = "PLAY_SMB\n";
const char* UART_cmd_lock_door = "LOCK_DOOR\n";
const char* UART_cmd_unlock_door = "UNLOCK_DOOR\n";
const char* rfid_cmd_prefix = "RFID:";
const char* pin_cmd_prefix = "PIN:";
uart_write_bytes(UART_NUM_1, (const char*)UART_cmd_ready, strlen(UART_cmd_ready));
while (1) {
// Check for any waiting notifications
UartNotification notification;
while (xQueueReceive(UART_queueHandle, ¬ification, 0) == pdTRUE) {
const char* message = NULL;
if (notification == UART_NOTIFICATION_PlayBeepShortMedium) {
message = UART_cmd_play_beep_01;
} else if (notification == UART_NOTIFICATION_PlayBeepShortLow) {
message = UART_cmd_play_beep_02;
} else if (notification == UART_NOTIFICATION_PlayBeepLongMedium) {
message = UART_cmd_play_beep_03;
} else if (notification == UART_NOTIFICATION_PlayBeepLongLow) {
message = UART_cmd_play_beep_04;
} else if (notification == UART_NOTIFICATION_PlayBeepShortHigh) {
message = UART_cmd_play_beep_05;
} else if (notification == UART_NOTIFICATION_PlayBeepLongHigh) {
message = UART_cmd_play_beep_06;
} else if (notification == UART_NOTIFICATION_PlayBuzzer01) {
message = UART_cmd_play_buzzer_01;
} else if (notification == UART_NOTIFICATION_PlayBuzzer02) {
message = UART_cmd_play_buzzer_02;
} else if (notification == UART_NOTIFICATION_PlaySuccess) {
message = UART_cmd_play_success;
} else if (notification == UART_NOTIFICATION_PlayFailure) {
message = UART_cmd_play_failure;
} else if (notification == UART_NOTIFICATION_PlaySmb) {
message = UART_cmd_play_smb;
} else if (notification == UART_NOTIFICATION_LockDoor) {
message = UART_cmd_lock_door;
} else if (notification == UART_NOTIFICATION_UnlockDoor) {
message = UART_cmd_unlock_door;
}
if (message != NULL) {
uart_write_bytes(UART_NUM_1, (const char*)message, strlen(message));
}
}
// Read data from the UART
int len = uart_read_bytes(UART_NUM_1, (uint8_t*)stm32UartBuffer, STM32_UART_BUFFER_SIZE - 1, 20 / portTICK_RATE_MS);
if (len > 0) {
stm32UartBuffer[len] = '\0';
if (strstr(stm32UartBuffer, rfid_cmd_prefix) == stm32UartBuffer) {
for (int i = 0; i < len; i++) {
if (stm32UartBuffer[i] == '\n') {
stm32UartBuffer[i] = '\0';
}
}
len = strlen(stm32UartBuffer) - strlen(rfid_cmd_prefix);
const char* id = stm32UartBuffer + strlen(rfid_cmd_prefix);
MainNotificationArgs mainNotificationArgs;
bzero(&mainNotificationArgs, sizeof(MainNotificationArgs));
mainNotificationArgs.notification = MAIN_NOTIFICATION_RfidReady;
mainNotificationArgs.rfid.idLength = len;
memcpy(mainNotificationArgs.rfid.id, id, len);
if (xQueueSendToBack(MAIN_queueHandle, &mainNotificationArgs, 100 / portTICK_PERIOD_MS) != pdTRUE) {
// Erk. Did not add to the queue. Oh well? User can just try again when they realize...
}
} else if (strstr(stm32UartBuffer, pin_cmd_prefix) == stm32UartBuffer) {
for (int i = 0; i < len; i++) {
if (stm32UartBuffer[i] == '\n') {
stm32UartBuffer[i] = '\0';
}
}
len = strlen(stm32UartBuffer) - strlen(pin_cmd_prefix);
const char* pin = stm32UartBuffer + strlen(pin_cmd_prefix);
MainNotificationArgs mainNotificationArgs;
bzero(&mainNotificationArgs, sizeof(MainNotificationArgs));
mainNotificationArgs.notification = MAIN_NOTIFICATION_PinReady;
mainNotificationArgs.pin.code = atol(pin);
if (xQueueSendToBack(MAIN_queueHandle, &mainNotificationArgs, 100 / portTICK_PERIOD_MS) != pdTRUE) {
// Erk. Did not add to the queue. Oh well? User can just try again when they realize...
}
}
}
}
}
//
void uart_init() {
ESP_LOGI(TAG, "Initializing UART...");
UART_queueHandle = xQueueCreateStatic(ARRAY_COUNT(UART_queueStorage), sizeof(UartNotification), (uint8_t*)UART_queueStorage, &UART_queueStructure);
uart_config_t uart_config = {
.baud_rate = 115200,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.rx_flow_ctrl_thresh = 0,
.use_ref_tick = false
};
ESP_ERROR_CHECK(uart_param_config(UART_NUM_1, &uart_config));
ESP_ERROR_CHECK(uart_set_pin(UART_NUM_1, STM32_UART_TXD, STM32_UART_RXD, STM32_UART_RTS, STM32_UART_CTS));
ESP_ERROR_CHECK(uart_driver_install(UART_NUM_1, STM32_UART_BUFFER_SIZE * 2, 0, 0, NULL, 0));
}
//
void uart_thread_create() {
xTaskCreate(&uart_task, "uart_task", 4 * 1024, NULL, 10, &UART_taskHandle);
}
| 40.075676
| 151
| 0.632587
|
vhs
|
e6ff3dffcd27ace8ddd9f25a3988255f48674290
| 2,749
|
hpp
|
C++
|
lib/sfml/src/Object.hpp
|
benjyup/cpp_arcade
|
4b755990b64156148e529da1c39efe8a8c0c5d1f
|
[
"MIT"
] | null | null | null |
lib/sfml/src/Object.hpp
|
benjyup/cpp_arcade
|
4b755990b64156148e529da1c39efe8a8c0c5d1f
|
[
"MIT"
] | null | null | null |
lib/sfml/src/Object.hpp
|
benjyup/cpp_arcade
|
4b755990b64156148e529da1c39efe8a8c0c5d1f
|
[
"MIT"
] | null | null | null |
/*
** Object.hpp for cpp_arcade in /home/peixot_b/delivery/cpp_arcade/Object.hpp
**
** Made by benjamin.peixoto
** Login <benjamin.peixoto@epitech.eu>
**
** Started on Mon Apr 03 14:18:52 2017 benjamin.peixoto
// Last update Fri Apr 7 15:36:07 2017 Benjamin
*/
#ifndef Object_HPP_
#define Object_HPP_
#include <fstream>
#include <algorithm>
#include <ostream>
#include <cstdint>
#include <SFML/Graphics.hpp>
#include "IObject.hpp"
namespace arcade
{
class Window;
class SfmlLib;
class Object : public IObject
{
public:
enum class ObjectType : char
{
Object = 0,
Label = 1
};
static const std::string directory_name;
static const std::string file_extension;
Object();
Object(const std::string &name, const std::string &filename);
Object(const Object& other);
bool operator==(const Object &rhs) const;
bool operator!=(const Object &rhs) const;
virtual ~Object();
Object &operator=(const Object &other);
virtual void setName(std::string const &);
virtual void setString(std::string const &);
virtual void setPosition(Vector3d const &);
virtual void setDirection(Vector3d const &);
virtual void setSpeed(float);
virtual void setScale(float);
virtual void setTextureFile(std::string const &);
virtual std::string const &getName(void) const;
virtual std::string const &getString(void) const;
virtual std::string const &getFilename(void) const;
virtual arcade::Vector3d const &getPosition (void) const;
virtual arcade::Vector3d const &getDirection(void) const;
virtual float getSpeed(void) const;
virtual float getScale(void) const;
virtual Object::ObjectType getType(void) const;
virtual sf::Drawable &getDrawable(void) = 0;
virtual std::string const &getTextureFile(void) const;
protected:
sf::Color _color;
char _colorTurn;
std::string _name;
std::string _str;
std::string _filename;
std::string _string;
Vector3d _position;
Vector3d _direction;
float _speed;
float _scale;
std::string _background;
std::string _character;
bool _isMoving;
};
std::ostream &operator<<(std::ostream &os, const Object &object);
}
#endif //Object_HPP_
| 30.544444
| 80
| 0.563478
|
benjyup
|
fc001a66094c076fdcc4703bf46f0f93f64ba66f
| 8,406
|
cpp
|
C++
|
CMinus/CMinus/evaluator/comparison.cpp
|
benbraide/CMinusMinus
|
6e32b825f192634538b3adde6ca579a548ca3f7e
|
[
"MIT"
] | null | null | null |
CMinus/CMinus/evaluator/comparison.cpp
|
benbraide/CMinusMinus
|
6e32b825f192634538b3adde6ca579a548ca3f7e
|
[
"MIT"
] | null | null | null |
CMinus/CMinus/evaluator/comparison.cpp
|
benbraide/CMinusMinus
|
6e32b825f192634538b3adde6ca579a548ca3f7e
|
[
"MIT"
] | null | null | null |
#include "../type/string_type.h"
#include "../storage/global_storage.h"
#include "comparison.h"
cminus::evaluator::comparison::~comparison() = default;
cminus::evaluator::numeric_comparison::~numeric_comparison() = default;
cminus::evaluator::object::memory_ptr_type cminus::evaluator::numeric_comparison::evaluate(operators::id op, object::memory_ptr_type left_value, object::memory_ptr_type right_value) const{
auto left_type = left_value->get_type(), right_type = right_value->get_type();
if (left_type == nullptr || right_type == nullptr)
throw exception::invalid_type();
auto left_number_type = left_type->as<type::number_primitive>();
if (left_number_type == nullptr)
throw exception::unsupported_op();
auto compatible_left_value = left_value, compatible_right_value = right_value;
auto right_number_type = right_type->as<type::number_primitive>();
if (right_number_type == nullptr){
if (right_type->is<type::string>()){
auto left_string_value = left_number_type->get_string_value(left_value);
auto right_string_value = runtime::object::global_storage->get_string_value(right_value);
if (op == operators::id::spaceship)
return create_compare_value_(compare_string_(left_string_value, right_string_value));
return create_value_(evaluate_string_(op, left_string_value, right_string_value));
}
if ((compatible_right_value = right_type->cast(right_value, left_type, type::cast_type::static_rval)) != nullptr){
right_type = left_type;
right_number_type = left_number_type;
}
}
else if (left_number_type->get_precedence(*right_number_type) == left_number_type->get_state()){
compatible_right_value = right_type->cast(right_value, left_type, type::cast_type::static_rval);
right_type = left_type;
right_number_type = left_number_type;
}
else{//Convert left
compatible_left_value = left_type->cast(left_value, right_type, type::cast_type::static_rval);
left_type = right_type;
left_number_type = right_number_type;
}
if (compatible_left_value == nullptr || compatible_right_value == nullptr)
throw exception::incompatible_rval();
switch (left_number_type->get_state()){
case type::number_primitive::state_type::small_integer:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<__int16>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<__int16>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::integer:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<__int32>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<__int32>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::big_integer:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<__int64>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<__int64>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::unsigned_small_integer:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<unsigned __int16>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<unsigned __int16>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::unsigned_integer:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<unsigned __int32>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<unsigned __int32>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::unsigned_big_integer:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<unsigned __int64>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<unsigned __int64>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::small_float:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<float>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<float>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::float_:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<double>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<double>(op, compatible_left_value, compatible_right_value));
case type::number_primitive::state_type::big_float:
if (op == operators::id::spaceship)
return create_compare_value_(compare_numeric_<long double>(compatible_left_value, compatible_right_value));
return create_value_(evaluate_numeric_<long double>(op, compatible_left_value, compatible_right_value));
default:
break;
}
throw exception::unsupported_op();
return nullptr;
}
cminus::evaluator::object::memory_ptr_type cminus::evaluator::numeric_comparison::evaluate(operators::id op, object::memory_ptr_type left_value, object::node_ptr_type right) const{
auto right_value = pre_evaluate_(op, left_value, right);
return ((right_value == nullptr) ? nullptr : evaluate(op, left_value, right_value));
}
cminus::evaluator::object::memory_ptr_type cminus::evaluator::comparison::pre_evaluate_(operators::id op, object::memory_ptr_type left_value, object::node_ptr_type right) const{
switch (op){
case operators::id::less:
case operators::id::less_or_equal:
case operators::id::equal:
case operators::id::not_equal:
case operators::id::greater_or_equal:
case operators::id::greater:
case operators::id::spaceship:
break;
default:
return nullptr;
}
if (left_value == nullptr)
throw exception::unsupported_op();
auto right_value = right->evaluate();
if (right_value == nullptr)
throw exception::unsupported_op();
return right_value;
}
bool cminus::evaluator::comparison::evaluate_string_(operators::id op, const std::string_view &left, const std::string_view &right) const{
switch (op){
case operators::id::less:
return (left < right);
case operators::id::less_or_equal:
return (left <= right);
case operators::id::equal:
return (left == right);
case operators::id::not_equal:
return (left != right);
case operators::id::greater_or_equal:
return (left >= right);
case operators::id::greater:
return (left > right);
default:
break;
}
return false;
}
int cminus::evaluator::comparison::compare_string_(const std::string_view &left, const std::string_view &right) const{
return left.compare(right);
}
cminus::evaluator::object::memory_ptr_type cminus::evaluator::comparison::create_value_(bool value) const{
return runtime::object::global_storage->get_boolean_value(value);
}
cminus::evaluator::object::memory_ptr_type cminus::evaluator::comparison::create_compare_value_(int value) const{
return std::make_shared<memory::scalar_reference<int>>(runtime::object::global_storage->get_int_type(), value);
}
cminus::evaluator::pointer_comparison::~pointer_comparison() = default;
cminus::evaluator::object::memory_ptr_type cminus::evaluator::pointer_comparison::evaluate(operators::id op, object::memory_ptr_type left_value, object::memory_ptr_type right_value) const{
auto left_type = left_value->get_type(), right_type = right_value->get_type();
if (left_type == nullptr || right_type == nullptr)
throw exception::invalid_type();
auto compatible_left_value = left_value, compatible_right_value = right_value;
if ((compatible_right_value = right_type->cast(right_value, left_type, type::cast_type::static_rval)) == nullptr){//Try casting left value
if ((compatible_left_value = left_type->cast(left_value, right_type, type::cast_type::static_rval)) != nullptr)
compatible_right_value = right_value;
else//Failed both conversions
throw exception::unsupported_op();
}
return create_value_(evaluate_<std::size_t>(op, compatible_left_value, compatible_right_value));
}
cminus::evaluator::object::memory_ptr_type cminus::evaluator::pointer_comparison::evaluate(operators::id op, object::memory_ptr_type left_value, object::node_ptr_type right) const{
auto right_value = pre_evaluate_(op, left_value, right);
return ((right_value == nullptr) ? nullptr : evaluate(op, left_value, right_value));
}
| 46.441989
| 188
| 0.786224
|
benbraide
|
fc05318d0135c7a78b86a34b868117c50b606c4b
| 1,510
|
hpp
|
C++
|
core/include/bind/emu/edi_jump_caret.hpp
|
pit-ray/win-vind
|
7386f6f7528d015ce7f1a5ae230d6e63f9492df9
|
[
"MIT"
] | 731
|
2020-05-07T06:22:59.000Z
|
2022-03-31T16:36:03.000Z
|
core/include/bind/emu/edi_jump_caret.hpp
|
pit-ray/win-vind
|
7386f6f7528d015ce7f1a5ae230d6e63f9492df9
|
[
"MIT"
] | 67
|
2020-07-20T19:46:42.000Z
|
2022-03-31T15:34:47.000Z
|
core/include/bind/emu/edi_jump_caret.hpp
|
pit-ray/win-vind
|
7386f6f7528d015ce7f1a5ae230d6e63f9492df9
|
[
"MIT"
] | 15
|
2021-01-29T04:49:11.000Z
|
2022-03-04T22:16:31.000Z
|
#ifndef _EDI_JUMP_CARET_HPP
#define _EDI_JUMP_CARET_HPP
#include "bind/binded_func_creator.hpp"
namespace vind
{
struct JumpCaretToBOL : public BindedFuncCreator<JumpCaretToBOL> {
explicit JumpCaretToBOL() ;
static void sprocess() ;
static void sprocess(NTypeLogger& parent_lgr) ;
static void sprocess(const CharLogger& parent_lgr) ;
bool is_for_moving_caret() const noexcept override ;
} ;
struct JumpCaretToEOL : public BindedFuncCreator<JumpCaretToEOL> {
explicit JumpCaretToEOL() ;
static void sprocess(unsigned int repeat_num=1) ;
static void sprocess(NTypeLogger& parent_lgr) ;
static void sprocess(const CharLogger& parent_lgr) ;
bool is_for_moving_caret() const noexcept override ;
} ;
struct JumpCaretToBOF : public BindedFuncCreator<JumpCaretToBOF> {
explicit JumpCaretToBOF() ;
static void sprocess(unsigned int repeat_num=1) ;
static void sprocess(NTypeLogger& parent_lgr) ;
static void sprocess(const CharLogger& parent_lgr) ;
bool is_for_moving_caret() const noexcept override ;
} ;
struct JumpCaretToEOF : public BindedFuncCreator<JumpCaretToEOF> {
explicit JumpCaretToEOF() ;
static void sprocess(unsigned int repeat_num=1) ;
static void sprocess(NTypeLogger& parent_lgr) ;
static void sprocess(const CharLogger& parent_lgr) ;
bool is_for_moving_caret() const noexcept override ;
} ;
}
#endif
| 33.555556
| 70
| 0.701325
|
pit-ray
|
fc06ee36a66ddf7bade121a13443131b79b2b12a
| 2,007
|
cpp
|
C++
|
rt/rt/solids/quadric.cpp
|
DasNaCl/old-university-projects
|
af1c82afec4805ea672e0c353369035b394cb69d
|
[
"Apache-2.0"
] | null | null | null |
rt/rt/solids/quadric.cpp
|
DasNaCl/old-university-projects
|
af1c82afec4805ea672e0c353369035b394cb69d
|
[
"Apache-2.0"
] | null | null | null |
rt/rt/solids/quadric.cpp
|
DasNaCl/old-university-projects
|
af1c82afec4805ea672e0c353369035b394cb69d
|
[
"Apache-2.0"
] | null | null | null |
#include "triangle.h"
#include <rt/bbox.h>
#include <rt/intersection.h>
#include <rt/solids/quadric.h>
namespace rt
{
Quadric::Quadric(
const Quadric::Coefficients& cof, CoordMapper* texMapper, Material* material)
: Solid(texMapper, material)
, cof(cof)
{
}
BBox Quadric::getBounds() const
{
// it's kind of hard to compute the bounds, so just overapproximate
return BBox::full();
}
Intersection Quadric::intersect(
const Ray& ray, float previousBestDistance) const
{
const float alpha = cof.a * sqr(ray.d.x) + cof.b * sqr(ray.d.y) +
cof.c * sqr(ray.d.z) + cof.d * ray.d.x * ray.d.y +
cof.e * ray.d.x * ray.d.z + cof.f * ray.d.y * ray.d.z;
const float beta =
2 * (cof.a * ray.d.x * ray.o.x + cof.b * ray.d.y * ray.o.y +
cof.c * ray.d.z * ray.o.z) +
cof.d * (ray.o.x * ray.d.y + ray.d.x * ray.o.y) +
cof.e * (ray.o.x * ray.d.z + ray.d.x * ray.o.z) +
cof.f * (ray.o.y * ray.d.z + ray.d.y * ray.o.z) + cof.g * ray.d.x +
cof.h * ray.d.y + cof.i * ray.d.z;
const float gamma = cof.a * sqr(ray.o.x) + cof.b * sqr(ray.o.y) +
cof.c * sqr(ray.o.z) + cof.d * ray.o.x * ray.o.y +
cof.e * ray.o.x * ray.o.z + cof.f * ray.o.y * ray.o.z +
cof.g * ray.o.x + cof.h * ray.o.y + cof.i * ray.o.z +
cof.j;
const float under_sqr = sqr(beta) - 4 * alpha * gamma;
if(under_sqr < 0.f)
return Intersection::failure();
const float the_sqr = sqrt(under_sqr);
const float t1 = (-beta + the_sqr) / (2 * alpha);
const float t2 = (-beta - the_sqr) / (2 * alpha);
if(std::min(t1, t2) > previousBestDistance)
return Intersection::failure();
const float t = std::min(t1, t2);
return Intersection(
t, ray, this, cof.normalAt(ray.getPoint(t)), Point(0, 0, 0));
}
Solid::Sample Quadric::sample() const
{
NOT_IMPLEMENTED;
}
float Quadric::getArea() const
{
// yet another overapproximation
return FLT_MAX;
}
}
| 29.086957
| 79
| 0.563029
|
DasNaCl
|
fc0936740b0faab94d140d6dd699662b0512bd2d
| 13,602
|
cpp
|
C++
|
ciphers.cpp
|
KoSeAn97/Classic-Ciphers
|
c7c99913c4837425e45bdc86b5726b67eda82f7c
|
[
"Unlicense"
] | null | null | null |
ciphers.cpp
|
KoSeAn97/Classic-Ciphers
|
c7c99913c4837425e45bdc86b5726b67eda82f7c
|
[
"Unlicense"
] | null | null | null |
ciphers.cpp
|
KoSeAn97/Classic-Ciphers
|
c7c99913c4837425e45bdc86b5726b67eda82f7c
|
[
"Unlicense"
] | null | null | null |
#include <iostream>
#include <list>
#include <algorithm>
#include <codecvt>
#include "ciphers.hpp"
#include "utf8.h"
#define ALPH_ENG 26
#define ALPH_RUS 32
#define SPACE_WC L' '
#define LEAST_FR L'X'
#define MX_S_ENG 5
#define MX_S_RUS 6
extern std::locale loc;
//std::wstring_convert< std::codecvt_utf8<wchar_t> > converter;
class utf_wrapper {
public:
std::wstring from_bytes(const std::string & str);
std::string to_bytes(const std::wstring & wstr);
} converter;
std::wstring utf_wrapper::from_bytes(const std::string & str) {
std::wstring utf16line;
utf8::utf8to16(str.begin(), str.end(), std::back_inserter(utf16line));
return utf16line;
}
std::string utf_wrapper::to_bytes(const std::wstring & wstr) {
std::string utf8line;
utf8::utf16to8(wstr.begin(), wstr.end(), std::back_inserter(utf8line));
return utf8line;
}
wchar_t pfront(std::wstring & str);
void create_Polybius_Square(std::vector< std::vector<wchar_t> > & matrix, std::wstring r_key, bool is_english);
coords find_letter(const std::vector< std::vector<wchar_t> > & table, wchar_t ch);
void touppers(std::wstring & s);
Caesar::Caesar(int init_shift) : shift(init_shift) {}
void Caesar::backdoor() {}
wchar_t Caesar::shifter(bool is_enc, wchar_t ch) const {
wchar_t base;
int mod;
if(ch < 0xFF) {
mod = ALPH_ENG;
if(isupper(ch, loc)) base = L'A';
else base = L'a';
} else {
mod = ALPH_RUS;
if(isupper(ch, loc)) base = L'А';
else base = L'а';
}
if(is_enc) return base + (ch - base + shift + mod) % mod;
else return base + (ch - base - shift + mod) % mod;
}
std::string Caesar::encrypt(const std::string & plaintext) {
std::wstring buffer = converter.from_bytes(plaintext);
std::transform(
buffer.begin(),
buffer.end(),
buffer.begin(),
[this](wchar_t ch) {
backdoor();
if(!isalpha(ch, loc)) return ch;
return shifter(true, ch);
}
);
return converter.to_bytes(buffer);
}
std::string Caesar::decrypt(const std::string & ciphertext) {
std::wstring buffer = converter.from_bytes(ciphertext);
std::transform(
buffer.begin(),
buffer.end(),
buffer.begin(),
[this](wchar_t ch) {
backdoor();
if(!isalpha(ch, loc)) return ch;
return shifter(false, ch);
}
);
return converter.to_bytes(buffer);
}
Vigenere::Vigenere(const std::string & key) {
std::wstring buffer = converter.from_bytes(key);
wchar_t base;
for(auto it = buffer.begin(); it != buffer.end(); ++it) {
if(!isalpha(*it, loc)) {
base = L' ';
} else if(*it < 0xFF) {
if(isupper(*it, loc)) base = L'A';
else base = L'a';
} else {
if(isupper(*it, loc)) base = L'А';
else base = L'а';
}
shifts.push_back(*it - base);
}
key_len = shifts.size();
}
void Vigenere::backdoor() {
shift = shifts[counter];
counter = (counter + 1) % key_len;
}
std::string Vigenere::encrypt(const std::string & plaintext) {
counter = 0;
return Caesar::encrypt(plaintext);
}
std::string Vigenere::decrypt(const std::string & ciphertext) {
counter = 0;
return Caesar::decrypt(ciphertext);
}
Transposition::Transposition(const std::vector<int> & init_perm) {
key_len = init_perm.size();
for(int i = 0; i < key_len; i++) direct_perm[init_perm[i] - 1] = i;
for(int i = 0; i < key_len; i++) inverse_perm[direct_perm[i]] = i;
}
std::string Transposition::encrypt(const std::string & plaintext) {
std::vector< std::list<wchar_t> > table(key_len);
std::wstring buffer = converter.from_bytes(plaintext);
int l_height = buffer.size() / key_len + (buffer.size() % key_len ? 1 : 0);
int msg_len = l_height * key_len;
// do padding
buffer.resize(msg_len, SPACE_WC);
// fill the table
for(int i = 0; i < msg_len; i++) {
table[i % key_len].push_back(buffer[i]);
}
// construct ciphertext
int index;
buffer.clear();
for(int i = 0; i < key_len; i++) {
index = direct_perm.at(i);
buffer.append(table[index].begin(), table[index].end());
}
return converter.to_bytes(buffer);
}
std::string Transposition::decrypt(const std::string & ciphertext) {
std::vector< std::list<wchar_t> > table(key_len);
std::wstring buffer = converter.from_bytes(ciphertext);
int l_height = buffer.size() / key_len + (buffer.size() % key_len ? 1 : 0);
int msg_len = l_height * key_len;
// fill the table
for(int i = 0; i < msg_len; i++) {
table[i / l_height].push_back(buffer[i]);
}
// construct plaintext
int index;
buffer.clear();
for(int i = 0; i < msg_len; i++) {
index = inverse_perm.at(i % key_len);
buffer.append(1, table[index].front());
table[index].pop_front();
}
return converter.to_bytes(buffer);
}
Polybius::Polybius(bool is_english, int mode) {
cipher_mode = mode;
create_Polybius_Square(matrix, std::wstring(), is_english);
dim_m = matrix.size();
}
void Polybius::mode_1(std::wstring & src, std::string & dst, bool is_enc) {
int shift = is_enc ? 1 : -1;
std::transform(
src.begin(),
src.end(),
src.begin(),
[shift, this](wchar_t ch) {
if(!isalpha(ch, loc)) return ch;
coords p = find_letter(matrix, ch);
int sh = (p.first + shift + dim_m) % dim_m;
while(!isalpha(matrix[sh][p.second], loc))
sh = (sh + shift + dim_m) % dim_m;
return matrix[sh][p.second];
}
);
dst = converter.to_bytes(src);
}
void Polybius::enc_2(std::wstring & plaintext, std::string & ciphertext) {
std::vector<int> first, second;
coords p;
for(auto ch: plaintext) {
if(!isalpha(ch, loc)) continue;
p = find_letter(matrix, ch);
second.push_back(p.first);
first.push_back(p.second);
}
int lenght = first.size();
bool odd = lenght % 2;
std::wstring buffer;
for(int i = 0; i + 1 < lenght; i += 2)
buffer.append(1, matrix[first[i+1]][first[i]]);
if(odd)
buffer.append(1, matrix[second[0]][first[lenght-1]]);
for(int i = odd; i + 1 < lenght; i += 2)
buffer.append(1, matrix[second[i+1]][second[i]]);
ciphertext = converter.to_bytes(buffer);
}
void Polybius::dec_2(std::wstring & ciphertext, std::string & plaintext) {
std::vector<int> foo;
coords p;
for(auto ch: ciphertext) {
if(!isalpha(ch, loc)) continue;
p = find_letter(matrix, ch);
foo.push_back(p.second);
foo.push_back(p.first);
}
int half_lenght = foo.size() / 2;
std::wstring buffer;
for(int i = 0; i < half_lenght; i++)
buffer.append(1, matrix[foo[half_lenght + i]][foo[i]]);
plaintext = converter.to_bytes(buffer);
}
std::string Polybius::encrypt(const std::string & plaintext) {
std::wstring buffer = converter.from_bytes(plaintext);
touppers(buffer);
std::replace(buffer.begin(), buffer.end(), L'J', L'I');
std::string ciphertext;
if(cipher_mode % 2) mode_1(buffer, ciphertext, true);
else enc_2(buffer, ciphertext);
return ciphertext;
}
std::string Polybius::decrypt(const std::string & ciphertext) {
std::wstring buffer = converter.from_bytes(ciphertext);
touppers(buffer);
std::replace(buffer.begin(), buffer.end(), L'J', L'I');
std::string plaintext;
if(cipher_mode % 2) mode_1(buffer, plaintext, false);
else dec_2(buffer, plaintext);
return plaintext;
}
Playfair::Playfair(const std::string & key) {
std::wstring reduced_key = reduce(key);
create_Polybius_Square(matrix, reduced_key, true);
dim_m = matrix.size();
}
std::wstring Playfair::reduce(const std::string & key) const {
std::wstring buffer = converter.from_bytes(key);
touppers(buffer);
std::replace(buffer.begin(), buffer.end(), L'J', L'I');
std::wstring reduced_key;
for(auto ch: buffer) {
if(reduced_key.find(ch) == std::string::npos)
reduced_key.append(1, ch);
}
return reduced_key;
}
std::ostream & operator << (std::ostream & stream, std::pair<wchar_t, wchar_t> elem) {
return stream << "(" << (char) elem.first << ", " << (char) elem.second << ")";
}
std::ostream & operator << (std::ostream & stream, std::pair<int, int> elem) {
return stream << "{" << elem.first << ", " << elem.second << "}";
}
void Playfair::perform(Playfair::digram & dg) const {
coords a = find_letter(matrix, dg.first);
coords b = find_letter(matrix, dg.second);
// lazy evaluation
a == b || rule_2(dg, a, b) || rule_3(dg, a, b) || rule_4(dg, a, b);
}
wchar_t Playfair::rule_1(Playfair::digram & dg) const {
if(dg.first != dg.second) return 0;
if(dg.first == LEAST_FR) return 0;
wchar_t buffer = dg.second;
dg = digram(dg.first, LEAST_FR);
return buffer;
}
bool Playfair::rule_2(Playfair::digram & dg, const coords & a, const coords & b) const {
if(a.first != b.first)
return false;
int shift = state_encrypt ? 1 : -1;
int row = a.first;
dg = digram(
matrix[row][(a.second + shift + dim_m) % dim_m],
matrix[row][(b.second + shift + dim_m) % dim_m]
);
return true;
}
bool Playfair::rule_3(Playfair::digram & dg, const coords & a, const coords & b) const {
if(a.second != b.second)
return false;
int shift = state_encrypt ? 1 : -1;
int column = a.second;
dg = digram(
matrix[(a.first + shift + dim_m) % dim_m][column],
matrix[(b.first + shift + dim_m) % dim_m][column]
);
return true;
}
bool Playfair::rule_4(Playfair::digram & dg, const coords & a, const coords & b) const {
dg = digram(
matrix[a.first][b.second],
matrix[b.first][a.second]
);
return true;
}
std::string Playfair::encrypt(const std::string & plaintext) {
state_encrypt = true;
std::wstring buffer = converter.from_bytes(plaintext);
touppers(buffer);
std::replace(buffer.begin(), buffer.end(), L'J', L'I');
std::wstring ciphertext;
digram current_digram;
wchar_t reminder = 0;
while(!buffer.empty() || reminder) {
// get first
if(reminder) {
current_digram.first = reminder;
reminder = 0;
} else {
while(!buffer.empty() && !isalpha(buffer.front(), loc))
ciphertext.append(1, pfront(buffer));
if(buffer.empty()) break;
current_digram.first = pfront(buffer);
}
// get second
if(buffer.empty() || !isalpha(buffer.front(), loc))
current_digram.second = LEAST_FR;
else
current_digram.second = pfront(buffer);
reminder = rule_1(current_digram);
perform(current_digram);
ciphertext.append(1, current_digram.first);
ciphertext.append(1, current_digram.second);
}
return converter.to_bytes(ciphertext);
}
std::string Playfair::decrypt(const std::string & ciphertext) {
state_encrypt = false;
std::wstring buffer = converter.from_bytes(ciphertext);
touppers(buffer);
std::wstring plaintext;
digram current_digram;
while(!buffer.empty()) {
// get first
while(!buffer.empty() && !isalpha(buffer.front(), loc))
plaintext.append(1, pfront(buffer));
if(buffer.empty()) break;
current_digram.first = pfront(buffer);
// get second
current_digram.second = pfront(buffer);
perform(current_digram);
plaintext.append(1, current_digram.first);
plaintext.append(1, current_digram.second);
}
return converter.to_bytes(plaintext);
}
void touppers(std::wstring & s) {
std::transform(
s.begin(),
s.end(),
s.begin(),
[](wchar_t ch) {
return toupper(ch, loc);
}
);
}
wchar_t pfront(std::wstring & str) {
wchar_t buffer = str.front();
str.erase(0,1);
return buffer;
}
void create_Polybius_Square(std::vector< std::vector<wchar_t> > & matrix, std::wstring r_key, bool is_english) {
int matrix_dim, matrix_size, alph_len;
wchar_t letter;
// determine matrix's properties
matrix_dim = is_english ? MX_S_ENG : MX_S_RUS;
matrix_size = matrix_dim * matrix_dim;
alph_len = is_english ? ALPH_ENG : ALPH_RUS;
letter = is_english ? L'A' : L'А';
// set matrix's size
matrix.resize(matrix_dim);
for(auto & t: matrix) t.resize(matrix_dim);
// input the key to the matrix
int key_len = r_key.size();
for(int i = 0; i < key_len; i++)
matrix[i / matrix_dim][i % matrix_dim] = r_key[i];
// if language is english then drop out letter 'J'
if(is_english) {
r_key.append(1, 'J');
alph_len--;
}
// fill remaining letters to the table
for(int i = key_len; i < alph_len; i++) {
while(r_key.find(letter) != std::string::npos) letter++;
matrix[i / matrix_dim][i % matrix_dim] = letter++;
}
// fill the void
for(int i = alph_len; i < matrix_size; i++)
matrix[i / matrix_dim][i % matrix_size] = SPACE_WC;
}
coords find_letter(const std::vector< std::vector<wchar_t> > & table, wchar_t ch) {
int x = -1, y = -1;
for(int i = 0; i < table.size(); i++)
for(int j = 0; j < table[i].size(); j++)
if(table[i][j] == ch) {
x = i;
y = j;
break;
}
return coords(x, y);
}
| 30.42953
| 112
| 0.597706
|
KoSeAn97
|
fc0a255f8462c18869fcd6916641e5daa2a46017
| 835
|
cpp
|
C++
|
Gaina.cpp
|
Dimi-T/POO-Lab12
|
6c228e6356eeff5ba455d094cdbf6aa846a631c2
|
[
"MIT"
] | null | null | null |
Gaina.cpp
|
Dimi-T/POO-Lab12
|
6c228e6356eeff5ba455d094cdbf6aa846a631c2
|
[
"MIT"
] | null | null | null |
Gaina.cpp
|
Dimi-T/POO-Lab12
|
6c228e6356eeff5ba455d094cdbf6aa846a631c2
|
[
"MIT"
] | null | null | null |
#include "Gaina.h"
Gaina::Gaina():Hambar()
{
}
Gaina::Gaina(int nr_animale):Hambar(nr_animale)
{
}
Gaina::Gaina(const Gaina& obj)
{
*this = obj;
}
Gaina::~Gaina()
{
}
Gaina& Gaina::operator=(const Gaina& obj)
{
this->nr_animale = obj.nr_animale;
return *this;
}
void Gaina::afisare(ostream& out)
{
out << "Animal: Gaina, Numar animale: " << this->nr_animale << ", Mancare consumate de 1 animal(Kg) - Graunte: " << tip.get_graunte() << endl;
}
double Gaina::get_consum_nutret()
{
return 0.0;
}
double Gaina::get_consum_iarba()
{
return 0.0;
}
double Gaina::get_consum_graunte()
{
return nr_animale * tip.get_graunte();
}
double Gaina::get_total()
{
return get_consum_graunte();
}
ostream& operator<<(ostream& out, Gaina& obj)
{
obj.afisare(out);
return out;
}
| 14.910714
| 144
| 0.626347
|
Dimi-T
|
fc0aad87fcce1efcc823c926ae9f36f7a6a433bd
| 1,130
|
cpp
|
C++
|
higan/sfc/expansion/expansion.cpp
|
13824125580/higan
|
fbdd3f980b65412c362096579869ae76730e4118
|
[
"Intel",
"ISC"
] | 38
|
2018-04-05T05:00:05.000Z
|
2022-02-06T00:02:02.000Z
|
higan/sfc/expansion/expansion.cpp
|
13824125580/higan
|
fbdd3f980b65412c362096579869ae76730e4118
|
[
"Intel",
"ISC"
] | 1
|
2018-04-29T19:45:14.000Z
|
2018-04-29T19:45:14.000Z
|
higan/sfc/expansion/expansion.cpp
|
13824125580/higan
|
fbdd3f980b65412c362096579869ae76730e4118
|
[
"Intel",
"ISC"
] | 8
|
2018-04-16T22:37:46.000Z
|
2021-02-10T07:37:03.000Z
|
#include <sfc/sfc.hpp>
namespace SuperFamicom {
ExpansionPort expansionPort;
Expansion::Expansion() {
if(!handle()) create(Expansion::Enter, 1);
}
Expansion::~Expansion() {
scheduler.remove(*this);
}
auto Expansion::Enter() -> void {
while(true) scheduler.synchronize(), expansionPort.device->main();
}
auto Expansion::main() -> void {
step(1);
synchronize(cpu);
}
//
auto ExpansionPort::connect(uint deviceID) -> void {
if(!system.loaded()) return;
delete device;
switch(deviceID) { default:
case ID::Device::None: device = new Expansion; break;
case ID::Device::Satellaview: device = new Satellaview; break;
case ID::Device::S21FX: device = new S21FX; break;
}
cpu.peripherals.reset();
if(auto device = controllerPort1.device) cpu.peripherals.append(device);
if(auto device = controllerPort2.device) cpu.peripherals.append(device);
if(auto device = expansionPort.device) cpu.peripherals.append(device);
}
auto ExpansionPort::power() -> void {
}
auto ExpansionPort::unload() -> void {
delete device;
device = nullptr;
}
auto ExpansionPort::serialize(serializer& s) -> void {
}
}
| 20.925926
| 74
| 0.699115
|
13824125580
|
fc0ad633ccb12312afee8de445a4c5bb98dc3e39
| 289
|
cpp
|
C++
|
QtOrmTests/QueryModelsTest/D.cpp
|
rensfo/QtOrm
|
46a16ee507cff4b1367b674420365137bf20aa9f
|
[
"MIT"
] | null | null | null |
QtOrmTests/QueryModelsTest/D.cpp
|
rensfo/QtOrm
|
46a16ee507cff4b1367b674420365137bf20aa9f
|
[
"MIT"
] | 1
|
2016-11-04T14:26:58.000Z
|
2016-11-04T14:27:57.000Z
|
QtOrmTests/QueryModelsTest/D.cpp
|
rensfo/QtOrm
|
46a16ee507cff4b1367b674420365137bf20aa9f
|
[
"MIT"
] | null | null | null |
#include "D.h"
D::D(QObject *parent) : QObject(parent){
}
D::~D() {
}
QSharedPointer<KindA> D::getKindA() const {
return kindA;
}
void D::setKindA(QSharedPointer<KindA> value) {
kindA = value;
}
long D::getId() const {
return id;
}
void D::setId(long value) {
id = value;
}
| 11.56
| 47
| 0.619377
|
rensfo
|
fc0b2647e0f66ade4bdcfa23a7f3470c66dac983
| 313
|
cpp
|
C++
|
BCM2/src/main.cpp
|
Zardium/blockcraftmine2
|
d2a570e3ab35c756ffaf2ac83849a5d878841f3f
|
[
"Apache-2.0"
] | null | null | null |
BCM2/src/main.cpp
|
Zardium/blockcraftmine2
|
d2a570e3ab35c756ffaf2ac83849a5d878841f3f
|
[
"Apache-2.0"
] | null | null | null |
BCM2/src/main.cpp
|
Zardium/blockcraftmine2
|
d2a570e3ab35c756ffaf2ac83849a5d878841f3f
|
[
"Apache-2.0"
] | null | null | null |
// Local Headers
#include "pch.hpp"
#include "BCM2.hpp"
// System Headers
#include <glad/glad.h>
#include <GLFW/glfw3.h>
// Standard Headers
#include <cstdio>
#include <cstdlib>
#include <thread>
int main(int argc, char * argv[])
{
BlockCraftMine2::Game main_game;
main_game();
return EXIT_SUCCESS;
}
| 15.65
| 35
| 0.693291
|
Zardium
|
fc0db890723239f5296e51413438a65d55ace6f1
| 1,191
|
cc
|
C++
|
HDU/5095_Linearization_of_the_kernel_functions_in_SVM/5095.cc
|
pdszhh/ACM
|
956b3d03a5d3f070ef24c940b7459f5cccb11d6c
|
[
"MIT"
] | 1
|
2019-05-05T03:51:20.000Z
|
2019-05-05T03:51:20.000Z
|
HDU/5095_Linearization_of_the_kernel_functions_in_SVM/5095.cc
|
pdszhh/ACM
|
956b3d03a5d3f070ef24c940b7459f5cccb11d6c
|
[
"MIT"
] | null | null | null |
HDU/5095_Linearization_of_the_kernel_functions_in_SVM/5095.cc
|
pdszhh/ACM
|
956b3d03a5d3f070ef24c940b7459f5cccb11d6c
|
[
"MIT"
] | null | null | null |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str = "pqruvwxyz";
int t;
cin >> t;
while (t--) {
int num[10];
for (int i = 0; i < 10; ++i)
cin >> num[i];
bool flag = false;
for (int i = 0; i < 9; ++i) {
if (num[i] == 0)
continue;
if (flag) {
if (num[i] == 1)
cout << "+";
else if (num[i] == -1)
cout << "-";
else if (num[i] > 0)
cout << "+" << num[i];
else
cout << num[i];
} else {
if (num[i] == 1)
;
else if (num[i] == -1)
cout << "-";
else
cout << num[i];
}
cout << str[i];
flag = true;
}
if (flag) {
if (num[9] > 0)
cout << "+" << num[9];
else if (num[9] < 0)
cout << num[9];
} else {
cout << num[9];
}
cout << endl;
}
return 0;
}
| 20.894737
| 42
| 0.280437
|
pdszhh
|
fc1765053d9939f891a86fa23721432cce0bc871
| 18,135
|
cpp
|
C++
|
core/variant_call.cpp
|
ZopharShinta/SegsEngine
|
86d52c5b805e05e107594efd3358cabd694365f0
|
[
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null |
core/variant_call.cpp
|
ZopharShinta/SegsEngine
|
86d52c5b805e05e107594efd3358cabd694365f0
|
[
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null |
core/variant_call.cpp
|
ZopharShinta/SegsEngine
|
86d52c5b805e05e107594efd3358cabd694365f0
|
[
"CC-BY-3.0",
"Apache-2.0",
"MIT"
] | null | null | null |
/*************************************************************************/
/* variant_call.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* 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 "variant.h"
#include "core/color_names.inc"
#include "core/container_tools.h"
#include "core/string_utils.inl"
#include "core/crypto/crypto_core.h"
#include "core/math/aabb.h"
#include "core/math/basis.h"
#include "core/math/plane.h"
#include "core/math/quat.h"
#include "core/math/transform.h"
#include "core/math/transform_2d.h"
#include "core/math/vector3.h"
#include "core/method_info.h"
#include "core/object.h"
#include "core/script_language.h"
#include "core/string.h"
#include "core/vector.h"
#include "core/rid.h"
namespace {
using VariantConstructFunc = void (*)(Variant&, const Variant&);
struct VariantAutoCaster {
const Variant &from;
constexpr VariantAutoCaster(const Variant&src) : from(src) {}
operator Variant() const{
return from;
}
template<class T>
operator T() const{
return from.as<T>();
}
};
struct _VariantCall {
struct ConstructData {
int arg_count;
Vector<VariantType> arg_types;
Vector<StringName> arg_names;
VariantConstructFunc func;
};
struct ConstructFunc {
Vector<ConstructData> constructors;
};
static ConstructFunc *construct_funcs;
static void Quat_init3(Variant &r_ret, const Variant &p_args) {
r_ret = Quat(p_args.as<Vector3>());
}
static void add_constructor(VariantConstructFunc p_func, const VariantType p_type, StringName p_name1, const VariantType p_type1) {
ConstructData cd;
cd.func = p_func;
cd.arg_count = 0;
cd.arg_count++;
cd.arg_names.emplace_back(eastl::move(p_name1));
cd.arg_types.push_back(p_type1);
construct_funcs[static_cast<int>(p_type)].constructors.emplace_back(cd);
}
struct ConstantData {
HashMap<StringName, int> value;
#ifdef DEBUG_ENABLED
Vector<StringName> value_ordered;
#endif
HashMap<StringName, Variant> variant_value;
};
static ConstantData *constant_data;
static void add_constant(VariantType p_type, const StringName &p_constant_name, int p_constant_value) {
constant_data[static_cast<int8_t>(p_type)].value[p_constant_name] = p_constant_value;
#ifdef DEBUG_ENABLED
constant_data[static_cast<int8_t>(p_type)].value_ordered.emplace_back(p_constant_name);
#endif
}
static void add_variant_constant(VariantType p_type, const StringName &p_constant_name, const Variant &p_constant_value) {
constant_data[static_cast<int8_t>(p_type)].variant_value[p_constant_name] = p_constant_value;
}
};
_VariantCall::ConstructFunc *_VariantCall::construct_funcs = nullptr;
_VariantCall::ConstantData *_VariantCall::constant_data = nullptr;
}
Variant Variant::construct_default(const VariantType p_type) {
switch (p_type) {
case VariantType::NIL:
return Variant();
// atomic types
case VariantType::BOOL: return Variant(false);
case VariantType::INT: return Variant(0);
case VariantType::FLOAT: return Variant(0.0f);
case VariantType::STRING:
return String();
// math types
case VariantType::VECTOR2:
return Vector2(); // 5
case VariantType::RECT2: return Rect2();
case VariantType::VECTOR3: return Vector3();
case VariantType::TRANSFORM2D: return Transform2D();
case VariantType::PLANE: return Plane();
case VariantType::QUAT: return Quat();
case VariantType::AABB:
return ::AABB(); // 10
case VariantType::BASIS: return Basis();
case VariantType::TRANSFORM:
return Transform();
// misc types
case VariantType::COLOR: return Color();
case VariantType::STRING_NAME: return StringName();
case VariantType::NODE_PATH:
return NodePath(); // 15
case VariantType::_RID: return RID();
case VariantType::OBJECT: return Variant(static_cast<Object *>(nullptr));
case VariantType::CALLABLE: return (Variant)Callable();
case VariantType::SIGNAL: return (Variant)Signal();
case VariantType::DICTIONARY: return Dictionary();
case VariantType::ARRAY:
return Array(); // 20
case VariantType::POOL_BYTE_ARRAY: return PoolByteArray();
case VariantType::POOL_INT_ARRAY: return PoolIntArray();
case VariantType::POOL_REAL_ARRAY: return PoolRealArray();
case VariantType::POOL_STRING_ARRAY: return PoolStringArray();
case VariantType::POOL_VECTOR2_ARRAY:
return Variant(PoolVector2Array()); // 25
case VariantType::POOL_VECTOR3_ARRAY: return PoolVector3Array();
case VariantType::POOL_COLOR_ARRAY: return PoolColorArray();
case VariantType::VARIANT_MAX:
default:
return Variant();
}
}
Variant Variant::construct(const VariantType p_type, const Variant &p_arg, Callable::CallError &r_error) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
ERR_FAIL_INDEX_V(int(p_type), int(VariantType::VARIANT_MAX), Variant());
r_error.error = Callable::CallError::CALL_OK;
if (p_arg.type == p_type) {
return p_arg; //copy construct
}
if (can_convert(p_arg.type, p_type)) {
//near match construct
switch (p_type) {
case VariantType::NIL: {
return Variant();
}
case VariantType::BOOL: {
return Variant(static_cast<bool>(p_arg));
}
case VariantType::INT: {
return static_cast<int64_t>(p_arg);
}
case VariantType::FLOAT: {
return static_cast<real_t>(p_arg);
}
case VariantType::STRING: {
return static_cast<String>(p_arg);
}
case VariantType::VECTOR2: {
return static_cast<Vector2>(p_arg);
}
case VariantType::RECT2: return static_cast<Rect2>(p_arg);
case VariantType::VECTOR3: return static_cast<Vector3>(p_arg);
case VariantType::TRANSFORM2D:
return static_cast<Transform2D>(p_arg);
case VariantType::PLANE: return static_cast<Plane>(p_arg);
case VariantType::QUAT: return static_cast<Quat>(p_arg);
case VariantType::AABB:
return p_arg.as<::AABB>(); // 10
case VariantType::BASIS: return static_cast<Basis>(p_arg);
case VariantType::TRANSFORM:
return Transform(static_cast<Transform>(p_arg));
// misc types
case VariantType::COLOR: return p_arg.type == VariantType::STRING ? Color::html(static_cast<String>(p_arg)) : Color::hex(static_cast<uint32_t>(p_arg));
case VariantType::STRING_NAME: return p_arg.as<StringName>();
case VariantType::NODE_PATH:
return NodePath(static_cast<NodePath>(p_arg)); // 15
case VariantType::_RID: return static_cast<RID>(p_arg);
case VariantType::OBJECT: return Variant(p_arg.as<Object *>());
case VariantType::CALLABLE: return Variant((Callable)p_arg);
case VariantType::SIGNAL: return Variant((Signal)p_arg);
case VariantType::DICTIONARY: return static_cast<Dictionary>(p_arg);
case VariantType::ARRAY:
return static_cast<Array>(p_arg); // 20
// arrays
case VariantType::POOL_BYTE_ARRAY: return static_cast<PoolByteArray>(p_arg);
case VariantType::POOL_INT_ARRAY: return static_cast<PoolIntArray>(p_arg);
case VariantType::POOL_REAL_ARRAY: return static_cast<PoolRealArray>(p_arg);
case VariantType::POOL_STRING_ARRAY: return static_cast<PoolStringArray>(p_arg);
case VariantType::POOL_VECTOR2_ARRAY:
return Variant(static_cast<PoolVector2Array>(p_arg)); // 25
case VariantType::POOL_VECTOR3_ARRAY: return static_cast<PoolVector3Array>(p_arg);
case VariantType::POOL_COLOR_ARRAY: return static_cast<PoolColorArray>(p_arg);
default: return Variant();
}
}
_VariantCall::ConstructFunc &c = _VariantCall::construct_funcs[static_cast<int>(p_type)];
for (const _VariantCall::ConstructData &cd : c.constructors) {
if (cd.arg_count != 1)
continue;
//validate parameters
if (!Variant::can_convert(p_arg.type, cd.arg_types[0])) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; //no such constructor
r_error.argument = 0;
r_error.expected = cd.arg_types[0];
return Variant();
}
Variant v;
cd.func(v, p_arg);
return v;
}
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD; //no such constructor
return Variant();
}
void Variant::get_constructor_list(VariantType p_type, Vector<MethodInfo> *p_list) {
ERR_FAIL_INDEX(int(p_type), int(VariantType::VARIANT_MAX));
//custom constructors
for (const _VariantCall::ConstructData &cd : _VariantCall::construct_funcs[static_cast<int>(p_type)].constructors) {
MethodInfo mi;
mi.name = Variant::interned_type_name(p_type);
mi.return_val.type = p_type;
for (int i = 0; i < cd.arg_count; i++) {
PropertyInfo pi;
pi.name = StringName(cd.arg_names[i]);
pi.type = cd.arg_types[i];
mi.arguments.emplace_back(eastl::move(pi));
}
p_list->push_back(mi);
}
//default constructors
for (int i = 0; i < static_cast<int>(VariantType::VARIANT_MAX); i++) {
if (i == static_cast<int>(p_type))
continue;
if (!Variant::can_convert(static_cast<VariantType>(i), p_type))
continue;
MethodInfo mi(p_type);
mi.name = eastl::move(Variant::interned_type_name(p_type));
PropertyInfo pi;
pi.name = "from";
pi.type = static_cast<VariantType>(i);
mi.arguments.emplace_back(eastl::move(pi));
p_list->emplace_back(eastl::move(mi));
}
}
void Variant::get_constants_for_type(VariantType p_type, Vector<StringName> *p_constants) {
ERR_FAIL_INDEX((int)p_type, (int)VariantType::VARIANT_MAX);
_VariantCall::ConstantData &cd = _VariantCall::constant_data[static_cast<int>(p_type)];
#ifdef DEBUG_ENABLED
for (const StringName &E : cd.value_ordered) {
p_constants->push_back(E);
#else
for (const auto &E : cd.value) {
p_constants->emplace_back(E.first);
#endif
}
for (eastl::pair<const StringName,Variant> &E : cd.variant_value) {
p_constants->push_back(E.first);
}
}
bool Variant::has_constant(VariantType p_type, const StringName &p_value) {
ERR_FAIL_INDEX_V((int)p_type, (int)VariantType::VARIANT_MAX, false);
_VariantCall::ConstantData &cd = _VariantCall::constant_data[static_cast<int>(p_type)];
return cd.value.contains(p_value) || cd.variant_value.contains(p_value);
}
Variant Variant::get_constant_value(VariantType p_type, const StringName &p_value, bool *r_valid) {
if (r_valid)
*r_valid = false;
ERR_FAIL_INDEX_V((int)p_type, (int)VariantType::VARIANT_MAX, 0);
_VariantCall::ConstantData &cd = _VariantCall::constant_data[static_cast<int>(p_type)];
auto E = cd.value.find(p_value);
if (E==cd.value.end()) {
auto F = cd.variant_value.find(p_value);
if (F!=cd.variant_value.end()) {
if (r_valid)
*r_valid = true;
return F->second;
}
return -1;
}
if (r_valid)
*r_valid = true;
return E->second;
}
void register_variant_methods() {
_VariantCall::construct_funcs = memnew_arr(_VariantCall::ConstructFunc, static_cast<int>(VariantType::VARIANT_MAX));
_VariantCall::constant_data = memnew_arr(_VariantCall::ConstantData, static_cast<int>(VariantType::VARIANT_MAX));
/* STRING */
/* REGISTER CONSTRUCTORS */
_VariantCall::add_constructor(_VariantCall::Quat_init3, VariantType::QUAT, "euler", VariantType::VECTOR3);
/* REGISTER CONSTANTS */
for (const eastl::pair<const char *const,Color> &color : _named_colors) {
_VariantCall::add_variant_constant(VariantType::COLOR, StringName(color.first), color.second);
}
_VariantCall::add_constant(VariantType::VECTOR3, "AXIS_X", Vector3::AXIS_X);
_VariantCall::add_constant(VariantType::VECTOR3, "AXIS_Y", Vector3::AXIS_Y);
_VariantCall::add_constant(VariantType::VECTOR3, "AXIS_Z", Vector3::AXIS_Z);
_VariantCall::add_variant_constant(VariantType::VECTOR3, "ZERO", Vector3(0, 0, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "ONE", Vector3(1, 1, 1));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "INF", Vector3(Math_INF, Math_INF, Math_INF));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "LEFT", Vector3(-1, 0, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "RIGHT", Vector3(1, 0, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "UP", Vector3(0, 1, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "DOWN", Vector3(0, -1, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "FORWARD", Vector3(0, 0, -1));
_VariantCall::add_variant_constant(VariantType::VECTOR3, "BACK", Vector3(0, 0, 1));
_VariantCall::add_constant(VariantType::VECTOR2, "AXIS_X", Vector2::AXIS_X);
_VariantCall::add_constant(VariantType::VECTOR2, "AXIS_Y", Vector2::AXIS_Y);
_VariantCall::add_variant_constant(VariantType::VECTOR2, "ZERO", Vector2(0, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR2, "ONE", Vector2(1, 1));
_VariantCall::add_variant_constant(VariantType::VECTOR2, "INF", Vector2(Math_INF, Math_INF));
_VariantCall::add_variant_constant(VariantType::VECTOR2, "LEFT", Vector2(-1, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR2, "RIGHT", Vector2(1, 0));
_VariantCall::add_variant_constant(VariantType::VECTOR2, "UP", Vector2(0, -1));
_VariantCall::add_variant_constant(VariantType::VECTOR2, "DOWN", Vector2(0, 1));
_VariantCall::add_variant_constant(VariantType::TRANSFORM2D, "IDENTITY", Transform2D());
_VariantCall::add_variant_constant(VariantType::TRANSFORM2D, "FLIP_X", Transform2D(-1, 0, 0, 1, 0, 0));
_VariantCall::add_variant_constant(VariantType::TRANSFORM2D, "FLIP_Y", Transform2D( 1, 0, 0, -1, 0, 0));
_VariantCall::add_variant_constant(VariantType::TRANSFORM, "IDENTITY", Transform());
_VariantCall::add_variant_constant(VariantType::TRANSFORM, "FLIP_X", Transform(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0));
_VariantCall::add_variant_constant(VariantType::TRANSFORM, "FLIP_Y", Transform( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0));
_VariantCall::add_variant_constant(VariantType::TRANSFORM, "FLIP_Z", Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0));
_VariantCall::add_variant_constant(VariantType::BASIS, "IDENTITY", Basis());
_VariantCall::add_variant_constant(VariantType::BASIS, "FLIP_X", Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1));
_VariantCall::add_variant_constant(VariantType::BASIS, "FLIP_Y", Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1));
_VariantCall::add_variant_constant(VariantType::BASIS, "FLIP_Z", Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1));
_VariantCall::add_variant_constant(VariantType::PLANE, "PLANE_YZ", Plane(Vector3(1, 0, 0), 0));
_VariantCall::add_variant_constant(VariantType::PLANE, "PLANE_XZ", Plane(Vector3(0, 1, 0), 0));
_VariantCall::add_variant_constant(VariantType::PLANE, "PLANE_XY", Plane(Vector3(0, 0, 1), 0));
_VariantCall::add_variant_constant(VariantType::QUAT, "IDENTITY", Quat(0, 0, 0, 1));
}
void unregister_variant_methods() {
memdelete_arr(_VariantCall::construct_funcs);
memdelete_arr(_VariantCall::constant_data);
}
| 42.174419
| 163
| 0.636173
|
ZopharShinta
|
fc1786ec223203c0d0cc2c157a0077dd0a4cb4ea
| 8,102
|
cpp
|
C++
|
tests/test_progress.cpp
|
jinyyu/kvd
|
f3a2f7944b037ee59f26e7e8bf69024686023fd0
|
[
"MIT"
] | 2
|
2019-04-18T15:15:20.000Z
|
2019-08-16T03:01:16.000Z
|
tests/test_progress.cpp
|
jinyyu/kvd
|
f3a2f7944b037ee59f26e7e8bf69024686023fd0
|
[
"MIT"
] | null | null | null |
tests/test_progress.cpp
|
jinyyu/kvd
|
f3a2f7944b037ee59f26e7e8bf69024686023fd0
|
[
"MIT"
] | null | null | null |
#include <gtest/gtest.h>
#include <raft-kv/raft/progress.h>
using namespace kv;
static bool cmp_InFlights(const InFlights& l, const InFlights& r) {
return l.start == r.start && l.count == r.count && l.size == r.size && l.buffer == r.buffer;
}
TEST(progress, add) {
InFlights in(10);
in.buffer.resize(10, 0);
for (uint32_t i = 0; i < 5; i++) {
in.add(i);
}
InFlights wantIn(10);
wantIn.start = 0;
wantIn.count = 5;
wantIn.buffer = std::vector<uint64_t>{0, 1, 2, 3, 4, 0, 0, 0, 0, 0};
ASSERT_TRUE(cmp_InFlights(wantIn, in));
InFlights wantIn2(10);
wantIn.start = 0;
wantIn.count = 10;
wantIn.buffer = std::vector<uint64_t>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
ASSERT_FALSE(cmp_InFlights(wantIn2, in));
// rotating case
InFlights in2(10);
in2.start = 5;
in2.size = 10;
in2.buffer.resize(10, 0);
for (uint32_t i = 0; i < 5; i++) {
in2.add(i);
}
InFlights wantIn21(10);
wantIn.start = 5;
wantIn.count = 5;
wantIn.buffer = std::vector<uint64_t>{0, 0, 0, 0, 0, 0, 1, 2, 3, 4};
ASSERT_FALSE(cmp_InFlights(wantIn2, in2));
for (uint32_t i = 0; i < 5; i++) {
in2.add(i);
}
InFlights wantIn22(10);
wantIn.start = 10;
wantIn.count = 10;
wantIn.buffer = std::vector<uint64_t>{5, 6, 7, 8, 9, 0, 1, 2, 3, 4};
ASSERT_FALSE(cmp_InFlights(wantIn2, in2));
ASSERT_FALSE(cmp_InFlights(wantIn22, in2));
}
TEST(progress, freeto) {
InFlights in(10);
for (uint32_t i = 0; i < 10; i++) {
in.add(i);
}
in.free_to(4);
InFlights wantIn(10);
wantIn.start = 5;
wantIn.count = 5;
wantIn.buffer = std::vector<uint64_t>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
ASSERT_TRUE(cmp_InFlights(wantIn, in));
in.free_to(8);
InFlights wantIn2(10);
wantIn2.start = 9;
wantIn2.count = 1;
wantIn2.buffer = std::vector<uint64_t>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
ASSERT_TRUE(cmp_InFlights(wantIn2, in));
// rotating case
for (uint32_t i = 10; i < 15; i++) {
in.add(i);
}
in.free_to(12);
InFlights wantIn3(10);
wantIn3.start = 3;
wantIn3.count = 2;
wantIn3.size = 10;
wantIn3.buffer = std::vector<uint64_t>{10, 11, 12, 13, 14, 5, 6, 7, 8, 9};
ASSERT_TRUE(cmp_InFlights(wantIn3, in));
in.free_to(14);
InFlights wantIn4(10);
wantIn4.start = 0;
wantIn4.count = 0;
wantIn4.size = 10;
wantIn4.buffer = std::vector<uint64_t>{10, 11, 12, 13, 14, 5, 6, 7, 8, 9};
ASSERT_TRUE(cmp_InFlights(wantIn4, in));
}
TEST(progress, FreeFirstOne) {
InFlights in(10);
for (uint32_t i = 0; i < 10; i++) {
in.add(i);
}
in.free_first_one();
InFlights wantIn(10);
wantIn.start = 1;
wantIn.count = 9;
wantIn.buffer = std::vector<uint64_t>{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
ASSERT_TRUE(cmp_InFlights(wantIn, in));
}
TEST(progress, BecomeProbe) {
struct Test {
ProgressPtr pr;
uint64_t wnext;
};
std::vector<Test> tests;
{
ProgressPtr pr(new Progress(256));
pr->state = ProgressStateReplicate;
pr->match = 1;
pr->next = 5;
tests.push_back(Test{.pr = pr, .wnext = 2});
}
{
ProgressPtr pr(new Progress(256));
pr->state = ProgressStateSnapshot;
pr->match = 1;
pr->next = 5;
pr->pending_snapshot = 10;
tests.push_back(Test{.pr = pr, .wnext = 11});
}
{
ProgressPtr pr(new Progress(256));
pr->state = ProgressStateSnapshot;
pr->match = 1;
pr->next = 5;
pr->pending_snapshot = 0;
tests.push_back(Test{.pr = pr, .wnext = 2});
}
for (Test& test : tests) {
test.pr->become_probe();
ASSERT_TRUE(test.pr->match == 1);
ASSERT_TRUE(test.pr->state == ProgressStateProbe);
ASSERT_TRUE(test.pr->next == test.wnext);
}
}
TEST(progress, BecomeReplicate) {
ProgressPtr pr(new Progress(256));
pr->match = 1;
pr->next = 5;
pr->become_replicate();
ASSERT_TRUE(pr->next = pr->match + 1);
ASSERT_TRUE(pr->state = ProgressStateReplicate);
}
TEST(progress, BecomeSnapshot) {
ProgressPtr pr(new Progress(256));
pr->match = 1;
pr->next = 5;
pr->become_snapshot(10);
ASSERT_TRUE(pr->match == 1);
ASSERT_TRUE(pr->state == ProgressStateSnapshot);
ASSERT_TRUE(pr->pending_snapshot == 10);
}
TEST(progress, Update) {
uint64_t prevM = 3;
uint64_t prevN = 5;
struct Test {
uint64_t update;
uint64_t wm;
uint64_t wn;
bool wok;
};
std::vector<Test> tests;
tests.push_back(Test{.update = prevM - 1, .wm = prevM, .wn = prevN, .wok = false});
tests.push_back(Test{.update = prevM, .wm = prevM, .wn = prevN, .wok = false});
tests.push_back(Test{.update = prevM + 1, .wm = prevM + 1, .wn = prevN, .wok = true});
tests.push_back(Test{.update = prevM + 2, .wm = prevM + 2, .wn = prevN + 1, .wok = true});
for (Test& test: tests) {
ProgressPtr pr(new Progress(256));
pr->match = prevM;
pr->next = prevN;
bool ok = pr->maybe_update(test.update);
ASSERT_TRUE(ok == test.wok);
ASSERT_TRUE(pr->match == test.wm);
ASSERT_TRUE(pr->next == test.wn);
}
}
TEST(progress, MaybeDecr) {
struct Test {
ProgressState state;
uint64_t m;
uint64_t n;
uint64_t rejected;
uint64_t last;
bool w;
uint64_t wn;
};
std::vector<Test> tests;
// state replicate and rejected is not greater than match
tests
.push_back(Test{.state = ProgressStateReplicate, .m = 5, .n = 10, .rejected = 5, .last = 5, .w = false, .wn = 10});
// state replicate and rejected is not greater than match
tests
.push_back(Test{.state = ProgressStateReplicate, .m = 5, .n = 10, .rejected = 4, .last = 5, .w = false, .wn = 10});
// state replicate and rejected is greater than match
// directly decrease to match+1
tests
.push_back(Test{.state = ProgressStateReplicate, .m = 5, .n = 10, .rejected = 9, .last = 9, .w = true, .wn = 6});
// next-1 != rejected is always false
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 0, .rejected = 0, .last = 0, .w = false, .wn = 0});
// next-1 != rejected is always false
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 10, .rejected = 5, .last = 5, .w = false, .wn = 10});
// next>1 = decremented by 1
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 10, .rejected = 9, .last = 9, .w = true, .wn = 9});
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 2, .rejected = 1, .last = 1, .w = true, .wn = 1});
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 1, .rejected = 0, .last = 0, .w = true, .wn = 1});
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 10, .rejected = 9, .last = 2, .w = true, .wn = 3});
tests.push_back(Test{.state = ProgressStateProbe, .m = 0, .n = 10, .rejected = 9, .last = 0, .w = true, .wn = 1});
for (Test& test: tests) {
ProgressPtr pr(new Progress(256));
pr->state = test.state;
pr->match = test.m;
pr->next = test.n;
bool ok = pr->maybe_decreases_to(test.rejected, test.last);
ASSERT_TRUE(ok == test.w);
ASSERT_TRUE(pr->match == test.m);
ASSERT_TRUE(pr->next == test.wn);
}
}
TEST(progress, IsPaused) {
struct Test {
ProgressState state;
bool paused;
bool w;
};
std::vector<Test> tests;
tests.push_back(Test{.state = ProgressStateProbe, .paused = false, .w = false});
tests.push_back(Test{.state = ProgressStateProbe, .paused = true, .w = true});
tests.push_back(Test{.state = ProgressStateReplicate, .paused = false, .w = false});
tests.push_back(Test{.state = ProgressStateReplicate, .paused = true, .w = false});
tests.push_back(Test{.state = ProgressStateSnapshot, .paused = false, .w = true});
tests.push_back(Test{.state = ProgressStateSnapshot, .paused = true, .w = true});
for (Test& test: tests) {
ProgressPtr pr(new Progress(256));
pr->state = test.state;
pr->paused = test.paused;
ASSERT_TRUE(pr->is_paused() == test.w);
}
}
TEST(progress, resume) {
ProgressPtr pr(new Progress(256));
pr->next = 2;
pr->paused = true;
pr->maybe_decreases_to(2, 2);
ASSERT_TRUE(pr->paused);
pr->maybe_update(2);
ASSERT_FALSE(pr->paused);
}
int main(int argc, char* argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| 28.034602
| 121
| 0.618489
|
jinyyu
|
fc1efbfa3bb6422aee8616cbc642d6897baf3344
| 6,569
|
cpp
|
C++
|
src/llc.cpp
|
salessandri/libtins
|
2cf61403e186cda93c48ffb4310ff46eddb8dd20
|
[
"BSD-2-Clause"
] | null | null | null |
src/llc.cpp
|
salessandri/libtins
|
2cf61403e186cda93c48ffb4310ff46eddb8dd20
|
[
"BSD-2-Clause"
] | null | null | null |
src/llc.cpp
|
salessandri/libtins
|
2cf61403e186cda93c48ffb4310ff46eddb8dd20
|
[
"BSD-2-Clause"
] | 1
|
2020-11-12T21:19:10.000Z
|
2020-11-12T21:19:10.000Z
|
/*
* Copyright (c) 2014, Matias Fontanini
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <stdexcept>
#include <cstring>
#ifdef TINS_DEBUG
#include <cassert>
#endif
#include "llc.h"
#include "stp.h"
#include "rawpdu.h"
#include "exceptions.h"
namespace Tins {
const uint8_t LLC::GLOBAL_DSAP_ADDR = 0xFF;
const uint8_t LLC::NULL_ADDR = 0x00;
LLC::LLC()
: _type(LLC::INFORMATION)
{
memset(&_header, 0, sizeof(llchdr));
control_field_length = 2;
memset(&control_field, 0, sizeof(control_field));
information_field_length = 0;
}
LLC::LLC(uint8_t dsap, uint8_t ssap)
: _type(LLC::INFORMATION)
{
_header.dsap = dsap;
_header.ssap = ssap;
control_field_length = 2;
memset(&control_field, 0, sizeof(control_field));
information_field_length = 0;
}
LLC::LLC(const uint8_t *buffer, uint32_t total_sz) {
// header + 1 info byte
if(total_sz < sizeof(_header) + 1)
throw malformed_packet();
std::memcpy(&_header, buffer, sizeof(_header));
buffer += sizeof(_header);
total_sz -= sizeof(_header);
information_field_length = 0;
if ((buffer[0] & 0x03) == LLC::UNNUMBERED) {
if(total_sz < sizeof(un_control_field))
throw malformed_packet();
type(LLC::UNNUMBERED);
std::memcpy(&control_field.unnumbered, buffer, sizeof(un_control_field));
buffer += sizeof(un_control_field);
total_sz -= sizeof(un_control_field);
//TODO: Create information fields if corresponding.
}
else {
if(total_sz < sizeof(info_control_field))
throw malformed_packet();
type((Format)(buffer[0] & 0x03));
control_field_length = 2;
std::memcpy(&control_field.info, buffer, sizeof(info_control_field));
buffer += 2;
total_sz -= 2;
}
if(total_sz > 0) {
if(dsap() == 0x42 && ssap() == 0x42)
inner_pdu(new Tins::STP(buffer, total_sz));
else
inner_pdu(new Tins::RawPDU(buffer, total_sz));
}
}
void LLC::group(bool value) {
if (value) {
_header.dsap |= 0x01;
}
else {
_header.dsap &= 0xFE;
}
}
void LLC::dsap(uint8_t new_dsap) {
_header.dsap = new_dsap;
}
void LLC::response(bool value) {
if (value) {
_header.ssap |= 0x01;
}
else {
_header.ssap &= 0xFE;
}
}
void LLC::ssap(uint8_t new_ssap) {
_header.ssap = new_ssap;
}
void LLC::type(LLC::Format type) {
_type = type;
switch (type) {
case LLC::INFORMATION:
control_field_length = 2;
control_field.info.type_bit = 0;
break;
case LLC::SUPERVISORY:
control_field_length = 2;
control_field.super.type_bit = 1;
break;
case LLC::UNNUMBERED:
control_field_length = 1;
control_field.unnumbered.type_bits = 3;
break;
}
}
void LLC::send_seq_number(uint8_t seq_number) {
if (type() != LLC::INFORMATION)
return;
control_field.info.send_seq_num = seq_number;
}
void LLC::receive_seq_number(uint8_t seq_number) {
switch (type()) {
case LLC::UNNUMBERED:
return;
case LLC::INFORMATION:
control_field.info.recv_seq_num = seq_number;
break;
case LLC::SUPERVISORY:
control_field.super.recv_seq_num = seq_number;
break;
}
}
void LLC::poll_final(bool value) {
switch (type()) {
case LLC::UNNUMBERED:
control_field.unnumbered.poll_final_bit = value;
break;
case LLC::INFORMATION:
control_field.info.poll_final_bit = value;
return;
case LLC::SUPERVISORY:
control_field.super.poll_final_bit = value;
break;
}
}
void LLC::supervisory_function(LLC::SupervisoryFunctions new_func) {
if (type() != LLC::SUPERVISORY)
return;
control_field.super.supervisory_func = new_func;
}
void LLC::modifier_function(LLC::ModifierFunctions mod_func) {
if (type() != LLC::UNNUMBERED)
return;
control_field.unnumbered.mod_func1 = mod_func >> 3;
control_field.unnumbered.mod_func2 = mod_func & 0x07;
}
void LLC::add_xid_information(uint8_t xid_id, uint8_t llc_type_class, uint8_t receive_window) {
field_type xid(3);
xid[0] = xid_id;
xid[1] = llc_type_class;
xid[2] = receive_window;
information_field_length += static_cast<uint8_t>(xid.size());
information_fields.push_back(xid);
}
uint32_t LLC::header_size() const {
return sizeof(_header) + control_field_length + information_field_length;
}
void LLC::clear_information_fields() {
information_field_length = 0;
information_fields.clear();
}
void LLC::write_serialization(uint8_t *buffer, uint32_t total_sz, const Tins::PDU *parent) {
#ifdef TINS_DEBUG
assert(total_sz >= header_size());
#endif
if(inner_pdu() && inner_pdu()->pdu_type() == PDU::STP) {
dsap(0x42);
ssap(0x42);
}
std::memcpy(buffer, &_header, sizeof(_header));
buffer += sizeof(_header);
switch (type()) {
case LLC::UNNUMBERED:
std::memcpy(buffer, &(control_field.unnumbered), sizeof(un_control_field));
buffer += sizeof(un_control_field);
break;
case LLC::INFORMATION:
std::memcpy(buffer, &(control_field.info), sizeof(info_control_field));
buffer += sizeof(info_control_field);
break;
case LLC::SUPERVISORY:
std::memcpy(buffer, &(control_field.super), sizeof(super_control_field));
buffer += sizeof(super_control_field);
break;
}
for (std::list<field_type>::const_iterator it = information_fields.begin(); it != information_fields.end(); it++) {
std::copy(it->begin(), it->end(), buffer);
buffer += it->size();
}
}
}
| 27.60084
| 116
| 0.706348
|
salessandri
|
fc1f020afe3acad394af8c020777f964da209f1f
| 2,527
|
hh
|
C++
|
psana/psana/peakFinder/peakfinder8.hh
|
ZhenghengLi/lcls2
|
94e75c6536954a58c8937595dcac295163aa1cdf
|
[
"BSD-3-Clause-LBNL"
] | 16
|
2017-11-09T17:10:56.000Z
|
2022-03-09T23:03:10.000Z
|
psana/psana/peakFinder/peakfinder8.hh
|
ZhenghengLi/lcls2
|
94e75c6536954a58c8937595dcac295163aa1cdf
|
[
"BSD-3-Clause-LBNL"
] | 6
|
2017-12-12T19:30:05.000Z
|
2020-07-09T00:28:33.000Z
|
psana/psana/peakFinder/peakfinder8.hh
|
ZhenghengLi/lcls2
|
94e75c6536954a58c8937595dcac295163aa1cdf
|
[
"BSD-3-Clause-LBNL"
] | 25
|
2017-09-18T20:02:43.000Z
|
2022-03-27T22:27:42.000Z
|
// This file is part of OM.
//
// OM 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.
//
// OM 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 OnDA.
// If not, see <http://www.gnu.org/licenses/>.
//
// Copyright 2020 SLAC National Accelerator Laboratory
//
// Based on OnDA - Copyright 2014-2019 Deutsches Elektronen-Synchrotron DESY,
// a research centre of the Helmholtz Association.
#ifndef PEAKFINDER8_H
#define PEAKFINDER8_H
typedef struct {
public:
long nPeaks;
long nHot;
float peakResolution; // Radius of 80% of peaks
float peakResolutionA; // Radius of 80% of peaks
float peakDensity; // Density of peaks within this 80% figure
float peakNpix; // Number of pixels in peaks
float peakTotal; // Total integrated intensity in peaks
int memoryAllocated;
long nPeaks_max;
float *peak_maxintensity; // Maximum intensity in peak
float *peak_totalintensity; // Integrated intensity in peak
float *peak_sigma; // Signal-to-noise ratio of peak
float *peak_snr; // Signal-to-noise ratio of peak
float *peak_npix; // Number of pixels in peak
float *peak_com_x; // peak center of mass x (in raw layout)
float *peak_com_y; // peak center of mass y (in raw layout)
long *peak_com_index; // closest pixel corresponding to peak
float *peak_com_x_assembled; // peak center of mass x (in assembled layout)
float *peak_com_y_assembled; // peak center of mass y (in assembled layout)
float *peak_com_r_assembled; // peak center of mass r (in assembled layout)
float *peak_com_q; // Scattering vector of this peak
float *peak_com_res; // REsolution of this peak
} tPeakList;
void allocatePeakList(tPeakList *peak, long NpeaksMax);
void freePeakList(tPeakList peak);
int peakfinder8(tPeakList *peaklist, float *data, char *mask, float *pix_r,
long asic_nx, long asic_ny, long nasics_x, long nasics_y,
float ADCthresh, float hitfinderMinSNR,
long hitfinderMinPixCount, long hitfinderMaxPixCount,
long hitfinderLocalBGRadius, char* outliersMask);
#endif // PEAKFINDER8_H
| 43.568966
| 86
| 0.734863
|
ZhenghengLi
|
fc1fb8db83e54cf86864f1c20ee6f31ee9243501
| 4,104
|
cpp
|
C++
|
XJ Contests/2020/12.3/T3/C.cpp
|
jinzhengyu1212/Clovers
|
0efbb0d87b5c035e548103409c67914a1f776752
|
[
"MIT"
] | null | null | null |
XJ Contests/2020/12.3/T3/C.cpp
|
jinzhengyu1212/Clovers
|
0efbb0d87b5c035e548103409c67914a1f776752
|
[
"MIT"
] | null | null | null |
XJ Contests/2020/12.3/T3/C.cpp
|
jinzhengyu1212/Clovers
|
0efbb0d87b5c035e548103409c67914a1f776752
|
[
"MIT"
] | null | null | null |
/*
the vast starry sky,
bright for those who chase the light.
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define mk make_pair
const int inf=(int)1e9;
const ll INF=(ll)5e18;
const int MOD=998244353;
int _abs(int x){return x<0 ? -x : x;}
int add(int x,int y){x+=y; return x>=MOD ? x-MOD : x;}
int sub(int x,int y){x-=y; return x<0 ? x+MOD : x;}
#define mul(x,y) (ll)(x)*(y)%MOD
void Add(int &x,int y){x+=y; if(x>=MOD) x-=MOD;}
void Sub(int &x,int y){x-=y; if(x<0) x+=MOD;}
void Mul(int &x,int y){x=mul(x,y);}
int qpow(int x,int y){int ret=1; while(y){if(y&1) ret=mul(ret,x); x=mul(x,x); y>>=1;} return ret;}
void checkmin(int &x,int y){if(x>y) x=y;}
void checkmax(int &x,int y){if(x<y) x=y;}
void checkmin(ll &x,ll y){if(x>y) x=y;}
void checkmax(ll &x,ll y){if(x<y) x=y;}
#define out(x) cerr<<#x<<'='<<x<<' '
#define outln(x) cerr<<#x<<'='<<x<<endl
#define sz(x) (int)(x).size()
inline int read(){
int x=0,f=1; char c=getchar();
while(c>'9'||c<'0'){if(c=='-') f=-1; c=getchar();}
while(c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=getchar();
return x*f;
}
const int N=500005;
int n,m;
vector<int> A[N],B[N];
struct QUERY{
int opt,x,y;
}Q[N];
struct Tree{
int dfn[N],dfn_clock=0,vis[N],out[N],fa[N];
vector<int> v[N];
void dfs(int u){
dfn[u]=++dfn_clock; vis[u]=1;
out[u]=dfn[u];
for(auto &to : v[u]) dfs(to);
}
}t1,t2;
struct OIerwanhongAKIOI{//A
vector<int> tim[N<<2];
vector<ll> val[N<<2];
void update(int x,int l,int r,int L,int R,int AD,int ti){
if(L<=l&&r<=R){
tim[x].push_back(ti);
val[x].push_back((val[x].empty() ? 0 : val[x].back())+AD);
return;
}
int mid=(l+r)>>1;
if(mid>=L) update(x<<1,l,mid,L,R,AD,ti);
if(mid<R) update(x<<1|1,mid+1,r,L,R,AD,ti);
}
ll query(int x,int l,int r,int pos,int ti){
int tmp=lower_bound(tim[x].begin(),tim[x].end(),ti)-tim[x].begin()-1;
ll tt=(tmp==-1||tim[x].empty() ? 0 : val[x][tmp]);
ll ttt=(tim[x].empty() ? 0 : val[x].back());
if(l==r){return ttt-tt;}
int mid=(l+r)>>1;
if(mid>=pos) return ttt-tt+query(x<<1,l,mid,pos,ti);
else return ttt-tt+query(x<<1|1,mid+1,r,pos,ti);
}
}tree1;
struct SevenDawnsAKIOI{//B
int tim[N<<2],val[N<<2];
pii merge(pii x,pii y){//time val
return x.first<y.first ? y : x;
}
void update(int x,int l,int r,int L,int R,int ti,int Val){
if(L<=l&&r<=R){
tim[x]=ti;
val[x]=Val;
return;
}
int mid=(l+r)>>1;
if(mid>=L) update(x<<1,l,mid,L,R,ti,Val);
if(mid<R) update(x<<1|1,mid+1,r,L,R,ti,Val);
}
pii query(int x,int l,int r,int pos){
if(l==r) return mk(tim[x],val[x]);
int mid=(l+r)>>1;
if(mid>=pos) return merge(mk(tim[x],val[x]),query(x<<1,l,mid,pos));
else return merge(mk(tim[x],val[x]),query(x<<1|1,mid+1,r,pos));
}
}tree2;
void solve(){
for(int i=1;i<=m;i++){
if(Q[i].opt==1)
checkmax(t1.out[Q[i].x],t1.out[Q[i].y]);
else if(Q[i].opt==2)
checkmax(t2.out[Q[i].x],t2.out[Q[i].y]);
else if(Q[i].opt==3)
tree1.update(1,1,n,t1.dfn[Q[i].x],t1.out[Q[i].x],Q[i].y,i);
else if(Q[i].opt==4)
tree2.update(1,1,n,t2.dfn[Q[i].x],t2.out[Q[i].x],i,Q[i].y);
else{
pii tmp=tree2.query(1,1,n,t2.dfn[Q[i].x]);
ll ret=tree1.query(1,1,n,t1.dfn[Q[i].x],tmp.first);
printf("%lld\n",ret+tmp.second);
}
}
}
int main()
{
n=read(); m=read();
for(int i=1;i<=m;i++){
Q[i].opt=read();
if(Q[i].opt!=5) Q[i].x=read(),Q[i].y=read();
else Q[i].x=read();
}
for(int i=1;i<=m;i++){
if(Q[i].opt==1) t1.v[Q[i].x].push_back(Q[i].y),t1.fa[Q[i].y]=Q[i].x;
else if(Q[i].opt==2) t2.v[Q[i].x].push_back(Q[i].y),t2.fa[Q[i].y]=Q[i].x;
}
for(int i=1;i<=n;i++){
if(t1.fa[i]==0) t1.dfs(i);
if(t2.fa[i]==0) t2.dfs(i);
}
solve();
return 0;
}
| 30.857143
| 98
| 0.504873
|
jinzhengyu1212
|
fc21af3d3b8dc236074202a09ad8ffa9c9e2ae37
| 5,506
|
cpp
|
C++
|
test/ara/com/someip/pubsub/someip_pubsub_test.cpp
|
bigdark1024/Adaptive-AUTOSAR
|
b7ebbbd123761bf3f73b1ef425c14c7705c967f8
|
[
"MIT"
] | 49
|
2021-07-26T14:28:55.000Z
|
2022-03-29T03:33:32.000Z
|
test/ara/com/someip/pubsub/someip_pubsub_test.cpp
|
bigdark1024/Adaptive-AUTOSAR
|
b7ebbbd123761bf3f73b1ef425c14c7705c967f8
|
[
"MIT"
] | 9
|
2021-07-26T14:35:20.000Z
|
2022-02-05T15:49:43.000Z
|
test/ara/com/someip/pubsub/someip_pubsub_test.cpp
|
bigdark1024/Adaptive-AUTOSAR
|
b7ebbbd123761bf3f73b1ef425c14c7705c967f8
|
[
"MIT"
] | 17
|
2021-09-03T15:38:27.000Z
|
2022-03-27T15:48:01.000Z
|
#include <gtest/gtest.h>
#include "../../../../../src/ara/com/someip/pubsub/someip_pubsub_server.h"
#include "../../../../../src/ara/com/someip/pubsub/someip_pubsub_client.h"
#include "../../helper/mockup_network_layer.h"
namespace ara
{
namespace com
{
namespace someip
{
namespace pubsub
{
class SomeIpPubSubTest : public testing::Test
{
private:
static const uint16_t cCounter = 0;
static const uint16_t cPort = 9090;
helper::MockupNetworkLayer<sd::SomeIpSdMessage> mNetworkLayer;
helper::Ipv4Address mIpAddress;
protected:
static const uint16_t cServiceId = 1;
static const uint16_t cInstanceId = 1;
static const uint8_t cMajorVersion = 1;
static const uint16_t cEventgroupId = 0;
static const int cWaitingDuration = 100;
SomeIpPubSubServer Server;
SomeIpPubSubClient Client;
SomeIpPubSubTest() : mIpAddress(224, 0, 0, 0),
Server(&mNetworkLayer,
cServiceId,
cInstanceId,
cMajorVersion,
cEventgroupId,
mIpAddress,
cPort),
Client(
&mNetworkLayer,
cCounter)
{
}
};
TEST_F(SomeIpPubSubTest, ServerInitialState)
{
const helper::PubSubState cExpectedState =
helper::PubSubState::ServiceDown;
helper::PubSubState _actualState = Server.GetState();
EXPECT_EQ(cExpectedState, _actualState);
}
TEST_F(SomeIpPubSubTest, NoServerRunning)
{
const int cMinimalDuration = 1;
sd::SomeIpSdMessage _message;
EXPECT_FALSE(
Client.TryGetProcessedSubscription(
cMinimalDuration, _message));
}
TEST_F(SomeIpPubSubTest, ServerStart)
{
const helper::PubSubState cExpectedState =
helper::PubSubState::NotSubscribed;
Server.Start();
helper::PubSubState _actualState = Server.GetState();
EXPECT_EQ(cExpectedState, _actualState);
}
TEST_F(SomeIpPubSubTest, AcknowlegeScenario)
{
const helper::PubSubState cExpectedState =
helper::PubSubState::Subscribed;
sd::SomeIpSdMessage _message;
Server.Start();
Client.Subscribe(
cServiceId, cInstanceId, cMajorVersion, cEventgroupId);
bool _succeed =
Client.TryGetProcessedSubscription(cWaitingDuration, _message);
EXPECT_TRUE(_succeed);
auto _eventgroupEntry =
std::dynamic_pointer_cast<entry::EventgroupEntry>(
_message.Entries().at(0));
EXPECT_GT(_eventgroupEntry->TTL(), 0);
EXPECT_EQ(cExpectedState, Server.GetState());
}
TEST_F(SomeIpPubSubTest, NegativeAcknowlegeScenario)
{
const helper::PubSubState cExpectedState =
helper::PubSubState::ServiceDown;
sd::SomeIpSdMessage _message;
Client.Subscribe(
cServiceId, cInstanceId, cMajorVersion, cEventgroupId);
bool _succeed =
Client.TryGetProcessedSubscription(cWaitingDuration, _message);
EXPECT_TRUE(_succeed);
auto _eventgroupEntry =
std::dynamic_pointer_cast<entry::EventgroupEntry>(
_message.Entries().at(0));
EXPECT_EQ(_eventgroupEntry->TTL(), 0);
EXPECT_EQ(cExpectedState, Server.GetState());
}
TEST_F(SomeIpPubSubTest, UnsubscriptionScenario)
{
const helper::PubSubState cExpectedState =
helper::PubSubState::NotSubscribed;
sd::SomeIpSdMessage _message;
Server.Start();
Client.Subscribe(
cServiceId, cInstanceId, cMajorVersion, cEventgroupId);
bool _succeed =
Client.TryGetProcessedSubscription(cWaitingDuration, _message);
EXPECT_TRUE(_succeed);
Client.Unsubscribe(
cServiceId, cInstanceId, cMajorVersion, cEventgroupId);
EXPECT_EQ(cExpectedState, Server.GetState());
}
}
}
}
}
| 38.236111
| 87
| 0.460407
|
bigdark1024
|
fc235de156e8661ed509ddf134cd4c96efda6600
| 6,373
|
cpp
|
C++
|
source/core/util/h5json.cpp
|
jwuttke/daquiri-qpx
|
6606f4efca9bbe460e25e511fd94a8277c7e1fe6
|
[
"BSD-2-Clause"
] | 2
|
2018-03-25T05:31:44.000Z
|
2019-07-25T05:17:51.000Z
|
source/core/util/h5json.cpp
|
jwuttke/daquiri-qpx
|
6606f4efca9bbe460e25e511fd94a8277c7e1fe6
|
[
"BSD-2-Clause"
] | 158
|
2017-11-16T09:20:24.000Z
|
2022-03-28T11:39:43.000Z
|
source/core/util/h5json.cpp
|
martukas/daquiri-qpx
|
6606f4efca9bbe460e25e511fd94a8277c7e1fe6
|
[
"BSD-2-Clause"
] | 2
|
2018-09-20T08:29:21.000Z
|
2020-08-04T18:34:50.000Z
|
#include <core/util/h5json.h>
std::string vector_idx_minlen(size_t idx, size_t max)
{
size_t minlen = std::to_string(max).size();
std::string name = std::to_string(idx);
if (name.size() < minlen)
name = std::string(minlen - name.size(), '0').append(name);
return name;
}
namespace hdf5 {
node::Group require_group(node::Group& g, std::string name)
{
if (g.exists(name))
node::remove(g[name]);
return g.create_group(name);
}
//void to_json(json& j, const Enum<int16_t>& e)
//{
// j["___choice"] = e.val();
// std::multimap<std::string, int16_t> map;
// for (auto a : e.options())
// map.insert({a.second, a.first});
// j["___options"] = json(map);
//}
//
//void from_json(const json& j, Enum<int16_t>& e)
//{
// auto o = j["___options"];
// for (json::iterator it = o.begin(); it != o.end(); ++it)
// e.set_option(it.value(), it.key());
// e.set(j["___choice"]);
//}
void to_json(json &j, const node::Group &g)
{
for (auto n : g.nodes) {
if (n.type() == node::Type::DATASET)
{
auto d = node::Dataset(n);
json jj;
to_json(jj, d);
j[n.link().path().name()] = jj;
}
else if (n.type() == node::Type::GROUP)
{
auto gg = node::Group(n);
json jj;
to_json(jj, gg);
j[n.link().path().name()] = jj;
}
}
for (auto a : g.attributes)
attr_to_json(j, a);
// for (auto gg : g.groups())
// to_json(j[gg], g.open_group(gg));
// for (auto aa : g.attributes())
// j[aa] = attribute_to_json(g, aa);
// for (auto dd : g.datasets())
// j[dd] = g.open_dataset(dd);
}
void attr_to_json(json &j, const attribute::Attribute &a)
{
if (a.datatype() == datatype::create<float>()) {
float val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<double>()) {
double val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<long double>()) {
long double val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<int8_t>()) {
int8_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<int16_t>()) {
int16_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<int32_t>()) {
int32_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<int64_t>()) {
int64_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<uint8_t>()) {
uint8_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<uint16_t>()) {
uint16_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<uint32_t>()) {
uint32_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<uint64_t>()) {
uint64_t val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<std::string>()) {
std::string val;
a.read(val);
j[a.name()] = val;
} else if (a.datatype() == datatype::create<bool>()) {
bool val;
a.read(val);
j[a.name()] = val;
}
// else if (g.template attr_is_enum<int16_t>())
// return json(g.template read_enum<int16_t>());
// else
// return "ERROR: to_json unimplemented attribute type";
}
void attribute_from_json(const json &j, const std::string &name,
node::Group &g)
{
// if (j.count("___options") && j.count("___choice"))
// {
// Enum<int16_t> e = j;
// g.write_enum(name, e);
// }
// else
if (j.is_number_float()) {
attribute::Attribute a = g.attributes.create<double>(name);
a.write(j.get<double>());
} else if (j.is_number_unsigned()) {
attribute::Attribute a = g.attributes.create<uint32_t>(name);
a.write(j.get<uint32_t>());
} else if (j.is_number_integer()) {
attribute::Attribute a = g.attributes.create<int64_t>(name);
a.write(j.get<int64_t>());
} else if (j.is_boolean()) {
attribute::Attribute a = g.attributes.create<bool>(name);
a.write(j.get<bool>());
} else if (j.is_string()) {
attribute::Attribute a = g.attributes.create<std::string>(name);
a.write(j.get<std::string>());
}
}
void from_json(const json &j, node::Group &g)
{
bool is_array = j.is_array();
uint32_t i = 0;
size_t len = 0;
if (is_array && j.size())
len = std::to_string(j.size() - 1).size();
for (json::const_iterator it = j.begin(); it != j.end(); ++it) {
std::string name;
if (is_array) {
name = std::to_string(i++);
if (name.size() < len)
name = std::string(len - name.size(), '0').append(name);
} else
name = it.key();
if (it.value().count("___shape") && it.value()["___shape"].is_array()) {
dataset_from_json(it.value(), name, g);
} else if (!it.value().is_array() &&
(it.value().is_number() ||
it.value().is_boolean() ||
it.value().is_string() ||
it.value().count("___options") ||
it.value().count("___choice"))) {
attribute_from_json(it.value(), name, g);
} else {
auto gg = g.create_group(name);
from_json(it.value(), gg);
}
}
}
void to_json(json &j, const node::Dataset &d)
{
auto dsp = dataspace::Simple(d.dataspace());
auto dims = dsp.current_dimensions();
auto maxdims = dsp.maximum_dimensions();
j["___shape"] = dims;
if (dims != maxdims)
j["___extends"] = maxdims;
auto cl = d.creation_list();
if (cl.layout() == property::DatasetLayout::CHUNKED)
j["___chunk"] = cl.chunk();
for (auto a : d.attributes)
attr_to_json(j, a);
}
void dataset_from_json(const json &j,
__attribute__((unused)) const std::string &name,
__attribute__((unused)) node::Group &g)
{
std::vector<hsize_t> shape = j["___shape"];
std::vector<hsize_t> extends;
if (j.count("___extends") && j["___extends"].is_array())
extends = j["___extends"].get<std::vector<hsize_t>>();
std::vector<hsize_t> chunk;
if (j.count("___chunk") && j["___chunk"].is_array())
chunk = j["___chunk"].get<std::vector<hsize_t>>();
// auto dset = g.create_dataset<int>(name, shape, chunk);
// for (json::const_iterator it = j.begin(); it != j.end(); ++it)
// {
// attribute_from_json(json(it.value()), std::string(it.key()), dset);
// }
}
}
| 28.07489
| 76
| 0.571473
|
jwuttke
|
fc23ec946dd1aae6ca6656c444d1030e2a5eb347
| 13,013
|
hpp
|
C++
|
lockfree/AsyncObject.hpp
|
unevens/lockfree-async
|
57009fc5270d3b42b8ff8c57c6c2961cdcf299b1
|
[
"MIT"
] | 2
|
2020-04-06T01:50:26.000Z
|
2021-03-18T17:19:36.000Z
|
lockfree/AsyncObject.hpp
|
unevens/lockfree-async
|
57009fc5270d3b42b8ff8c57c6c2961cdcf299b1
|
[
"MIT"
] | null | null | null |
lockfree/AsyncObject.hpp
|
unevens/lockfree-async
|
57009fc5270d3b42b8ff8c57c6c2961cdcf299b1
|
[
"MIT"
] | null | null | null |
/*
Copyright 2021 Dario Mambro
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 "Messenger.hpp"
#include "inplace_function.h"
#include <chrono>
#include <mutex>
#include <thread>
#include <unordered_set>
#include <utility>
#include <vector>
namespace lockfree {
class AsyncThread;
namespace detail {
/**
* An interface abstracting over the different template specialization of Async objects.
*/
class AsyncObjectInterface : public std::enable_shared_from_this<AsyncObjectInterface>
{
friend class ::lockfree::AsyncThread;
public:
virtual ~AsyncObjectInterface() = default;
AsyncThread* getAsyncThread() const
{
return asyncThread;
}
protected:
virtual void timerCallback() = 0;
void setAsyncThread(AsyncThread* asyncThread_)
{
asyncThread = asyncThread_;
}
class AsyncThread* asyncThread{ nullptr };
};
} // namespace detail
/**
* The AsyncThread class manages a thread that will perform asynchronously any change submitted to an Async object
* attached to it. An Async object needs to be attached to an AsyncThread for it to receive any submitted change.
*/
class AsyncThread final
{
using AsyncInterface = detail::AsyncObjectInterface;
friend AsyncInterface;
public:
/**
* Constructor
* @period the period in milliseconds with which the thread that receives and handles any change submitted to the
* objects attached to it.
*/
explicit AsyncThread(int timerPeriod = 250)
: timerPeriod{ timerPeriod }
{}
/**
* Attaches an Async object from the thread
* @asyncObject the object to attach to the thread
*/
void attachObject(AsyncInterface& asyncObject)
{
auto prevAsyncThread = asyncObject.getAsyncThread();
if (prevAsyncThread) {
if (prevAsyncThread == this) {
return;
}
prevAsyncThread->detachObject(asyncObject);
}
auto const lock = std::lock_guard<std::mutex>(mutex);
asyncObjects.insert(asyncObject.shared_from_this());
asyncObject.setAsyncThread(this);
}
/**
* Detaches an Async object from the thread
* @asyncObject the object to detach to the thread
*/
void detachObject(AsyncInterface& asyncObject)
{
auto const lock = std::lock_guard<std::mutex>(mutex);
auto const it =
std::find_if(asyncObjects.begin(), asyncObjects.end(), [&](std::shared_ptr<AsyncInterface> const& element) {
return element.get() == &asyncObject;
});
if (it != asyncObjects.end()) {
asyncObjects.erase(it);
asyncObject.setAsyncThread(nullptr);
}
}
/**
* Starts the thread.
*/
void start()
{
if (isRunningFlag.load(std::memory_order_acquire)) {
return;
}
stopTimerFlag.store(false, std::memory_order_release);
isRunningFlag.store(true, std::memory_order_release);
timer = std::thread([this]() {
while (true) {
auto const lock = std::lock_guard<std::mutex>(mutex);
for (auto& asyncObject : asyncObjects)
asyncObject->timerCallback();
if (stopTimerFlag.load(std::memory_order_acquire)) {
return;
}
std::this_thread::sleep_for(std::chrono::milliseconds(timerPeriod));
if (stopTimerFlag.load(std::memory_order_acquire)) {
return;
}
}
});
}
/**
* Stops the thread.
*/
void stop()
{
stopTimerFlag.store(true, std::memory_order_release);
if (timer.joinable()) {
timer.join();
}
isRunningFlag.store(false, std::memory_order_release);
}
/**
* Sets the period in milliseconds with which the thread that receives and handles any change submitted to the objects
* attached to it.
* @period the period to set
*/
void setUpdatePeriod(int period)
{
timerPeriod.store(period, std::memory_order_release);
}
/**
* @return the period in milliseconds with which the thread that receives and handles any change submitted to the
* objects attached to it.
*/
int getUpdatePeriod() const
{
return timerPeriod.load(std::memory_order_acquire);
}
/**
* @return true if the thread is running, false otherwise.
*/
bool isRunning() const
{
return isRunningFlag.load(std::memory_order_acquire);
}
/**
* Destructor. It stops the thread if it is active and detach any Async object that was using it
*/
~AsyncThread()
{
stop();
for (auto& asyncObject : asyncObjects)
asyncObject->setAsyncThread(nullptr);
}
private:
std::unordered_set<std::shared_ptr<AsyncInterface>> asyncObjects;
std::thread timer;
std::atomic<bool> stopTimerFlag{ false };
std::atomic<int> timerPeriod;
std::atomic<bool> isRunningFlag{ false };
std::mutex mutex;
};
/**
* Let's say you have some realtime threads, an each of them wants an instance of an object; and sometimes you need to
* perform some changes to that object that needs to be done asynchronously and propagated to all the instances. The
* Async class handles this scenario. The key idea is that the Object is constructable from some ObjectSettings, and you
* can submit a change to those object settings from any thread using a stdext::inplace_function<void(ObjectSettings&)>
* through an Async::Producer. Any thread that wants an instance of the object can request an Async::Instance which will
* hold a copy of the Object constructed from the ObjectSettings, and can receive the result of any changes submitted.
* The changes and the construction of the objects happen in an AsyncThread.
*/
template<class TObject, class TObjectSettings, size_t ChangeFunctorClosureCapacity = 32>
class AsyncObject final : public detail::AsyncObjectInterface
{
public:
using ObjectSettings = TObjectSettings;
using Object = TObject;
using ChangeSettings = stdext::inplace_function<void(ObjectSettings&), ChangeFunctorClosureCapacity>;
public:
/**
* A class that gives access to an instance of the async object.
*/
class Instance final
{
template<class TObject_, class TObjectSettings_, size_t ChangeFunctorClosureCapacity_>
friend class AsyncObject;
public:
/**
* Updates the instance to the last change submitted to the Async object. Lockfree.
* @return true if any change has been received and the instance has been updated, otherwise false
*/
bool update()
{
using std::swap;
auto messageNode = toInstance.receiveLastNode();
if (messageNode) {
auto& newObject = messageNode->get();
swap(object, newObject);
fromInstance.send(messageNode);
return true;
}
return false;
}
/**
* @return a reference to the actual object instance
*/
Object& get()
{
return *object;
}
/**
* @return a const reference to the actual object instance
*/
Object const& get() const
{
return *object;
}
~Instance()
{
async->removeInstance(this);
}
private:
explicit Instance(ObjectSettings& objectSettings, std::shared_ptr<AsyncObject> async)
: object{ std::make_unique<Object>(objectSettings) }
, async{ std::move(async) }
{}
std::unique_ptr<Object> object;
Messenger<std::unique_ptr<Object>> toInstance;
Messenger<std::unique_ptr<Object>> fromInstance;
std::shared_ptr<AsyncObject> async;
};
friend Instance;
class Producer final
{
template<class TObject_, class TObjectSettings_, size_t ChangeFunctorClosureCapacity_>
friend class AsyncObject;
public:
/**
* Submit a change to Async object, which will be handled asynchronously by the AsyncThread and received by the
* instances through the Instance::update method.
* It is not lock-free, as it may allocate an internal node of the lifo stack if there is no one available.
* @return true if the node was available a no allocation has been made, false otherwise
*/
bool submitChange(ChangeSettings change)
{
return messenger.send(std::move(change));
}
/**
* Submit a change to Async object, which will be handled asynchronously by the AsyncThread and received by the
* instances through the Instance::update method.
* It does not submit the change if the lifo stack is empty. It is lock-free.
* @return true if the change was submitted, false if the lifo stack is empty.
*/
bool submitChangeIfNodeAvailable(ChangeSettings change)
{
return messenger.sendIfNodeAvailable(std::move(change));
}
/**
* Allocates nodes for the lifo stack used to send changes.
* @numNodesToAllocate the number of nodes to allocate
*/
void allocateNodes(int numNodesToAllocate)
{
messenger.allocateNodes(numNodesToAllocate);
}
~Producer()
{
async->removeProducer(this);
}
private:
bool handleChanges(ObjectSettings& objectSettings)
{
int numChanges = receiveAndHandleMessageStack(messenger, [&](ChangeSettings& change) { change(objectSettings); });
return numChanges > 0;
}
explicit Producer(std::shared_ptr<AsyncObject> async)
: async{ std::move(async) }
{}
Messenger<ChangeSettings> messenger;
std::shared_ptr<AsyncObject> async;
};
friend Producer;
/**
* Creates a new Instance of the object
* @return the Instance
*/
std::unique_ptr<Instance> createInstance()
{
auto const lock = std::lock_guard<std::mutex>(mutex);
auto instance = std::unique_ptr<Instance>(
new Instance(objectSettings, std::static_pointer_cast<AsyncObject>(this->shared_from_this())));
instances.push_back(instance.get());
return instance;
}
/**
* Creates a new producer of object changes
* @return the producer
*/
std::unique_ptr<Producer> createProducer()
{
auto const lock = std::lock_guard<std::mutex>(mutex);
auto producer =
std::unique_ptr<Producer>(new Producer(std::static_pointer_cast<AsyncObject>(this->shared_from_this())));
producers.push_back(producer.get());
return producer;
}
/**
* Destructor. If the object was attached to an AsyncThread, it detached it
*/
~AsyncObject() override
{
assert(instances.empty() && producers.empty());
if (asyncThread) {
asyncThread->detachObject(*this);
}
}
/**
* Creates an Async object.
* @objectSettings the initial settings to build the Async object
*/
static std::shared_ptr<AsyncObject> create(ObjectSettings objectSettings)
{
return std::shared_ptr<AsyncObject>(new AsyncObject(std::move(objectSettings)));
}
private:
explicit AsyncObject(ObjectSettings objectSettings)
: objectSettings{ std::move(objectSettings) }
{}
template<class T>
void removeAddressFromStorage(T* address, std::vector<T*>& storage)
{
auto it = std::find(storage.begin(), storage.end(), address);
assert(it != storage.end());
if (it == storage.end())
return;
storage.erase(it);
}
void removeInstance(Instance* instance)
{
auto const lock = std::lock_guard<std::mutex>(mutex);
removeAddressFromStorage(instance, instances);
}
void removeProducer(Producer* producer)
{
auto const lock = std::lock_guard<std::mutex>(mutex);
removeAddressFromStorage(producer, producers);
}
void timerCallback() override
{
auto const lock = std::lock_guard<std::mutex>(mutex);
for (auto& instance : instances) {
instance->fromInstance.discardAndFreeAllMessages();
}
bool anyChange = false;
for (auto& producer : producers) {
bool const anyChangeFromProducer = producer->handleChanges(objectSettings);
if (anyChangeFromProducer) {
anyChange = true;
}
}
if (anyChange) {
for (auto& instance : instances) {
instance->toInstance.discardAndFreeAllMessages();
instance->toInstance.send(std::make_unique<Object>(objectSettings));
}
}
}
std::vector<Producer*> producers;
std::vector<Instance*> instances;
ObjectSettings objectSettings;
std::mutex mutex;
};
} // namespace lockfree
| 29.308559
| 120
| 0.694229
|
unevens
|
fc2f6c79898723b87a65d4377f6d2e7edc089055
| 1,141
|
cpp
|
C++
|
src/_leetcode/leet_m03.cpp
|
turesnake/leetPractice
|
a87b9b90eb8016038d7e5d3ad8e50e4ceb54d69b
|
[
"MIT"
] | null | null | null |
src/_leetcode/leet_m03.cpp
|
turesnake/leetPractice
|
a87b9b90eb8016038d7e5d3ad8e50e4ceb54d69b
|
[
"MIT"
] | null | null | null |
src/_leetcode/leet_m03.cpp
|
turesnake/leetPractice
|
a87b9b90eb8016038d7e5d3ad8e50e4ceb54d69b
|
[
"MIT"
] | null | null | null |
/*
* ====================== leet_m03.cpp ==========================
* -- tpr --
* CREATE -- 2020.05.18
* MODIFY --
* ----------------------------------------------------------
* 面试题03. 数组中重复的数字
*/
#include "innLeet.h"
namespace leet_m03 {//~
// 暴力法
// uset 快于 set
int findRepeatNumber_1( std::vector<int>& nums ){
std::unordered_set<int> sett {};
for( int i : nums ){
if( sett.erase(i)!=0 ){ return i; }
sett.insert( i );
}
return 0; // never reach
}
// 暴力法
// 用 vector 存储元素,牺牲内存缩短访问时间 61.66%, 100%
int findRepeatNumber_2( std::vector<int>& nums ){
std::vector<uint8_t> v ( nums.size(), 0 );
for( int i : nums ){
if( v.at(i)>0 ){ return i; }
v.at(i)++;
}
return 0; // never reach
}
//=========================================================//
void main_(){
std::vector<int> v { 2,3,1,0,2,5,3 };
auto ret = findRepeatNumber_2( v );
cout << "ret = " << ret << endl;
debug::log( "\n~~~~ leet: m03 :end ~~~~\n" );
}
}//~
| 18.403226
| 65
| 0.38475
|
turesnake
|
fc310e984915f553272a2c1f598190737294767f
| 885
|
hpp
|
C++
|
src/TextWidget.hpp
|
marcogillies/GUIWidgetsInheritanceExample
|
de41415d1b923c10931e87be5859c4936e207bd7
|
[
"MIT"
] | null | null | null |
src/TextWidget.hpp
|
marcogillies/GUIWidgetsInheritanceExample
|
de41415d1b923c10931e87be5859c4936e207bd7
|
[
"MIT"
] | null | null | null |
src/TextWidget.hpp
|
marcogillies/GUIWidgetsInheritanceExample
|
de41415d1b923c10931e87be5859c4936e207bd7
|
[
"MIT"
] | null | null | null |
//
// TextWidget.hpp
// GUIWidgets
//
// Created by Marco Gillies on 13/03/2017.
//
//
#ifndef TextWidget_hpp
#define TextWidget_hpp
#include <string>
#include "Widget.hpp"
class ofTrueTypeFont;
/*
* This is a base class for Widgets that
* contain text.
* It stores a string and a font to draw
* the text with.
* The class is abstract because it does
* not implement subClassDraw, which is a
* pure virtual function of Widget.
*/
class TextWidget : public Widget{
protected:
std::string text;
/*
* I have used a shared_ptr for font because
* a single font is shared between many widgets
*/
std::shared_ptr<ofTrueTypeFont> font;
public:
TextWidget(std::string _text, std::shared_ptr<ofTrueTypeFont> _font);
TextWidget(std::string _text, std::shared_ptr<ofTrueTypeFont> _font, int x, int y);
};
#endif /* TextWidget_hpp */
| 22.125
| 87
| 0.688136
|
marcogillies
|
fc35608b9c7898fcf51a44b33fbcd7c9b5e9be78
| 4,718
|
hpp
|
C++
|
crogine/include/crogine/core/State.hpp
|
fallahn/crogine
|
f6cf3ade1f4e5de610d52e562bf43e852344bca0
|
[
"FTL",
"Zlib"
] | 41
|
2017-08-29T12:14:36.000Z
|
2022-02-04T23:49:48.000Z
|
crogine/include/crogine/core/State.hpp
|
fallahn/crogine
|
f6cf3ade1f4e5de610d52e562bf43e852344bca0
|
[
"FTL",
"Zlib"
] | 11
|
2017-09-02T15:32:45.000Z
|
2021-12-27T13:34:56.000Z
|
crogine/include/crogine/core/State.hpp
|
fallahn/crogine
|
f6cf3ade1f4e5de610d52e562bf43e852344bca0
|
[
"FTL",
"Zlib"
] | 5
|
2020-01-25T17:51:45.000Z
|
2022-03-01T05:20:30.000Z
|
/*-----------------------------------------------------------------------
Matt Marchant 2017 - 2020
http://trederia.blogspot.com
crogine - Zlib license.
This software is provided 'as-is', without any express or
implied warranty.In no event will the authors be held
liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions :
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but
is not required.
2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any
source distribution.
-----------------------------------------------------------------------*/
#pragma once
#include <crogine/Config.hpp>
#include <crogine/detail/Types.hpp>
#include <crogine/core/Message.hpp>
#include <cstdlib>
#include <memory>
namespace cro
{
class Window;
class App;
class StateStack;
class Time;
using StateID = std::int32_t;
/*!
\brief Abstract base class for states.
States, when used in conjustion with the state stack, are used
to encapsulate game states, such as menus or pausing mode.
Concrete states should provide a unique ID using the StateID type.
*/
class CRO_EXPORT_API State
{
public:
using Ptr = std::unique_ptr<State>;
/*!
\brief Context containing information about the current
application instance.
*/
struct CRO_EXPORT_API Context
{
App& appInstance;
Window& mainWindow;
//TODO handle the default view of the window
Context(App& a, Window& w) : appInstance(a), mainWindow(w) {}
};
/*!
\brief Constructor
\param StateStack Instance of th state state to which this state will belong
\param Context Copy of the current application's Context
*/
State(StateStack&, Context);
virtual ~State() = default;
State(const State&) = delete;
State(const State&&) = delete;
State& operator = (const State&) = delete;
State& operator = (const State&&) = delete;
/*!
\brief Receives window events as handed down from the StateStack.
\returns true if the event should be passed on through the stack, else false.
For example; when displaying a pause menu this function should return false
in order to consume events and prevent them from being passed on to the game
state residing underneath.
*/
virtual bool handleEvent(const cro::Event&) = 0;
/*!
\brief Receives system messages handed down from the StateStack.
All states receive all messages regardlessly.
*/
virtual void handleMessage(const cro::Message&) = 0;
/*!
\brief Executes one step of the game's simulation.
All game logic should be performed under this function.
\param dt The amount of time passed since this
function was last called.
\returns true if remaining states in the state should be simulated
else returns false.
\see handleEvent()
*/
virtual bool simulate(float dt) = 0;
/*!
\brief Calls to rendering systems should be performed here.
*/
virtual void render() = 0;
/*!
\brief Returns the unique ID of concrete states.
*/
virtual StateID getStateID() const = 0;
protected:
/*!
\brief Request a state with the given ID is pushed on to
the StateStack to which this state belongs.
*/
void requestStackPush(StateID);
/*!
\brief Requests that the state currently on the top of
the stack to which this state belongs is popped and destroyed.
*/
void requestStackPop();
/*!
\brief Requests that all states in the StateStack to which this
state belongs are removed.
*/
void requestStackClear();
/*!
\brief Returns a copy of this state's current Context
*/
Context getContext() const;
/*!
\brief Returns the number of active states on this state's StateStack
*/
std::size_t getStateCount() const;
private:
StateStack& m_stack;
Context m_context;
};
}
| 30.43871
| 85
| 0.625265
|
fallahn
|
fc3846c1ee06b5620458de9307ce7a316136d6b6
| 4,105
|
cpp
|
C++
|
qubus/src/performance_models/unified_performance_model.cpp
|
qubusproject/Qubus
|
0feb8d6df00459c5af402545dbe7c82ee3ec4b7c
|
[
"BSL-1.0"
] | null | null | null |
qubus/src/performance_models/unified_performance_model.cpp
|
qubusproject/Qubus
|
0feb8d6df00459c5af402545dbe7c82ee3ec4b7c
|
[
"BSL-1.0"
] | null | null | null |
qubus/src/performance_models/unified_performance_model.cpp
|
qubusproject/Qubus
|
0feb8d6df00459c5af402545dbe7c82ee3ec4b7c
|
[
"BSL-1.0"
] | null | null | null |
#include <hpx/config.hpp>
#include <qubus/performance_models/unified_performance_model.hpp>
#include <qubus/performance_models/regression_performance_model.hpp>
#include <qubus/performance_models/simple_statistical_performance_model.hpp>
#include <hpx/include/local_lcos.hpp>
#include <qubus/util/assert.hpp>
#include <algorithm>
#include <mutex>
#include <unordered_map>
#include <utility>
namespace qubus
{
namespace
{
std::unique_ptr<performance_model> create_performance_model(const symbol_id& func,
const module_library& mod_library,
address_space& host_addr_space)
{
auto mod = mod_library.lookup(func.get_prefix()).get();
const function& func_def = mod->lookup_function(func.suffix());
const auto& params = func_def.params();
auto has_scalar_params = std::any_of(params.begin(), params.end(), [](const auto& param) {
const auto& datatype = param.var_type();
return datatype == types::integer{} || datatype == types::float_{} ||
datatype == types::double_{};
});
if (has_scalar_params)
{
return std::make_unique<regression_performance_model>(host_addr_space);
}
else
{
return std::make_unique<simple_statistical_performance_model>();
}
}
} // namespace
class unified_performance_model_impl
{
public:
explicit unified_performance_model_impl(module_library mod_library_,
address_space& host_addr_space_)
: mod_library_(std::move(mod_library_)), host_addr_space_(&host_addr_space_)
{
}
void sample_execution_time(const symbol_id& func, const execution_context& ctx,
std::chrono::microseconds execution_time)
{
std::lock_guard<hpx::lcos::local::mutex> guard(models_mutex_);
auto search_result = kernel_models_.find(func);
if (search_result == kernel_models_.end())
{
search_result =
kernel_models_
.emplace(func, create_performance_model(func, mod_library_, *host_addr_space_))
.first;
}
search_result->second->sample_execution_time(func, ctx, std::move(execution_time));
}
boost::optional<performance_estimate>
try_estimate_execution_time(const symbol_id& func, const execution_context& ctx) const
{
std::lock_guard<hpx::lcos::local::mutex> guard(models_mutex_);
auto search_result = kernel_models_.find(func);
if (search_result != kernel_models_.end())
{
return search_result->second->try_estimate_execution_time(func, ctx);
}
else
{
return boost::none;
}
}
private:
mutable hpx::lcos::local::mutex models_mutex_;
std::unordered_map<symbol_id, std::unique_ptr<performance_model>> kernel_models_;
module_library mod_library_;
address_space* host_addr_space_;
};
unified_performance_model::unified_performance_model(module_library mod_library_,
address_space& host_addr_space_)
: impl_(std::make_unique<unified_performance_model_impl>(std::move(mod_library_), host_addr_space_))
{
}
unified_performance_model::~unified_performance_model() = default;
void unified_performance_model::sample_execution_time(const symbol_id& func,
const execution_context& ctx,
std::chrono::microseconds execution_time)
{
QUBUS_ASSERT(impl_, "Uninitialized object.");
impl_->sample_execution_time(func, ctx, std::move(execution_time));
}
boost::optional<performance_estimate>
unified_performance_model::try_estimate_execution_time(const symbol_id& func,
const execution_context& ctx) const
{
QUBUS_ASSERT(impl_, "Uninitialized object.");
return impl_->try_estimate_execution_time(func, ctx);
}
} // namespace qubus
| 32.322835
| 100
| 0.647259
|
qubusproject
|
fc38c32ad236fe64f0c1747f769a287e4139fe0c
| 1,611
|
cpp
|
C++
|
cmdstan/stan/lib/stan_math/test/unit/math/prim/arr/err/check_finite_test.cpp
|
yizhang-cae/torsten
|
dc82080ca032325040844cbabe81c9a2b5e046f9
|
[
"BSD-3-Clause"
] | null | null | null |
cmdstan/stan/lib/stan_math/test/unit/math/prim/arr/err/check_finite_test.cpp
|
yizhang-cae/torsten
|
dc82080ca032325040844cbabe81c9a2b5e046f9
|
[
"BSD-3-Clause"
] | null | null | null |
cmdstan/stan/lib/stan_math/test/unit/math/prim/arr/err/check_finite_test.cpp
|
yizhang-cae/torsten
|
dc82080ca032325040844cbabe81c9a2b5e046f9
|
[
"BSD-3-Clause"
] | null | null | null |
#include <stan/math/prim/arr.hpp>
#include <gtest/gtest.h>
using stan::math::check_finite;
// ---------- check_finite: vector tests ----------
TEST(ErrorHandlingScalar,CheckFinite_Vector) {
const char* function = "check_finite";
std::vector<double> x;
x.clear();
x.push_back (-1);
x.push_back (0);
x.push_back (1);
ASSERT_NO_THROW(check_finite(function, "x", x))
<< "check_finite should be true with finite x";
x.clear();
x.push_back(-1);
x.push_back(0);
x.push_back(std::numeric_limits<double>::infinity());
EXPECT_THROW(check_finite(function, "x", x), std::domain_error)
<< "check_finite should throw exception on Inf";
x.clear();
x.push_back(-1);
x.push_back(0);
x.push_back(-std::numeric_limits<double>::infinity());
EXPECT_THROW(check_finite(function, "x", x), std::domain_error)
<< "check_finite should throw exception on -Inf";
x.clear();
x.push_back(-1);
x.push_back(0);
x.push_back(std::numeric_limits<double>::quiet_NaN());
EXPECT_THROW(check_finite(function, "x", x), std::domain_error)
<< "check_finite should throw exception on NaN";
}
TEST(ErrorHandlingScalar,CheckFinite_nan) {
const char* function = "check_finite";
double nan = std::numeric_limits<double>::quiet_NaN();
std::vector<double> x;
x.push_back (nan);
x.push_back (0);
x.push_back (1);
EXPECT_THROW(check_finite(function, "x", x), std::domain_error);
x[0] = 1.0;
x[1] = nan;
EXPECT_THROW(check_finite(function, "x", x), std::domain_error);
x[1] = 0.0;
x[2] = nan;
EXPECT_THROW(check_finite(function, "x", x), std::domain_error);
}
| 27.305085
| 66
| 0.66915
|
yizhang-cae
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.