void DirectMessage::Clear () { data.clear(); attributes.clear (); SetOp (); SetSubop (); }
AugAssign::AugAssign(class Ast* _ast, const location& _loc, AstNode* _target, OperatorType _op, AstNode* _value) : Stmt(AST_AUGASSIGN, _ast, _loc), target(NULL), op(EndOp), value(NULL) { SetTarget(_target); SetOp(_op); SetValue(_value); }
void RunTests(ib_strop_t op, const TestDatum *test_data) { const TestDatum *test; ib_status_t rc; SetOp(op); for (test = test_data; ! test->IsEnd(); ++test) { ib_flags_t result; rc = RunTest(*test, result); CheckResults(*test, rc, result); } }
SqlSelect& SqlSelect::operator-=(const SqlSelect& s2) { return SetOp(s2, SqlCode(MSSQL|PGSQL|SQLITE3," except ")(" minus ")); }
SqlSelect& SqlSelect::operator&=(const SqlSelect& s2) { return SetOp(s2, " intersect "); }
SqlSelect& SqlSelect::operator+=(const SqlSelect& s2) { return SetOp(s2, " union all "); }
void cOffTrade::Init() { this->TypeShop = 0; SetOp((LPVOID)0x007E44F1, (LPVOID)this->ShowPrice, ASM::CALL); SetOp((LPVOID)0x007E4603, (LPVOID)this->ShowTwoString, ASM::CALL); }
static void InitOps(void) { unsigned int i; for (i = 0; i < sizeof(Ops) / sizeof(*Ops); ++i) SetOp(Ops[i].opPrio, Ops[i].opType, Ops[i].opName, PROLOG_MODULE); }
void Protocol::Load() { SetOp((LPVOID)oDataRecv_Call, (LPVOID)this->DataRecv, ASM::CALL); }
void Item::Load() { ItemAsmLoad(); // ---- SetOp((LPVOID)0x633FCB, this->LoadModels, ASM::CALL); SetOp((LPVOID)0x633FE3, this->LoadTextures, ASM::CALL); // ---- SetOp((LPVOID)0x5087E6, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x58B78F, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x58B7A6, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x58B7FC, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x5C1A7F, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x5C2117, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x5C4268, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x7AF806, this->GetPrice, ASM::CALL); //revisar //Fix Kriss Shop /*SetOp((LPVOID)0x7E42F9, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x7E4347, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x7E439C, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x8475C3, this->GetPrice, ASM::CALL);*/ //Fim SetOp((LPVOID)0x846B99, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x846C13, this->GetPrice, ASM::CALL); SetOp((LPVOID)0x9683D0, this->GetPrice, ASM::CALL); // ---- SetOp((LPVOID)0x83476C, this->IsExpensiveItem, ASM::CALL); SetOp((LPVOID)0x8477BC, this->IsExpensiveItem, ASM::CALL); // ---- SetOp((LPVOID)0x7E3FC0, this->IsWings, ASM::CALL); SetOp((LPVOID)0x7E4766, this->IsWings, ASM::CALL); SetOp((LPVOID)0x7E5195, this->IsWings, ASM::CALL); // ---- SetOp((LPVOID)0x7DBD6B, this->GetUpgradeFlag, ASM::CALL); // ---- SetOp((LPVOID)0x48FB8C, this->PreviewCharSet, ASM::CALL); SetOp((LPVOID)0x63D2D8, this->PreviewCharSet, ASM::CALL); SetOp((LPVOID)0x641189, this->PreviewCharSet, ASM::CALL); SetOp((LPVOID)0x641F42, this->PreviewCharSet, ASM::CALL); SetOp((LPVOID)0x642598, this->PreviewCharSet, ASM::CALL); SetOp((LPVOID)0x65EA2D, this->PreviewCharSet, ASM::CALL); // ---- SetOp((LPVOID)0x7D9D5A, this->AllowRepairWings, ASM::CALL); // ---- SetOp((LPVOID)0x58B77E, this->SetOption, ASM::CALL); SetOp((LPVOID)0x5C7833, this->SetOption, ASM::CALL); SetOp((LPVOID)0x5C7D71, this->SetOption, ASM::CALL); SetOp((LPVOID)0x5C7F1B, this->SetOption, ASM::CALL); SetOp((LPVOID)0x5C80BE, this->SetOption, ASM::CALL); SetOp((LPVOID)0x7E216A, this->SetOption, ASM::CALL); // ---- SetOp((LPVOID)0x4FA5E8, this->SetOptionText, ASM::CALL); SetOp((LPVOID)0x7E568B, this->SetOptionText, ASM::CALL); // ---- SetOp((LPVOID)0x5666C1, this->SetItemEffect, ASM::CALL); SetOp((LPVOID)0x61041C, this->SetItemEffect, ASM::CALL); SetOp((LPVOID)0x610466, this->SetItemEffect, ASM::CALL); // ---- SetOp((LPVOID)0x51BCA5, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x590260, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x5C1A2F, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x5C1B70, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x5C423A, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x5C46E0, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x7D9A52, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x7DF4B2, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x7DFB0B, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x7E04D9, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x7E0811, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x7E5E8B, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x836FFD, this->GetMaxDurability, ASM::CALL); SetOp((LPVOID)0x95F5EE, this->GetMaxDurability, ASM::CALL); // ---- SetOp((LPVOID)0x57AC07, this->GetItemColor, ASM::CALL); SetOp((LPVOID)0x6083B9, this->GetItemColor, ASM::CALL); SetOp((LPVOID)0x60905E, this->GetItemColor2, ASM::CALL); }
void User::Load() { ZeroMemory(&this->lpPlayer, sizeof(this->lpPlayer)); ZeroMemory(&this->lpViewPlayer, sizeof(this->lpViewPlayer)); ZeroMemory(&this->lpViewTarget, sizeof(this->lpViewTarget)); ZeroMemory(this->m_BattleZoneList, sizeof(this->m_BattleZoneList)); ZeroMemory(this->m_ResetItemCheck, sizeof(this->m_ResetItemCheck)); // ---- this->m_TargetUpdateTick = 0; this->m_TargetType = false; this->m_CursorX = -1; this->m_CursorY = -1; this->m_MapNumber = -1; this->m_MasterLevel = 0; this->m_MasterPoint = 0; this->m_MasterExp = 0; this->m_MasterNextExp = 0; this->m_Reset = 0; this->m_GrandReset = 0; #ifdef __NOVUS__ this->m_TargetLifePercent = 0.0f; this->m_CraftLevel = 0; this->m_CraftStage = 0; this->m_CraftQuest = 0; ZeroMemory(this->m_CraftItemCheck, sizeof(this->m_CraftItemCheck)); #endif // ---- SetOp((LPVOID)oIsBattleServer_Call1, (LPVOID)this->IsBattleServer, ASM::CALL); SetOp((LPVOID)oIsBattleServer_Call2, (LPVOID)this->IsBattleServer, ASM::CALL); // ---- SetOp((LPVOID)0x0047FE31, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x0059890D, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x0059A399, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x0059A93C, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x0059B13B, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x005A4261, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x005A4D52, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x005B6117, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x0065A6CE, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x00727837, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x007860A1, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x007D31AA, (LPVOID)this->IsBattleZone, ASM::CALL); SetOp((LPVOID)0x007D39BD, (LPVOID)this->IsBattleZone, ASM::CALL); // ---- SetOp((LPVOID)0x0077F9A9, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0064A85F, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0064AC02, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0063DDF2, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0063DF89, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0063EA4C, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0064A79A, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0064AB3D, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x008105CB, (LPVOID)this->IsMasterClass, ASM::CALL); SetOp((LPVOID)0x0081064B, (LPVOID)this->IsMasterClass, ASM::CALL); // ---- SetOp((LPVOID)0x005B96E8, (LPVOID)this->DrawPartyHP, ASM::CALL); // ---- #ifdef __NOVUS__ SetOp((LPVOID)0x00588511, (LPVOID)this->SetEventEffect, ASM::CALL); #endif }
Region* buildRegion(vector< vector<Point> >& cycles){ // first step create a single region from each cycle vector<pair<Region*, bool> > sc_regions; // single cycle regions for(unsigned int i=0;i<cycles.size(); i++){ vector<Point> cycle = cycles[i]; addRegion(sc_regions,cycle); } // split the vector into faces and holes vector<Region*> faces; vector<Region*> holes; for(unsigned int i=0;i<sc_regions.size();i++){ if(sc_regions[i].second){ faces.push_back(sc_regions[i].first); } else { holes.push_back(sc_regions[i].first); } } // subtract all holes from each face if nessecary vector<Region*> faces2; for(unsigned int i=0;i<faces.size();i++){ Region* face = faces[i]; for(unsigned int j=0; j< holes.size(); j++){ Region* hole = holes[j]; if(face->BoundingBox().Intersects(hole->BoundingBox())){ if(!topops::wcontains(hole,face)){ // may be an island Region* tmp = SetOp(*face,*hole,avlseg::difference_op); delete face; face = tmp; } } } if((face->Size())!=0){ faces2.push_back(face); } else { // face was removed completely delete face; } } // the hole regions are not longer needed, delete them for(unsigned int i=0;i<holes.size();i++){ delete holes[i]; } if(faces2.size()<1){ cerr << "no face found within the cycles" << endl; return new Region(0); } // build the union of all faces Region* reg = faces2[0]; for(unsigned int i=1;i<faces2.size();i++){ Region* face2 = faces2[i]; Region* tmp = SetOp(*reg, *face2, avlseg::union_op); delete reg; delete face2; reg = tmp; } return reg; }
/* Adds a single cycle region to regs if cycle is valid. */ void addRegion2(vector<pair<Region*, bool> >& regs, vector<Point>& cycle){ if(cycle.size()<4){ // at least 3 points cerr << "Cycle with less than 3 different points detected" << endl; return; } bool isFace = getDir(cycle); // create a DBArray of halfsegments representing this cycle DbArray<HalfSegment> segments1(0); for(unsigned int i=0;i<cycle.size()-1;i++){ Point p1 = cycle[i]; Point p2 = cycle[i+1]; Point lp(0.0,0.0); Point rp(0.0,0.0); if(p1<p2){ lp = p1; rp = p2; } else { lp = p2; rp = p1; } HalfSegment hs1(true,lp,rp); hs1.attr.edgeno = i; hs1.attr.faceno = 0; hs1.attr.cycleno =0; hs1.attr.coverageno = 0; hs1.attr.insideAbove = false; hs1.attr.partnerno = -1; HalfSegment hs2 = hs1; hs2.SetLeftDomPoint(false); segments1.Append(hs1); segments1.Append(hs2); } segments1.Sort(HalfSegmentCompare); // split the segments at crossings and overlappings DbArray<HalfSegment>* segments = Split(segments1); SetPartnerNo(*segments); bool used[segments->Size()]; for(int i=0;i<segments->Size();i++){ used[i] = false; } // try to find cycles vector< vector<Point> > cycles; // corrected (simple) cycles vector<Point> path; // current path set<Point> points; // index for points in path bool subcycle; // a multiple point within the path? for(int i=0; i< segments->Size(); i++){ if(!used[i]){ // start of a new path found int pos = i; path.clear(); points.clear(); bool done = false; subcycle = false; while(!done){ HalfSegment hs1; segments->Get(pos,hs1); Point dp = hs1.GetDomPoint(); Point ndp = hs1.GetSecPoint(); int partner = hs1.attr.partnerno; path.push_back(dp); points.insert(dp); used[pos] = true; used[partner] = true; if(points.find(ndp)!=points.end()){ // (sub) cycle found if(AlmostEqual(path[0],ndp)){ // cycle closed path.push_back(ndp); done = true; } else { // subcycle found subcycle = true; } } if(!done){ // no cycle, try to extend int nb = getUnusedExtension(*segments,partner,used); if(nb>=0){ // extension found, continue pos = nb; } else { // dead end found, track back cout << " ----> DEAD END FOUND <--- " << endl; done = true; // should never occur } } } if(subcycle){ separateCycles(path,cycles); } else if( (path.size()>3 ) && AlmostEqual(path[0],path[path.size()-1])){ vector<Point> cycle = path; cycles.push_back(cycle); } else { cout << "remove invalid path of lengthh " << path.size() << endl; } }// new path found } // for delete segments; // build the region from the corrected cycles Region* result = 0; for(unsigned int i = 0; i< cycles.size();i++){ vector<Point> cycle = cycles[i]; bool cw = getDir(cycle); Region* reg = new Region(0); reg->StartBulkLoad(); for(unsigned int j=0;j<cycle.size()-1;j++){ Point lp,rp; bool smallb; smallb = (cycle[j] < cycle[j+1]); if(smallb){ lp = cycle[j]; rp = cycle[j+1]; } else { lp = cycle[j+1]; rp = cycle[j]; } HalfSegment hs(true,lp,rp); hs.attr.edgeno = j; hs.attr.insideAbove = (cw && !smallb) || (!cw && smallb); hs.attr.faceno=0; hs.attr.cycleno = 0; hs.attr.coverageno = 0; HalfSegment hs2(hs); hs2.SetLeftDomPoint(false); *reg += hs; *reg += hs2; } reg->EndBulkLoad(); if(!result){ result = reg; } else { Region* tmp = SetOp(*result,*reg,avlseg::union_op); delete result; result = tmp; delete reg; } } if(result){ regs.push_back(make_pair(result,isFace)); } }