blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
563479f33ac48fc853241bad3f5db065d4e5ec05
617c155a5b7275462293b8caa99a0bf146da5887
/kolosy/KOLOS011-szachujace_skoczki.cpp
c0c9ba4527dc7a3a495f8826518c9247dd421011
[]
no_license
delekta/agh-wdi
d41f5da284d84bab0ad2ddd2e5273d338064ad84
c6cf4513d909bd8322a53fab8f23b0110d49cebe
refs/heads/master
2023-01-07T15:06:13.688590
2020-11-09T18:19:45
2020-11-09T18:19:45
311,423,027
0
0
null
null
null
null
UTF-8
C++
false
false
2,411
cpp
KOLOS011-szachujace_skoczki.cpp
// // Created by Kamil Delekta on 01.12.2019. // //Dana jest taablica t[N] zawierajaca liczby naturalne. Prosze napisac funkcje, ktora sprawdza, //czy jest mozliwe ustawienie dwoch wzajemnie szachujacych sie skoczkow tak, aby suma wartosci pol, //na ktorych staja skoczki, byla liczba pierwsza. Do funkcji nalezy przekazac tablice t, funkcja // zwrocic wartosc typu bool #include <iostream> #include <cmath> const int N = 4; using namespace std; void wypisz_tablice(int t[N][N]){ for(int i = 0; i < N; i++){ for(int j = 0; j < N; j++){ cout << t[i][j] << " "; } cout << endl; } } void wypisz_szachowane_skoczki(int y1, int x1, int y2, int x2){ for(int i = 0; i < N; i++){ for(int j = 0; j < N; j++){ if(i == y1 && j == x1 || i == y2 && j == x2){ cout << "S" << " "; } else{ cout << "0 "; } } cout << endl; } } bool czy_pierwsza(int liczba){ if(liczba < 2) return false; if(liczba == 2) return true; if(liczba %2 == 0) return false; for(int i = 3; i <= sqrt(liczba); i++){ if(liczba % i == 0) return false; } return true; } //bo N jes globalne bool drugi_szachowany_skoczek(int y, int x, int &nowyY, int &nowyX, int wariant){ int dy[8] = {2, 1, -1, -2, -2, -1, 1, 2}; int dx[8] = {1, 2, 2, 1, -1, -2, -2, -1}; nowyY = y + dy[wariant]; nowyX = x + dx[wariant]; return nowyY >= 0 and nowyY < N and nowyX >= 0 and nowyX < N; } bool czy_mozna(int t[N][N]){ int nowyY,nowyX; //pole pierwszego skoczka for(int y = 0; y < N; y++) { for(int x = 0; x < N; x++){ for(int wariant = 0; wariant < 8; wariant++){ if(drugi_szachowany_skoczek(y, x, nowyY, nowyX, wariant)){ if(czy_pierwsza(t[y][x] + t[nowyY][nowyX])){ wypisz_szachowane_skoczki(y, x, nowyY, nowyX); return true; } } } } } return false; } bool czy_mozna(int t[N][N]); int main() { int t[N][N] = { {2, 2, 4, 2}, {4, 2, 7, 2}, {4, 2, 2, 4}, {2, 2, 90, 8} }; wypisz_tablice(t); cout << endl; cout << czy_mozna(t); return 0; }
3cd8e593a2470de739adac9f50812e38513a36ea
b1cee9f96a394feded84f9a9fd24e34641b956fa
/compiler/code_gen.h
af9324826e7f11f54b1b2ed0e5a7b23de4989e8b
[ "BSL-1.0" ]
permissive
Practical/practicomp
ce3a2188778302f551609ae4e2aa5375d2d8ff73
dc223ceb2ffda0aa341f1915a744220edfa1a0b2
refs/heads/master
2022-08-23T08:22:15.242109
2022-08-03T20:55:03
2022-08-03T20:55:03
154,870,710
7
0
null
null
null
null
UTF-8
C++
false
false
7,868
h
code_gen.h
/* This file is part of the Practical programming langauge. https://github.com/Practical/practical-sa * * To the extent header files enjoy copyright protection, this file is file is copyright (C) 2018-2019 by its authors * You can see the file's authors in the AUTHORS file in the project's home repository. * * This is available under the Boost license. The license's text is available under the LICENSE file in the project's * home directory. */ #ifndef CODE_GEN_H #define CODE_GEN_H #include <nocopy.h> #include <practical/practical.h> #include <llvm-c/Core.h> #include <deque> #include <unordered_map> using namespace PracticalSemanticAnalyzer; class ModuleGenImpl; class JumpPointData : NoCopy { public: enum class Type { Label, Branch } type; private: std::string label; bool defined = false; public: explicit JumpPointData( Type type ); explicit JumpPointData( const std::string &label ) : type(Type::Label), label( std::move(label) ) {} void definePoint() { assert( !defined ); defined = true; } const std::string &getLabel() const { return label; } }; struct BranchPointData { JumpPointId elsePointId, continuationPointId; LLVMBasicBlockRef elsePointBlock = nullptr, continuationPointBlock = nullptr; LLVMBasicBlockRef phiBlocks[2]; ExpressionId conditionValue, ifBlockValue, elseBlockValue; StaticType::CPtr type; }; class FunctionGenImpl : public FunctionGen, private NoCopy { ModuleGenImpl *module = nullptr; LLVMValueRef llvmFunction = nullptr; LLVMBasicBlockRef currentBlock = nullptr, nextBlock = nullptr; LLVMBuilderRef builder = nullptr; std::unordered_map< ExpressionId, LLVMValueRef > expressionValuesTable; std::unordered_map< JumpPointId, JumpPointData > jumpPointsTable; std::deque< BranchPointData > branchStack; public: FunctionGenImpl(ModuleGenImpl *module) : module(module) {} virtual ~FunctionGenImpl(); virtual void functionEnter( String name, StaticType::CPtr returnType, Slice<const ArgumentDeclaration> arguments, String file, const SourceLocation &location) override; virtual void functionLeave() override; virtual void returnValue(ExpressionId id) override; virtual void returnValue() override; virtual void conditionalBranch( ExpressionId id, StaticType::CPtr type, ExpressionId conditionExpression, JumpPointId elsePoint, JumpPointId continuationPoint ) override; virtual void setConditionClauseResult( ExpressionId id ) override; virtual void setJumpPoint(JumpPointId id, String name) override; virtual void jump(JumpPointId destination) override; virtual void setLiteral(ExpressionId id, LongEnoughInt value, StaticType::CPtr type) override; virtual void setLiteral(ExpressionId id, bool value) override; virtual void setLiteral(ExpressionId id, String value) override; virtual void setLiteralNull(ExpressionId id, StaticType::CPtr type) override; virtual void allocateStackVar(ExpressionId id, StaticType::CPtr type, String name) override; virtual void assign( ExpressionId lvalue, ExpressionId rvalue ) override; virtual void dereferencePointer( ExpressionId id, StaticType::CPtr type, ExpressionId addr ) override; virtual void truncateInteger( ExpressionId id, ExpressionId source, StaticType::CPtr sourceType, StaticType::CPtr destType ) override; virtual void changeIntegerSign( ExpressionId id, ExpressionId source, StaticType::CPtr sourceType, StaticType::CPtr destType ) override; virtual void expandIntegerSigned( ExpressionId id, ExpressionId source, StaticType::CPtr sourceType, StaticType::CPtr destType ) override; virtual void expandIntegerUnsigned( ExpressionId id, ExpressionId source, StaticType::CPtr sourceType, StaticType::CPtr destType ) override; virtual void callFunctionDirect( ExpressionId id, String name, Slice<const ExpressionId> arguments, StaticType::CPtr returnType ) override; virtual void binaryOperatorPlusUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void binaryOperatorPlusSigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void binaryOperatorMinusUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void binaryOperatorMinusSigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void binaryOperatorMultiplyUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void binaryOperatorMultiplySigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void binaryOperatorDivideUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorEquals( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorNotEquals( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorLessThanUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorLessThanSigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorLessThanOrEqualsUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorLessThanOrEqualsSigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorGreaterThanUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorGreaterThanSigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorGreaterThanOrEqualsUnsigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorGreaterThanOrEqualsSigned( ExpressionId id, ExpressionId left, ExpressionId right, StaticType::CPtr resultType ) override; virtual void operatorLogicalNot( ExpressionId id, ExpressionId argument ) override; private: LLVMValueRef lookupExpression( ExpressionId id ) const; void addExpression( ExpressionId id, LLVMValueRef value ); LLVMBasicBlockRef addBlock( const std::string &label = "" ); void setCurrentBlock( LLVMBasicBlockRef newCurrentBlock ); }; class ModuleGenImpl : public ModuleGen, private NoCopy { LLVMModuleRef llvmModule = nullptr; public: virtual ~ModuleGenImpl() { LLVMDisposeModule(llvmModule); } LLVMModuleRef getLLVMModule() { return llvmModule; } virtual void moduleEnter( ModuleId id, String name, String file, size_t line, size_t col) override; virtual void moduleLeave(ModuleId id) override; virtual void declareIdentifier(String name, String mangledName, StaticType::CPtr type) override; virtual void declareStruct(StaticType::CPtr structType) override; virtual void defineStruct(StaticType::CPtr strct) override; virtual std::shared_ptr<FunctionGen> handleFunction() override; void dump(); }; #endif // CODE_GEN_H
665c574738fb0117742002c31a550836dd29415d
9f6e1ca0c865372b901073e8b619e1e3231daa3b
/src/ServerClientProxy.cpp
e66d051b97de1989adfa65a49950bfa08258a9d9
[ "MIT" ]
permissive
alarrosa14/senderoServer
efd3be719278fdcdbdbf1338322bc96b63c9ad54
fb81c43b3f0ef3b8ef8fbbce6fdd2d413b4c9542
refs/heads/linux
2021-01-17T19:22:07.958046
2016-11-26T00:09:39
2016-11-26T00:09:39
37,101,330
1
0
null
2016-11-26T00:09:39
2015-06-09T00:49:33
C++
UTF-8
C++
false
false
21,455
cpp
ServerClientProxy.cpp
#include "ServerClientProxy.h" ServerClientProxy::ServerClientProxy(void) { } ServerClientProxy::ServerClientProxy(int iTCPPort, int iUDPPort, int iId, string iName, bool iEnabled, bool iUsesServer, float iblendFactor, int iProtocolType, int pixelQty) { this->TCPPort=iTCPPort; this->UDPPort=iUDPPort; this->id=iId; this->name=iName; this->enabled=iEnabled; this->firstFrameReceived = false; this->framesMissed = 0; this->usesServer=iUsesServer; this->blendFactor=iblendFactor; this->quadric = gluNewQuadric(); this->protocolType=iProtocolType; this->parcialFrame = 0; this->buildingParcialFrame=false; this->intBinaryBuffIndex=0; // guarda la cantidad de elementos en el array this->fps = 24; this->newFps = 24; this->sequence=65535; this->waitingForErrorAnswer=false; this->errorQty=0; this->errorWindow=10000; this->drawEnabled=true; this->pixelQuantity = pixelQty; //create displaylist for spheres this->displayList = glGenLists(1); glNewList(this->displayList, GL_COMPILE); gluSphere(quadric, 0.5, 3, 3); // esta es la posta glEndList(); } ServerClientProxy::~ServerClientProxy(void) { cout << "ASLKDASKDJASDK ADJASK D" << endl; if (this->usesServer) this->TCP.close(); this->UDP.Close(); vector<Pixel*>::iterator it = this->pixelsFast.begin(); while (it != this->pixelsFast.end()) { Pixel* px = *it; delete px; it++; } } int ServerClientProxy::getTCPPort() { if (!usesServer) return NULL; return this->TCPPort; } int ServerClientProxy::getUDPPort() { return this->UDPPort; } int ServerClientProxy::getId() { return this->id; } string ServerClientProxy::getName() { return this->name; } float ServerClientProxy::getBlendFactor() { lock(); float retVal=this->blendFactor; unlock(); return retVal; } bool ServerClientProxy::isEnabled() { bool retVal=false; lock(); retVal=this->enabled; unlock(); return retVal; } void ServerClientProxy::setState(bool newState) { lock(); this->enabled=newState; unlock(); } void ServerClientProxy::setBlendFactor(float newBlend){ lock(); this->blendFactor=newBlend; unlock(); } void ServerClientProxy::setNewFPS(int iFps){ lock(); this->newFps=iFps; unlock(); } DTClient* ServerClientProxy::getClientStatus() { lock(); bool iEnabled = this->enabled; float iBlend = this->blendFactor; unlock(); return new DTClient(this->id,this->name,this->TCPPort,"",iEnabled, iBlend); } void ServerClientProxy::startListening() { if (this->usesServer) this->TCP.setup(this->TCPPort); UDP.Create(); UDP.Bind(this->UDPPort); UDP.SetNonBlocking(true); } void ServerClientProxy::listenTCP(){ string message; int clientCode=0; int numCli = this->TCP.getNumClients(); if (this->TCP.getNumClients()>0){ //solo se toma el primer cliente conectado. for (int i=0; i<TCP.getNumClients(); i++){ if (TCP.isClientConnected(i)){ message = TCP.receive(i); clientCode=i; //TCP.TCPServer. //break; } //else{ //TCP.disconnectClient(i); //TCP.close(); //TCP.setup(this->TCPPort); //} } if(message.length() > 0){ ofxXmlSettings XML; XML.loadFromBuffer(message); TiXmlElement* myMessage=XML.doc.RootElement(); if (myMessage){ if (myMessage->ValueStr() == "ConfigurationRequest" ){ ofLogNotice("Configuration request received"); DTFrame* confFrame = this->buildFrameToTransmit(); if (confFrame!=0) { string confMessage = confFrame->toXML(); configure("<ServerInfo clientID='" + ofToString(this->id) + "' UDPPort='" + ofToString(this->UDPPort) + "'>"+ confMessage + "</ServerInfo>", clientCode); delete confFrame; } } else{ if (myMessage->ValueStr() == "ErrorACK" ){ if (this->waitingForErrorAnswer){ string sequenceName = "sequence"; if (myMessage->Attribute(sequenceName.c_str())){ int messageSequence = ofToInt(myMessage->Attribute("sequence")); messageSequence-=1; if (messageSequence<0){ messageSequence=65535; } if ((messageSequence)==this->sequence){ this->waitingForErrorAnswer=false; } } } } } } } } } DTFrame* ServerClientProxy::getFrame(){ DTFrame* receivedFrame = 0; lock(); if ((this->framesBuffer.size()>0)&&this->enabled){ receivedFrame=framesBuffer[0]; vector<DTFrame*>::iterator it = this->framesBuffer.begin(); this->framesBuffer.erase(it); } unlock(); return receivedFrame; } void ServerClientProxy::retrieveFrames(){ //proces UDP input and stores it in framesBuffer DTFrame* receivedFrame = NULL; if (!this->waitingForErrorAnswer){ do{ if (this->protocolType==1){ //text receivedFrame = getFrameTextProtocol(); } else{ receivedFrame = getFrameBinaryProtocol(); } if (receivedFrame!=NULL){ DTFrame* buffFrameToSpare=NULL; lock(); if (this->framesBuffer.size()>MAX_FRAMES_STORED){ //should eliminate the first frame in the vector and release the memory. //this is because we dont wat the application to be storing too many frames. buffFrameToSpare=framesBuffer[0]; vector<DTFrame*>::iterator it = this->framesBuffer.begin(); this->framesBuffer.erase(it); delete buffFrameToSpare; } this->framesBuffer.push_back(receivedFrame); unlock(); } }while (receivedFrame!=NULL); } else { //si no lleg:o la respuesta, limpio el buffer UDP char buff[BUFFLEN]; int receivedBytes = UDP.Receive(buff,BUFFLEN); while (receivedBytes>0){ receivedBytes = UDP.Receive(buff,BUFFLEN); } } } DTFrame* ServerClientProxy::getFrameBinaryProtocol(){ char buff[BUFFLEN]; int receivedBytes = UDP.Receive(buff,BUFFLEN); //copio la lectura en el buffer principal if (receivedBytes>0){ this->framesMissed = 0; if((this->intBinaryBuffIndex + receivedBytes)<BUFFLEN){ memcpy(&(this->binaryBuffer)+this->intBinaryBuffIndex,&buff,receivedBytes); //aumento el index del buffer this->intBinaryBuffIndex += receivedBytes; } } else { // Si 60 veces lee del buffer y está vacío => "doy por muerto" al cliente // de esta forma puedo volver a levantarlo y resetear el numero de secuencia esperado. if (++this->framesMissed >= 60) this->firstFrameReceived = false; } //Cuando hay OVERFLOW, se pierden paquetes--> se da el mismo tratamiento que frente a un error--> se resincroniza mandando mensaje de error // intento parsear el primer paquete que figura en el buffer principal if (this->intBinaryBuffIndex>18){ //tengo informacion en el buffer //el cabezal del paquete tiene 18 bytes //obtengo el largo del contenido de data u_int8_t hi = this->binaryBuffer[15]; u_int8_t lo = this->binaryBuffer[16]; int size = (hi << 8) + lo; bool error=false; if(this->intBinaryBuffIndex >= (18+size)){ //tengo todo el paquete u_int8_t seqIdHi = this->binaryBuffer[9]; u_int8_t seqIdLo = this->binaryBuffer[10]; unsigned short sequence= (seqIdHi << 8) + seqIdLo; if (!this->firstFrameReceived) { if (!this->usesServer) this->sequence = (sequence - 1) % 65535; this->firstFrameReceived = true; } u_int8_t minIdHi = this->binaryBuffer[11]; u_int8_t minIdLo = this->binaryBuffer[12]; unsigned short minId = (minIdHi << 8) + minIdLo; u_int8_t maxIdHi = this->binaryBuffer[13]; u_int8_t maxIdLo = this->binaryBuffer[14]; unsigned short maxId= (maxIdHi << 8) + maxIdLo; unsigned short finished = this->binaryBuffer[17]; int nextPacketSequence = this->sequence + 1; if (nextPacketSequence>65535){ nextPacketSequence=0; } if (nextPacketSequence==sequence){ if (this->parcialFrame!=0){ //continuo construyendo el frame int cont = 0; for (int q=0; q<size; q+=3){ u_int8_t cR= this->binaryBuffer[18 + q]; u_int8_t cG= this->binaryBuffer[18 + q + 1]; u_int8_t cB= this->binaryBuffer[18 + q + 2]; float R = (float) cR; float G = (float) cG; float B = (float) cB; ofVec3f dummyFront(0,0,0); ofVec3f dummyUp(0,0,0); //we pass 0 as ledTypeId since is dummy information DTPixel* newPixel = new DTPixel(minId+cont, R, G, B, 255, 0, 0, 0, dummyFront, dummyUp, "dummy",0); this->parcialFrame->addPixel(newPixel); cont++; } } else{ vector<DTPixel*>* newPixels = new vector<DTPixel*>; cl_float* pixelArray = new cl_float[this->pixelQuantity * 4]; int cont = 0; for (int q=0; q<size; q+=3){ u_int8_t cR= this->binaryBuffer[18 + q]; u_int8_t cG= this->binaryBuffer[18 + q + 1]; u_int8_t cB= this->binaryBuffer[18 + q + 2]; float R = (float) cR; float G = (float) cG; float B = (float) cB; ofVec3f dummyFront(0,0,0); ofVec3f dummyUp(0,0,0); //we pass 0 as ledTypeId since is dummy information DTPixel* newPixel = new DTPixel(minId+cont, R, G, B, 255, 0, 0, 0, dummyFront, dummyUp, "dummy",0); newPixels->push_back(newPixel); pixelArray[((minId+cont)*4)]=(cl_float)R; pixelArray[((minId+cont)*4)+1]=(cl_float)G; pixelArray[((minId+cont)*4)+2]=(cl_float)B; pixelArray[((minId+cont)*4)+3]=255.0f; cont++; } this->parcialFrame= new DTFrame(0, newPixels, pixelArray, this->pixelQuantity, sequence); } this->sequence=nextPacketSequence; } else{ //error purgo el frame error=true; this->errorQty+=1; if (this->parcialFrame!=0){ delete this->parcialFrame; } this->parcialFrame=0; //continuo en el proximo frame a leer desde el nuevo sequence. pueden generarse frames no completos y mezclados //debo purgar todo lo recibido, y enviar mensage de esera y retransmision this->sendErrorMessage(this->fps,true,this->sequence); while (receivedBytes>0){ //limpio el buffer de UDP receivedBytes = UDP.Receive(buff,BUFFLEN); } //limpio el buffer recibido for(int i=0; i<BUFFLEN;i++){ this->binaryBuffer[i]=0; this->intBinaryBuffIndex=0; } } if(!error){ //elimino la informacion procesada del buffer clearBinaryBuffer(size); //verifico si el paquete tiene marca de fin de frame if(this->parcialFrame!=0){ if (finished!=0){ //paquete terminado, retorno el dataFrame DTFrame* returningFrame = this->parcialFrame; this->parcialFrame=0; this->updatePixelsFromDTFrame(returningFrame); this->errorWindow-=1; if(this->errorWindow<0){ this->errorQty=0; this->errorWindow=10000; } return returningFrame; } } } } } return 0; } void ServerClientProxy::update(){ float ifps=0.0f; lock(); ifps=this->newFps; unlock(); if (this->fps!=ifps){ sendErrorMessage(ifps,false,this->sequence); this->fps=ifps; } retrieveFrames(); } void ServerClientProxy::sendErrorMessage(int messageFps,bool isError,int lastReceivedSequence){ string message= "<?xml version=\"1.0\" ?><ServerMessage fps='" + ofToString(messageFps) + "' messageError='" + ofToString(isError) + "' lastSequenceNumber='" + ofToString(lastReceivedSequence) + "'></ServerMessage>"; if (this->TCP.getNumClients()>0){ //solo se toma el primer cliente. for (int i=0; i<TCP.getNumClients(); i++){ if (TCP.isClientConnected(i)){ bool result = TCP.send(i, message); if(isError){ if (result){ this->waitingForErrorAnswer=true; } } } } } } void ServerClientProxy::synchronizeSpeeds(){ if (this->errorQty>=10){ this->fps-=1; lock(); this->newFps=this->fps; unlock(); this->errorQty=0; this->errorWindow=10000; if (this->fps<10){ this->fps=10; } sendErrorMessage(this->fps,false,this->sequence); } } void ServerClientProxy::clearBinaryBuffer(int size){ int totalSize = 18 + size; //header + data int bufferSwapIndex = 0; for (int i = totalSize - 1; i<(BUFFLEN-1); i++){ this->binaryBuffer[bufferSwapIndex] = this->binaryBuffer[i]; bufferSwapIndex++; } this->intBinaryBuffIndex = this->intBinaryBuffIndex - totalSize; } DTFrame* ServerClientProxy::getFrameTextProtocol(){ DTFrame* receivedFrame = 0; char buff[BUFFLEN]; int receivedBytes = UDP.Receive(buff,BUFFLEN); if (receivedBytes>0){ for (int i=0; i<receivedBytes; i++){ this->recivedBuffer += buff[i]; } } string message = getMessage(); if(message.compare("")!=0){ receivedFrame = new DTFrame(message); this->updatePixelsFromDTFrame(receivedFrame); if (receivedFrame->getClientID() == -1){ delete receivedFrame; receivedFrame = 0; } } return receivedFrame; } void ServerClientProxy::updatePixelsFromDTFrame(DTFrame* frame){ vector<DTPixel*>* newPixels = frame->getPixels(); vector<DTPixel*>::iterator it = newPixels->begin(); int counter=0; while (it != newPixels->end()) { DTPixel* newPixel= *it; //pixels must be ordered < Pixel* localPixel = this->pixelsFast[counter]; localPixel->blendRGBA(newPixel->getR(),newPixel->getG(),newPixel->getB(),newPixel->getA(),1); it++; counter++; } } string ServerClientProxy::getMessage(){ size_t found; string terminator = "[/UDP]"; found=this->recivedBuffer.find(terminator); if(found!=string::npos){ string message = this->recivedBuffer.substr(0,found); string auxbuff = this->recivedBuffer.substr(found+6,this->recivedBuffer.length()); this->recivedBuffer = auxbuff; return message; } return ""; } void ServerClientProxy::configure(string frameData, int clientCode) { int amountOfSends = frameData.length()/8000; if (this->TCP.getNumClients()>0){ //solo se toma el primer cliente. for (int i=0; i<TCP.getNumClients(); i++){ if (TCP.isClientConnected(clientCode)){ bool result = TCP.send(clientCode, frameData); for (int sends= 0; sends<amountOfSends; sends++){ usleep(3);// so that the message fragments can be sent result = TCP.send(clientCode, ""); } } } } } void ServerClientProxy::addPixel(Pixel* px) { int id = px->getId(); //this->pixels.insert(pair<int,Pixel*> (id,px)); this->pixelsFast.push_back(px); } void ServerClientProxy::threadedFunction(){ startListening(); while(isThreadRunning()) { this->update(); if (this->usesServer) { this->listenTCP(); this->synchronizeSpeeds(); } sleep(25); } TCP.close(); } DTFrame* ServerClientProxy::buildFrameToTransmit(){ vector<Pixel*>::iterator it; it=this->pixelsFast.begin(); vector<DTPixel*>* dtVector = new vector<DTPixel*>(); int size=this->pixelsFast.size(); cl_float* newPixelArray = new cl_float[size * 4]; int cont=0; while (it != this->pixelsFast.end()) { Pixel* px = *it; int pId = px->getId(); float pR = px->getR(); float pG = px->getG(); float pB = px->getB(); float pA = px->getA(); DTPixel * pixelForNewFrame= px->getDTPixel(); dtVector->push_back(pixelForNewFrame); newPixelArray[(cont*4)] = (cl_float)pR; newPixelArray[(cont*4)+1] = (cl_float)pG; newPixelArray[(cont*4)+2] = (cl_float)pB; newPixelArray[(cont*4)+3] = (cl_float)pA; cont++; it++; } return new DTFrame(0, dtVector, newPixelArray, this->pixelsFast.size(), 0); } void ServerClientProxy::draw(float x, float y, float w, float h){ //not used anymore since Clients do not render on the server UI if(drawEnabled){ glViewport(x, ofGetHeight()-y-h, w-1, h-1); // all the matrix setup is copied from the ofGraphics.cpp::void ofSetupScreen() method. float halfFov, theTan, screenFov, aspect; screenFov = 60.0f; float eyeX = (float)w / 2.0; float eyeY = (float)h / 2.0; halfFov = PI * screenFov / 360.0; theTan = tanf(halfFov); float dist = eyeY / theTan; float nearDist = dist / 10.0; // near / far clip plane float farDist = dist * 10.0; aspect = (float)w/(float)h; glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(screenFov, aspect, nearDist, farDist); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(eyeX, eyeY, dist, eyeX, eyeY, 0.0, 0.0, 1.0, 0.0); glClear(GL_DEPTH_BUFFER_BIT); glScalef(1, -1, 1); // invert Y axis so increasing Y goes down. glTranslatef(10, -y-h+10, 0); // shift origin up to upper-left corner. // draw the pixels //ofTranslate(translation.x, translation.y, translation.z); ofTranslate(centroid.x, centroid.y, centroid.z); ofRotateX(this->rotX); ofRotateZ(this->rotY); ofTranslate(-centroid.x, -centroid.y, -centroid.z); glScalef(scale, scale, scale); vector<Pixel*>::iterator it = this->pixelsFast.begin(); while (it!=this->pixelsFast.end()) { Pixel* px = *it; ofVec3f position = px->getPosition(); glPushMatrix(); glTranslatef(position.x, position.y, position.z); ofSetColor(px->getR(),px->getG(), px->getB()); glCallList(this->displayList); glPopMatrix(); it++; } // reset viewport back to main screen glFlush(); } }
b3cb6746124e76ff90670fe2cbf6f66c0c86ae8a
4c3d7536a710610cb850da366f386cdbcfaf9717
/DynamicProgramming/Knapsack Problem/main.cpp
a6eaa8c8b8f2a8c9fc495bf455118af2a45cd6df
[]
no_license
anishanainani/workspace-Cplusplus
2b8270807c9858592965520f855178f3ead15d37
c02f500b76c685171524b39f9e7b51339cb0a7f5
refs/heads/master
2016-08-12T04:54:59.878211
2016-01-03T00:50:09
2016-01-03T00:50:09
48,928,876
0
0
null
null
null
null
UTF-8
C++
false
false
1,992
cpp
main.cpp
/* * main.cpp * * Created on: Feb 7, 2015 * Author: Komani */ #include<iostream> #include<vector> using namespace std; void Knapsack(vector<int>& weights, vector<int>& values, int knapsackWeight){ vector< vector<int> > matrix, keep; //matrices with items as rows and weights as columns vector<int> weightsInKnapsack; //rows of matrix int numberOfItems = weights.size(); //Initializing matrix weightsInKnapsack.assign(knapsackWeight+1, 0); // assigning a rows with zeros matrix.assign(numberOfItems+1, weightsInKnapsack); //assigning rows to the matrix keep.assign(numberOfItems+1, weightsInKnapsack); for(int i = 1; i <= numberOfItems; ++i){ for(int j = 1; j <= knapsackWeight; ++j){ int temp; if((j-weights[i]) < 0) { temp = 0; } else { temp = matrix[i-1][j-weights[i]] + values[i]; } if(temp>matrix[i-1][j]){ matrix[i][j] = temp; keep[i][j] = 1; } else { matrix[i][j] = matrix[i-1][j]; keep[i][j] = 0; } } } if(matrix[numberOfItems][knapsackWeight] != knapsackWeight){ cout<<"No result found."<<endl; } else { cout<<"Total Value "<<matrix[numberOfItems][knapsackWeight]<<endl; cout<<"Items used : "<<endl; //Tracking the items used from keep matrix int weight = knapsackWeight; for(int item = numberOfItems; item > 0; --item){ if(keep[item][weight] == 1){ weight-=weights[item]; cout<<"Item "<<item<<" Value "<<values[item]<<endl; } } } } void subsetSum(vector<int>& input, int container){ Knapsack(input, input, container); }; int main(){ /* int w[] = {0,3,2,1}; vector<int> weights(w, w+4); int v[] = {0,5,3,4}; vector<int> values(v, v+4); int knapsackWeight = 5; Knapsack(weights, values, knapsackWeight); */ int numbers[] = {0,2,4,7,9}; //element at index 0 not used int length = sizeof(numbers)/sizeof(numbers[0]); vector<int> inputArray(numbers, numbers+length); subsetSum(inputArray, 15); return 0; }
c6edb60ca0d44df8ae0605525cb20137b15bb1f3
04276306714223096567cf2587dc028f8afc1ce2
/CompilerCreationTool/Grammar/IGrammarProduction.h
6b8dcda60c8ff21025bb3dc261fd6e5914f36829
[ "MIT" ]
permissive
vstdio/CompilerCreationTool
5523eb2a74b3d41f31bf7a69599fb9b2112ae9c9
03500f95e9c90f23685457124842d3feda2e821f
refs/heads/master
2022-02-09T15:12:24.921436
2019-06-09T18:05:05
2019-06-09T18:05:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
541
h
IGrammarProduction.h
#pragma once #include "IGrammarSymbol.h" namespace grammarlib { class IGrammarProduction { public: virtual ~IGrammarProduction() = default; virtual const std::string& GetLeftPart() const = 0; virtual bool EndsWith(GrammarSymbolType type) const = 0; virtual bool IsLastSymbol(size_t index) const = 0; virtual size_t GetSymbolsCount() const = 0; virtual const IGrammarSymbol& GetSymbol(size_t index) const = 0; virtual const IGrammarSymbol& GetFrontSymbol() const = 0; virtual const IGrammarSymbol& GetBackSymbol() const = 0; }; }
86249cec28297147c0a2181a3402ccda85868cf3
31ac07ecd9225639bee0d08d00f037bd511e9552
/externals/OCCTLib/inc/Visual3d_SetOfLight.hxx
54eb708f85bb82144755411135b3aa5bb531e0a7
[]
no_license
litao1009/SimpleRoom
4520e0034e4f90b81b922657b27f201842e68e8e
287de738c10b86ff8f61b15e3b8afdfedbcb2211
refs/heads/master
2021-01-20T19:56:39.507899
2016-07-29T08:01:57
2016-07-29T08:01:57
64,462,604
1
0
null
null
null
null
UTF-8
C++
false
false
4,660
hxx
Visual3d_SetOfLight.hxx
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Visual3d_SetOfLight_HeaderFile #define _Visual3d_SetOfLight_HeaderFile #ifndef _Standard_HeaderFile #include <Standard.hxx> #endif #ifndef _Standard_DefineAlloc_HeaderFile #include <Standard_DefineAlloc.hxx> #endif #ifndef _Standard_Macro_HeaderFile #include <Standard_Macro.hxx> #endif #ifndef _Visual3d_SetListOfSetOfLight_HeaderFile #include <Visual3d_SetListOfSetOfLight.hxx> #endif #ifndef _Handle_Visual3d_Light_HeaderFile #include <Handle_Visual3d_Light.hxx> #endif #ifndef _Handle_Visual3d_ListNodeOfSetListOfSetOfLight_HeaderFile #include <Handle_Visual3d_ListNodeOfSetListOfSetOfLight.hxx> #endif #ifndef _Standard_Integer_HeaderFile #include <Standard_Integer.hxx> #endif #ifndef _Standard_Boolean_HeaderFile #include <Standard_Boolean.hxx> #endif class Standard_NoSuchObject; class Visual3d_SetIteratorOfSetOfLight; class Visual3d_Light; class Visual3d_SetListOfSetOfLight; class Visual3d_ListNodeOfSetListOfSetOfLight; class Visual3d_ListIteratorOfSetListOfSetOfLight; class Visual3d_SetOfLight { public: DEFINE_STANDARD_ALLOC Standard_EXPORT Visual3d_SetOfLight(); Standard_Integer Extent() const; Standard_Boolean IsEmpty() const; void Clear() ; Standard_EXPORT Standard_Boolean Add(const Handle(Visual3d_Light)& T) ; Standard_EXPORT Standard_Boolean Remove(const Handle(Visual3d_Light)& T) ; Standard_EXPORT void Union(const Visual3d_SetOfLight& B) ; Standard_EXPORT void Intersection(const Visual3d_SetOfLight& B) ; Standard_EXPORT void Difference(const Visual3d_SetOfLight& B) ; Standard_EXPORT Standard_Boolean Contains(const Handle(Visual3d_Light)& T) const; Standard_EXPORT Standard_Boolean IsASubset(const Visual3d_SetOfLight& S) const; Standard_EXPORT Standard_Boolean IsAProperSubset(const Visual3d_SetOfLight& S) const; friend class Visual3d_SetIteratorOfSetOfLight; protected: private: Standard_EXPORT Visual3d_SetOfLight(const Visual3d_SetOfLight& Other); Visual3d_SetListOfSetOfLight myItems; }; #define Item Handle_Visual3d_Light #define Item_hxx <Visual3d_Light.hxx> #define TCollection_SetList Visual3d_SetListOfSetOfLight #define TCollection_SetList_hxx <Visual3d_SetListOfSetOfLight.hxx> #define TCollection_ListNodeOfSetList Visual3d_ListNodeOfSetListOfSetOfLight #define TCollection_ListNodeOfSetList_hxx <Visual3d_ListNodeOfSetListOfSetOfLight.hxx> #define TCollection_ListIteratorOfSetList Visual3d_ListIteratorOfSetListOfSetOfLight #define TCollection_ListIteratorOfSetList_hxx <Visual3d_ListIteratorOfSetListOfSetOfLight.hxx> #define TCollection_ListNodeOfSetList Visual3d_ListNodeOfSetListOfSetOfLight #define TCollection_ListNodeOfSetList_hxx <Visual3d_ListNodeOfSetListOfSetOfLight.hxx> #define TCollection_ListIteratorOfSetList Visual3d_ListIteratorOfSetListOfSetOfLight #define TCollection_ListIteratorOfSetList_hxx <Visual3d_ListIteratorOfSetListOfSetOfLight.hxx> #define TCollection_SetIterator Visual3d_SetIteratorOfSetOfLight #define TCollection_SetIterator_hxx <Visual3d_SetIteratorOfSetOfLight.hxx> #define Handle_TCollection_ListNodeOfSetList Handle_Visual3d_ListNodeOfSetListOfSetOfLight #define TCollection_ListNodeOfSetList_Type_() Visual3d_ListNodeOfSetListOfSetOfLight_Type_() #define Handle_TCollection_ListNodeOfSetList Handle_Visual3d_ListNodeOfSetListOfSetOfLight #define TCollection_ListNodeOfSetList_Type_() Visual3d_ListNodeOfSetListOfSetOfLight_Type_() #define TCollection_Set Visual3d_SetOfLight #define TCollection_Set_hxx <Visual3d_SetOfLight.hxx> #include <TCollection_Set.lxx> #undef Item #undef Item_hxx #undef TCollection_SetList #undef TCollection_SetList_hxx #undef TCollection_ListNodeOfSetList #undef TCollection_ListNodeOfSetList_hxx #undef TCollection_ListIteratorOfSetList #undef TCollection_ListIteratorOfSetList_hxx #undef TCollection_ListNodeOfSetList #undef TCollection_ListNodeOfSetList_hxx #undef TCollection_ListIteratorOfSetList #undef TCollection_ListIteratorOfSetList_hxx #undef TCollection_SetIterator #undef TCollection_SetIterator_hxx #undef Handle_TCollection_ListNodeOfSetList #undef TCollection_ListNodeOfSetList_Type_ #undef Handle_TCollection_ListNodeOfSetList #undef TCollection_ListNodeOfSetList_Type_ #undef TCollection_Set #undef TCollection_Set_hxx // other Inline functions and methods (like "C++: function call" methods) #endif
24a02dd7d88a31b7e45c9082829173b716136c2f
5acf036ed7883db02902f849f7039fd1073aa7f6
/10130 - SuperSale/10130 - SuperSale.cpp
054000ec685fe6847a2aaa16ca7e1382873f3dfa
[]
no_license
Nashar-Ahmed/UVA-Problems
e0cbb1b54e49ddcdc1f9ac183ac6b8c5e15c7eb2
c487ec66bac2caabaf204b0fab2cbea0ba8715db
refs/heads/master
2020-03-28T20:27:50.559548
2018-09-17T06:21:16
2018-09-17T06:21:16
149,073,181
0
0
null
null
null
null
UTF-8
C++
false
false
839
cpp
10130 - SuperSale.cpp
#include<bits/stdc++.h> using namespace std; #define mem(x,y) memset(x,y,sizeof(x)); int cost[1001]; int weight[1001]; int dp[1004][1004]; int cap; int n; int func(int i,int w) { if(i == n+1) return 0; if(dp[i][w]!= -1) return dp[i][w]; int profit1=0,profit2=0; if(w + weight[i] <= cap) profit1 = cost[i] + func(i+1, w+weight[i]); profit2=func(i+1, w); dp[i][w] = max(profit1 , profit2); return dp[i][w]; } int main() { int test; cin>>test; while(test--) { int i; cin>>n; for(i=1; i<=n; i++) cin>>cost[i]>>weight[i]; int g,sum=0; cin>>g; for(i=1; i<=g; i++) { mem(dp,-1); cin>>cap; sum+=func(1,0); } cout<<sum<<endl; } return 0; }
623f56ce87047f9454b56e681f477dc03d7c128a
c10eaf118abc5624106fb5a94cc3ed0edea6ec32
/src/main.cpp
c76c989ef85364125af321d163fad8a8466da106
[]
no_license
raydelto/grafos_ITLA
a9ce8630d4953c1e9dcde35bc4150e8bfd6e8d00
8428b451cb43fff22c418ef38e6a92f3e988b25c
refs/heads/master
2020-03-27T19:44:54.196713
2016-07-23T14:25:24
2016-07-23T14:25:24
64,018,857
1
1
null
null
null
null
UTF-8
C++
false
false
718
cpp
main.cpp
//============================================================================ // Name : Grafos.cpp // Author : Raydelto Hernandez // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; #include "Grafo.h" int main() { Vertice* a = new Vertice("A"); Vertice* b = new Vertice("B"); Vertice* c = new Vertice("C"); c-> agregarAdyacencia(b); b-> agregarAdyacencia(a); b-> agregarAdyacencia(c); Grafo* grafo = new Grafo(); grafo -> recorrer(c); cout << "La distancia entre A y C es de " << a -> getDistancia() << endl; return 0; }
20a969942dc512d88b84b35532e29c7297038eb2
5a5b70394be34760418b52724260608349720f2a
/EVA_Bead_2/Implementation/ImpTypes.h
e79df7e574c50b0ba1587b1453d4d930b1077f39
[]
no_license
BittnerBarnabas/MaciLaci
e3a47c7b726c796ba6570222bce9f38a57ff6bf1
ba8764fd97f4a4223560ad1b24ecceb0a5402b37
refs/heads/master
2016-09-01T06:05:08.116303
2016-04-11T15:29:51
2016-04-11T15:29:51
55,435,024
0
0
null
null
null
null
UTF-8
C++
false
false
1,014
h
ImpTypes.h
#pragma once #include <QVector> #include <QPair> #include <istream> namespace Implementation { /// Type of possible objects on the map enum class player_t { NoPlayer,MaciLaci, Tree, Hunter, InHunterRange, Food }; /// Type of possible moving directions enum class direction_t { UP, DOWN, LEFT, RIGHT }; using gameBoard_t = QVector<QVector<player_t>>; //!< Type of the gameboard using hunterIndex_t = QPair<QPair<int, int>, direction_t>; //!< Type of hunter indexing using playerIndex_t = QPair<int, int>; //!< Type of player indexing struct BoardRepresentation { gameBoard_t gameBoard; //!< Actual gameBoard object which holds the players on it QVector<hunterIndex_t> hunterPos; //!< Position of the hunters in the game playerIndex_t playerPos; //!< Position of player int boardSize; //!< Size of the gameBoard int hunterNumber; //!< Size of hunterPos int foodToEat; //!< Actual food left to be eaten }; std::istream& operator>> (std::istream& is, direction_t& dir); }
525dd70609b72d041941acb4410e5a63e6c579b3
26fab765811902f2d75da694eed687eca2121919
/code/tutorials/viewer/viewer.cpp
7d8755500c31402b6dd3eadfa85de1e995da8501
[ "Apache-2.0" ]
permissive
embree/embree-benchmark
236b00b0f03c466669e3b2591f2a47b38af08671
b4ea57d9ea24d6036795257c67a4b2b13757e9f3
refs/heads/master
2021-01-12T03:18:11.894210
2019-10-31T07:34:26
2019-10-31T07:34:26
81,297,588
4
2
null
null
null
null
UTF-8
C++
false
false
9,160
cpp
viewer.cpp
// ======================================================================== // // Copyright 2009-2015 Intel Corporation // // // // 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 "../common/tutorial/tutorial.h" #include "../common/tutorial/obj_loader.h" #include "../common/tutorial/xml_loader.h" #include "../common/image/image.h" namespace embree { /* name of the tutorial */ const char* tutorialName = "viewer"; /* configuration */ static std::string g_rtcore = ""; static size_t g_numThreads = 0; static std::string g_subdiv_mode = ""; /* output settings */ static size_t g_width = 512; static size_t g_height = 512; static bool g_fullscreen = false; static FileName outFilename = ""; static int g_skipBenchmarkFrames = 0; static int g_numBenchmarkFrames = 0; static bool g_interactive = true; static bool g_anim_mode = false; static bool g_loop_mode = false; static FileName keyframeList = ""; /* scene */ OBJScene g_obj_scene; static FileName filename = ""; static void parseCommandLine(Ref<ParseStream> cin, const FileName& path) { while (true) { std::string tag = cin->getString(); if (tag == "") return; /* parse command line parameters from a file */ else if (tag == "-c") { FileName file = path + cin->getFileName(); parseCommandLine(new ParseStream(new LineCommentFilter(file, "#")), file.path()); } /* load OBJ model*/ else if (tag == "-i") { filename = path + cin->getFileName(); } /* parse camera parameters */ else if (tag == "-vp") g_camera.from = cin->getVec3fa(); else if (tag == "-vi") g_camera.to = cin->getVec3fa(); else if (tag == "-vd") g_camera.to = g_camera.from + cin->getVec3fa(); else if (tag == "-vu") g_camera.up = cin->getVec3fa(); else if (tag == "-fov") g_camera.fov = cin->getFloat(); /* frame buffer size */ else if (tag == "-size") { g_width = cin->getInt(); g_height = cin->getInt(); } /* full screen mode */ else if (tag == "-fullscreen") g_fullscreen = true; /* output filename */ else if (tag == "-o") { outFilename = cin->getFileName(); g_interactive = false; } else if (tag == "-objlist") { keyframeList = cin->getFileName(); } /* subdivision mode */ else if (tag == "-cache") g_subdiv_mode = ",subdiv_accel=bvh4.subdivpatch1cached"; else if (tag == "-lazy") g_subdiv_mode = ",subdiv_accel=bvh4.grid.lazy"; else if (tag == "-pregenerate") g_subdiv_mode = ",subdiv_accel=bvh4.grid.eager"; else if (tag == "-loop") g_loop_mode = true; else if (tag == "-anim") g_anim_mode = true; /* number of frames to render in benchmark mode */ else if (tag == "-benchmark") { g_skipBenchmarkFrames = cin->getInt(); g_numBenchmarkFrames = cin->getInt(); g_interactive = false; } /* rtcore configuration */ else if (tag == "-rtcore") g_rtcore = cin->getString(); /* number of threads to use */ else if (tag == "-threads") g_numThreads = cin->getInt(); /* ambient light source */ else if (tag == "-ambientlight") { const Vec3fa L = cin->getVec3fa(); g_obj_scene.ambientLights.push_back(OBJScene::AmbientLight(L)); } /* point light source */ else if (tag == "-pointlight") { const Vec3fa P = cin->getVec3fa(); const Vec3fa I = cin->getVec3fa(); g_obj_scene.pointLights.push_back(OBJScene::PointLight(P,I)); } /* directional light source */ else if (tag == "-directionallight" || tag == "-dirlight") { const Vec3fa D = cin->getVec3fa(); const Vec3fa E = cin->getVec3fa(); g_obj_scene.directionalLights.push_back(OBJScene::DirectionalLight(D,E)); } /* distant light source */ else if (tag == "-distantlight") { const Vec3fa D = cin->getVec3fa(); const Vec3fa L = cin->getVec3fa(); const float halfAngle = cin->getFloat(); g_obj_scene.distantLights.push_back(OBJScene::DistantLight(D,L,halfAngle)); } /* skip unknown command line parameter */ else { std::cerr << "unknown command line parameter: " << tag << " "; while (cin->peek() != "" && cin->peek()[0] != '-') std::cerr << cin->getString() << " "; std::cerr << std::endl; } } } void renderBenchmark(const FileName& fileName) { resize(g_width,g_height); AffineSpace3fa pixel2world = g_camera.pixel2world(g_width,g_height); double dt = 0.0f; size_t numTotalFrames = g_skipBenchmarkFrames + g_numBenchmarkFrames; for (size_t i=0; i<numTotalFrames; i++) { double t0 = getSeconds(); render(0.0f,pixel2world.l.vx,pixel2world.l.vy,pixel2world.l.vz,pixel2world.p); double t1 = getSeconds(); std::cout << "frame [" << i << " / " << numTotalFrames << "] "; std::cout << 1.0/(t1-t0) << "fps "; if (i < g_skipBenchmarkFrames) std::cout << "(skipped)"; std::cout << std::endl; if (i >= g_skipBenchmarkFrames) dt += t1-t0; } std::cout << "frame [" << g_skipBenchmarkFrames << " - " << numTotalFrames << "] " << std::flush; std::cout << double(g_numBenchmarkFrames)/dt << "fps " << std::endl; std::cout << "BENCHMARK_RENDER " << double(g_numBenchmarkFrames)/dt << std::endl; } void renderToFile(const FileName& fileName) { resize(g_width,g_height); AffineSpace3fa pixel2world = g_camera.pixel2world(g_width,g_height); render(0.0f,pixel2world.l.vx,pixel2world.l.vy,pixel2world.l.vz,pixel2world.p); void* ptr = map(); Ref<Image> image = new Image4uc(g_width, g_height, (Col4uc*)ptr); storeImage(image, fileName); unmap(); cleanup(); } /* main function in embree namespace */ int main(int argc, char** argv) { /* for best performance set FTZ and DAZ flags in MXCSR control and status register */ _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); /* create stream for parsing */ Ref<ParseStream> stream = new ParseStream(new CommandLineStream(argc, argv)); /* parse command line */ parseCommandLine(stream, FileName()); /* load default scene if none specified */ if (filename.ext() == "") { FileName file = FileName::executableFolder() + FileName("models/cornell_box.ecs"); parseCommandLine(new ParseStream(new LineCommentFilter(file, "#")), file.path()); } /* configure number of threads */ if (g_numThreads) g_rtcore += ",threads=" + std::to_string((long long)g_numThreads); if (g_numBenchmarkFrames) g_rtcore += ",benchmark=1"; g_rtcore += g_subdiv_mode; /* load scene */ if (strlwr(filename.ext()) == std::string("obj")) { if (g_subdiv_mode != "") { std::cout << "enabling subdiv mode" << std::endl; loadOBJ(filename,one,g_obj_scene,true); } else loadOBJ(filename,one,g_obj_scene); } else if (strlwr(filename.ext()) == std::string("xml")) loadXML(filename,one,g_obj_scene); else if (filename.ext() != "") THROW_RUNTIME_ERROR("invalid scene type: "+strlwr(filename.ext())); /* initialize ray tracing core */ init(g_rtcore.c_str()); /* send model */ set_scene(&g_obj_scene); /* benchmark mode */ if (g_numBenchmarkFrames) renderBenchmark(outFilename); /* render to disk */ if (outFilename.str() != "") renderToFile(outFilename); /* interactive mode */ if (g_interactive) { initWindowState(argc,argv,tutorialName, g_width, g_height, g_fullscreen); enterWindowRunLoop(); } return 0; } } int main(int argc, char** argv) { try { return embree::main(argc, argv); } catch (const std::exception& e) { std::cout << "Error: " << e.what() << std::endl; return 1; } catch (...) { std::cout << "Error: unknown exception caught." << std::endl; return 1; } }
b7cc08ac9c4e21529d9b35606096c156d6cf7713
b7ba575e6d01b26bf2c4af46d2a8a7fa056f8939
/Algorithm Note.C++/pointer_minus.cpp
459d28e2d58b5382e1690f7c826ffacc234fa302
[]
no_license
ParadoxCN/C-Plus-Plus-Code
4fbe21104e9645a6172a764ca68e25df3439d496
5a68d46d4e1047360c3086ac4102940a4adebc50
refs/heads/master
2020-04-09T01:54:36.027638
2018-12-01T12:03:19
2018-12-01T12:03:19
159,921,893
0
0
null
null
null
null
UTF-8
C++
false
false
432
cpp
pointer_minus.cpp
//瀹炵幇鎸囬拡鍑忔硶 #include<stdio.h> int main() { int a[10] = {1, 4, 9, 16, 25, 36, 49}; int *p = a; int *q = &a[5]; printf("q=%d\n", q); printf("p=%d\n",p); printf("q-p=%p\n", q - p);//缂栬瘧鍣ㄤ笉鏀寔浠�%d鏄剧ず鎸囬拡鍦板潃锛屽簲閲囩敤%p return 0; } /* q=6422068 p=6422048 q-p=0000000000000005 //6422068-6422048=20锛宨nt涓�4涓瓧鑺傦紝20/4=5锛� */
3d3305618b178f0b140d55f901e4df52c96a682a
c652e6bc19cd29cb7126b7aa38cea919c22607d7
/ref/Holder.hpp
a9908038093b5734f43e0132282678b644597d80
[ "MIT" ]
permissive
asenac/refcpp
d328fbb547e007c2d1b9121a6fa03ae1acc2e683
6b1ab20e65b3e5159fb2c7dd3b351dcc047516cd
refs/heads/master
2016-09-06T18:08:53.063959
2014-12-07T11:20:30
2014-12-07T11:20:30
23,717,035
7
0
null
null
null
null
UTF-8
C++
false
false
1,487
hpp
Holder.hpp
#ifndef REF_HOLDER_HPP #define REF_HOLDER_HPP #include <memory> namespace ref { struct TypeDescriptor; struct Holder { /** * @brief Creates an invalid holder. */ Holder() : m_descriptor(nullptr) {} Holder(const Holder& h) : m_impl(h.m_impl), m_descriptor(h.m_descriptor) { } template <typename T> Holder(T* t, const TypeDescriptor* descriptor, bool release = false) : m_impl(new Impl<T>(t, release)), m_descriptor(descriptor) { } template <typename T> T* get() { return static_cast<Impl<T>*>(m_impl.get())->t; } const TypeDescriptor* descriptor() const { return m_descriptor; } bool isValid() const { return !!m_impl; } bool isContained() const { return isValid() && m_impl->isContained(); } protected: struct ImplBase { virtual bool isContained() const = 0; }; template <typename T> struct Impl : ImplBase { T* t; bool release; Impl(T* t_, bool release_) : t(t_), release(release_) {} ~Impl() { if (release) delete t; } bool isContained() const override { return release; } }; std::shared_ptr<ImplBase> m_impl; const TypeDescriptor* m_descriptor; }; } // namespace ref #endif // REF_HOLDER_HPP
be899b3df0b12d432e825fb42b4ba190635a3448
24250b9d14ba38849971cf1e65b09a55dbb65d65
/0722/monster.h
60d7e8df8751b9feb69c90bca0835c4c5e250723
[]
no_license
Czeslaw20/myTest1
775f342a40cebf63d5edc36c1882fec24e9bab55
07d2e2d45d0f37239c8c60138d87400b47a2238c
refs/heads/master
2022-12-04T19:49:52.553362
2020-08-30T02:37:45
2020-08-30T02:37:45
291,389,804
0
0
null
null
null
null
UTF-8
C++
false
false
401
h
monster.h
#pragma once #include<iostream> using namespace std; #include "hero.h" class Hero; class Monster { public: //有参构造 Monster(int monsterId); //怪物攻击函数 void Attack(Hero * hero); string monsterName;//怪物姓名 int monsterHp;//怪物血量 int monsterAtk;//怪物攻击力 int monsterDef;//怪物防御力 bool isFrozen;//是否被冰冻状态 };
4cc79c6d77c52a16b866e1dfdee840c8a1837e0b
c1dce744b8ccb279f41025ac0c3c1eac880918d4
/src/map.cpp
87ced970eadf12aa5a56ae57b359ed1b365bef55
[]
no_license
djuleAyo/RS001-zombie
003cb21890fdc2b7c9f8f26b001c0c4a320c326b
ff7bc9a3337773bfcb9bfc6871940ebc6807e511
refs/heads/master
2020-03-17T02:55:30.709471
2018-05-12T15:13:35
2018-05-12T15:13:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,163
cpp
map.cpp
#include "map.h" Map::Map(std::string seed, int visibility, worldCoords worldOrigin) : m_seed(seed), m_visibility(visibility), m_worldOrigin(worldOrigin) { //init memory origin m_memoryOrigin[0] = 0; m_memoryOrigin[1] = 0; m_memoryOrigin[2] = 0; //init m_data for(int x = 0; x < m_visibility; x++) { for(int y = 0; y < m_visibility; y++) { for(int z = 0; z < m_visibility; z++) { m_data[x][y][z] = Chunk(m_worldOrigin[0] + x, m_worldOrigin[1] + y, m_worldOrigin[2] + z); } } } //init verts and colors for(int x = 0; x < m_visibility; x++) { for(int y = 0; y < m_visibility; y++) { for(int z = 0; z < m_visibility; z++) { m_data[x][y][z].visibleBlocks(m_visibleFaces[x][y][z]); m_data[x][y][z].toVertArray(m_visibleFaces[x][y][z], m_verts[x][y][z], m_colors[x][y][z] ); } } } } void Map::draw(const Camera& c) const { c.look(); for(int x = 0; x < m_visibility; x++) { for(int y = 0; y < m_visibility; y++) { for(int z = 0; z < m_visibility; z++) { (m_data[x][y][z]).drawArrays(m_verts[x][y][z], m_colors[x][y][z]); } } } }
506ccaa084f5db470b6d3365b41a55f3c4b68146
ced632b0a81654ec9ea3f270e2e51d36170dd050
/src/fiducial_lib/Fiducials.cpp
251d12356b4658f1334975bd38c225304959d8da
[]
no_license
lian16thu/RoboCup
4a0b84f54a6253a1284e3922c54210bb8239087b
95dbd5753be3f0391176420ec2cb012d8fda59fe
refs/heads/master
2020-04-30T15:21:31.379146
2019-03-21T10:04:40
2019-03-21T10:04:40
176,918,206
0
0
null
null
null
null
UTF-8
C++
false
false
63,702
cpp
Fiducials.cpp
// Copyright (c) 2013-2014 by Wayne C. Gramlich. All rights reserved. #include <assert.h> #include <sys/time.h> #include <angles/angles.h> #include <opencv2/highgui/highgui_c.h> #include "CRC.hpp" #include "CV.hpp" #include "File.hpp" #include "FEC.hpp" #include "Fiducials.hpp" #include "String.hpp" #include "Location.hpp" // Introduction: // // This code body takes a camera image that contains one or more fiducial // tag images and computes an estimated location and orientation for the // image camera. This computation is done in conjunction with a map that // contains the best estimate of the locations of each of the fiducial tags. // In short: // // Image_Location = F(Image, Map) // // To further complicate things, in fact, the Map is updated as // side effect of computing the current location. In the literature, // this is call SLAM, for Simultaneous Localization And Mapping. // Thus, what is really going on is: // // (Image_Location, Map') = F(Image, Map) // // where Map' is the updated map. // // Despite the fact that the map is being updated, it best to treat the // localization computation different from the Map updating computation. // Thus, what is really going on is: // // Image_Location = F(Image, Map) // // Map' = G(Image, Map) // // where F is the localization function, and G is the map update function. // // The sections below are entitled: // // * Tag Geometry // * Coordinate Systems // * Map Organization // * Image Tags // * Localization Computation // * Fusing with Dead Reckoning // * Mapping into Robot Coordinates // * Coordinate Space Transforms // // Tag Geometry: // // A tag consists of a 12 x 12 matrix of bits that encodes 64-bits of // information in an 8 x 8 data matrix. The outermost square of the matrix // is set to zeros (white squares) and the next level in is 1's // (black squares). When viewed in an upright form printed on paper // it looks as follows (-- = zero, XX = one, ## = bit number): // // -- -- -- -- -- -- -- -- -- -- -- -- // -- XX XX XX XX XX XX XX XX XX XX -- // -- XX 56 57 58 59 60 61 62 63 XX -- // -- XX 48 49 50 51 52 53 54 55 XX -- // -- XX 40 41 42 43 44 45 45 47 XX -- // -- XX 32 33 34 35 36 37 38 39 XX -- // -- XX 24 25 26 27 28 29 30 31 XX -- // -- XX 16 17 18 19 20 21 22 23 XX -- // -- XX 08 09 10 11 12 13 14 15 XX -- // -- XX 00 01 02 03 04 05 06 07 XX -- // -- XX XX XX XX XX XX XX XX XX XX -- // -- -- -- -- -- -- -- -- -- -- -- -- // // Coordinate Systems: // // When it comes to performing the image analysis of a picture to // compute image camera location and twist there are three coordinate // systems to consider -- the floor, camera, and robot coordinate systems: // // - The floor coordinate system is a right handed cartesian // coordinate system where one point on the floor is the // origin. The X and Y axes are separated by a 90 degree // angle and X axis can be oriented to aligned with either a // building feature or an east-west line of latitude or // whatever the user chooses. Conceptually, the floor is // viewed from the top looking down. As long as all length // measurements are performed using the same units, the // choice of length unit does not actually matter (e.g. // meter, centimeter, millimeter, inch, foot, etc.) // // - The image coordinate system is another right handed cartesian // coordinate system that is used to locate the individual // pixels in the image. The image is one of the common image // format sizes (320 x 240, 640 x 480, etc.) For this system, // the origin is selected to be the lower left pixel of the // image. For 640 x 480 image, the lower left coordinate is // (0, 0) and the upper right pixel coordinate is (639, 479). // // While most computer imaging packages (e.g. OpenCV) typically // use a left-handed coordinate system where the origin is in // the upper left, we will apply a transformation that causes // the origin to be placed in the lower left. All distances are // measured in units of pixels. The reason for using a right // handed coordinate system is because trigonometric functions // are implicitly right-handed. // // - The robot coordinate system is another right handed cartesian // coordinate system where the origin is located in the center // between the two drive wheels. The X axis of the robot // coordinate system goes through the front of the robot. // Realistically, the robot coordinate system is not part // of the algorithms, instead this coordinate system is called // out just to point out that it is there. // // Map Organization: // // Conceptually there a bunch of square fiducial tags (hereafter called // just tags) scattered on the floor. (Yes, we know they are actually // on the ceiling, we'll deal with that detail later.) There is a map // that records for each tag, the following information in an ordered // quintuple: // // (mtid, mtx, mty, mttw, mtdiag) // // where: // // mtid (Map Tag IDentifier) is the tag identifier (a number between // 0 and 2^16-1), // mtx (Map Tag X) is the x coordinate of the tag center in // floor coordinates, // mty (Map Tag Y) is the y coordinate of the tag center in // floor coordinates, // mttw (Map Tag TWist) is the angle (twist) of the bottom // tag edge and the floor X axis, and // mtdiag (Map Tag DIAGonal) is the length of a tag diagonal // (both diagonals of a square have the same length) in // in floor coordinates. // // Eventually, the quintuple should probably be upgraded to 1) an // identifier, 2) an X/Y/Z location and 3) a W/X/Y/Z quaternion of // for the tag orientation. That will come later. For now we will // just use the quintuple. // // Conceptually, the floor is printed out on a large sheet of paper // with all tags present. The camera image is printed out on a piece // of translucent material (e.g. acetate) with the same dimensions // as the floor sheet. This translucent image is placed on the floor // sheet and moved around until the image tag(s) align with the // corresponding tag(s) on the floor sheet. The center of translucent // image is now sitting directly on top of the image location on the // floor sheet. The amount of "twist" on the image relate to the // floor coordinate system complete the location computation. // Hopefully, this mental image of what we are trying to accomplish // will help as you wade through the math below. // // Conceptually, the camera is going to be placed a fixed distance // above the floor and take an image of rectangular area of the floor. // For each tag in the image, the image processing algorithm // computes the following: // // (camx, camy, camtw) // // where: // // camx (CAMera X) is the camera center X coordinate in the // floor coordinate system, // camy (CAMera Y) is the camera center Y coordinate in the // floor coordinate system, and // camtw (CAMera TWist) is the angle (twist) of the rectangle bottom // tag edge with respect to the floor coordinate system X axis. // // If there are multiple tags present in the image, there will be // multiple (camx, camy, camtw) triples computed. These triples // should all be fairly close to one another. There is a final // fusion step that fuses them all together into a single result. // // Image Tags: // // In each image there may be zero, one or more visible tags. If // there are zero tags present, there is nothing to work with and // the camera location can not be computed. When there are one or // more tags, we tag detection algorithm computes the following // information: // // (tid, tc0, tc1, tc2, tc3) // // tid (Tag IDentifier) is the tag identifier, // tc0 (Tag Corner 0) is actually (tc0x, tc0y) the location // if the tag corner 0 in image coordinated, // tc1 (Tag Corner 1) is actually (tc0x, tc0y) the location // if the tag corner 0 in image coordinated, // tc2 (Tag Corner 2) is actually (tc0x, tc0y) the location // if the tag corner 0 in image coordinated, and // tc3 (Tag Corner 3) is actually (tc0x, tc0y) the location // if the tag corner 0 in image coordinated. // // The 4 tag corners go in a clockwise direction around the tag // (when viewed from above, of course.) The tag looks as follows // in ASCII art: // // +Y // ^ // | // | tc2 tc3 // | ** ** ** ** ** ** ** ** // | ** ** ** ** ** ** ** ** // | ** ** ** ** ** ** ** ** // | ** ** ** ** ** ** ** ** // | ** ** ** ** ** ** ** ** // | ** ** ** ** ** ** ** ** // | 15 14 13 12 11 10 9 8 // | 7 6 5 4 3 2 1 0 // | tc1 tc0 // | // +--------------------------------> +X // // Localization Computation: // // The localization algorithm operates as follows: // // foreach tag in image: // (tid, tc0, tc1, tc2, tc3) = tag_extract(image) // (mtid, mtx, mty, mttw, mtdiag) = Map(tid) // (camx, camy, camtw) = F(tc0, tc1, tc2, tc3, mtx, mty, mttw, mtdiag) // // Now let's get into the detail of the localization function F(). // // Using (tc0, tc1, tc2, tc3), we compute the following: // // tagctrx (TAG CenTeR X) is the tag center X coordinate in // image coordinates, // tagctry (TAG CenTeR y) is the tag center X coordinate in // image coordinates, // tagdiag (TAG DIAGonal) is the average diagonal length in image // coordinates, // tagtw (TAG TWist) is the angle of the lower tag edge with // respect to the image coordinate X axis. // // These values are computed as follows: // // tagctrx = (tc0x + tc1x + tc2x + tc3x) / 4 # The average of the X's // tagctry = (tc0y + tc1y + tc2y + ct3y) / 4 # The average of the Y's // tagdiag1 = sqrt( (tc0x-tc2x)^2 + (tc0y-tc2y)^2) ) # First diagonal // tagdiag2 = sqrt( (tc1x-tc3x)^2 + (tc1y-tc3y)^2) ) # Second diagonal // tagdiag = (tagdiag1 + tagdiag2) / 2 # Avg. of both diagonals // tagtw = arctangent2(tc0y - tc1y, tc0x - tc1y) # Bottom tag edge angle // // The image center is defined as: // // (imgctrx, imgctry) // // where // // imgctrx (IMG CenTeR X) is the image center X coordinate in image // coordinates, and // imgctry (IMG CenTeR Y) is the image center Y coordinate in image // coordinates. // // for an image that is 640 x 480, the image center is (320, 240). // (Actually, it should be (319.5, 239.5).) // // Using the image center the following values are computed: // // tagdist (TAG DISTance) is the distance from the tag center to // image center in image coordinates, and // tagbear (TAG BEARing) is the angle from the tag center to the // image center in image coordinates. // // These two values are computed as: // // tagdist = sqrt( (imgctrx - tagctrx)^2 + (imgctry - tagctry)^2) ) // tagbear = arctangent2( imgctry - tagctry, imgctrx - tagctry) // // tagdist is in image coordinate space and we will need the same distance // in floor coordinate space. This is done using tagdiag and mtd (the // map tag diagonal length.) // // flrtagdist = tagdist * (mtd / tagdiag ) // // where flrtagdist stands for FLooR TAG DISTance. // // Now we need to compute to angles that are measured relative to the // floor X axis: // // camtw (CAMera TWist) is the direction that the camera X axis points // relative to the floor X Axis, and // cambear (CAMera BEARing) is the direction to the camera center relative // to the floor X Axis. // // camtw and cambear are computed as: // // camtw = mttw - tagtw // // cambear = camtw + tagbear // // Now camx, and camy are computed as follows: // // camx = mtx + flrtagdist * cos(cambear) // camy = mty + flrtagdist * sin(cambear) // // Thus, the final result of (camx, camy, ctw) has been determined. // // Mapping into Robot Coordinates: // // Once we know the camera location and orientation, // (camx, camy, camtw), we need to compute the ordered triple: // // (rx, ry, rbear) // // where // // rx (Robot X) is the X coordinate of the robot center in // floor coordinates, // ry (Robot Y) is the Y coordinate of the robot center in // floor coordinates, and // rbear (Robot BEARing) is the bearing angle of the robot X axis // to the floor coordinate X axis. // // These values are computed as a function: // // (rx, ry, rbear) = F( (camx, camy, camtw) ) // // There are two constants needed to do this computation: // // robdist (ROBot DISTance) is the distance from the camera // center to the robot center in floor coordinates, and // robcamtw (ROBot CAMera TWist) is the angle from the angle from // camera X axis to the robot X axis. // // Both robdist and robcamtw are constants that can be directly measured // from the camera placement relative to the robot origin. // // Now (rx, ry, rtw) can be computed as follows: // // rtw = camtw + robcamtw // rx = camx + robdist * cos(rcamtw) // ry = camy + robdist * sin(rcamtw) // // That covers the localization processing portion of the algorithm. // // Fusing with Dead Reckoning: // // The robot dead reckoning system keeps track of the robot position // using wheel encoders. These values are represented in the ordered // triple: // // (ex, ey, etw) // // where // // ex (Encoder X) is the robot X coordinate in floor coordinates, // ey (Encoder Y) is the robot Y coordinate in floor coordinates, and // etw (Encoder TWist) is the robot X axis twist relative to the // floor coordinate X axis. // // (rx, ry, rtw) and (ex, ey, etw) are supposed to be the same. Over // time, small errors will accumulate in the computation of (ex, ey, etw). // (rx, ry, rtw) can be used to reset (ex, ey, etw). // // Coordinate Space Transforms: // // That pretty much summarizes what the basic algorithm does. // // What remains is to do the transformations that place the tags // on the ceiling. There are three transformations. // // tags lift The tags are lifted straight up from the floor // to the ceiling. The person looking on down // from above would see no changes in tag position // or orientation (ignoring parallax issues.) // // camera flip The camera is rotated 180 degrees around the // camera X axis. The causes the Y axis to change // its sign. // // image framing For historical reasons, the camera image API // provides the camera image with the image origin // in upper left hand corner, whereas the all of // the math above assumes that image origin is // in the lower left corner. It turns out this // is just changes the Y axis sign again. // // The bottom line is that the "camera flip" and the "image framing" // transformation cancel one another out. Thus, the there is no // work needed to tweak the equations above. /// @brief Callback routine tthat prints out the fidicial information. /// @param announce_object is unused. /// @param id is the tag id. /// @param direction specifies (0-3) which of the 4 possible fiducial /// orientations matched. /// @param world_diagonal is the diagonal measured in world coordinate. /// @param x1 is the X coordinate of corner1 in camera coordinates. /// @param y1 is the y coordinate of corner1 in camera coordinates. /// @param x2 is the X coordinate of corner2 in camera coordinates. /// @param y2 is the y coordinate of corner2 in camera coordinates. /// @param x3 is the X coordinate of corner3 in camera coordinates. /// @param y3 is the y coordinate of corner3 in camera coordinates. /// @param x4 is the X coordinate of corner4 in camera coordinates. /// @param y4 is the y coordinate of corner4 in camera coordinates. /// /// *Fiducials__fiducial_announce*() will announce finding a fiducial /// in a camera image. This callback routine is supplied as an /// argument to *Fiducials__create*(). void Fiducials__fiducial_announce(void *announce_object, int id, int direction, double world_diagonal, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { File__format(stderr, "Fiducial: id=%d dir=%d diag=%.2f (%.2f,%.2f), " /* + */ "(%.2f,%.2f), (%.2f,%.2f), (%.2f,%.2f)", id, direction, world_diagonal, x1, y1, x2, y2, x3, y3, x4, y4); } /// @brief Sets the original image for *fiducials. /// @param fiducials is the *Fiducials* object to use. /// @param image is the new image to use as the original image. /// /// *Fiducials__image_set*() will set the original image for *fiducials* /// to *image*. void Fiducials__image_set(Fiducials fiducials, CV_Image image) { fiducials->original_image = image; } /// @brief Is a HighGUI interface to show the current image. /// @param fiducials is the *Fiducials* object that contains the image. /// @param show is true to force the HighGUI interface to activate. /// /// *Fiducials__image_show*() will cause an image to be shown with /// at each of the various stages of the recognition cycle. This /// only occurs if *show* is *true*. /// /// The character commands are: /// /// * '/033' -- Escape from program. /// * '+' -- View next stage in processing pipeline. /// * '-' -- View previous stage in processing pipeline. /// * '<' -- Goto beginning of processing pipeline. /// * 'b' -- Toggle image blur. /// * 'f' -- Flip fiducials allong X axis //FIXME: Is there any point to having *show* set to false???!!! void Fiducials__image_show(Fiducials fiducials, bool show) { // Grab some values out of *fiduicals*: CV_Image debug_image = fiducials->debug_image; CV_Image original_image = fiducials->original_image; // Create the window we need: String_Const window_name = "Example1"; if (show) { cvNamedWindow(window_name, CV__window_auto_size); } // Processing *original_image* with different options // for each time through the loop: unsigned int debug_index = 0; unsigned int previous_debug_index = debug_index; bool done = (bool)0; while (!done) { // Process {gray_image}; a debug image lands in {debug_image}: Fiducials__process(fiducials); // Display either *original_image* or *debug_image*: if (show) { cvShowImage(window_name, debug_image); } // Get a *control_character* from the user: char control_character = '\0'; if (show) { control_character = (char)(cvWaitKey(0) & 0xff); } // Dispatch on *control_character*: switch (control_character) { case '\33': //# Exit program: done = (bool)1; File__format(stderr, "done\n"); break; case '+': //# Increment {debug_index}: debug_index += 1; break; case '-': // Decrement {debug_index}: if (debug_index > 0) { debug_index -= 1; } break; case '<': // Set {debug_index} to beginning: debug_index = 0; break; case '>': // Set {debug_index} to end: debug_index = 100; break; case 'b': // Toggle image blur: fiducials->blur = !fiducials->blur; File__format(stderr, "blur = %d\n", fiducials->blur); break; case 'f': // Toggle image blur: fiducials->y_flip = !fiducials->y_flip; File__format(stderr, "y_flip = %d\n", fiducials->y_flip); break; default: // Deal with unknown {control_character}: if ((unsigned int)control_character <= 127) { File__format(stderr, "Unknown control character %d\n", control_character); } break; } // Update *debug_index* in *fiducials*: fiducials->debug_index = debug_index; // Show user *debug_index* if it has changed: if (debug_index != previous_debug_index) { File__format(stderr, "****************************debug_index = %d\n", debug_index); previous_debug_index = debug_index; } } // Release storage: CV__release_image(original_image); if (show) { cvDestroyWindow(window_name); } } /// @brief Create and return a *Fiducials* object. /// @param original_image is the image to start with. /// @param fiducials_create is a *Fiducials_Create* object that /// specifies the various features to enable or disable. /// /// *Fiducials__create*() creates and returns a *Fiducials* object /// using the values in *fiduicials_create*. //FIXME: Change this code so that the image size is determined from // the first image that is processed. This allows the image size // to change in midstream!!! Fiducials Fiducials__create( CV_Image original_image, Fiducials_Create fiducials_create) { // Create *image_size*: unsigned int width = CV_Image__width_get(original_image); unsigned int height = CV_Image__height_get(original_image); CV_Size image_size = CV_Size__create(width, height); CV_Memory_Storage storage = CV_Memory_Storage__create(0); // Grab some values from *fiducials_create*: String_Const fiducials_path = fiducials_create->fiducials_path; Memory announce_object = fiducials_create->announce_object; Fiducials_Fiducial_Announce_Routine fiducial_announce_routine = fiducials_create->fiducial_announce_routine; String_Const log_file_name = fiducials_create->log_file_name; // Get *log_file* open if *log_file_name* is not null: File log_file = stderr; if (log_file_name != (String_Const)0) { String full_log_file_name = String__format("%s/%s", fiducials_path, log_file_name); log_file = File__open(log_file_name, "w"); String__free(full_log_file_name); } File__format(log_file, "CV width=%d CV height = %d\n", width, height); int term_criteria_type = CV__term_criteria_iterations | CV__term_criteria_eps; // The north/west/south/east mappings must reside in static // memory rather than on the stack: static int north_mapping_flipped[64] = { //corner1 corner0 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 23, 22, 21, 20, 19, 18, 17, 16, 31, 30, 29, 28, 27, 26, 25, 24, 39, 38, 37, 36, 35, 34, 33, 32, 47, 46, 45, 44, 43, 42, 41, 40, 55, 54, 53, 52, 51, 50, 49, 48, 63, 62, 61, 60, 59, 58, 57, 56, //corner2 corner3 }; static int west_mapping_flipped[64] = { //corner1 corner0 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 59, 51, 43, 35, 27, 19, 11, 3, 58, 50, 42, 34, 26, 18, 10, 2, 57, 49, 41, 33, 25, 17, 9, 1, 56, 48, 40, 32, 24, 16, 8, 0, //corner2 corner3 }; static int south_mapping_flipped[64] = { //corner1 corner0 56, 57, 58, 59, 60, 61, 62, 63, 48, 49, 50, 51, 52, 53, 54, 55, 40, 41, 42, 43, 44, 45, 46, 47, 32, 33, 34, 35, 36, 37, 38, 39, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 20, 21, 22, 23, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, //corner2 corner3 }; static int east_mapping_flipped[64] = { //corner1 corner0 0, 8, 16, 24, 32, 40, 48, 56, 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 4, 13, 20, 28, 36, 44, 52, 60, 5, 13, 21, 29, 37, 45, 53, 61, 6, 14, 22, 30, 38, 46, 54, 62, 7, 15, 23, 31, 39, 47, 55, 63, //corner2 corner3 }; // The north/west/south/east mappings must reside in static // memory rather than on the stack: static int *mappings[4] = { &north_mapping_flipped[0], &west_mapping_flipped[0], &south_mapping_flipped[0], &east_mapping_flipped[0], }; //for (unsigned int index = 0; index < 4; index++) { // File__format(log_file, "mappings[%d]=0x%x\n", index, mappings[index]); //} CV_Image map_x = (CV_Image)0; CV_Image map_y = (CV_Image)0; Fiducials_Results results = Memory__new(Fiducials_Results, "Fiducials__create"); results->map_changed = (bool)0; // Create and load *fiducials*: Fiducials fiducials = Memory__new(Fiducials, "Fiducials__create"); fiducials = new(fiducials) Fiducials__Struct(); if (fiducial_announce_routine != NULL) fiducials->fiducial_announce_routine = fiducial_announce_routine; else fiducials->fiducial_announce_routine = Fiducials__fiducial_announce; fiducials->announce_object = announce_object; fiducials->blue = CV_Scalar__rgb(0.0, 0.0, 1.0); fiducials->blur = (bool)0; fiducials->corners = CV_Point2D32F_Vector__create(4); fiducials->cyan = CV_Scalar__rgb(0.0, 1.0, 1.0); fiducials->debug_image = CV_Image__create(image_size, CV__depth_8u, 3); fiducials->debug_index = 0; fiducials->edge_image = CV_Image__create(image_size, CV__depth_8u, 1); fiducials->fec = FEC__create(8, 4, 4); fiducials->gray_image = CV_Image__create(image_size, CV__depth_8u, 1); fiducials->green = CV_Scalar__rgb(0.0, 255.0, 0.0); fiducials->image_size = image_size; fiducials->last_x = 0.0; fiducials->last_y = 0.0; fiducials->log_file = log_file; fiducials->map_x = map_x; fiducials->map_y = map_y; fiducials->mappings = &mappings[0]; fiducials->origin = CV_Point__create(0, 0); fiducials->original_image = original_image; fiducials->path = fiducials_path; fiducials->purple = CV_Scalar__rgb(255.0, 0.0, 255.0); fiducials->red = CV_Scalar__rgb(255.0, 0.0, 0.0); fiducials->references = CV_Point2D32F_Vector__create(8); fiducials->results = results; fiducials->sample_points = CV_Point2D32F_Vector__create(64); fiducials->size_5x5 = CV_Size__create(5, 5); fiducials->size_m1xm1 = CV_Size__create(-1, -1); fiducials->sequence_number = 0; fiducials->storage = storage; fiducials->temporary_gray_image = CV_Image__create(image_size, CV__depth_8u, 1); fiducials->weights_index = 0; fiducials->term_criteria = CV_Term_Criteria__create(term_criteria_type, 5, 0.2); fiducials->y_flip = (bool)0; fiducials->black = CV_Scalar__rgb(0, 0, 0); return fiducials; } /// @brief will release the storage associated with *fiducials*. /// @param fiducials is the *Fiducials* object to release. /// /// *Fiducials__free*() releases the storage associated with *fiducials*. void Fiducials__free(Fiducials fiducials) { // Free up some *CV_Scalar* colors: CV_Scalar__free(fiducials->blue); CV_Scalar__free(fiducials->cyan); CV_Scalar__free(fiducials->green); CV_Scalar__free(fiducials->purple); CV_Scalar__free(fiducials->red); CV_Scalar__free(fiducials->black); // Free up some *SV_Size* objects: CV_Size__free(fiducials->image_size); CV_Size__free(fiducials->size_5x5); CV_Size__free(fiducials->size_m1xm1); // Finally release *fiducials*: Memory__free((Memory)fiducials); } /// @brief Force the map associated with *fiducials* to be saved. /// @param fiducials is the *Fiducials* object to save the map of. /// /// *Fiducials__map_save*() will cause the map associated with /// *fiducials* to be saved. void Fiducials__map_save(Fiducials fiducials) { } /// @brief Process the current image associated with *fiducials*. /// @param fiducials is the *Fiducials* object to use. /// @returns a *Fiducials_Results* that contains information about /// how the processing worked. /// /// *Fiducials__process*() will process *fiducials* to determine /// the robot location. Fiducials_Results Fiducials__process(Fiducials fiducials) { // Clear *storage*: CV_Memory_Storage storage = fiducials->storage; CV_Memory_Storage__clear(storage); // Grab some values from *fiducials*: CV_Image debug_image = fiducials->debug_image; unsigned int debug_index = fiducials->debug_index; CV_Image edge_image = fiducials->edge_image; CV_Image gray_image = fiducials->gray_image; File log_file = fiducials->log_file; CV_Image original_image = fiducials->original_image; Fiducials_Results results = fiducials->results; CV_Image temporary_gray_image = fiducials->temporary_gray_image; // For *debug_level* 0, we show the original image in color: if (debug_index == 0) { CV_Image__copy(original_image, debug_image, (CV_Image)0); } // Convert from color to gray scale: int channels = CV_Image__channels_get(original_image); // Deal with *debug_index* 0: if (debug_index == 0) { if (channels == 3) { // Original image is color, so a simple copy will work: CV_Image__copy(original_image, debug_image, (CV_Image)0); } else if (channels == 1) { // Original image is gray, so we have to convert back to "color": CV_Image__convert_color(original_image, debug_image, CV__gray_to_rgb); } } // Convert *original_image* to gray scale: if (channels == 3) { // Original image is color, so we need to convert to gray scale: CV_Image__convert_color(original_image, gray_image, CV__rgb_to_gray); } else if (channels == 1) { // Original image is gray, so a simple copy will work: CV_Image__copy(original_image, gray_image, (CV_Image)0); } else { assert(0); } // Show results of gray scale converion for *debug_index* 1: if (debug_index == 1) { CV_Image__convert_color(gray_image, debug_image, CV__gray_to_rgb); } // Preform undistort if available: if (fiducials->map_x != (CV_Image)0) { int flags = CV_INTER_NN | CV_WARP_FILL_OUTLIERS; CV_Image__copy(gray_image, temporary_gray_image, (CV_Image)0); CV_Image__remap(temporary_gray_image, gray_image, fiducials->map_x, fiducials->map_y, flags, fiducials->black); } // Show results of undistort: if (debug_index == 2) { CV_Image__convert_color(gray_image, debug_image, CV__gray_to_rgb); } // Perform Gaussian blur if requested: if (fiducials->blur) { CV_Image__smooth(gray_image, gray_image, CV__gaussian, 3, 0, 0.0, 0.0); } // Show results of Gaussian blur for *debug_index* 2: if (debug_index == 3) { CV_Image__convert_color(gray_image, debug_image, CV__gray_to_rgb); } // Perform adpative threshold: CV_Image__adaptive_threshold(gray_image, edge_image, 255.0, CV__adaptive_thresh_gaussian_c, CV__thresh_binary, 45, 5.0); // Show results of adaptive threshold for *debug_index* 3: if (debug_index == 4) { CV_Image__convert_color(edge_image, debug_image, CV__gray_to_rgb); } // Find the *edge_image* *contours*: CV_Point origin = fiducials->origin; int header_size = 128; CV_Sequence contours = CV_Image__find_contours(edge_image, storage, header_size, CV__retr_list, CV__chain_approx_simple, origin); if (contours == (CV_Sequence)0) { File__format(log_file, "no contours found\n"); } // For *debug_index* 4, show the *edge_image* *contours*: if (debug_index == 5) { //File__format(log_file, "Draw red contours\n"); CV_Scalar red = fiducials->red; CV_Image__convert_color(gray_image, debug_image, CV__gray_to_rgb); CV_Image__draw_contours(debug_image, contours, red, red, 2, 2, 8, origin); } // For the remaining debug steps, we use the original *gray_image*: if (debug_index >= 5) { CV_Image__convert_color(gray_image, debug_image, CV__gray_to_rgb); } // Iterate over all of the *contours*: unsigned int contours_count = 0; for (CV_Sequence contour = contours; contour != (CV_Sequence)0; contour = CV_Sequence__next_get(contour)) { // Keep a count of total countours: contours_count += 1; //File__format(log_file, "contours_count=%d\n", contours_count); static CvSlice whole_sequence; CV_Slice CV__whole_seq = &whole_sequence; whole_sequence = CV_WHOLE_SEQ; // Perform a polygon approximation of {contour}: int arc_length = (int)(CV_Sequence__arc_length(contour, CV__whole_seq, 1) * 0.02); CV_Sequence polygon_contour = CV_Sequence__approximate_polygon(contour, header_size, storage, CV__poly_approx_dp, arc_length, 0.0); if (debug_index == 6) { //File__format(log_file, "Draw green contours\n"); CV_Scalar green = fiducials->green; CV_Image__draw_contours(debug_image, polygon_contour, green, green, 2, 2, 1, origin); } // If we have a 4-sided polygon with an area greater than 500 square // pixels, we can explore to see if we have a tag: if (CV_Sequence__total_get(polygon_contour) == 4 && fabs(CV_Sequence__contour_area(polygon_contour, CV__whole_seq, 0)) > 500.0 && CV_Sequence__check_contour_convexity(polygon_contour)) { // For debugging, display the polygons in red: //File__format(log_file, "Have 4 sides > 500i\n"); // Just show the fiducial outlines for *debug_index* of 6: if (debug_index == 7) { CV_Scalar red = fiducials->red; CV_Image__draw_contours(debug_image, polygon_contour, red, red, 2, 2, 1, origin); } // Copy the 4 corners from {poly_contour} to {corners}: CV_Point2D32F_Vector corners = fiducials->corners; for (unsigned int index = 0; index < 4; index++) { CV_Point2D32F corner = CV_Point2D32F_Vector__fetch1(corners, index); CV_Point point = CV_Sequence__point_fetch1(polygon_contour, index); CV_Point2D32F__point_set(corner, point); if (debug_index == 7) { //File__format(log_file, // "point[%d] x:%f y:%f\n", index, point->x, point->y); } } // Now find the sub pixel corners of {corners}: CV_Image__find_corner_sub_pix(gray_image, corners, 4, fiducials->size_5x5, fiducials->size_m1xm1, fiducials->term_criteria); // Ensure that the corners are in a counter_clockwise direction: CV_Point2D32F_Vector__corners_normalize(corners); // For debugging show the 4 corners of the possible tag where //corner0=red, corner1=green, corner2=blue, corner3=purple: if (debug_index == 8) { for (unsigned int index = 0; index < 4; index++) { CV_Point point = CV_Sequence__point_fetch1(polygon_contour, index); int x = CV_Point__x_get(point); int y = CV_Point__y_get(point); CV_Scalar color = (CV_Scalar)0; String_Const text = (String)0; switch (index) { case 0: color = fiducials->red; text = "red"; break; case 1: color = fiducials->green; text = "green"; break; case 2: color = fiducials->blue; text = "blue"; break; case 3: color = fiducials->purple; text = "purple"; break; default: assert(0); } CV_Image__cross_draw(debug_image, x, y, color); File__format(log_file, "poly_point[%d]=(%d:%d) %s\n", index, x, y, text); } } // Compute the 8 reference points for deciding whether the // polygon is "tag like" in its borders: CV_Point2D32F_Vector references = Fiducials__references_compute(fiducials, corners); // Now sample the periphery of the tag and looking for the // darkest white value (i.e. minimum) and the lightest black // value (i.e. maximum): //int white_darkest = // CV_Image__points_minimum(gray_image, references, 0, 3); //int black_lightest = // CV_Image__points_maximum(gray_image, references, 4, 7); int white_darkest = Fiducials__points_minimum(fiducials, references, 0, 3); int black_lightest = Fiducials__points_maximum(fiducials, references, 4, 7); // {threshold} should be smack between the two: int threshold = (white_darkest + black_lightest) / 2; // For debugging, show the 8 points that are sampled around the // the tag periphery to even decide whether to do further testing. // Show "black" as green crosses, and "white" as green crosses: if (debug_index == 9) { CV_Scalar red = fiducials->red; CV_Scalar green = fiducials->green; for (unsigned int index = 0; index < 8; index++) { CV_Point2D32F reference = CV_Point2D32F_Vector__fetch1(references, index); int x = CV__round(CV_Point2D32F__x_get(reference)); int y = CV__round(CV_Point2D32F__y_get(reference)); //int value = // CV_Image__point_sample(gray_image, reference); int value = Fiducials__point_sample(fiducials, reference); CV_Scalar color = red; if (value < threshold) { color = green; } CV_Image__cross_draw(debug_image, x, y, color); File__format(log_file, "ref[%d:%d]:%d\n", x, y, value); } } // If we have enough contrast keep on trying for a tag match: if (black_lightest < white_darkest) { // We have a tag to try: // Now it is time to read all the bits of the tag out: CV_Point2D32F_Vector sample_points = fiducials->sample_points; // Now compute the locations to sample for tag bits: Fiducials__sample_points_compute(corners, sample_points); // Extract all 64 tag bit values: bool *tag_bits = &fiducials->tag_bits[0]; for (unsigned int index = 0; index < 64; index++) { // Grab the pixel value and convert into a {bit}: CV_Point2D32F sample_point = CV_Point2D32F_Vector__fetch1(sample_points, index); //int value = // CV_Image__point_sample(gray_image, sample_point); int value = Fiducials__point_sample(fiducials, sample_point); int bit = (value < threshold); tag_bits[index] = bit; // For debugging: if (debug_index == 10) { CV_Scalar red = fiducials->red; CV_Scalar green = fiducials->green; // Show white bits as {red} and black bits as {green}: CV_Scalar color = red; if (bit) { color = green; } // Show where bit 0 and 7 are: //if (index == 0) { // // Bit 0 is {cyan}: // color = cyan; //} //if (index == 7) { // // Bit 7 is {blue}: // color = blue; //} // Now splat a cross of {color} at ({x},{y}): int x = CV__round(CV_Point2D32F__x_get(sample_point)); int y = CV__round(CV_Point2D32F__y_get(sample_point)); CV_Image__cross_draw(debug_image, x, y, color); } } //tag_bits :@= extractor.tag_bits //bit_field :@= extractor.bit_field //tag_bytes :@= extractor.tag_bytes // Now we iterate through the 4 different mapping // orientations to see if any one of the 4 mappings match: int **mappings = fiducials->mappings; unsigned int mappings_size = 4; for (unsigned int direction_index = 0; direction_index < mappings_size; direction_index++) { // Grab the mapping: int *mapping = mappings[direction_index]; //File__format(log_file, // "mappings[%d]:0x%x\n", direction_index, mapping); int mapped_bits[64]; for (unsigned int i = 0; i < 64; i++) { mapped_bits[mapping[i]] = tag_bits[i]; } // Fill in tag bytes; unsigned int tag_bytes[8]; for (unsigned int i = 0; i < 8; i++) { unsigned int byte = 0; for (unsigned int j = 0; j < 8; j++) { if (mapped_bits[(i<<3) + j]) { //byte |= 1 << j; byte |= 1 << (7 - j); } } tag_bytes[i] = byte; } if (debug_index == 11) { File__format(log_file, "dir=%d Tag[0]=0x%x Tag[1]=0x%x\n", direction_index, tag_bytes[0], tag_bytes[1]); } // Now we need to do some FEC (Forward Error Correction): FEC fec = fiducials->fec; if (FEC__correct(fec, tag_bytes, 8)) { // We passed FEC: if (debug_index == 11) { File__format(log_file, "FEC correct\n"); } // Now see if the two CRC's match: unsigned int computed_crc = CRC__compute(tag_bytes, 2); unsigned int tag_crc = (tag_bytes[3] << 8) | tag_bytes[2]; if (computed_crc == tag_crc) { // Yippee!!! We have a tag: // Compute {tag_id} from the the first two bytes // of {tag_bytes}: unsigned int tag_id = (tag_bytes[1] << 8) | tag_bytes[0]; if (debug_index == 11) { File__format(log_file, "CRC correct, Tag=%d\n", tag_id); } double vertices[4][2]; for (unsigned int index = 0; index < 4; index++) { CV_Point2D32F pt = CV_Point2D32F_Vector__fetch1(corners, index); vertices[index][0] = pt->x; vertices[index][1] = pt->y; } fiducials->fiducial_announce_routine( fiducials->announce_object, tag_id, direction_index, 0.0, vertices[0][0], vertices[0][1], vertices[1][0], vertices[1][1], vertices[2][0], vertices[2][1], vertices[3][0], vertices[3][1]); } } } } } } return results; } /// @brief Helper routine to sample a point from the image in *fiducials*. /// @param fiducials is the *Fiducials* object that contains the image. /// @param point is the point location to sample. /// @returns weighted sample value. /// /// *Fiducials__point_sample*() will return a weighted sample value for /// *point* in the image associated with *fiducials*. The weight algorithm /// is controlled by the *weights_index* field of *fiducials*. The returned /// value is between 0 (black) to 255 (white). int Fiducials__point_sample(Fiducials fiducials, CV_Point2D32F point) { // This routine will return a sample *fiducials* at *point*. // Get the (*x*, *y*) coordinates of *point*: int x = CV__round(CV_Point2D32F__x_get(point)); int y = CV__round(CV_Point2D32F__y_get(point)); CV_Image image = fiducials->gray_image; static int weights0[9] = { 0, 0, 0, 0, 100, 0, 0, 0, 0}; static int weights1[9] = { 0, 15, 0, 15, 40, 15, 0, 15, 0}; static int weights2[9] = { 5, 10, 5, 10, 40, 10, 5, 10, 5}; // Sample *image*: static int x_offsets[9] = { -1, 0, 1, -1, 0, 1, -1, 0, 1}; static int y_offsets[9] = { -1, -1, -1, 0, 0, 0, 1, 1, 1}; // Select sample *weights*: int *weights = (int *)0; switch (fiducials->weights_index) { case 1: weights = weights1; break; case 2: weights = weights2; break; default: weights = weights0; break; } // Interate across sample point; int numerator = 0; int denominator = 0; for (int index = 0; index < 9; index++) { int sample = CV_Image__gray_fetch(image, x + x_offsets[index], y + y_offsets[index]); if (sample >= 0) { int weight = weights[index]; numerator += sample * weight; denominator += weight; } } // Compute *result* checking for divide by zero: int result = 0; if (denominator > 0) { result = numerator / denominator; } return result; } /// @brief Force *corners* to be counter-clockwise. /// @param corners is the list of 4 fiducial corners. /// /// *CV_Point2D32F_Vector__corners_normalize*() will force *corners* /// to be counter-clockwise. Note there is no check to ensure that /// *corners* actually has 4 values in it. //FIXME: Does this routine belong in CV.c???!!! //FIXME: Should this be merged with *CV_Point2D32F_Vector__is_clockwise*???!!! void CV_Point2D32F_Vector__corners_normalize(CV_Point2D32F_Vector corners) { // This routine will ensure that {corners} are ordered // in the counter-clockwise direction. if (CV_Point2D32F_Vector__is_clockwise(corners)) { // Extract two corners to be swapped: CV_Point2D32F corner1 = CV_Point2D32F_Vector__fetch1(corners, 1); CV_Point2D32F corner3 = CV_Point2D32F_Vector__fetch1(corners, 3); // Extract X and Y for both corners: double x1 = CV_Point2D32F__x_get(corner1); double y1 = CV_Point2D32F__y_get(corner1); double x3 = CV_Point2D32F__x_get(corner3); double y3 = CV_Point2D32F__y_get(corner3); // Swap contents of {corner1} and {corner3}: CV_Point2D32F__x_set(corner1, x3); CV_Point2D32F__y_set(corner1, y3); CV_Point2D32F__x_set(corner3, x1); CV_Point2D32F__y_set(corner3, y1); } } /// @brief Return true if *corners* is in a clockwise direction. /// @param corners is a vector of 4 fiducials corners to test. /// @returns true if the corners are clockwiase and false otherwise. /// /// *CV_Point2D32F_Vector__is_clockwise*() will return true if the 4 fiducial /// corners in *corners* are clockwise and false otherwise. bool CV_Point2D32F_Vector__is_clockwise(CV_Point2D32F_Vector corners) { // Extract the three corners: CV_Point2D32F corner0 = CV_Point2D32F_Vector__fetch1(corners, 0); CV_Point2D32F corner1 = CV_Point2D32F_Vector__fetch1(corners, 1); CV_Point2D32F corner2 = CV_Point2D32F_Vector__fetch1(corners, 2); // Extract X and Y for all four corners: double x0 = CV_Point2D32F__x_get(corner0); double y0 = CV_Point2D32F__y_get(corner0); double x1 = CV_Point2D32F__x_get(corner1); double y1 = CV_Point2D32F__y_get(corner1); double x2 = CV_Point2D32F__x_get(corner2); double y2 = CV_Point2D32F__y_get(corner2); // Create two vectors from the first two lines of the polygon: double v1x = x1 - x0; double v1y = y1 - y0; double v2x = x2 - x1; double v2y = y2 - y1; // Determine the sign of the Z coordinate of the cross product: double z = v1x * v2y - v2x * v1y; // If the Z coordinate is negative, to reverse the sequence of the corners: return z < 0.0; } /// @brief Return 8 sample locations to determine if a quadralateral is /// worth testing for quadralateral'ness. /// @param fiducials is the *Fiducals* object that contains the image. /// @param corners is the 4 potential fiducial corners. /// @returns a vector 8 places to test for ficial'ness. /// /// *Fiducials__references_compute*() 4 corner points in *corners* to /// compute 8 reference points that are returned. The first 4 reference /// points will be just outside of the quadrateral formed by *corners* /// (i.e. the white bounding box) and the last 4 reference points are /// on the inside (i.e. the black bounding box). The returned vector /// is perminately allocated in *fiducials*, so it does not need to have /// it storage released. CV_Point2D32F_Vector Fiducials__references_compute( Fiducials fiducials, CV_Point2D32F_Vector corners) { // Extract the 8 references from {references}: CV_Point2D32F_Vector references = fiducials->references; CV_Point2D32F reference0 = CV_Point2D32F_Vector__fetch1(references, 0); CV_Point2D32F reference1 = CV_Point2D32F_Vector__fetch1(references, 1); CV_Point2D32F reference2 = CV_Point2D32F_Vector__fetch1(references, 2); CV_Point2D32F reference3 = CV_Point2D32F_Vector__fetch1(references, 3); CV_Point2D32F reference4 = CV_Point2D32F_Vector__fetch1(references, 4); CV_Point2D32F reference5 = CV_Point2D32F_Vector__fetch1(references, 5); CV_Point2D32F reference6 = CV_Point2D32F_Vector__fetch1(references, 6); CV_Point2D32F reference7 = CV_Point2D32F_Vector__fetch1(references, 7); // Extract the 4 corners from {corners}: CV_Point2D32F corner0 = CV_Point2D32F_Vector__fetch1(corners, 0); CV_Point2D32F corner1 = CV_Point2D32F_Vector__fetch1(corners, 1); CV_Point2D32F corner2 = CV_Point2D32F_Vector__fetch1(corners, 2); CV_Point2D32F corner3 = CV_Point2D32F_Vector__fetch1(corners, 3); // Extract the x and y references from {corner0} through {corner3}: double x0 = CV_Point2D32F__x_get(corner0); double y0 = CV_Point2D32F__y_get(corner0); double x1 = CV_Point2D32F__x_get(corner1); double y1 = CV_Point2D32F__y_get(corner1); double x2 = CV_Point2D32F__x_get(corner2); double y2 = CV_Point2D32F__y_get(corner2); double x3 = CV_Point2D32F__x_get(corner3); double y3 = CV_Point2D32F__y_get(corner3); double dx21 = x2 - x1; double dy21 = y2 - y1; double dx30 = x3 - x0; double dy30 = y3 - y0; // Determine the points ({xx0, yy0}) and ({xx1, yy1}) that determine // a line parrallel to one side of the quadralatal: double xx0 = x1 + dx21 * 5.0 / 20.0; double yy0 = y1 + dy21 * 5.0 / 20.0; double xx1 = x0 + dx30 * 5.0 / 20.0; double yy1 = y0 + dy30 * 5.0 / 20.0; // Set the outside and inside reference points along the line // through points ({xx0, yy0}) and ({xx1, yy1}): double dxx10 = xx1 - xx0; double dyy10 = yy1 - yy0; CV_Point2D32F__x_set(reference0, xx0 + dxx10 * -1.0 / 20.0); CV_Point2D32F__y_set(reference0, yy0 + dyy10 * -1.0 / 20.0); CV_Point2D32F__x_set(reference4, xx0 + dxx10 * 1.0 / 20.0); CV_Point2D32F__y_set(reference4, yy0 + dyy10 * 1.0 / 20.0); CV_Point2D32F__x_set(reference1, xx0 + dxx10 * 21.0 / 20.0); CV_Point2D32F__y_set(reference1, yy0 + dyy10 * 21.0 / 20.0); CV_Point2D32F__x_set(reference5, xx0 + dxx10 * 19.0 / 20.0); CV_Point2D32F__y_set(reference5, yy0 + dyy10 * 19.0 / 20.0); // Determine the points ({xx2, yy2}) and ({xx3, yy3}) that determine // a line parrallel to the other side of the quadralatal: double xx2 = x1 + dx21 * 15.0 / 20.0; double yy2 = y1 + dy21 * 15.0 / 20.0; double xx3 = x0 + dx30 * 15.0 / 20.0; double yy3 = y0 + dy30 * 15.0 / 20.0; // Set the outside and inside reference points along the line // through points ({xx2, yy2}) and ({xx3, yy3}): double dxx32 = xx3 - xx2; double dyy32 = yy3 - yy2; CV_Point2D32F__x_set(reference2, xx2 + dxx32 * -1.0 / 20.0); CV_Point2D32F__y_set(reference2, yy2 + dyy32 * -1.0 / 20.0); CV_Point2D32F__x_set(reference6, xx2 + dxx32 * 1.0 / 20.0); CV_Point2D32F__y_set(reference6, yy2 + dyy32 * 1.0 / 20.0); CV_Point2D32F__x_set(reference3, xx2 + dxx32 * 21.0 / 20.0); CV_Point2D32F__y_set(reference3, yy2 + dyy32 * 21.0 / 20.0); CV_Point2D32F__x_set(reference7, xx2 + dxx32 * 19.0 / 20.0); CV_Point2D32F__y_set(reference7, yy2 + dyy32 * 19.0 / 20.0); return references; } /// @brief Return the maximum value of the points in *points*. /// @param fiducials is the *Fiducials* object that contains the image. /// @param points is the vector of points to sample. /// @param start_index is the first index to start with. /// @param end_index is the last index to end with. /// @returns the maximum sampled value. /// /// /// *Fiducials__points_maximum*() will sweep from *start_index* to /// *end_index* through *points*. Using each selected point in *points*}, /// the corresponding value in *image* is sampled. The minimum of the /// sampled point is returned. int Fiducials__points_maximum(Fiducials fiducials, CV_Point2D32F_Vector points, unsigned int start_index, unsigned int end_index) { // Start with a big value move it down: int result = 0; // Iterate across the {points} from {start_index} to {end_index}: for (unsigned int index = start_index; index <= end_index; index++) { CV_Point2D32F point = CV_Point2D32F_Vector__fetch1(points, index); int value = Fiducials__point_sample(fiducials, point); //call d@(form@("max[%f%:%f%]:%d%\n\") % // f@(point.x) % f@(point.y) / f@(value)) if (value > result) { // New maximum value: result = value; } } return result; } /// @brief Return the minimum value of the points in *points*. /// @param fiducials is the *Fiducials* object that contains the image. /// @param points is the vector of points to sample. /// @param start_index is the first index to start with. /// @param end_index is the last index to end with. /// @returns the minimum sampled value. /// /// *Fiducials__points_minimum*() will sweep from *start_index* to /// *end_index* through *points*. Using each selected point in *points*}, /// the corresponding value in *image* is sampled. The minimum of the /// sampled point is returned. int Fiducials__points_minimum(Fiducials fiducials, CV_Point2D32F_Vector points, unsigned int start_index, unsigned int end_index) { // Start with a big value move it down: int result = 0x7fffffff; // Iterate across the {points} from {start_index} to {end_index}: for (unsigned int index = start_index; index <= end_index; index++) { CV_Point2D32F point = CV_Point2D32F_Vector__fetch1(points, index); int value = Fiducials__point_sample(fiducials, point); if (value < result) { // New minimum value: result = value; } } return result; } /// @brief Compute the fiducial locations to sample using *corners* /// @param corners is the the 4 of the fiducials. /// @param sample_points is the 64 vector of points that are computed. /// /// *Fiducials__sample_points_compute*() will use the 4 corners in /// *corners* as a quadralateral to compute an 8 by 8 grid of tag /// bit sample points and store the results into the the 64 /// preallocated *CV_Point2D32F* objects in *sample_points*. /// The quadralateral must be convex and in the counter-clockwise /// direction. Bit 0 will be closest to corners[1], bit 7 will be /// closest to corners[0], bit 56 closest to corners[2] and bit 63 /// closest to corners[3]. //FIXME: sample points comes from *fiducials*, so shouldn't have // have *fiducials* as a argument instead of *sample_points*???!!! void Fiducials__sample_points_compute( CV_Point2D32F_Vector corners, CV_Point2D32F_Vector sample_points) { CV_Point2D32F corner0 = CV_Point2D32F_Vector__fetch1(corners, 0); CV_Point2D32F corner1 = CV_Point2D32F_Vector__fetch1(corners, 1); CV_Point2D32F corner2 = CV_Point2D32F_Vector__fetch1(corners, 2); CV_Point2D32F corner3 = CV_Point2D32F_Vector__fetch1(corners, 3); // Extract the x and y references from {corner0} through {corner3}: double x0 = CV_Point2D32F__x_get(corner0); double y0 = CV_Point2D32F__y_get(corner0); double x1 = CV_Point2D32F__x_get(corner1); double y1 = CV_Point2D32F__y_get(corner1); double x2 = CV_Point2D32F__x_get(corner2); double y2 = CV_Point2D32F__y_get(corner2); double x3 = CV_Point2D32F__x_get(corner3); double y3 = CV_Point2D32F__y_get(corner3); // Figure out the vector directions {corner1} to {corner2}, as well as, // the vector from {corner3} to {corner0}. If {corners} specify a // quadralateral, these vectors should be approximately parallel: double dx21 = x2 - x1; double dy21 = y2 - y1; double dx30 = x3 - x0; double dy30 = y3 - y0; // {index} will cycle through the 64 sample points in {sample_points}: unsigned int index = 0; // There are ten rows (or columns) enclosed by the quadralateral. // (The outermost "white" rows and columns are not enclosed by the // quadralateral.) Since we want to sample the middle 8 rows (or // columns), We want a fraction that goes from 3/20, 5/20, ..., 17/20. // The fractions 1/20 and 19/20 would correspond to a black border, // which we do not care about: double i_fraction = 3.0 / 20.0; double i_increment = 2.0 / 20.0; // Loop over the first axis of the grid: unsigned int i = 0; while (i < 8) { // Compute ({xx1},{yy1}) which is a point that is {i_fraction} between // ({x1},{y1}) and ({x2},{y2}), as well as, ({xx2},{yy2}) which is a // point that is {i_fraction} between ({x0},{y0}) and ({x3},{y3}). double xx1 = x1 + dx21 * i_fraction; double yy1 = y1 + dy21 * i_fraction; double xx2 = x0 + dx30 * i_fraction; double yy2 = y0 + dy30 * i_fraction; // Compute the vector from ({xx1},{yy1}) to ({xx2},{yy2}): double dxx21 = xx2 - xx1; double dyy21 = yy2 - yy1; // As with {i_fraction}, {j_fraction} needs to sample the // the data stripes through the quadralateral with values // that range from 3/20 through 17/20: double j_fraction = 3.0 / 20.0; double j_increment = 2.0 / 20.0; // Loop over the second axis of the grid: unsigned int j = 0; while (j < 8) { // Fetch next {sample_point}: CV_Point2D32F sample_point = CV_Point2D32F_Vector__fetch1(sample_points, index); index = index + 1; // Write the rvGrid position into the rvGrid array: CV_Point2D32F__x_set(sample_point, xx1 + dxx21 * j_fraction); CV_Point2D32F__y_set(sample_point, yy1 + dyy21 * j_fraction); // Increment {j_faction} to the sample point: j_fraction = j_fraction + j_increment; j = j + 1; } // Increment {i_fraction} to the next sample striple: i_fraction = i_fraction + i_increment; i = i + 1; } // clockwise direction. Bit 0 will be closest to corners[1], bit 7 // will be closest to corners[0], bit 56 closest to corners[2] and // bit 63 closest to corners[3]. //Fiducials__sample_points_helper("0:7", corner0, sample_point7); //Fiducials__sample_points_helper("1:0", corner0, sample_point0); //Fiducials__sample_points_helper("2:56", corner0, sample_point56); //Fiducials__sample_points_helper("3:63", corner0, sample_point63); } // Used in *Fiducials__sample_points*() for debugging: // //void Fiducials__sample_points_helper( // String_Const label, CV_Point2D32F corner, CV_Point2D32F sample_point) { // double corner_x = CV_Point2D32F__x_get(corner); // double corner_y = CV_Point2D32F__y_get(corner); // double sample_point_x = CV_Point2D32F__x_get(sample_point); // double sample_point_y = CV_Point2D32F__y_get(sample_point); // File__format(stderr, "Label: %s corner: %f:%f sample_point %f:%f\n", // label, (int)corner_x, (int)corner_y, // (int)sample_point_x, (int)sample_point_y); //} static struct Fiducials_Create__Struct fiducials_create_struct = { (String_Const)0, // fiducials_path (void *)0, // announce_object (Fiducials_Fiducial_Announce_Routine)0, // fiducial_announce_routine (String_Const)0, // log_file_name }; /// @brief Returns the one and only *Fiducials_Create* object. /// @returns the one and only *Fiducials_Create* object. /// /// *Fiducials_Create__one_and_only*() will return the one and only /// *Fiducials_Create* object. This object needs to be initalized /// prior to calling *Fiduciasl__create*(). Fiducials_Create Fiducials_Create__one_and_only(void) { return &fiducials_create_struct; }
f6a44fa7318127da16d218b477abfe672f37a847
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/chromium/chrome/browser/ui/views/profile_tag_view.cc
eab9e414976116b957d611583fa5e3609fd2b180
[ "BSD-3-Clause", "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
C++
false
false
3,960
cc
profile_tag_view.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/profile_tag_view.h" #include "chrome/browser/ui/views/frame/browser_frame.h" #include "chrome/browser/ui/views/profile_menu_button.h" #include "grit/theme_resources.h" #include "ui/base/theme_provider.h" #include "ui/gfx/canvas_skia.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/skbitmap_operations.h" #include "views/widget/widget.h" namespace { // Colors for primary profile. TODO(mirandac): add colors for multi-profile. color_utils::HSL hsl_active_shift = { 0.594, 0.5, 0.5 }; } namespace views { ProfileTagView::ProfileTagView(BrowserFrame* frame, views::ProfileMenuButton* profile_menu_button) : profile_tag_bitmaps_created_(false), frame_(frame), profile_menu_button_(profile_menu_button) { } void ProfileTagView::OnPaint(gfx::Canvas* canvas) { CreateProfileTagBitmaps(); // The tag image consists of a right and left edge, and a center section that // scales to fit the length of the user's name. We can't just scale the whole // image, or the left and right edges would be distorted. int tag_width = profile_menu_button_->GetPreferredSize().width(); int center_tag_width = tag_width - active_profile_tag_left_.width() - active_profile_tag_right_.width(); int tag_x = frame_->GetMinimizeButtonOffset() - tag_width - views::ProfileMenuButton::kProfileTagHorizontalSpacing; bool is_active = GetWidget()->IsActive(); SkBitmap* profile_tag_left = is_active ? &active_profile_tag_left_ : &inactive_profile_tag_left_; SkBitmap* profile_tag_center = is_active ? &active_profile_tag_center_ : &inactive_profile_tag_center_; SkBitmap* profile_tag_right = is_active ? &active_profile_tag_right_ : &inactive_profile_tag_right_; canvas->DrawBitmapInt(*profile_tag_left, 0, 0); canvas->DrawBitmapInt(*profile_tag_center, 0, 0, profile_tag_center->width(), profile_tag_center->height(), profile_tag_left->width(), 0, center_tag_width, profile_tag_center->height(), true); canvas->DrawBitmapInt(*profile_tag_right, profile_tag_left->width() + center_tag_width, 0); } void ProfileTagView::CreateProfileTagBitmaps() { // Lazily create profile tag bitmaps on first display. // TODO(mirandac): Cache these per profile, instead of creating every time. if (profile_tag_bitmaps_created_) return; profile_tag_bitmaps_created_ = true; ui::ThemeProvider* theme_provider = frame_->GetThemeProviderForFrame(); SkBitmap* profile_tag_center = theme_provider->GetBitmapNamed( IDR_PROFILE_TAG_CENTER); SkBitmap* profile_tag_left = theme_provider->GetBitmapNamed( IDR_PROFILE_TAG_LEFT); SkBitmap* profile_tag_right = theme_provider->GetBitmapNamed( IDR_PROFILE_TAG_RIGHT); inactive_profile_tag_center_ = *theme_provider->GetBitmapNamed( IDR_PROFILE_TAG_INACTIVE_CENTER); inactive_profile_tag_left_ = *theme_provider->GetBitmapNamed( IDR_PROFILE_TAG_INACTIVE_LEFT); inactive_profile_tag_right_ = *theme_provider->GetBitmapNamed( IDR_PROFILE_TAG_INACTIVE_RIGHT); // Color active bitmap according to profile. TODO(mirandac): add theming // and multi-profile color schemes. active_profile_tag_center_ = SkBitmapOperations::CreateHSLShiftedBitmap( *profile_tag_center, hsl_active_shift); active_profile_tag_left_ = SkBitmapOperations::CreateHSLShiftedBitmap( *profile_tag_left, hsl_active_shift); active_profile_tag_right_ = SkBitmapOperations::CreateHSLShiftedBitmap( *profile_tag_right, hsl_active_shift); } } // namespace views
ebe3ed36a28fe687563ab05cabcbdc2a681bf3af
a37a6d559099dc316c7c7a57fce38c4c49e5840e
/ku/LNode.h
d7e38535828e64c313a68ccb963acdd166308af6
[]
no_license
mao-chang-jing-yan/untitled
895e69b71fd540893f4e58c542e1b749211090f2
4b00bcb29ef0a76daa33010698306366d1b70dea
refs/heads/master
2023-06-14T11:48:03.149482
2021-07-15T08:24:51
2021-07-15T08:24:51
386,217,852
0
0
null
null
null
null
UTF-8
C++
false
false
720
h
LNode.h
// // Created by Xiao Shen on 2021/7/15. // #ifndef UNTITLED_LNODE_H #define UNTITLED_LNODE_H #include <iostream> #include <string> using namespace std; struct Node { string name; Node *next; Node *front; }; class LNode { private: Node *data{}; Node **head = &data; Node **tail = &data; int length{}; public: LNode(); explicit LNode(const string l[]); int get_length() const; void push_back(Node *node); void push_back(const string &&node_name); void push_front(Node *node); void push_front(const string &&node_name); Node *pop_back(); Node *pop_front(); Node *get(int index); Node* operator[](int index); }; #endif //UNTITLED_LNODE_H
d432d9b1acbf3ead9d1840d4cd81d2665e8c37b2
24ee99f16666f5ae662c7a062bde01dff359ebd9
/1. Searching and Sorting/29. Book Allocation - GFG.cpp
e40329c0e8b6d266e6415a1b035d87d6219be51f
[]
no_license
Anurag-c/Codes
d103cf2d406175ce8c6a5eab2c0163e1e6c5877f
d69df2a1a6d6d33fe3f0f9d52e32b98cd5abcde2
refs/heads/main
2023-03-29T14:00:42.576632
2021-04-11T08:11:09
2021-04-11T08:11:09
324,210,053
1
0
null
null
null
null
UTF-8
C++
false
false
774
cpp
29. Book Allocation - GFG.cpp
//https://practice.geeksforgeeks.org/problems/allocate-minimum-number-of-pages0937/1# int isPossible(int *arr,int n,int pages,int m) { int curr_pages = 0; int students = 1; for(int i = 0 ; i<n ; i++) { curr_pages += arr[i]; if(curr_pages > pages) { curr_pages = arr[i]; students++; if(students > m) return false; } } return true; } int findPages(int *arr, int n, int m) { if(n < m) return -1; int start = *max_element(arr,arr+n); int end = 0; for(int i = 0; i < n ; i++) end += arr[i]; while(start < end) { int mid = start + ((end - start)/2); if(isPossible(arr,n,mid,m)) end = mid; else start = mid + 1; } return end; }
bab0d53f7de6ee31cef43606cd822890b0b51e4e
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/CMake/CMake-gumtree/Kitware_CMake_repos_basic_block_block_19187.cpp
761e61f72e7c363d10cdc32409bf17c505beb662
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
316
cpp
Kitware_CMake_repos_basic_block_block_19187.cpp
{ q = QUEUE_HEAD(&queue); QUEUE_REMOVE(q); handle = QUEUE_DATA(q, uv_fs_event_t, watchers); tmp_path = handle->path; handle->path = NULL; err = uv_fs_event_start(handle, handle->cb, tmp_path, 0); uv__free(tmp_path); if (err) return err; }
a6e2cf49a179cd0ea74c62cbd76a430cf9a07613
aae5e68bb01912d13f8117f3a50b39a9f8f9b1ed
/EngineBase/Vector3.hpp
cf7123ea07b8807c75dffb683e1c1aaa600f2807
[]
no_license
Ekozmaster/OpenGL-GLFW-Engine
4b68ed1ad6e56cd7adc0e60ef24d8fa34da5d52b
6422fcd97bbebcf6eec1a28cd2bc126ac3d242bc
refs/heads/master
2020-04-05T13:40:07.721505
2017-07-02T15:29:15
2017-07-02T15:29:15
94,956,491
0
0
null
null
null
null
UTF-8
C++
false
false
4,536
hpp
Vector3.hpp
#ifndef VECTOR3_HPP #define VECTOR3_HPP #include<cstdio> #include<glm/glm.hpp> // Abstraction to work with vectors in space class Vector3 { public: float x; float y; float z; Vector3(float X, float Y, float Z); Vector3(); void PrintCoords(); // Overriding primitive operators to work with vector3 // Sum of Vectors Vector3 operator+(Vector3 otherVector3); void operator+=(Vector3 otherVector3); Vector3 operator+(); // Sub of Vectors Vector3 operator-(Vector3 otherVector3); void operator-=(Vector3 otherVector3); Vector3 operator-(); // Product of vectors Vector3 operator*(Vector3 otherVector3); void operator*=(Vector3 otherVector3); // division of vectors (otherVector3 can't have any component = 0) Vector3 operator/(Vector3 otherVector3); void operator/=(Vector3 otherVector3); Vector3 operator*(float scalar); void operator*=(float scalar); bool operator==(Vector3 otherVector3); bool operator!=(Vector3 otherVector3); float Lenght(); Vector3 normalized(); glm::vec3 ToGLMVec3(); static Vector3 up(); static Vector3 down(); static Vector3 left(); static Vector3 right(); static Vector3 forward(); static Vector3 back(); static Vector3 one(); static Vector3 zero(); static float Distance(Vector3 vector1, Vector3 vector2); static Vector3 Cross(Vector3 vector1, Vector3 vector2); static float Dot(Vector3 vector1, Vector3 vector2); }; #endif /* // Abstraction to work with vectors in space class Vector3 { public: float x; public: float y; public: float z; Vector3(float X=0, float Y=0, float Z=0){ x=X; y=Y; z=Z; } public: // Overriding primitive operators to work with vector3 // Sum of Vectors Vector3 operator+(Vector3 otherVector3){ return Vector3(x + otherVector3.x, y + otherVector3.y, z + otherVector3.z); } // Sub of Vectors Vector3 operator-(Vector3 otherVector3){ return Vector3(x - otherVector3.x, y - otherVector3.y, z - otherVector3.z); } // Product of vectors Vector3 operator*(Vector3 otherVector3){ return Vector3(x * otherVector3.x, y * otherVector3.y, z * otherVector3.z); } // division of vectors (otherVector3 can't have any component = 0) Vector3 operator/(Vector3 otherVector3){ return Vector3(x / otherVector3.x, y / otherVector3.y, z / otherVector3.z); } Vector3 operator*(float scalar){ return Vector3(x * scalar, y*scalar, z*scalar); } bool operator==(Vector3 otherVector3){ return (otherVector3.x == x && otherVector3.y == y && otherVector3.z == z); } bool operator!=(Vector3 otherVector3){ return (otherVector3.x != x || otherVector3.y != y || otherVector3.z != z); } float Lenght(){ return sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2)); } Vector3 normalized(){ float lenght = Lenght(); return Vector3(x/lenght, y/lenght, z/lenght); } static Vector3 up(){ return Vector3(0, 1, 0); } static Vector3 down(){ return Vector3(0, -1, 0); } static Vector3 left(){ return Vector3(-1, 0, 0); } static Vector3 right(){ return Vector3(1, 0, 0); } static Vector3 forward(){ return Vector3(0, 0, 1); } static Vector3 back(){ return Vector3(0, 1, -1); } static Vector3 one(){ return Vector3(1, 1, 1); } static Vector3 zero(){ return Vector3(0, 0, 0); } static float Distance(Vector3 vector1, Vector3 vector2){ return Vector3(vector2 - vector1).Lenght(); } static Vector3 Cross(Vector3 vector1, Vector3 vector2){ return Vector3(vector1.y*vector2.z - vector1.z*vector2.y, vector1.z*vector2.x - vector1.x*vector2.z, vector1.x*vector2.y - vector1.y*vector2.x); } static float Dot(Vector3 vector1, Vector3 vector2){ return vector1.x*vector2.x + vector1.y*vector2.y + vector1.z*vector2.z; } }; */
34251945e5b7846787addd35b5df29df69b3a284
01cdc1707201e6750e122c6f970c66d6392bcbeb
/src/KubeInterface.cpp
ae43e1bfd2effbd49c81d00285e980489830927a
[]
no_license
slateci/slate-api-server
9c6b2736e00a5c4c7442039ed14c7c49ce172f0a
a605abf61a7dcc7a435ea91cdeba0a119351ee52
refs/heads/master
2021-12-01T08:45:44.724510
2021-11-17T20:20:13
2021-11-17T20:20:13
138,083,801
0
0
null
2018-07-18T17:03:28
2018-06-20T20:42:45
C++
UTF-8
C++
false
false
2,757
cpp
KubeInterface.cpp
#include "KubeInterface.h" #include <memory> #include <string> #include "Logging.h" #include "Utilities.h" #include "FileHandle.h" ///Remove ANSI escape sequences from a string. ///This is hard to do generally, for now only CSI SGR sequences are identified ///and removed. These are by far the most common sequences in command output, ///and _appear_ to be the only ones produced by kubectl. std::string removeShellEscapeSequences(std::string s){ std::size_t pos=0; while((pos=s.find("\x1B[",pos))!=std::string::npos){ std::size_t end=s.find('m',pos); if(end==std::string::npos) s.erase(pos); else s.erase(pos,end-pos+1); } return s; } namespace kubernetes{ commandResult kubectl(const std::string& configPath, const std::vector<std::string>& arguments){ std::vector<std::string> fullArgs; fullArgs.push_back("--request-timeout=10s"); fullArgs.push_back("--kubeconfig="+configPath); std::copy(arguments.begin(),arguments.end(),std::back_inserter(fullArgs)); auto result=runCommand("kubectl",fullArgs); return commandResult{removeShellEscapeSequences(result.output), removeShellEscapeSequences(result.error),result.status}; } commandResult helm(const std::string& configPath, const std::string& tillerNamespace, const std::vector<std::string>& arguments){ std::vector<std::string> fullArgs; fullArgs.push_back("--tiller-namespace="+tillerNamespace); fullArgs.push_back("--tiller-connection-timeout=10"); std::copy(arguments.begin(),arguments.end(),std::back_inserter(fullArgs)); return runCommand("helm",fullArgs,{{"KUBECONFIG",configPath}}); } void kubectl_create_namespace(const std::string& clusterConfig, const VO& vo) { std::string input= R"(apiVersion: nrp-nautilus.io/v1alpha1 kind: ClusterNamespace metadata: name: )"+vo.namespaceName()+"\n"; auto tmpFile=makeTemporaryFile("namespace_yaml_"); std::ofstream tmpfile(tmpFile); tmpfile << input; tmpfile.close(); auto result=runCommand("kubectl",{"--kubeconfig",clusterConfig,"create","-f",tmpFile}); if(result.status){ //if the namespace already existed we do not have a problem, otherwise we do if(result.error.find("AlreadyExists")==std::string::npos) throw std::runtime_error("Namespace creation failed: "+result.error); } } void kubectl_delete_namespace(const std::string& clusterConfig, const VO& vo) { auto result=runCommand("kubectl",{"--kubeconfig",clusterConfig, "delete","clusternamespace",vo.namespaceName()}); if(result.status){ //if the namespace did not exist we do not have a problem, otherwise we do if(result.error.find("NotFound")==std::string::npos) throw std::runtime_error("Namespace deletion failed: "+result.error); } } }
a19df31069968c3db2589f565c8a0a36dfba7c61
6891953e7ea34f9cd8760ef1506edc9ce1a41c60
/PROBLEMAS/10/10/InserccionColagistica_10.h
f713bcb16e5ca659e5e321b739f5e8d0ef415d5d
[]
no_license
PabloGonzalezCorredor/EDA-2019-2020-UCM
cb7205059cfffa4d1a658896309006a7a918a591
525da869676ed61eae5e7d5904544365ff923e8e
refs/heads/main
2023-01-11T09:30:12.879865
2020-11-12T16:52:23
2020-11-12T16:52:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,155
h
InserccionColagistica_10.h
#ifndef inserccion #define inserccion #include <stdexcept> // std::domain_error #include <iostream> #include"queue_eda.h" template <class T> class insert_queue : public queue<T> { using Nodo = typename queue<T>::Nodo; public: void insert(insert_queue<T>& other, int p) { if (p == 0) { Nodo* aux = other.ult; aux->sig = this->prim; //el ultimo de la que recibo tiene como siguiente el primero this->prim = other.prim; //cambio el primero de la lista } else { Nodo* aux = this->prim; for (int i = 0;i < p - 1;i++) aux = aux->sig; //aux apunta al que se le va a a insertar a continuacion Nodo* aux2 = other.ult; //puntero al ultimo que recibo aux2->sig = aux->sig; //concatena el ultimo que recibo con el resto de la lista aux->sig = other.prim; //insercion el inicio de other if (p == this->size()) this->ult = other.ult; } this->nelems += other.nelems; //borrar other other.prim = nullptr; other.ult = nullptr; other.nelems = 0; } void print(std::ostream& o = std::cout) const { Nodo* i = this->prim; while (i != nullptr) { o << i->elem << " "; i = i->sig; } } } ; #endif // !inserccion
dd9d3e3749306f0f1d75a53b98b5e511146ab76d
13595410680791ce49d253a97ff01452c2667303
/LeetCodeCpp/NodeClass.cpp
d5326d086bab27f183442d1c579b3d53d7e2d18b
[]
no_license
timotimosky/LeetcodeCpp
a861bef47fdef05d3ec5d333346ce3194cd0dd2f
fe47cb86e31c284292c5a66cf6b215b1f3ce1ad0
refs/heads/master
2021-06-27T11:42:11.578763
2021-01-19T11:53:15
2021-01-19T11:53:15
203,036,977
0
0
null
null
null
null
GB18030
C++
false
false
1,983
cpp
NodeClass.cpp
#include "NodeClass.h" #include <iostream> using namespace std; NodeClass::NodeClass() { Node* a = new Node(1); a->next = NULL; Node* b = new Node(2); b->next = a; Node* c = new Node(3); c->next = b; Node* firstNode = new Node(0); firstNode->next = c; //DeleteNode(firstNode, a); DeleteNodeO1(firstNode, a); } NodeClass::~NodeClass() { } //双向链表删除更快,是因为,删除的时候,直接找被删除节点的父节点指向被删除节点的子节点。 //在O(1)时间范围内删除Node节点 bool NodeClass::DeleteNodeO1(Node* mNode, Node* waitDeleteNode) { if (!mNode || !waitDeleteNode) return false; Node* sonNode = waitDeleteNode->next; //如果不是是尾节点 if (sonNode != NULL) { //找到上一个节点 waitDeleteNode->value = sonNode->value; waitDeleteNode->next = sonNode->next; delete(sonNode); sonNode = 0; } //如果链表只有一个节点,删除头结点,也是尾节点 else if (mNode == waitDeleteNode) { delete mNode; mNode = NULL; } else //如果链表有多个结点,需要删除的也是尾节点,特殊处理 { DeleteNode(mNode, waitDeleteNode); } Node* DebugNode = mNode; while (DebugNode != NULL) { cout << "tNode" << DebugNode->value << endl; DebugNode = DebugNode->next; } return true; } //删除链表中的指定结点 bool NodeClass::DeleteNode(Node* mNode, Node* waitDeleteNode) { //TODO:不能随便指,内存泄露 Node* pNode = mNode; Node* TempNode = NULL; Node* WaitNode = NULL; while (pNode != NULL) { TempNode = pNode; pNode = pNode->next; if (pNode!= NULL && pNode->value == waitDeleteNode->value) { TempNode->next = pNode->next; //delete 只是删除了指针指向的内存,并没有删除指针本身 delete(pNode); } pNode = TempNode->next; } Node* DebugNode = mNode; while (DebugNode !=NULL) { cout << "tNode"<< DebugNode->value<<endl; DebugNode = DebugNode->next; } return true; }
b7860dc2846f2b9c733f71dfd75449b4eb232492
9b8a89bc7c031b0db6723420964c9cb343208e27
/Castlevania/Level1.cpp
9eb531b49f9a8626097fbe0d12f81a41b6173cb6
[]
no_license
nguyentuyetnhungpht/Game-Castlevania
ac090012195fbfb708168b7df91f094a5649cd56
c59d7fa1f514b1ee156c9628ac2c4af32bb92dd7
refs/heads/main
2022-12-25T12:08:46.152743
2020-10-03T12:18:13
2020-10-03T12:18:13
300,872,900
0
0
null
null
null
null
UTF-8
C++
false
false
2,091
cpp
Level1.cpp
#include "Level1.h" #include "Resource.h" #include "LoadingData.h" #include "debug.h" CLevel1 *CLevel1::__instance = NULL; CLevel1::CLevel1(void) { } CLevel1::~CLevel1(void) { } void CLevel1::LoadMap() { CTextures *textures = CTextures::GetInstance(); LPDIRECT3DTEXTURE9 texscene1; LPDIRECT3DTEXTURE9 texscene2; vector<LPGAMEOBJECT> objects; float width, height; switch(scene) { case SCENE_1: tilemap = new CTileMap(); texscene1 = textures->Get(ID_TEX_MAP1A); tilemap->LoadTileMap("Data\\TileMap1Stage1A.txt", texscene1); tilemap->GetSize(width, height); grid = new CGrid(width, height); CLoadingData::LoadObjectsFromFile(objects, L"Data\\Object_scene1.txt"); grid->InitGrid(objects); break; case SCENE_2: tilemap = new CTileMap(); texscene2 = textures->Get(ID_TEX_MAP1B); tilemap->LoadTileMap("Data\\TileMap1Stage1B.txt", texscene2); tilemap->GetSize(width, height); grid = new CGrid(width, height); CLoadingData::LoadObjectsFromFile(objects, L"Data\\Object_scene2.txt"); grid->InitGrid(objects); break; } } void CLevel1::Update(DWORD dt, CSimon * simon) { vector<LPGAMEOBJECT> objects; grid->GetListObject(coObjects); objects = coObjects; simon->Update(dt, &coObjects); coObjects.push_back(simon); for (UINT i = 0; i < objects.size(); i++) objects[i]->Update(dt, &coObjects); } void CLevel1::Render(CSimon *simon) { tilemap->Render(0.0f, 0.0f); /*if (scene == SCENE_1) { for (UINT i = 0; i < coObjects.size(); i++) coObjects[i]->Render(); simon->Render(); coObjects[0]->Render(); } else {*/ for (UINT i = 0; i < coObjects.size(); i++) coObjects[i]->Render(); simon->Render(); //} } void CLevel1::GetMinMaxCamera(float & min, float & max, float & widthScene) { switch(scene) { case SCENE_1: min = MIN_CAMERA_1; max = MAX_CAMERA_1; widthScene = WIDTH_SCENE_1; break; case SCENE_2: min = MIN_CAMERA_2; max = MAX_CAMERA_2; widthScene = WIDTH_SCENE_2; break; } } CLevel1 *CLevel1::GetInstance() { if (__instance == NULL) __instance = new CLevel1(); return __instance; }
f2df698f6a1472275bb32f2697735515247f1eb5
6b390b74bdf88149a6762b606116f0f8e6bc1244
/Source/TheHudsonReport/Private/InGameUI__pf122804083.cpp
f545f177e7ea22ab50ea118039643b7ed4aa0559
[]
no_license
Angros/The-Hudson-Report
1c9099dcb92db0b7c3554625ff7b1d62b821ca05
8ec6735519a1009374d1240e0f44ed99826d8472
refs/heads/master
2020-07-31T04:41:01.775675
2019-09-24T02:54:33
2019-09-24T02:54:33
210,487,918
0
0
null
null
null
null
UTF-8
C++
false
false
180,772
cpp
InGameUI__pf122804083.cpp
#include "TheHudsonReport.h" #include "InGameUI__pf122804083.h" #include "GeneratedCodeHelpers.h" #include "Runtime/UMG/Public/Blueprint/WidgetTree.h" #include "Runtime/UMG/Public/Components/CanvasPanel.h" #include "Runtime/UMG/Public/Components/CanvasPanelSlot.h" #include "Runtime/UMG/Public/Components/Image.h" #include "Runtime/Engine/Classes/Engine/Texture2D.h" #include "Runtime/UMG/Public/Components/TextBlock.h" #include "Runtime/Engine/Classes/Engine/Font.h" #include "Runtime/UMG/Public/Components/HorizontalBox.h" #include "Runtime/UMG/Public/Components/HorizontalBoxSlot.h" #include "Runtime/UMG/Public/Components/ProgressBar.h" #include "Runtime/UMG/Public/Animation/WidgetAnimation.h" #include "Runtime/MovieScene/Public/MovieScene.h" #include "Runtime/UMG/Public/Components/Widget.h" #include "Runtime/UMG/Public/Components/Visual.h" #include "Runtime/CoreUObject/Public/UObject/NoExportTypes.h" #include "Runtime/UMG/Public/Blueprint/WidgetNavigation.h" #include "Runtime/SlateCore/Public/Input/NavigationReply.h" #include "Runtime/UMG/Public/Slate/WidgetTransform.h" #include "Runtime/SlateCore/Public/Styling/SlateTypes.h" #include "Runtime/Engine/Classes/GameFramework/PlayerController.h" #include "Runtime/Engine/Classes/GameFramework/Controller.h" #include "Runtime/Engine/Classes/GameFramework/Actor.h" #include "Runtime/Engine/Classes/Components/SceneComponent.h" #include "Runtime/Engine/Classes/Components/ActorComponent.h" #include "Runtime/Engine/Classes/Engine/EngineTypes.h" #include "Runtime/Engine/Classes/Engine/EngineBaseTypes.h" #include "Runtime/Engine/Classes/EdGraph/EdGraphPin.h" #include "Runtime/Engine/Classes/Engine/AssetUserData.h" #include "Runtime/Engine/Classes/Interfaces/Interface_AssetUserData.h" #include "Runtime/Engine/Classes/GameFramework/PhysicsVolume.h" #include "Runtime/Engine/Classes/GameFramework/Volume.h" #include "Runtime/Engine/Classes/Engine/Brush.h" #include "Runtime/Engine/Classes/Components/BrushComponent.h" #include "Runtime/Engine/Classes/Components/PrimitiveComponent.h" #include "Runtime/Engine/Classes/GameFramework/Pawn.h" #include "Runtime/Engine/Classes/GameFramework/PawnMovementComponent.h" #include "Runtime/Engine/Classes/GameFramework/NavMovementComponent.h" #include "Runtime/Engine/Classes/GameFramework/MovementComponent.h" #include "Runtime/Engine/Classes/PhysicalMaterials/PhysicalMaterial.h" #include "Runtime/Engine/Classes/Vehicles/TireType.h" #include "Runtime/Engine/Classes/Engine/DataAsset.h" #include "Runtime/Engine/Classes/PhysicalMaterials/PhysicalMaterialPropertyBase.h" #include "Runtime/Engine/Classes/PhysicsEngine/PhysicsSettingsEnums.h" #include "Runtime/Engine/Classes/Engine/NetSerialization.h" #include "Runtime/Engine/Classes/AI/Navigation/NavigationTypes.h" #include "Runtime/Engine/Classes/AI/Navigation/NavigationData.h" #include "Runtime/Engine/Classes/AI/Navigation/RecastNavMesh.h" #include "Runtime/Engine/Classes/GameFramework/PlayerState.h" #include "Runtime/Engine/Classes/GameFramework/Info.h" #include "Runtime/Engine/Classes/Components/BillboardComponent.h" #include "Runtime/Engine/Classes/Engine/Texture.h" #include "Runtime/Engine/Classes/GameFramework/OnlineReplStructs.h" #include "Runtime/CoreUObject/Public/UObject/CoreOnline.h" #include "Runtime/Engine/Classes/GameFramework/LocalMessage.h" #include "Runtime/Engine/Classes/GameFramework/EngineMessage.h" #include "Runtime/Engine/Classes/AI/Navigation/NavAgentInterface.h" #include "Runtime/AIModule/Classes/AIController.h" #include "Runtime/GameplayTasks/Classes/GameplayTaskResource.h" #include "Runtime/AIModule/Classes/Perception/AIPerceptionComponent.h" #include "Runtime/AIModule/Classes/Perception/AIPerceptionTypes.h" #include "Runtime/AIModule/Classes/Perception/AISense.h" #include "Runtime/AIModule/Classes/Perception/AIPerceptionSystem.h" #include "Runtime/AIModule/Classes/Perception/AISenseEvent.h" #include "Runtime/AIModule/Classes/Perception/AISenseConfig.h" #include "Runtime/AIModule/Classes/Navigation/PathFollowingComponent.h" #include "Runtime/AIModule/Classes/AIResourceInterface.h" #include "Runtime/Engine/Classes/AI/Navigation/NavFilters/NavigationQueryFilter.h" #include "Runtime/Engine/Classes/AI/Navigation/NavAreas/NavArea.h" #include "Runtime/GameplayTasks/Classes/GameplayTask.h" #include "Runtime/AIModule/Classes/BehaviorTree/BlackboardData.h" #include "Runtime/AIModule/Classes/BehaviorTree/BlackboardComponent.h" #include "Runtime/AIModule/Classes/BehaviorTree/Blackboard/BlackboardKeyType.h" #include "Runtime/AIModule/Classes/BrainComponent.h" #include "Runtime/AIModule/Classes/BehaviorTree/BehaviorTree.h" #include "Runtime/AIModule/Classes/BehaviorTree/BTCompositeNode.h" #include "Runtime/AIModule/Classes/BehaviorTree/BTNode.h" #include "Runtime/GameplayTasks/Classes/GameplayTaskOwnerInterface.h" #include "Runtime/AIModule/Classes/BehaviorTree/BTService.h" #include "Runtime/AIModule/Classes/BehaviorTree/BTAuxiliaryNode.h" #include "Runtime/AIModule/Classes/BehaviorTree/BTDecorator.h" #include "Runtime/AIModule/Classes/BehaviorTree/BehaviorTreeTypes.h" #include "Runtime/AIModule/Classes/BehaviorTree/BTTaskNode.h" #include "Runtime/AIModule/Classes/AITypes.h" #include "Runtime/GameplayTasks/Classes/GameplayTasksComponent.h" #include "Runtime/AIModule/Classes/Actions/PawnActionsComponent.h" #include "Runtime/AIModule/Classes/Actions/PawnAction.h" #include "Runtime/AIModule/Classes/Perception/AIPerceptionListenerInterface.h" #include "Runtime/AIModule/Classes/GenericTeamAgentInterface.h" #include "Runtime/Engine/Public/VisualLogger/VisualLoggerDebugSnapshotInterface.h" #include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h" #include "Runtime/Engine/Classes/Materials/MaterialInstance.h" #include "Runtime/Engine/Classes/Materials/MaterialInterface.h" #include "Runtime/Engine/Classes/Engine/SubsurfaceProfile.h" #include "Runtime/Engine/Classes/Materials/Material.h" #include "Runtime/Engine/Classes/Materials/MaterialExpression.h" #include "Runtime/Engine/Classes/Engine/BlendableInterface.h" #include "Runtime/Engine/Classes/Materials/MaterialInstanceBasePropertyOverrides.h" #include "Runtime/SlateCore/Public/Fonts/CompositeFont.h" #include "Runtime/SlateCore/Public/Fonts/FontBulkData.h" #include "Runtime/Engine/Classes/Engine/FontImportOptions.h" #include "Runtime/SlateCore/Public/Fonts/FontProviderInterface.h" #include "Runtime/Engine/Classes/PhysicsEngine/BodyInstance.h" #include "Runtime/InputCore/Classes/InputCoreTypes.h" #include "Runtime/Engine/Classes/AI/Navigation/NavRelevantInterface.h" #include "Runtime/Engine/Classes/PhysicsEngine/BodySetup.h" #include "Runtime/Engine/Classes/PhysicsEngine/BodySetupEnums.h" #include "Runtime/Engine/Classes/PhysicsEngine/AggregateGeom.h" #include "Runtime/Engine/Classes/PhysicsEngine/ConvexElem.h" #include "Runtime/Engine/Classes/PhysicsEngine/ShapeElem.h" #include "Runtime/Engine/Classes/PhysicsEngine/SphylElem.h" #include "Runtime/Engine/Classes/PhysicsEngine/BoxElem.h" #include "Runtime/Engine/Classes/PhysicsEngine/SphereElem.h" #include "Runtime/Engine/Classes/Components/InputComponent.h" #include "Runtime/Engine/Classes/Components/ChildActorComponent.h" #include "Runtime/Engine/Classes/GameFramework/DamageType.h" #include "Runtime/Engine/Classes/GameFramework/Character.h" #include "Runtime/Engine/Classes/Components/SkeletalMeshComponent.h" #include "Runtime/Engine/Classes/Components/SkinnedMeshComponent.h" #include "Runtime/Engine/Classes/Components/MeshComponent.h" #include "Runtime/Engine/Classes/Engine/SkeletalMesh.h" #include "Runtime/Engine/Classes/PhysicsEngine/PhysicsAsset.h" #include "Runtime/Engine/Public/BoneContainer.h" #include "Runtime/Engine/Classes/Animation/Skeleton.h" #include "Runtime/Engine/Classes/Animation/BlendProfile.h" #include "Runtime/Engine/Classes/Animation/SmartName.h" #include "Runtime/Engine/Classes/Engine/SkeletalMeshSocket.h" #include "Runtime/Engine/Classes/Interfaces/Interface_CollisionDataProvider.h" #include "Runtime/Engine/Classes/Animation/AnimInstance.h" #include "Runtime/Engine/Classes/Animation/AnimationAsset.h" #include "Runtime/Engine/Classes/Animation/AnimMetaData.h" #include "Runtime/Engine/Classes/Animation/AnimSequenceBase.h" #include "Runtime/Engine/Public/Animation/AnimCurveTypes.h" #include "Runtime/Engine/Classes/Curves/RichCurve.h" #include "Runtime/Engine/Classes/Curves/IndexedCurve.h" #include "Runtime/Engine/Classes/Curves/KeyHandle.h" #include "Runtime/Engine/Public/Animation/AnimTypes.h" #include "Runtime/Engine/Classes/Animation/AnimLinkableElement.h" #include "Runtime/Engine/Classes/Animation/AnimMontage.h" #include "Runtime/Engine/Classes/Animation/AnimCompositeBase.h" #include "Runtime/Engine/Public/AlphaBlend.h" #include "Runtime/Engine/Classes/Curves/CurveFloat.h" #include "Runtime/Engine/Classes/Curves/CurveBase.h" #include "Runtime/Engine/Classes/Animation/AnimNotifies/AnimNotifyState.h" #include "Runtime/Engine/Classes/Animation/AnimNotifies/AnimNotify.h" #include "Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h" #include "Runtime/Engine/Classes/GameFramework/RootMotionSource.h" #include "Runtime/Engine/Classes/AI/Navigation/NavigationAvoidanceTypes.h" #include "Runtime/Engine/Public/AI/RVOAvoidanceInterface.h" #include "Runtime/Engine/Classes/Interfaces/NetworkPredictionInterface.h" #include "Runtime/Engine/Classes/Components/CapsuleComponent.h" #include "Runtime/Engine/Classes/Components/ShapeComponent.h" #include "Runtime/Engine/Classes/AI/Navigation/NavAreas/NavArea_Obstacle.h" #include "Runtime/Engine/Classes/GameFramework/TouchInterface.h" #include "Runtime/Engine/Classes/Camera/CameraTypes.h" #include "Runtime/Engine/Classes/Camera/CameraAnim.h" #include "Runtime/Engine/Classes/Matinee/InterpGroup.h" #include "Runtime/Engine/Classes/Matinee/InterpTrack.h" #include "Runtime/Engine/Classes/Matinee/InterpTrackInst.h" #include "Runtime/Engine/Classes/Camera/CameraShake.h" #include "Runtime/Engine/Classes/Engine/Scene.h" #include "Runtime/Engine/Classes/Engine/TextureCube.h" #include "Runtime/Engine/Classes/Camera/CameraAnimInst.h" #include "Runtime/Engine/Classes/Matinee/InterpTrackInstMove.h" #include "Runtime/Engine/Classes/Matinee/InterpTrackMove.h" #include "Runtime/Engine/Classes/Matinee/InterpGroupInst.h" #include "Runtime/Engine/Classes/Camera/PlayerCameraManager.h" #include "Runtime/Engine/Classes/Particles/EmitterCameraLensEffectBase.h" #include "Runtime/Engine/Classes/Particles/Emitter.h" #include "Runtime/Engine/Classes/Particles/ParticleSystemComponent.h" #include "Runtime/Engine/Public/ParticleHelper.h" #include "Runtime/Engine/Classes/Particles/ParticleSystem.h" #include "Runtime/Engine/Classes/Particles/ParticleEmitter.h" #include "Runtime/Engine/Classes/Camera/CameraModifier.h" #include "Runtime/Engine/Classes/Camera/CameraActor.h" #include "Runtime/Engine/Classes/Camera/CameraComponent.h" #include "Runtime/Engine/Classes/Camera/CameraModifier_CameraShake.h" #include "Runtime/Engine/Classes/GameFramework/ForceFeedbackEffect.h" #include "Runtime/Engine/Classes/Sound/SoundBase.h" #include "Runtime/Engine/Classes/Sound/SoundEffectSource.h" #include "Runtime/Engine/Classes/Sound/SoundEffectPreset.h" #include "Runtime/Engine/Classes/Sound/SoundAttenuation.h" #include "Runtime/Engine/Classes/Sound/SoundConcurrency.h" #include "Runtime/Engine/Classes/Sound/SoundSubmix.h" #include "Runtime/Engine/Classes/Sound/SoundEffectSubmix.h" #include "Runtime/Engine/Classes/Sound/SoundClass.h" #include "Runtime/Engine/Classes/Sound/SoundMix.h" #include "Runtime/Engine/Classes/GameFramework/HUD.h" #include "Runtime/Engine/Classes/GameFramework/DebugTextInfo.h" #include "Runtime/Engine/Classes/Engine/Canvas.h" #include "Runtime/Engine/Classes/Debug/ReporterGraph.h" #include "Runtime/Engine/Classes/Debug/ReporterBase.h" #include "Runtime/Engine/Classes/GameFramework/SpectatorPawn.h" #include "Runtime/Engine/Classes/GameFramework/DefaultPawn.h" #include "Runtime/Engine/Classes/Components/StaticMeshComponent.h" #include "Runtime/Engine/Classes/Engine/StaticMesh.h" #include "Runtime/Engine/Classes/Components/SphereComponent.h" #include "Runtime/Engine/Classes/GameFramework/FloatingPawnMovement.h" #include "Runtime/Engine/Classes/GameFramework/SpectatorPawnMovement.h" #include "Runtime/Engine/Classes/Engine/LatentActionManager.h" #include "Runtime/Engine/Classes/Haptics/HapticFeedbackEffect_Base.h" #include "Runtime/Engine/Classes/Engine/NetConnection.h" #include "Runtime/Engine/Classes/Engine/Player.h" #include "Runtime/Engine/Classes/Engine/Channel.h" #include "Runtime/Engine/Classes/Engine/NetDriver.h" #include "Runtime/Engine/Classes/Engine/World.h" #include "Runtime/Engine/Classes/Engine/ChildConnection.h" #include "Runtime/Engine/Classes/GameFramework/PlayerInput.h" #include "Runtime/Engine/Classes/GameFramework/CheatManager.h" #include "Runtime/Engine/Classes/Engine/DebugCameraController.h" #include "Runtime/Engine/Classes/Components/DrawFrustumComponent.h" #include "Runtime/Engine/Classes/Matinee/InterpTrackInstDirector.h" #include "Runtime/UMG/Public/Components/PanelWidget.h" #include "Runtime/UMG/Public/Components/PanelSlot.h" #include "Runtime/SlateCore/Public/Styling/SlateBrush.h" #include "Runtime/SlateCore/Public/Styling/SlateColor.h" #include "Runtime/SlateCore/Public/Layout/Margin.h" #include "Runtime/SlateCore/Public/Input/Events.h" #include "Runtime/Engine/Classes/Slate/SlateBrushAsset.h" #include "Runtime/UMG/Public/Components/TextWidgetTypes.h" #include "Runtime/Slate/Public/Framework/Text/TextLayout.h" #include "Runtime/SlateCore/Public/Fonts/FontCache.h" #include "Runtime/SlateCore/Public/Fonts/SlateFontInfo.h" #include "Runtime/Slate/Public/Widgets/Notifications/SProgressBar.h" #include "Runtime/SlateCore/Public/Styling/SlateWidgetStyleAsset.h" #include "Runtime/SlateCore/Public/Styling/SlateWidgetStyleContainerBase.h" #include "Runtime/SlateCore/Public/Styling/SlateWidgetStyleContainerInterface.h" #include "Runtime/SlateCore/Public/Styling/SlateWidgetStyle.h" #include "Runtime/MovieSceneTracks/Public/Tracks/MovieSceneColorTrack.h" #include "Runtime/MovieSceneTracks/Public/Sections/MovieSceneColorSection.h" #include "InGameUI__pf122804083.h" #include "Runtime/MovieScene/Public/MovieSceneSequence.h" #include "Runtime/UMG/Public/Animation/WidgetAnimationBinding.h" #include "Runtime/MovieScene/Public/MovieSceneTrack.h" #include "Runtime/MovieScene/Public/MovieSceneBinding.h" #include "Runtime/MovieScene/Public/MovieScenePossessable.h" #include "Runtime/MovieScene/Public/MovieSceneSpawnable.h" #include "MyChar__pf2980937819.h" #include "Runtime/Engine/Classes/Components/AudioComponent.h" #include "Runtime/Engine/Classes/Sound/SoundWave.h" #include "Runtime/Engine/Classes/Sound/SoundGroups.h" #include "LoadingScreenxWesternOak__pfG3933423829.h" #include "DeadScreen__pf122804083.h" #include "Runtime/Engine/Classes/Kismet/GameplayStatics.h" #include "Runtime/Engine/Classes/Sound/ReverbEffect.h" #include "Runtime/Engine/Classes/Engine/Blueprint.h" #include "Runtime/Engine/Classes/Engine/BlueprintCore.h" #include "Runtime/Engine/Classes/GameFramework/SaveGame.h" #include "Runtime/Engine/Classes/Engine/GameInstance.h" #include "Runtime/Engine/Classes/GameFramework/OnlineSession.h" #include "Runtime/Engine/Classes/Engine/LocalPlayer.h" #include "Runtime/Engine/Classes/Engine/GameViewportClient.h" #include "Runtime/Engine/Classes/Engine/ScriptViewportClient.h" #include "Runtime/Engine/Classes/Engine/DebugDisplayProperty.h" #include "Runtime/Engine/Classes/Engine/Console.h" #include "Runtime/Engine/Classes/Engine/Engine.h" #include "Runtime/Engine/Classes/Engine/LevelScriptActor.h" #include "Runtime/Engine/Classes/GameFramework/GameUserSettings.h" #include "Runtime/Engine/Classes/PhysicsEngine/PhysicsCollisionHandler.h" #include "Runtime/Engine/Classes/AI/Navigation/AvoidanceManager.h" #include "Runtime/Engine/Classes/AI/Navigation/NavigationSystem.h" #include "Runtime/Engine/Classes/Kismet/BlueprintFunctionLibrary.h" #include "Runtime/Engine/Classes/AI/Navigation/NavigationPath.h" #include "Runtime/Engine/Classes/AI/Navigation/NavMeshBoundsVolume.h" #include "Runtime/Engine/Classes/GameFramework/WorldSettings.h" #include "Runtime/Engine/Classes/Sound/AudioVolume.h" #include "Runtime/Engine/Classes/GameFramework/GameNetworkManager.h" #include "Runtime/Engine/Classes/GameFramework/GameModeBase.h" #include "Runtime/Engine/Classes/GameFramework/GameStateBase.h" #include "Runtime/Engine/Classes/GameFramework/GameSession.h" #include "Runtime/Engine/Classes/GameFramework/DefaultPhysicsVolume.h" #include "DmgTypeBP_Environmental__pf2398200284.h" #include "Runtime/Engine/Classes/Engine/LevelStreaming.h" #include "Runtime/Engine/Classes/Engine/Level.h" #include "Runtime/Engine/Classes/Components/ModelComponent.h" #include "Runtime/Engine/Classes/Engine/LevelStreamingVolume.h" #include "Runtime/Engine/Classes/Sound/DialogueTypes.h" #include "Runtime/Engine/Classes/Sound/DialogueVoice.h" #include "Runtime/Engine/Classes/Sound/DialogueWave.h" #include "Runtime/Engine/Classes/Kismet/KismetMathLibrary.h" #include "Runtime/UMG/Public/Blueprint/DragDropOperation.h" #include "Runtime/Slate/Public/Widgets/Layout/Anchors.h" #include "Runtime/Engine/Classes/Kismet/KismetTextLibrary.h" #include "Runtime/Engine/Classes/Engine/BlueprintGeneratedClass.h" #include "Runtime/UMG/Public/Animation/UMGSequencePlayer.h" #include "Runtime/UMG/Public/Components/NamedSlotInterface.h" #include "BP_CrosshairShoot__pf122804083.h" #include "BP_Crosshair__pf122804083.h" #include "MyAnimBP_Mannequin__pf2980937819.h" #include "HandgunBullet__pf3442503945.h" #include "InfectedxAI__pfG897084639.h" #include "InfectedAnimBP__pf529494595.h" #include "M9xwxFlashlight__pfGG2403237688.h" #include "RunCamShake__pf2403237688.h" #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4883) #endif UInGameUI_C__pf122804083::UInGameUI_C__pf122804083(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { if(HasAnyFlags(RF_ClassDefaultObject) && (UInGameUI_C__pf122804083::StaticClass() == GetClass())) { UInGameUI_C__pf122804083::__CustomDynamicClassInitialization(CastChecked<UDynamicClass>(GetClass())); } } void UInGameUI_C__pf122804083::PostLoadSubobjects(FObjectInstancingGraph* OuterInstanceGraph) { Super::PostLoadSubobjects(OuterInstanceGraph); } void UInGameUI_C__pf122804083::__CustomDynamicClassInitialization(UDynamicClass* InDynamicClass) { ensure(0 == InDynamicClass->ReferencedConvertedFields.Num()); ensure(0 == InDynamicClass->MiscConvertedSubobjects.Num()); ensure(0 == InDynamicClass->DynamicBindingObjects.Num()); ensure(0 == InDynamicClass->ComponentTemplates.Num()); ensure(0 == InDynamicClass->Timelines.Num()); ensure(nullptr == InDynamicClass->AnimClassImplementation); InDynamicClass->AssembleReferenceTokenStream(); // List of all referenced converted classes extern UClass* Z_Construct_UClass_AMyChar_C__pf2980937819(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_AMyChar_C__pf2980937819()); extern UClass* Z_Construct_UClass_ULoadingScreenxWesternOak_C__pfG3933423829(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_ULoadingScreenxWesternOak_C__pfG3933423829()); extern UClass* Z_Construct_UClass_UDeadScreen_C__pf122804083(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_UDeadScreen_C__pf122804083()); extern UClass* Z_Construct_UClass_UBP_CrosshairShoot_C__pf122804083(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_UBP_CrosshairShoot_C__pf122804083()); extern UClass* Z_Construct_UClass_UBP_Crosshair_C__pf122804083(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_UBP_Crosshair_C__pf122804083()); extern UClass* Z_Construct_UClass_UMyAnimBP_Mannequin_C__pf2980937819(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_UMyAnimBP_Mannequin_C__pf2980937819()); extern UClass* Z_Construct_UClass_AHandgunBullet_C__pf3442503945(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_AHandgunBullet_C__pf3442503945()); extern UClass* Z_Construct_UClass_AInfectedxAI_C__pfG897084639(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_AInfectedxAI_C__pfG897084639()); extern UClass* Z_Construct_UClass_UInfectedAnimBP_C__pf529494595(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_UInfectedAnimBP_C__pf529494595()); extern UClass* Z_Construct_UClass_AM9xwxFlashlight_C__pfGG2403237688(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_AM9xwxFlashlight_C__pfGG2403237688()); extern UClass* Z_Construct_UClass_URunCamShake_C__pf2403237688(); InDynamicClass->ReferencedConvertedFields.Add(Z_Construct_UClass_URunCamShake_C__pf2403237688()); FConvertedBlueprintsDependencies::FillUsedAssetsInDynamicClass(InDynamicClass, &__StaticDependencies_DirectlyUsedAssets); auto __Local__0 = NewObject<UWidgetTree>(InDynamicClass, UWidgetTree::StaticClass(), TEXT("WidgetTree")); InDynamicClass->MiscConvertedSubobjects.Add(__Local__0); auto __Local__1 = NewObject<UWidgetAnimation>(InDynamicClass, UWidgetAnimation::StaticClass(), TEXT("FadeIn-UI_INST")); InDynamicClass->MiscConvertedSubobjects.Add(__Local__1); auto __Local__2 = NewObject<UWidgetAnimation>(InDynamicClass, UWidgetAnimation::StaticClass(), TEXT("TakingDamageAnim_INST")); InDynamicClass->MiscConvertedSubobjects.Add(__Local__2); auto __Local__3 = NewObject<UCanvasPanel>(__Local__0, UCanvasPanel::StaticClass(), TEXT("CanvasPanel_0")); auto& __Local__4 = (*(AccessPrivateProperty<TArray<UPanelSlot*> >((__Local__3), UPanelWidget::__PPO__Slots() ))); __Local__4 = TArray<UPanelSlot*> (); __Local__4.Reserve(33); auto __Local__5 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_29")); __Local__5->LayoutData.Offsets.Left = -48.000000f; __Local__5->LayoutData.Offsets.Top = -20.000000f; __Local__5->LayoutData.Offsets.Right = 2006.666748f; __Local__5->LayoutData.Offsets.Bottom = 1112.000000f; __Local__5->Parent = __Local__3; auto __Local__6 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("LowHealthScreen")); __Local__6->Brush.ImageSize = FVector2D(1920.000000, 1080.000000); auto& __Local__7 = (*(AccessPrivateProperty<UObject* >(&(__Local__6->Brush), FSlateBrush::__PPO__ResourceObject() ))); __Local__7 = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[0], ECastCheckedType::NullAllowed); __Local__6->Slot = __Local__5; __Local__6->Visibility = ESlateVisibility::Hidden; __Local__5->Content = __Local__6; __Local__4.Add(__Local__5); auto __Local__8 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_20")); __Local__8->LayoutData.Offsets.Left = -60.000000f; __Local__8->LayoutData.Offsets.Top = -56.000000f; __Local__8->LayoutData.Offsets.Right = 2052.000000f; __Local__8->LayoutData.Offsets.Bottom = 1200.000000f; __Local__8->Parent = __Local__3; auto __Local__9 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("DamageTaken")); auto& __Local__10 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__9->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__10 = FLinearColor(1.000000, 1.000000, 1.000000, 0.995000); __Local__9->ColorAndOpacity = FLinearColor(0.428691, 0.000000, 0.000000, 0.159000); __Local__9->Slot = __Local__8; __Local__9->Visibility = ESlateVisibility::Hidden; __Local__8->Content = __Local__9; __Local__4.Add(__Local__8); auto __Local__11 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_5")); __Local__11->LayoutData.Offsets.Left = 1604.000000f; __Local__11->LayoutData.Offsets.Top = 840.000000f; __Local__11->LayoutData.Offsets.Right = 294.888885f; __Local__11->LayoutData.Offsets.Bottom = 42.063488f; __Local__11->Parent = __Local__3; auto __Local__12 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("TransparentBG-Health")); __Local__12->ColorAndOpacity = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__12->Slot = __Local__11; __Local__12->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__11->Content = __Local__12; __Local__4.Add(__Local__11); auto __Local__13 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_10")); __Local__13->LayoutData.Offsets.Left = 1604.000000f; __Local__13->LayoutData.Offsets.Top = 884.000000f; __Local__13->LayoutData.Offsets.Right = 161.904770f; __Local__13->LayoutData.Offsets.Bottom = 102.047630f; __Local__13->Parent = __Local__3; auto __Local__14 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("TransparentBG-Gun")); auto& __Local__15 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__14->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__15 = FLinearColor(1.000000, 1.000000, 1.000000, 0.073000); __Local__14->ColorAndOpacity = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__14->Slot = __Local__13; __Local__14->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__13->Content = __Local__14; __Local__4.Add(__Local__13); auto __Local__16 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_16")); __Local__16->LayoutData.Offsets.Left = 1768.000000f; __Local__16->LayoutData.Offsets.Top = 784.000000f; __Local__16->LayoutData.Offsets.Right = 130.776566f; __Local__16->LayoutData.Offsets.Bottom = 100.813599f; __Local__16->Parent = __Local__3; auto __Local__17 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("TransparentBG-Ammo")); auto& __Local__18 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__17->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__18 = FLinearColor(1.000000, 1.000000, 1.000000, 0.073000); __Local__17->ColorAndOpacity = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__17->Slot = __Local__16; __Local__17->RenderTransform.Translation = FVector2D(-100.000000, 101.000000); __Local__16->Content = __Local__17; __Local__4.Add(__Local__16); auto __Local__19 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_6")); __Local__19->LayoutData.Offsets.Left = 1604.000000f; __Local__19->LayoutData.Offsets.Top = 836.000000f; __Local__19->LayoutData.Offsets.Right = 292.222229f; __Local__19->LayoutData.Offsets.Bottom = 2.563488f; __Local__19->Parent = __Local__3; auto __Local__20 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("Details-1")); __Local__20->ColorAndOpacity = FLinearColor(0.435000, 0.435000, 0.435000, 0.000000); __Local__20->Slot = __Local__19; __Local__20->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__19->Content = __Local__20; __Local__4.Add(__Local__19); auto __Local__21 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_7")); __Local__21->LayoutData.Offsets.Left = 1768.000000f; __Local__21->LayoutData.Offsets.Top = 988.000000f; __Local__21->LayoutData.Offsets.Right = 131.015869f; __Local__21->LayoutData.Offsets.Bottom = 3.706345f; __Local__21->Parent = __Local__3; auto __Local__22 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("Details-2")); __Local__22->ColorAndOpacity = FLinearColor(0.435000, 0.435000, 0.435000, 0.000000); __Local__22->Slot = __Local__21; __Local__22->RenderTransform.Translation = FVector2D(-99.833328, 0.000000); __Local__21->Content = __Local__22; __Local__4.Add(__Local__21); auto __Local__23 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_8")); __Local__23->LayoutData.Offsets.Left = 1604.000000f; __Local__23->LayoutData.Offsets.Top = 988.000000f; __Local__23->LayoutData.Offsets.Right = 162.197693f; __Local__23->LayoutData.Offsets.Bottom = 3.706345f; __Local__23->Parent = __Local__3; auto __Local__24 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("Details-3")); __Local__24->ColorAndOpacity = FLinearColor(0.435000, 0.435000, 0.435000, 0.000000); __Local__24->Slot = __Local__23; __Local__24->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__23->Content = __Local__24; __Local__4.Add(__Local__23); auto __Local__25 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_9")); __Local__25->LayoutData.Offsets.Left = 1596.000000f; __Local__25->LayoutData.Offsets.Top = 840.000000f; __Local__25->LayoutData.Offsets.Right = 4.539673f; __Local__25->LayoutData.Offsets.Bottom = 145.763489f; __Local__25->Parent = __Local__3; auto __Local__26 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("Details-4")); __Local__26->ColorAndOpacity = FLinearColor(0.435000, 0.435000, 0.435000, 0.000000); __Local__26->Slot = __Local__25; __Local__26->Visibility = ESlateVisibility::Hidden; __Local__26->RenderTransform.Translation = FVector2D(-99.000000, 0.000000); __Local__25->Content = __Local__26; __Local__4.Add(__Local__25); auto __Local__27 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_2")); __Local__27->LayoutData.Offsets.Left = 1548.000000f; __Local__27->LayoutData.Offsets.Top = 836.000000f; __Local__27->LayoutData.Offsets.Right = 257.037018f; __Local__27->LayoutData.Offsets.Bottom = 190.666656f; __Local__27->Parent = __Local__3; auto __Local__28 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("Gun")); __Local__28->Brush.ImageSize = FVector2D(2048.000000, 1556.000000); auto& __Local__29 = (*(AccessPrivateProperty<UObject* >(&(__Local__28->Brush), FSlateBrush::__PPO__ResourceObject() ))); __Local__29 = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[1], ECastCheckedType::NullAllowed); __Local__28->ColorAndOpacity = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__28->Slot = __Local__27; __Local__28->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__27->Content = __Local__28; __Local__4.Add(__Local__27); auto __Local__30 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_4")); __Local__30->LayoutData.Offsets.Left = 1512.000000f; __Local__30->LayoutData.Offsets.Top = 924.000000f; __Local__30->LayoutData.Offsets.Right = 137.399994f; __Local__30->LayoutData.Offsets.Bottom = 22.799999f; __Local__30->Parent = __Local__3; auto __Local__31 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("OutOfAmmo")); __Local__31->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("OUT OF AMMO"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("3EB5C594419CC738A7349FB5A8F561DC") /* Key */ ); auto& __Local__32 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__31->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__32 = FLinearColor(1.000000, 0.019754, 0.000000, 0.000000); __Local__31->Font.Size = 14; __Local__31->bIsVariable = true; __Local__31->Slot = __Local__30; __Local__31->Visibility = ESlateVisibility::Hidden; __Local__30->Content = __Local__31; __Local__4.Add(__Local__30); auto __Local__33 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_0")); __Local__33->LayoutData.Offsets.Left = 1780.000000f; __Local__33->LayoutData.Offsets.Top = 784.000000f; __Local__33->LayoutData.Offsets.Right = 115.142868f; __Local__33->LayoutData.Offsets.Bottom = 56.647621f; __Local__33->Parent = __Local__3; auto __Local__34 = NewObject<UHorizontalBox>(__Local__0, UHorizontalBox::StaticClass(), TEXT("AmmoCount")); auto& __Local__35 = (*(AccessPrivateProperty<TArray<UPanelSlot*> >((__Local__34), UPanelWidget::__PPO__Slots() ))); __Local__35 = TArray<UPanelSlot*> (); __Local__35.Reserve(3); auto __Local__36 = NewObject<UHorizontalBoxSlot>(__Local__34, UHorizontalBoxSlot::StaticClass(), TEXT("HorizontalBoxSlot_0")); __Local__36->Parent = __Local__34; auto __Local__37 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("AmmoInMag")); __Local__37->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("00"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("AA4C2DBD4B1A11064348F59C10B546C7") /* Key */ ); auto& __Local__38 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__37->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__38 = FLinearColor(0.783538, 0.765150, 0.554860, 0.969000); __Local__37->Font.Size = 37; __Local__37->ShadowOffset = FVector2D(-0.233095, 0.817752); __Local__37->Slot = __Local__36; __Local__36->Content = __Local__37; __Local__35.Add(__Local__36); auto __Local__39 = NewObject<UHorizontalBoxSlot>(__Local__34, UHorizontalBoxSlot::StaticClass(), TEXT("HorizontalBoxSlot_1")); __Local__39->Parent = __Local__34; auto __Local__40 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("Divider")); __Local__40->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("/"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("03F96AE44F6FA7FE825D2D8D76AE01FA") /* Key */ ); auto& __Local__41 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__40->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__41 = FLinearColor(0.158961, 0.462077, 0.068478, 1.000000); __Local__40->Font.Size = 17; __Local__40->Slot = __Local__39; __Local__40->RenderTransform.Translation = FVector2D(0.000000, 10.000000); __Local__39->Content = __Local__40; __Local__35.Add(__Local__39); auto __Local__42 = NewObject<UHorizontalBoxSlot>(__Local__34, UHorizontalBoxSlot::StaticClass(), TEXT("HorizontalBoxSlot_2")); __Local__42->Parent = __Local__34; auto __Local__43 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("AmmoReserved")); __Local__43->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("000"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("A6A97EED46A7CC13281E819875EFA198") /* Key */ ); auto& __Local__44 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__43->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__44 = FLinearColor(0.158961, 0.462077, 0.068478, 1.000000); __Local__43->Font.Size = 17; __Local__43->Slot = __Local__42; __Local__43->RenderTransform.Translation = FVector2D(0.000000, 10.000000); __Local__42->Content = __Local__43; __Local__35.Add(__Local__42); __Local__34->Slot = __Local__33; __Local__34->RenderTransform.Translation = FVector2D(-100.000000, 101.000000); __Local__33->Content = __Local__34; __Local__4.Add(__Local__33); auto __Local__45 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_1")); __Local__45->LayoutData.Offsets.Left = 1592.000000f; __Local__45->LayoutData.Offsets.Top = 836.000000f; __Local__45->LayoutData.Offsets.Right = 304.513275f; __Local__45->LayoutData.Offsets.Bottom = 102.761909f; __Local__45->Parent = __Local__3; auto __Local__46 = NewObject<UProgressBar>(__Local__0, UProgressBar::StaticClass(), TEXT("HealthBar_Empty")); __Local__46->WidgetStyle.BackgroundImage.ImageSize = FVector2D(822.000000, 393.000000); __Local__46->WidgetStyle.BackgroundImage.Margin.Left = 0.416667f; __Local__46->WidgetStyle.BackgroundImage.Margin.Top = 0.416667f; __Local__46->WidgetStyle.BackgroundImage.Margin.Right = 0.416667f; __Local__46->WidgetStyle.BackgroundImage.Margin.Bottom = 0.416667f; auto& __Local__47 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__46->WidgetStyle.BackgroundImage.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__47 = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__46->WidgetStyle.FillImage.ImageSize = FVector2D(1822.139893, 393.000000); __Local__46->WidgetStyle.FillImage.DrawAs = ESlateBrushDrawType::Type::Image; __Local__46->WidgetStyle.FillImage.Margin.Left = 0.416667f; __Local__46->WidgetStyle.FillImage.Margin.Top = 0.416667f; __Local__46->WidgetStyle.FillImage.Margin.Right = 0.416667f; __Local__46->WidgetStyle.FillImage.Margin.Bottom = 0.416667f; auto& __Local__48 = (*(AccessPrivateProperty<UObject* >(&(__Local__46->WidgetStyle.FillImage), FSlateBrush::__PPO__ResourceObject() ))); __Local__48 = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[2], ECastCheckedType::NullAllowed); __Local__46->Percent = 1.000000f; __Local__46->FillColorAndOpacity = FLinearColor(0.032885, 0.040000, 0.029800, 0.000000); __Local__46->Slot = __Local__45; __Local__46->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__45->Content = __Local__46; __Local__4.Add(__Local__45); auto __Local__49 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_13")); __Local__49->LayoutData.Offsets.Left = 1592.000000f; __Local__49->LayoutData.Offsets.Top = 836.000000f; __Local__49->LayoutData.Offsets.Right = 305.128418f; __Local__49->LayoutData.Offsets.Bottom = 103.266457f; __Local__49->Parent = __Local__3; auto __Local__50 = NewObject<UProgressBar>(__Local__0, UProgressBar::StaticClass(), TEXT("HealthBar_Full")); __Local__50->WidgetStyle.BackgroundImage.ImageSize = FVector2D(822.000000, 393.000000); __Local__50->WidgetStyle.BackgroundImage.Margin.Left = 0.416667f; __Local__50->WidgetStyle.BackgroundImage.Margin.Top = 0.416667f; __Local__50->WidgetStyle.BackgroundImage.Margin.Right = 0.416667f; __Local__50->WidgetStyle.BackgroundImage.Margin.Bottom = 0.416667f; auto& __Local__51 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__50->WidgetStyle.BackgroundImage.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__51 = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__50->WidgetStyle.FillImage.ImageSize = FVector2D(822.000000, 393.000000); __Local__50->WidgetStyle.FillImage.DrawAs = ESlateBrushDrawType::Type::Image; __Local__50->WidgetStyle.FillImage.Margin.Left = 0.416667f; __Local__50->WidgetStyle.FillImage.Margin.Top = 0.416667f; __Local__50->WidgetStyle.FillImage.Margin.Right = 0.416667f; __Local__50->WidgetStyle.FillImage.Margin.Bottom = 0.416667f; auto& __Local__52 = (*(AccessPrivateProperty<UObject* >(&(__Local__50->WidgetStyle.FillImage), FSlateBrush::__PPO__ResourceObject() ))); __Local__52 = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[2], ECastCheckedType::NullAllowed); __Local__50->Percent = 1.000000f; __Local__50->FillColorAndOpacity = FLinearColor(0.591130, 0.710000, 0.539600, 0.000000); __Local__50->Slot = __Local__49; __Local__50->RenderTransform.Translation = FVector2D(-100.000000, 0.000000); __Local__49->Content = __Local__50; __Local__4.Add(__Local__49); auto __Local__53 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_25")); __Local__53->LayoutData.Offsets.Left = 1489.000000f; __Local__53->LayoutData.Offsets.Top = 59.833332f; __Local__53->LayoutData.Offsets.Right = 431.047607f; __Local__53->LayoutData.Offsets.Bottom = 38.666668f; __Local__53->Parent = __Local__3; auto __Local__54 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("BgOfChapter")); auto& __Local__55 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__54->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__55 = FLinearColor(0.000000, 0.000000, 0.000000, 0.500000); __Local__54->ColorAndOpacity = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__54->Slot = __Local__53; __Local__53->Content = __Local__54; __Local__4.Add(__Local__53); auto __Local__56 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_28")); __Local__56->LayoutData.Offsets.Left = 1512.000000f; __Local__56->LayoutData.Offsets.Top = 28.000000f; __Local__56->LayoutData.Offsets.Right = 388.333344f; __Local__56->LayoutData.Offsets.Bottom = 132.000000f; __Local__56->Parent = __Local__3; auto __Local__57 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("ChapterText")); __Local__57->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Chapter 1"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("EFEB3F654D60FDDCEF833F9CEFF0C0D0") /* Key */ ); auto& __Local__58 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__57->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__58 = FLinearColor(0.650000, 0.650000, 0.650000, 0.000000); __Local__57->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[3], ECastCheckedType::NullAllowed); __Local__57->Font.TypefaceFontName = FName(TEXT("Default")); __Local__57->bIsVariable = true; __Local__57->Slot = __Local__56; __Local__56->Content = __Local__57; __Local__4.Add(__Local__56); auto __Local__59 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_22")); __Local__59->LayoutData.Offsets.Left = 1489.000000f; __Local__59->LayoutData.Offsets.Top = 104.000000f; __Local__59->LayoutData.Offsets.Right = 435.000000f; __Local__59->LayoutData.Offsets.Bottom = 53.000000f; __Local__59->Parent = __Local__3; auto __Local__60 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("BgOfObjective")); auto& __Local__61 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__60->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__61 = FLinearColor(0.000000, 0.000000, 0.000000, 0.500000); __Local__60->ColorAndOpacity = FLinearColor(1.000000, 1.000000, 1.000000, 0.000000); __Local__60->Slot = __Local__59; __Local__59->Content = __Local__60; __Local__4.Add(__Local__59); auto __Local__62 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_26")); __Local__62->LayoutData.Offsets.Left = 1516.000000f; __Local__62->LayoutData.Offsets.Top = 80.000000f; __Local__62->LayoutData.Offsets.Right = 388.333344f; __Local__62->LayoutData.Offsets.Bottom = 76.000000f; __Local__62->Parent = __Local__3; auto __Local__63 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("ObjectiveText-CH2")); __Local__63->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Return to the safehouse"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("86AD5A874FE7B5F296B01482BE25C1D2") /* Key */ ); auto& __Local__64 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__63->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__64 = FLinearColor(0.650000, 0.650000, 0.650000, 1.000000); __Local__63->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[3], ECastCheckedType::NullAllowed); __Local__63->Font.TypefaceFontName = FName(TEXT("Default")); __Local__63->bIsVariable = true; __Local__63->Slot = __Local__62; __Local__63->Visibility = ESlateVisibility::Hidden; __Local__62->Content = __Local__63; __Local__4.Add(__Local__62); auto __Local__65 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_30")); __Local__65->LayoutData.Offsets.Left = 1512.000000f; __Local__65->LayoutData.Offsets.Top = 28.000000f; __Local__65->LayoutData.Offsets.Right = 388.333344f; __Local__65->LayoutData.Offsets.Bottom = 132.000000f; __Local__65->Parent = __Local__3; auto __Local__66 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("Chapter2Text")); __Local__66->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Chapter 2"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("BAE24CD740F774EABBDA0A8E51A1E3EB") /* Key */ ); auto& __Local__67 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__66->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__67 = FLinearColor(0.650000, 0.650000, 0.650000, 1.000000); __Local__66->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[3], ECastCheckedType::NullAllowed); __Local__66->Font.TypefaceFontName = FName(TEXT("Default")); __Local__66->bIsVariable = true; __Local__66->Slot = __Local__65; __Local__66->Visibility = ESlateVisibility::Hidden; __Local__65->Content = __Local__66; __Local__4.Add(__Local__65); auto __Local__68 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_27")); __Local__68->LayoutData.Offsets.Left = 1512.000000f; __Local__68->LayoutData.Offsets.Top = 80.000000f; __Local__68->LayoutData.Offsets.Right = 388.333344f; __Local__68->LayoutData.Offsets.Bottom = 76.000000f; __Local__68->Parent = __Local__3; auto __Local__69 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("ObjectiveText")); __Local__69->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Find an exit before nightfall"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("25A4906F4867E84DBB9011A2D8A4929E") /* Key */ ); auto& __Local__70 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__69->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__70 = FLinearColor(0.650000, 0.650000, 0.650000, 0.000000); __Local__69->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[3], ECastCheckedType::NullAllowed); __Local__69->Font.TypefaceFontName = FName(TEXT("Default")); __Local__69->bIsVariable = true; __Local__69->Slot = __Local__68; __Local__68->Content = __Local__69; __Local__4.Add(__Local__68); auto __Local__71 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_35")); __Local__71->LayoutData.Offsets.Left = 1512.000000f; __Local__71->LayoutData.Offsets.Top = 80.000000f; __Local__71->LayoutData.Offsets.Right = 388.333344f; __Local__71->LayoutData.Offsets.Bottom = 76.000000f; __Local__71->Parent = __Local__3; auto __Local__72 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("ObjectiveText-02")); __Local__72->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Find a way to open the gate"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("4728788A41026073E5DF6CBD88FE1765") /* Key */ ); auto& __Local__73 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__72->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__73 = FLinearColor(0.650000, 0.650000, 0.650000, 1.000000); __Local__72->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[3], ECastCheckedType::NullAllowed); __Local__72->Font.TypefaceFontName = FName(TEXT("Default")); __Local__72->bIsVariable = true; __Local__72->Slot = __Local__71; __Local__72->Visibility = ESlateVisibility::Hidden; __Local__71->Content = __Local__72; __Local__4.Add(__Local__71); auto __Local__74 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_36")); __Local__74->LayoutData.Offsets.Left = 1512.000000f; __Local__74->LayoutData.Offsets.Top = 80.000000f; __Local__74->LayoutData.Offsets.Right = 388.333344f; __Local__74->LayoutData.Offsets.Bottom = 76.000000f; __Local__74->Parent = __Local__3; auto __Local__75 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("ObjectiveText-03")); __Local__75->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Leave the area"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("DAB18513455917F3D39987AB6F001D82") /* Key */ ); auto& __Local__76 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__75->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__76 = FLinearColor(0.650000, 0.650000, 0.650000, 1.000000); __Local__75->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[3], ECastCheckedType::NullAllowed); __Local__75->Font.TypefaceFontName = FName(TEXT("Default")); __Local__75->bIsVariable = true; __Local__75->Slot = __Local__74; __Local__75->Visibility = ESlateVisibility::Hidden; __Local__74->Content = __Local__75; __Local__4.Add(__Local__74); auto __Local__77 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_14")); __Local__77->LayoutData.Offsets.Left = 1544.000000f; __Local__77->LayoutData.Offsets.Top = 669.500000f; __Local__77->LayoutData.Offsets.Right = 296.000000f; __Local__77->LayoutData.Offsets.Bottom = 156.785721f; __Local__77->Parent = __Local__3; auto __Local__78 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("Image_245")); __Local__78->Brush.ImageSize = FVector2D(800.000000, 800.000000); auto& __Local__79 = (*(AccessPrivateProperty<UObject* >(&(__Local__78->Brush), FSlateBrush::__PPO__ResourceObject() ))); __Local__79 = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[4], ECastCheckedType::NullAllowed); __Local__78->Slot = __Local__77; __Local__78->RenderTransform.Translation = FVector2D(-39.999985, 165.714294); __Local__77->Content = __Local__78; __Local__4.Add(__Local__77); auto __Local__80 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_37")); __Local__80->LayoutData.Offsets.Left = 820.000000f; __Local__80->LayoutData.Offsets.Top = 928.000000f; __Local__80->LayoutData.Offsets.Right = 282.857147f; __Local__80->LayoutData.Offsets.Bottom = 46.285717f; __Local__80->Parent = __Local__3; auto __Local__81 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("InteractionBG-03")); auto& __Local__82 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__81->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__82 = FLinearColor(0.000000, 0.000000, 0.000000, 0.400000); __Local__81->Slot = __Local__80; __Local__81->Visibility = ESlateVisibility::Hidden; __Local__80->Content = __Local__81; __Local__4.Add(__Local__80); auto __Local__83 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_34")); __Local__83->LayoutData.Offsets.Left = 820.000000f; __Local__83->LayoutData.Offsets.Top = 928.000000f; __Local__83->LayoutData.Offsets.Right = 282.857147f; __Local__83->LayoutData.Offsets.Bottom = 46.285717f; __Local__83->Parent = __Local__3; auto __Local__84 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("InteractionBG-02")); auto& __Local__85 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__84->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__85 = FLinearColor(0.000000, 0.000000, 0.000000, 0.400000); __Local__84->Slot = __Local__83; __Local__84->Visibility = ESlateVisibility::Hidden; __Local__83->Content = __Local__84; __Local__4.Add(__Local__83); auto __Local__86 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_15")); __Local__86->LayoutData.Offsets.Left = 818.857117f; __Local__86->LayoutData.Offsets.Top = 925.714294f; __Local__86->LayoutData.Offsets.Right = 282.857147f; __Local__86->LayoutData.Offsets.Bottom = 46.285717f; __Local__86->Parent = __Local__3; auto __Local__87 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("interactionBG")); auto& __Local__88 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__87->Brush.TintColor), FSlateColor::__PPO__SpecifiedColor() ))); __Local__88 = FLinearColor(0.000000, 0.000000, 0.000000, 0.400000); __Local__87->Slot = __Local__86; __Local__87->Visibility = ESlateVisibility::Hidden; __Local__86->Content = __Local__87; __Local__4.Add(__Local__86); auto __Local__89 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_11")); __Local__89->LayoutData.Offsets.Left = 848.000000f; __Local__89->LayoutData.Offsets.Top = 928.000000f; __Local__89->LayoutData.Offsets.Right = 265.095245f; __Local__89->LayoutData.Offsets.Bottom = 40.000000f; __Local__89->Parent = __Local__3; auto __Local__90 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("Presspick")); __Local__90->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Press to pick up"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("BF489AD140E858E834CC33AA940BE6DD") /* Key */ ); __Local__90->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[5], ECastCheckedType::NullAllowed); __Local__90->Font.TypefaceFontName = FName(TEXT("Default")); __Local__90->bIsVariable = true; __Local__90->Slot = __Local__89; __Local__89->Content = __Local__90; __Local__4.Add(__Local__89); auto __Local__91 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_17")); __Local__91->LayoutData.Offsets.Left = 924.000000f; __Local__91->LayoutData.Offsets.Top = 928.000000f; __Local__91->LayoutData.Offsets.Right = 265.095245f; __Local__91->LayoutData.Offsets.Bottom = 40.000000f; __Local__91->Parent = __Local__3; auto __Local__92 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("E")); __Local__92->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("E"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("00895BB848550C11941021890AD03A9B") /* Key */ ); auto& __Local__93 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__92->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__93 = FLinearColor(1.000000, 0.854317, 0.000000, 1.000000); __Local__92->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[6], ECastCheckedType::NullAllowed); __Local__92->Font.TypefaceFontName = FName(TEXT("Default")); __Local__92->bIsVariable = true; __Local__92->Slot = __Local__91; __Local__92->RenderTransform.Translation = FVector2D(1.000000, 0.000000); __Local__91->Content = __Local__92; __Local__4.Add(__Local__91); auto __Local__94 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_18")); __Local__94->LayoutData.Offsets.Left = 828.000000f; __Local__94->LayoutData.Offsets.Top = 928.000000f; __Local__94->LayoutData.Offsets.Right = 265.095245f; __Local__94->LayoutData.Offsets.Bottom = 40.000000f; __Local__94->Parent = __Local__3; auto __Local__95 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("opengate")); __Local__95->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Press to open gate"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("246C981A4900EDACE3CE77933B0FE5EA") /* Key */ ); __Local__95->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[5], ECastCheckedType::NullAllowed); __Local__95->Font.TypefaceFontName = FName(TEXT("Default")); __Local__95->bIsVariable = true; __Local__95->Slot = __Local__94; __Local__95->Visibility = ESlateVisibility::Hidden; __Local__94->Content = __Local__95; __Local__4.Add(__Local__94); auto __Local__96 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_19")); __Local__96->LayoutData.Offsets.Left = 904.000000f; __Local__96->LayoutData.Offsets.Top = 928.000000f; __Local__96->LayoutData.Offsets.Right = 265.095245f; __Local__96->LayoutData.Offsets.Bottom = 40.000000f; __Local__96->Parent = __Local__3; auto __Local__97 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("egate")); __Local__97->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("E"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("9048A8A6485976A93D4A0E9DDD6F5121") /* Key */ ); auto& __Local__98 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__97->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__98 = FLinearColor(1.000000, 0.854317, 0.000000, 1.000000); __Local__97->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[6], ECastCheckedType::NullAllowed); __Local__97->Font.TypefaceFontName = FName(TEXT("Default")); __Local__97->bIsVariable = true; __Local__97->Slot = __Local__96; __Local__97->RenderTransform.Translation = FVector2D(1.000000, 0.000000); __Local__96->Content = __Local__97; __Local__4.Add(__Local__96); auto __Local__99 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_21")); __Local__99->LayoutData.Offsets.Left = 864.000000f; __Local__99->LayoutData.Offsets.Top = 928.000000f; __Local__99->LayoutData.Offsets.Right = 265.095245f; __Local__99->LayoutData.Offsets.Bottom = 40.000000f; __Local__99->Parent = __Local__3; auto __Local__100 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("pressview")); __Local__100->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("Press to view"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("C2E6FC4648FC7DB0D2F99B882B1E7DF0") /* Key */ ); __Local__100->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[5], ECastCheckedType::NullAllowed); __Local__100->Font.TypefaceFontName = FName(TEXT("Default")); __Local__100->bIsVariable = true; __Local__100->Slot = __Local__99; __Local__100->Visibility = ESlateVisibility::Hidden; __Local__99->Content = __Local__100; __Local__4.Add(__Local__99); auto __Local__101 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_23")); __Local__101->LayoutData.Offsets.Left = 940.000000f; __Local__101->LayoutData.Offsets.Top = 928.000000f; __Local__101->LayoutData.Offsets.Right = 265.095245f; __Local__101->LayoutData.Offsets.Bottom = 40.000000f; __Local__101->Parent = __Local__3; auto __Local__102 = NewObject<UTextBlock>(__Local__0, UTextBlock::StaticClass(), TEXT("V")); __Local__102->Text = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("V"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("8F5FB88A44A2CF6082A8A8B000F6A8F1") /* Key */ ); auto& __Local__103 = (*(AccessPrivateProperty<FLinearColor >(&(__Local__102->ColorAndOpacity), FSlateColor::__PPO__SpecifiedColor() ))); __Local__103 = FLinearColor(1.000000, 0.854317, 0.000000, 1.000000); __Local__102->Font.FontObject = CastChecked<UObject>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[6], ECastCheckedType::NullAllowed); __Local__102->Font.TypefaceFontName = FName(TEXT("Default")); __Local__102->bIsVariable = true; __Local__102->Slot = __Local__101; __Local__102->Visibility = ESlateVisibility::Hidden; __Local__102->RenderTransform.Translation = FVector2D(1.000000, 0.000000); __Local__101->Content = __Local__102; __Local__4.Add(__Local__101); auto __Local__104 = NewObject<UCanvasPanelSlot>(__Local__3, UCanvasPanelSlot::StaticClass(), TEXT("CanvasPanelSlot_31")); __Local__104->LayoutData.Offsets.Left = -148.000000f; __Local__104->LayoutData.Offsets.Top = -36.000000f; __Local__104->LayoutData.Offsets.Right = 2180.000000f; __Local__104->LayoutData.Offsets.Bottom = 1136.000000f; __Local__104->Parent = __Local__3; auto __Local__105 = NewObject<UImage>(__Local__0, UImage::StaticClass(), TEXT("fadein")); __Local__105->ColorAndOpacity = FLinearColor(0.000000, 0.000000, 0.000000, 0.000000); __Local__105->Slot = __Local__104; __Local__104->Content = __Local__105; __Local__4.Add(__Local__104); __Local__0->RootWidget = __Local__3; auto __Local__106 = NewObject<UMovieScene>(__Local__1, UMovieScene::StaticClass(), TEXT("FadeIn-UI")); auto& __Local__107 = (*(AccessPrivateProperty<TArray<FMovieScenePossessable> >((__Local__106), UMovieScene::__PPO__Possessables() ))); __Local__107 = TArray<FMovieScenePossessable> (); __Local__107.AddUninitialized(18); FMovieScenePossessable::StaticStruct()->InitializeStruct(__Local__107.GetData(), 18); auto& __Local__108 = __Local__107[0]; auto& __Local__109 = (*(AccessPrivateProperty<FGuid >(&(__Local__108), FMovieScenePossessable::__PPO__Guid() ))); __Local__109 = FGuid(0x35B55384, 0x4B3A6FA2, 0x6F85EEAB, 0xD9E39BB0); auto& __Local__110 = (*(AccessPrivateProperty<FString >(&(__Local__108), FMovieScenePossessable::__PPO__Name() ))); __Local__110 = FString(TEXT("Details-4")); auto& __Local__111 = (*(AccessPrivateProperty<UClass* >(&(__Local__108), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__111 = UImage::StaticClass(); auto& __Local__112 = __Local__107[1]; auto& __Local__113 = (*(AccessPrivateProperty<FGuid >(&(__Local__112), FMovieScenePossessable::__PPO__Guid() ))); __Local__113 = FGuid(0x131C8D9C, 0x43268B80, 0x4570D48A, 0xD19B30A6); auto& __Local__114 = (*(AccessPrivateProperty<FString >(&(__Local__112), FMovieScenePossessable::__PPO__Name() ))); __Local__114 = FString(TEXT("Details-1")); auto& __Local__115 = (*(AccessPrivateProperty<UClass* >(&(__Local__112), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__115 = UImage::StaticClass(); auto& __Local__116 = __Local__107[2]; auto& __Local__117 = (*(AccessPrivateProperty<FGuid >(&(__Local__116), FMovieScenePossessable::__PPO__Guid() ))); __Local__117 = FGuid(0xA3D67332, 0x489F176F, 0x9E51C2A1, 0x7E9577F7); auto& __Local__118 = (*(AccessPrivateProperty<FString >(&(__Local__116), FMovieScenePossessable::__PPO__Name() ))); __Local__118 = FString(TEXT("Details-2")); auto& __Local__119 = (*(AccessPrivateProperty<UClass* >(&(__Local__116), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__119 = UImage::StaticClass(); auto& __Local__120 = __Local__107[3]; auto& __Local__121 = (*(AccessPrivateProperty<FGuid >(&(__Local__120), FMovieScenePossessable::__PPO__Guid() ))); __Local__121 = FGuid(0xA703D03F, 0x4C3C8ECE, 0x5B999692, 0x148FAFCF); auto& __Local__122 = (*(AccessPrivateProperty<FString >(&(__Local__120), FMovieScenePossessable::__PPO__Name() ))); __Local__122 = FString(TEXT("Details-3")); auto& __Local__123 = (*(AccessPrivateProperty<UClass* >(&(__Local__120), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__123 = UImage::StaticClass(); auto& __Local__124 = __Local__107[4]; auto& __Local__125 = (*(AccessPrivateProperty<FGuid >(&(__Local__124), FMovieScenePossessable::__PPO__Guid() ))); __Local__125 = FGuid(0x6C3E4987, 0x40DCB91F, 0x14A70CA2, 0x21B875BE); auto& __Local__126 = (*(AccessPrivateProperty<FString >(&(__Local__124), FMovieScenePossessable::__PPO__Name() ))); __Local__126 = FString(TEXT("TransparentBG-Health")); auto& __Local__127 = (*(AccessPrivateProperty<UClass* >(&(__Local__124), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__127 = UImage::StaticClass(); auto& __Local__128 = __Local__107[5]; auto& __Local__129 = (*(AccessPrivateProperty<FGuid >(&(__Local__128), FMovieScenePossessable::__PPO__Guid() ))); __Local__129 = FGuid(0x75BB6B58, 0x4E61B2DB, 0x126FB3A5, 0x80D778A5); auto& __Local__130 = (*(AccessPrivateProperty<FString >(&(__Local__128), FMovieScenePossessable::__PPO__Name() ))); __Local__130 = FString(TEXT("TransparentBG-Gun")); auto& __Local__131 = (*(AccessPrivateProperty<UClass* >(&(__Local__128), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__131 = UImage::StaticClass(); auto& __Local__132 = __Local__107[6]; auto& __Local__133 = (*(AccessPrivateProperty<FGuid >(&(__Local__132), FMovieScenePossessable::__PPO__Guid() ))); __Local__133 = FGuid(0xA7938A64, 0x4FB38EFC, 0xEBFAFD87, 0x61E4CBCD); auto& __Local__134 = (*(AccessPrivateProperty<FString >(&(__Local__132), FMovieScenePossessable::__PPO__Name() ))); __Local__134 = FString(TEXT("TransparentBG-Ammo")); auto& __Local__135 = (*(AccessPrivateProperty<UClass* >(&(__Local__132), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__135 = UImage::StaticClass(); auto& __Local__136 = __Local__107[7]; auto& __Local__137 = (*(AccessPrivateProperty<FGuid >(&(__Local__136), FMovieScenePossessable::__PPO__Guid() ))); __Local__137 = FGuid(0x43997E24, 0x426E0C7B, 0x74B44B9A, 0x5863473A); auto& __Local__138 = (*(AccessPrivateProperty<FString >(&(__Local__136), FMovieScenePossessable::__PPO__Name() ))); __Local__138 = FString(TEXT("Gun")); auto& __Local__139 = (*(AccessPrivateProperty<UClass* >(&(__Local__136), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__139 = UImage::StaticClass(); auto& __Local__140 = __Local__107[8]; auto& __Local__141 = (*(AccessPrivateProperty<FGuid >(&(__Local__140), FMovieScenePossessable::__PPO__Guid() ))); __Local__141 = FGuid(0x9193DCBC, 0x469C99B5, 0x61D768B0, 0x8DFC505F); auto& __Local__142 = (*(AccessPrivateProperty<FString >(&(__Local__140), FMovieScenePossessable::__PPO__Name() ))); __Local__142 = FString(TEXT("OutOfAmmo")); auto& __Local__143 = (*(AccessPrivateProperty<UClass* >(&(__Local__140), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__143 = UTextBlock::StaticClass(); auto& __Local__144 = __Local__107[9]; auto& __Local__145 = (*(AccessPrivateProperty<FGuid >(&(__Local__144), FMovieScenePossessable::__PPO__Guid() ))); __Local__145 = FGuid(0x77AA620F, 0x4029812B, 0x3AB146B1, 0xD5CD23D2); auto& __Local__146 = (*(AccessPrivateProperty<FString >(&(__Local__144), FMovieScenePossessable::__PPO__Name() ))); __Local__146 = FString(TEXT("HealthBar_Empty")); auto& __Local__147 = (*(AccessPrivateProperty<UClass* >(&(__Local__144), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__147 = UProgressBar::StaticClass(); auto& __Local__148 = __Local__107[10]; auto& __Local__149 = (*(AccessPrivateProperty<FGuid >(&(__Local__148), FMovieScenePossessable::__PPO__Guid() ))); __Local__149 = FGuid(0x40A62321, 0x48203DD2, 0xF46F85A5, 0x6D9C55F6); auto& __Local__150 = (*(AccessPrivateProperty<FString >(&(__Local__148), FMovieScenePossessable::__PPO__Name() ))); __Local__150 = FString(TEXT("HealthBar_Full")); auto& __Local__151 = (*(AccessPrivateProperty<UClass* >(&(__Local__148), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__151 = UProgressBar::StaticClass(); auto& __Local__152 = __Local__107[11]; auto& __Local__153 = (*(AccessPrivateProperty<FGuid >(&(__Local__152), FMovieScenePossessable::__PPO__Guid() ))); __Local__153 = FGuid(0x5315EE1F, 0x44939ED3, 0xEC2B5685, 0x22436179); auto& __Local__154 = (*(AccessPrivateProperty<FString >(&(__Local__152), FMovieScenePossessable::__PPO__Name() ))); __Local__154 = FString(TEXT("AmmoInMag")); auto& __Local__155 = (*(AccessPrivateProperty<UClass* >(&(__Local__152), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__155 = UTextBlock::StaticClass(); auto& __Local__156 = __Local__107[12]; auto& __Local__157 = (*(AccessPrivateProperty<FGuid >(&(__Local__156), FMovieScenePossessable::__PPO__Guid() ))); __Local__157 = FGuid(0x38A81112, 0x4BFE21C9, 0xCBB8B7AC, 0x9F979B50); auto& __Local__158 = (*(AccessPrivateProperty<FString >(&(__Local__156), FMovieScenePossessable::__PPO__Name() ))); __Local__158 = FString(TEXT("Divider")); auto& __Local__159 = (*(AccessPrivateProperty<UClass* >(&(__Local__156), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__159 = UTextBlock::StaticClass(); auto& __Local__160 = __Local__107[13]; auto& __Local__161 = (*(AccessPrivateProperty<FGuid >(&(__Local__160), FMovieScenePossessable::__PPO__Guid() ))); __Local__161 = FGuid(0xC14D5C5E, 0x40C6D99A, 0xFA9853A0, 0x8CEC36B2); auto& __Local__162 = (*(AccessPrivateProperty<FString >(&(__Local__160), FMovieScenePossessable::__PPO__Name() ))); __Local__162 = FString(TEXT("AmmoReserved")); auto& __Local__163 = (*(AccessPrivateProperty<UClass* >(&(__Local__160), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__163 = UTextBlock::StaticClass(); auto& __Local__164 = __Local__107[14]; auto& __Local__165 = (*(AccessPrivateProperty<FGuid >(&(__Local__164), FMovieScenePossessable::__PPO__Guid() ))); __Local__165 = FGuid(0xA1FCCF95, 0x4D8635ED, 0xAB96198E, 0xA89CB97C); auto& __Local__166 = (*(AccessPrivateProperty<FString >(&(__Local__164), FMovieScenePossessable::__PPO__Name() ))); __Local__166 = FString(TEXT("ChapterText")); auto& __Local__167 = (*(AccessPrivateProperty<UClass* >(&(__Local__164), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__167 = UTextBlock::StaticClass(); auto& __Local__168 = __Local__107[15]; auto& __Local__169 = (*(AccessPrivateProperty<FGuid >(&(__Local__168), FMovieScenePossessable::__PPO__Guid() ))); __Local__169 = FGuid(0x2AB85BC1, 0x4528D308, 0x2B6BBC81, 0x7CA72669); auto& __Local__170 = (*(AccessPrivateProperty<FString >(&(__Local__168), FMovieScenePossessable::__PPO__Name() ))); __Local__170 = FString(TEXT("BgOfChapter")); auto& __Local__171 = (*(AccessPrivateProperty<UClass* >(&(__Local__168), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__171 = UImage::StaticClass(); auto& __Local__172 = __Local__107[16]; auto& __Local__173 = (*(AccessPrivateProperty<FGuid >(&(__Local__172), FMovieScenePossessable::__PPO__Guid() ))); __Local__173 = FGuid(0x85A9F536, 0x46B7A620, 0x78E165BD, 0xA56631C4); auto& __Local__174 = (*(AccessPrivateProperty<FString >(&(__Local__172), FMovieScenePossessable::__PPO__Name() ))); __Local__174 = FString(TEXT("ObjectiveText")); auto& __Local__175 = (*(AccessPrivateProperty<UClass* >(&(__Local__172), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__175 = UTextBlock::StaticClass(); auto& __Local__176 = __Local__107[17]; auto& __Local__177 = (*(AccessPrivateProperty<FGuid >(&(__Local__176), FMovieScenePossessable::__PPO__Guid() ))); __Local__177 = FGuid(0xDDE95A0E, 0x4290F86F, 0xC332B88C, 0xADEAA7B5); auto& __Local__178 = (*(AccessPrivateProperty<FString >(&(__Local__176), FMovieScenePossessable::__PPO__Name() ))); __Local__178 = FString(TEXT("BgOfObjective")); auto& __Local__179 = (*(AccessPrivateProperty<UClass* >(&(__Local__176), FMovieScenePossessable::__PPO__PossessedObjectClass() ))); __Local__179 = UImage::StaticClass(); auto& __Local__180 = (*(AccessPrivateProperty<TArray<FMovieSceneBinding> >((__Local__106), UMovieScene::__PPO__ObjectBindings() ))); __Local__180 = TArray<FMovieSceneBinding> (); __Local__180.AddUninitialized(18); FMovieSceneBinding::StaticStruct()->InitializeStruct(__Local__180.GetData(), 18); auto& __Local__181 = __Local__180[0]; auto& __Local__182 = (*(AccessPrivateProperty<FGuid >(&(__Local__181), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__182 = FGuid(0x35B55384, 0x4B3A6FA2, 0x6F85EEAB, 0xD9E39BB0); auto& __Local__183 = (*(AccessPrivateProperty<FString >(&(__Local__181), FMovieSceneBinding::__PPO__BindingName() ))); __Local__183 = FString(TEXT("Details-4")); auto& __Local__184 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__181), FMovieSceneBinding::__PPO__Tracks() ))); __Local__184 = TArray<UMovieSceneTrack*> (); __Local__184.Reserve(1); auto __Local__185 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_0")); auto& __Local__186 = (*(AccessPrivateProperty<FName >((__Local__185), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__186 = FName(TEXT("ColorAndOpacity")); auto& __Local__187 = (*(AccessPrivateProperty<FString >((__Local__185), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__187 = FString(TEXT("ColorAndOpacity")); auto& __Local__188 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__185), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__188 = TArray<UMovieSceneSection*> (); __Local__188.Reserve(1); auto __Local__189 = NewObject<UMovieSceneColorSection>(__Local__185, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_0")); auto& __Local__190 = (*(AccessPrivateProperty<FRichCurve >((__Local__189), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__190.Keys = TArray<FRichCurveKey> (); __Local__190.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__190.Keys.GetData(), 1); auto& __Local__191 = __Local__190.Keys[0]; __Local__191.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__191.Time = 5.000000f; __Local__191.Value = 0.435000f; auto& __Local__192 = (*(AccessPrivateProperty<FRichCurve >((__Local__189), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__192.Keys = TArray<FRichCurveKey> (); __Local__192.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__192.Keys.GetData(), 1); auto& __Local__193 = __Local__192.Keys[0]; __Local__193.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__193.Time = 5.000000f; __Local__193.Value = 0.435000f; auto& __Local__194 = (*(AccessPrivateProperty<FRichCurve >((__Local__189), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__194.Keys = TArray<FRichCurveKey> (); __Local__194.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__194.Keys.GetData(), 1); auto& __Local__195 = __Local__194.Keys[0]; __Local__195.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__195.Time = 5.000000f; __Local__195.Value = 0.435000f; auto& __Local__196 = (*(AccessPrivateProperty<FRichCurve >((__Local__189), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__196.Keys = TArray<FRichCurveKey> (); __Local__196.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__196.Keys.GetData(), 1); auto& __Local__197 = __Local__196.Keys[0]; __Local__197.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__197.Time = 5.000000f; __Local__197.Value = 0.332000f; auto& __Local__198 = (*(AccessPrivateProperty<float >((__Local__189), UMovieSceneSection::__PPO__EndTime() ))); __Local__198 = 5.000000f; __Local__188.Add(__Local__189); __Local__184.Add(__Local__185); auto& __Local__199 = __Local__180[1]; auto& __Local__200 = (*(AccessPrivateProperty<FGuid >(&(__Local__199), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__200 = FGuid(0x131C8D9C, 0x43268B80, 0x4570D48A, 0xD19B30A6); auto& __Local__201 = (*(AccessPrivateProperty<FString >(&(__Local__199), FMovieSceneBinding::__PPO__BindingName() ))); __Local__201 = FString(TEXT("Details-1")); auto& __Local__202 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__199), FMovieSceneBinding::__PPO__Tracks() ))); __Local__202 = TArray<UMovieSceneTrack*> (); __Local__202.Reserve(1); auto __Local__203 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_1")); auto& __Local__204 = (*(AccessPrivateProperty<FName >((__Local__203), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__204 = FName(TEXT("ColorAndOpacity")); auto& __Local__205 = (*(AccessPrivateProperty<FString >((__Local__203), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__205 = FString(TEXT("ColorAndOpacity")); auto& __Local__206 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__203), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__206 = TArray<UMovieSceneSection*> (); __Local__206.Reserve(1); auto __Local__207 = NewObject<UMovieSceneColorSection>(__Local__203, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_1")); auto& __Local__208 = (*(AccessPrivateProperty<FRichCurve >((__Local__207), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__208.Keys = TArray<FRichCurveKey> (); __Local__208.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__208.Keys.GetData(), 1); auto& __Local__209 = __Local__208.Keys[0]; __Local__209.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__209.Time = 5.000000f; __Local__209.Value = 0.435000f; auto& __Local__210 = (*(AccessPrivateProperty<FRichCurve >((__Local__207), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__210.Keys = TArray<FRichCurveKey> (); __Local__210.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__210.Keys.GetData(), 1); auto& __Local__211 = __Local__210.Keys[0]; __Local__211.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__211.Time = 5.000000f; __Local__211.Value = 0.435000f; auto& __Local__212 = (*(AccessPrivateProperty<FRichCurve >((__Local__207), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__212.Keys = TArray<FRichCurveKey> (); __Local__212.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__212.Keys.GetData(), 1); auto& __Local__213 = __Local__212.Keys[0]; __Local__213.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__213.Time = 5.000000f; __Local__213.Value = 0.435000f; auto& __Local__214 = (*(AccessPrivateProperty<FRichCurve >((__Local__207), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__214.Keys = TArray<FRichCurveKey> (); __Local__214.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__214.Keys.GetData(), 1); auto& __Local__215 = __Local__214.Keys[0]; __Local__215.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__215.Time = 5.000000f; __Local__215.Value = 0.332000f; auto& __Local__216 = (*(AccessPrivateProperty<float >((__Local__207), UMovieSceneSection::__PPO__EndTime() ))); __Local__216 = 5.000000f; __Local__206.Add(__Local__207); __Local__202.Add(__Local__203); auto& __Local__217 = __Local__180[2]; auto& __Local__218 = (*(AccessPrivateProperty<FGuid >(&(__Local__217), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__218 = FGuid(0xA3D67332, 0x489F176F, 0x9E51C2A1, 0x7E9577F7); auto& __Local__219 = (*(AccessPrivateProperty<FString >(&(__Local__217), FMovieSceneBinding::__PPO__BindingName() ))); __Local__219 = FString(TEXT("Details-2")); auto& __Local__220 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__217), FMovieSceneBinding::__PPO__Tracks() ))); __Local__220 = TArray<UMovieSceneTrack*> (); __Local__220.Reserve(1); auto __Local__221 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_2")); auto& __Local__222 = (*(AccessPrivateProperty<FName >((__Local__221), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__222 = FName(TEXT("ColorAndOpacity")); auto& __Local__223 = (*(AccessPrivateProperty<FString >((__Local__221), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__223 = FString(TEXT("ColorAndOpacity")); auto& __Local__224 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__221), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__224 = TArray<UMovieSceneSection*> (); __Local__224.Reserve(1); auto __Local__225 = NewObject<UMovieSceneColorSection>(__Local__221, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_2")); auto& __Local__226 = (*(AccessPrivateProperty<FRichCurve >((__Local__225), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__226.Keys = TArray<FRichCurveKey> (); __Local__226.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__226.Keys.GetData(), 1); auto& __Local__227 = __Local__226.Keys[0]; __Local__227.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__227.Time = 5.000000f; __Local__227.Value = 0.435000f; auto& __Local__228 = (*(AccessPrivateProperty<FRichCurve >((__Local__225), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__228.Keys = TArray<FRichCurveKey> (); __Local__228.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__228.Keys.GetData(), 1); auto& __Local__229 = __Local__228.Keys[0]; __Local__229.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__229.Time = 5.000000f; __Local__229.Value = 0.435000f; auto& __Local__230 = (*(AccessPrivateProperty<FRichCurve >((__Local__225), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__230.Keys = TArray<FRichCurveKey> (); __Local__230.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__230.Keys.GetData(), 1); auto& __Local__231 = __Local__230.Keys[0]; __Local__231.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__231.Time = 5.000000f; __Local__231.Value = 0.435000f; auto& __Local__232 = (*(AccessPrivateProperty<FRichCurve >((__Local__225), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__232.Keys = TArray<FRichCurveKey> (); __Local__232.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__232.Keys.GetData(), 1); auto& __Local__233 = __Local__232.Keys[0]; __Local__233.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__233.Time = 5.000000f; __Local__233.Value = 0.332000f; auto& __Local__234 = (*(AccessPrivateProperty<float >((__Local__225), UMovieSceneSection::__PPO__EndTime() ))); __Local__234 = 5.000000f; __Local__224.Add(__Local__225); __Local__220.Add(__Local__221); auto& __Local__235 = __Local__180[3]; auto& __Local__236 = (*(AccessPrivateProperty<FGuid >(&(__Local__235), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__236 = FGuid(0xA703D03F, 0x4C3C8ECE, 0x5B999692, 0x148FAFCF); auto& __Local__237 = (*(AccessPrivateProperty<FString >(&(__Local__235), FMovieSceneBinding::__PPO__BindingName() ))); __Local__237 = FString(TEXT("Details-3")); auto& __Local__238 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__235), FMovieSceneBinding::__PPO__Tracks() ))); __Local__238 = TArray<UMovieSceneTrack*> (); __Local__238.Reserve(1); auto __Local__239 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_3")); auto& __Local__240 = (*(AccessPrivateProperty<FName >((__Local__239), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__240 = FName(TEXT("ColorAndOpacity")); auto& __Local__241 = (*(AccessPrivateProperty<FString >((__Local__239), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__241 = FString(TEXT("ColorAndOpacity")); auto& __Local__242 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__239), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__242 = TArray<UMovieSceneSection*> (); __Local__242.Reserve(1); auto __Local__243 = NewObject<UMovieSceneColorSection>(__Local__239, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_3")); auto& __Local__244 = (*(AccessPrivateProperty<FRichCurve >((__Local__243), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__244.Keys = TArray<FRichCurveKey> (); __Local__244.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__244.Keys.GetData(), 1); auto& __Local__245 = __Local__244.Keys[0]; __Local__245.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__245.Time = 5.000000f; __Local__245.Value = 0.435000f; auto& __Local__246 = (*(AccessPrivateProperty<FRichCurve >((__Local__243), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__246.Keys = TArray<FRichCurveKey> (); __Local__246.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__246.Keys.GetData(), 1); auto& __Local__247 = __Local__246.Keys[0]; __Local__247.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__247.Time = 5.000000f; __Local__247.Value = 0.435000f; auto& __Local__248 = (*(AccessPrivateProperty<FRichCurve >((__Local__243), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__248.Keys = TArray<FRichCurveKey> (); __Local__248.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__248.Keys.GetData(), 1); auto& __Local__249 = __Local__248.Keys[0]; __Local__249.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__249.Time = 5.000000f; __Local__249.Value = 0.435000f; auto& __Local__250 = (*(AccessPrivateProperty<FRichCurve >((__Local__243), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__250.Keys = TArray<FRichCurveKey> (); __Local__250.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__250.Keys.GetData(), 1); auto& __Local__251 = __Local__250.Keys[0]; __Local__251.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__251.Time = 5.000000f; __Local__251.Value = 0.332000f; auto& __Local__252 = (*(AccessPrivateProperty<float >((__Local__243), UMovieSceneSection::__PPO__EndTime() ))); __Local__252 = 5.000000f; __Local__242.Add(__Local__243); __Local__238.Add(__Local__239); auto& __Local__253 = __Local__180[4]; auto& __Local__254 = (*(AccessPrivateProperty<FGuid >(&(__Local__253), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__254 = FGuid(0x6C3E4987, 0x40DCB91F, 0x14A70CA2, 0x21B875BE); auto& __Local__255 = (*(AccessPrivateProperty<FString >(&(__Local__253), FMovieSceneBinding::__PPO__BindingName() ))); __Local__255 = FString(TEXT("TransparentBG-Health")); auto& __Local__256 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__253), FMovieSceneBinding::__PPO__Tracks() ))); __Local__256 = TArray<UMovieSceneTrack*> (); __Local__256.Reserve(1); auto __Local__257 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_4")); auto& __Local__258 = (*(AccessPrivateProperty<FName >((__Local__257), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__258 = FName(TEXT("ColorAndOpacity")); auto& __Local__259 = (*(AccessPrivateProperty<FString >((__Local__257), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__259 = FString(TEXT("ColorAndOpacity")); auto& __Local__260 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__257), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__260 = TArray<UMovieSceneSection*> (); __Local__260.Reserve(1); auto __Local__261 = NewObject<UMovieSceneColorSection>(__Local__257, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_4")); auto& __Local__262 = (*(AccessPrivateProperty<FRichCurve >((__Local__261), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__262.Keys = TArray<FRichCurveKey> (); __Local__262.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__262.Keys.GetData(), 2); auto& __Local__263 = __Local__262.Keys[0]; __Local__263.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__263.Value = 1.000000f; auto& __Local__264 = __Local__262.Keys[1]; __Local__264.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__264.Time = 5.000000f; __Local__264.Value = 0.435000f; auto& __Local__265 = (*(AccessPrivateProperty<FRichCurve >((__Local__261), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__265.Keys = TArray<FRichCurveKey> (); __Local__265.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__265.Keys.GetData(), 2); auto& __Local__266 = __Local__265.Keys[0]; __Local__266.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__266.Value = 1.000000f; auto& __Local__267 = __Local__265.Keys[1]; __Local__267.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__267.Time = 5.000000f; __Local__267.Value = 0.435000f; auto& __Local__268 = (*(AccessPrivateProperty<FRichCurve >((__Local__261), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__268.Keys = TArray<FRichCurveKey> (); __Local__268.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__268.Keys.GetData(), 2); auto& __Local__269 = __Local__268.Keys[0]; __Local__269.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__269.Value = 1.000000f; auto& __Local__270 = __Local__268.Keys[1]; __Local__270.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__270.Time = 5.000000f; __Local__270.Value = 0.435000f; auto& __Local__271 = (*(AccessPrivateProperty<FRichCurve >((__Local__261), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__271.Keys = TArray<FRichCurveKey> (); __Local__271.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__271.Keys.GetData(), 2); auto& __Local__272 = __Local__271.Keys[0]; __Local__272.InterpMode = ERichCurveInterpMode::RCIM_Cubic; auto& __Local__273 = __Local__271.Keys[1]; __Local__273.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__273.Time = 5.000000f; __Local__273.Value = 0.332000f; auto& __Local__274 = (*(AccessPrivateProperty<float >((__Local__261), UMovieSceneSection::__PPO__EndTime() ))); __Local__274 = 5.000000f; __Local__260.Add(__Local__261); __Local__256.Add(__Local__257); auto& __Local__275 = __Local__180[5]; auto& __Local__276 = (*(AccessPrivateProperty<FGuid >(&(__Local__275), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__276 = FGuid(0x75BB6B58, 0x4E61B2DB, 0x126FB3A5, 0x80D778A5); auto& __Local__277 = (*(AccessPrivateProperty<FString >(&(__Local__275), FMovieSceneBinding::__PPO__BindingName() ))); __Local__277 = FString(TEXT("TransparentBG-Gun")); auto& __Local__278 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__275), FMovieSceneBinding::__PPO__Tracks() ))); __Local__278 = TArray<UMovieSceneTrack*> (); __Local__278.Reserve(1); auto __Local__279 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_5")); auto& __Local__280 = (*(AccessPrivateProperty<FName >((__Local__279), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__280 = FName(TEXT("ColorAndOpacity")); auto& __Local__281 = (*(AccessPrivateProperty<FString >((__Local__279), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__281 = FString(TEXT("ColorAndOpacity")); auto& __Local__282 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__279), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__282 = TArray<UMovieSceneSection*> (); __Local__282.Reserve(1); auto __Local__283 = NewObject<UMovieSceneColorSection>(__Local__279, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_5")); auto& __Local__284 = (*(AccessPrivateProperty<FRichCurve >((__Local__283), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__284.Keys = TArray<FRichCurveKey> (); __Local__284.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__284.Keys.GetData(), 2); auto& __Local__285 = __Local__284.Keys[0]; __Local__285.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__285.Value = 1.000000f; auto& __Local__286 = __Local__284.Keys[1]; __Local__286.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__286.Time = 5.000000f; __Local__286.Value = 1.000000f; auto& __Local__287 = (*(AccessPrivateProperty<FRichCurve >((__Local__283), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__287.Keys = TArray<FRichCurveKey> (); __Local__287.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__287.Keys.GetData(), 2); auto& __Local__288 = __Local__287.Keys[0]; __Local__288.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__288.Value = 1.000000f; auto& __Local__289 = __Local__287.Keys[1]; __Local__289.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__289.Time = 5.000000f; __Local__289.Value = 1.000000f; auto& __Local__290 = (*(AccessPrivateProperty<FRichCurve >((__Local__283), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__290.Keys = TArray<FRichCurveKey> (); __Local__290.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__290.Keys.GetData(), 2); auto& __Local__291 = __Local__290.Keys[0]; __Local__291.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__291.Value = 1.000000f; auto& __Local__292 = __Local__290.Keys[1]; __Local__292.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__292.Time = 5.000000f; __Local__292.Value = 1.000000f; auto& __Local__293 = (*(AccessPrivateProperty<FRichCurve >((__Local__283), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__293.Keys = TArray<FRichCurveKey> (); __Local__293.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__293.Keys.GetData(), 2); auto& __Local__294 = __Local__293.Keys[0]; __Local__294.InterpMode = ERichCurveInterpMode::RCIM_Cubic; auto& __Local__295 = __Local__293.Keys[1]; __Local__295.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__295.Time = 5.000000f; __Local__295.Value = 1.000000f; auto& __Local__296 = (*(AccessPrivateProperty<float >((__Local__283), UMovieSceneSection::__PPO__EndTime() ))); __Local__296 = 5.000000f; __Local__282.Add(__Local__283); __Local__278.Add(__Local__279); auto& __Local__297 = __Local__180[6]; auto& __Local__298 = (*(AccessPrivateProperty<FGuid >(&(__Local__297), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__298 = FGuid(0xA7938A64, 0x4FB38EFC, 0xEBFAFD87, 0x61E4CBCD); auto& __Local__299 = (*(AccessPrivateProperty<FString >(&(__Local__297), FMovieSceneBinding::__PPO__BindingName() ))); __Local__299 = FString(TEXT("TransparentBG-Ammo")); auto& __Local__300 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__297), FMovieSceneBinding::__PPO__Tracks() ))); __Local__300 = TArray<UMovieSceneTrack*> (); __Local__300.Reserve(1); auto __Local__301 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_6")); auto& __Local__302 = (*(AccessPrivateProperty<FName >((__Local__301), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__302 = FName(TEXT("ColorAndOpacity")); auto& __Local__303 = (*(AccessPrivateProperty<FString >((__Local__301), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__303 = FString(TEXT("ColorAndOpacity")); auto& __Local__304 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__301), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__304 = TArray<UMovieSceneSection*> (); __Local__304.Reserve(1); auto __Local__305 = NewObject<UMovieSceneColorSection>(__Local__301, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_6")); auto& __Local__306 = (*(AccessPrivateProperty<FRichCurve >((__Local__305), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__306.Keys = TArray<FRichCurveKey> (); __Local__306.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__306.Keys.GetData(), 2); auto& __Local__307 = __Local__306.Keys[0]; __Local__307.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__307.Value = 1.000000f; auto& __Local__308 = __Local__306.Keys[1]; __Local__308.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__308.Time = 5.000000f; __Local__308.Value = 1.000000f; auto& __Local__309 = (*(AccessPrivateProperty<FRichCurve >((__Local__305), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__309.Keys = TArray<FRichCurveKey> (); __Local__309.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__309.Keys.GetData(), 2); auto& __Local__310 = __Local__309.Keys[0]; __Local__310.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__310.Value = 1.000000f; auto& __Local__311 = __Local__309.Keys[1]; __Local__311.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__311.Time = 5.000000f; __Local__311.Value = 1.000000f; auto& __Local__312 = (*(AccessPrivateProperty<FRichCurve >((__Local__305), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__312.Keys = TArray<FRichCurveKey> (); __Local__312.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__312.Keys.GetData(), 2); auto& __Local__313 = __Local__312.Keys[0]; __Local__313.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__313.Value = 1.000000f; auto& __Local__314 = __Local__312.Keys[1]; __Local__314.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__314.Time = 5.000000f; __Local__314.Value = 1.000000f; auto& __Local__315 = (*(AccessPrivateProperty<FRichCurve >((__Local__305), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__315.Keys = TArray<FRichCurveKey> (); __Local__315.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__315.Keys.GetData(), 2); auto& __Local__316 = __Local__315.Keys[0]; __Local__316.InterpMode = ERichCurveInterpMode::RCIM_Cubic; auto& __Local__317 = __Local__315.Keys[1]; __Local__317.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__317.Time = 5.000000f; __Local__317.Value = 1.000000f; auto& __Local__318 = (*(AccessPrivateProperty<float >((__Local__305), UMovieSceneSection::__PPO__EndTime() ))); __Local__318 = 5.000000f; __Local__304.Add(__Local__305); __Local__300.Add(__Local__301); auto& __Local__319 = __Local__180[7]; auto& __Local__320 = (*(AccessPrivateProperty<FGuid >(&(__Local__319), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__320 = FGuid(0x43997E24, 0x426E0C7B, 0x74B44B9A, 0x5863473A); auto& __Local__321 = (*(AccessPrivateProperty<FString >(&(__Local__319), FMovieSceneBinding::__PPO__BindingName() ))); __Local__321 = FString(TEXT("Gun")); auto& __Local__322 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__319), FMovieSceneBinding::__PPO__Tracks() ))); __Local__322 = TArray<UMovieSceneTrack*> (); __Local__322.Reserve(1); auto __Local__323 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_7")); auto& __Local__324 = (*(AccessPrivateProperty<FName >((__Local__323), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__324 = FName(TEXT("ColorAndOpacity")); auto& __Local__325 = (*(AccessPrivateProperty<FString >((__Local__323), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__325 = FString(TEXT("ColorAndOpacity")); auto& __Local__326 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__323), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__326 = TArray<UMovieSceneSection*> (); __Local__326.Reserve(1); auto __Local__327 = NewObject<UMovieSceneColorSection>(__Local__323, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_7")); auto& __Local__328 = (*(AccessPrivateProperty<FRichCurve >((__Local__327), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__328.Keys = TArray<FRichCurveKey> (); __Local__328.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__328.Keys.GetData(), 1); auto& __Local__329 = __Local__328.Keys[0]; __Local__329.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__329.Time = 5.000000f; __Local__329.Value = 1.000000f; auto& __Local__330 = (*(AccessPrivateProperty<FRichCurve >((__Local__327), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__330.Keys = TArray<FRichCurveKey> (); __Local__330.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__330.Keys.GetData(), 1); auto& __Local__331 = __Local__330.Keys[0]; __Local__331.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__331.Time = 5.000000f; __Local__331.Value = 1.000000f; auto& __Local__332 = (*(AccessPrivateProperty<FRichCurve >((__Local__327), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__332.Keys = TArray<FRichCurveKey> (); __Local__332.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__332.Keys.GetData(), 1); auto& __Local__333 = __Local__332.Keys[0]; __Local__333.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__333.Time = 5.000000f; __Local__333.Value = 1.000000f; auto& __Local__334 = (*(AccessPrivateProperty<FRichCurve >((__Local__327), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__334.Keys = TArray<FRichCurveKey> (); __Local__334.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__334.Keys.GetData(), 1); auto& __Local__335 = __Local__334.Keys[0]; __Local__335.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__335.Time = 5.000000f; __Local__335.Value = 1.000000f; auto& __Local__336 = (*(AccessPrivateProperty<float >((__Local__327), UMovieSceneSection::__PPO__EndTime() ))); __Local__336 = 5.000000f; __Local__326.Add(__Local__327); __Local__322.Add(__Local__323); auto& __Local__337 = __Local__180[8]; auto& __Local__338 = (*(AccessPrivateProperty<FGuid >(&(__Local__337), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__338 = FGuid(0x9193DCBC, 0x469C99B5, 0x61D768B0, 0x8DFC505F); auto& __Local__339 = (*(AccessPrivateProperty<FString >(&(__Local__337), FMovieSceneBinding::__PPO__BindingName() ))); __Local__339 = FString(TEXT("OutOfAmmo")); auto& __Local__340 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__337), FMovieSceneBinding::__PPO__Tracks() ))); __Local__340 = TArray<UMovieSceneTrack*> (); __Local__340.Reserve(1); auto __Local__341 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_12")); auto& __Local__342 = (*(AccessPrivateProperty<FName >((__Local__341), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__342 = FName(TEXT("ColorAndOpacity")); auto& __Local__343 = (*(AccessPrivateProperty<FString >((__Local__341), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__343 = FString(TEXT("ColorAndOpacity")); auto& __Local__344 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__341), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__344 = TArray<UMovieSceneSection*> (); __Local__344.Reserve(1); auto __Local__345 = NewObject<UMovieSceneColorSection>(__Local__341, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_12")); auto& __Local__346 = (*(AccessPrivateProperty<FRichCurve >((__Local__345), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__346.Keys = TArray<FRichCurveKey> (); __Local__346.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__346.Keys.GetData(), 2); auto& __Local__347 = __Local__346.Keys[0]; __Local__347.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__347.Value = 1.000000f; auto& __Local__348 = __Local__346.Keys[1]; __Local__348.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__348.Time = 5.000000f; __Local__348.Value = 1.000000f; auto& __Local__349 = (*(AccessPrivateProperty<FRichCurve >((__Local__345), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__349.Keys = TArray<FRichCurveKey> (); __Local__349.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__349.Keys.GetData(), 2); auto& __Local__350 = __Local__349.Keys[0]; __Local__350.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__350.Value = 0.019754f; auto& __Local__351 = __Local__349.Keys[1]; __Local__351.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__351.Time = 5.000000f; __Local__351.Value = 0.019754f; auto& __Local__352 = (*(AccessPrivateProperty<FRichCurve >((__Local__345), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__352.Keys = TArray<FRichCurveKey> (); __Local__352.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__352.Keys.GetData(), 2); auto& __Local__353 = __Local__352.Keys[0]; __Local__353.InterpMode = ERichCurveInterpMode::RCIM_Cubic; auto& __Local__354 = __Local__352.Keys[1]; __Local__354.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__354.Time = 5.000000f; auto& __Local__355 = (*(AccessPrivateProperty<FRichCurve >((__Local__345), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__355.Keys = TArray<FRichCurveKey> (); __Local__355.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__355.Keys.GetData(), 2); auto& __Local__356 = __Local__355.Keys[0]; __Local__356.InterpMode = ERichCurveInterpMode::RCIM_Cubic; auto& __Local__357 = __Local__355.Keys[1]; __Local__357.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__357.Time = 5.000000f; __Local__357.Value = 1.000000f; auto& __Local__358 = (*(AccessPrivateProperty<float >((__Local__345), UMovieSceneSection::__PPO__EndTime() ))); __Local__358 = 5.000000f; __Local__344.Add(__Local__345); __Local__340.Add(__Local__341); auto& __Local__359 = __Local__180[9]; auto& __Local__360 = (*(AccessPrivateProperty<FGuid >(&(__Local__359), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__360 = FGuid(0x77AA620F, 0x4029812B, 0x3AB146B1, 0xD5CD23D2); auto& __Local__361 = (*(AccessPrivateProperty<FString >(&(__Local__359), FMovieSceneBinding::__PPO__BindingName() ))); __Local__361 = FString(TEXT("HealthBar_Empty")); auto& __Local__362 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__359), FMovieSceneBinding::__PPO__Tracks() ))); __Local__362 = TArray<UMovieSceneTrack*> (); __Local__362.Reserve(1); auto __Local__363 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_16")); auto& __Local__364 = (*(AccessPrivateProperty<FName >((__Local__363), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__364 = FName(TEXT("FillColorAndOpacity")); auto& __Local__365 = (*(AccessPrivateProperty<FString >((__Local__363), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__365 = FString(TEXT("FillColorAndOpacity")); auto& __Local__366 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__363), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__366 = TArray<UMovieSceneSection*> (); __Local__366.Reserve(1); auto __Local__367 = NewObject<UMovieSceneColorSection>(__Local__363, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_16")); auto& __Local__368 = (*(AccessPrivateProperty<FRichCurve >((__Local__367), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__368.Keys = TArray<FRichCurveKey> (); __Local__368.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__368.Keys.GetData(), 1); auto& __Local__369 = __Local__368.Keys[0]; __Local__369.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__369.Time = 5.000000f; __Local__369.Value = 0.032885f; auto& __Local__370 = (*(AccessPrivateProperty<FRichCurve >((__Local__367), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__370.Keys = TArray<FRichCurveKey> (); __Local__370.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__370.Keys.GetData(), 1); auto& __Local__371 = __Local__370.Keys[0]; __Local__371.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__371.Time = 5.000000f; __Local__371.Value = 0.040000f; auto& __Local__372 = (*(AccessPrivateProperty<FRichCurve >((__Local__367), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__372.Keys = TArray<FRichCurveKey> (); __Local__372.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__372.Keys.GetData(), 1); auto& __Local__373 = __Local__372.Keys[0]; __Local__373.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__373.Time = 5.000000f; __Local__373.Value = 0.029800f; auto& __Local__374 = (*(AccessPrivateProperty<FRichCurve >((__Local__367), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__374.Keys = TArray<FRichCurveKey> (); __Local__374.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__374.Keys.GetData(), 1); auto& __Local__375 = __Local__374.Keys[0]; __Local__375.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__375.Time = 5.000000f; __Local__375.Value = 0.911000f; auto& __Local__376 = (*(AccessPrivateProperty<float >((__Local__367), UMovieSceneSection::__PPO__EndTime() ))); __Local__376 = 5.000000f; __Local__366.Add(__Local__367); __Local__362.Add(__Local__363); auto& __Local__377 = __Local__180[10]; auto& __Local__378 = (*(AccessPrivateProperty<FGuid >(&(__Local__377), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__378 = FGuid(0x40A62321, 0x48203DD2, 0xF46F85A5, 0x6D9C55F6); auto& __Local__379 = (*(AccessPrivateProperty<FString >(&(__Local__377), FMovieSceneBinding::__PPO__BindingName() ))); __Local__379 = FString(TEXT("HealthBar_Full")); auto& __Local__380 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__377), FMovieSceneBinding::__PPO__Tracks() ))); __Local__380 = TArray<UMovieSceneTrack*> (); __Local__380.Reserve(1); auto __Local__381 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_17")); auto& __Local__382 = (*(AccessPrivateProperty<FName >((__Local__381), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__382 = FName(TEXT("FillColorAndOpacity")); auto& __Local__383 = (*(AccessPrivateProperty<FString >((__Local__381), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__383 = FString(TEXT("FillColorAndOpacity")); auto& __Local__384 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__381), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__384 = TArray<UMovieSceneSection*> (); __Local__384.Reserve(1); auto __Local__385 = NewObject<UMovieSceneColorSection>(__Local__381, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_17")); auto& __Local__386 = (*(AccessPrivateProperty<FRichCurve >((__Local__385), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__386.Keys = TArray<FRichCurveKey> (); __Local__386.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__386.Keys.GetData(), 1); auto& __Local__387 = __Local__386.Keys[0]; __Local__387.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__387.Time = 5.000000f; __Local__387.Value = 0.591130f; auto& __Local__388 = (*(AccessPrivateProperty<FRichCurve >((__Local__385), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__388.Keys = TArray<FRichCurveKey> (); __Local__388.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__388.Keys.GetData(), 1); auto& __Local__389 = __Local__388.Keys[0]; __Local__389.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__389.Time = 5.000000f; __Local__389.Value = 0.710000f; auto& __Local__390 = (*(AccessPrivateProperty<FRichCurve >((__Local__385), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__390.Keys = TArray<FRichCurveKey> (); __Local__390.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__390.Keys.GetData(), 1); auto& __Local__391 = __Local__390.Keys[0]; __Local__391.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__391.Time = 5.000000f; __Local__391.Value = 0.539600f; auto& __Local__392 = (*(AccessPrivateProperty<FRichCurve >((__Local__385), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__392.Keys = TArray<FRichCurveKey> (); __Local__392.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__392.Keys.GetData(), 1); auto& __Local__393 = __Local__392.Keys[0]; __Local__393.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__393.Time = 5.000000f; __Local__393.Value = 1.000000f; auto& __Local__394 = (*(AccessPrivateProperty<float >((__Local__385), UMovieSceneSection::__PPO__EndTime() ))); __Local__394 = 5.000000f; __Local__384.Add(__Local__385); __Local__380.Add(__Local__381); auto& __Local__395 = __Local__180[11]; auto& __Local__396 = (*(AccessPrivateProperty<FGuid >(&(__Local__395), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__396 = FGuid(0x5315EE1F, 0x44939ED3, 0xEC2B5685, 0x22436179); auto& __Local__397 = (*(AccessPrivateProperty<FString >(&(__Local__395), FMovieSceneBinding::__PPO__BindingName() ))); __Local__397 = FString(TEXT("AmmoInMag")); auto& __Local__398 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__395), FMovieSceneBinding::__PPO__Tracks() ))); __Local__398 = TArray<UMovieSceneTrack*> (); __Local__398.Reserve(1); auto __Local__399 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_19")); auto& __Local__400 = (*(AccessPrivateProperty<FName >((__Local__399), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__400 = FName(TEXT("ColorAndOpacity")); auto& __Local__401 = (*(AccessPrivateProperty<FString >((__Local__399), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__401 = FString(TEXT("ColorAndOpacity")); auto& __Local__402 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__399), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__402 = TArray<UMovieSceneSection*> (); __Local__402.Reserve(1); auto __Local__403 = NewObject<UMovieSceneColorSection>(__Local__399, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_19")); auto& __Local__404 = (*(AccessPrivateProperty<FRichCurve >((__Local__403), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__404.Keys = TArray<FRichCurveKey> (); __Local__404.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__404.Keys.GetData(), 1); auto& __Local__405 = __Local__404.Keys[0]; __Local__405.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__405.Time = 5.000000f; __Local__405.Value = 0.783538f; auto& __Local__406 = (*(AccessPrivateProperty<FRichCurve >((__Local__403), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__406.Keys = TArray<FRichCurveKey> (); __Local__406.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__406.Keys.GetData(), 1); auto& __Local__407 = __Local__406.Keys[0]; __Local__407.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__407.Time = 5.000000f; __Local__407.Value = 0.765150f; auto& __Local__408 = (*(AccessPrivateProperty<FRichCurve >((__Local__403), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__408.Keys = TArray<FRichCurveKey> (); __Local__408.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__408.Keys.GetData(), 1); auto& __Local__409 = __Local__408.Keys[0]; __Local__409.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__409.Time = 5.000000f; __Local__409.Value = 0.554860f; auto& __Local__410 = (*(AccessPrivateProperty<FRichCurve >((__Local__403), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__410.Keys = TArray<FRichCurveKey> (); __Local__410.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__410.Keys.GetData(), 1); auto& __Local__411 = __Local__410.Keys[0]; __Local__411.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__411.Time = 5.000000f; __Local__411.Value = 0.969000f; auto& __Local__412 = (*(AccessPrivateProperty<float >((__Local__403), UMovieSceneSection::__PPO__EndTime() ))); __Local__412 = 5.000000f; __Local__402.Add(__Local__403); __Local__398.Add(__Local__399); auto& __Local__413 = __Local__180[12]; auto& __Local__414 = (*(AccessPrivateProperty<FGuid >(&(__Local__413), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__414 = FGuid(0x38A81112, 0x4BFE21C9, 0xCBB8B7AC, 0x9F979B50); auto& __Local__415 = (*(AccessPrivateProperty<FString >(&(__Local__413), FMovieSceneBinding::__PPO__BindingName() ))); __Local__415 = FString(TEXT("Divider")); auto& __Local__416 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__413), FMovieSceneBinding::__PPO__Tracks() ))); __Local__416 = TArray<UMovieSceneTrack*> (); __Local__416.Reserve(1); auto __Local__417 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_20")); auto& __Local__418 = (*(AccessPrivateProperty<FName >((__Local__417), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__418 = FName(TEXT("ColorAndOpacity")); auto& __Local__419 = (*(AccessPrivateProperty<FString >((__Local__417), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__419 = FString(TEXT("ColorAndOpacity")); auto& __Local__420 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__417), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__420 = TArray<UMovieSceneSection*> (); __Local__420.Reserve(1); auto __Local__421 = NewObject<UMovieSceneColorSection>(__Local__417, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_20")); auto& __Local__422 = (*(AccessPrivateProperty<FRichCurve >((__Local__421), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__422.Keys = TArray<FRichCurveKey> (); __Local__422.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__422.Keys.GetData(), 1); auto& __Local__423 = __Local__422.Keys[0]; __Local__423.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__423.Time = 5.000000f; __Local__423.Value = 0.158961f; auto& __Local__424 = (*(AccessPrivateProperty<FRichCurve >((__Local__421), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__424.Keys = TArray<FRichCurveKey> (); __Local__424.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__424.Keys.GetData(), 1); auto& __Local__425 = __Local__424.Keys[0]; __Local__425.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__425.Time = 5.000000f; __Local__425.Value = 0.462077f; auto& __Local__426 = (*(AccessPrivateProperty<FRichCurve >((__Local__421), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__426.Keys = TArray<FRichCurveKey> (); __Local__426.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__426.Keys.GetData(), 1); auto& __Local__427 = __Local__426.Keys[0]; __Local__427.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__427.Time = 5.000000f; __Local__427.Value = 0.068478f; auto& __Local__428 = (*(AccessPrivateProperty<FRichCurve >((__Local__421), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__428.Keys = TArray<FRichCurveKey> (); __Local__428.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__428.Keys.GetData(), 1); auto& __Local__429 = __Local__428.Keys[0]; __Local__429.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__429.Time = 5.000000f; __Local__429.Value = 1.000000f; auto& __Local__430 = (*(AccessPrivateProperty<float >((__Local__421), UMovieSceneSection::__PPO__EndTime() ))); __Local__430 = 5.000000f; __Local__420.Add(__Local__421); __Local__416.Add(__Local__417); auto& __Local__431 = __Local__180[13]; auto& __Local__432 = (*(AccessPrivateProperty<FGuid >(&(__Local__431), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__432 = FGuid(0xC14D5C5E, 0x40C6D99A, 0xFA9853A0, 0x8CEC36B2); auto& __Local__433 = (*(AccessPrivateProperty<FString >(&(__Local__431), FMovieSceneBinding::__PPO__BindingName() ))); __Local__433 = FString(TEXT("AmmoReserved")); auto& __Local__434 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__431), FMovieSceneBinding::__PPO__Tracks() ))); __Local__434 = TArray<UMovieSceneTrack*> (); __Local__434.Reserve(1); auto __Local__435 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_21")); auto& __Local__436 = (*(AccessPrivateProperty<FName >((__Local__435), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__436 = FName(TEXT("ColorAndOpacity")); auto& __Local__437 = (*(AccessPrivateProperty<FString >((__Local__435), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__437 = FString(TEXT("ColorAndOpacity")); auto& __Local__438 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__435), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__438 = TArray<UMovieSceneSection*> (); __Local__438.Reserve(1); auto __Local__439 = NewObject<UMovieSceneColorSection>(__Local__435, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_21")); auto& __Local__440 = (*(AccessPrivateProperty<FRichCurve >((__Local__439), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__440.Keys = TArray<FRichCurveKey> (); __Local__440.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__440.Keys.GetData(), 1); auto& __Local__441 = __Local__440.Keys[0]; __Local__441.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__441.Time = 5.000000f; __Local__441.Value = 0.158961f; auto& __Local__442 = (*(AccessPrivateProperty<FRichCurve >((__Local__439), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__442.Keys = TArray<FRichCurveKey> (); __Local__442.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__442.Keys.GetData(), 1); auto& __Local__443 = __Local__442.Keys[0]; __Local__443.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__443.Time = 5.000000f; __Local__443.Value = 0.462077f; auto& __Local__444 = (*(AccessPrivateProperty<FRichCurve >((__Local__439), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__444.Keys = TArray<FRichCurveKey> (); __Local__444.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__444.Keys.GetData(), 1); auto& __Local__445 = __Local__444.Keys[0]; __Local__445.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__445.Time = 5.000000f; __Local__445.Value = 0.068478f; auto& __Local__446 = (*(AccessPrivateProperty<FRichCurve >((__Local__439), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__446.Keys = TArray<FRichCurveKey> (); __Local__446.Keys.AddUninitialized(1); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__446.Keys.GetData(), 1); auto& __Local__447 = __Local__446.Keys[0]; __Local__447.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__447.Time = 5.000000f; __Local__447.Value = 1.000000f; auto& __Local__448 = (*(AccessPrivateProperty<float >((__Local__439), UMovieSceneSection::__PPO__EndTime() ))); __Local__448 = 5.000000f; __Local__438.Add(__Local__439); __Local__434.Add(__Local__435); auto& __Local__449 = __Local__180[14]; auto& __Local__450 = (*(AccessPrivateProperty<FGuid >(&(__Local__449), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__450 = FGuid(0xA1FCCF95, 0x4D8635ED, 0xAB96198E, 0xA89CB97C); auto& __Local__451 = (*(AccessPrivateProperty<FString >(&(__Local__449), FMovieSceneBinding::__PPO__BindingName() ))); __Local__451 = FString(TEXT("ChapterText")); auto& __Local__452 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__449), FMovieSceneBinding::__PPO__Tracks() ))); __Local__452 = TArray<UMovieSceneTrack*> (); __Local__452.Reserve(1); auto __Local__453 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_9")); auto& __Local__454 = (*(AccessPrivateProperty<FName >((__Local__453), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__454 = FName(TEXT("ColorAndOpacity")); auto& __Local__455 = (*(AccessPrivateProperty<FString >((__Local__453), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__455 = FString(TEXT("ColorAndOpacity")); auto& __Local__456 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__453), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__456 = TArray<UMovieSceneSection*> (); __Local__456.Reserve(1); auto __Local__457 = NewObject<UMovieSceneColorSection>(__Local__453, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_0")); auto& __Local__458 = (*(AccessPrivateProperty<FRichCurve >((__Local__457), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__458.Keys = TArray<FRichCurveKey> (); __Local__458.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__458.Keys.GetData(), 2); auto& __Local__459 = __Local__458.Keys[0]; __Local__459.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__459.Time = 5.000000f; __Local__459.Value = 0.650000f; auto& __Local__460 = __Local__458.Keys[1]; __Local__460.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__460.Time = 9.000000f; __Local__460.Value = 0.650000f; auto& __Local__461 = (*(AccessPrivateProperty<FRichCurve >((__Local__457), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__461.Keys = TArray<FRichCurveKey> (); __Local__461.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__461.Keys.GetData(), 2); auto& __Local__462 = __Local__461.Keys[0]; __Local__462.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__462.Time = 5.000000f; __Local__462.Value = 0.650000f; auto& __Local__463 = __Local__461.Keys[1]; __Local__463.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__463.Time = 9.000000f; __Local__463.Value = 0.650000f; auto& __Local__464 = (*(AccessPrivateProperty<FRichCurve >((__Local__457), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__464.Keys = TArray<FRichCurveKey> (); __Local__464.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__464.Keys.GetData(), 2); auto& __Local__465 = __Local__464.Keys[0]; __Local__465.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__465.Time = 5.000000f; __Local__465.Value = 0.650000f; auto& __Local__466 = __Local__464.Keys[1]; __Local__466.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__466.Time = 9.000000f; __Local__466.Value = 0.650000f; auto& __Local__467 = (*(AccessPrivateProperty<FRichCurve >((__Local__457), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__467.Keys = TArray<FRichCurveKey> (); __Local__467.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__467.Keys.GetData(), 2); auto& __Local__468 = __Local__467.Keys[0]; __Local__468.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__468.Time = 5.000000f; auto& __Local__469 = __Local__467.Keys[1]; __Local__469.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__469.Time = 9.000000f; __Local__469.Value = 0.995000f; auto& __Local__470 = (*(AccessPrivateProperty<float >((__Local__457), UMovieSceneSection::__PPO__StartTime() ))); __Local__470 = 5.000000f; auto& __Local__471 = (*(AccessPrivateProperty<float >((__Local__457), UMovieSceneSection::__PPO__EndTime() ))); __Local__471 = 9.000000f; __Local__456.Add(__Local__457); __Local__452.Add(__Local__453); auto& __Local__472 = __Local__180[15]; auto& __Local__473 = (*(AccessPrivateProperty<FGuid >(&(__Local__472), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__473 = FGuid(0x2AB85BC1, 0x4528D308, 0x2B6BBC81, 0x7CA72669); auto& __Local__474 = (*(AccessPrivateProperty<FString >(&(__Local__472), FMovieSceneBinding::__PPO__BindingName() ))); __Local__474 = FString(TEXT("BgOfChapter")); auto& __Local__475 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__472), FMovieSceneBinding::__PPO__Tracks() ))); __Local__475 = TArray<UMovieSceneTrack*> (); __Local__475.Reserve(1); auto __Local__476 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_10")); auto& __Local__477 = (*(AccessPrivateProperty<FName >((__Local__476), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__477 = FName(TEXT("ColorAndOpacity")); auto& __Local__478 = (*(AccessPrivateProperty<FString >((__Local__476), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__478 = FString(TEXT("ColorAndOpacity")); auto& __Local__479 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__476), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__479 = TArray<UMovieSceneSection*> (); __Local__479.Reserve(1); auto __Local__480 = NewObject<UMovieSceneColorSection>(__Local__476, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_1")); auto& __Local__481 = (*(AccessPrivateProperty<FRichCurve >((__Local__480), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__481.Keys = TArray<FRichCurveKey> (); __Local__481.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__481.Keys.GetData(), 2); auto& __Local__482 = __Local__481.Keys[0]; __Local__482.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__482.Time = 5.000000f; __Local__482.Value = 1.000000f; auto& __Local__483 = __Local__481.Keys[1]; __Local__483.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__483.Time = 9.000000f; __Local__483.Value = 1.000000f; auto& __Local__484 = (*(AccessPrivateProperty<FRichCurve >((__Local__480), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__484.Keys = TArray<FRichCurveKey> (); __Local__484.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__484.Keys.GetData(), 2); auto& __Local__485 = __Local__484.Keys[0]; __Local__485.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__485.Time = 5.000000f; __Local__485.Value = 1.000000f; auto& __Local__486 = __Local__484.Keys[1]; __Local__486.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__486.Time = 9.000000f; __Local__486.Value = 1.000000f; auto& __Local__487 = (*(AccessPrivateProperty<FRichCurve >((__Local__480), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__487.Keys = TArray<FRichCurveKey> (); __Local__487.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__487.Keys.GetData(), 2); auto& __Local__488 = __Local__487.Keys[0]; __Local__488.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__488.Time = 5.000000f; __Local__488.Value = 1.000000f; auto& __Local__489 = __Local__487.Keys[1]; __Local__489.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__489.Time = 9.000000f; __Local__489.Value = 1.000000f; auto& __Local__490 = (*(AccessPrivateProperty<FRichCurve >((__Local__480), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__490.Keys = TArray<FRichCurveKey> (); __Local__490.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__490.Keys.GetData(), 2); auto& __Local__491 = __Local__490.Keys[0]; __Local__491.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__491.Time = 5.000000f; auto& __Local__492 = __Local__490.Keys[1]; __Local__492.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__492.Time = 9.000000f; __Local__492.Value = 1.000000f; auto& __Local__493 = (*(AccessPrivateProperty<float >((__Local__480), UMovieSceneSection::__PPO__StartTime() ))); __Local__493 = 5.000000f; auto& __Local__494 = (*(AccessPrivateProperty<float >((__Local__480), UMovieSceneSection::__PPO__EndTime() ))); __Local__494 = 9.000000f; __Local__479.Add(__Local__480); __Local__475.Add(__Local__476); auto& __Local__495 = __Local__180[16]; auto& __Local__496 = (*(AccessPrivateProperty<FGuid >(&(__Local__495), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__496 = FGuid(0x85A9F536, 0x46B7A620, 0x78E165BD, 0xA56631C4); auto& __Local__497 = (*(AccessPrivateProperty<FString >(&(__Local__495), FMovieSceneBinding::__PPO__BindingName() ))); __Local__497 = FString(TEXT("ObjectiveText")); auto& __Local__498 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__495), FMovieSceneBinding::__PPO__Tracks() ))); __Local__498 = TArray<UMovieSceneTrack*> (); __Local__498.Reserve(1); auto __Local__499 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_11")); auto& __Local__500 = (*(AccessPrivateProperty<FName >((__Local__499), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__500 = FName(TEXT("ColorAndOpacity")); auto& __Local__501 = (*(AccessPrivateProperty<FString >((__Local__499), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__501 = FString(TEXT("ColorAndOpacity")); auto& __Local__502 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__499), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__502 = TArray<UMovieSceneSection*> (); __Local__502.Reserve(1); auto __Local__503 = NewObject<UMovieSceneColorSection>(__Local__499, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_2")); auto& __Local__504 = (*(AccessPrivateProperty<FRichCurve >((__Local__503), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__504.Keys = TArray<FRichCurveKey> (); __Local__504.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__504.Keys.GetData(), 2); auto& __Local__505 = __Local__504.Keys[0]; __Local__505.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__505.Time = 9.000000f; __Local__505.Value = 0.650000f; auto& __Local__506 = __Local__504.Keys[1]; __Local__506.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__506.Time = 13.000000f; __Local__506.Value = 0.650000f; auto& __Local__507 = (*(AccessPrivateProperty<FRichCurve >((__Local__503), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__507.Keys = TArray<FRichCurveKey> (); __Local__507.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__507.Keys.GetData(), 2); auto& __Local__508 = __Local__507.Keys[0]; __Local__508.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__508.Time = 9.000000f; __Local__508.Value = 0.650000f; auto& __Local__509 = __Local__507.Keys[1]; __Local__509.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__509.Time = 13.000000f; __Local__509.Value = 0.650000f; auto& __Local__510 = (*(AccessPrivateProperty<FRichCurve >((__Local__503), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__510.Keys = TArray<FRichCurveKey> (); __Local__510.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__510.Keys.GetData(), 2); auto& __Local__511 = __Local__510.Keys[0]; __Local__511.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__511.Time = 9.000000f; __Local__511.Value = 0.650000f; auto& __Local__512 = __Local__510.Keys[1]; __Local__512.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__512.Time = 13.000000f; __Local__512.Value = 0.650000f; auto& __Local__513 = (*(AccessPrivateProperty<FRichCurve >((__Local__503), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__513.Keys = TArray<FRichCurveKey> (); __Local__513.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__513.Keys.GetData(), 2); auto& __Local__514 = __Local__513.Keys[0]; __Local__514.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__514.Time = 9.000000f; auto& __Local__515 = __Local__513.Keys[1]; __Local__515.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__515.Time = 13.000000f; __Local__515.Value = 0.995000f; auto& __Local__516 = (*(AccessPrivateProperty<float >((__Local__503), UMovieSceneSection::__PPO__StartTime() ))); __Local__516 = 9.000000f; auto& __Local__517 = (*(AccessPrivateProperty<float >((__Local__503), UMovieSceneSection::__PPO__EndTime() ))); __Local__517 = 13.000000f; __Local__502.Add(__Local__503); __Local__498.Add(__Local__499); auto& __Local__518 = __Local__180[17]; auto& __Local__519 = (*(AccessPrivateProperty<FGuid >(&(__Local__518), FMovieSceneBinding::__PPO__ObjectGuid() ))); __Local__519 = FGuid(0xDDE95A0E, 0x4290F86F, 0xC332B88C, 0xADEAA7B5); auto& __Local__520 = (*(AccessPrivateProperty<FString >(&(__Local__518), FMovieSceneBinding::__PPO__BindingName() ))); __Local__520 = FString(TEXT("BgOfObjective")); auto& __Local__521 = (*(AccessPrivateProperty<TArray<UMovieSceneTrack*> >(&(__Local__518), FMovieSceneBinding::__PPO__Tracks() ))); __Local__521 = TArray<UMovieSceneTrack*> (); __Local__521.Reserve(1); auto __Local__522 = NewObject<UMovieSceneColorTrack>(__Local__106, UMovieSceneColorTrack::StaticClass(), TEXT("MovieSceneColorTrack_13")); auto& __Local__523 = (*(AccessPrivateProperty<FName >((__Local__522), UMovieScenePropertyTrack::__PPO__PropertyName() ))); __Local__523 = FName(TEXT("ColorAndOpacity")); auto& __Local__524 = (*(AccessPrivateProperty<FString >((__Local__522), UMovieScenePropertyTrack::__PPO__PropertyPath() ))); __Local__524 = FString(TEXT("ColorAndOpacity")); auto& __Local__525 = (*(AccessPrivateProperty<TArray<UMovieSceneSection*> >((__Local__522), UMovieScenePropertyTrack::__PPO__Sections() ))); __Local__525 = TArray<UMovieSceneSection*> (); __Local__525.Reserve(1); auto __Local__526 = NewObject<UMovieSceneColorSection>(__Local__522, UMovieSceneColorSection::StaticClass(), TEXT("MovieSceneColorSection_3")); auto& __Local__527 = (*(AccessPrivateProperty<FRichCurve >((__Local__526), UMovieSceneColorSection::__PPO__RedCurve() ))); __Local__527.Keys = TArray<FRichCurveKey> (); __Local__527.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__527.Keys.GetData(), 2); auto& __Local__528 = __Local__527.Keys[0]; __Local__528.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__528.Time = 9.000000f; __Local__528.Value = 1.000000f; auto& __Local__529 = __Local__527.Keys[1]; __Local__529.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__529.Time = 13.000000f; __Local__529.Value = 1.000000f; auto& __Local__530 = (*(AccessPrivateProperty<FRichCurve >((__Local__526), UMovieSceneColorSection::__PPO__GreenCurve() ))); __Local__530.Keys = TArray<FRichCurveKey> (); __Local__530.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__530.Keys.GetData(), 2); auto& __Local__531 = __Local__530.Keys[0]; __Local__531.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__531.Time = 9.000000f; __Local__531.Value = 1.000000f; auto& __Local__532 = __Local__530.Keys[1]; __Local__532.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__532.Time = 13.000000f; __Local__532.Value = 1.000000f; auto& __Local__533 = (*(AccessPrivateProperty<FRichCurve >((__Local__526), UMovieSceneColorSection::__PPO__BlueCurve() ))); __Local__533.Keys = TArray<FRichCurveKey> (); __Local__533.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__533.Keys.GetData(), 2); auto& __Local__534 = __Local__533.Keys[0]; __Local__534.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__534.Time = 9.000000f; __Local__534.Value = 1.000000f; auto& __Local__535 = __Local__533.Keys[1]; __Local__535.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__535.Time = 13.000000f; __Local__535.Value = 1.000000f; auto& __Local__536 = (*(AccessPrivateProperty<FRichCurve >((__Local__526), UMovieSceneColorSection::__PPO__AlphaCurve() ))); __Local__536.Keys = TArray<FRichCurveKey> (); __Local__536.Keys.AddUninitialized(2); FRichCurveKey::StaticStruct()->InitializeStruct(__Local__536.Keys.GetData(), 2); auto& __Local__537 = __Local__536.Keys[0]; __Local__537.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__537.Time = 9.000000f; auto& __Local__538 = __Local__536.Keys[1]; __Local__538.InterpMode = ERichCurveInterpMode::RCIM_Cubic; __Local__538.Time = 13.000000f; __Local__538.Value = 1.000000f; auto& __Local__539 = (*(AccessPrivateProperty<float >((__Local__526), UMovieSceneSection::__PPO__StartTime() ))); __Local__539 = 9.000000f; auto& __Local__540 = (*(AccessPrivateProperty<float >((__Local__526), UMovieSceneSection::__PPO__EndTime() ))); __Local__540 = 13.000000f; __Local__525.Add(__Local__526); __Local__521.Add(__Local__522); auto& __Local__541 = (*(AccessPrivateProperty<FFloatRange >((__Local__106), UMovieScene::__PPO__PlaybackRange() ))); __Local__541 = FFloatRange(FFloatRangeBound::Inclusive(0.000000), FFloatRangeBound::Inclusive(13.000000)); __Local__1->MovieScene = __Local__106; __Local__1->AnimationBindings = TArray<FWidgetAnimationBinding> (); __Local__1->AnimationBindings.AddUninitialized(18); FWidgetAnimationBinding::StaticStruct()->InitializeStruct(__Local__1->AnimationBindings.GetData(), 18); auto& __Local__542 = __Local__1->AnimationBindings[0]; __Local__542.WidgetName = FName(TEXT("Details-4")); __Local__542.AnimationGuid = FGuid(0x35B55384, 0x4B3A6FA2, 0x6F85EEAB, 0xD9E39BB0); auto& __Local__543 = __Local__1->AnimationBindings[1]; __Local__543.WidgetName = FName(TEXT("Details-1")); __Local__543.AnimationGuid = FGuid(0x131C8D9C, 0x43268B80, 0x4570D48A, 0xD19B30A6); auto& __Local__544 = __Local__1->AnimationBindings[2]; __Local__544.WidgetName = FName(TEXT("Details-2")); __Local__544.AnimationGuid = FGuid(0xA3D67332, 0x489F176F, 0x9E51C2A1, 0x7E9577F7); auto& __Local__545 = __Local__1->AnimationBindings[3]; __Local__545.WidgetName = FName(TEXT("Details-3")); __Local__545.AnimationGuid = FGuid(0xA703D03F, 0x4C3C8ECE, 0x5B999692, 0x148FAFCF); auto& __Local__546 = __Local__1->AnimationBindings[4]; __Local__546.WidgetName = FName(TEXT("TransparentBG-Health")); __Local__546.AnimationGuid = FGuid(0x6C3E4987, 0x40DCB91F, 0x14A70CA2, 0x21B875BE); auto& __Local__547 = __Local__1->AnimationBindings[5]; __Local__547.WidgetName = FName(TEXT("TransparentBG-Gun")); __Local__547.AnimationGuid = FGuid(0x75BB6B58, 0x4E61B2DB, 0x126FB3A5, 0x80D778A5); auto& __Local__548 = __Local__1->AnimationBindings[6]; __Local__548.WidgetName = FName(TEXT("TransparentBG-Ammo")); __Local__548.AnimationGuid = FGuid(0xA7938A64, 0x4FB38EFC, 0xEBFAFD87, 0x61E4CBCD); auto& __Local__549 = __Local__1->AnimationBindings[7]; __Local__549.WidgetName = FName(TEXT("Gun")); __Local__549.AnimationGuid = FGuid(0x43997E24, 0x426E0C7B, 0x74B44B9A, 0x5863473A); auto& __Local__550 = __Local__1->AnimationBindings[8]; __Local__550.WidgetName = FName(TEXT("OutOfAmmo")); __Local__550.AnimationGuid = FGuid(0x9193DCBC, 0x469C99B5, 0x61D768B0, 0x8DFC505F); auto& __Local__551 = __Local__1->AnimationBindings[9]; __Local__551.WidgetName = FName(TEXT("HealthBar_Empty")); __Local__551.AnimationGuid = FGuid(0x77AA620F, 0x4029812B, 0x3AB146B1, 0xD5CD23D2); auto& __Local__552 = __Local__1->AnimationBindings[10]; __Local__552.WidgetName = FName(TEXT("HealthBar_Full")); __Local__552.AnimationGuid = FGuid(0x40A62321, 0x48203DD2, 0xF46F85A5, 0x6D9C55F6); auto& __Local__553 = __Local__1->AnimationBindings[11]; __Local__553.WidgetName = FName(TEXT("AmmoInMag")); __Local__553.AnimationGuid = FGuid(0x5315EE1F, 0x44939ED3, 0xEC2B5685, 0x22436179); auto& __Local__554 = __Local__1->AnimationBindings[12]; __Local__554.WidgetName = FName(TEXT("Divider")); __Local__554.AnimationGuid = FGuid(0x38A81112, 0x4BFE21C9, 0xCBB8B7AC, 0x9F979B50); auto& __Local__555 = __Local__1->AnimationBindings[13]; __Local__555.WidgetName = FName(TEXT("AmmoReserved")); __Local__555.AnimationGuid = FGuid(0xC14D5C5E, 0x40C6D99A, 0xFA9853A0, 0x8CEC36B2); auto& __Local__556 = __Local__1->AnimationBindings[14]; __Local__556.WidgetName = FName(TEXT("ChapterText")); __Local__556.AnimationGuid = FGuid(0xA1FCCF95, 0x4D8635ED, 0xAB96198E, 0xA89CB97C); auto& __Local__557 = __Local__1->AnimationBindings[15]; __Local__557.WidgetName = FName(TEXT("BgOfChapter")); __Local__557.AnimationGuid = FGuid(0x2AB85BC1, 0x4528D308, 0x2B6BBC81, 0x7CA72669); auto& __Local__558 = __Local__1->AnimationBindings[16]; __Local__558.WidgetName = FName(TEXT("ObjectiveText")); __Local__558.AnimationGuid = FGuid(0x85A9F536, 0x46B7A620, 0x78E165BD, 0xA56631C4); auto& __Local__559 = __Local__1->AnimationBindings[17]; __Local__559.WidgetName = FName(TEXT("BgOfObjective")); __Local__559.AnimationGuid = FGuid(0xDDE95A0E, 0x4290F86F, 0xC332B88C, 0xADEAA7B5); auto __Local__560 = NewObject<UMovieScene>(__Local__2, UMovieScene::StaticClass(), TEXT("TakingDamageAnim")); auto& __Local__561 = (*(AccessPrivateProperty<FFloatRange >((__Local__560), UMovieScene::__PPO__PlaybackRange() ))); __Local__561 = FFloatRange(FFloatRangeBound::Inclusive(0.000000), FFloatRangeBound::Inclusive(1.000000)); __Local__2->MovieScene = __Local__560; } void UInGameUI_C__pf122804083::GetSlotNames(TArray<FName>& SlotNames) const { TArray<FName> __Local__562; SlotNames.Append(__Local__562); } void UInGameUI_C__pf122804083::InitializeNativeClassData() { TArray<UWidgetAnimation*> __Local__563; __Local__563.Reserve(2); __Local__563.Add(CastChecked<UWidgetAnimation>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->MiscConvertedSubobjects[1])); __Local__563.Add(CastChecked<UWidgetAnimation>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->MiscConvertedSubobjects[2])); TArray<FDelegateRuntimeBinding> __Local__564; __Local__564.AddUninitialized(4); FDelegateRuntimeBinding::StaticStruct()->InitializeStruct(__Local__564.GetData(), 4); auto& __Local__565 = __Local__564[0]; __Local__565.ObjectName = FString(TEXT("AmmoInMag")); __Local__565.PropertyName = FName(TEXT("Text")); __Local__565.FunctionName = FName(TEXT("Get_AmmoInMag_Text_0")); auto& __Local__566 = (*(AccessPrivateProperty<TArray<FPropertyPathSegment> >(&(__Local__565.SourcePath), FDynamicPropertyPath::__PPO__Segments() ))); __Local__566 = TArray<FPropertyPathSegment> (); __Local__566.AddUninitialized(1); FPropertyPathSegment::StaticStruct()->InitializeStruct(__Local__566.GetData(), 1); auto& __Local__567 = __Local__566[0]; __Local__567.Name = FName(TEXT("Get_AmmoInMag_Text_0")); auto& __Local__568 = __Local__564[1]; __Local__568.ObjectName = FString(TEXT("AmmoReserved")); __Local__568.PropertyName = FName(TEXT("Text")); __Local__568.FunctionName = FName(TEXT("Get_AmmoReserved_Text_0")); auto& __Local__569 = (*(AccessPrivateProperty<TArray<FPropertyPathSegment> >(&(__Local__568.SourcePath), FDynamicPropertyPath::__PPO__Segments() ))); __Local__569 = TArray<FPropertyPathSegment> (); __Local__569.AddUninitialized(1); FPropertyPathSegment::StaticStruct()->InitializeStruct(__Local__569.GetData(), 1); auto& __Local__570 = __Local__569[0]; __Local__570.Name = FName(TEXT("Get_AmmoReserved_Text_0")); auto& __Local__571 = __Local__564[2]; __Local__571.ObjectName = FString(TEXT("OutOfAmmo")); __Local__571.PropertyName = FName(TEXT("Visibility")); __Local__571.FunctionName = FName(TEXT("Get_OutOfAmmo_Visibility_0")); auto& __Local__572 = (*(AccessPrivateProperty<TArray<FPropertyPathSegment> >(&(__Local__571.SourcePath), FDynamicPropertyPath::__PPO__Segments() ))); __Local__572 = TArray<FPropertyPathSegment> (); __Local__572.AddUninitialized(1); FPropertyPathSegment::StaticStruct()->InitializeStruct(__Local__572.GetData(), 1); auto& __Local__573 = __Local__572[0]; __Local__573.Name = FName(TEXT("Get_OutOfAmmo_Visibility_0")); auto& __Local__574 = __Local__564[3]; __Local__574.ObjectName = FString(TEXT("HealthBar_Full")); __Local__574.PropertyName = FName(TEXT("Percent")); __Local__574.FunctionName = FName(TEXT("Get_HealthBar_Full_Percent_0")); auto& __Local__575 = (*(AccessPrivateProperty<TArray<FPropertyPathSegment> >(&(__Local__574.SourcePath), FDynamicPropertyPath::__PPO__Segments() ))); __Local__575 = TArray<FPropertyPathSegment> (); __Local__575.AddUninitialized(1); FPropertyPathSegment::StaticStruct()->InitializeStruct(__Local__575.GetData(), 1); auto& __Local__576 = __Local__575[0]; __Local__576.Name = FName(TEXT("Get_HealthBar_Full_Percent_0")); UWidgetBlueprintGeneratedClass::InitializeWidgetStatic(this, GetClass(), true, false, CastChecked<UWidgetTree>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->MiscConvertedSubobjects[0]), __Local__563, __Local__564); } void UInGameUI_C__pf122804083::PreSave(const class ITargetPlatform* TargetPlatform) { Super::PreSave(TargetPlatform); TArray<FName> LocalNamedSlots; GetSlotNames(LocalNamedSlots); RemoveObsoleteBindings(LocalNamedSlots); } void UInGameUI_C__pf122804083::bpf__ExecuteUbergraph_InGameUI__pf_0(int32 bpp__EntryPoint__pf) { ACharacter* bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf{}; ACharacter* bpv__CallFunc_GetPlayerCharacter_ReturnValue2__pf{}; bool bpv__CallFunc_LessEqual_FloatFloat_ReturnValue__pf{}; TArray< int32, TInlineAllocator<8> > StateStack; int32 CurrentState = bpp__EntryPoint__pf; do { switch( CurrentState ) { case 1: { if(IsValid(bpv__ChapterText__pf)) { bpv__ChapterText__pf->SetVisibility(ESlateVisibility::Hidden); } } case 2: { if(IsValid(bpv__Chapter2Text__pf)) { bpv__Chapter2Text__pf->SetVisibility(ESlateVisibility::Visible); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 3: { if(IsValid(bpv__ObjectiveTextxCH2__pfG)) { bpv__ObjectiveTextxCH2__pfG->SetVisibility(ESlateVisibility::Visible); } CurrentState = 1; break; } case 4: { if(IsValid(bpv__ObjectiveText__pf)) { bpv__ObjectiveText__pf->SetVisibility(ESlateVisibility::Hidden); } if(IsValid(bpv__ObjectiveTextx02__pfG)) { bpv__ObjectiveTextx02__pfG->SetVisibility(ESlateVisibility::Hidden); } if(IsValid(bpv__ObjectiveTextx03__pfG)) { bpv__ObjectiveTextx03__pfG->SetVisibility(ESlateVisibility::Hidden); } CurrentState = 3; break; } case 5: { if(IsValid(bpv__InteractionBGx02__pfG)) { bpv__InteractionBGx02__pfG->SetVisibility(ESlateVisibility::Hidden); } } case 6: { if(IsValid(bpv__opengate__pf)) { bpv__opengate__pf->SetVisibility(ESlateVisibility::Hidden); } } case 7: { if(IsValid(bpv__egate__pf)) { bpv__egate__pf->SetVisibility(ESlateVisibility::Hidden); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 8: { if(IsValid(bpv__InteractionBGx02__pfG)) { bpv__InteractionBGx02__pfG->SetVisibility(ESlateVisibility::Visible); } } case 9: { if(IsValid(bpv__opengate__pf)) { bpv__opengate__pf->SetVisibility(ESlateVisibility::Visible); } } case 10: { if(IsValid(bpv__egate__pf)) { bpv__egate__pf->SetVisibility(ESlateVisibility::Visible); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 11: { bool __Local__577 = false; if (!((IsValid(b0l__K2Node_DynamicCast_AsMy_Char2__pf)) ? (b0l__K2Node_DynamicCast_AsMy_Char2__pf->bpv__Objectivex01__pfG) : (__Local__577))) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } } case 12: { if(IsValid(bpv__ObjectiveText__pf)) { bpv__ObjectiveText__pf->SetVisibility(ESlateVisibility::Hidden); } } case 13: { if(IsValid(bpv__ObjectiveTextx02__pfG)) { bpv__ObjectiveTextx02__pfG->SetVisibility(ESlateVisibility::Visible); } } case 14: { StateStack.Push(15); CurrentState = 17; break; } case 15: { } case 16: { if (!b0l__Temp_bool_IsClosed_Variable__pf) { CurrentState = 21; break; } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 17: { if (!b0l__Temp_bool_Has_Been_Initd_Variable2__pf) { CurrentState = 18; break; } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 18: { b0l__Temp_bool_Has_Been_Initd_Variable2__pf = true; } case 19: { if (!false) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } } case 20: { b0l__Temp_bool_IsClosed_Variable__pf = true; CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 21: { b0l__Temp_bool_IsClosed_Variable__pf = true; } case 22: { UGameplayStatics::PlaySound2D(this, CastChecked<USoundBase>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[7], ECastCheckedType::NullAllowed), 1.000000, 1.000000, 0.000000, nullptr); CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 23: { bool __Local__578 = false; if (!((IsValid(b0l__K2Node_DynamicCast_AsMy_Char2__pf)) ? (b0l__K2Node_DynamicCast_AsMy_Char2__pf->bpv__Objectivex02__pfG) : (__Local__578))) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } } case 24: { if(IsValid(bpv__ObjectiveTextx02__pfG)) { bpv__ObjectiveTextx02__pfG->SetVisibility(ESlateVisibility::Hidden); } } case 25: { if(IsValid(bpv__ObjectiveTextx03__pfG)) { bpv__ObjectiveTextx03__pfG->SetVisibility(ESlateVisibility::Visible); } } case 26: { StateStack.Push(27); CurrentState = 31; break; } case 27: { } case 28: { if (!b0l__Temp_bool_IsClosed_Variable2__pf) { CurrentState = 29; break; } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 29: { b0l__Temp_bool_IsClosed_Variable2__pf = true; } case 30: { UGameplayStatics::PlaySound2D(this, CastChecked<USoundBase>(CastChecked<UDynamicClass>(UInGameUI_C__pf122804083::StaticClass())->UsedAssets[7], ECastCheckedType::NullAllowed), 1.000000, 1.000000, 0.000000, nullptr); CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 31: { if (!b0l__Temp_bool_Has_Been_Initd_Variable__pf) { CurrentState = 32; break; } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 32: { b0l__Temp_bool_Has_Been_Initd_Variable__pf = true; } case 33: { if (!false) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } } case 34: { b0l__Temp_bool_IsClosed_Variable2__pf = true; CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 35: { bool __Local__579 = false; if (!((IsValid(b0l__K2Node_DynamicCast_AsMy_Char2__pf)) ? (b0l__K2Node_DynamicCast_AsMy_Char2__pf->bpv__CanPickUpx__pfzy) : (__Local__579))) { CurrentState = 39; break; } } case 36: { if(IsValid(bpv__interactionBG__pf)) { bpv__interactionBG__pf->SetVisibility(ESlateVisibility::Visible); } } case 37: { if(IsValid(bpv__Presspick__pf)) { bpv__Presspick__pf->SetVisibility(ESlateVisibility::Visible); } } case 38: { if(IsValid(bpv__E__pf)) { bpv__E__pf->SetVisibility(ESlateVisibility::Visible); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 39: { if(IsValid(bpv__interactionBG__pf)) { bpv__interactionBG__pf->SetVisibility(ESlateVisibility::Hidden); } } case 40: { if(IsValid(bpv__Presspick__pf)) { bpv__Presspick__pf->SetVisibility(ESlateVisibility::Hidden); } } case 41: { if(IsValid(bpv__E__pf)) { bpv__E__pf->SetVisibility(ESlateVisibility::Hidden); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 42: { float __Local__580 = 0.000000; bpv__CallFunc_LessEqual_FloatFloat_ReturnValue__pf = UKismetMathLibrary::LessEqual_FloatFloat(((IsValid(b0l__K2Node_DynamicCast_AsMy_Char2__pf)) ? (b0l__K2Node_DynamicCast_AsMy_Char2__pf->bpv__CharHealth__pf) : (__Local__580)), 0.300000); if (!bpv__CallFunc_LessEqual_FloatFloat_ReturnValue__pf) { CurrentState = 44; break; } } case 43: { if(IsValid(bpv__LowHealthScreen__pf)) { bpv__LowHealthScreen__pf->SetVisibility(ESlateVisibility::Visible); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 44: { if(IsValid(bpv__LowHealthScreen__pf)) { bpv__LowHealthScreen__pf->SetVisibility(ESlateVisibility::Hidden); } CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } case 45: { bool __Local__581 = false; if (!((IsValid(b0l__K2Node_DynamicCast_AsMy_Char2__pf)) ? (b0l__K2Node_DynamicCast_AsMy_Char2__pf->bpv__OpenGatex__pfzy) : (__Local__581))) { CurrentState = 5; break; } CurrentState = 8; break; } case 46: { bpv__CallFunc_GetPlayerCharacter_ReturnValue2__pf = UGameplayStatics::GetPlayerCharacter(this, 0); b0l__K2Node_DynamicCast_AsMy_Char2__pf = Cast<AMyChar_C__pf2980937819>(bpv__CallFunc_GetPlayerCharacter_ReturnValue2__pf); b0l__K2Node_DynamicCast_bSuccess2__pf = (b0l__K2Node_DynamicCast_AsMy_Char2__pf != nullptr);; if (!b0l__K2Node_DynamicCast_bSuccess2__pf) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } } case 47: { StateStack.Push(48); CurrentState = 11; break; } case 48: { StateStack.Push(49); CurrentState = 23; break; } case 49: { StateStack.Push(50); CurrentState = 35; break; } case 50: { StateStack.Push(51); CurrentState = 42; break; } case 51: { StateStack.Push(52); CurrentState = 45; break; } case 52: { } case 53: { bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf = UGameplayStatics::GetPlayerCharacter(this, 0); b0l__K2Node_DynamicCast_AsMy_Char__pf = Cast<AMyChar_C__pf2980937819>(bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf); b0l__K2Node_DynamicCast_bSuccess__pf = (b0l__K2Node_DynamicCast_AsMy_Char__pf != nullptr);; if (!b0l__K2Node_DynamicCast_bSuccess__pf) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } } case 54: { bool __Local__582 = false; if (!((IsValid(b0l__K2Node_DynamicCast_AsMy_Char__pf)) ? (b0l__K2Node_DynamicCast_AsMy_Char__pf->bpv__Level02x__pfzy) : (__Local__582))) { CurrentState = (StateStack.Num() > 0) ? StateStack.Pop(/*bAllowShrinking=*/ false) : -1; break; } CurrentState = 4; break; } case 56: { CurrentState = 46; break; } default: check(false); // Invalid state break; } } while( CurrentState != -1 ); } void UInGameUI_C__pf122804083::bpf__ExecuteUbergraph_InGameUI__pf_1(int32 bpp__EntryPoint__pf) { check(bpp__EntryPoint__pf == 57); // optimized KCST_UnconditionalGoto UUserWidget::PlayAnimation(bpv__FadeInxUI__pfG, 0.000000, 1, EUMGSequencePlayMode::Forward, 1.000000); return; //KCST_EndOfThread } void UInGameUI_C__pf122804083::bpf__Tick__pf(FGeometry bpp__MyGeometry__pf, float bpp__InDeltaTime__pf) { b0l__K2Node_Event_MyGeometry__pf = bpp__MyGeometry__pf; b0l__K2Node_Event_InDeltaTime__pf = bpp__InDeltaTime__pf; bpf__ExecuteUbergraph_InGameUI__pf_0(56); } void UInGameUI_C__pf122804083::bpf__Construct__pf() { bpf__ExecuteUbergraph_InGameUI__pf_1(57); } FText UInGameUI_C__pf122804083::bpf__Get_AmmoInMag_Text_0__pf() { FText bpp__ReturnValue__pf{}; ACharacter* bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf{}; AMyChar_C__pf2980937819* bpv__K2Node_DynamicCast_AsMy_Char__pf{}; bool bpv__K2Node_DynamicCast_bSuccess__pf{}; FText bpv__CallFunc_Conv_FloatToText_ReturnValue__pf{}; int32 CurrentState = 4; do { switch( CurrentState ) { case 4: { } case 1: { bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf = UGameplayStatics::GetPlayerCharacter(this, 0); bpv__K2Node_DynamicCast_AsMy_Char__pf = Cast<AMyChar_C__pf2980937819>(bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf); bpv__K2Node_DynamicCast_bSuccess__pf = (bpv__K2Node_DynamicCast_AsMy_Char__pf != nullptr);; if (!bpv__K2Node_DynamicCast_bSuccess__pf) { CurrentState = 3; break; } } case 2: { float __Local__583 = 0.000000; bpv__CallFunc_Conv_FloatToText_ReturnValue__pf = UKismetTextLibrary::Conv_FloatToText(((IsValid(bpv__K2Node_DynamicCast_AsMy_Char__pf)) ? (bpv__K2Node_DynamicCast_AsMy_Char__pf->bpv__AmmoInGun__pf) : (__Local__583)), ERoundingMode::HalfToEven, true, 1, 324, 0, 3); bpp__ReturnValue__pf = bpv__CallFunc_Conv_FloatToText_ReturnValue__pf; CurrentState = -1; break; } case 3: { bpp__ReturnValue__pf = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("0"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("422F3EDC45A7E85139E809BB8DD9AFED") /* Key */ ); CurrentState = -1; break; } default: break; } } while( CurrentState != -1 ); return bpp__ReturnValue__pf; } FText UInGameUI_C__pf122804083::bpf__Get_AmmoReserved_Text_0__pf() { FText bpp__ReturnValue__pf{}; ACharacter* bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf{}; AMyChar_C__pf2980937819* bpv__K2Node_DynamicCast_AsMy_Char__pf{}; bool bpv__K2Node_DynamicCast_bSuccess__pf{}; FText bpv__CallFunc_Conv_FloatToText_ReturnValue__pf{}; int32 CurrentState = 4; do { switch( CurrentState ) { case 4: { } case 1: { bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf = UGameplayStatics::GetPlayerCharacter(this, 0); bpv__K2Node_DynamicCast_AsMy_Char__pf = Cast<AMyChar_C__pf2980937819>(bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf); bpv__K2Node_DynamicCast_bSuccess__pf = (bpv__K2Node_DynamicCast_AsMy_Char__pf != nullptr);; if (!bpv__K2Node_DynamicCast_bSuccess__pf) { CurrentState = 3; break; } } case 2: { float __Local__584 = 0.000000; bpv__CallFunc_Conv_FloatToText_ReturnValue__pf = UKismetTextLibrary::Conv_FloatToText(((IsValid(bpv__K2Node_DynamicCast_AsMy_Char__pf)) ? (bpv__K2Node_DynamicCast_AsMy_Char__pf->bpv__AmmoReserved__pf) : (__Local__584)), ERoundingMode::HalfToEven, true, 1, 324, 0, 3); bpp__ReturnValue__pf = bpv__CallFunc_Conv_FloatToText_ReturnValue__pf; CurrentState = -1; break; } case 3: { bpp__ReturnValue__pf = FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT("000"), /* Literal Text */ TEXT("[4F3D533C4F6231499FFBC1A5CF155091]"), /* Namespace */ TEXT("73EF2B0049B7493E3D2C3C9DCD2FA11C") /* Key */ ); CurrentState = -1; break; } default: break; } } while( CurrentState != -1 ); return bpp__ReturnValue__pf; } ESlateVisibility UInGameUI_C__pf122804083::bpf__Get_OutOfAmmo_Visibility_0__pf() { ESlateVisibility bpp__ReturnValue__pf{}; ACharacter* bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf{}; AMyChar_C__pf2980937819* bpv__K2Node_DynamicCast_AsMy_Char__pf{}; bool bpv__K2Node_DynamicCast_bSuccess__pf{}; int32 CurrentState = 6; do { switch( CurrentState ) { case 6: { } case 1: { bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf = UGameplayStatics::GetPlayerCharacter(this, 0); bpv__K2Node_DynamicCast_AsMy_Char__pf = Cast<AMyChar_C__pf2980937819>(bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf); bpv__K2Node_DynamicCast_bSuccess__pf = (bpv__K2Node_DynamicCast_AsMy_Char__pf != nullptr);; if (!bpv__K2Node_DynamicCast_bSuccess__pf) { CurrentState = 4; break; } } case 2: { bool __Local__585 = false; if (!((IsValid(bpv__K2Node_DynamicCast_AsMy_Char__pf)) ? (bpv__K2Node_DynamicCast_AsMy_Char__pf->bpv__OutOfAmmo_Text__pf) : (__Local__585))) { CurrentState = 5; break; } } case 3: { bpp__ReturnValue__pf = ESlateVisibility::Visible; CurrentState = -1; break; } case 4: { bpp__ReturnValue__pf = ESlateVisibility::Hidden; CurrentState = -1; break; } case 5: { bpp__ReturnValue__pf = ESlateVisibility::Hidden; CurrentState = -1; break; } default: break; } } while( CurrentState != -1 ); return bpp__ReturnValue__pf; } float UInGameUI_C__pf122804083::bpf__Get_HealthBar_Full_Percent_0__pf() { float bpp__ReturnValue__pf{}; ACharacter* bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf{}; AMyChar_C__pf2980937819* bpv__K2Node_DynamicCast_AsMy_Char__pf{}; bool bpv__K2Node_DynamicCast_bSuccess__pf{}; int32 CurrentState = 4; do { switch( CurrentState ) { case 4: { } case 1: { bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf = UGameplayStatics::GetPlayerCharacter(this, 0); bpv__K2Node_DynamicCast_AsMy_Char__pf = Cast<AMyChar_C__pf2980937819>(bpv__CallFunc_GetPlayerCharacter_ReturnValue__pf); bpv__K2Node_DynamicCast_bSuccess__pf = (bpv__K2Node_DynamicCast_AsMy_Char__pf != nullptr);; if (!bpv__K2Node_DynamicCast_bSuccess__pf) { CurrentState = 3; break; } } case 2: { float __Local__586 = 0.000000; bpp__ReturnValue__pf = ((IsValid(bpv__K2Node_DynamicCast_AsMy_Char__pf)) ? (bpv__K2Node_DynamicCast_AsMy_Char__pf->bpv__CharHealth__pf) : (__Local__586)); CurrentState = -1; break; } case 3: { bpp__ReturnValue__pf = 0.000000; CurrentState = -1; break; } default: break; } } while( CurrentState != -1 ); return bpp__ReturnValue__pf; } void UInGameUI_C__pf122804083::__StaticDependencies_CommonAssets(TArray<FBlueprintDependencyData>& AssetsToLoad) { const TCHAR* __Local__587 = TEXT("/Game/Images"); const TCHAR* __Local__588 = TEXT("/Game/UI/Hud"); const TCHAR* __Local__589 = TEXT("/Game/Fonts"); const TCHAR* __Local__590 = TEXT("/Game/Audio"); FBlueprintDependencyData LocAssets[] = { FBlueprintDependencyData(__Local__587, TEXT("LowHealthScreen"), TEXT("LowHealthScreen"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__588, TEXT("handgun_img"), TEXT("handgun_img"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__588, TEXT("HealthBar_Full"), TEXT("HealthBar_Full"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__589, TEXT("ADOBESONGSTD-LIGHT"), TEXT("ADOBESONGSTD-LIGHT"), TEXT("/Script/Engine"), TEXT("Font")), FBlueprintDependencyData(__Local__587, TEXT("grunge-01-transparent"), TEXT("grunge-01-transparent"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__589, TEXT("corbel"), TEXT("corbel"), TEXT("/Script/Engine"), TEXT("Font")), FBlueprintDependencyData(__Local__589, TEXT("corbelb"), TEXT("corbelb"), TEXT("/Script/Engine"), TEXT("Font")), FBlueprintDependencyData(__Local__590, TEXT("Scary_impact"), TEXT("Scary_impact"), TEXT("/Script/Engine"), TEXT("SoundWave")), }; for(auto& LocAsset : LocAssets) { AssetsToLoad.Add(LocAsset); } } void UInGameUI_C__pf122804083::__StaticDependencies_DirectlyUsedAssets(TArray<FBlueprintDependencyData>& AssetsToLoad) { __StaticDependencies_CommonAssets(AssetsToLoad); } void UInGameUI_C__pf122804083::__StaticDependenciesAssets(TArray<FBlueprintDependencyData>& AssetsToLoad) { __StaticDependencies_CommonAssets(AssetsToLoad); const TCHAR* __Local__591 = TEXT("/Engine/EngineFonts"); const TCHAR* __Local__592 = TEXT("/Game/Weapons"); const TCHAR* __Local__593 = TEXT("/Game/Images"); const TCHAR* __Local__594 = TEXT("/Game/OldTrainFactory/Textures/build"); const TCHAR* __Local__595 = TEXT("/Game/Audio"); const TCHAR* __Local__596 = TEXT("/Game/UI/Hud"); const TCHAR* __Local__597 = TEXT("/Game/Mannequin/Character/Mesh"); const TCHAR* __Local__598 = TEXT("/Game/Audio/walking-sounds"); const TCHAR* __Local__599 = TEXT("/Game/Mannequin/MovePistoAnimPack"); const TCHAR* __Local__600 = TEXT("/Game/Mannequin/MovementAnimPack"); const TCHAR* __Local__601 = TEXT("/Game/Mannequin/Animations"); const TCHAR* __Local__602 = TEXT("/Game/Mannequin/Character"); const TCHAR* __Local__603 = TEXT("/Game/Mannequin/AngrosEdit"); const TCHAR* __Local__604 = TEXT("/Game/BulletVFX/Meshes"); const TCHAR* __Local__605 = TEXT("/Game/Materials"); const TCHAR* __Local__606 = TEXT("/Game/Audio/Zombie-Sounds"); const TCHAR* __Local__607 = TEXT("/Game/Audio/SoundAttenuation"); const TCHAR* __Local__608 = TEXT("/Game/Audio/injured-sounds"); const TCHAR* __Local__609 = TEXT("/Game/ZombieMixamoModels/Defaults/ZombieCop"); const TCHAR* __Local__610 = TEXT("/Game/ZombieMixamoModels/Animations/ZombieCop"); const TCHAR* __Local__611 = TEXT("/Game/ZombieMixamoModels/BlendSpace"); const TCHAR* __Local__612 = TEXT("/Game/Zombie_01/Animation/Root_Motion"); const TCHAR* __Local__613 = TEXT("/Game/BulletVFX/Particles"); const TCHAR* __Local__614 = TEXT("/Game/Mannequin"); const TCHAR* __Local__615 = TEXT("/Game/Soldier_ru_01/Meshes"); const TCHAR* __Local__616 = TEXT("/Game/UI/LoadingScreens"); const TCHAR* __Local__617 = TEXT("/Game/UI"); const TCHAR* __Local__618 = TEXT("/Game/Mannequin/AngrosEdit/InfectedBlueprints"); const TCHAR* __Local__619 = TEXT("/Game/ZombieMixamoModels"); const TCHAR* __Local__620 = TEXT("/Game/Blueprints"); FBlueprintDependencyData LocAssets[] = { FBlueprintDependencyData(__Local__591, TEXT("Roboto"), TEXT("Roboto"), TEXT("/Script/Engine"), TEXT("Font")), FBlueprintDependencyData(__Local__592, TEXT("M9-w-Flashlight"), TEXT("M9-w-Flashlight"), TEXT("/Script/Engine"), TEXT("StaticMesh")), FBlueprintDependencyData(__Local__593, TEXT("LoadingScreen-Town"), TEXT("LoadingScreen-Town"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__594, TEXT("Wood_01_D"), TEXT("Wood_01_D"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__595, TEXT("onClick"), TEXT("onClick"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__595, TEXT("hoverSound"), TEXT("hoverSound"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__596, TEXT("Crosshair_HUD"), TEXT("Crosshair_HUD"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__596, TEXT("Crosshair_HUD_Shoot"), TEXT("Crosshair_HUD_Shoot"), TEXT("/Script/Engine"), TEXT("Texture2D")), FBlueprintDependencyData(__Local__597, TEXT("UE4_Mannequin_Skeleton"), TEXT("UE4_Mannequin_Skeleton"), TEXT("/Script/Engine"), TEXT("Skeleton")), FBlueprintDependencyData(__Local__598, TEXT("footsteps"), TEXT("footsteps"), TEXT("/Script/Engine"), TEXT("SoundCue")), FBlueprintDependencyData(__Local__599, TEXT("Pistol_Reload"), TEXT("Pistol_Reload"), TEXT("/Script/Engine"), TEXT("AnimMontage")), FBlueprintDependencyData(__Local__599, TEXT("Pistol_ShootOnce_Montage"), TEXT("Pistol_ShootOnce_Montage"), TEXT("/Script/Engine"), TEXT("AnimMontage")), FBlueprintDependencyData(__Local__600, TEXT("ConsoleUse_LH"), TEXT("ConsoleUse_LH"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("CrouchLoop_new"), TEXT("CrouchLoop_new"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("Crouch2Idle_new"), TEXT("Crouch2Idle_new"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("PickUp_LH"), TEXT("PickUp_LH"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("Fists_Hit_Right"), TEXT("Fists_Hit_Right"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("Death_1"), TEXT("Death_1"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__599, TEXT("Pistol_SprintStart"), TEXT("Pistol_SprintStart"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("RunFwdStart"), TEXT("RunFwdStart"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("JumpRun_LU_Land2Run"), TEXT("JumpRun_LU_Land2Run"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("JumpWalk_RU_Land2Walk"), TEXT("JumpWalk_RU_Land2Walk"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("JumpWalk_RU_Land"), TEXT("JumpWalk_RU_Land"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__601, TEXT("ThirdPersonJump_Loop"), TEXT("ThirdPersonJump_Loop"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__602, TEXT("WalkFwdStop_LU"), TEXT("WalkFwdStop_LU"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__602, TEXT("WalkFwdStart"), TEXT("WalkFwdStart"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__603, TEXT("PistolGunUp_IdleToRun"), TEXT("PistolGunUp_IdleToRun"), TEXT("/Script/Engine"), TEXT("BlendSpace")), FBlueprintDependencyData(__Local__603, TEXT("Pistol_IdleToRun"), TEXT("Pistol_IdleToRun"), TEXT("/Script/Engine"), TEXT("BlendSpace")), FBlueprintDependencyData(__Local__600, TEXT("TurnLt90_Loop"), TEXT("TurnLt90_Loop"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__600, TEXT("TurnRt90_Loop"), TEXT("TurnRt90_Loop"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__603, TEXT("idleToRun"), TEXT("idleToRun"), TEXT("/Script/Engine"), TEXT("BlendSpace")), FBlueprintDependencyData(__Local__603, TEXT("PistolAO"), TEXT("PistolAO"), TEXT("/Script/Engine"), TEXT("AimOffsetBlendSpace1D")), FBlueprintDependencyData(__Local__603, TEXT("LookAround_1D"), TEXT("LookAround_1D"), TEXT("/Script/Engine"), TEXT("AimOffsetBlendSpace1D")), FBlueprintDependencyData(__Local__604, TEXT("SM_BulletCasing"), TEXT("SM_BulletCasing"), TEXT("/Script/Engine"), TEXT("StaticMesh")), FBlueprintDependencyData(__Local__605, TEXT("BulletPhysicalMaterial"), TEXT("BulletPhysicalMaterial"), TEXT("/Script/Engine"), TEXT("PhysicalMaterial")), FBlueprintDependencyData(__Local__606, TEXT("zombie-idle"), TEXT("zombie-idle"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__607, TEXT("3dSound"), TEXT("3dSound"), TEXT("/Script/Engine"), TEXT("SoundAttenuation")), FBlueprintDependencyData(__Local__606, TEXT("Zombie_-_attack"), TEXT("Zombie_-_attack"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__606, TEXT("zombie-dies"), TEXT("zombie-dies"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__606, TEXT("zombie-idle-2"), TEXT("zombie-idle-2"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__606, TEXT("zombie-idle-3"), TEXT("zombie-idle-3"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__606, TEXT("zombie-detect"), TEXT("zombie-detect"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__606, TEXT("zombie-detect-2"), TEXT("zombie-detect-2"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__606, TEXT("zombie-dies-02"), TEXT("zombie-dies-02"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__608, TEXT("injured-sounds"), TEXT("injured-sounds"), TEXT("/Script/Engine"), TEXT("SoundCue")), FBlueprintDependencyData(__Local__609, TEXT("Copzombie_L_Actisdato_Skeleton"), TEXT("Copzombie_L_Actisdato_Skeleton"), TEXT("/Script/Engine"), TEXT("Skeleton")), FBlueprintDependencyData(__Local__610, TEXT("zombie_biting"), TEXT("zombie_biting"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__610, TEXT("zombie_attack"), TEXT("zombie_attack"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__610, TEXT("zombie_dying"), TEXT("zombie_dying"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__611, TEXT("SimpleBlendSpace"), TEXT("SimpleBlendSpace"), TEXT("/Script/Engine"), TEXT("BlendSpace1D")), FBlueprintDependencyData(__Local__612, TEXT("Zombie_Chase_1_Full_Loop"), TEXT("Zombie_Chase_1_Full_Loop"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__609, TEXT("Copzombie_L_Actisdato"), TEXT("Copzombie_L_Actisdato"), TEXT("/Script/Engine"), TEXT("SkeletalMesh")), FBlueprintDependencyData(__Local__595, TEXT("Dramatic_Hit_Hard_10"), TEXT("Dramatic_Hit_Hard_10"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__595, TEXT("Death_Scream"), TEXT("Death_Scream"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__595, TEXT("LostIt"), TEXT("LostIt"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__599, TEXT("PistolEquipMontage"), TEXT("PistolEquipMontage"), TEXT("/Script/Engine"), TEXT("AnimMontage")), FBlueprintDependencyData(__Local__595, TEXT("Player_Heal"), TEXT("Player_Heal"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__595, TEXT("SlowHeartbeat"), TEXT("SlowHeartbeat"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__599, TEXT("PistolEquipWeaponAnimMontage"), TEXT("PistolEquipWeaponAnimMontage"), TEXT("/Script/Engine"), TEXT("AnimMontage")), FBlueprintDependencyData(__Local__595, TEXT("Flashlight_ON"), TEXT("Flashlight_ON"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__595, TEXT("Flashlight_OFF"), TEXT("Flashlight_OFF"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__613, TEXT("VFX_Impact_Flesh"), TEXT("VFX_Impact_Flesh"), TEXT("/Script/Engine"), TEXT("ParticleSystem")), FBlueprintDependencyData(__Local__613, TEXT("VFX_Impact_Concrete"), TEXT("VFX_Impact_Concrete"), TEXT("/Script/Engine"), TEXT("ParticleSystem")), FBlueprintDependencyData(__Local__595, TEXT("Trigger_click_empty"), TEXT("Trigger_click_empty"), TEXT("/Script/Engine"), TEXT("SoundWave")), FBlueprintDependencyData(__Local__614, TEXT("Climbing"), TEXT("Climbing"), TEXT("/Script/Engine"), TEXT("AnimMontage")), FBlueprintDependencyData(__Local__602, TEXT("Pistol_Idle"), TEXT("Pistol_Idle"), TEXT("/Script/Engine"), TEXT("AnimSequence")), FBlueprintDependencyData(__Local__615, TEXT("Soldier_ru_01"), TEXT("Soldier_ru_01"), TEXT("/Script/Engine"), TEXT("SkeletalMesh")), FBlueprintDependencyData(__Local__605, TEXT("HumanPhysicalMaterial"), TEXT("HumanPhysicalMaterial"), TEXT("/Script/Engine"), TEXT("PhysicalMaterial")), FBlueprintDependencyData(__Local__603, TEXT("MyChar"), TEXT("MyChar_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__616, TEXT("LoadingScreen-WesternOak"), TEXT("LoadingScreen-WesternOak_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__617, TEXT("DeadScreen"), TEXT("DeadScreen_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__617, TEXT("BP_CrosshairShoot"), TEXT("BP_CrosshairShoot_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__617, TEXT("BP_Crosshair"), TEXT("BP_Crosshair_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__603, TEXT("MyAnimBP_Mannequin"), TEXT("MyAnimBP_Mannequin_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__592, TEXT("HandgunBullet"), TEXT("HandgunBullet_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__618, TEXT("Infected-AI"), TEXT("Infected-AI_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__619, TEXT("InfectedAnimBP"), TEXT("InfectedAnimBP_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__620, TEXT("M9-w-Flashlight"), TEXT("M9-w-Flashlight_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), FBlueprintDependencyData(__Local__620, TEXT("RunCamShake"), TEXT("RunCamShake_C"), TEXT("/Script/CoreUObject"), TEXT("DynamicClass")), }; for(auto& LocAsset : LocAssets) { AssetsToLoad.Add(LocAsset); } } struct FRegisterHelper__UInGameUI_C__pf122804083 { FRegisterHelper__UInGameUI_C__pf122804083() { FConvertedBlueprintsDependencies::Get().RegisterClass(TEXT("/Game/UI/InGameUI"), &UInGameUI_C__pf122804083::__StaticDependenciesAssets); } static FRegisterHelper__UInGameUI_C__pf122804083 Instance; }; FRegisterHelper__UInGameUI_C__pf122804083 FRegisterHelper__UInGameUI_C__pf122804083::Instance; #ifdef _MSC_VER #pragma warning (pop) #endif
d0bf6fd44880752cb4ce83d00aff025179fa9ac9
020dd6ffd4598cf7a696edb14200f399aa26a53c
/合法括号序列判断/合法括号序列判断/源.cpp
7d93bfd73515b7dd814c272527674fcb3e3c52eb
[]
no_license
xiaobbei/practice
5104d5baa39163cf5819b036dcf4df30a2f1d003
7f0589cea975c1a208a12727d6b5f8e1e0836067
refs/heads/master
2022-04-10T18:57:27.938527
2020-02-29T14:37:06
2020-02-29T14:37:06
198,360,849
0
0
null
null
null
null
UTF-8
C++
false
false
458
cpp
源.cpp
#include<iostream> #include<string> using namespace std; class Parenthesis { public: bool chkParenthesis(string A, int n) { // write code here if (n % 2 != 0) return false; int count = 0; for (int i = 0; i<A.size(); ++i) { if (A[i] != '('&&A[i] != ')') return false; if (A[i] == '(') count++; if (A[i] == ')') count--; } if (count == 0) return true; return false; } }; int main() { system("pause"); return 0; }
2b99fdd8e0eac0625ff9623640fd0cbb471903e7
f38e1eeee8678d5b228d9340dbeab87edb6a9368
/TeeNew/Builder2009/Release501_FixedBugs.cpp
4b3c881dcdc1b01093e98b50f3cdc990b719d4e1
[]
no_license
Steema/TeeChart-VCL-samples
383f28bfb7e6c812ed7d0db9768c5c1c64366831
cb26790fa9e5b4c1e50e57922697813e43a0b0bc
refs/heads/master
2021-11-17T07:02:23.895809
2021-09-14T07:43:04
2021-09-14T07:43:04
8,649,033
23
14
null
null
null
null
UTF-8
C++
false
false
4,931
cpp
Release501_FixedBugs.cpp
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Release501_FixedBugs.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TRelease501Fixed *Release501Fixed; //--------------------------------------------------------------------------- __fastcall TRelease501Fixed::TRelease501Fixed(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TRelease501Fixed::FormCreate(TObject *Sender) { StringGrid1->RowCount=32; StringGrid1->Cells[0][0]="Fixed bugs"; StringGrid1->Cells[1][0]="TeeChart Pro Release 5.01"; StringGrid1->Cells[0][1] ="ADX Function"; StringGrid1->Cells[0][2] ="Candle Series"; StringGrid1->Cells[0][3] ="Chart Legend"; StringGrid1->Cells[0][4] ="Bar and Horiz"; StringGrid1->Cells[0][5] ="BarSeries"; StringGrid1->Cells[0][6] ="Bollinger"; StringGrid1->Cells[0][7] ="BarJoin series"; StringGrid1->Cells[0][8] ="ChartGrid"; StringGrid1->Cells[0][9] ="ChartGrid"; StringGrid1->Cells[0][10]="TeeCommander"; StringGrid1->Cells[0][11]="SeriesDataSet"; StringGrid1->Cells[0][12]="Chart Editor"; StringGrid1->Cells[0][13]="TeeStore"; StringGrid1->Cells[0][14]="ColorGrid"; StringGrid1->Cells[0][15]="HighLow series"; StringGrid1->Cells[0][16]="Chart Editor"; StringGrid1->Cells[0][17]="Contour series"; StringGrid1->Cells[0][18]="FunctionType"; StringGrid1->Cells[0][19]="MarkTipsTool"; StringGrid1->Cells[0][20]="ChartListBox"; StringGrid1->Cells[0][21]="SeriesDataSet"; StringGrid1->Cells[0][22]="ErrorSeries"; StringGrid1->Cells[0][23]="BackColor"; StringGrid1->Cells[0][24]="Title and Foot"; StringGrid1->Cells[0][25]="DrawLine Tool"; StringGrid1->Cells[0][26]="Contour Series"; StringGrid1->Cells[0][27]="Zoom Pen"; StringGrid1->Cells[0][28]="DBChart Horiz"; StringGrid1->Cells[0][29]="Gallery"; StringGrid1->Cells[0][30]="Pie Series"; StringGrid1->Cells[0][31]="Candle Series"; StringGrid1->Cells[1][1] ="Fixed access violation when destroying the series."; StringGrid1->Cells[1][2] ="Fixed reversing of colors (UpClose and DownClose)."; StringGrid1->Cells[1][3] ="The OnGetLegendText event was not being called."; StringGrid1->Cells[1][4] ="(C++ Builder only) CustomBarSize was not possible to use at runtime."; StringGrid1->Cells[1][5] ="Several Bar series Stacked with first point 0 now works."; StringGrid1->Cells[1][6] ="Fixed division by zero in special circumstances."; StringGrid1->Cells[1][7] ="Editor was giving access violation."; StringGrid1->Cells[1][8] ="Setting label text to a series with less number of points than other series was not working."; StringGrid1->Cells[1][9] ="Changing or setting the Chart property now correctly repaints the grid."; StringGrid1->Cells[1][10]="Buttons can now be set invisible."; StringGrid1->Cells[1][11]="Null values supported when using the SeriesDataSet in a DBChart."; StringGrid1->Cells[1][12]="DBChart DataSources now show datasets in datamodules."; StringGrid1->Cells[1][13]="(Delphi 5 and up) Saving charts with functions now correctly reconnect when loading."; StringGrid1->Cells[1][14]="Creating grids of size less than 10x10 now works fine."; StringGrid1->Cells[1][15]="XValues property is now published."; StringGrid1->Cells[1][16]="Selecting Foot / SubFoot property was showing the opposite."; StringGrid1->Cells[1][17]="Assign method now supported. (ie: Contour1.Assign(Surface1) )"; StringGrid1->Cells[1][18]="Now calling Series1.FunctionType.Free works correctly."; StringGrid1->Cells[1][19]="Multiple on the same chart now work correctly."; StringGrid1->Cells[1][20]="Setting MultiSelect=False now works correctly."; StringGrid1->Cells[1][21]="Fixed some errors when used with empty Series."; StringGrid1->Cells[1][22]="Horizontal display now works correctly."; StringGrid1->Cells[1][23]="Reading a Chart form or tee file created with version 4.03 failed when BackColor was -1."; StringGrid1->Cells[1][24]="Chart Title and Foot now save the CustomPosition at design-time."; StringGrid1->Cells[1][25]="Accesing the Line[].Pen property no longer fails."; StringGrid1->Cells[1][26]="Modifying Level properties of an empty Contour works fine now."; StringGrid1->Cells[1][27]="A Chart Zoom Pen (not solid) with Width > 1 displays fine now."; StringGrid1->Cells[1][28]="Horiz Series in a DBChart with XY values now plots values fine."; StringGrid1->Cells[1][29]="Changing the Series type now preserves axis settings."; StringGrid1->Cells[1][30]="The Legend now display correctly when Pie Patterns are used."; StringGrid1->Cells[1][31]="Setting DateValues.DateTime to False at design-time works fine now."; } //---------------------------------------------------------------------------
5e4fbc56f3a2343953be8b3e5b97420566b36056
3644e0da44f3cf478c28a6d4f2973056b8d82a69
/Raspberry/Robocup/Sensors/src/PortCheck.cpp
f73a5458e60c3984232592499fdaac2e3113d9ab
[]
no_license
s991116/robot-projects
4e69c89f23d7e71422c47965d18e83b61c6fcb9b
31f92ffbd9a15df3bd0a7771e2f5b2e2e854de39
refs/heads/master
2023-03-06T07:03:57.331954
2022-11-11T20:29:50
2022-11-11T20:29:50
32,548,921
4
0
null
2023-03-01T20:36:05
2015-03-19T22:11:28
C++
UTF-8
C++
false
false
585
cpp
PortCheck.cpp
#include <PortCheck.h> #include <Convert.h> PortCheck::PortCheck(ComController* comController, int portCount) { _ComController = comController; _DeltaCount = portCount; SettingsInt["COUNT"] = &_DeltaCount; } void PortCheck::Prepare() { _TargetCount = _DeltaCount + _ComController->GetPortCount(); } std::string PortCheck::GetStatus() { int currentCount = _ComController->GetPortCount(); return "Port count: " + Convert::IntToString(currentCount); } bool PortCheck::Test() { int currentCount = _ComController->GetPortCount(); return (currentCount < _TargetCount); }
40726dfd2cb7486d9c7d7eabe7a7648b723a545f
b681d51c754ee0732519972bed62855432ac6dee
/CCCC-tianti/L1-027.cpp
140737c59f80f465a0c8696003dc9b8f347e6240
[]
no_license
haidehenge/Cplusxunlian
298b92ff0f14d5c9b015b1d56c4ad59ae9dc2e4b
dcf76c4dd6448c126806b4ce9ff31e9d984bda20
refs/heads/master
2023-04-05T19:20:21.752828
2021-05-04T09:00:38
2021-05-04T09:00:38
364,158,134
0
0
null
null
null
null
UTF-8
C++
false
false
706
cpp
L1-027.cpp
#include <bits/stdc++.h> using namespace std; int a[15] = { 0 }; int b[15] = { 0 }; int main() { string s; cin >> s; int n = s.size(); for (int i = 0; i < n; i++) { a[s[i] - '0']++; } printf("int[] arr = new int[]{"); for (int i = 9, j = 0; i >= 0; i--) { if (a[i] != 0) { if (j != 0) { printf(","); } printf("%d", i); b[i] = j; j++; } } printf("};\nint[] index = new int[]{"); for (int i = 0; i < n; i++) { if (i != 0) { printf(","); } printf("%d", b[s[i] - '0']); } printf("};\n"); system("pause"); return 0; }
915c2a31bdb12a78c185d06f983ad2fadf9675da
d9a50abfe2b0a1adf655048ddba8ef302d750d53
/DERAS-Server/src/ieee_sep/UomType.cpp
04ff586f04655b7cfcbbfbb05b9e7803a2bc9909
[ "BSD-2-Clause" ]
permissive
psu-powerlab/DERAS-Server
f7ed520ee6885a77ac5d3b2f672d8a6502004c97
5b41f35148aa1ff45c1f6b3a96f94ce443a72d0f
refs/heads/master
2022-11-29T15:01:50.874535
2020-06-18T20:06:10
2020-06-18T20:06:10
261,805,865
0
0
BSD-2-Clause
2020-07-06T18:53:10
2020-05-06T15:44:56
C++
UTF-8
C++
false
false
323
cpp
UomType.cpp
/////////////////////////////////////////////////////////// // UomType.cpp // Implementation of the Class UomType // Created on: 13-Apr-2020 2:51:46 PM // Original author: Shawn Hu /////////////////////////////////////////////////////////// #include "UomType.h" UomType::UomType(){ } UomType::~UomType(){ }
46521e3ad63a7e1ca947ad05056bf23db0e02d7a
206fb33ca0c73ecec28d57876f0ca7ff8e1471a8
/L06/nr06.cpp
a2dc91a60d6dd08a1f1e6a7aa080755d2ecee9a0
[]
no_license
kainoj/cpp-course
d46eb3d8bb64ca5ff8e85fa3ab125179eee1b29b
476a63836d403359b867c4b45b269d4505a19199
refs/heads/master
2021-01-12T07:40:37.184334
2017-03-11T10:07:19
2017-03-11T10:07:19
76,998,399
0
0
null
null
null
null
UTF-8
C++
false
false
2,152
cpp
nr06.cpp
#include <fstream> #include <iostream> #include <chrono> #include <random> #include "listtest.h" #include "vectortest.h" int main( int argc, char* argv [] ) { std::vector< std::string > vect; // Task 1 std::ifstream input("testfile.txt", std::ifstream::in); vect = vectortest::readfile(input); // std::cout << vect << "\n"; // Task 4 size_t nr=15000, s=10; std::cout << "> Task 4\n\n"; vect = vectortest::randomstrings(nr, s); auto t1 = std::chrono::high_resolution_clock::now( ); // O( n*n ) vectortest::sort_move( vect ); auto t2 = std::chrono::high_resolution_clock::now( ); std::chrono::duration< double > d = ( t2 - t1 ); std::cout << "Vector moving-assignment sort took:\t" << d. count( ) << " seconds\n"; t1 = std::chrono::high_resolution_clock::now( ); // O( n*n ) vectortest::sort_assign( vect ); t2 = std::chrono::high_resolution_clock::now( ); d = ( t2 - t1 ); std::cout << "Vector usual-assignment sort took:\t" << d. count( ) << " seconds\n"; t1 = std::chrono::high_resolution_clock::now( ); // O( n*log(n) ) vectortest::sort_std( vect ); t2 = std::chrono::high_resolution_clock::now( ); d = ( t2 - t1 ); std::cout << "Vector std sort took:\t\t\t" << d. count( ) << " seconds\n\n\n\n"; // Sorting lists std::list<std::string> l; l = listtest::vector2list(vect); t1 = std::chrono::high_resolution_clock::now( ); listtest::sort_move( l ); t2 = std::chrono::high_resolution_clock::now( ); d = ( t2 - t1 ); std::cout << "List moving assignment took:\t\t" << d. count( ) << " seconds\n"; t1 = std::chrono::high_resolution_clock::now( ); listtest::sort_assign( l ); t2 = std::chrono::high_resolution_clock::now( ); d = ( t2 - t1 ); std::cout << "List usual assignment took:\t\t" << d. count( ) << " seconds\n"; std::cout << "No std::sort list avalibe :( \n"; std::cout << "\n\n summary: \n\tIn general sorting that uses usual assignment is faster than using moving assignment.\n\tstd::sort is the fastest algorithm\n\tTurning on -O3 -flto almost halves the sorting time.\n\n"; return 0; }
7567eab942850719212ae97635957e62f646b827
af6ff95737c9d5d079ca96e6fc9d6d1b03bb678e
/logistic/LogisticRegression.h
cf3bb3abe44dcdbb6e297b5cae5927652007c63c
[]
no_license
zhanxw/mycode
5ea668e3f8a5ed1fb29f695a85b05bebe6d17eff
1e7f910f58401999f5d73c20a199ca01e5e566e5
refs/heads/master
2020-05-07T15:23:10.858538
2015-05-18T05:20:55
2015-05-18T05:20:55
1,295,310
1
0
null
null
null
null
UTF-8
C++
false
false
2,976
h
LogisticRegression.h
////////////////////////////////////////////////////////////////////// // Adopted by Xiaowei Zhan // // mach2dat/LogisticRegression.h // (c) 2008 Yun Li // // March 15, 2008 // #ifndef __LOGISTIC_REGRESSION_H__ #define __LOGISTIC_REGRESSION_H__ #include "MathMatrix.h" #include "MathCholesky.h" #include "StringHash.h" #include "StringArray.h" #include <cmath> class Pedigree; class LogisticRegression { public: LogisticRegression(); ~LogisticRegression(); bool FitLogisticModel(Matrix & X, Vector & y, int rnrounds); // return false if not converging bool FitLogisticModel(Matrix & X, Vector & succ, Vector& total, int nrrounds); double GetDeviance(Matrix & X, Vector & y); double GetDeviance(Matrix & X, Vector & succ, Vector& total); Vector & GetAsyPvalue(); Vector & GetCovEst(); Matrix & GetCovB(); void reset(Matrix& X); // get everything cleared Vector B; // coefficient vector Matrix covB; // coefficient covariance matrix private: Vector pValue; Vector p, V, W; Vector residuals; Vector deltaB; Matrix D; Matrix testSummary; Matrix Dinv; Cholesky chol; Matrix Dtwo; Matrix XtV; }; class LogisticRegressionScoreTest{ public: LogisticRegressionScoreTest():pvalue(0.0){}; bool FitLogisticModel(Matrix &X, Vector &y, int colToTest, int nRound) { Matrix Xnull; Vector xcol; this->splitMatrix(X, colToTest, Xnull, xcol); LogisticRegression lr; if (lr.FitLogisticModel(Xnull, y, nRound) == false){ return false; } Vector & betaHat = lr.GetCovEst(); // From MLE double U = 0.0; double I = 0.0; for (int i = 0; i < X.rows; i++){ double bnull = 0.0; for (int j = 0; j < X.cols; j++){ if (j == colToTest) continue; bnull += X[i][j] * betaHat[j]; } bnull = exp(bnull); U += xcol[i] * (bnull*(-1.0+y[i])+y[i]) / (1.0 + bnull); double tmp = xcol[i]/(1.0+bnull); I += bnull* tmp * tmp; printf("i=%d U=%.3f I=%.3f\n", i, U, I); } this->pvalue = U*U/I; } double getPvalue() const {return this->pvalue;}; private: void splitMatrix(Matrix& x, int col, Matrix& xnull, Vector& xcol){ if (x.cols < 2) { printf("input matrix has too few cols!\n"); } xnull.Dimension(x.rows, x.cols - 1); xcol.Dimension(x.rows); for (int i = 0; i < x.rows; i++){ for (int j = 0; j < x.cols; j++){ if (j < col){ xnull[i][j] = x[i][j]; }else if (j == col){ xcol[i] = x[i][j]; } else { xnull[i][j-1] = x[i][j]; } } } }; double pvalue; }; #endif
518fac48567ac888155cb5f5353f1a8bb45deaf1
b151e0042cb1fb48c5d2100f08e5b67dd9dde0a5
/Implementation/absPerm.cpp
2d4278831a1a167febcb87e1ec5eb14a4daebb74
[ "MIT" ]
permissive
nikaruno/Algorithms-Data-Structures
5e2bd95c84642a427fb5f35ef4dd26e60c3dc3fd
8abbde3fbe2951d710ea2bfe0cd5f6c68870a543
refs/heads/master
2021-08-22T14:25:36.430008
2021-07-21T10:34:02
2021-07-21T10:34:02
148,140,251
0
0
MIT
2018-09-10T11:05:41
2018-09-10T10:42:50
null
UTF-8
C++
false
false
540
cpp
absPerm.cpp
vector<int> absolutePermutation(int n, int k) { vector<int> v; if (k == 0){ for (int i = 0; i<n; i++){ v.push_back(i+1); } return v; } int m = 2*k; if ((n % 2 == 1) || (n/m)*m != n){ v.push_back(-1); return v; } int l = 0; while(n>0){ for (int i = k; i<m; i++){ v.push_back(l*m+i+1); } for (int i = 0; i<k; i++){ v.push_back(l*m+i+1); } l++; n -= m; } return v; }
b2da56bc152f4cfa6e16aedc1211ba539f0a4de7
c3aa4ca4a3fba3e118e32eb694e8944b55af50d0
/Server/COMP7005_A1_Server/serverthread.cpp
f93b15ca0fe5eb8aadfeee4a442edbb59af3a4bb
[]
no_license
filipgutica/COMP7005_A1
85144cb2208718e81eeb57efcd8dd1e4b25b6743
6f4b4466cf5534f77234e22904b0f9d04d3a1bcf
refs/heads/master
2022-07-24T11:46:13.778671
2015-10-06T23:57:47
2015-10-06T23:57:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,327
cpp
serverthread.cpp
#include "serverthread.h" ServerThread::ServerThread(int socketDescriptor, QStringList fileList, QObject *parent) : QThread(parent), _socketDescriptor(socketDescriptor), _fileList(fileList) { } void ServerThread::run() { _tcpSocket = new QTcpSocket(); if (!_tcpSocket->setSocketDescriptor(_socketDescriptor)) { return; } connect(_tcpSocket, SIGNAL(readyRead()), this, SLOT(readSocket()), Qt::DirectConnection); qDebug() << "Socket Descriptor: " << _socketDescriptor; QString s = "Files: "; QByteArray tcpbytes; for (int i = 0; i < (_fileList.length()); i++) { qDebug() << _fileList.at(i); s.append(_fileList.at(i)); tcpbytes.append(s); } qDebug() << "tcp bytes: " << tcpbytes; _tcpSocket->write(tcpbytes); /* QString s = QString("Last: %1").arg(_fileList.back()); QByteArray tcpbytes; tcpbytes.append(s); qDebug() << "tcp bytes: " << tcpbytes; if( _tcpSocket->waitForConnected() ) _tcpSocket->write(tcpbytes);*/ exec(); } void ServerThread::readSocket() { QByteArray data = _tcpSocket->readAll(); QRegExp rxIndex("Index: "); QRegExp rxFileName("FileName: "); QRegExp rxFileSize("Size: "); qDebug() << "Server received: " << data; if (rxIndex.indexIn(data.data()) != -1) { char *tok = strtok(data.data(), ":"); tok = strtok(NULL, ":"); int index = atoi(tok); QFile file(_fileList.at(index)); if (!file.open(QFile::ReadWrite)) { this->exit(); return; } QString s = QString("Size: %1").arg(file.size()); QByteArray tcpbytes; tcpbytes.append(s); _tcpSocket->write(tcpbytes); _downloadSocket = new QTcpSocket(); connect(_downloadSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(ProcessSocketError(QAbstractSocket::SocketError)), Qt::DirectConnection); _downloadSocket->connectToHost("localhost", DOWNLOAD_PORT); while(!file.atEnd()) { _downloadSocket->write(file.readAll()); } _downloadSocket->close(); _downloadSocket->deleteLater(); } } void ServerThread::ProcessSocketError(QAbstractSocket::SocketError err) { qDebug() << err; }
bd50471d72f5df3ef5918e6723b3d771a6eeba6a
a9b50352113e7fda9fa7b8af561e683b71cd8263
/Code/Simulation.h
62d3ff31073f9d339470e035b3bae7c589a372e6
[]
no_license
alexandreb09/ZZ2_Simulation_TP2_partie_III
2a93f1d21ad5ebf33bf75ba202e8fc37eccaf98e
fc4cf78da77a0692eb9a489c6fee95832a751168
refs/heads/master
2020-04-10T14:58:06.021420
2018-12-17T00:55:33
2018-12-17T00:55:33
161,092,982
0
0
null
null
null
null
ISO-8859-1
C++
false
false
1,469
h
Simulation.h
#pragma once #include <ostream> #include <string> #include <algorithm> #include <cstdlib> // aléatoire #include "Machine.h" #include "Assemblage.h" #include "Entree.h" #include "File.h" #include "Affichage.h" //============================================== void gerer_Entrer_1(File& file_m1, Machine &serveur1, Entree & entree, int & date_courante, std::vector<pair_client_t> & sortie); void gerer_Entrer_2(File & file_m2, Machine &serveur2, Entree & entree_2, int & date_courante, std::vector<pair_client_t> & sortie); void gerer_Machine_1(File & file_m1, File &file_m2, Machine &serveur1, Machine &serveur2, Assembleur &assemblage, int & date_courante); void gerer_Machine_2(File & file_m1, File &file_m2, Machine &serveur1, Machine &serveur2, Assembleur &assemblage, int & date_courante); void gerer_Assemblage(File &file_m1, File &file_m2, Machine &serveur1, Machine &serveur2, Assembleur &assemblage, std::vector<pair_client_t> & sortie, int & date_courante); void simuler(int duree_sim, int duree_entre_2_cl_src1, int duree_entre_2_cl_src2, int duree_traitement_cl_m1, int duree_traitement_cl_m2, int duree_assemblage, System::Windows::Forms::RichTextBox^ richTextBox1, System::Windows::Forms::DataVisualization::Charting::Chart^ graphique); int getProchainEven(Assembleur assemblage, Machine serveur1, Machine serveur2, Entree entree_1, Entree entree_2); bool sortByID(Client &lhs, Client &rhs); bool sortByDateEntree(Client &lhs, Client &rhs);
94f7c32dd0e641cae991d80d22e5c5387ef342d2
7a81cff35339ab89a230f98bdfd3e299d38bfd33
/triangulos.cpp
6e323c3630aadcce7ac502caebc9cad14861be72
[]
no_license
danielcatto/almoritimos
d8e6bb4b69c0e37a77b0b90a0c10601dd983af2c
8738515e1c347b2ae49e8dfdd412b2929c62647d
refs/heads/master
2022-10-05T20:18:48.956866
2020-06-06T19:02:04
2020-06-06T19:02:04
265,968,796
0
0
null
null
null
null
UTF-8
C++
false
false
578
cpp
triangulos.cpp
#include <iostream> using namespace std; int main() { int ladoA, ladoB, ladoC; cout <<"Informe o 1o. Lado: "; cin >>ladoA; cout <<"Informe o 2o. Lado: "; cin >>ladoB; cout <<"Informe o 3o. Lado: "; cin >>ladoC; if (ladoA == ladoB && ladoB == ladoC) { cout << "Triangulo Equilátero"; } else if (ladoA == ladoB || ladoB == ladoC || ladoC == ladoA) { cout << "Triangulo Escaleno"; } else if (ladoA != ladoB && ladoB != ladoC && ladoC != ladoA) { cout << "Triangulo Isosceles"; } }
d6a126c55ba096ebb858cc0048c72fff65ef22fe
93343c49771b6e6f2952d03df7e62e6a4ea063bb
/HDOJ/3352_autoAC.cpp
9e249d1071e7a3afdaabee2713b1c9416ec22e90
[]
no_license
Kiritow/OJ-Problems-Source
5aab2c57ab5df01a520073462f5de48ad7cb5b22
1be36799dda7d0e60bd00448f3906b69e7c79b26
refs/heads/master
2022-10-21T08:55:45.581935
2022-09-24T06:13:47
2022-09-24T06:13:47
55,874,477
36
9
null
2018-07-07T00:03:15
2016-04-10T01:06:42
C++
UTF-8
C++
false
false
334
cpp
3352_autoAC.cpp
#include<stdio.h> long long a,b; long long up(long long a,long long b) { long long t; if(a==0) return b; while(b!=0) { t=b;b=a%b;a=t; } return a; } int main() { while(scanf("%lld%lld",&a,&b)!=EOF) { if(a==0&&b==0) break; printf("%lld\n",a*b/up(a,b)/up(a,b)); } return 0; }
c1f50e42dd7d8aabac6bb4461532b17d38bc51a3
05a65c385dc5ba32bff4e1af5f9d523a4e831449
/Source/USemLog/Classes/CV/SLCVQSceneStatic.h
3df45146eefc748b798b1e04c79b58d9168fd63b
[ "BSD-3-Clause" ]
permissive
robcog-iai/USemLog
5571212e9c7fba04a441a89f269f02195a3b3643
d22c3b8876bec66a667023078f370a81f7ce9d2b
refs/heads/master
2023-09-01T08:53:09.932916
2022-11-03T11:20:35
2022-11-03T11:20:35
69,003,081
9
22
BSD-3-Clause
2023-03-29T14:44:52
2016-09-23T07:59:30
C++
UTF-8
C++
false
false
647
h
SLCVQSceneStatic.h
// Copyright 2017-present, Institute for Artificial Intelligence - University of Bremen // Author: Andrei Haidu (http://haidu.eu) #pragma once #include "CoreMinimal.h" #include "CV/SLCVQScene.h" #include "SLCVQSceneStatic.generated.h" // Forward declaration class ASLIndividualManager; class ASLMongoQueryManager; /** * Uses the intial map poses for setting up scenes for scanning */ UCLASS() class USLCVQSceneStatic : public USLCVQScene { GENERATED_BODY() protected: // Virtual implementation for the scene initialization virtual bool InitSceneImpl(ASLIndividualManager* IndividualManager, ASLMongoQueryManager* MQManager) override; };
e217adadd5df1ed27e0d2c3b6c87464bc09aa703
52e426e2bb868e20681c40f1758e60a0e37acdbd
/code_samples/pixel_collision.h
60575eff6c966f255418a2d391d5f8cd874e5e2d
[]
no_license
leegrey/pure-pixels
9be9d6fa3ec5794365f6c9af4833d0c07cfb1f9c
658b4fb69e58026bbb183c227d98dee499a164e5
refs/heads/master
2020-04-24T01:34:13.905834
2019-11-08T23:17:15
2019-11-08T23:17:15
171,603,034
4
0
null
null
null
null
UTF-8
C++
false
false
5,822
h
pixel_collision.h
#pragma once namespace lg { bool moveAndCollideOnPixels(PixelWorld& world, PixelEntity& entity, bool climbSlopes = false) { bool wasGrounded = entity.grounded; Vector2 originalVelocity = entity.velocity; Vector2 originalPos = entity.position; // calculate the rectangle of the entity in the world // (snap to pixel / integer representation) SDL_Rect worldRect = entity.rect; worldRect.x += floor(entity.position.x); worldRect.y += floor(entity.position.y); // make a copy for projecting along the velocity vector SDL_Rect projectedRect = worldRect; int signVelocityX = sign(entity.velocity.x); int signVelocityY = sign(entity.velocity.y); // perform a continuous collision along entire length of x // fall back to the start of the pixel, (away from the direction of movement) // Calculate steps to test. This takes into account floating point velocity, and // determines if crossing a boundary or not. // (eg if moving from 10.2 to 10.3, no boundary is crossed so no projection is needed) int xSteps = abs( floorToInt(entity.position.x + entity.velocity.x) - floorToInt(entity.position.x) ); // PROOF: // 10.35 => 10.45 // floorToInt( 10.35 + 0.1f) // 10 // - floorToInt(10.35) // 10 // 10.95 => 11.05 // floorToInt( 10.95 + 0.1f) // 11 // - floorToInt(10.95) // 10 // 11 - 10 = 1 // steps: 1 bool hitX = false; bool hitY = false; // Start with a rect of the current position // Move it one pixel at a time along x, stop if it hits something // then repeat for y. int climbSlopesCount = 0; // keep track of last good x int goodX = projectedRect.x; for (int ix = 0; ix < xSteps; ix++) { // advance one pixel at a time in the dxirection of velocity.x // (add sign, so there is an offset even when ix is zero ) projectedRect.x += signVelocityX; // (test collision of projected rect) if (isColliding(world, projectedRect)) { // Only actually calculate it if climbSlopes is true // (reset flag) bool isCollidingAbove = false; // only climb slopes if the flag is true if (climbSlopes) { // test with projected rect, and a one pixel vertical offset isCollidingAbove = isCollidingAtOffset(world, projectedRect, 0, -1); } // if climb flag is true, and there is no collision one pixel up... if (climbSlopes && !isCollidingAbove) { // if the area is clear above, just move move the rec up by one pixel projectedRect.y -= 1; // for debug only climbSlopesCount++; // do nothing to X at all, but mark hitY as true // we need to do this so y value of projected rect is applied at the ends hitY = true; } else { // cancel x velocity because we hit something entity.velocity.x = 0; // reset x to the last good x projectedRect.x = goodX; hitX = true; break; } } goodX = projectedRect.x; } // reset grounded flag entity.grounded = false; // figure out how many steps to move int ySteps = abs(floorToInt(entity.position.y + entity.velocity.y) - floorToInt(entity.position.y)); // remember the last good position on y int goodY = projectedRect.y; for(int iy = 0; iy < ySteps; iy++) { projectedRect.y += signVelocityY; // if the next step is a collision, break if (isColliding(world, projectedRect)) { // if we are moving downward on Y then we hit the ground // NOTE: this is redundant if we do the additional grounded test below if (signVelocityY > 0) entity.grounded = true; // cancel y velocity because we hit something entity.velocity.y = 0; // reset y to the last good position projectedRect.y = goodY; hitY = true; break; } } // apply the translation to our position if (hitX) { // NOTE: pull pos directly from projected Rect integers, ie `=` not `+=` entity.position.x = projectedRect.x - entity.rect.x; } else { // if we didn't hit, just apply floating point velocity to preserve // smooth movement and acceleration... /// (ie, avoid snapping to a pixel unless we need to!) entity.position.x += entity.velocity.x; } if (hitY) { // NOTE: pull pos directly from projected Rect integers, ie `=` not `+=` entity.position.y = projectedRect.y - entity.rect.y; } else { entity.position.y += entity.velocity.y; } // check one pixel down for ground entity.grounded = isCollidingAtOffset(world, projectedRect, 0, 1); // return a bool to indicate if we hit anything return hitX || hitY; } }
fea94c0d9d3e3fe7186504af49d7dbf04326f720
831eafe4bed683213c5e4e39dafa71bd3902a70f
/coderack.cpp
4ac67a0ca19b9862421105bcc06896ceaa82d186
[]
no_license
jrising/combai
8b9efcb2e429f7b176a336d7e05a8f74ef676635
0a8f7dc3ae21b1ea121a90b3f4eca5fd4fd5ff00
refs/heads/master
2021-01-20T15:30:11.892529
2017-05-09T17:36:17
2017-05-09T17:36:17
90,773,898
0
0
null
null
null
null
UTF-8
C++
false
false
11,696
cpp
coderack.cpp
#include "coderack.h" #include <stdlib.h> Coderack::Coderack(unsigned long maxsz) : AIObject(CCoderack), maxsize(maxsz) { root = new CoderackRoot(); head = root; size = 0; TrackLink::MemStore(trackid, &root, FALSE); TrackLink::MemStore(trackid, &head, FALSE); } Coderack::Coderack(FILE *fp) : AIObject(fp) { fread(&root, sizeof(CoderackRoot *), 1, fp); fread(&head, sizeof(CoderackRoot *), 1, fp); fread(&size, sizeof(unsigned long), 1, fp); fread(&maxsize, sizeof(unsigned long), 1, fp); TrackLink::MemStore(trackid, &root, FALSE); TrackLink::MemStore(trackid, &head, FALSE); } Coderack::~Coderack() { delete root; } void Coderack::AddCodelet(Codelet *cdlet) { urgetype urge = cdlet->getUrgency(); verbize(-3, "debug", "Adding Codelet %ld: %s\n", cdlet, cdlet->Class()); if (urge <= 0.) { delete cdlet; return; } if (size >= maxsize) RemoveCodelet(); head = head->AddBranch(new CoderackLeaf(cdlet, urge)); size++; } void Coderack::RemoveCodelet() { CoderackLeaf *todel = root->SelectRandomLeaf(frand()); if (todel->getCodelet()->getFlags() & PRIV_FLAG) RemoveCodelet(); // don't remove this one head = todel->Remove()->getRoot(); /* In case select's root is head */ delete todel; size--; } void Coderack::ExecuteCodelet() { verbize(-8, "debug", "Beginning ExecuteCodelet\n"); CoderackLeaf *torun = root->SelectWeightLeaf(frand() * root->getSummed()); if (!torun) { recalcTotalUrgency(); return; } verbize(-3, "", "Executing codelet %ld: %s\n", torun->getCodelet(), torun->getCodelet()->Class()); torun->getCodelet()->Execute(); head = torun->Remove()->getRoot(); /* In case select's root is head */ delete torun; size--; } urgesumtype Coderack::getTotalUrgency() { return root->getSummed(); } void Coderack::recalcTotalUrgency() { urgesumtype old = root->getSummed(); root->recalcSummed(); } void Coderack::print() { printf("Root is %ld, Head is %ld; Size is %ld of %ld.\n", root, head, size, maxsize); root->print(); } unsigned long Coderack::getSize() { return size; } unsigned long Coderack::getMaxSize() { return maxsize; } int Coderack::AssertValid() { AIObject *obj; /* Check all the way through the tree to make sure everything is good */ /* Check that root and head are valid */ obj = dynamic_cast<AIObject*>(root); aiassert(obj && obj->type == CCoderackRoot, "checking validity of root"); obj = dynamic_cast<AIObject*>(head); aiassert(obj && (obj->type == CCoderackRoot || obj->type == CCoderackBranch), "checking validity of root\n"); /* Now ask root to validate all of its children, on down */ aiassert(root->AssertValidChildren(head) == -1, "finding head under root"); return (type == CCoderack); } int Coderack::WriteObject(FILE *fp) { size_t result = AIObject::WriteObject(fp); result = fwrite(&root, sizeof(CoderackRoot *), 1, fp) + result; result = fwrite(&head, sizeof(CoderackRoot *), 1, fp) + result; result = fwrite(&size, sizeof(unsigned long), 1, fp) + result; return fwrite(&maxsize, sizeof(unsigned long), 1, fp) + result; } /**********************/ CoderackNode::CoderackNode() : AIObject(CCoderackNode) { TrackLink::MemStore(trackid, &root, FALSE); } CoderackNode::CoderackNode(FILE *fp) : AIObject(fp) { fread(&summed, sizeof(urgesumtype), 1, fp); fread(&root, sizeof(CoderackNode *), 1, fp); TrackLink::MemStore(trackid, &root, FALSE); } urgesumtype CoderackNode::getSummed() { return summed; } void CoderackNode::updateSummed(urgetype delta) { summed += delta; if (root) root->updateSummed(delta); } void CoderackNode::setRoot(CoderackNode *rt) { root = rt; } CoderackNode *CoderackNode::getRoot() { return root; } int CoderackNode::WriteObject(FILE *fp) { size_t result = AIObject::WriteObject(fp); result = fwrite(&summed, sizeof(urgesumtype), 1, fp) + result; return fwrite(&root, sizeof(CoderackNode *), 1, fp) + result; } /******************************/ CoderackBranch::CoderackBranch(CoderackNode *rt) { type = CCoderackBranch; root = rt; summed = 0; childcnt = 0; } CoderackBranch::CoderackBranch(FILE *fp) : CoderackNode(fp) { fread(&childcnt, sizeof(unsigned), 1, fp); fread(child, sizeof(CoderackNode *), childcnt, fp); } CoderackBranch::~CoderackBranch() { for (int i = 0; i < childcnt; i++) delete child[i]; } /* DOESN'T MATTER where it goes, just as long as all branches are equal */ /* Sets the branch's root to the branch it is added to */ /* Returns pointer to node that branch actually added to */ CoderackNode *CoderackBranch::AddBranch(CoderackNode *branch) { if (childcnt == 3) { CoderackBranch *spawn = new CoderackBranch((CoderackNode *) NULL); spawn->AddBranch(child[2]); spawn->AddBranch(branch); root->AddBranch(spawn); updateSummed(-child[2]->getSummed()); childcnt = 2; TrackLink::MemRemove(trackid, &child[2]); return spawn; } else { child[childcnt++] = branch; TrackLink::MemStore(trackid, &child[childcnt - 1], FALSE); branch->setRoot(this); updateSummed(branch->getSummed()); return this; } } /* Returns any child that is left */ CoderackNode *CoderackBranch::LeafRemoved(CoderackNode *branch) { int i, j; verbize(-9, "debug", "LeafRemoved on Branch %ld\n", this); if (childcnt == 3) { /* Just remove from list */ for (i = 0; i < 3 && child[i] != branch; i++); for (j = i + 1; j < 3; j++) child[j - 1] = child[j]; childcnt--; TrackLink::MemRemove(trackid, &child[childcnt]); updateSummed(-branch->getSummed()); return child[0]; } else { /* Recombine */ CoderackNode *merger = root->LeafRemoved(this); CoderackNode *left = (child[0] == branch) ? child[1] : child[0]; merger->AddBranch(left); childcnt = 0; delete this; return left; } } CoderackLeaf *CoderackBranch::SelectRandomLeaf(float select) { int seld = (int) (select * (float) childcnt); float news = (select * (float) childcnt) - (float) seld; return child[(int) (select * ((float) childcnt))]->SelectRandomLeaf(news); } CoderackLeaf *CoderackBranch::SelectWeightLeaf(urgesumtype select) { int i; verbize(-8, "debug", "In SWL for branch %ld: %f\n", this, select); for (i = 0; i < childcnt && select > child[i]->getSummed(); i++) select -= child[i]->getSummed(); if (i == childcnt) return NULL; verbize(-9, "debug", "Child Found: %f: %d, %ld\n", select, i, child[i]); return child[i]->SelectWeightLeaf(select); } void CoderackBranch::print() { printf("%ld (%f): %ld; ", this, summed, root); for (int i = 0; i < childcnt; i++) printf("%ld ", child[i]); printf("\n"); for (int i = 0; i < childcnt; i++) child[i]->print(); } void CoderackBranch::recalcSummed() { urgesumtype newsum = 0.; for (int i = 0; i < childcnt; i++) { child[i]->recalcSummed(); newsum += child[i]->getSummed(); } summed = newsum; } int CoderackBranch::AssertValidChildren(CoderackNode *head) { AIObject *obj; int foundhead = 0; aiassert(childcnt == 3 || childcnt == 2, "checking size of branch"); for (int i = 0; i < childcnt; i++) { obj = dynamic_cast<AIObject*>(child[i]); aiassert(obj && (obj->type == CCoderackLeaf || obj->type == CCoderackBranch), "checking nature of children"); foundhead |= child[i]->AssertValidChildren(head); } if (this == head) return -1; else return foundhead; } int CoderackBranch::WriteObject(FILE *fp) { size_t result = CoderackNode::WriteObject(fp); result = fwrite(&childcnt, sizeof(unsigned), 1, fp) + result; return fwrite(child, sizeof(CoderackNode *), childcnt, fp) + result; } /**********************/ CoderackRoot::CoderackRoot() { type = CCoderackRoot; summed = 0; child = this; root = NULL; TrackLink::MemStore(trackid, &child, FALSE); } CoderackRoot::CoderackRoot(FILE *fp) : CoderackNode(fp) { fread(&child, sizeof(CoderackNode *), 1, fp); TrackLink::MemStore(trackid, &child, FALSE); } CoderackRoot::~CoderackRoot() { if (child != this) delete child; } CoderackNode *CoderackRoot::AddBranch(CoderackNode *branch) { if (child != this) { CoderackBranch *spawn = new CoderackBranch(this); summed = 0; spawn->AddBranch(child); spawn->AddBranch(branch); child = spawn; return spawn; } else { child = branch; branch->setRoot(this); summed = branch->getSummed(); } } CoderackNode *CoderackRoot::LeafRemoved(CoderackNode *branch) { verbize(-9, "debug", "LeafRemoved on Root %ld\n", this); if (branch == child) child = this; summed = 0; return child; } CoderackLeaf *CoderackRoot::SelectRandomLeaf(float select) { if (child == this) return NULL; return child->SelectRandomLeaf(select); } CoderackLeaf *CoderackRoot::SelectWeightLeaf(urgesumtype select) { verbize(-8, "debug", "In SWL for Root %ld: %f\n", this, select); if (child == this) return NULL; return child->SelectWeightLeaf(select); } void CoderackRoot::print() { printf("%ld (%f): %ld\n", this, summed, child); child->print(); } void CoderackRoot::recalcSummed() { if (child) { child->recalcSummed(); summed = child->getSummed(); } else summed = 0.; } int CoderackRoot::AssertValidChildren(CoderackNode *head) { AIObject *obj; if (child) { obj = dynamic_cast<AIObject*>(child); aiassert(obj && (obj->type == CCoderackLeaf || obj->type == CCoderackBranch), "checking nature of children"); return child->AssertValidChildren(head); } else { if (this == head) return -1; else return 1; } } int CoderackRoot::WriteObject(FILE *fp) { size_t result = CoderackNode::WriteObject(fp); return fwrite(&child, sizeof(CoderackNode *), 1, fp) + result; } /*********************/ CoderackLeaf::CoderackLeaf(Codelet *cdlet, urgetype urge) { type = CCoderackLeaf; verbize(-5, "debug", "Creating new CoderackLeaf %ld with %ld\n", this, cdlet); if ((long) cdlet == (long) this) { verbize(1, "general", "Codelet pointer equals Coderack leaf pointer!\n"); exit(UNSPEC_ERROR); } summed = urge; codelet = cdlet; TrackLink::MemStore(trackid, &codelet, FALSE); } CoderackLeaf::CoderackLeaf(FILE *fp) : CoderackNode(fp) { fread(&codelet, sizeof(Codelet *), 1, fp); TrackLink::MemStore(trackid, &codelet, FALSE); } CoderackLeaf::~CoderackLeaf() { delete codelet; } CoderackNode *CoderackLeaf::AddBranch(CoderackNode *branch) { /* ERROR! */ fprintf(stderr, "ERROR: AddBranch on Leaf\n"); return NULL; } CoderackNode *CoderackLeaf::LeafRemoved(CoderackNode *branch) { /* ERROR! */ fprintf(stderr, "ERROR: LeafRemoved on Leaf\n"); return NULL; } CoderackLeaf *CoderackLeaf::SelectRandomLeaf(float select) { return this; } CoderackLeaf *CoderackLeaf::SelectWeightLeaf(urgesumtype select) { verbize(-8, "debug", "In SWL for Leaf %ld: %f\n", this, select); return this; } void CoderackLeaf::print() { printf("%ld (%f): Leaf\n", this, summed); } void CoderackLeaf::recalcSummed() { // do nothing } CoderackNode *CoderackLeaf::Remove() { CoderackNode *left = root->LeafRemoved(this); root = NULL; return left; } Codelet *CoderackLeaf::getCodelet() { return codelet; } int CoderackLeaf::AssertValidChildren(CoderackNode *head) { AIObject *obj; obj = dynamic_cast<AIObject*>(codelet); aiassert(obj && codelet->AssertValid(), "checking validity of codelet"); if (this == head) return -1; else return 1; } int CoderackLeaf::WriteObject(FILE *fp) { size_t result = CoderackNode::WriteObject(fp); return fwrite(&codelet, sizeof(Codelet *), 1, fp) + result; }
12639be2f98c2887ec1be3d11635a491a58cfb31
f9285898735714b3e301c310f7b6d2c0a2c22798
/tests/dcl.struct.bind.Test.cpp
2dabe1d43825235573780e91d2d9de30cfc23c58
[ "MIT" ]
permissive
andreasfertig/cppinsights
dcb6c53e0c79770df383067e70b852fde7fb24f5
50b962d6bb6d96c567a5b0870c3c828405b40d14
refs/heads/main
2023-08-27T06:36:33.307787
2023-07-31T05:21:49
2023-07-31T05:21:49
131,510,015
2,465
156
MIT
2023-09-13T11:31:36
2018-04-29T16:21:08
C++
UTF-8
C++
false
false
3,041
cpp
dcl.struct.bind.Test.cpp
// p1 // cv := denote the cv-qualifiers in the decl-specifier-seq // S := consist of the storage-class-specifiers of the decl-specifier-seq (if any) // // 1) a variable with a unique name e is introduced. // If the assignment-expression in the initializer has array type A and no ref-qualifier is present, e is defined by: // // attribute-specifier-seq_{opt} S cv A e ; // // otherwise e is defined as-if by: // // attribute-specifier-seq_{opt} decl-specifier-seq ref-qualifier_{opt} e initializer ; // // The type of the id-expression e is called E. // // Note: E is never a reference type // // // -- tuple -- // Let i be an index of type std::size_t corresponding to vi // either: // e.get<i>() // get<i>(e) // // In either case, // - e is an lvalue if the type of the entity e is an lvalue reference and // - an xvalue otherwise. // // -> auto& [a ,b ] -> e := lvalue // -> auto [a ,b ] -> e := xvalue // // T_i := std::tuple_element<i, E>::type // U_i := either // - T_i&: if the initializer is an lvalue, // - T_i&&: an rvalue reference otherwise, // // variables are introduced with unique names r_i as follows: // // S U_i r_i = initializer ; // // Each vi is the name of an lvalue of type Ti that refers to the object bound to ri; the referenced type is Ti. // // The lvalue is a bit-field if that member is a bit-field. [Example: // struct S { int x1 : 2; volatile double y1; }; // S f(); // const auto [ x, y ] = f(); // The type of the id-expression x is “const int”, the type of the id-expression y is “const volatile double”. —end example] // For each identifier, a variable whose type is "reference to std::tuple_element<i, E>::type" is introduced: lvalue reference if its corresponding initializer is an lvalue, rvalue reference otherwise. The initializer for the i-th variable is // - e.get<i>(), if lookup for the identifier get in the scope of E by class member access lookup finds at least one declaration that is a function template whose first template parameter is a non-type parameter // - Otherwise, get<i>(e), where get is looked up by argument-dependent lookup only, ignoring non-ADL lookup. // // The initializer for the new variable is e.get<i> or get<i>(e). // Here the overload of get that is called is a rvalue in case we use auto and an lvalue in case we use auto& #include <cassert> #include <tuple> // https://en.cppreference.com/w/cpp/language/structured_binding float x{}; char y{}; int z{}; std::tuple<float&,char&&,int> tpl(x,std::move(y),z); //auto tpl = std::tuple{x,std::move(y),z}; auto& [a,b,c] = tpl; // a names a structured binding that refers to x; decltype(a) is float& // b names a structured binding that refers to y; decltype(b) is char&& // c names a structured binding that refers to the 3rd element of tpl; decltype(c) is int int main() { a = 4.5; c = 5; // assert(4.5 == x); // assert(0 == z); // std::cout << a << '\n'; // std::cout << z << '\n'; }
cd80ce3404cedbc5aec17fca8921d3ea8a021ff7
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/ash/assistant/model/assistant_response_observer.h
e439a4b652fadaa0f6712ffa13cf84aa420bcdef
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
C++
false
false
1,220
h
assistant_response_observer.h
// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ASH_ASSISTANT_MODEL_ASSISTANT_RESPONSE_OBSERVER_H_ #define ASH_ASSISTANT_MODEL_ASSISTANT_RESPONSE_OBSERVER_H_ #include <vector> #include "base/component_export.h" #include "base/observer_list_types.h" #include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" namespace ash { class AssistantUiElement; // A checked observer which receives Assistant response events. class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantResponseObserver : public base::CheckedObserver { public: using AssistantSuggestion = assistant::AssistantSuggestion; // Invoked when the specified |ui_element| is added to the response. virtual void OnUiElementAdded(const AssistantUiElement* ui_element) {} // Invoked when the specified |suggestions| are added to the response. virtual void OnSuggestionsAdded( const std::vector<AssistantSuggestion>& suggestions) {} protected: AssistantResponseObserver() = default; ~AssistantResponseObserver() override = default; }; } // namespace ash #endif // ASH_ASSISTANT_MODEL_ASSISTANT_RESPONSE_OBSERVER_H_
f8568c19d3a10563b3907d7771b5c29735735ea0
46951a9ec2db9c8b46f5698bc4d75e27e576429d
/kernel/src/acpi.cpp
702e37454d556dac4315e06f2e639ba6af40417c
[]
no_license
SkiddyToast/ToastOS
49d004eda370c9d9952b07d8607147c443983807
3851dd4d91dad1298c98a846df89da45060af2e4
refs/heads/main
2023-03-31T15:34:07.736079
2021-04-07T00:21:56
2021-04-07T00:21:56
337,888,356
1
0
null
null
null
null
UTF-8
C++
false
false
550
cpp
acpi.cpp
#include "acpi.h" namespace ACPI { void* FindTable(XSDT* xsdt, char* signature) { int xsdtEntries = (xsdt->Header.Length - sizeof(xsdt->Header)) / 8; for(int i = 0; i < xsdtEntries; i++) { ACPI::SDTHeader* h = (ACPI::SDTHeader *)xsdt->Entries[i]; for (int i = 0; i < 4; i++){ if (h->Signature[i] != signature[i]) { break; } if (i == 3) return (ACPI::SDTHeader *)h; } } return 0; } }
6a3dd55f47ed0827206e41f76456a9b54289870f
de42db6b7ca9da722804b9a754158d477a4550d6
/src/alpFuncs.cxx
6d3c1ed17bf2a6568d54d65209b15c37f25a268a
[]
no_license
hershen/commonRootFunctions
247a95e74d9491e23d56b28adc67c29443bbfb33
28d3b74e02b4d526ecfbe728a80aa86968613c3e
refs/heads/master
2022-03-09T07:46:47.403425
2019-11-26T18:33:27
2019-11-26T18:33:27
104,494,016
0
0
null
null
null
null
UTF-8
C++
false
false
1,303
cxx
alpFuncs.cxx
#include <limits> #include <boost/lexical_cast.hpp> #include "TVector3.h" namespace myFuncs { std::string getAlpMassString(const std::string& text) { const std::string tmp = text.substr(4); return tmp.substr(0, tmp.find("_")); } double getAlpMassDouble(const std::string& text) { return boost::lexical_cast<double>(getAlpMassString(text)); } bool inEMC(const double x, const double y, const double z) { const TVector3 vtx(x, y, z); const double r = vtx.Perp(); // Barrel if (vtx.z() < 180 and vtx.z() > -230 and r > 92) { return true; } // line equation for face of forward endcap (in z-r plane) r=-2.39z + 522.2 //Might really be r = -2.659z + 5.707 (all in meters) const double rEndcapFace = -2.39 * vtx.z() + 522.2; return r > rEndcapFace; } double getDistanceToEmcFace_m(const double theta_rad) { if(theta_rad < 0.27576202181510407315 or theta_rad > 2.47487687932795934008) { //[15.8, 141.8] return std::numeric_limits<double>::infinity(); } if(theta_rad < 0.46774823953448032662) { //theta = 26.8 deg //Front face of endcap in z-r plane: r = -2.0337z + 4.5827 (all in meters). const double z = 4.5827/(std::tan(theta_rad)+2.0337); return z/std::cos(theta_rad); } //Barrel return 0.92/std::sin(theta_rad); } } // namespace myFuncs
37398c1606d94f78b5446be9c20cfdc94547cd51
680894c4dc58dd2c4f32229c48e1bf0f025a93f9
/hub/socket.cpp
d8d5b1b02a8a439d7bb0a3babcb8c6a9e0b23d13
[]
no_license
Jaffe-/GPSWallSocketHW
dbe2413c9b18c35ca63cf67fd3414781975269e2
ed70895dfe849ac3a19cc9c094a5072c9d6457bf
refs/heads/master
2021-03-27T15:34:41.889385
2017-03-29T12:23:49
2017-03-29T12:23:49
80,611,133
1
0
null
null
null
null
UTF-8
C++
false
false
1,631
cpp
socket.cpp
#include <unistd.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> #include <string> #include <iostream> #include <vector> #include <sstream> #include "json.hpp" #include "socket.h" #include "ioexception.h" #define LOG_MODULE "Socket" #include "log.h" Socket::Socket(const std::string& filename) { if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { throw IOException("Failed to create socket", errno); } struct sockaddr_un remote; remote.sun_family = AF_UNIX; strcpy(remote.sun_path, filename.c_str()); int len = strlen(remote.sun_path) + sizeof(remote.sun_family); if (connect(fd, (struct sockaddr *)&remote, len) == -1) { throw IOException("Failed to connect to node app", errno); } LOG("Connected to node app"); } Socket::~Socket() { LOG("Closing socket"); close(fd); } std::vector<json> Socket::receive() { char buf[4096] {}; int read_size; if ((read_size = read(fd, buf, sizeof(buf))) == -1) { throw IOException("Failed to read from node socket", errno); } buf[read_size] = '\0'; if (read_size > 0) { LOG_DETAILED("Received: " << buf); } std::vector<json> json_packets; std::stringstream ss(buf); std::string line; while (std::getline(ss, line)) { json_packets.push_back(json::parse(line)); } return json_packets; } void Socket::send(const json& data) { std::string msg = data.dump() + '\n'; if (write(fd, msg.c_str(), msg.length()) == -1) { throw IOException("Failed to write to node socket", errno); } LOG_DETAILED("Sent: " << data); }
7bdc80fd1e8dce1ff2e7cc277eab0655bee7905b
ab95572e01fce409bc413d8d0f5320dd61b62c85
/software/utilities/opencv-utils/imshow_utils.hpp
88c0de735d135e22e5dcc549bbe6e3f9f0128eb2
[]
no_license
spillai/articulation_learning
8615413ab8c70c367bd3d1e2dc5675db2f59e068
4bae0b55813fb9e3683cee363268c51b9b195002
refs/heads/master
2021-05-19T22:53:35.725923
2015-10-17T21:42:21
2015-10-17T21:42:21
38,456,267
1
0
null
null
null
null
UTF-8
C++
false
false
2,836
hpp
imshow_utils.hpp
#ifndef IMSHOW_UTILS_H #define IMSHOW_UTILS_H #include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui_c.h> #include <opencv2/opencv.hpp> #include <pthread.h> #include <deque> #include <math.h> #include <stdio.h> #include <bot_core/bot_core.h> #include <map> #include <GL/gl.h> namespace opencv_utils { struct image_info { cv::Rect roi; cv::Mat img; std::string name; double area; bool placed; image_info() : placed(false), name(""), area(0), img(cv::Mat()) {} image_info(const std::string& _name, const cv::Mat& _img) : name(_name), placed(false), area(_img.rows * _img.cols) { set_image(_img); } void set_image(const cv::Mat& _img) { // Create tmp cv::Mat tmp; if (_img.channels() == 1) cvtColor(_img, tmp, cv::COLOR_GRAY2BGR); // copy as 3-channel else tmp = _img; // copy header // Convert double max; cv::minMaxLoc(tmp, NULL, &max); cv::convertScaleAbs(tmp, img, 255.f / max); } }; class OpenCVImageViewer { cv::Mat3b frame; cv::VideoWriter writer; // cv::MouseEvent mouse; bool inited; cv::Mat_<float> opengl_mat; int tile_width, tile_height; int im_w, im_h; public: std::map<std::string, image_info> image_map; OpenCVImageViewer(); ~OpenCVImageViewer(); void configure_grid(); void draw_image_to_frame(cv::Mat& frame, image_info& im_info); // void button_callback(int b, void* data); void imshow(const std::string& name, const cv::Mat& img); void write(const std::string& fn); // static void on_opengl(void* user_data); void init(); // void displayStatusBar(const std::string& text, int delayms) { // cv::displayStatusBar("OpenCV Viewer", text, delayms); // } // void displayOverlay(const std::string& text, int delayms) { // cv::displayOverlay("OpenCV Viewer", text, delayms); // } }; void imshow(const std::string& name, const cv::Mat& img); void write(const std::string& fn); // static void displayStatusBar(const std::string& text, int delayms) { // if (&viewer) // viewer.displayStatusBar(text, delayms); // } // static void displayOverlay(const std::string& text, int delayms) { // if (&viewer) // viewer.displayOverlay(text, delayms); // } cv::Mat drawCorrespondences(const cv::Mat& img1, const std::vector<cv::Point2f>& features1, const cv::Mat& img2, const std::vector<cv::Point2f>& features2); } #endif
55d8980cdab5f912def521d1c72a6b51150ffd77
d74186fb46ca2421e193ce65b01560e0725912da
/interfaces/api/slam/IBootstrapper.h
b01909381373f64d6fb16dfb9b26ec82c4c8b785
[ "Apache-2.0" ]
permissive
SolarFramework/SolARFramework
5b48dc9844bb290c19568e4045da30e5a8b91ff6
21032dbb329a793e32c0bbdb757e3a1455ae9f14
refs/heads/master
2023-09-03T06:02:20.544463
2023-07-17T15:28:58
2023-07-17T15:28:58
104,219,429
14
13
Apache-2.0
2023-09-12T08:14:46
2017-09-20T13:31:38
C++
UTF-8
C++
false
false
2,183
h
IBootstrapper.h
/** * @copyright Copyright (c) 2017 B-com http://www.b-com.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. */ #ifndef SOLAR_IBOOTSTRAPPER_H #define SOLAR_IBOOTSTRAPPER_H #include "xpcf/api/IComponentIntrospect.h" #include "core/Messages.h" #include "datastructure/CameraDefinitions.h" #include "datastructure/MathDefinitions.h" #include "datastructure/GeometryDefinitions.h" #include "datastructure/Image.h" #include "datastructure/Frame.h" namespace SolAR { namespace api { namespace slam { /** * @class IBootstrapper * @brief <B>Initialization SLAM using an image stream of a camera.</B> * <TT>UUID: b0515c62-cc81-4600-835c-8acdfedf39b5</TT> */ class [[xpcf::clientUUID("d593b615-efcf-4b4c-82eb-148065f85008")]] [[xpcf::serverUUID("a7509f5c-f214-408d-be3a-acb38dd8512b")]] IBootstrapper : virtual public org::bcom::xpcf::IComponentIntrospect { public: /// @brief IBootstrapper default constructor IBootstrapper() = default; /// @brief IBootstrapper default destructor virtual ~IBootstrapper() = default; /// @brief This method uses images to boostrap mapping /// @param[in] frame input image to process /// @param[out] view output image to visualize /// @return FrameworkReturnCode::_SUCCESS_ if initialization succeed, else FrameworkReturnCode::_ERROR. virtual FrameworkReturnCode process(const SRef<SolAR::datastructure::Frame>& frame, SRef<SolAR::datastructure::Image> & view) = 0; }; } } } XPCF_DEFINE_INTERFACE_TRAITS(SolAR::api::slam::IBootstrapper, "b0515c62-cc81-4600-835c-8acdfedf39b5", "IBootstrapper", "SolAR::api::slam::IBootstrapper"); #endif //SOLAR_IBOOTSTRAPPER_H
755b5ec1d93e212375bfc6ace6346f831599c8d8
e7addf58df263b2638c0c96c41e800ad294b29ea
/VS7/Libraries/AnimatLibrary/Sensor.h
7b5f8c61091d92c0b8e6e1042d4bea4fe9988547
[]
no_license
NeuroRoboticTech/AnimatLabVersion1
9507986736685758456b65a9453eb18b7cfe88cf
c8f2decdff726f1c925c0d92f5dff7bf159d99d6
refs/heads/master
2021-01-10T15:52:45.815533
2015-10-04T12:54:34
2015-10-04T12:54:34
43,634,967
1
2
null
null
null
null
UTF-8
C++
false
false
933
h
Sensor.h
// AlSensor.h: interface for the CAlSensor class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_ALSENSOR_H__41341DA4_DDA9_4B00_9198_27B628231EE2__INCLUDED_) #define AFX_ALSENSOR_H__41341DA4_DDA9_4B00_9198_27B628231EE2__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 namespace AnimatLibrary { namespace Environment { namespace Bodies { class ANIMAT_PORT Sensor : public RigidBody { public: Sensor(); virtual ~Sensor(); virtual void CreateParts(Simulator *lpSim, Structure *lpStructure); virtual void CreateJoints(Simulator *lpSim, Structure *lpStructure); virtual void Load(Simulator *lpSim, Structure *lpStructure, CStdXml &oXml); }; } //Bodies } // Environment } //AnimatLibrary #endif // !defined(AFX_ALSENSOR_H__41341DA4_DDA9_4B00_9198_27B628231EE2__INCLUDED_)
945a3a05daae2b63950a972430c2f88f5f8e8351
6da62dacf463fde32b9bf85d87dc82fb1b87d876
/Nasledqvane/student.hpp
24fac3d3601ecb5b93765378f3dc2e3a9d832aeb
[]
no_license
PetyrEftimov/GitHubPetyrEftimov
df90acfc4d398489643d5c1d517beab167a088d1
a77b5d2c352c5c5c9e4251294bcf9933798d1eec
refs/heads/master
2021-01-20T13:56:50.077544
2017-06-24T11:29:10
2017-06-24T11:29:10
90,543,799
0
0
null
null
null
null
UTF-8
C++
false
false
822
hpp
student.hpp
// // student.hpp // Nasledqvane // // Created by Pepi on 4/19/17. // Copyright © 2017 Pepi. All rights reserved. // #ifndef student_hpp #define student_hpp #include "adress.hpp" #include "student.hpp" #include <iostream> #include<string> using namespace std; class Student{ public : Student(); Student(string , string , Adress& ); // virtual~Student(); void setFirsName(string); void setLastName(string); // void setAdress(string); string getFirstName(); string getLastName(); // string getAdress(); void printStudentInfo(); private: string firstName; string lastName; Adress Adress; }; #endif /* student_hpp */
6b2513ec401b2524d648cefe1f2d1d55b0112f69
ecbe865186efce017d15f94d91bef7a1e133050a
/BaseWindow(with raytracer)/BaseWindow/Loader.cpp
509ab015ca779a3e2424697971114df29d643955
[]
no_license
BuffBuff/Frustum-KD-tree
a3e0280f7dbfc4376f94ac4c2fc8036273cfde1a
b46a0594d98a6bf9103dc5d669898a4847d07374
refs/heads/master
2021-06-24T10:33:43.717436
2017-05-09T10:32:30
2017-05-09T10:32:30
29,969,737
3
2
null
null
null
null
UTF-8
C++
false
false
3,548
cpp
Loader.cpp
#include "Loader.h" Loader::Loader(void) { } Loader::~Loader(void) { } void Loader::LoadObject(char file[256],float mx,float mz,float my,float scale,Object* objekt,float invertX = 1,float invertY = 1,float invertZ = 1) { Vertex pData; char buffer[256]=""; bool last = false; float pos[3]; pos[0] = mx; pos[1] = my; pos[2] = mz; objekt->setPos(pos); std::fstream ObjFile; ObjFile.open(file,std::fstream::in | std::fstream::out | std::fstream::app); std::vector<VECTOR3> Position; std::vector<VECTOR3> Normal; std::vector<VECTOR2> TextureCoord; float x,y,z; float u,v; int FaceIndex=NULL; int Vertexsize=NULL; //for(int k = 0 ;k < 90000 ;k++) while(!ObjFile.eof()) { pData.normal = VECTOR3(0, 0, 0); pData.pos = VECTOR3(0, 0, 0); pData.texC = VECTOR2(0, 0); ObjFile >> buffer; if(0==strcmp(buffer,"v")) { last = false; ObjFile >>x>>y>>z; Position.push_back(VECTOR3((x*(scale / 10)*invertX), (y*(scale / 10)*invertY), (-z*(scale / 10)*invertZ))); } else if(0==strcmp(buffer,"vt")) { last = false; ObjFile >>u>>v; TextureCoord.push_back(VECTOR2(u, 1 - v)); } else if(0==strcmp(buffer,"vn")) { last = false; ObjFile >>x>>y>>z; Normal.push_back(VECTOR3(x, y, z)); } else if(0==strcmp(buffer,"f")) { last = true; for(int i = 0; i < 3;i ++ ) { ObjFile >>FaceIndex; if(FaceIndex < 0) FaceIndex*=-1; pData.pos = Position.at(FaceIndex-1); if('/'==ObjFile.peek()) ///// '/' Ignorieren { ObjFile.ignore(); if('/'!=ObjFile.peek()) { ObjFile >>FaceIndex; if(FaceIndex < 0) FaceIndex*=-1; pData.texC = TextureCoord.at(FaceIndex-1); } } if('/'==ObjFile.peek()) { ObjFile.ignore(); if('/'!=ObjFile.peek()) { ObjFile >>FaceIndex; if(FaceIndex < 0) FaceIndex*=-1; pData.normal = Normal.at(FaceIndex-1); } } //Data->push_back(pData); objekt->addData(pData); } } else if(0==strcmp(buffer,"s")) { last = false; } else if(0==strcmp(buffer,"g")) { last = false; } else if(0==strcmp(buffer,"#")) { last = false; } else if(buffer[0] == '#') { last = false; } else if(0==strcmp(buffer,"usemtl")) { last = false; } else if(last == true && !ObjFile.eof()) { objekt->lastFace(); //Data->push_back(Data->at(Data->size()-3)); //objekt->addData(Data->at(Data->size()-2)); //Data->push_back(Data->at(Data->size()-2)); char temp[256] = ""; int i = 0; int j = 0; while(buffer[i] != '/' && buffer[i] != 0) { temp[j] = buffer[i]; i++; j++; } i++; j = 0; FaceIndex = atof(temp); if(FaceIndex < 0) FaceIndex*=-1; pData.pos = Position.at(FaceIndex-1); if(buffer[i-1] != 0) { for(int l = 0;l < 256;l++) { temp[l] = NULL; } while(buffer[i] != '/' && buffer[i] != 0) { temp[j] = buffer[i]; i++; j++; } i++; j = 0; FaceIndex = atof(temp); if(FaceIndex < 0) FaceIndex*=-1; pData.texC = TextureCoord.at(FaceIndex-1); if(buffer[i-1] != 0) { for(int l = 0;l < 256;l++) { temp[l] = NULL; } while(buffer[i] != 0) { temp[j] = buffer[i]; i++; j++; } FaceIndex = atof(temp); if(FaceIndex < 0) FaceIndex*=-1; pData.normal = Normal.at(FaceIndex-1); } } //Data->push_back(pData); objekt->addData(pData); } } ObjFile.close(); }
93b5c0d3586f7b8659a7fdaa0be07d064f476855
fd7d1350eefac8a9bbd952568f074284663f2794
/dds/DCPS/FilterEvaluator.h
7745e1eb4e479b63c956de8533c5735d1070f6c8
[ "MIT" ]
permissive
binary42/OCI
4ceb7c4ed2150b4edd0496b2a06d80f623a71a53
08191bfe4899f535ff99637d019734ed044f479d
refs/heads/master
2020-06-02T08:58:51.021571
2015-09-06T03:25:05
2015-09-06T03:25:05
41,980,019
1
0
null
null
null
null
UTF-8
C++
false
false
5,513
h
FilterEvaluator.h
/* * $Id: FilterEvaluator.h 5864 2012-10-29 20:05:44Z mitza $ * * * Distributed under the OpenDDS License. * See: http://www.opendds.org/license.html */ #ifndef OPENDDS_DCPS_FILTER_EVALUATOR_H #define OPENDDS_DCPS_FILTER_EVALUATOR_H #include "dds/DCPS/Definitions.h" #ifndef OPENDDS_NO_CONTENT_SUBSCRIPTION_PROFILE #include "dds/DdsDcpsInfrastructureC.h" #include "Comparator_T.h" #include "RcObject_T.h" #include <vector> #include <string> namespace OpenDDS { namespace DCPS { class MetaStruct; template<typename T> const MetaStruct& getMetaStruct(); struct OpenDDS_Dcps_Export Value { Value(bool b, bool conversion_preferred = false); Value(int i, bool conversion_preferred = false); Value(unsigned int u, bool conversion_preferred = false); Value(ACE_INT64 l, bool conversion_preferred = false); Value(ACE_UINT64 m, bool conversion_preferred = false); Value(char c, bool conversion_preferred = false); Value(double f, bool conversion_preferred = false); Value(ACE_CDR::LongDouble ld, bool conversion_preferred = false); Value(const char* s, bool conversion_preferred = false); Value(const TAO::String_Manager& s, bool conversion_preferred = false); Value(const TAO::WString_Manager& s, bool conversion_preferred = false); ~Value(); Value(const Value& v); Value& operator=(const Value& v); void swap(Value& other); bool operator==(const Value& v) const; bool operator<(const Value& v) const; bool like(const Value& v) const; enum Type {VAL_BOOL, VAL_INT, VAL_UINT, VAL_I64, VAL_UI64, VAL_FLOAT, VAL_LNGDUB, VAL_LARGEST_NUMERIC = VAL_LNGDUB, VAL_CHAR, VAL_STRING}; bool convert(Type t); static void conversion(Value& lhs, Value& rhs); template<typename T> T& get(); template<typename T> const T& get() const; Type type_; union { bool b_; int i_; unsigned int u_; ACE_INT64 l_; ACE_UINT64 m_; char c_; double f_; ACE_CDR::LongDouble ld_; const char* s_; }; bool conversion_preferred_; }; class OpenDDS_Dcps_Export FilterEvaluator : public RcObject<ACE_SYNCH_MUTEX> { public: struct AstNodeWrapper; FilterEvaluator(const char* filter, bool allowOrderBy); explicit FilterEvaluator(const AstNodeWrapper& yardNode); ~FilterEvaluator(); std::vector<std::string> getOrderBys() const; bool hasFilter() const; template<typename T> bool eval(const T& sample, const DDS::StringSeq& params) const { DeserializedForEval data(&sample, getMetaStruct<T>(), params); return eval_i(data); } bool eval(ACE_Message_Block* serializedSample, bool swap_bytes, bool cdr_encap, const MetaStruct& meta, const DDS::StringSeq& params) const { SerializedForEval data(serializedSample, meta, params, swap_bytes, cdr_encap); return eval_i(data); } class EvalNode; struct OpenDDS_Dcps_Export DataForEval { DataForEval(const MetaStruct& meta, const DDS::StringSeq& params) : meta_(meta), params_(params) {} virtual ~DataForEval(); virtual Value lookup(const char* field) const = 0; const MetaStruct& meta_; const DDS::StringSeq& params_; private: DataForEval(const DataForEval&); DataForEval& operator=(const DataForEval&); }; private: FilterEvaluator(const FilterEvaluator&); FilterEvaluator& operator=(const FilterEvaluator&); EvalNode* walkAst(const AstNodeWrapper& node, EvalNode* prev); struct OpenDDS_Dcps_Export DeserializedForEval : DataForEval { DeserializedForEval(const void* data, const MetaStruct& meta, const DDS::StringSeq& params) : DataForEval(meta, params), deserialized_(data) {} virtual ~DeserializedForEval(); Value lookup(const char* field) const; const void* const deserialized_; }; struct SerializedForEval : DataForEval { SerializedForEval(ACE_Message_Block* data, const MetaStruct& meta, const DDS::StringSeq& params, bool swap, bool cdr) : DataForEval(meta, params), serialized_(data), swap_(swap), cdr_(cdr) {} Value lookup(const char* field) const; ACE_Message_Block* serialized_; bool swap_, cdr_; mutable std::map<std::string, Value> cache_; }; bool eval_i(DataForEval& data) const; EvalNode* filter_root_; std::vector<std::string> order_bys_; }; class OpenDDS_Dcps_Export MetaStruct { public: virtual ~MetaStruct(); virtual Value getValue(const void* stru, const char* fieldSpec) const = 0; virtual Value getValue(Serializer& ser, const char* fieldSpec) const = 0; virtual ComparatorBase::Ptr create_qc_comparator(const char* fieldSpec, ComparatorBase::Ptr next) const = 0; virtual const char** getFieldNames() const = 0; virtual size_t numDcpsKeys() const = 0; virtual bool compare(const void* lhs, const void* rhs, const char* fieldSpec) const = 0; virtual void assign(void* lhs, const char* lhsFieldSpec, const void* rhs, const char* rhsFieldSpec, const MetaStruct& rhsMeta) const = 0; virtual const void* getRawField(const void* stru, const char* fieldSpec) const = 0; virtual void* allocate() const = 0; virtual void deallocate(void* stru) const = 0; }; /// Each user-defined struct type will have an instantiation of this template /// generated by opendds_idl. template<typename T> struct MetaStructImpl; } } #endif // OPENDDS_NO_CONTENT_SUBSCRIPTION_PROFILE #endif
ea258a943b7fb9e037c11edc06cd30933f834d8d
fe17735122a54a6d30981f7951e9b2cd693dad13
/pgg_lab14/ObjLoader.h
e15b80a62c04dcc52ba8954010905fa52512a395
[]
no_license
JamesRobertsonGames/Rumble-Paddles
ab6979491d2def4231127c3cd0d399f77d568a2c
ee6ef5e1100d3b3c970cc50134a3e9f8a695119f
refs/heads/master
2021-01-19T12:22:10.618846
2017-08-19T08:22:27
2017-08-19T08:22:27
100,779,475
0
0
null
null
null
null
UTF-8
C++
false
false
1,218
h
ObjLoader.h
/*! * \brief OBJLoader Class. * \details This class is to Load in the RAW OBJ File * \author James Robertson * \version 1.0a * \date 2015 * \copyright GNU Public License. */ #pragma once #include <iostream> #include <string> #include <glm.hpp> #include <vector> struct FaceVertexData { int Vertex; int TexCoord; int Normal; FaceVertexData() { Vertex = 0; TexCoord = 0; Normal = 0; } }; class ObjLoader { public: ///ctor / dtor ObjLoader(); ~ObjLoader(); /// Load the Object in void Load(std::string objFileName); /// Get the Mesh Verticies & normals std::vector<float>& GetMeshVertices() { return meshVertices; } std::vector<float>& GetMeshNormals() { return meshNormals; } private: //store raw data read out of a file std::vector<glm::vec3> objFileVerts; std::vector<glm::vec3> objFileNormals; std::vector<FaceVertexData> faceVerts; //extracts bits of an obj file into the above std::vectors void ReadObjFileData(FILE* objFile); void BuildMeshVertAndNormalLists(); std::vector<float> meshVertices; std::vector<float> meshNormals; //reads a string like "3//5" and returns a VNP with 3 & 5 in it FaceVertexData ExtractFaceVertexData(std::string& s); };
b56c43f0d8821a43ada0657f3c00410a9dddde60
a275ea9ff9d9fcb8351f0c81418ece2fc30de6fc
/src/controller.h
26de32635c9e3cb3d489bb8870e5295650dc14e9
[]
no_license
MayankKr10/COP290-Maze-Game
234d3b979519adf431793b0d8808cf2c4dad705e
19e65556bba6aa01f17b7a5b9d5bf40c62c279ff
refs/heads/main
2023-05-01T06:05:37.419783
2021-05-19T17:23:48
2021-05-19T17:23:48
368,784,890
0
0
null
null
null
null
UTF-8
C++
false
false
430
h
controller.h
#ifndef CONTROLLER_H #define CONTROLLER_H #include "player.h" #include "maze.h" class Controller { public: // evaluate the up, down, left, right, and quit void HandleInput(bool &running, Player &player, Maze &maze) const; private: // check if the move is allowed according to the walls and update the direction void ChangeDirection(Player &player, Player::Direction input, Maze &maze, bool &running) const; }; #endif
008a62308e9c425644e637e660a2ad8dc60eb63b
1105a10fc5d73fe5b9ecf1266fcd633e22aef071
/caputre_tool/DealWithDll/DlgAshTrans.cpp
3d0104232aaeedc17cd5729d7a1e2f829335da2e
[]
no_license
huangjunkun/code_joy_with_cpp_builder_6
1ddbf3878b069591c759b60a6743ff4312dde45b
79dc58ddb9edbc7044031343c647f1d28a1fd219
refs/heads/master
2020-06-06T06:09:58.141522
2013-12-02T09:24:40
2013-12-02T09:24:40
11,698,742
1
1
null
null
null
null
GB18030
C++
false
false
6,102
cpp
DlgAshTrans.cpp
// DlgAshTrans.cpp : implementation file // #include "stdafx.h" #include "DealWithDll.h" #include "MainDlg.h" #include "DlgAshTrans.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDlgAshTrans dialog CDlgAshTrans::CDlgAshTrans(CWnd* pParent /*=NULL*/) : CMainDlg(CDlgAshTrans::IDD, pParent) { //{{AFX_DATA_INIT(CDlgAshTrans) m_Ash = 0; //}}AFX_DATA_INIT Tbitmap=NULL; m_las=1; } void CDlgAshTrans::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDlgAshTrans) DDX_Control(pDX, IDC_SLIDER1, m_Slider); DDX_Text(pDX, IDC_EDIT1, m_Ash); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDlgAshTrans, CDialog) //{{AFX_MSG_MAP(CDlgAshTrans) ON_WM_DESTROY() ON_BN_CLICKED(IDC_RADIO1, OnRadio1) ON_BN_CLICKED(IDC_RADIO2, OnRadio2) ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN1, OnDeltaposSpin1) ON_WM_HSCROLL() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDlgAshTrans message handlers BOOL CDlgAshTrans::OnInitDialog() //初始化 { CMainDlg::OnInitDialog(); // TODO: Add extra initialization here ((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(1); ((CStatic *)GetDlgItem(IDC_STATIC1))->SetBitmap(m_dib.newbmp); if(Tbitmap!=NULL) { DeleteObject(Tbitmap); Tbitmap=NULL; } Tbitmap=AshTranslation(m_dib.newpcol,m_dib.newbm,m_dib.NEWRGB32BITMAPINFO); ((CStatic *)GetDlgItem(IDC_STATIC2))->SetBitmap(Tbitmap); CSpinButtonCtrl* gg=(CSpinButtonCtrl*)GetDlgItem(IDC_SPIN1); gg->SetRange(-100,100); m_Slider.SetRange(-100, 100, TRUE); m_Slider.SetTicFreq(200/10); m_Slider.SetPos(0); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CDlgAshTrans::OnDestroy() { CDialog::OnDestroy(); RemoveWindowSkin(this->m_hWnd); RemoveDialogSkin(); if(Tbitmap!=NULL) { DeleteObject(Tbitmap); Tbitmap=NULL; } // TODO: Add your message handler code here } /************************************************************************* * 函数名称: AshTranslation() * 函数类型: HBITMAP * 函数功能: 实现灰度变换 *************************************************************************/ HBITMAP CDlgAshTrans::AshTranslation(COLORREF *pco, BITMAP bm, BITMAPINFOHEADER RGBBITSBITMAPINFO) { HBITMAP bmp; int i,j; int nWidth = bm.bmWidth; int nHeight = bm.bmHeight; int r,g,b,gray; COLORREF *pcol=new COLORREF[bm.bmHeight*bm.bmWidth]; for(int k=0; k<bm.bmHeight*bm.bmWidth; k++) { pcol[k]=pco[k]; } switch(m_las) { case 1: { for(i=0; i<nWidth; i++) { for(j=0; j<nHeight; j++) { r=GetRValue(pcol[(i)+(j)*nWidth]); g=GetGValue(pcol[(i)+(j)*nWidth]); b=GetBValue(pcol[(i)+(j)*nWidth]); gray=(int)(r*0.3+g*0.59+b*0.11); gray=gray+m_Ash; if(gray<0) gray=0; else if(gray>255) gray=255; pcol[i+j*nWidth]=RGB(gray,gray,gray); } } break; } case 2: { for(i=0; i<nWidth; i++) { for(j=0; j<nHeight; j++) { r=GetRValue(pcol[(i)+(j)*nWidth]); g=GetGValue(pcol[(i)+(j)*nWidth]); b=GetBValue(pcol[(i)+(j)*nWidth]); gray=(r+g+b)/3; gray=gray+m_Ash; if(gray<0) gray=0; else if(gray>255) gray=255; pcol[i+j*nWidth]=RGB(gray,gray,gray); } } break; } } bmp=CreateDIBitmap(m_dib.memdc,&RGBBITSBITMAPINFO, CBM_INIT,pcol,(BITMAPINFO*)&RGBBITSBITMAPINFO,DIB_RGB_COLORS); delete [] pcol; return bmp; } void CDlgAshTrans::OnRadio1() { // TODO: Add your control notification handler code here m_las=1; if(Tbitmap!=NULL) { DeleteObject(Tbitmap); Tbitmap=NULL; } Tbitmap=AshTranslation(m_dib.newpcol,m_dib.newbm,m_dib.NEWRGB32BITMAPINFO); ((CStatic *)GetDlgItem(IDC_STATIC2))->SetBitmap(Tbitmap); } void CDlgAshTrans::OnRadio2() { // TODO: Add your control notification handler code here m_las=2; if(Tbitmap!=NULL) { DeleteObject(Tbitmap); Tbitmap=NULL; } Tbitmap=AshTranslation(m_dib.newpcol,m_dib.newbm,m_dib.NEWRGB32BITMAPINFO); ((CStatic *)GetDlgItem(IDC_STATIC2))->SetBitmap(Tbitmap); } void CDlgAshTrans::OnDeltaposSpin1(NMHDR* pNMHDR, LRESULT* pResult) { NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR; // TODO: Add your control notification handler code here this->UpdateData(); m_Slider.SetPos(m_Ash); if(Tbitmap!=NULL) { DeleteObject(Tbitmap); Tbitmap=NULL; } Tbitmap=AshTranslation(m_dib.newpcol,m_dib.newbm,m_dib.NEWRGB32BITMAPINFO); ((CStatic *)GetDlgItem(IDC_STATIC2))->SetBitmap(Tbitmap); *pResult = 0; } HBITMAP CDlgAshTrans::Ash() { return AshTranslation(m_dib.pcol,m_dib.bm,m_dib.RGB32BITSBITMAPINFO); } void CDlgAshTrans::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { // TODO: Add your message handler code here and/or call default if (pScrollBar == (CScrollBar*)GetDlgItem(IDC_SLIDER1)) { m_Ash=m_Slider.GetPos(); CString str; str.Format("%d",m_Slider.GetPos()); ((CEdit*)GetDlgItem(IDC_EDIT1))->SetWindowText(str); if(Tbitmap!=NULL) { DeleteObject(Tbitmap); Tbitmap=NULL; } Tbitmap=AshTranslation(m_dib.newpcol,m_dib.newbm,m_dib.NEWRGB32BITMAPINFO); ((CStatic *)GetDlgItem(IDC_STATIC2))->SetBitmap(Tbitmap); } CDialog::OnHScroll(nSBCode, nPos, pScrollBar); }
0ffecfe01cf22f47892030d4fe1aa93a4735761f
72bd575d962c4583f0a52e56aeb6b44667919777
/control/rm_link.h
6e7b19c20ceabfca3c032b9424727549a31a8625
[]
no_license
rcxxx/rm-2019-code
38e108d2ff5fee34b7562dcb40893ec819d7fac6
a9efff02ce3b946f01e2e8705c274f22771c56a7
refs/heads/main
2023-04-20T17:27:52.245560
2021-05-06T04:34:47
2021-05-06T04:34:47
323,908,851
0
1
null
null
null
null
UTF-8
C++
false
false
975
h
rm_link.h
/** * @file rm_link.h * @author GCUROBOT-Visual-Group (GCUROBOT_WOLF@163.com) * @brief RM 2019 步兵视觉各接口链接头文件 * @version 1.1 * @date 2019-05-06 * @copyright Copyright (c) 2019 GCU Robot Lab. All Rights Reserved. */ #ifndef RM_LINK_H #define RM_LINK_H #include "configure.h" #include "debug_control.h" #include "camera/rm_videocapture.h" #include "serial/serialport.h" #include "armor/rm_armorfitted.h" class RM_Vision_Init { public: RM_Vision_Init(); ~RM_Vision_Init(); void Run(); bool is_exit(); void updateControl_information(int arr[REC_BUFF_LENGTH]); Control_Information g_Ctrl; /** Camera Srart **/ cv::VideoCapture capture; RM_VideoCapture cap; /** Camera Srart **/ /** param initial **/ cv::Mat src_img; /** param initial **/ /** function initial **/ RM_ArmorFitted armor; /** function initial **/ int th; int energy_refresh_count = 0; }; #endif // RM_LINK_H
176320ee3446a7978ac8be0847e055d46a93fee6
7d4e986704942d95ad06a2684439fa4cfcff950b
/vendor/mediatek/proprietary/system/core/xflash/xflash-cmd-line/xmain/commands.h
026e6d83016e51d4814a16db45c31c84a9c00219
[]
no_license
carlitros900/96Boards_mediatek-x20-sla-16.10
55c16062f7df3a7a25a13226e63c5fa4ccd4ff65
4f98957401249499f19102691a6e3ce13fe47d42
refs/heads/master
2021-01-04T01:26:47.443633
2020-02-13T17:53:31
2020-02-13T17:53:31
240,322,130
2
0
null
null
null
null
UTF-8
C++
false
false
372
h
commands.h
#pragma once #include <string> #include <vector> #include <boost/container/map.hpp> #include "type_define.h" using namespace std; class commands { public: commands(void); ~commands(void); static status_t execute(string command, vector<string>& arguments, boost::container::map<string, string>& options); };
a7a7bd29768c658fa3109ce7d2d650bada7f4ad1
86a8eb330e2e70ea7020233809080dc68fbf3585
/src/ofApp.cpp
70a11f770db26b013c456a1bdec5ae506a5b35ab
[]
no_license
KayToo2022/RayTracer
90aeaddd9788137e47557532f19e58ca35811b0d
61a7f18a1883ec7695d667010b6d4da9af43daf0
refs/heads/main
2023-04-21T11:28:05.663970
2021-05-27T18:46:01
2021-05-27T18:46:01
371,472,223
0
0
null
null
null
null
UTF-8
C++
false
false
15,028
cpp
ofApp.cpp
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetBackgroundColor(ofColor::black); theCam = &easyCam; easyCam.setPosition(glm::vec3(0, 0, 10)); easyCam.lookAt(glm::vec3(0, 0, -1)); easyCam.setNearClip(.1); sideCam.setPosition(glm::vec3(5, 0, 0)); sideCam.lookAt(glm::vec3(0, 0, 0)); sideCam.setNearClip(.1); image.allocate(imageWidth, imageHeight, OF_IMAGE_COLOR); //scene.push_back(&vp); //scene.push_back(&sphere0); //scene.push_back(&sphere1); //scene.push_back(&sphere2); //scene.push_back(&sphere3); //scene.push_back(&sphere4); scene.push_back(&table); //lights.push_back(&light0); lights.push_back(&light1); lights.push_back(&light2); //spotlights.push_back(&spotlight0); //spotlights.push_back(&spotlight1); //spotlights.push_back(&spotlight2); //table.scene.push_back(&sphere0); //table.scene.push_back(&sphere1); //table.scene.push_back(&sphere2); //table.scene.push_back(&sphere3); //table.scene.push_back(&sphere4); //table.lights.push_back(&light0); table.lights.push_back(&light1); table.lights.push_back(&light2); //table.spotlights.push_back(&spotlight0); //table.spotlights.push_back(&spotlight1); } //-------------------------------------------------------------- void ofApp::update(){ } //-------------------------------------------------------------- void ofApp::draw(){ theCam->begin(); drawAxis(); ofNoFill(); table.draw(); vp.draw(); renderCam.draw(); for (auto i : scene) { i->draw(); } //sphere0.draw(); //sphere1.draw(); //sphere2.draw(); //sphere3.draw(); //sphere4.draw(); //light0.draw(); //light1.draw(); for (auto j : lights) { j->draw(); } //spotlight0.draw(); //spotlight1.draw(); //spotlight2.draw(); theCam->end(); } void ofApp::drawAxis() { ofSetColor(ofColor::red); ofDrawLine(glm::vec3(0, 0, 0), glm::vec3(1, 0, 0)); ofSetColor(ofColor::green); ofDrawLine(glm::vec3(0, 0, 0), glm::vec3(0, 1, 0)); ofSetColor(ofColor::blue); ofDrawLine(glm::vec3(0, 0, 0), glm::vec3(0, 0, 1)); } //-------------------------------------------------------------- void ofApp::keyPressed(int key){ switch (key) { case OF_KEY_F1: theCam = &easyCam; break; case OF_KEY_F2: theCam = &sideCam; break; case OF_KEY_F3: cout << "Running rayTrace\n"; rayTrace(); case 'c': if (easyCam.getMouseInputEnabled()) easyCam.disableMouseInput(); else easyCam.enableMouseInput(); break; case 'j': newColor = &ofColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255)); current = new Sphere(glm::vec3(0,2,-5), 1, *newColor); scene.push_back(current); table.scene.push_back(current); break; case 'd': if (!selected.empty()) { scene.erase(std::find(scene.begin(), scene.end(), selected[0])); table.scene.erase(std::find(table.scene.begin(), table.scene.end(), selected[0])); selected.clear(); } break; case 't': cout << scene.size() << '\n'; for (auto i : scene) { cout << i->getColor() << '\n'; } break; default: break; } } //-------------------------------------------------------------- void ofApp::keyReleased(int key){ } //-------------------------------------------------------------- void ofApp::mouseMoved(int x, int y ){ } //-------------------------------------------------------------- void ofApp::mouseDragged(int x, int y, int button){ if (objSelected() && bDrag) { glm::vec3 point; mouseToDragPlane(x, y, point); selected[0]->position += (point - lastPoint); lastPoint = point; } } bool ofApp::mouseToDragPlane(int x, int y, glm::vec3 &point) { glm::vec3 p = theCam->screenToWorld(glm::vec3(x, y, 0)); glm::vec3 d = p - theCam->getPosition(); glm::vec3 dn = glm::normalize(d); float dist; glm::vec3 pos; if (objSelected()) { pos = selected[0]->position; } else pos = glm::vec3(0, 0, 0); if (glm::intersectRayPlane(p, dn, pos, glm::normalize(theCam->getZAxis()), dist)) { point = p + dn * dist; return true; } return false; } //-------------------------------------------------------------- void ofApp::mousePressed(int x, int y, int button){ // if we are moving the camera around, don't allow selection // if (easyCam.getMouseInputEnabled()) return; // clear selection list // selected.clear(); // // test if something selected // vector<SceneObject *> hits; glm::vec3 p = theCam->screenToWorld(glm::vec3(x, y, 0)); glm::vec3 d = p - theCam->getPosition(); glm::vec3 dn = glm::normalize(d); // check for selection of scene objects // for (int i = 0; i < scene.size(); i++) { glm::vec3 point, norm; // We hit an object // if (scene[i]->isSelectable && scene[i]->intersect(Ray(p, dn), point, norm)) { hits.push_back(scene[i]); cout << "hit\n"; } } // if we selected more than one, pick nearest // SceneObject *selectedObj = NULL; if (hits.size() > 0) { selectedObj = hits[0]; float nearestDist = std::numeric_limits<float>::infinity(); for (int n = 0; n < hits.size(); n++) { float dist = glm::length(hits[n]->position - theCam->getPosition()); if (dist < nearestDist) { nearestDist = dist; selectedObj = hits[n]; } } } if (selectedObj) { selected.push_back(selectedObj); bDrag = true; mouseToDragPlane(x, y, lastPoint); cout << "hit\n"; } else { selected.clear(); cout << "miss\n"; } } //-------------------------------------------------------------- void ofApp::mouseReleased(int x, int y, int button){ bDrag = false; } //-------------------------------------------------------------- void ofApp::mouseEntered(int x, int y){ } //-------------------------------------------------------------- void ofApp::mouseExited(int x, int y){ } //-------------------------------------------------------------- void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- void ofApp::gotMessage(ofMessage msg){ } //-------------------------------------------------------------- void ofApp::dragEvent(ofDragInfo dragInfo){ } // Intersect Ray with Plane (wrapper on glm::intersect* // bool Plane::intersect(const Ray &ray, glm::vec3 & point, glm::vec3 & normalAtIntersect) { float dist; bool insidePlane = false; bool hit = glm::intersectRayPlane(ray.p, ray.d, position, this->normal, dist); if (hit) { Ray r = ray; point = r.evalPoint(dist); normalAtIntersect = this->normal; glm::vec2 xrange = glm::vec2(position.x - width / 2, position.x + width / 2); glm::vec2 zrange = glm::vec2(position.z - height / 2, position.z + height / 2); if (point.x < xrange[1] && point.x > xrange[0] && point.z < zrange[1] && point.z > zrange[0]) { insidePlane = true; } } return insidePlane; } // Convert (u, v) to (x, y, z) // We assume u,v is in [0, 1] // glm::vec3 ViewPlane::toWorld(float u, float v) { float w = width(); float h = height(); return (glm::vec3((u * w) + min.x, (v * h) + min.y, position.z)); } // Get a ray from the current camera position to the (u, v) position on // the ViewPlane // Ray RenderCam::getRay(float u, float v) { glm::vec3 pointOnPlane = view.toWorld(u, v); return(Ray(position, glm::normalize(pointOnPlane - position))); } ofColor Plane::getColor(glm::vec3 contactPt, ofImage* t) { bool hit = false; float distance = std::numeric_limits<float>::infinity(); glm::vec3 intersectPoint, intersectNormal; SceneObject* closestObj = NULL; glm::vec3* closestPoint = NULL; glm::vec3* closestNorm = NULL; glm::vec3 I = contactPt - glm::vec3(contactPt.x, 0, 10); glm::vec3 B = glm::vec3(0, contactPt.y, 0); glm::vec3 A = I - B; glm::vec3 R = A - B; ofColor color = diffuseColor; for (auto obj : scene) { if (obj->intersect(Ray(contactPt, normalize(R)), intersectPoint, intersectNormal) ){ hit = true; if (glm::distance(contactPt, intersectPoint) < distance) { distance = glm::distance(contactPt, intersectPoint); closestObj = obj; closestPoint = &intersectPoint; closestNorm = &intersectNormal; } } } if (hit) { //fetching the color takes a while. find a way to speed that up //cout << contactPt << "\n"; //cout << closestPoint->x << ", " << closestPoint->y << ", " << closestPoint->z << "\n\n"; //cout << "getting texture color\n"; //ofColor textureColor = closestObj->getColor(); //color += textureColor; color = closestObj->getColor(); for (auto light : lights) { //lambert glm::vec3 l = normalize(light->position - *closestPoint); glm::vec3 normOffset = glm::vec3(closestNorm->x, closestNorm->y, closestNorm->z) * 0.1; glm::vec3 ip, nrml; Ray shadRay = Ray(*closestPoint + normOffset, normalize(light->position - *closestPoint + normOffset)); for (auto obj : scene) { if (obj->intersect(shadRay, ip, nrml)) { color += ofColor::black; } else { color += (ofColor::white * light->intensity)*std::max(float(0), glm::dot(normalize(nrml), l)); } } //phong glm::vec3 v = normalize(glm::vec3(0,0,10) + *closestPoint); glm::vec3 h = (l + v) / (glm::length(l + v)); for (auto obj : scene) { if (obj->intersect(shadRay, ip, nrml)) { color += ofColor::black; } else { color += (ofColor::white * light->intensity) * pow(std::max(float(0), glm::dot(normalize(nrml),normalize(h))),1); } } } } return color; } void ofApp::rayTrace() { for (int i = 0; i < imageWidth; i++) { //cout << (i / imageWidth) * 100 << "% complete\n"; for (int j = 0; j < imageHeight; j++) { cout << i << ", " << j << "\n"; double u = (i + .5) / imageWidth; double v = (j + .5) / imageHeight; Ray ray = renderCam.getRay(u, v); bool hit = false; float distance = std::numeric_limits<float>::infinity(); glm::vec3 intersectPoint, normal; SceneObject* closestObj = NULL; glm::vec3* closestPoint = NULL; glm::vec3* closestNorm = NULL; for (auto obj : scene) { if (obj->intersect(ray, intersectPoint, normal)) { hit = true; if (glm::distance(glm::vec3(u, v, 0), intersectPoint) < distance) { distance = glm::distance(glm::vec3(u, v, 0), intersectPoint); closestObj = obj; closestPoint = &intersectPoint; closestNorm = &normal; //cout << "Found closest object\n"; } } } if (hit) { ofColor color = ofColor::black; //cout << "getting texture color\n"; ofColor textureColor = closestObj->getColor(*closestPoint, texture); for (auto light : lights) { color += lambert(*light, *closestPoint, *closestNorm, textureColor, 1); color += phong(*light, *closestPoint, *closestNorm, textureColor, ofColor::white, glm::vec3(u, v, 0), 25, 1); } for (auto spotlight : spotlights) { color += spotLambert(*spotlight, *closestPoint, *closestNorm, textureColor, 1); color += spotPhong(*spotlight, *closestPoint, *closestNorm, textureColor, ofColor::white, glm::vec3(u, v, 0), 25, 1); } image.setColor(i, j, color); image.update(); } else { image.setColor(i, j, ofColor::black); image.update(); } } } cout << "flipping image\n"; image.mirror(true, false); image.update(); image.save("projectpic.jpg"); cout << "save complete\n"; } ofColor ofApp::lambert(Light &light, const glm::vec3 &p, const glm::vec3 &norm, const ofColor diffuse, float r = 1) { glm::vec3 l = normalize(light.position - p); glm::vec3 normOffset = norm * 0.1; glm::vec3 intersectpt, normal; Ray shadRay = Ray(p + normOffset , normalize(light.position-p+normOffset)); for (auto obj : scene) { if (obj->intersect(shadRay, intersectpt, normal)) { //cout << "shadow generated at "<< p <<"\n"; return ofColor::black; } } return (diffuse * (light.intensity / (r*r))*std::max(float(0), glm::dot(normalize(norm), l))); } ofColor ofApp::phong(Light light, const glm::vec3 &p, const glm::vec3 &norm, const ofColor diffuse, const ofColor specular, glm::vec3 &viewRay, float power = 1, float r = 1) { glm::vec3 l = normalize(light.position - p); glm::vec3 v = normalize(p + renderCam.position); glm::vec3 h = (l + v) / (glm::length(l + v)); glm::vec3 normOffset = norm * 0.1; glm::vec3 intersectpt, normal; Ray shadRay = Ray(p + normOffset, normalize(light.position - p + normOffset)); for (auto obj : scene) { if (obj->intersect(shadRay, intersectpt, normal)) { //cout << "shadow generated at "<< p <<"\n"; return ofColor::black; } } return (specular) * (light.intensity / (r*r)) * pow(std::max(float(0), glm::dot(normalize(norm), normalize(h))),power); } ofColor ofApp::spotLambert(SpotLight &spotlight, const glm::vec3 &p, const glm::vec3 &norm, const ofColor diffuse, float r = 1) { glm::vec3 l = normalize(spotlight.position - p); glm::vec3 normOffset = norm * 0.1; glm::vec3 intersectpt, normal; Ray shadRay = Ray(p + normOffset, normalize(spotlight.position - p + normOffset)); glm::vec3 coneDirection = normalize(spotlight.coneDirection); glm::vec3 rayDirection = -normalize(spotlight.position - p + normOffset); float lightToSurfaceAngle = glm::degrees(glm::acos(glm::dot(rayDirection, coneDirection))); if (lightToSurfaceAngle > spotlight.coneAngle) { return ofColor::black; } for (auto obj : scene) { if (obj->intersect(shadRay, intersectpt, normal)) { //cout << "shadow generated at "<< p <<"\n"; return ofColor::black; } } return (diffuse * (spotlight.intensity / (r*r))*std::max(float(0), glm::dot(normalize(norm), l))); } ofColor ofApp::spotPhong(SpotLight spotlight, const glm::vec3 &p, const glm::vec3 &norm, const ofColor diffuse, const ofColor specular, glm::vec3 &viewRay, float power = 1, float r = 1) { glm::vec3 l = normalize(spotlight.position - p); glm::vec3 v = normalize(p + renderCam.position); glm::vec3 h = (l + v) / (glm::length(l + v)); glm::vec3 normOffset = norm * 0.1; glm::vec3 intersectpt, normal; Ray shadRay = Ray(p + normOffset, normalize(spotlight.position - p + normOffset)); glm::vec3 coneDirection = normalize(spotlight.coneDirection); glm::vec3 rayDirection = -normalize(spotlight.position - p + normOffset); float lightToSurfaceAngle = glm::degrees(glm::acos(glm::dot(rayDirection, coneDirection))); if (lightToSurfaceAngle > spotlight.coneAngle) { return ofColor::black; } for (auto obj : scene) { if (obj->intersect(shadRay, intersectpt, normal)) { //cout << "shadow generated at "<< p <<"\n"; return ofColor::black; } } return (specular) * (spotlight.intensity / (r*r)) * pow(std::max(float(0), glm::dot(normalize(norm), normalize(h))), power); }
22bea6803580d6000079777b24fef878f889adff
ce5073c3e3ef42b88d7e26da47efc5b328be84e5
/OSUtilities/inc/RemoteThreadManager.h
5bb15a29bfaa3dc967299971e44436edb4b1e2e2
[ "MIT" ]
permissive
relpatseht/FunctionHooking
14bb1711c5de4e6c55674c13782a9eb8aa33e6f9
765b73695d759fa0a460f88a2497ec062941c4a3
refs/heads/master
2023-02-27T04:32:05.111116
2023-02-12T12:49:11
2023-02-12T12:49:11
86,401,773
0
0
null
null
null
null
UTF-8
C++
false
false
732
h
RemoteThreadManager.h
/************************************************************************************\ * OSUtilities - An Andrew Shurney Production * \************************************************************************************/ /*! \file RemoteThreadManager.h * \author Andrew Shurney * \brief Grabs all threads on a process */ #ifndef REMOTE_THREAD_MANAGER #define REMOTE_THREAD_MANAGER #include <vector> #include "RemoteThread.h" #include "ProcessHandle.h" class RemoteThreadManager { public: typedef std::vector<RemoteThread> RemoteThreads; private: ProcessHandle procHandle; public: RemoteThreadManager(unsigned procId = 0); RemoteThreads GetRemoteThreads(); }; #endif
95c1e5621a555f9bad154cd35d99f26e1cef29e4
34b26012399c362ee196b2d7e86f507b1bc370d1
/Sawyer Desk LED Control/arduino_code/arduino_code.ino
68e667c6e07c9c29a8fc5b2e8e4f8595028471bf
[]
no_license
denis-draca/led_demo
2cc8c64f5b703004d0a55b328bbc03f4006a8ea1
fea43c2ae1ec2f5e9ce7d9d3a9c9f832f23fe408
refs/heads/master
2021-01-21T16:00:39.065500
2017-06-25T03:58:06
2017-06-25T03:58:06
91,869,835
0
0
null
null
null
null
UTF-8
C++
false
false
6,184
ino
arduino_code.ino
#include <elapsedMillis.h> #include "ros.h" #include "led_demo/led.h" /* * rosserial Subscriber Example * Blinks an LED on callback */ //#include "ros/time.h" class zone { public: zone(int pin_R, int pin_G, int pin_B); void set_rgb(int r, int g, int b, int rnd); void set_blink(boolean yes, int rate_ms); void set_self_control(boolean yes); void set_on(boolean yes); void perform_task(); private://members int _pin_R; int _pin_G; int _pin_B; boolean first; elapsedMillis time; boolean _ON; boolean _blink; boolean _self_control; unsigned int _rate; boolean _sub_off; boolean flag; boolean _rand_colour; boolean _switch; byte _r; byte _g; byte _b; float _h; float _s; float _v; float brightness; private://methods void rgb2hsv(); void hsv2rgb(); void blink_task(); void breath_task(); void off(); void set_colour(); }; zone::zone(int pin_R, int pin_G, int pin_B) { _pin_R = pin_R; _pin_G = pin_G; _pin_B = pin_B; pinMode(_pin_R, OUTPUT); pinMode(_pin_G, OUTPUT); pinMode(_pin_B, OUTPUT); time = 0; _sub_off = false; brightness = (float)0.0; flag = false; _ON = false; _self_control = false; first = true; _rand_colour = false; } void zone::set_on(boolean yes) { _ON = yes; } void zone::set_rgb(int r, int g, int b, int rnd) { _r = r; _g = g; _b = b; if(rnd == 1) { _rand_colour = true; _switch = false; } else { _rand_colour = false; } rgb2hsv(); } void zone::set_blink(boolean yes, int rate_ms) { _blink = yes; _rate = rate_ms; if (!_blink) { first = true; } } void zone::set_self_control(boolean yes) { _self_control = yes; } void zone::perform_task() { if(_ON == false) { off(); return; } else { if(_self_control) { set_colour(); return; } else { if(_blink) { if (time > _rate && _sub_off) { set_colour(); time = 0; _sub_off = false; } else if(time > _rate && !_sub_off) { off(); time = 0; _sub_off = true; } } else { if (time > (_rate/400) && !flag) { if(_rand_colour && _switch) { set_rgb(random(255), random(255), random(255), 1); _v = 0; hsv2rgb(); set_colour(); _switch = false; } if(first) { _v = 0.0; first = false; } _v = (float)(_v + (float)(1.0/200.0)); if (_v >= (float)0.95) { flag = true; } hsv2rgb(); set_colour(); time = 0; } else if (time > (_rate/400) && flag) { _v = (float)(_v - (float)(1.0/200.0)); if (_v <= (float)0) { flag = false; _switch = true; } hsv2rgb(); set_colour(); time = 0; } } } } } void zone::set_colour() { analogWrite(_pin_R, _r); analogWrite(_pin_G, _g); analogWrite(_pin_B, _b); } void zone::off() { analogWrite(_pin_R, 0); analogWrite(_pin_G, 0); analogWrite(_pin_B, 0); } void zone::hsv2rgb() { double r, g, b; r = 0; g = 0; b = 0; int i = int(_h * 6); double f = _h * 6 - i; double p = _v * (1 - _s); double q = _v * (1 - f * _s); double t = _v * (1 - (1 - f) * _s); switch(i % 6){ case 0: r = _v, g = t, b = p; break; case 1: r = q, g = _v, b = p; break; case 2: r = p, g = _v, b = t; break; case 3: r = p, g = q, b = _v; break; case 4: r = t, g = p, b = _v; break; case 5: r = _v, g = p, b = q; break; } _r = r * 255; _g = g * 255; _b = b * 255; } void zone::rgb2hsv() { double rd = (double) _r/255; double gd = (double) _g/255; double bd = (double) _b/255; double max_val = max(max(rd, gd), bd), min_val = min(min(rd, gd), bd); double h = 0, s, v = max_val; double d = max_val - min_val; s = max_val == 0 ? 0 : d / max_val; if (max_val == min_val) { h = 0; // achromatic } else { if (max_val == rd) { h = (gd - bd) / d + (gd < bd ? 6 : 0); } else if (max_val == gd) { h = (bd - rd) / d + 2; } else if (max_val == bd) { h = (rd - gd) / d + 4; } h /= 6; } _h = h; _s = s; _v = v; } ros::NodeHandle nh; zone *zones; void messageCb( const led_demo::led& toggle_msg){ for(unsigned int i = 0; i < toggle_msg.zone_length; i++) { if(toggle_msg.zone[i] > 2) { continue; } if(toggle_msg.rgb_length != 4) { break; } zones[toggle_msg.zone[i] - 1].set_rgb(toggle_msg.rgb[0], toggle_msg.rgb[1], toggle_msg.rgb[2], toggle_msg.rgb[3]); zones[toggle_msg.zone[i] - 1].set_blink(toggle_msg.blink, toggle_msg.rate); zones[toggle_msg.zone[i] - 1].set_self_control(toggle_msg.self_control); zones[toggle_msg.zone[i] - 1].set_on(toggle_msg.ON); } } ros::Subscriber<led_demo::led> sub("/sawyer/base/1", &messageCb ); void setup() { nh.getHardware()->setBaud(115200); nh.initNode(); nh.subscribe(sub); randomSeed(analogRead(14)); } void loop() { zone z1(20,21,22); zone z2(23,9,10); zone temp[] = {z1, z2}; zones = temp; zones[0].set_rgb(255, 0, 0, 0); zones[0].set_self_control(true); zones[0].set_on(true); zones[1].set_rgb(255, 0, 0, 0); zones[1].set_self_control(true); zones[1].set_on(true); while(1) { nh.spinOnce(); zones[0].perform_task(); zones[1].perform_task(); } }
c6b09739e23c0285c783d5bd2749f5c84fc09871
9777587686ec5e6942fc860f2fbce9119103fe22
/NENUOJ/nenuoj_82.cpp
fa5c1a98c4830479924c304f1a82778d7b2dfbaf
[]
no_license
A1exMinatoooo/OJ_Submissions
9147254c0ded1512cb64a2dcf0641541a26807ab
352478606512d3e85902aebf49d25d34a047925d
refs/heads/master
2021-10-24T17:57:16.968244
2019-03-27T01:09:20
2019-03-27T01:09:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
435
cpp
nenuoj_82.cpp
/** * 单数?双数? * Time Limit: 1000/1000MS (C++/Others) Memory Limit: 65536/65536KB (C++/Others) * * Result: Accepted * Time: 0ms * Memory: 584KB */ #include <bits/stdc++.h> using namespace std; int main() { int cas; cin >> cas; while (cas--) { char n[70]; cin >> n; int len = strlen(n); if ((n[len - 1] - '0') % 2 == 0) cout << "even" << endl; else cout << "odd" << endl; } }
708589af55f7e914b2fd5932eb568c7fc8b38d55
35e52969c08bcadfc12d665c221f47e7e11c465b
/20130512_Software_Development_Yaml_Data_Explorer/test/Utils/DateAndTime/DateTest.cpp
0dbb96eebc232a04d13bbb120b3d7538a8951e1b
[ "MIT" ]
permissive
andrehtissot/oldthings
9c8178a9840668b2555c5711b9b014c978ffb2e0
e947f6ca168939c3781de39bdf5799e49a0021a9
refs/heads/master
2021-01-11T12:38:37.133796
2016-12-09T18:36:42
2016-12-09T18:36:42
72,486,238
0
0
null
null
null
null
UTF-8
C++
false
false
8,514
cpp
DateTest.cpp
#include "../../TestBase.cpp" #include "../../../src/Utils/DateAndTime/Date.cpp" using namespace Utils::DateAndTime; class DateTest : public TestBase { private: Date dateAttribute1; Date dateAttribute2; private: public: void testEqualAndDifferent(){ Date* date1 = new Date(2010, 10, 10); dateAttribute1.setYear(2010); dateAttribute1.setMonth(10); dateAttribute1.setDay(12); if(dateAttribute1 == date1) report("The first date was suposed to be different to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(dateAttribute1 != date1) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute2.setYear(2010); dateAttribute2.setMonth(10); dateAttribute2.setDay(12); if(dateAttribute1 == dateAttribute2) report("The first date was suposed to be different to the second!", __FUNCTION__, __LINE__); dateAttribute2.setDay(10); if(dateAttribute1 != dateAttribute2) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); delete(date1); } void testMoreThan(){ Date* date1 = new Date(2010, 10, 10); dateAttribute1.setYear(2010); dateAttribute1.setMonth(10); dateAttribute1.setDay(8); if(dateAttribute1 > date1) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(dateAttribute1 > date1) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(12); if(!(dateAttribute1 > date1)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); dateAttribute2.setYear(2010); dateAttribute2.setMonth(10); dateAttribute2.setDay(10); dateAttribute1.setDay(8); if(dateAttribute1 > dateAttribute2) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(dateAttribute1 > dateAttribute2) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(12); if(!(dateAttribute1 > dateAttribute2)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); delete(date1); } void testLessThan(){ Date* date1 = new Date(2010, 10, 10); dateAttribute1.setYear(2010); dateAttribute1.setMonth(10); dateAttribute1.setDay(12); if(dateAttribute1 < date1) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(dateAttribute1 < date1) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(8); if(!(dateAttribute1 < date1)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); dateAttribute2.setYear(2010); dateAttribute2.setMonth(10); dateAttribute2.setDay(10); dateAttribute1.setDay(12); if(dateAttribute1 < dateAttribute2) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(dateAttribute1 < dateAttribute2) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(8); if(!(dateAttribute1 < dateAttribute2)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); delete(date1); } void testMoreOrEqualTo(){ Date* date1 = new Date(2010, 10, 10); dateAttribute1.setYear(2010); dateAttribute1.setMonth(10); dateAttribute1.setDay(8); if(dateAttribute1 >= date1) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(!(dateAttribute1 >= date1)) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(12); if(!(dateAttribute1 >= date1)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); dateAttribute2.setYear(2010); dateAttribute2.setMonth(10); dateAttribute2.setDay(10); dateAttribute1.setDay(8); if(dateAttribute1 >= dateAttribute2) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(!(dateAttribute1 >= dateAttribute2)) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(12); if(!(dateAttribute1 >= dateAttribute2)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); delete(date1); } void testLessOrEqualTo(){ Date* date1 = new Date(2010, 10, 10); dateAttribute1.setYear(2010); dateAttribute1.setMonth(10); dateAttribute1.setDay(12); if(dateAttribute1 <= date1) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(!(dateAttribute1 <= date1)) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(8); if(!(dateAttribute1 <= date1)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); dateAttribute2.setYear(2010); dateAttribute2.setMonth(10); dateAttribute2.setDay(10); dateAttribute1.setDay(12); if(dateAttribute1 <= dateAttribute2) report("The first date was suposed to be more than the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(10); if(!(dateAttribute1 <= dateAttribute2)) report("The first date was suposed to be equal to the second!", __FUNCTION__, __LINE__); dateAttribute1.setDay(8); if(!(dateAttribute1 <= dateAttribute2)) report("The first date was suposed to be less than the second!", __FUNCTION__, __LINE__); delete(date1); } void testFormat(){ Date* date1 = new Date(2010, 10, 12); reportIfDifferent(date1->format("d/m/Y"), "12/10/2010", __FUNCTION__, __LINE__); delete(date1); } void testFromString(){ Date* date1 = new Date(2010, 10, 12); date1->loadFromString("2013-04-08", "Y-m-d"); reportIfDifferent(date1->format("d/m/Y"), "08/04/2013", __FUNCTION__, __LINE__); delete(date1); } void testToHours(){ Date* date1 = new Date(2017, 10, 12); reportIfDifferent(date1->toHours(), 17687496.0, __FUNCTION__, __LINE__); date1->setYear(2013); reportIfDifferent(date1->toHours(), 17652432.0, __FUNCTION__, __LINE__); date1->setYear(2012); reportIfDifferent(date1->toHours(), 17643672.0, __FUNCTION__, __LINE__); date1->setYear(2011); reportIfDifferent(date1->toHours(), 17634888.0, __FUNCTION__, __LINE__); Date* date2 = new Date(0, 1, 0); reportIfDifferent(date2->toHours(), 0.0, __FUNCTION__, __LINE__); date2->setDay(1); reportIfDifferent(date2->toHours(), 24.0, __FUNCTION__, __LINE__); date2->setDay(31); reportIfDifferent(date2->toHours(), 744.0, __FUNCTION__, __LINE__); date2->setDay(1); date2->setMonth(2); reportIfDifferent(date2->toHours(), 768.0, __FUNCTION__, __LINE__); date2->setDay(1); date2->setMonth(1); date2->setYear(3); reportIfDifferent(date2->toHours(), 26304.0, __FUNCTION__, __LINE__); date2->setDay(1); date2->setMonth(1); date2->setYear(4); reportIfDifferent(date2->toHours(), 35064.0, __FUNCTION__, __LINE__); date2->setDay(1); date2->setMonth(3); date2->setYear(4); reportIfDifferent(date2->toHours(), 36504.0, __FUNCTION__, __LINE__); date2->setDay(1); date2->setMonth(1); date2->setYear(5); reportIfDifferent(date2->toHours(), 43848.0, __FUNCTION__, __LINE__); date2->setDay(1); date2->setMonth(3); date2->setYear(5); reportIfDifferent(date2->toHours(), 45264.0, __FUNCTION__, __LINE__); delete(date1); delete(date2); } }; int main(int argc, char* argv[]){ DateTest* dateTest = new DateTest(); dateTest->testEqualAndDifferent(); dateTest->testMoreThan(); dateTest->testLessThan(); dateTest->testMoreOrEqualTo(); dateTest->testLessOrEqualTo(); dateTest->testFormat(); dateTest->testFromString(); dateTest->testToHours(); delete(dateTest); // Date* date1 = new Date(); // std::cout << date1->today()->format("d/m/Y") << std::endl; // delete(date1); // Date* date2 = new Date(); // std::cout << date2->format("d/m/Y") << std::endl; // delete(date2); //std::cout << Date::today()->format("d/m/Y") << std::endl; }
1207b69e51d0d9b3be0db622fd15fae475a1c81d
cfeac52f970e8901871bd02d9acb7de66b9fb6b4
/generated/src/aws-cpp-sdk-quicksight/include/aws/quicksight/model/AssetBundleImportJobDataSourceCredentials.h
d4a727dbfce47ebdaf4926ce14b34036f5ea2db3
[ "Apache-2.0", "MIT", "JSON" ]
permissive
aws/aws-sdk-cpp
aff116ddf9ca2b41e45c47dba1c2b7754935c585
9a7606a6c98e13c759032c2e920c7c64a6a35264
refs/heads/main
2023-08-25T11:16:55.982089
2023-08-24T18:14:53
2023-08-24T18:14:53
35,440,404
1,681
1,133
Apache-2.0
2023-09-12T15:59:33
2015-05-11T17:57:32
null
UTF-8
C++
false
false
6,258
h
AssetBundleImportJobDataSourceCredentials.h
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/quicksight/QuickSight_EXPORTS.h> #include <aws/quicksight/model/AssetBundleImportJobDataSourceCredentialPair.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace QuickSight { namespace Model { /** * <p>The login credentials to use to import a data source resource.</p><p><h3>See * Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/AssetBundleImportJobDataSourceCredentials">AWS * API Reference</a></p> */ class AssetBundleImportJobDataSourceCredentials { public: AWS_QUICKSIGHT_API AssetBundleImportJobDataSourceCredentials(); AWS_QUICKSIGHT_API AssetBundleImportJobDataSourceCredentials(Aws::Utils::Json::JsonView jsonValue); AWS_QUICKSIGHT_API AssetBundleImportJobDataSourceCredentials& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_QUICKSIGHT_API Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>A username and password credential pair to be used to create the imported * data source. Keep this field blank if you are using a Secrets Manager secret to * provide credentials.</p> */ inline const AssetBundleImportJobDataSourceCredentialPair& GetCredentialPair() const{ return m_credentialPair; } /** * <p>A username and password credential pair to be used to create the imported * data source. Keep this field blank if you are using a Secrets Manager secret to * provide credentials.</p> */ inline bool CredentialPairHasBeenSet() const { return m_credentialPairHasBeenSet; } /** * <p>A username and password credential pair to be used to create the imported * data source. Keep this field blank if you are using a Secrets Manager secret to * provide credentials.</p> */ inline void SetCredentialPair(const AssetBundleImportJobDataSourceCredentialPair& value) { m_credentialPairHasBeenSet = true; m_credentialPair = value; } /** * <p>A username and password credential pair to be used to create the imported * data source. Keep this field blank if you are using a Secrets Manager secret to * provide credentials.</p> */ inline void SetCredentialPair(AssetBundleImportJobDataSourceCredentialPair&& value) { m_credentialPairHasBeenSet = true; m_credentialPair = std::move(value); } /** * <p>A username and password credential pair to be used to create the imported * data source. Keep this field blank if you are using a Secrets Manager secret to * provide credentials.</p> */ inline AssetBundleImportJobDataSourceCredentials& WithCredentialPair(const AssetBundleImportJobDataSourceCredentialPair& value) { SetCredentialPair(value); return *this;} /** * <p>A username and password credential pair to be used to create the imported * data source. Keep this field blank if you are using a Secrets Manager secret to * provide credentials.</p> */ inline AssetBundleImportJobDataSourceCredentials& WithCredentialPair(AssetBundleImportJobDataSourceCredentialPair&& value) { SetCredentialPair(std::move(value)); return *this;} /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline const Aws::String& GetSecretArn() const{ return m_secretArn; } /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline bool SecretArnHasBeenSet() const { return m_secretArnHasBeenSet; } /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline void SetSecretArn(const Aws::String& value) { m_secretArnHasBeenSet = true; m_secretArn = value; } /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline void SetSecretArn(Aws::String&& value) { m_secretArnHasBeenSet = true; m_secretArn = std::move(value); } /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline void SetSecretArn(const char* value) { m_secretArnHasBeenSet = true; m_secretArn.assign(value); } /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline AssetBundleImportJobDataSourceCredentials& WithSecretArn(const Aws::String& value) { SetSecretArn(value); return *this;} /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline AssetBundleImportJobDataSourceCredentials& WithSecretArn(Aws::String&& value) { SetSecretArn(std::move(value)); return *this;} /** * <p>The ARN of the Secrets Manager secret that's used to create the imported data * source. Keep this field blank, unless you are using a secret in place of a * credential pair.</p> */ inline AssetBundleImportJobDataSourceCredentials& WithSecretArn(const char* value) { SetSecretArn(value); return *this;} private: AssetBundleImportJobDataSourceCredentialPair m_credentialPair; bool m_credentialPairHasBeenSet = false; Aws::String m_secretArn; bool m_secretArnHasBeenSet = false; }; } // namespace Model } // namespace QuickSight } // namespace Aws
8b5176a991b9334df1802d695a6b35e9e5e25a8f
0c72cf0b8157c54f455b39093b28105d3885afeb
/Project1/Project1/linked_list.cpp
0ca4b317d19e5643b51f8f24ccb4c5ca90185174
[]
no_license
Siusarna/Lab3
20672c71c5e0fff5e04ee306719a1dc98c0d8770
b7fc01d21cfda007d1ea17b4127df04165bf0ab2
refs/heads/master
2020-04-29T16:00:44.544353
2019-05-01T13:46:05
2019-05-01T13:46:05
176,239,462
0
0
null
null
null
null
UTF-8
C++
false
false
582
cpp
linked_list.cpp
#include <string> #include "parce_word_value.h" #include <iostream> #include "Linked_list.h" using namespace std; void Linked_List::add(string value) { node *tmp = new node; tmp->data = value; tmp->next = tail; tail = tmp; count++; } void Linked_List::search(string word) { node *elem = tail; while (elem) { if (parce(elem->data) == word) { cout << elem->data << endl; return; } elem = elem->next; } cout << "I cant find this word" << endl; } int Linked_List::size() { return count; } string Linked_List::head() { node *elem = tail; return elem->data; }
43c8b01b2711d4f210ea5748d72afb0f9eb6f149
b9fb7419a2207d0eb48246b23d28d166826aa9ba
/src/ui/components/Dialogs.h
223d6fcaed8c5f277833feedc7165cfa3ed4f19f
[]
no_license
Aquietzero/Graphic-Processor
0d03a509f0d879cba21581b7b9a5b36ee6fb7157
aa123dcf6ca3daec946da68bb96febf07d5da959
refs/heads/master
2020-05-01T13:24:57.169611
2012-09-27T16:39:16
2012-09-27T16:39:16
2,591,940
0
0
null
null
null
null
UTF-8
C++
false
false
2,339
h
Dialogs.h
#ifndef DIALOGS_H #define DIALOGS_H #include <QDialog> class QSpinBox; class QSlider; class QDoubleSpinBox; class QLabel; class QPushButton; class QLineEdit; class GaussianNoiseDialog : public QDialog { Q_OBJECT; public: GaussianNoiseDialog(QDialog* parent = NULL); signals: void applySettings(int mean, int sd); void closeAndApplySettings(); void closeNotApplySettings(); public slots: void applyNotClose(); void closeAndApply(); void closeNotApply(); private: QPushButton* apply; QPushButton* done; QPushButton* cancel; QSpinBox* meanBox; QSpinBox* sdBox; }; class ImpulseNoiseDialog : public QDialog { Q_OBJECT; public: ImpulseNoiseDialog(QDialog* parent = NULL); signals: void applySettings(double pa, double pb); void closeAndApplySettings(); void closeNotApplySettings(); public slots: void applyNotClose(); void closeAndApply(); void closeNotApply(); private: QPushButton* apply; QPushButton* done; QPushButton* cancel; QDoubleSpinBox* paBox; QDoubleSpinBox* pbBox; }; class SpatialFilteringDialog : public QDialog { Q_OBJECT; public: SpatialFilteringDialog(QDialog* parent = NULL); signals: void applySettings(int** filter); void closeAndApplySettings(); void closeNotApplySettings(); public slots: void applyNotClose(); void closeAndApply(); void closeNotApply(); private: QPushButton* apply; QPushButton* done; QPushButton* cancel; QLineEdit** filterEntries; }; class ColorExtractDialog : public QDialog { Q_OBJECT; public: ColorExtractDialog(QDialog* parent = NULL); signals: void applySettings(int r, int g, int b, int range); void closeAndApplySettings(); void closeNotApplySettings(); public slots: void applyNotClose(); void closeAndApply(); void closeNotApply(); private slots: void setRedValue(int); void setGreenValue(int); void setBlueValue(int); void setRangeValue(int); private: QPushButton* apply; QPushButton* done; QPushButton* cancel; QLabel* redValue; QLabel* greenValue; QLabel* blueValue; QLabel* rangeValue; QSlider* redComponent; QSlider* greenComponent; QSlider* blueComponent; QSlider* rangeComponent; }; #endif
4d71c7a093d204ea3fa1f6e3f6e696b1a7090cfb
e8c38d553008826199e9dad08f2ea78ed52ac1f5
/src/util/Path.cpp
e88866c0bd288dda639b138eadb3b199fd3dd455
[]
no_license
QlowB/qlow
f6851f533f83176cd2ce9508262d4581fccea7b6
5f3b47ca22f93df07e62b34838b838c2b9aed847
refs/heads/master
2023-03-16T16:53:46.021791
2021-02-28T23:12:18
2021-02-28T23:12:18
343,438,397
0
0
null
null
null
null
UTF-8
C++
false
false
1,521
cpp
Path.cpp
#include "Path.h" using qlow::util::Path; #ifdef QLOW_TARGET_WINDOWS const std::string Path::dirSeparators = "\\/"; const std::string Path::defaultDirSeparator = "\\"; #else const std::string Path::dirSeparators = "/"; const std::string Path::defaultDirSeparator = "/"; #endif void Path::append(const Path& other) { if (!endsWithSeparator()) path += defaultDirSeparator; path += other.path; } Path Path::parentPath(void) const { Path parent = *this; if (parent.path == defaultDirSeparator) return parent; if (parent.endsWithSeparator()) { parent.path.pop_back(); return parent; } if (parent.path.find(defaultDirSeparator) == std::string::npos) { return ""; } while (!parent.endsWithSeparator()) { parent.path.pop_back(); } if (parent.path.size() >= 2 && parent.endsWithSeparator()) parent.path.pop_back(); return parent; } Path Path::operator+(const std::string& op) const { Path r = *this; r.path += op; return r; } Path::operator const std::string&(void) const { return path; } const std::string& Path::string(void) const { return path; } const char* Path::c_str(void) const { return path.c_str(); } bool Path::endsWithSeparator(void) const { return !path.empty() && dirSeparators.find(path[path.size() - 1]) != std::string::npos; /*return path.size() >= dirSeparator.size() && std::equal(dirSeparator.rbegin(), dirSeparator.rend(), path.rbegin());*/ }
7201781a24d5c8689524780f8a56e228cdc4743b
84a3ea32b41ccef68f1425a5edddfc1efb9a3013
/src/common/bytes.hpp
a5d8a58e80bd627ea348062f62c1435fbb394646
[ "MIT" ]
permissive
0xd34d10cc/shar
bb8624207a61eb25772e1ff81d764bffe94bd4cd
df9accc3ae8f9a8405c9b80eebab3e1b050eebc8
refs/heads/master
2022-05-24T06:39:29.168605
2022-03-30T18:39:56
2022-03-30T18:39:56
130,477,683
6
3
MIT
2022-03-19T16:21:59
2018-04-21T13:45:22
C++
UTF-8
C++
false
false
2,129
hpp
bytes.hpp
#pragma once #include "bytes_ref.hpp" #include "int.hpp" #include <cassert> // assert #include <memory> // std::shared_ptr #include <vector> namespace shar { // non-owning (for now) const reference to bytes // TODO: port https://github.com/tokio-rs/bytes to C++ class Bytes { public: Bytes() noexcept = default; Bytes(const u8* ptr, usize len) noexcept : m_data(std::make_shared<std::vector<u8>>(ptr, ptr + len)) {} Bytes(const char* p, usize l) noexcept : Bytes(reinterpret_cast<const u8*>(p), l) {} Bytes(const char* s) noexcept : Bytes(s, std::strlen(s)) {} Bytes(const char* start, const char* end) noexcept : Bytes(start, static_cast<usize>(end - start)) {} Bytes(const u8* start, const u8* end) noexcept : Bytes(start, static_cast<usize>(end - start)) {} BytesRef ref() const noexcept { return BytesRef(ptr(), len()); } bool empty() const noexcept { return ref().empty(); } bool operator==(const Bytes& bytes) const noexcept { return ref() == bytes.ref(); } bool operator!=(const Bytes& bytes) const noexcept { return !(*this == bytes); } Bytes slice(usize from, usize to) const noexcept { assert(from <= to); assert(to <= len()); return Bytes(ptr() + from, ptr() + to); } bool starts_with(BytesRef bytes) const noexcept { return ref().starts_with(bytes); } const u8* find(u8 byte) const noexcept { return ref().find(byte); } const u8* begin() const noexcept { return ptr(); } const u8* end() const noexcept { return ptr() + len(); } const u8* ptr() const noexcept { return m_data ? m_data->data() : nullptr; } usize len() const noexcept { return m_data ? m_data->size() : 0; } usize capacity() const noexcept { return m_data ? m_data->capacity() : 0; } const char* char_ptr() const { return reinterpret_cast<const char*>(ptr()); } private: // TODO: use custom buffer type instead of vector (for realloc) std::shared_ptr<std::vector<u8>> m_data; }; } // namespace shar inline shar::Bytes operator"" _b(const char* s) { return shar::Bytes{s}; }
d08d57de44a12bb01b2ea427756c192d38448b7c
574063c8c08ee55c75bf621cab75bacdd6db3fcc
/Lux/Lux/Source/LuxRigidBody.cpp
491b9f18bc26a7cff0ee2f1f146ceab75c2ddff8
[]
no_license
SiChiTong/Lux
1e0032545ca97a786af1dacf09ade834b1952bd0
76eea6a9e8a6a541558f9f5fdd0005c225752da4
refs/heads/master
2020-03-27T17:37:49.618446
2015-07-18T23:44:30
2015-07-18T23:44:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
605
cpp
LuxRigidBody.cpp
#include "LuxPCH.h" #include "LuxRigidBody.h" Lux::Physics::RigidBody::RigidBody() : Component(), m_Properties(nullptr) { m_Type = RigidBodyType::RIGID_BODY_STATIC; } Lux::Physics::RigidBody::~RigidBody() { } void Lux::Physics::RigidBody::Reset() { if (m_Properties) { m_Properties->release(); m_Properties = nullptr; } m_Material.release(); m_Type = RIGID_BODY_STATIC; } void Lux::Physics::RigidBody::SetPhysicsMaterial(Core::ObserverPtr<Core::PhysicsMaterial>& a_Material) { m_Material.reset(a_Material.get()); m_MessageManager->BroadcastMessage(MSG_PHYS_MAT_SET, a_Material.get()); }
7e8a14050e29c27985d27e3c402e10c44cfc3abe
05ccddf9b6d72a3a130c4b2b4a120868ffc708ed
/coding ninjas/competetive_programming/prerequisites/Total_Sum_on_the_Boundaries_and_Diagonal.cpp
c3c3444791036f6815eb63feed68d0174bb8a0d4
[]
no_license
Aakashdeep954/DS-ALGO
557908873d110acfeeb21464a22d58730c555a1c
2314ef72d6aee9d1d5c578a9ead34e8e715e1991
refs/heads/main
2023-03-29T10:42:50.130859
2021-04-01T23:36:28
2021-04-01T23:36:28
332,577,473
0
0
null
null
null
null
UTF-8
C++
false
false
1,040
cpp
Total_Sum_on_the_Boundaries_and_Diagonal.cpp
#include <iostream> using namespace std; #include "solution.h" int totalSum(int **arr, int n) { //Write your code here int sum=0; for(int j=0;j<n;j++){ sum = sum+arr[0][j]; } for(int j=1;j<n;j++){ sum = sum+arr[j][n-1]; } for(int j=n-2;j>=0;j--){ sum = sum+arr[n-1][j]; } for(int j=1;j<n-1;j++){ sum = sum+arr[j][0]; } int i=1; int j=1; while(i!=n-1 && j!=n-1 && n>1){ sum = sum + arr[i][j]; i++; j++; } i=1; j=n-2; while(i!=n-1 && j!=n-1 && n>1){ sum = sum + arr[i][j]; i++; j--; } if(n%2!=0){ sum = sum-arr[n/2][n/2]; } return sum; } int main() { int t; cin >> t; while (t--) { int n; cin >> n; int** arr = new int*[n]; for (int i = 0; i < n; i++) { arr[i] = new int[n]; for (int j = 0; j < n; j++) { cin >> arr[i][j]; } } cout << totalSum(arr, n) << endl; } }
5c4410dff8b91d08a3064eb6f01819dd3e76a1e1
d4abbeaa723e5857721d4bf45409903113e007b0
/64_Manacher.cpp
14ebcbefa879ecc5da4ff566494df4d1a75a200b
[]
no_license
Wishyou2021/algorithm
6ff740df09166c3bad97124070fac209497c7f16
c22c0a052003764ce6d2c8213da22bd5ad9c155a
refs/heads/master
2023-03-15T21:33:26.345357
2019-10-14T14:34:53
2019-10-14T14:34:53
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,810
cpp
64_Manacher.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int maxLcpsLength(string &str) { if (str.size() == 0) { return 0; } string charArr = "#"; for (int i = 0; i < str.size(); ++i) { charArr += str[i]; charArr += "#"; } vector<int> pArr(charArr.size()); // 回文半径数组 int pR = -1; // 回文半径即将到达的位置 int index = -1; // 取得最右边界时的回文中心 int myMax = INT_MIN; for (int i = 0; i != charArr.size(); i++) { // 每个回文的中心, 这里i不能是size_t类型, 否则下面min中类型匹配有问题 // (1) i不在回文在回文右边界, 暴力扩 // (2) i在回文半径内, i的对称点i'的回文半径在当前回文左边界内, pArr[i] = pArr[2 * index - i] // (3) i在回文半径内, i的对称点i'的回文半径在当前回文左边界外, pArr[i] = pR - i // (4) i在回文半径内, i的对称点i'的回文半径当前回文左边界重合, 两边不确定, 暴力扩 /* pR > i表示i在回文右边界里面 2 * index - i 对称点i'位置 */ pArr[i] = pR > i ? min(pArr[2 * index - i], pR - i) : 1; // 情况2与情况3 /* i+pArr[i] < charArr.size()验证右区域没越界, i - pArr[i] > -1验证左边区域也没越界 */ while (i + pArr[i] < charArr.size() && i - pArr[i] > -1) { if (charArr[i + pArr[i]] == charArr[i - pArr[i]]) // 情况1与情况4都会向外暴力扩, 判断下一位两边字符是否相同 pArr[i]++; // 情况1只会扩一个, 情况4可能会扩多个 else { // 情况2与情况3不会外扩 break; } } if (i + pArr[i] > pR) { pR = i + pArr[i]; index = i; } myMax = max(myMax, pArr[i]); /* 下面注释可以去掉 */ //if (pR == charArr.size()) { // break; //} } return myMax - 1; } int main() { string s1 = "12212"; cout << s1.c_str() << endl; cout << maxLcpsLength(s1) << endl; cout << "=======================" << endl; string s2 = "122122"; cout << s2.c_str() << endl; cout << maxLcpsLength(s2) << endl; cout << "=======================" << endl; string s3 = "waabwswfd"; cout << s3.c_str() << endl; cout << maxLcpsLength(s3) << endl; cout << "=======================" << endl; string s4 = "waabwswfdswbaaw"; cout << s4.c_str() << endl; cout << maxLcpsLength(s4) << endl; return 0; }
d17e54709af6446c0e90e9a1250cdef171ae2d71
2f51cf75094feaae1bbada78e1e00e410163f1cf
/src/system/gen/php/classes/stdclass.cpp
c15fcacc1dbb8d84054513b03010640c33a2714a
[ "Zend-2.0", "LicenseRef-scancode-unknown-license-reference", "PHP-3.01" ]
permissive
burhan/hiphop-php
44d7d7df0539bfeb2ce598ec060367557a42989c
6e02d7072a02fbaad1856878c2515e35f7e529f0
refs/heads/master
2021-01-18T07:53:36.815101
2012-10-01T20:08:41
2012-10-02T02:37:57
6,041,737
0
0
NOASSERTION
2020-02-07T21:30:31
2012-10-02T07:51:18
C++
UTF-8
C++
false
false
3,740
cpp
stdclass.cpp
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ // @generated by HipHop Compiler #include <runtime/base/hphp_system.h> #include <system/gen/sys/literal_strings_remap.h> #include <system/gen/sys/scalar_arrays_remap.h> #include <php/classes/stdclass.fws.h> #include <php/classes/stdclass.h> // Dependencies #include <runtime/ext/ext.h> #include <runtime/eval/eval.h> namespace hphp_impl_starter {} namespace HPHP { /////////////////////////////////////////////////////////////////////////////// /* preface starts */ /* preface finishes */ /* SRC: classes/stdclass.php line 8 */ IMPLEMENT_CLASS_NO_DEFAULT_SWEEP(__PHP_Incomplete_Class) extern const InstanceOfInfo cw___PHP_Incomplete_Class$$instanceof_table[] = { {0x4C092234,1,"__PHP_Incomplete_Class",&cw___PHP_Incomplete_Class}, }; const int cw___PHP_Incomplete_Class$$instanceof_index[] = { 1, 0,-1, }; extern const InstanceOfInfo cw___PHP_Incomplete_Class$$instanceof_table[]; extern const int cw___PHP_Incomplete_Class$$instanceof_index[]; const ObjectStaticCallbacks cw___PHP_Incomplete_Class = { (ObjectData*(*)(ObjectData*))coo___PHP_Incomplete_Class, 0,0, cw___PHP_Incomplete_Class$$instanceof_table,cw___PHP_Incomplete_Class$$instanceof_index, &c___PHP_Incomplete_Class::s_class_name, &c___PHP_Incomplete_Class::os_prop_table,0,0,0,0x0, &c___PHP_Incomplete_Class::s_cls }; /* SRC: classes/stdclass.php line 4 */ IMPLEMENT_CLASS_NO_DEFAULT_SWEEP(stdClass) extern const InstanceOfInfo cw_stdClass$$instanceof_table[] = { {0x5D130102,1,"stdClass",&cw_stdClass}, }; const int cw_stdClass$$instanceof_index[] = { 1, 0,-1, }; extern const InstanceOfInfo cw_stdClass$$instanceof_table[]; extern const int cw_stdClass$$instanceof_index[]; const ObjectStaticCallbacks cw_stdClass = { (ObjectData*(*)(ObjectData*))coo_stdClass, 0,0, cw_stdClass$$instanceof_table,cw_stdClass$$instanceof_index, &c_stdClass::s_class_name, 0,0,0,0,0x0, &c_stdClass::s_cls }; ObjectData *coo___PHP_Incomplete_Class() { return NEWOBJ(c___PHP_Incomplete_Class)(); } ObjectData *coo_stdClass() { return NEWOBJ(c_stdClass)(); } // Class tables static const int64 cpt_static_inits[] = { (int64)&null_variant, }; static const ClassPropTableEntry cpt_table_entries[] = { {0x34777511,0,0,0,68,-1,GET_PROPERTY_OFFSET(c___PHP_Incomplete_Class, m___PHP_Incomplete_Class_Name),&NAMSTR(s_sys_ss7972d4b1, "__PHP_Incomplete_Class_Name") }, }; static const int cpt_hash_entries[] = { // __PHP_Incomplete_Class hash -1,0,-1,-1,-1,-1,-1,-1, // __PHP_Incomplete_Class lists -1, -1, -1, }; const ClassPropTable c___PHP_Incomplete_Class::os_prop_table = { 7,0,-1,-1,-1,-1,9,0, cpt_hash_entries+0,0,cpt_table_entries+0,cpt_static_inits }; /////////////////////////////////////////////////////////////////////////////// }
8b00836950172a21fbc0a99e90d5b5948374e047
21f9afd5bdb78afe1eca3a639d0327a05f6e5ca9
/MainWindow.cpp
0579ebbe1c862e1d9329e91810da68758a339670
[ "MIT" ]
permissive
mdombroski/luaeditor
c65d7a356212a4dade1a72b9719a051bfcf371af
81460d722766b03ae36a3b74ed39aed0b322c855
refs/heads/master
2020-12-25T16:47:44.978100
2016-09-10T09:05:03
2016-09-10T09:05:03
67,861,194
2
2
null
null
null
null
UTF-8
C++
false
false
504
cpp
MainWindow.cpp
#include "MainWindow.h" #include "ui_MainWindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); connect( ui->luaForm, &LuaForm::filename, [this](QString const& msg){ ui->statusbar->showMessage( msg ); } ); } MainWindow::~MainWindow() { delete ui; } void MainWindow::changeEvent(QEvent *e) { QMainWindow::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: ui->retranslateUi(this); break; default: break; } }
75b351539706ca533ec3bccf61096f320445bd8e
315f9ba9220bb4f08346499e9f789ccb310edebc
/modules/tree/test/tree.t.cpp
b952da59d5ff49d0baf4f33b872becb8b0fcd45f
[]
no_license
iikkaolli/data
8beaf7f8a9c9fd1f2d2160bd4162833798f6dabb
e4e1b2d283efd08f71a396724fa04d261470b4c4
refs/heads/master
2020-05-21T08:47:39.772491
2016-11-26T10:28:44
2016-11-26T10:28:44
69,089,114
0
0
null
null
null
null
UTF-8
C++
false
false
109
cpp
tree.t.cpp
#include <gtest/gtest.h> #include "tree.hpp" TEST(TREE_basic_test, first) { ASSERT_TRUE(true); }
44bbafe36a0245e82cb1c91448c764ff0c0fd5a6
2d2f20996f59c75a5ed41fad019bc44d1735d0f5
/impressionist/lineBrush.h
217bda2fa99fb9ca976690a725c001e4548f20bf
[]
no_license
kbarnes3/CSEP557
0bff887657e87846e65a23d767503935dd47fe5f
a644d6460e715b6963fdea81496ef7546c3d9ca5
refs/heads/master
2016-09-10T20:08:43.225395
2014-10-12T23:52:16
2014-10-12T23:52:16
24,337,107
0
0
null
null
null
null
UTF-8
C++
false
false
526
h
lineBrush.h
#pragma once #include "impBrush.h" class LineBrush : public ImpBrush { public: LineBrush( ImpressionistDoc* pDoc = NULL, char* name = NULL ); void BrushBegin( const Point source, const Point target ); void BrushMove( const Point source, const Point target ); void BrushEnd( const Point source, const Point target ); char* BrushName( void ); static void DrawLine(_In_ const ImpressionistDoc* pDoc, _In_ const Point source, _In_ const Point target, _In_ int size, _In_ int angle); };
aeb05f5161426211ccea0f6afeda69c1b358a278
6ae1c70d41409be20390f01fc85839c0f1f1c0ec
/Assignment04-1.cpp
8b5f6d877643ddbbcd38efc055094d43468d3467
[ "MIT" ]
permissive
gcald/cpsc240-assembly
d67af61574212b4a03d84229ee222ab333ab82f7
0d3be03a0380f636cbf1c83c4ce38a214ed59c64
refs/heads/master
2021-07-12T10:38:33.460006
2017-10-12T06:37:02
2017-10-12T06:37:02
105,097,463
0
0
null
null
null
null
UTF-8
C++
false
false
1,541
cpp
Assignment04-1.cpp
////Project No.4 Problem 01 George Calderon // //#include <iostream> //using std::cin; //using std::cout; //using std::endl; // //char c; //int yesCount; //int noCount; //int yLoop = 0; //int nLoop = 0; // //void drawStar() { // cout << '*'; //} // //void endLine() { // cout << endl; //} // //void getChar() { // cin.get(c); //} // //void printYCount() { // cout << " No. of YES votes = " << yesCount << " = "; //} // //void printNCount() { // cout << " No. of NO votes = " << noCount << " = "; //} // //int main() { // cout << "Enter a string of votes: "; // // _asm { // whileLoop: // call getChar; // mov al, c; // cmp al, 'y'; // je countYes; // cmp al, 'n'; // je countNo; // cmp c, '\n'; // When enter is pressed, jump to done. // je printY; // jmp whileLoop; // countYes: // Increments 'y' counter for later loop. // inc yesCount; // jmp whileLoop; // countNo: // Increments 'n' counter for later loop. // inc noCount; // jmp whileLoop; // printY: // call printYCount; // loopY: // Loops until yLoop(initialized at 0) equals yesCount. // mov eax, yLoop; // cmp eax, yesCount; // je printN; // call drawStar; // inc yLoop; // jmp loopY; // printN: // call endLine; // call printNCount; // loopN: // Loops until nLoop(initialized at 0) equals noCount. // mov eax, nLoop; // cmp eax, noCount; // je done; // call drawStar; // inc nLoop; // jmp loopN; // // done: // call endLine; // } // // system("PAUSE"); // return 0; //}
97be9aba6c080bd9922d07d5e2036830b44feb4c
8cc4f1514f89ca2f04cda3aab8818ca47c649862
/BOJ/그래프/10451_순열사이클.cpp
0433e4246a65d79ed8e8bfe046344585c8c86e2f
[]
no_license
ehdgus8077/algorithm
8f3150503dde9031763f1a700fc11728d6cc847c
bd2d9d0c83bea476ca32b4a2619fb591c5c916f1
refs/heads/master
2021-01-23T02:16:32.969791
2019-04-06T06:12:03
2019-04-06T06:12:03
102,437,594
0
0
null
null
null
null
UHC
C++
false
false
1,557
cpp
10451_순열사이클.cpp
#include <cstdio> #include <stack> #include <vector> #define Max 1001 using namespace std; /* 문제 요약: 순열 사이클의 개수를 구한다. 순열을 입력받으면 순서대로 1부터 순열개수까지 간선을 이어 그래프를 만든다. 그래프에는 정점과 간선의 개수가 같고, 모든 정점은 연결이 되있다. 한 그래프에 두개의 순열 사이클이 존재 하지 않는다. 1. 양방향으로 인접 리스트를 만든다. 연결요소의 개수가 사이클의 개수다. */ vector<int> adj[Max]; int DFS_visit[Max]; void DFS(int start){ stack<int> Stack; Stack.push(start); while(!Stack.empty()){ int vertex = Stack.top(); Stack.pop(); if(DFS_visit[vertex]) continue; DFS_visit[vertex] = true; for (int i = 0 ; i <adj[vertex].size(); i++){ if(!DFS_visit[adj[vertex][i]]){ Stack.push(adj[vertex][i]); } } } } int main(){ int test_count,edge_count,value,count; scanf("%d",&test_count); while(test_count--){ count = 0; scanf("%d",&edge_count); for( int i = 1 ; i <= edge_count ; i++){ DFS_visit[i]=0; adj[i].clear(); scanf("%d",&value); adj[i].push_back(value); adj[value].push_back(i); } for (int i = 1 ; i <= edge_count ;i++) { if(!DFS_visit[i]){ DFS(i); count++; } } printf("%d\n",count); } return 0; }
053be575b470963f5bbc74fae9b4d634a3d3d9fc
c41cbb3cfa514e10cf726d9d338a15b340f05d84
/.adev/rouge/sys/mem_test_system.cpp
9fad01f802be5f85eb199fe42fb9624d94759517
[]
no_license
astrellon/GPP
e9c432afbd3d0401ee0fddfed5ffad77a5b26e8e
d3ba5f9339051acbfb507fe489443f454459f27c
refs/heads/master
2021-01-25T05:28:11.823329
2013-07-08T12:53:25
2013-07-08T12:53:25
1,505,792
0
0
null
null
null
null
UTF-8
C++
false
false
2,467
cpp
mem_test_system.cpp
#include "mem_test_system.h" #include <gfx/gfx_engine.h> #include <gfx/gfx_text_list.h> #include <gfx/gfx_asset.h> #include <gfx/gfx_text_field2.h> using namespace am::gfx; #include <game/game.h> #include <game/engine.h> #include <game/tile_type.h> namespace am { namespace sys { MemoryTestSystem *MemoryTestSystem::sMemorySystem = NULL; MemoryTestSystem *MemoryTestSystem::createMemoryTestSystem(ISystem *linked, Engine *engine) { sGameSystem = sMemorySystem = new MemoryTestSystem(linked, engine); return sMemorySystem; } MemoryTestSystem *MemoryTestSystem::getMemoryTestSystem() { return sMemorySystem; } MemoryTestSystem::MemoryTestSystem(ISystem *linked, Engine *engine) : GameSystem(linked, engine) { } MemoryTestSystem::~MemoryTestSystem() { } void MemoryTestSystem::init() { GameSystem::init(); TextStyle::loadStylesLua("data/textStyles.lua"); TileType::loadStandardTileTypesLua("data/tileTypes.lua"); GfxEngine *gfxEngine = GfxEngine::getEngine(); mDebugConsole->setMaxEntries(100); mDebugConsole->setVisible(true); Handle<TextField2> testText(new TextField2()); testText->setText("Hello there <gameobj class='character'>Melli</gameobj>"); gfxEngine->getUILayer()->addChild(testText); testText->setPosition(200.0f, 100.0f); { Engine *eng = Engine::getEngine(); Handle<Game> game(new Game()); eng->setCurrentGame(game); game->addDialogue(new Dialogue("diag1", "Test text")); game->addDialogue(new Dialogue("diag2", "Test text 2")); Handle<Map> map(game->getMapLua("testMap")); game->setCurrentMap(map); //Handle<Map> map(new Map("testMap", 4, 4)); //game->setCurrentMap(map); Handle<Character> mainChar(new Character()); mainChar->setName("Melli"); game->setMainCharacter(mainChar); game->registerGameObject(mainChar); game->addGameObjectToMap(mainChar); Handle<Character> npc(new Character()); npc->setName("Townsman"); game->registerGameObject(npc); game->addGameObjectToMap(npc); Handle<Item> sword(new Item()); sword->setItemFullname("Sword", "Iron", "of stab"); sword->setItemType(ItemCommon::SWORD); sword->getStatModifiers().addStatModifier(Stat::MAX_DAMAGE, StatModifier(5.0f, MOD_ADD)); sword->getStatModifiers().addStatModifier(Stat::MIN_DAMAGE, StatModifier(3.0f, MOD_ADD)); game->addGameObjectToMap(sword); } { Handle<Game> game2(new Game()); Engine::getEngine()->setCurrentGame(game2); } } } }
6234d97e3b9af8bac254b062124ba676d4915bfd
cf90c92f942851c8ded963a03e6b4066e4c2968d
/砝码组合.cpp
8c5a0f2f5586309d3818a69434b4fb0d60fa1ba5
[]
no_license
YiMoFan/lanqiaobeixunlian
90cf4c8a0521d13908d88bf479c018d42dbc097a
47c5b009757043c74f931be606094e3cb8742924
refs/heads/master
2020-04-01T21:05:33.856522
2018-10-18T14:24:47
2018-10-18T14:24:47
null
0
0
null
null
null
null
GB18030
C++
false
false
2,685
cpp
砝码组合.cpp
/*题目内容: 用天平称重时,我们希望用尽可能少的砝码组合称出尽可能多的重量。 如果只有5个砝码,重量分别是1,3,9,27,81。 则它们可以组合称出1到121之间任意整数重量(砝码允许放在左右两个盘中)。 本题目要求编程实现:对用户输入的重量(1~121), 给出砝码组合方案(用加减式表示,减代表砝码放在物品盘)。 例如: 输入: 5 输出: 9-3-1 输入: 19 输出: 27-9+1 要求程序输出的组合总是大数在前小数在后。 输入描述 用户输入的重量(1~121), 输出描述 给出砝码组合方案(用加减式表示,减代表砝码放在物品盘)。 输入样例 19 输出样例 27-9+1 */ #include <stdio.h> int main() { int a[] = {-1,0,1}; int b[] = {-3,0,3}; int c[] = {-9,0,9}; int d[] = {-27,0,27}; int e[] = {-81,0,81}; int q,w,z,r,t; int n; int flag = 0; scanf ("%d",&n); for (q = 0; q < 3; q++) for (w = 0; w < 3; w++) for (z = 0; z < 3; z++) for (r = 0; r < 3; r++) for (t = 0; t < 3; t++) if (a[q] + b[w] + c[z] + d[r] + e[t] == n){ if (e[t] != 0) { if (e[t] > 0 && flag != 0) printf ("+"); printf ("%d",e[t]); flag = 1; } if (d[r] != 0) { if (d[r] > 0 && flag != 0) printf ("+"); printf ("%d",d[r]); flag = 1; } if (c[z]!=0) { if (c[z] > 0 && flag != 0) printf ("+"); printf ("%d",c[z]); flag = 1; } if (b[w] != 0) { if (b[w] > 0 && flag != 0) printf ("+"); printf ("%d",b[w]); flag = 1; } if (a[q]!=0) { if (a[q] > 0 && flag != 0) printf ("+"); printf ("%d",a[q]); } } return 0; }
627554e1523ccba359582567e17cf71c71325400
0dfeeb0c5cac100e529eea9858ba17ee147e18e7
/SzaboCpp/geom.h
9e7450b80c6e40f481d27e727cdfaf83912a9a88
[]
no_license
xyttyxy/TheoChem
62935c7ece6bbd55f342f82437d7440d9f493979
dbaf40c7383489936aeeb089fffda7e869860c85
refs/heads/master
2020-07-17T06:14:56.164329
2019-09-04T03:46:51
2019-09-04T03:46:51
205,964,501
0
0
null
null
null
null
UTF-8
C++
false
false
1,809
h
geom.h
#pragma once #include "pch.h" class Element { public: Element(); Element(std::string symbol, unsigned int elemIndex, double mass, unsigned int valence); //Modifiers void setSymbol(std::string symbol) { this->symbol_ = symbol; } void setElemIndex(unsigned int elemIndex) { this->elemIndex_ = elemIndex; } void setMass(double mass) { this->mass_ = mass; } void setValence(unsigned int valence) { this->valence_ = valence; } //Accessors std::string getSymbol() { return symbol_; } unsigned int getElemIndex() { return elemIndex_; } double getMass() { return mass_; } unsigned int getValence() { return valence_; } private: std::string symbol_; unsigned int elemIndex_; double mass_; unsigned int valence_; }; class PeriodicTable { public: PeriodicTable(); unsigned int symbolToIndex(std::string symbol); Element getElement(std::string symbol); private: std::map<std::string, Element> table_; void sym2idx_init(); void table_init(); }; class Atom : public Element { public: Atom() { coords_ = { 0,0,0 }; forces_ = { 0,0,0 }; } Atom(PeriodicTable &ptable, std::string symbol, std::array<double, 3> coords, std::array<double, 3> forces = std::array<double, 3>{0, 0, 0}); private: std::array<double, 3> coords_; std::array<double, 3> forces_; }; class Atoms { public: Atoms(); void addAtom(Atom atom); void removeAtom(int atom_index); void setUnitCell(double xAxis, double yAxis, double zAxis); //stubs void setUnitCell(std::array<std::array<double, 3>, 3> unitCell) {} void setUnitCell(double unitCell[3][3]) {} void setUnitCell(double unitCell[3]) {} int getAtomCount() { return this->atoms_.size(); } Atom getAtom(int atom_index) { return atoms_[atom_index]; } private: std::vector<Atom> atoms_; std::array<std::array<double, 3>, 3> unitCell_; bool isPBC; };
45b42a71c4d59d3744ed543cdad5268c6bdeaa52
1249fa760c5da0c7fca714380cb0f0671d637718
/beowolf/graphics/QuadTree.cpp
5b423b93812891970b36f01787f85b4895248aa2
[ "MIT" ]
permissive
naturalnumber/Beowolf-Engine
1b58883aaed5eec45c01512398d94aa7109cc777
b7ad1ed18ecb5ce7ca4e43d46ee96ed615300e85
refs/heads/master
2022-04-15T13:09:24.527328
2020-04-15T21:02:12
2020-04-15T21:02:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,487
cpp
QuadTree.cpp
#include "QuadTree.h" #include "W_ResourceLoader.h" namespace wolf { float clamp(float val, float min, float max) { if (val < min) return min; else if (val > max) return max; return val; } QuadTree::QuadTree(float xpos, float zpos, float width, float depth) { m_xpos = xpos; m_zpos = zpos; m_width = width; m_depth = depth; // points for debug rendering GLfloat points[] = { m_xpos, 0, m_zpos, m_xpos, 0, m_zpos + m_depth, m_xpos, 0, m_zpos, m_xpos + m_width, 0, m_zpos, m_xpos + m_width, 0, m_zpos + m_depth, m_xpos + m_width, 0, m_zpos, m_xpos + m_width, 0, m_zpos + m_depth, m_xpos, 0, m_zpos + m_depth, }; m_Program = ProgramManager::CreateProgram(wolf::ResourceLoader::Instance().getShaders("line")); m_VB = BufferManager::CreateVertexBuffer(points, sizeof(GLfloat) * 3 * 8); m_Decl = new VertexDeclaration(); m_Decl->Begin(); m_Decl->AppendAttribute(AT_Position, 3, CT_Float); m_Decl->SetVertexBuffer(m_VB); m_Decl->End(); } QuadTree::~QuadTree() { BufferManager::DestroyBuffer(m_VB); ProgramManager::DestroyProgram(m_Program); delete m_Decl; } bool QuadTree::AddNode(QuadTreeNode* child) { // check if node fully engulfs the quadtree if (isSphereEngulfing(child->node->getPos(), child->node->getCollisionRadius())) { m_bigNodes.push_back(child); return true; } // if the node isn't inside if (!IsSphereInside(child->node->getPos(), child->node->getCollisionRadius())) return false; // if there's already enough nodes, split into child trees if (m_nodes.size() >= 2 && m_children.size() == 0) { m_children.push_back(new QuadTree(m_xpos, m_zpos, m_width / 2, m_depth / 2)); m_children.push_back(new QuadTree(m_xpos + m_width / 2, m_zpos, m_width / 2, m_depth / 2)); m_children.push_back(new QuadTree(m_xpos + m_width / 2, m_zpos + m_depth / 2, m_width / 2, m_depth / 2)); m_children.push_back(new QuadTree(m_xpos, m_zpos + m_depth / 2, m_width / 2, m_depth / 2)); for (int i = 0; i < m_nodes.size(); i++) { for (int j = 0; j < m_children.size(); j++) { m_children[j]->AddNode(m_nodes[i]); } } m_nodes.clear(); } // if there are existing child trees if (m_children.size() == 4) { bool toret = false; for (int i = 0; i < m_children.size(); i++) toret |= m_children[i]->AddNode(child); return toret; } // all else fails, add to list of nodes m_nodes.push_back(child); } bool QuadTree::IsSphereInside(glm::vec3 point, float radius) { float closestX = clamp(point.x, m_xpos, m_xpos + m_width); float closestZ = clamp(point.z, m_zpos, m_zpos + m_depth); float distanceX = point.x - closestX; float distanceZ = point.z - closestZ; return (distanceX * distanceX) + (distanceZ * distanceZ) < (radius * radius); } bool QuadTree::isSphereEngulfing(glm::vec3 point, float radius) { return ((m_xpos - point.x)*(m_xpos - point.x) + (m_zpos - point.z)*(m_zpos - point.z) < radius*radius) && ((m_xpos + m_width - point.x)*(m_xpos + m_width - point.x) + (m_zpos - point.z)*(m_zpos - point.z) < radius*radius) && ((m_xpos - point.x)*(m_xpos - point.x) + (m_zpos + m_depth - point.z)*(m_zpos + m_depth - point.z) < radius*radius) && ((m_xpos + m_width - point.x)*(m_xpos + m_width - point.x) + (m_zpos + m_depth - point.z)*(m_zpos + m_depth - point.z) < radius*radius); } bool QuadTree::IsFrustumInside(Plane* frustum) { for (int i = 0; i < 6; i++) { // skip the top/bottom planes, because we don't care about height // this makes the assumption that the camera won't rotate if (i == 2) i += 2; // check each point of the square bool cur = glm::dot(glm::vec4(frustum[i].a, frustum[i].b, frustum[i].c, frustum[i].d), glm::vec4(m_xpos, 0, m_zpos, 1)) > 0; cur |= glm::dot(glm::vec4(frustum[i].a, frustum[i].b, frustum[i].c, frustum[i].d), glm::vec4(m_xpos + m_width, 0, m_zpos, 1)) > 0; cur |= glm::dot(glm::vec4(frustum[i].a, frustum[i].b, frustum[i].c, frustum[i].d), glm::vec4(m_xpos + m_width, 0, m_zpos + m_depth, 1)) > 0; cur |= glm::dot(glm::vec4(frustum[i].a, frustum[i].b, frustum[i].c, frustum[i].d), glm::vec4(m_xpos, 0, m_zpos + m_depth, 1)) > 0; // if all are out, none work if (!cur) return false; } return true; } std::vector<Node*> QuadTree::GetVisible(long currentRender, Plane* cull) { std::vector<Node*> nodes; if (!IsFrustumInside(cull)) return nodes; for (int i = 0; i < m_nodes.size(); i++) { if (m_nodes[i]->node->IsVisible(cull) && m_nodes[i]->lastRendered < currentRender) { m_nodes[i]->lastRendered = currentRender; nodes.push_back(m_nodes[i]->node); } } for (int i = 0; i < m_bigNodes.size(); i++) { if (m_bigNodes[i]->node->IsVisible(cull) && m_bigNodes[i]->lastRendered < currentRender) { m_bigNodes[i]->lastRendered = currentRender; nodes.push_back(m_bigNodes[i]->node); } } for (int i = 0; i < m_children.size(); i++) { std::vector<Node*> current = m_children[i]->GetVisible(currentRender, cull); for (int i = 0; i < current.size(); i++) nodes.push_back(current[i]); } return nodes; } void QuadTree::DebugRender(glm::mat4 projview) { // bind things m_Program->Bind(); m_Program->SetUniform("projection", projview); m_Decl->Bind(); // draw things glDrawArrays(GL_LINES, 0, 3 * 8); for (int i = 0; i < m_children.size(); i++) m_children[i]->DebugRender(projview); } }
0bef1c2f995c7b7900dc585a8fb15e842ac49432
ff0a93b1b3c7a26b19c184fd83da28f14c596212
/tst_struct.cpp
bdeddd172846f203c1bc84a699df0175dad6e775
[]
no_license
Snowbuzz/new_work
0d29d2ebb8380d653c3f2069ca7c679f4d3d5448
c333e6c95e27c528de45a42bbca3d68b688b443a
refs/heads/master
2020-06-05T04:33:22.574180
2019-06-17T09:21:40
2019-06-17T09:21:40
192,314,545
0
0
null
null
null
null
UTF-8
C++
false
false
3,381
cpp
tst_struct.cpp
/** * @file test_struct.c * @brief Linux (3.18.x+) Тест списка. * @author Logachev Dmitriy */ #include <iostream> #include <string> #include <fstream> #include <string.h> using namespace std; struct Test { int a; double b; string c; }; struct Node { char word[40]; // область данных int count; Node *next; // ссылка на следующий узел }; typedef Node *PNode; // типданных: указатель на Node int sum(int a, int b) { return a + b; } int (*functionFactory(int n))(int, int) { printf("Got parameter %d ", n); int (*functionPtr)(int,int) = &sum; return functionPtr; } PNode Find (PNode Head, char NewWord[]) { PNode q = Head; while (q && strcmp(q->word, NewWord)) q = q->next; return q; } PNode CreateNode ( char NewWord[] ) { PNode NewNode = new Node; // указатель на новый список strcpy(NewNode->word, NewWord); // записать слово NewNode->count = 1; // счетчик слов = 1 NewNode->next = NULL; // следующего узла нет return NewNode; // результат функции – адрес Node } void AddFirst (PNode &Head, PNode NewNode) { NewNode->next = Head; Head = NewNode; } void AddAfter (PNode p, PNode NewNode) { NewNode->next = p->next; p->next = NewNode; } void AddLast(PNode &Head, PNode NewNode) { PNode q = Head; if (Head == NULL) { // если список пуст, cout << "insert 1 node\n"; AddFirst(Head, NewNode); // вставляем первый элемент return; } while (q->next) q = q->next; // ищем последний элемент AddAfter(q, NewNode); } int main(int argc, char **argv) { int (*funcPtr)(int , int); funcPtr = &sum; PNode Head = NULL, p, where; char word[80]= {8,3,4,5,6}; p = Find ( Head, word ); // ищем слово в списке if(p != NULL) p->count++; else { p = CreateNode ( word ); // создаем новый узел } AddLast(Head, p); // вставка перед первым узлом // word = 'p242gfewrg'; //{7,3,4,5,6,8,9}; sprintf(word, "%s", "p242gfewrg"); p = CreateNode ( word ); AddLast(Head, p); p = Head; while ( p ) { // проход по списку и вывод на экран printf ( "CODE(0)-%02X %d\n", p->word[0], p->count ); p = p->next; } p = Head; while (p->next) p = p->next; int length = strlen(p->word); printf ( "%-20s\t%d\n", p->word, length); // переворачиваем for(int i = 0, j = length - 1; i < j; ++i, --j) { int t = word[i]; word[i] = word[j]; word[j] = t; } // выводим элементы массива на экран cout << "result:\n"; for(int i = 0; i < length; ++i) cout << " " << word[i]; cout << "\n"; strcpy(p->word,word); printf ( "%-20s\t%d\n", p->word, length); std::cout << "Hello, World!" << std::endl; std::cout << "x + y = " << (*funcPtr)(3 , 2) << std::endl; std::cout << "x + y = " << (*functionFactory)(10)( 7, 3) << std::endl; return 0; }
142371520c92ee8186b130efe6a4d90be9726905
7c34865263300a0935cfb1c3bbc56ff1c1b0cafe
/bsdiffDemo/src/main/cpp/native-lib.cpp
bab36d1c932e193c5cfbbba78bbd9290f4791ba5
[]
no_license
wds1204/SupportComment
8174ba1378ad0ba513aaa2a9e56f018c31bec919
615919aa47c9b5da85cf9e133038a8e934cba612
refs/heads/master
2021-06-24T10:33:53.226844
2021-04-23T16:54:28
2021-04-23T16:54:28
214,370,119
1
2
null
null
null
null
UTF-8
C++
false
false
3,991
cpp
native-lib.cpp
#include <jni.h> #include <string> #include <sys/epoll.h> #include <sys/eventfd.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> //#include <cutils/log.h> #include <utils/Looper.h> #include <utils/Timers.h> #include <unistd.h> #include <fcntl.h> #include <limits.h> #include <inttypes.h> #include <sys/eventfd.h> #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) extern "C" { extern int patch_main(int argc, char *argv[]); } extern "C" { extern int diff_main(int argc, char *argv[]); } //extern int diff_main(int argc, char *argv[]); extern "C" JNIEXPORT jstring JNICALL Java_com_sun_bsdiffdemo_MainActivity_stringFromJNI( JNIEnv *env, jobject /* this */) { std::string hello = "Hello from C++"; return env->NewStringUTF(hello.c_str()); } extern "C" JNIEXPORT void JNICALL Java_com_sun_bsdiffdemo_MainActivity_diff(JNIEnv *env, jobject thiz, jstring old_apk, jstring new_apk, jstring diff) { //将java字符串转换成char指针 const char *oldApk = env->GetStringUTFChars(old_apk, 0); const char *newApk = env->GetStringUTFChars(new_apk, 0); const char *output = env->GetStringUTFChars(diff, 0); //bspatch ,oldfile ,newfile ,patchfile char *argv[] = {"bspatch", const_cast<char *>(oldApk), const_cast<char *>(newApk), const_cast<char *>(output)}; diff_main(4, argv); // 释放相应的指针gc env->ReleaseStringUTFChars(old_apk, oldApk); env->ReleaseStringUTFChars(new_apk, newApk); env->ReleaseStringUTFChars(diff, output); } extern "C" JNIEXPORT void JNICALL Java_com_sun_bsdiffdemo_MainActivity_patch(JNIEnv *env, jobject thiz, jstring old_apk, jstring diff, jstring new_path) { //将java字符串转换成char指针 const char *oldApk = env->GetStringUTFChars(old_apk, 0); const char *patch = env->GetStringUTFChars(diff, 0); const char *output = env->GetStringUTFChars(new_path, 0); //bspatch ,oldfile ,newfile ,patchfile char *argv[] = {"bspatch", const_cast<char *>(oldApk), const_cast<char *>(output), const_cast<char *>(patch)}; patch_main(4, argv); // 释放相应的指针gc env->ReleaseStringUTFChars(old_apk, oldApk); env->ReleaseStringUTFChars(diff, patch); env->ReleaseStringUTFChars(new_path, output); } extern "C" JNIEXPORT void JNICALL Java_com_sun_bsdiffdemo_MainActivity_nativeMain(JNIEnv *env, jobject thiz, jint argc, jintArray argv) { // TODO: implement nativeMain() int efd, j; uint64_t u; ssize_t s; jint *array; // array = env->GetIntArrayElements( argv, NULL);//复制数组元素到array内存空间 array = env->GetIntArrayElements( argv, NULL); //推荐使用 if (argc < 2) { fprintf(stderr, "Usage: %s <num>...\n", argv[0]); exit(EXIT_FAILURE); } efd = eventfd(0, EFD_SEMAPHORE); if (efd == -1) handle_error("eventfd"); switch (fork()) { case 0: for (j = 1; j < argc; j++) { printf("Child writing %s to efd\n", argv[j]); u = strtoull(reinterpret_cast<const char *>(array[j]), NULL, 0); s = write(efd, &u, sizeof(uint64_t)); if (s != sizeof(uint64_t)) handle_error("write"); } printf("Child completed write loop\n"); exit(EXIT_SUCCESS); default: sleep(2); printf("Parent about to read\n"); s = read(efd, &u, sizeof(uint64_t)); if (s != sizeof(uint64_t)) handle_error("read"); printf("Parent read %llu (0x%llx) from efd\n", (unsigned long long) u, (unsigned long long) u); exit(EXIT_SUCCESS); case -1: handle_error("fork"); } }
7c31b290544663b0608a234b90c4db72e78ee0c2
1949f9885b5ff15063a60d86c010cd6554002c72
/Common/include/Vector2.hh
ed6bf860854c0e2a9a35903f8f88a3d74aef3143
[]
no_license
mrrinot/GhostRunner
e0bfa79d55c9797cd31b1d2d3399d38526e81228
331cb8b6b6e150b397fe2830a4c9a8cefcd97bbe
refs/heads/master
2021-01-09T06:14:11.615464
2017-02-04T19:39:38
2017-02-04T19:39:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,639
hh
Vector2.hh
#pragma once #include <string> #include <array> #include <type_traits> namespace Vector { template<typename T> class Vector2 { static_assert(std::is_arithmetic<T>::value, "T must be an arithmetic type"); private: std::array<T, 2> _values; public: Vector2<T>() : _values({ 0, 0 }) {} Vector2<T>(const T &x, const T &y) : _values({ x, y }) {} ~Vector2<T>() {} Vector2<T>(const Vector2<T> &v) { this->_values[0] = v.x(); this->_values[1] = v.y(); } Vector2<T>& operator=(const Vector2<T>& v) { this->_values[0] = v.x(); this->_values[1] = v.y(); return *this; } T const x() const { return _values[0]; } T const y() const { return _values[1]; } void x(const T &val) { _values[0] = val; } void y(const T &val) { _values[1] = val; } Vector2<T> &normalize() { //static_assert(std::is_integral<T>::value, "Unable to normalise an Integer-Type Vector2"); T norm = sqrt(_values[0] * _values[0] + _values[1] * _values[1]); if (norm != T(0.0)) { _values[0] /= norm; _values[1] /= norm; } return *this; } Vector2<T> &operator+=(const Vector2<T> &other) { _values[0] += other.x(); _values[1] += other.y(); return *this; } Vector2<T> &operator-=(const Vector2<T> &other) { _values[0] -= other.x(); _values[1] -= other.y(); return *this; } Vector2<T> &operator*=(const T& val) { _values[0] *= val; _values[1] *= val; return *this; } Vector2<T> &operator/=(const T& val) { _values[0] /= val; _values[1] /= val; return *this; } std::string toString() const { std::string type = typeid(T).name(); return "type : " + type + " // x : " + std::to_string(_values[0]) + " y : " + std::to_string(_values[1]); } static const Vector2<T> Right; static const Vector2<T> Up; static const Vector2<T> Zero; static const Vector2<T> One; }; static const float epsilon = 00000.1f; template<typename T> Vector2<T> const operator+(const Vector2<T>& v1, const Vector2<T>& v2) { return Vector2<T>(v1.x() + v2.x(), v1.y() + v2.y()); } template<typename T> Vector2<T> const operator-(const Vector2<T>& v1, const Vector2<T>& v2) { return Vector2<T>(v1.x() - v2.x(), v1.y() - v2.y()); } template<typename T> Vector2<T> operator-(const Vector2<T>& v) { return Vector2<T>(-v.x(), -v.y()); } template<typename T> Vector2<T> operator*(const Vector2<T>& v1, float f) { return Vector2<T>(v1.x() * f, v1.y() * f); } template<typename T> Vector2<T> operator*(float f, const Vector2<T>& v1) { return (v1 * f); } template<typename T> Vector2<T> operator/(const Vector2<T>& v1, float f) { return Vector2<T>(v1.x() / f, v1.y() / f); } template<typename T> Vector2<T> operator/(float f, const Vector2<T>& v1) { return (v1 / f); } template<typename T, typename U> Vector2<U> normalized(const Vector2<T>& v) { static_assert(std::is_floating_point<U>::value, "Return type must be a floating point type"); U norm = std::sqrt(v.x() * v.x() + v.y() * v.y()); if (norm == 0) return Vector::Vector2<U>::Zero; return Vector2<U>(static_cast<U>(v.x() / norm), static_cast<U>(v.y() / norm)); } template<typename T, typename U> U magnitude(const Vector2<T>& v) { static_assert(std::is_floating_point<U>::value, "Return type must be a floating point type"); return static_cast<U>(std::sqrt(v.x() * v.x() + v.y() * v.y())); } template<typename T> Vector2<T> const sign(const Vector2<T>& v) { return Vector2<T>(v.x() == 0 ? 0 : v.x() / std::abs(v.x()), v.y() == 0 ? 0 : v.y() / std::abs(v.y())); } template<typename T> const Vector2<T> operator*(const Vector2<T>& v1, const Vector2<T>& v2) { return Vector2<T>(v1.x() * v2.x(), v1.y() * v2.y()); } template<typename T> bool operator==(const Vector2<T>& v1, const Vector2<T>& v2) { return (v1.x() == v2.x() && v1.y() == v2.y()); } template<typename T> bool operator!=(const Vector2<T>& v1, const Vector2<T>& v2) { return (!(v1 == v2)); } template<typename T> const Vector::Vector2<T> Vector::Vector2<T>::Right(1, 0); template<typename T> const Vector::Vector2<T> Vector::Vector2<T>::Up(0, 1); template<typename T> const Vector::Vector2<T> Vector::Vector2<T>::Zero(0, 0); template<typename T> const Vector::Vector2<T> Vector::Vector2<T>::One(1, 1); }
811f3be96e8872d797f627610f5a477d5217b3f3
427f67312fb6af89643e15d88709ab09b489eeff
/GameEngine/GameEngine/Engine/Camera/Camera.cpp
789bae8f323948b95faecdc0f38cd9568e4dc117
[]
no_license
SunHorizon/GameEngine
7547f1682c16382f7d2a1a9520d2603cb382cbb9
5362ea18f5878350203f94734100fe2d08e955ee
refs/heads/master
2020-09-09T01:44:19.571372
2019-12-02T19:41:11
2019-12-02T19:41:11
221,305,751
0
0
null
null
null
null
UTF-8
C++
false
false
6,320
cpp
Camera.cpp
#include "Camera.h" #include "../Core/CoreEngine.h" Camera::Camera() : position(glm::vec3()), perspective(glm::mat4()), orthographic(glm::mat4()), fieldOfView(0), yaw(0.0), pitch(0.0), fowardVector(glm::vec3()), rightVector(glm::vec3()), upVector(glm::vec3()), worldUp(glm::vec3()), lights(std::vector<LightSource*>()) { fieldOfView = 45.0f; fowardVector = glm::vec3(0.0f, 0.0f, -1.0f); upVector = glm::vec3(0.0f, 1.0f, 0.0f); worldUp = upVector; nearPlane = 2.2f; farPlane = 50; yaw = -90.0f; perspective = glm::perspective(fieldOfView, CoreEngine::getInstance()->GetScreenSize().x / CoreEngine::getInstance()->GetScreenSize().y, nearPlane, farPlane); orthographic = glm::ortho(0.0f, CoreEngine::getInstance()->GetScreenSize().x, 0.0f, CoreEngine::getInstance()->GetScreenSize().y, -1.0f, 1.0f); UpdateCameraVector(); } Camera::~Camera() { OnDestory(); } void Camera::setPosition(glm::vec3 position_) { position = position_; UpdateCameraVector(); } glm::vec3 Camera::getPosition() { return position; } void Camera::SetRotation(float yaw_, float pitch_) { yaw = yaw_; pitch = pitch_; UpdateCameraVector(); } glm::mat4 Camera::GetView() { return glm::lookAt(position, position + fowardVector, upVector); } const glm::mat4 Camera::GetPerspective() { perspective = glm::perspective(fieldOfView, CoreEngine::getInstance()->GetScreenSize().x / CoreEngine::getInstance()->GetScreenSize().y, nearPlane, farPlane); return perspective; } const glm::mat4 Camera::GetOrthographic() { orthographic = glm::ortho(0.0f, CoreEngine::getInstance()->GetScreenSize().x, 0.0f, CoreEngine::getInstance()->GetScreenSize().y, -1.0f, 1.0f); return orthographic; } void Camera::addLightSource(LightSource* light_) { lights.push_back(light_); } std::vector<LightSource*> Camera::getLightSource() { return lights; } void Camera::ProcessMouseMovement(float xOffSet_, float yOffSet_) { xOffSet_ *= 0.05f; yOffSet_ *= 0.05f; yaw += xOffSet_; pitch += yOffSet_; if(pitch > 89.0f) { pitch = 89.0f; } if(pitch < -89.0f) { pitch = -89.0f; } if(yaw < 0.0f) { yaw += 360; } if (yaw > 360) { yaw -= 360; } UpdateCameraVector(); } void Camera::ProcessMouseZoom(float y_) { if(y_ < 0 || y_ > 0) { position += static_cast<float>(y_) * (fowardVector * 2.0f); } UpdateCameraVector(); } glm::vec2 Camera::GetClippingPlanes() const { return glm::vec2(nearPlane, farPlane); } void Camera::UpdateCameraVector() { fowardVector.x = cos(glm::radians(yaw)) * cos(glm::radians(pitch)); fowardVector.y = sin(glm::radians(pitch)); fowardVector.z = sin(glm::radians(yaw)) * cos(glm::radians(pitch)); fowardVector = glm::normalize(fowardVector); rightVector = glm::normalize(glm::cross(fowardVector, worldUp)); upVector = glm::normalize(glm::cross(rightVector, fowardVector)); } void Camera::OnDestory() { lights.clear(); } std::vector<glm::vec4> Camera::FrustumCulling() { UpdateCameraVector(); glm::mat4 view = GetView(); glm::mat4 proj = GetPerspective(); glm::mat4 clip; glm::vec4 right, left, bottom, top, front, back; std::vector<glm::vec4> Planes; Planes.clear(); { clip[0][0] = view[0][0] * proj[0][0] + view[0][1] * proj[1][0] + view[0][2] * proj[2][0] + view[0][3] * proj[3][0]; clip[0][1] = view[0][0] * proj[0][1] + view[0][1] * proj[1][1] + view[0][2] * proj[2][1] + view[0][3] * proj[3][1]; clip[0][2] = view[0][0] * proj[0][2] + view[0][1] * proj[1][2] + view[0][2] * proj[2][2] + view[0][3] * proj[3][2]; clip[0][3] = view[0][0] * proj[0][3] + view[0][1] * proj[1][3] + view[0][2] * proj[2][3] + view[0][3] * proj[3][3]; clip[1][0] = view[1][0] * proj[0][0] + view[1][1] * proj[1][0] + view[1][2] * proj[2][0] + view[1][3] * proj[3][0]; clip[1][1] = view[1][0] * proj[0][1] + view[1][1] * proj[1][1] + view[1][2] * proj[2][1] + view[1][3] * proj[3][1]; clip[1][2] = view[1][0] * proj[0][2] + view[1][1] * proj[1][2] + view[1][2] * proj[2][2] + view[1][3] * proj[3][2]; clip[1][3] = view[1][0] * proj[0][3] + view[1][1] * proj[1][3] + view[1][2] * proj[2][3] + view[1][3] * proj[3][3]; clip[2][0] = view[2][0] * proj[0][0] + view[2][1] * proj[1][0] + view[2][2] * proj[2][0] + view[2][3] * proj[3][0]; clip[2][1] = view[2][0] * proj[0][1] + view[2][1] * proj[1][1] + view[2][2] * proj[2][1] + view[2][3] * proj[3][1]; clip[2][2] = view[2][0] * proj[0][2] + view[2][1] * proj[1][2] + view[2][2] * proj[2][2] + view[2][3] * proj[3][2]; clip[2][3] = view[2][0] * proj[0][3] + view[2][1] * proj[1][3] + view[2][2] * proj[2][3] + view[2][3] * proj[3][3]; clip[3][0] = view[3][0] * proj[0][0] + view[3][1] * proj[1][0] + view[3][2] * proj[2][0] + view[3][3] * proj[3][0]; clip[3][1] = view[3][0] * proj[0][1] + view[3][1] * proj[1][1] + view[3][2] * proj[2][1] + view[3][3] * proj[3][1]; clip[3][2] = view[3][0] * proj[0][2] + view[3][1] * proj[1][2] + view[3][2] * proj[2][2] + view[3][3] * proj[3][2]; clip[3][3] = view[3][0] * proj[0][3] + view[3][1] * proj[1][3] + view[3][2] * proj[2][3] + view[3][3] * proj[3][3]; } // right plane right.x = clip[0][3] - clip[0][0]; right.y = clip[1][3] - clip[1][0]; right.z = clip[2][3] - clip[2][0]; right.w = clip[3][3] - clip[3][0]; right = glm::normalize(right); Planes.push_back(right); // left plane left.x = clip[0][3] + clip[0][0]; left.y = clip[1][3] + clip[1][0]; left.z = clip[2][3] + clip[2][0]; left.w = clip[3][3] + clip[3][0]; left = glm::normalize(left); Planes.push_back(left); // bottom plane bottom.x = clip[0][3] + clip[0][1]; bottom.y = clip[1][3] + clip[1][1]; bottom.z = clip[2][3] + clip[2][1]; bottom.w = clip[3][3] + clip[3][1]; bottom = glm::normalize(bottom); Planes.push_back(bottom); //Top plane top.x = clip[0][3] - clip[0][1]; top.y = clip[1][3] - clip[1][1]; top.z = clip[2][3] - clip[2][1]; top.w = clip[3][3] - clip[3][1]; top = glm::normalize(top); Planes.push_back(top); //front plane front.x = clip[0][3] - clip[0][2]; front.y = clip[1][3] - clip[1][2]; front.z = clip[2][3] - clip[2][2]; front.w = clip[3][3] - clip[3][2]; front = glm::normalize(front); Planes.push_back(front); //back plane back.x = clip[0][3] + clip[0][2]; back.y = clip[1][3] + clip[1][2]; back.z = clip[2][3] + clip[2][2]; back.w = clip[3][3] + clip[3][2]; back = glm::normalize(back); Planes.push_back(back); return Planes; }
289966829ae781b00ec69a139fa81328aa3f350f
3880ed9e62d9849e811b5de2d29522ddf0f8ad2c
/Codechef_prepare/codeforces/1054a.cpp
8b0b98cdf16661da029a4d599ae005628826d2cf
[]
no_license
Krythz43/CP-Archieve
936b028f9f0f90e555dc7c19c11d3939f7532b2f
36b5f7449bbd93135f4f09b7564b8ada94ef99e6
refs/heads/master
2020-08-31T18:42:47.954906
2020-05-12T05:18:00
2020-05-12T05:18:00
218,757,326
0
0
null
2020-05-12T05:18:02
2019-10-31T12:08:54
C++
UTF-8
C++
false
false
1,224
cpp
1054a.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define rep(i,n,z) for(int i=z;i<n;i++) #define rrep(i,z) for(int i=z;i>=0;i--) #define lli long long int #define nl cout<<endl #define vi vector<int> #define vlli vector<long long int> #define umap unordered_map #define pb push_back #define mp make_pair #define ss second #define ff first #define ipair pair <int,int> #define llipair pair <lli,lli> #define pq priority_queue #define displaymatrix(a,m,n) for(int i=0;i<m;i++){for(int j=0;j<n;j++)cout<<a[i][j]<<" ";cout<<endl;} #define printarray(a,n) for(int i=0;i<n;i++){cout<<a[i]<<" ";}nl; #define vinput(a,n) vi a(n);rep(i,n,0)cin>>a[i] #define ainput(a,n) rep(i,n,0)cin>>a[i] #define SO(a) sort(a.begin(),a.end()) #define SOP(a,comp) sort(a.begin(),a.end(),comp) #define inf INT_MAX lli llmax(lli a,lli b){if(a>b)return a; return b;} lli llmin(lli a,lli b){if(a<b)return a; return b;} int main() { fastio; int x,y,z,t1,t2,t3; cin>>x>>y>>z>>t1>>t2>>t3; int d=fabs(x-y); int ans1=d*t1; int ans2=3*t3+(fabs(x-z)+d)*t2; //ele // cout<<ans1<<" "<<ans2<<endl; if(ans2>ans1) cout<<"NO"; else cout<<"YES"; }
63375b5a8654070360d7a8beb159379032198e55
7239fcec5aabf75345baff05ab5208ab43d8e373
/Day26/Worth Matrix.cpp
c4df3195222b7baede6b232261f14bf640efb0d4
[]
no_license
123pk/100DaysofCompetitiveProgramming
79b0eefba275a82ff0ca4d583b3384c62a0efb05
ef0d60f667cc3046c7ae995500d3c3c023c650c2
refs/heads/main
2023-06-01T10:31:03.673143
2021-06-19T17:13:04
2021-06-19T17:13:04
346,765,914
7
2
null
null
null
null
UTF-8
C++
false
false
146
cpp
Worth Matrix.cpp
/* Platform :- Codechef Contest :- Codechef April Long challenge Problem :- Worth Matrix SOLUTION WILL BE ADDED ONCE CONTEST IS OVER */
818ed099823a49fc48e20dfad8067572a4cb2888
ebd582b7fb493ccc2af59a5c0b5f0e98b2b5e8c3
/Chapter07/c07e08.cpp
7f0c81f85c3b618a2c881785e34d18e680f08560
[]
no_license
rarog2018/C-Primer_Lippman
97957e5c7f2d969f1534dd0992dd4c0e9d072700
3c3f5084aa744ef971e3bfa4fdfc639c5eea34d5
refs/heads/master
2021-06-28T17:45:34.549300
2021-01-05T08:15:27
2021-01-05T08:15:27
206,675,493
0
0
null
null
null
null
UTF-8
C++
false
false
457
cpp
c07e08.cpp
#include <iostream> #include "c07Sales_data.h" using namespace std; // in read() the reference to Sales_data object is plain, because the function // changes the values of the object's members // in print() the reference to Sales_data object is const because the function // does not change the object's data (and should not) istream &read(istream &is, Sales_data &obj); ostream &print(ostream &os, const Sales_data &obj); int main(void) { return 0; }
3bcb14be6b236248b6bedd727d6718970ab5d2e5
c078664134d845a71371e94bb81186584481acfe
/For/main.cpp
1e5c586e8fb46116207dbe8b969f54233af5b275
[]
no_license
RamonovaInna/lab3
4f6249e61e86d4548b5827a54eb84c5c47e9c78f
6327f4eb6aae3df6c5a7c1cd4b3841c18854717e
refs/heads/master
2023-03-24T12:57:44.576702
2021-03-16T05:41:28
2021-03-16T05:41:28
348,227,676
0
0
null
null
null
null
UTF-8
C++
false
false
1,431
cpp
main.cpp
#include <iostream> #include <locale> #include <cmath> #include "func.h" using namespace std; using namespace forLoop; int main() { int k; double n; while (true) { cout << "1 forsumm(int n) \n"; cout << "2 forsumm2(double eps)\n"; cout << "3 forprint(int n ,int k) \n"; cout << "4 forfindFirstElement(double eps) \n"; cout << "5 forfindFirstNegativeElement(double eps \n"; cout << "6 Exit \n"; cin >> k; switch (k) { case 1: system("cls"); cout << "Insert n: \n"; cin >> k; cout << "Result: " << summ(k) << "\n" << endl; cout << "\n" << endl; system("pause"); system("cls"); break; case 2: system("cls"); cout << "Insert eps: \n"; cin >> n; cout << "Result: " << summ2(n) << "\n" << endl; system("pause"); system("cls"); break; case 3: system("cls"); cout << "Insert n, k: \n"; cin >> n; cin >> k; print(n, k); cout << "\n" << endl; system("pause"); system("cls"); break; case 4: system("cls"); cout << "Insert eps: \n"; cin >> n; cout << "Result: " << findFirstElement(n) << "\n" << endl; system("pause"); system("cls"); break; case 5: system("cls"); cout << "Insert eps: \n"; cin >> n; cout << "Result: " << findFirstNegativeElement(n) << "\n" << endl; system("pause"); system("cls"); break; case 6: return 1; default: break; } } system("pause"); return 0; }
704540d4644aaca2c24e2694b46b23d94689d093
9a5db9951432056bb5cd4cf3c32362a4e17008b7
/FacesCapture/branches/ShangHai/RemoteImaging/FaceProcessingWrapper/FaceVerifier.cpp
6ad73a65f76e59ce7a5c40a3b669d0463e005499
[]
no_license
miaozhendaoren/appcollection
65b0ede264e74e60b68ca74cf70fb24222543278
f8b85af93f787fa897af90e8361569a36ff65d35
refs/heads/master
2021-05-30T19:27:21.142158
2011-06-27T03:49:22
2011-06-27T03:49:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
587
cpp
FaceVerifier.cpp
#pragma once #include <stdafx.h> #include "../../FaceProcessing/FaceProcessing/FaceVarify.h" using namespace System; using namespace System::Runtime::InteropServices; namespace FaceProcessingWrapper { public ref class FaceVerifier { public: FaceVerifier() { pVerifier = new Damany::Imaging::FaceVarify(); } bool IsFace(OpenCvSharp::IplImage^ img) { IplImage *pIpl = (IplImage *) img->CvPtr.ToPointer(); bool result = pVerifier->IsFaceImg(pIpl); return result; } private: Damany::Imaging::FaceVarify *pVerifier; }; }
3bb127ddafad861ecb73a0688d6cd5a610fbad0a
9091fa04f4e57460b34b852d968da43b0a3de59c
/CSCI 1200/HW/hw3/backup.h
db46864331c1a5258381acc2eb99d39e800ad66c
[]
no_license
YunheWang0813/RPI-Repository
b09af436e295c41b423106447ce268b0fb79721b
c0f279474ea5db91eab0c438c57ae0dc198c5609
refs/heads/master
2020-03-31T23:03:14.761451
2019-02-08T00:15:47
2019-02-08T00:15:47
152,641,110
0
0
null
null
null
null
UTF-8
C++
false
false
412
h
backup.h
#ifndef tetris #define tetris #include<iostream> #include<string> #include<vector> using namespace std; class Tetris{ public: Tetris(int w); int get_width() const {return width;} void set_width(int w) {width=w;} void add_piece(char mino, int rot, int place); int get_max_height() const; int count_squares() const; void print() const; private: int width; int *heights; char **data; }; #endif
922384e97bb8e1c97f76b9d79073fb9e019ca56e
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/httpd/gumtree/httpd_old_hunk_2794.cpp
64fb5122841189f39b53393dc2c0f3b06facb00b
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
572
cpp
httpd_old_hunk_2794.cpp
&& !strcmp(l->binddn, binddn))) && ((!l->bindpw && !bindpw) || (l->bindpw && bindpw && !strcmp(l->bindpw, bindpw))) && (l->deref == deref) && (l->secure == secureflag) && !compare_client_certs(dc->client_certs, l->client_certs)) { break; } #if APR_HAS_THREADS /* If this connection didn't match the criteria, then we * need to unlock the mutex so it is available to be reused. */
8a3db656ca3a8f6f267faad0d492ad24959e59fe
237dca24c3da8e53f41e009a244d62d144de7afe
/DirectXGame/Sprite.h
09a30763c7a9fab8a14af9f0ebda62eb5cfe8d4f
[]
no_license
monokeshi/DirectXGame
c341129eba99214ba91d5dc9689b13101afc0d26
d3594e03f51e455d6ee0c50f085d2a08e8b5bd65
refs/heads/master
2023-08-16T22:11:57.522632
2021-09-24T03:03:26
2021-09-24T03:03:26
382,003,783
0
1
null
2021-09-24T03:03:27
2021-07-01T11:02:46
C++
SHIFT_JIS
C++
false
false
3,588
h
Sprite.h
#pragma once #include <d3d12.h> #include <DirectXMath.h> #include <wrl.h> #include <vector> class DirectX12Wrapper; class Render; class Texture; class Sprite { private: struct Vertex { DirectX::XMFLOAT3 pos; // xyz座標 DirectX::XMFLOAT2 uv; // uv座標 }; struct ConstBufferData { DirectX::XMFLOAT4 color; // 色(RGBA) DirectX::XMMATRIX mat; // 3D変換行列 }; enum { LB, // 左下 LT, // 左上 RB, // 右下 RT // 右上 }; DirectX12Wrapper &dx12; Render &render; Texture &texture; DirectX::XMFLOAT3 position; // 座標 float rotation; // 回転 DirectX::XMMATRIX matWorld; // ワールド行列 DirectX::XMFLOAT4 color; // 色 DirectX::XMFLOAT2 size; // サイズ DirectX::XMFLOAT2 anchorPoint; // アンカーポイント //DirectX::XMFLOAT2 texLeftTop; // テクスチャ左上座標 //DirectX::XMFLOAT2 texSize; // テクスチャ切り出しサイズ bool isFlipX; // 左右反転 bool isFlipY; // 上下反転 DirectX::XMMATRIX *matWorldParent; // 親のワールド行列 std::vector<Vertex> vertices; // 頂点データ Microsoft::WRL::ComPtr<ID3D12Resource> vertBuffer; // 頂点バッファ D3D12_VERTEX_BUFFER_VIEW vbView{}; // 頂点バッファビュー Microsoft::WRL::ComPtr<ID3D12Resource> constBuffer; // 定数バッファ bool isSetTexResolutionOnlyOnce; // Draw関数呼び出し時にSetSize関数を一度だけ呼び出すためのフラグ //bool dirtyFlag; // 定数バッファ用の項目で変更があった場合のみtrue // 行列の更新処理 void UpdateMatrix(); // 頂点生成 void CreateVertex(); // 頂点バッファの生成 HRESULT CreateVertBuffer(); // 頂点バッファへの転送 HRESULT TransferVertBuffer(); // 定数バッファの生成 HRESULT CreateConstBuffer(); // 定数バッファへのデータ転送 HRESULT TransferConstBuffer(); // 頂点座標を計算 void CalcVertPos(); // 切り抜き後の頂点UV座標を計算 void CalcClippingVertUV(DirectX::XMFLOAT2 texLeftTop, DirectX::XMFLOAT2 texSize, const int &texIndex); public: Sprite(DirectX::XMFLOAT3 position, float rotation, DirectX::XMFLOAT4 color, DirectX::XMFLOAT2 size, DirectX::XMMATRIX *matWorldParent, DirectX12Wrapper &dx12, Render &render, Texture &texture); ~Sprite(); // 初期化処理 HRESULT Initialize(); // テクスチャを切り出す void ClippingTexture(DirectX::XMFLOAT2 texLeftTop, DirectX::XMFLOAT2 texSize, const int &texIndex); // 更新処理 void Update(); // 描画処理 void Draw(const int &texIndex, bool isFlipX = false, bool isFlipY = false, bool isInvisible = false, bool isSetTexResolution = true); // 座標を設定 void SetPosition(DirectX::XMFLOAT3 position) { this->position = position; } // サイズを設定 void SetSize(DirectX::XMFLOAT2 size) { this->size = size; CalcVertPos(); // 頂点バッファへのデータ転送 if ( FAILED(TransferVertBuffer()) ) { assert(0); return; } } DirectX::XMMATRIX *GetMatWorld() { return &matWorld; } };
951b7d23d4b4e7dd2722dcf9c4a9505c10b601eb
33b567f6828bbb06c22a6fdf903448bbe3b78a4f
/opencascade/TDocStd.hxx
4febc7c68b0bb97bb77ffa7457f419acff2f9f53
[ "Apache-2.0" ]
permissive
CadQuery/OCP
fbee9663df7ae2c948af66a650808079575112b5
b5cb181491c9900a40de86368006c73f169c0340
refs/heads/master
2023-07-10T18:35:44.225848
2023-06-12T18:09:07
2023-06-12T18:09:07
228,692,262
64
28
Apache-2.0
2023-09-11T12:40:09
2019-12-17T20:02:11
C++
UTF-8
C++
false
false
2,386
hxx
TDocStd.hxx
// Created on: 1999-04-07 // Created by: Denis PASCAL // Copyright (c) 1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _TDocStd_HeaderFile #define _TDocStd_HeaderFile #include <Standard.hxx> #include <Standard_DefineAlloc.hxx> #include <Standard_Handle.hxx> #include <TDF_IDList.hxx> //! This package define CAF main classes. //! //! * The standard application root class //! //! * The standard document which contains data //! //! * The external reference mechanism between documents //! //! * Attributes for Document management //! Standard documents offer you a ready-to-use //! document containing a TDF-based data //! structure. The documents themselves are //! contained in a class inheriting from //! TDocStd_Application which manages creation, //! storage and retrieval of documents. //! You can implement undo and redo in your //! document, and refer from the data framework of //! one document to that of another one. This is //! done by means of external link attributes, which //! store the path and the entry of external links. To //! sum up, standard documents alone provide //! access to the data framework. They also allow //! you to: //! - Update external links //! - Manage the saving and opening of data //! - Manage undo/redo functionality. //! Note //! For information on the relations between this //! component of OCAF and the others, refer to the //! OCAF User's Guide. class TDocStd { public: DEFINE_STANDARD_ALLOC //! specific GUID of this package //! ============================= //! Appends to <anIDList> the list of the attributes //! IDs of this package. CAUTION: <anIDList> is NOT //! cleared before use. Standard_EXPORT static void IDList (TDF_IDList& anIDList); }; #endif // _TDocStd_HeaderFile
3dcbcf8fa7f13192c1b1dc829bedb266080f4667
88b1595c7e402dbea17ecf7e564a6223728b73d3
/Binary Search Tree/Insert&Delete.cpp
748c7c6ecc5a0ab720012c9b34842bdfa995e5bf
[]
no_license
DefinitelyNotAnmol/Tree
3f7d4326ceb3a2d8476e349cb019f68ebd0e2b68
1cf978feb7136319de416526e453f642ac2ae290
refs/heads/master
2020-04-12T10:34:46.116584
2019-08-10T11:10:28
2019-08-10T11:10:28
162,434,200
0
0
null
null
null
null
UTF-8
C++
false
false
2,979
cpp
Insert&Delete.cpp
#include <iostream> #include <queue> using namespace std; class TreeNode { public: int data; TreeNode* left; TreeNode* right; TreeNode(int d) { data = d; left = NULL; right = NULL; } }; TreeNode* insertBST(TreeNode* root, int number); TreeNode* deleteFromBst(TreeNode* root, int key); TreeNode* getSuccessor(TreeNode* root, TreeNode* &successorParent); void preorder(TreeNode* root); int main() { int testCases; TreeNode* root = NULL; cin >> testCases; for (int i = 0; i < testCases; i++) { int numberOfElements; cin >> numberOfElements; int input; for (int j = 0; j < numberOfElements; j++) { cin >> input; root = insertBST(root, input); } cin >> numberOfElements; for (int j = 0; j < numberOfElements; j++) { cin >> input; root = deleteFromBst(root, input); } preorder(root); } } TreeNode* insertBST(TreeNode* root, int number) { if (root == NULL) { TreeNode* ptr = new TreeNode(number); return ptr; } if (number < root->data) root->left = insertBST(root->left, number); else root->right = insertBST(root->right, number); return root; } TreeNode* deleteFromBst(TreeNode* root, int key) { if (root == NULL) return root; if (key < root->data) { root->left = deleteFromBst(root->left, key); return root; } if (key > root->data) { root->right = deleteFromBst(root->right, key); return root; } if (key == root->data) { // root has to be deleted // if root has only left child if (root->left == NULL) { TreeNode* tmp = root->right; delete root; return tmp; } if (root->right == NULL) { TreeNode* tmp = root->left; delete root; return tmp; } // root has 2 children TreeNode* successorParent = NULL; TreeNode* successor = getSuccessor(root, successorParent); if (successorParent == root) { successor->right = root->right; delete root; return successor; } else { successorParent->right = successor->left; successor->left = root->left; successor->right = root->right; delete root; return successor; } } } TreeNode* getSuccessor(TreeNode* root, TreeNode* &successorParent) { if (root == NULL) return root; successorParent = root; TreeNode* successor = root->left ? root->left : NULL; while (successor && successor->right) { successorParent = successor; successor = successor->right; } return successor; } void preorder(TreeNode* root) { if (root == NULL) return; cout << root->data << " "; preorder(root->left); preorder(root->right); }
442416b6d3721cc2ffc322a5a6dee5a5dd509f6b
4c325c54bc42ac3e1669b51a883730abc1d0a9f6
/BitInputStream.cpp
ed8f4df2095eed55705b81b44b36dc4fe501ba8d
[]
no_license
simarchhabra/huffmancompression
d2011c765d158573e51234884e142cd1c9bde64a
9b382f55043ab83a33d4e6956dc0ac2b4db4db65
refs/heads/master
2021-05-12T18:15:08.208527
2018-01-11T06:57:07
2018-01-11T06:57:07
117,056,134
0
0
null
null
null
null
UTF-8
C++
false
false
397
cpp
BitInputStream.cpp
/* **Author: Simar Chhabra **File defines methods of BitInputStream **/ #include <iostream> #include "BitInputStream.h" #define BYTE 8 void BitInputStream::fill() { buf = in.get(); nbits = 1; } int BitInputStream::readBit() { if (nbits++ == BYTE) { fill(); } //extract correct digit at (BYTE - nbits) position return (buf >> (BYTE - nbits)) & 1; }
ef7bb977e8a8eb67ca921dd2028bceceab50fba5
b3e525a3c48800303019adac8f9079109c88004e
/nic/sysmgr/src/timer_watcher.cpp
ce6dcad0ca68293dd2bd6f7767217ea27f79fc26
[]
no_license
PsymonLi/sw
d272aee23bf66ebb1143785d6cb5e6fa3927f784
3890a88283a4a4b4f7488f0f79698445c814ee81
refs/heads/master
2022-12-16T21:04:26.379534
2020-08-27T07:57:22
2020-08-28T01:15:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
705
cpp
timer_watcher.cpp
#include "timer_watcher.hpp" #include <memory> #include <ev++.h> std::shared_ptr<TimerWatcher> TimerWatcher::create(ev_tstamp after, ev_tstamp repeat, TimerReactorPtr reactor) { return std::make_shared<TimerWatcher>(after, repeat, reactor); } TimerWatcher::TimerWatcher(ev_tstamp after, ev_tstamp repeat, TimerReactorPtr reactor) { this->reactor = reactor; timer.set<TimerWatcher, &TimerWatcher::timer_callback>(this); timer.start(after, repeat); } void TimerWatcher::timer_callback() { this->reactor->on_timer(); } void TimerWatcher::stop() { timer.stop(); } TimerWatcher::~TimerWatcher() { this->stop(); } void TimerWatcher::repeat() { timer.again(); }
ba60cc25b686fd264f32588ef61e9ccd9e8ee162
96586f57e0414200c3fb86435405c227477e7763
/src/Cpu.cpp
fa74796e81a30bca5d1d1d403ec12bba9cba7e0c
[]
no_license
zyc9012/NesEmu
6b4216dbbbdb097d6d7618a7687a8eb86914ffa2
53b51406f70de7b1a9717a29a41aad4fc7a772dc
refs/heads/master
2023-05-25T08:18:57.356774
2023-04-08T07:13:45
2023-05-13T02:36:34
51,518,145
7
0
null
null
null
null
UTF-8
C++
false
false
23,577
cpp
Cpu.cpp
#include "Cpu.h" #include "Memory.h" #include "Console.h" #include "StateFile.h" stepInfo fakeStepInfo; Cpu::Cpu(Console* console) { memory = new CpuMemory(console); createTable(); Reset(); } Cpu::~Cpu() { } // instructionModes indicates the addressing mode for each instruction uint8_t instructionModes[256]{ 6, 7, 6, 7, 11, 11, 11, 11, 6, 5, 4, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 12, 12, 6, 3, 6, 3, 2, 2, 2, 2, 1, 7, 6, 7, 11, 11, 11, 11, 6, 5, 4, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 12, 12, 6, 3, 6, 3, 2, 2, 2, 2, 6, 7, 6, 7, 11, 11, 11, 11, 6, 5, 4, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 12, 12, 6, 3, 6, 3, 2, 2, 2, 2, 6, 7, 6, 7, 11, 11, 11, 11, 6, 5, 4, 5, 8, 1, 1, 1, 10, 9, 6, 9, 12, 12, 12, 12, 6, 3, 6, 3, 2, 2, 2, 2, 5, 7, 5, 7, 11, 11, 11, 11, 6, 5, 6, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 13, 13, 6, 3, 6, 3, 2, 2, 3, 3, 5, 7, 5, 7, 11, 11, 11, 11, 6, 5, 6, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 13, 13, 6, 3, 6, 3, 2, 2, 3, 3, 5, 7, 5, 7, 11, 11, 11, 11, 6, 5, 6, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 12, 12, 6, 3, 6, 3, 2, 2, 2, 2, 5, 7, 5, 7, 11, 11, 11, 11, 6, 5, 6, 5, 1, 1, 1, 1, 10, 9, 6, 9, 12, 12, 12, 12, 6, 3, 6, 3, 2, 2, 2, 2, }; // instructionSizes indicates the size of each instruction in uint8_ts uint8_t instructionSizes[256]{ 2, 2, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, 3, 2, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, 1, 2, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, 1, 2, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 0, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 0, 3, 0, 0, 2, 2, 2, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 3, 3, 0, 2, 2, 0, 0, 2, 2, 2, 0, 1, 3, 1, 0, 3, 3, 3, 0, }; // instructionCycles indicates the number of cycles used by each instruction, // not including conditional cycles uint8_t instructionCycles[256]{ 7, 6, 2, 8, 3, 3, 5, 5, 3, 2, 2, 2, 4, 4, 6, 6, 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, 6, 6, 2, 8, 3, 3, 5, 5, 4, 2, 2, 2, 4, 4, 6, 6, 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, 6, 6, 2, 8, 3, 3, 5, 5, 3, 2, 2, 2, 3, 4, 6, 6, 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, 6, 6, 2, 8, 3, 3, 5, 5, 4, 2, 2, 2, 5, 4, 6, 6, 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, 2, 6, 2, 6, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 4, 2, 6, 2, 6, 4, 4, 4, 4, 2, 5, 2, 5, 5, 5, 5, 5, 2, 6, 2, 6, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 4, 2, 5, 2, 5, 4, 4, 4, 4, 2, 4, 2, 4, 4, 4, 4, 4, 2, 6, 2, 8, 3, 3, 5, 5, 2, 2, 2, 2, 4, 4, 6, 6, 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, 2, 6, 2, 8, 3, 3, 5, 5, 2, 2, 2, 2, 4, 4, 6, 6, 2, 5, 2, 8, 4, 4, 6, 6, 2, 4, 2, 7, 4, 4, 7, 7, }; // instructionPageCycles indicates the number of cycles used by each // instruction when a page is crossed uint8_t instructionPageCycles[256]{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, }; // instructionNames indicates the name of each instruction const char* instructionNames[256]{ "BRK", "ORA", "KIL", "SLO", "NOP", "ORA", "ASL", "SLO", "PHP", "ORA", "ASL", "ANC", "NOP", "ORA", "ASL", "SLO", "BPL", "ORA", "KIL", "SLO", "NOP", "ORA", "ASL", "SLO", "CLC", "ORA", "NOP", "SLO", "NOP", "ORA", "ASL", "SLO", "JSR", "AND", "KIL", "RLA", "BIT", "AND", "ROL", "RLA", "PLP", "AND", "ROL", "ANC", "BIT", "AND", "ROL", "RLA", "BMI", "AND", "KIL", "RLA", "NOP", "AND", "ROL", "RLA", "SEC", "AND", "NOP", "RLA", "NOP", "AND", "ROL", "RLA", "RTI", "EOR", "KIL", "SRE", "NOP", "EOR", "LSR", "SRE", "PHA", "EOR", "LSR", "ALR", "JMP", "EOR", "LSR", "SRE", "BVC", "EOR", "KIL", "SRE", "NOP", "EOR", "LSR", "SRE", "CLI", "EOR", "NOP", "SRE", "NOP", "EOR", "LSR", "SRE", "RTS", "ADC", "KIL", "RRA", "NOP", "ADC", "ROR", "RRA", "PLA", "ADC", "ROR", "ARR", "JMP", "ADC", "ROR", "RRA", "BVS", "ADC", "KIL", "RRA", "NOP", "ADC", "ROR", "RRA", "SEI", "ADC", "NOP", "RRA", "NOP", "ADC", "ROR", "RRA", "NOP", "STA", "NOP", "SAX", "STY", "STA", "STX", "SAX", "DEY", "NOP", "TXA", "XAA", "STY", "STA", "STX", "SAX", "BCC", "STA", "KIL", "AHX", "STY", "STA", "STX", "SAX", "TYA", "STA", "TXS", "TAS", "SHY", "STA", "SHX", "AHX", "LDY", "LDA", "LDX", "LAX", "LDY", "LDA", "LDX", "LAX", "TAY", "LDA", "TAX", "LAX", "LDY", "LDA", "LDX", "LAX", "BCS", "LDA", "KIL", "LAX", "LDY", "LDA", "LDX", "LAX", "CLV", "LDA", "TSX", "LAS", "LDY", "LDA", "LDX", "LAX", "CPY", "CMP", "NOP", "DCP", "CPY", "CMP", "DEC", "DCP", "INY", "CMP", "DEX", "AXS", "CPY", "CMP", "DEC", "DCP", "BNE", "CMP", "KIL", "DCP", "NOP", "CMP", "DEC", "DCP", "CLD", "CMP", "NOP", "DCP", "NOP", "CMP", "DEC", "DCP", "CPX", "SBC", "NOP", "ISC", "CPX", "SBC", "INC", "ISC", "INX", "SBC", "NOP", "SBC", "CPX", "SBC", "INC", "ISC", "BEQ", "SBC", "KIL", "ISC", "NOP", "SBC", "INC", "ISC", "SED", "SBC", "NOP", "ISC", "NOP", "SBC", "INC", "ISC", }; // createTable builds a function table for each instruction void Cpu::createTable() { table = new InstrExecFunc[256]{ &Cpu::brk, &Cpu::ora, &Cpu::kil, &Cpu::slo, &Cpu::nop, &Cpu::ora, &Cpu::asl, &Cpu::slo, &Cpu::php, &Cpu::ora, &Cpu::asl, &Cpu::anc, &Cpu::nop, &Cpu::ora, &Cpu::asl, &Cpu::slo, &Cpu::bpl, &Cpu::ora, &Cpu::kil, &Cpu::slo, &Cpu::nop, &Cpu::ora, &Cpu::asl, &Cpu::slo, &Cpu::clc, &Cpu::ora, &Cpu::nop, &Cpu::slo, &Cpu::nop, &Cpu::ora, &Cpu::asl, &Cpu::slo, &Cpu::jsr, &Cpu::AND, &Cpu::kil, &Cpu::rla, &Cpu::bit, &Cpu::AND, &Cpu::rol, &Cpu::rla, &Cpu::plp, &Cpu::AND, &Cpu::rol, &Cpu::anc, &Cpu::bit, &Cpu::AND, &Cpu::rol, &Cpu::rla, &Cpu::bmi, &Cpu::AND, &Cpu::kil, &Cpu::rla, &Cpu::nop, &Cpu::AND, &Cpu::rol, &Cpu::rla, &Cpu::sec, &Cpu::AND, &Cpu::nop, &Cpu::rla, &Cpu::nop, &Cpu::AND, &Cpu::rol, &Cpu::rla, &Cpu::rti, &Cpu::eor, &Cpu::kil, &Cpu::sre, &Cpu::nop, &Cpu::eor, &Cpu::lsr, &Cpu::sre, &Cpu::pha, &Cpu::eor, &Cpu::lsr, &Cpu::alr, &Cpu::jmp, &Cpu::eor, &Cpu::lsr, &Cpu::sre, &Cpu::bvc, &Cpu::eor, &Cpu::kil, &Cpu::sre, &Cpu::nop, &Cpu::eor, &Cpu::lsr, &Cpu::sre, &Cpu::cli, &Cpu::eor, &Cpu::nop, &Cpu::sre, &Cpu::nop, &Cpu::eor, &Cpu::lsr, &Cpu::sre, &Cpu::rts, &Cpu::adc, &Cpu::kil, &Cpu::rra, &Cpu::nop, &Cpu::adc, &Cpu::ror, &Cpu::rra, &Cpu::pla, &Cpu::adc, &Cpu::ror, &Cpu::arr, &Cpu::jmp, &Cpu::adc, &Cpu::ror, &Cpu::rra, &Cpu::bvs, &Cpu::adc, &Cpu::kil, &Cpu::rra, &Cpu::nop, &Cpu::adc, &Cpu::ror, &Cpu::rra, &Cpu::sei, &Cpu::adc, &Cpu::nop, &Cpu::rra, &Cpu::nop, &Cpu::adc, &Cpu::ror, &Cpu::rra, &Cpu::nop, &Cpu::sta, &Cpu::nop, &Cpu::sax, &Cpu::sty, &Cpu::sta, &Cpu::stx, &Cpu::sax, &Cpu::dey, &Cpu::nop, &Cpu::txa, &Cpu::xaa, &Cpu::sty, &Cpu::sta, &Cpu::stx, &Cpu::sax, &Cpu::bcc, &Cpu::sta, &Cpu::kil, &Cpu::ahx, &Cpu::sty, &Cpu::sta, &Cpu::stx, &Cpu::sax, &Cpu::tya, &Cpu::sta, &Cpu::txs, &Cpu::tas, &Cpu::shy, &Cpu::sta, &Cpu::shx, &Cpu::ahx, &Cpu::ldy, &Cpu::lda, &Cpu::ldx, &Cpu::lax, &Cpu::ldy, &Cpu::lda, &Cpu::ldx, &Cpu::lax, &Cpu::tay, &Cpu::lda, &Cpu::tax, &Cpu::lax, &Cpu::ldy, &Cpu::lda, &Cpu::ldx, &Cpu::lax, &Cpu::bcs, &Cpu::lda, &Cpu::kil, &Cpu::lax, &Cpu::ldy, &Cpu::lda, &Cpu::ldx, &Cpu::lax, &Cpu::clv, &Cpu::lda, &Cpu::tsx, &Cpu::las, &Cpu::ldy, &Cpu::lda, &Cpu::ldx, &Cpu::lax, &Cpu::cpy, &Cpu::cmp, &Cpu::nop, &Cpu::dcp, &Cpu::cpy, &Cpu::cmp, &Cpu::dec, &Cpu::dcp, &Cpu::iny, &Cpu::cmp, &Cpu::dex, &Cpu::axs, &Cpu::cpy, &Cpu::cmp, &Cpu::dec, &Cpu::dcp, &Cpu::bne, &Cpu::cmp, &Cpu::kil, &Cpu::dcp, &Cpu::nop, &Cpu::cmp, &Cpu::dec, &Cpu::dcp, &Cpu::cld, &Cpu::cmp, &Cpu::nop, &Cpu::dcp, &Cpu::nop, &Cpu::cmp, &Cpu::dec, &Cpu::dcp, &Cpu::cpx, &Cpu::sbc, &Cpu::nop, &Cpu::isc, &Cpu::cpx, &Cpu::sbc, &Cpu::inc, &Cpu::isc, &Cpu::inx, &Cpu::sbc, &Cpu::nop, &Cpu::sbc, &Cpu::cpx, &Cpu::sbc, &Cpu::inc, &Cpu::isc, &Cpu::beq, &Cpu::sbc, &Cpu::kil, &Cpu::isc, &Cpu::nop, &Cpu::sbc, &Cpu::inc, &Cpu::isc, &Cpu::sed, &Cpu::sbc, &Cpu::nop, &Cpu::isc, &Cpu::nop, &Cpu::sbc, &Cpu::inc, &Cpu::isc, }; } bool Cpu::Save(StateFile* f) { f->Put(&Cycles); f->Put(&PC); f->Put(&SP); f->Put(&A); f->Put(&X); f->Put(&Y); f->Put(&C); f->Put(&Z); f->Put(&I); f->Put(&D); f->Put(&B); f->Put(&U); f->Put(&V); f->Put(&N); f->Put(&interrupt); f->Put(&stall); return true; } bool Cpu::Load(StateFile* f) { f->Get(&Cycles); f->Get(&PC); f->Get(&SP); f->Get(&A); f->Get(&X); f->Get(&Y); f->Get(&C); f->Get(&Z); f->Get(&I); f->Get(&D); f->Get(&B); f->Get(&U); f->Get(&V); f->Get(&N); f->Get(&interrupt); f->Get(&stall); return true; } // Reset resets the CPU to its initial powerup state void Cpu::Reset() { PC = Read16(0xFFFC); SP = 0xFD; SetFlags(0x24); } // pagesDiffer returns true if the two addresses reference different pages bool Cpu::pagesDiffer(uint16_t a, uint16_t b) { return (a & 0xFF00) != (b & 0xFF00); } // addBranchCycles adds a cycle for taking a branch and adds another cycle // if the branch jumps to a new page void Cpu::addBranchCycles(stepInfo& info) { Cycles++; if (pagesDiffer(info.pc, info.address)) { Cycles++; } } void Cpu::compare(uint8_t a, uint8_t b) { setZN(a - b); if (a >= b) { C = 1; } else { C = 0; } } uint8_t Cpu::Read(uint16_t address) { return memory->Read(address); } void Cpu::Write(uint16_t address, uint8_t value) { memory->Write(address, value); } // Read16 reads two uint8_ts using Read to return a double-word value uint16_t Cpu::Read16(uint16_t address) { auto lo = uint16_t(Read(address)); auto hi = uint16_t(Read(address + 1)); return (hi << 8) | lo; } // read16bug emulates a 6502 bug that caused the low uint8_t to wrap without // incrementing the high uint8_t uint16_t Cpu::read16bug(uint16_t address) { auto a = address; auto b = (a & 0xFF00) | ((a + 1) & 0x00FF); auto lo = Read(a); auto hi = Read(b); return (uint16_t(hi) << 8) | uint16_t(lo); } // push pushes a uint8_t onto the stack void Cpu::push(uint8_t value) { Write(0x100 | uint16_t(SP), value); SP--; } // pull pops a uint8_t from the stack uint8_t Cpu::pull() { SP++; return Read(0x100 | uint16_t(SP)); } // push16 pushes two uint8_ts onto the stack void Cpu::push16(uint16_t value) { auto hi = uint8_t(value >> 8); auto lo = uint8_t(value & 0xFF); push(hi); push(lo); } // pull16 pops two uint8_ts from the stack uint16_t Cpu::pull16() { auto lo = uint16_t(pull()); auto hi = uint16_t(pull()); return hi << 8 | lo; } // Flags returns the processor status flags uint8_t Cpu::Flags() { uint8_t flags = 0; flags |= C << 0; flags |= Z << 1; flags |= I << 2; flags |= D << 3; flags |= B << 4; flags |= U << 5; flags |= V << 6; flags |= N << 7; return flags; } // SetFlags sets the processor status flags void Cpu::SetFlags(uint8_t flags) { C = (flags >> 0) & 1; Z = (flags >> 1) & 1; I = (flags >> 2) & 1; D = (flags >> 3) & 1; B = (flags >> 4) & 1; U = (flags >> 5) & 1; V = (flags >> 6) & 1; N = (flags >> 7) & 1; } // setZ sets the zero flag if the argument is zero void Cpu::setZ(uint8_t value) { if (value == 0) { Z = 1; } else { Z = 0; } } // setN sets the negative flag if the argument is negative (high bit is set) void Cpu::setN(uint8_t value) { if ((value & 0x80) != 0) { N = 1; } else { N = 0; } } // setZN sets the zero flag and the negative flag void Cpu::setZN(uint8_t value) { setZ(value); setN(value); } // triggerNMI causes a non-maskable interrupt to occur on the next cycle void Cpu::triggerNMI() { interrupt = interruptNMI; } // triggerIRQ causes an IRQ interrupt to occur on the next cycle void Cpu::triggerIRQ() { if (I == 0) { interrupt = interruptIRQ; } } // Step executes a single CPU instruction int Cpu::Step() { if (stall > 0) { stall--; return 1; } auto cycles = Cycles; switch (interrupt) { case interruptNMI: nmi(); break; case interruptIRQ: irq(); break; } interrupt = interruptNone; auto opcode = Read(PC); auto mode = instructionModes[opcode]; uint16_t address, offset; bool pageCrossed = false; switch (mode) { case modeAbsolute: address = Read16(PC + 1); break; case modeAbsoluteX: address = Read16(PC + 1) + uint16_t(X); pageCrossed = pagesDiffer(address - uint16_t(X), address); break; case modeAbsoluteY: address = Read16(PC + 1) + uint16_t(Y); pageCrossed = pagesDiffer(address - uint16_t(Y), address); break; case modeAccumulator: address = 0; break; case modeImmediate: address = PC + 1; break; case modeImplied: address = 0; break; case modeIndexedIndirect: address = read16bug(uint8_t(Read(PC + 1) + X)); break; case modeIndirect: address = read16bug(Read16(PC + 1)); break; case modeIndirectIndexed: address = read16bug(uint16_t(Read(PC + 1))) + uint16_t(Y); pageCrossed = pagesDiffer(address - uint16_t(Y), address); break; case modeRelative: offset = uint16_t(Read(PC + 1)); if (offset < 0x80) { address = PC + 2 + offset; } else { address = PC + 2 + offset - 0x100; } break; case modeZeroPage: address = uint8_t(Read(PC + 1)); break; case modeZeroPageX: address = uint8_t(Read(PC + 1) + X) & 0xFF; break; case modeZeroPageY: address = uint8_t(Read(PC + 1) + Y) & 0xFF; break; } PC += uint16_t(instructionSizes[opcode]); Cycles += uint64_t(instructionCycles[opcode]); if (pageCrossed) { Cycles += uint64_t(instructionPageCycles[opcode]); } stepInfo info; info.address = address; info.pc = PC; info.mode = mode; InstrExecFunc e = table[opcode]; (this->*e)(info); return int(Cycles - cycles); } // NMI - Non-Maskable Interrupt void Cpu::nmi() { push16(PC); php(fakeStepInfo); PC = Read16(0xFFFA); I = 1; Cycles += 7; } // IRQ - IRQ Interrupt void Cpu::irq() { push16(PC); php(fakeStepInfo); PC = Read16(0xFFFE); I = 1; Cycles += 7; } // ADC - Add with Carry void Cpu::adc(stepInfo& info) { auto a = A; auto b = Read(info.address); auto c = C; A = a + b + c; setZN(A); if (int(a) + int(b) + int(c) > 0xFF) { C = 1; } else { C = 0; } if (((a^b) & 0x80) == 0 && ((a^A) & 0x80) != 0) { V = 1; } else { V = 0; } } // AND - Logical AND void Cpu::AND(stepInfo& info) { A = A & Read(info.address); setZN(A); } // ASL - Arithmetic Shift Left void Cpu::asl(stepInfo& info) { if (info.mode == modeAccumulator) { C = (A >> 7) & 1; A <<= 1; setZN(A); } else { auto value = Read(info.address); C = (value >> 7) & 1; value <<= 1; Write(info.address, value); setZN(value); } } // BCC - Branch if Carry Clear void Cpu::bcc(stepInfo& info) { if (C == 0) { PC = info.address; addBranchCycles(info); } } // BCS - Branch if Carry Set void Cpu::bcs(stepInfo& info) { if (C != 0) { PC = info.address; addBranchCycles(info); } } // BEQ - Branch if Equal void Cpu::beq(stepInfo& info) { if (Z != 0) { PC = info.address; addBranchCycles(info); } } // BIT - Bit Test void Cpu::bit(stepInfo& info) { auto value = Read(info.address); V = (value >> 6) & 1; setZ(value & A); setN(value); } // BMI - Branch if Minus void Cpu::bmi(stepInfo& info) { if (N != 0) { PC = info.address; addBranchCycles(info); } } // BNE - Branch if Not Equal void Cpu::bne(stepInfo& info) { if (Z == 0) { PC = info.address; addBranchCycles(info); } } // BPL - Branch if Positive void Cpu::bpl(stepInfo& info) { if (N == 0) { PC = info.address; addBranchCycles(info); } } // BRK - Force Interrupt void Cpu::brk(stepInfo& info) { push16(PC); php(info); sei(info); PC = Read16(0xFFFE); } // BVC - Branch if Overflow Clear void Cpu::bvc(stepInfo& info) { if (V == 0) { PC = info.address; addBranchCycles(info); } } // BVS - Branch if Overflow Set void Cpu::bvs(stepInfo& info) { if (V != 0) { PC = info.address; addBranchCycles(info); } } // CLC - Clear Carry Flag void Cpu::clc(stepInfo& info) { C = 0; } // CLD - Clear Decimal Mode void Cpu::cld(stepInfo& info) { D = 0; } // CLI - Clear Interrupt Disable void Cpu::cli(stepInfo& info) { I = 0; } // CLV - Clear Overflow Flag void Cpu::clv(stepInfo& info) { V = 0; } // CMP - Compare void Cpu::cmp(stepInfo& info) { auto value = Read(info.address); compare(A, value); } // CPX - Compare X Register void Cpu::cpx(stepInfo& info) { auto value = Read(info.address); compare(X, value); } // CPY - Compare Y Register void Cpu::cpy(stepInfo& info) { auto value = Read(info.address); compare(Y, value); } // DEC - Decrement Memory void Cpu::dec(stepInfo& info) { auto value = Read(info.address) - 1; Write(info.address, value); setZN(value); } // DEX - Decrement X Register void Cpu::dex(stepInfo& info) { X--; setZN(X); } // DEY - Decrement Y Register void Cpu::dey(stepInfo& info) { Y--; setZN(Y); } // EOR - Exclusive OR void Cpu::eor(stepInfo& info) { A = A ^ Read(info.address); setZN(A); } // INC - Increment Memory void Cpu::inc(stepInfo& info) { auto value = Read(info.address) + 1; Write(info.address, value); setZN(value); } // INX - Increment X Register void Cpu::inx(stepInfo& info) { X++; setZN(X); } // INY - Increment Y Register void Cpu::iny(stepInfo& info) { Y++; setZN(Y); } // JMP - Jump void Cpu::jmp(stepInfo& info) { PC = info.address; } // JSR - Jump to Subroutine void Cpu::jsr(stepInfo& info) { push16(PC - 1); PC = info.address; } // LDA - Load Accumulator void Cpu::lda(stepInfo& info) { A = Read(info.address); setZN(A); } // LDX - Load X Register void Cpu::ldx(stepInfo& info) { X = Read(info.address); setZN(X); } // LDY - Load Y Register void Cpu::ldy(stepInfo& info) { Y = Read(info.address); setZN(Y); } // LSR - Logical Shift Right void Cpu::lsr(stepInfo& info) { if (info.mode == modeAccumulator) { C = A & 1; A >>= 1; setZN(A); } else { auto value = Read(info.address); C = value & 1; value >>= 1; Write(info.address, value); setZN(value); } } // NOP - No Operation void Cpu::nop(stepInfo& info) { } // ORA - Logical Inclusive OR void Cpu::ora(stepInfo& info) { A = A | Read(info.address); setZN(A); } // PHA - Push Accumulator void Cpu::pha(stepInfo& info) { push(A); } // PHP - Push Processor Status void Cpu::php(stepInfo& info) { push(Flags() | 0x10); } // PLA - Pull Accumulator void Cpu::pla(stepInfo& info) { A = pull(); setZN(A); } // PLP - Pull Processor Status void Cpu::plp(stepInfo& info) { SetFlags((pull() & 0xEF) | 0x20); } // ROL - Rotate Left void Cpu::rol(stepInfo& info) { if (info.mode == modeAccumulator) { auto c = C; C = (A >> 7) & 1; A = (A << 1) | c; setZN(A); } else { auto c = C; auto value = Read(info.address); C = (value >> 7) & 1; value = (value << 1) | c; Write(info.address, value); setZN(value); } } // ROR - Rotate Right void Cpu::ror(stepInfo& info) { if (info.mode == modeAccumulator) { auto c = C; C = A & 1; A = (A >> 1) | (c << 7); setZN(A); } else { auto c = C; auto value = Read(info.address); C = value & 1; value = (value >> 1) | (c << 7); Write(info.address, value); setZN(value); } } // RTI - Return from Interrupt void Cpu::rti(stepInfo& info) { SetFlags((pull() & 0xEF) | 0x20); PC = pull16(); } // RTS - Return from Subroutine void Cpu::rts(stepInfo& info) { PC = pull16() + 1; } // SBC - Subtract with Carry void Cpu::sbc(stepInfo& info) { auto a = A; auto b = Read(info.address); auto c = C; A = a - b - (1 - c); setZN(A); if (int(a) - int(b) - int(1 - c) >= 0) { C = 1; } else { C = 0; } if (((a^b) & 0x80) != 0 && ((a^A) & 0x80) != 0) { V = 1; } else { V = 0; } } // SEC - Set Carry Flag void Cpu::sec(stepInfo& info) { C = 1; } // SED - Set Decimal Flag void Cpu::sed(stepInfo& info) { D = 1; } // SEI - Set Interrupt Disable void Cpu::sei(stepInfo& info) { I = 1; } // STA - Store Accumulator void Cpu::sta(stepInfo& info) { Write(info.address, A); } // STX - Store X Register void Cpu::stx(stepInfo& info) { Write(info.address, X); } // STY - Store Y Register void Cpu::sty(stepInfo& info) { Write(info.address, Y); } // TAX - Transfer Accumulator to X void Cpu::tax(stepInfo& info) { X = A; setZN(X); } // TAY - Transfer Accumulator to Y void Cpu::tay(stepInfo& info) { Y = A; setZN(Y); } // TSX - Transfer Stack Pointer to X void Cpu::tsx(stepInfo& info) { X = SP; setZN(X); } // TXA - Transfer X to Accumulator void Cpu::txa(stepInfo& info) { A = X; setZN(A); } // TXS - Transfer X to Stack Pointer void Cpu::txs(stepInfo& info) { SP = X; } // TYA - Transfer Y to Accumulator void Cpu::tya(stepInfo& info) { A = Y; setZN(A); } // illegal opcodes below void Cpu::ahx(stepInfo& info) { } void Cpu::alr(stepInfo& info) { } void Cpu::anc(stepInfo& info) { } void Cpu::arr(stepInfo& info) { } void Cpu::axs(stepInfo& info) { } void Cpu::dcp(stepInfo& info) { } void Cpu::isc(stepInfo& info) { } void Cpu::kil(stepInfo& info) { } void Cpu::las(stepInfo& info) { } void Cpu::lax(stepInfo& info) { } void Cpu::rla(stepInfo& info) { } void Cpu::rra(stepInfo& info) { } void Cpu::sax(stepInfo& info) { } void Cpu::shx(stepInfo& info) { } void Cpu::shy(stepInfo& info) { } void Cpu::slo(stepInfo& info) { } void Cpu::sre(stepInfo& info) { } void Cpu::tas(stepInfo& info) { } void Cpu::xaa(stepInfo& info) { }
d62084e2af9d890740ed1e0226a5b42d4c587274
29b81bdc013d76b057a2ba12e912d6d4c5b033ef
/boost/include/boost/mpi/collectives/scatter.hpp
cf8ccd024fa2b2fe64a15865b405f19ef76d8876
[]
no_license
GSIL-Monitor/third_dependences
864d2ad73955ffe0ce4912966a4f0d1c60ebd960
888ebf538db072a92d444a9e5aaa5e18b0f11083
refs/heads/master
2020-04-17T07:32:49.546337
2019-01-18T08:47:28
2019-01-18T08:47:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
129
hpp
scatter.hpp
version https://git-lfs.github.com/spec/v1 oid sha256:e0bf20d272244265a810f528cfbf6c59ad58ea98a1c137fba69f07ef39a865e9 size 5398
0964b5ad7d43812d7e19d6f255d7fa0a3cdd4186
27e3f57515aa2f25e69ed23ee61aa45127e45d7e
/XOR linked list.cpp
77ad94ef41d1387cb10ea2d890df4783d47057fa
[]
no_license
RitikJainRJ/DailyCodingProblem-Practice
b279b8ec78234f888d79dd03f5845db8421bb469
33605c2c6caf50f693ed7073ac3a8e523d66465d
refs/heads/master
2021-08-07T02:38:22.273189
2020-10-17T04:47:57
2020-10-17T04:47:57
227,582,759
2
0
null
null
null
null
UTF-8
C++
false
false
1,492
cpp
XOR linked list.cpp
/* An XOR linked list is a more memory efficient doubly linked list. Instead of each node holding next and prev fields, it holds a field named both, which is an XOR of the next node and the previous node. Implement an XOR linked list; it has an add(element) which adds the element to the end, and a get(index) which returns the node at index. */ #include<bits/stdc++.h> using namespace std; struct node{ int data; node *npx; }; node* createNode(int); void insertNode(node**, int); node* XOR(node*, node*); void printlist(node*); int main(void){ node *head = nullptr; for(int i = 0;i < 5; i++) insertNode(&head, i); printlist(head); return 0; } node* createNode(int data){ node *temp = nullptr; temp = (node*)malloc(sizeof(node)); temp->data = data; temp->npx = nullptr; return temp; } node* XOR(node *a, node *b){ return (node*)((uintptr_t)(a) ^ (uintptr_t)(b)); } void insertNode(node **head, int data){ node *temp = createNode(data); temp->npx = XOR(nullptr, *head); if(*head != nullptr){ node *next = XOR(nullptr, (*head)->npx); (*head)->npx = XOR(next, temp); } *head = temp; } void printlist(node *head){ node *temp1 = nullptr, *temp2 = nullptr; if(head == nullptr){ cout << "Empty" << endl; return; } while(head != nullptr){ cout << head->data << " "; temp2 = head; head = XOR(temp1, head->npx); temp1 = temp2; } }
36802e55b1bacb96011b27dae511bf103df00800
37d69be23189772218de50be1261c782331931c4
/PVZ/DB_structure_TTBB.h
372d3bf07ea504d47808d3338a9dcc30ae6144fe
[]
no_license
Ded-Mozila/KH-03
0ab2c7f04b417f94a740b6cd6978d066daded8e3
f39c04dec1c4a78e1050ca8e0c211eb4e4134b22
refs/heads/master
2020-06-06T09:51:05.925021
2013-08-21T07:53:33
2013-08-21T07:53:33
null
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
1,882
h
DB_structure_TTBB.h
#pragma once #include <list> #include "General_data.h" using namespace std; ////////////////////////////////////////////////////////////////////////// struct Wind_Base { bool information; // Идентификатор существования данных int number; // Отличительные цыфры, указывающие, что далее передаются данные у поверхности земли int pressure; // Давление на уровне WIND wind; // Данные по ветру }; ////////////////////////////////////////////////////////////////////////// struct Temp_Base { bool information; // Идентификатор существования данных int number; // int pressure; // Давление на уровне TEMP_DEWPOINT info_temp; // Информация о данных температуры и дефекта точки росы }; ////////////////////////////////////////////////////////////////////////// class TTBB_Database { public: bool information; // Отсутствие информации DATA_TIME memory; // Данные о времени и дате запуска и + индентификатор DISTRICT_STATION number; // Данные о територии запуска зонда и станции list<Temp_Base> level; // Уровни по температуре list< list<Wind_Base> >level_wind; // Уровни по ветру bool operator< (const TTBB_Database & right) { int m = ((right.number.district_number*1000) + right.number.station_number); int n = ((number.district_number*1000) + number.station_number); return n<m; } ; }; class DateSurfase_TTBB { public: int date; list<TTBB_Database> data_; bool operator< (const DateSurfase_TTBB & right) { return date < right.date; } ; };
b3566c62d226ca3f1563deebaa76b24289e9edde
ec21865762012d4899f0e5620b64fc65ec7c19d3
/config.h
78012f3c88fa3a90503e97a8af620cdc72133244
[]
no_license
xuqiangm/Crawler
94196f75b2417155ec9eb9e5af98ee58dd0c68d1
20165f0d1c515d73f52c7f7ea4e5b9142986a739
refs/heads/master
2021-01-12T10:08:21.778799
2016-12-15T15:28:44
2016-12-15T15:28:44
76,369,553
2
0
null
null
null
null
UTF-8
C++
false
false
383
h
config.h
#ifndef _CONFIG_ #define _CONFIG_ #include <string> #include <map> class ConfigManager { public: static ConfigManager& getInstance(); int loadConfigFile(); int findOption(std::string option, std::string& value); private: ConfigManager(){} ~ConfigManager(){} static std::map<std::string,std::string> m_options; }; #define CONFIGMN() ConfigManager::getInstance() #endif