void Rolelayer::allCallbackm(Ref* ref){ if(bingbi==1){ return; }else if(bingbi==0){ this->removeChildByTag(tishi_daotag); } isdone=1; FX::Music::getInstance()->buttonClicked(); MenuItemImage* p=(MenuItemImage *)ref; current_oprate=p->getTag(); int va=(int)(long long)p->getUserData(); if(current_oprate==click_tag2){ }else{ va=0; } if(current_oprate==magic_ab){ current_oprate=magic_b; }else if(current_oprate==pet_ab){ current_oprate=pet_b; }else if(current_oprate==hero_ab){ current_oprate=hero_b; }else if(current_oprate==jian_mark){ Sprite* p=(Sprite*)this->getChildByTag(layer_left_tag)->getChildByTag(tiao_sp); auto move = ScaleTo::create(0.5f, 0.0f); auto move_ease_inout1 = EaseExponentialOut::create(move); p->runAction(move_ease_inout1); }else if(current_oprate==jiao_mark){ Sprite* p=(Sprite*)this->getChildByTag(layer_left_tag)->getChildByTag(tiao_sp); auto move = ScaleTo::create(0.5f,1.0f); auto move_ease_inout1 = EaseExponentialOut::create(move); p->runAction(move_ease_inout1); }else if(current_oprate==zhuye_ftag){ fahuimark++; }else if(current_oprate==startgame_tag){ p->setCallback(nullptr); }else if(current_oprate==zb_b){ p->setVisible(false); }else if (current_oprate==tollgateItem_tag){ p->setVisible(false); } if(getUimove()==Isteachmove::teacher){ if(current_oprate==hero_b){ callsp(va); } }else{ callsp(va); } }
text(){ register i; static int spcnt; nflush++; if((dip == d) && (v.nl == -1)){newline(1); return;} setnel(); if(ce || !fi){ nofill(); return; } if(pendw)goto t4; if(pendt)if(spcnt)goto t2; else goto t3; pendt++; if(spcnt)goto t2; while(((i = GETCH()) & CMASK) == ' ')spcnt++; if(nlflg){ t1: nflush = pendt = ch = spcnt = 0; callsp(); return; } ch = i; if(spcnt){ t2: tbreak(); if(nc || wch)goto rtn; un += spcnt*sps; spcnt = 0; setnel(); if(trap)goto rtn; if(nlflg)goto t1; } t3: if(spread)goto t5; if(pendw || !wch) t4: if(getword(0))goto t6; if(!movword())goto t3; t5: if(nlflg)pendt = 0; adsp = adrem = 0; if(ad){ /* jfr */ if (nwd==1) adsp=nel; else adsp=nel/(nwd-1); #ifdef NROFF adsp = (adsp/t.Adj)*t.Adj; #endif adrem = nel - adsp*(nwd-1); } brflg = 1; tbreak(); spread = 0; if(!trap)goto t3; if(!nlflg)goto rtn; t6: pendt = 0; ckul(); rtn: nflush = 0; }
void Magicup::allcallback(Ref* ref){ MenuItemImage* p=(MenuItemImage*)ref; int tag=(int)p->getTag(); current_oprate=tag; callsp(); }
int nofill() { int j; tchar i; if (!pendnf) { over = 0; tbreak(); if (trap) goto rtn; if (nlflg) { ch = nflush = 0; callsp(); return (0); } adsp = adrem = 0; nwd = 10000; } while ((j = (cbits(i = GETCH()))) != '\n') { if (j == ohc) continue; if (j == CONT) { pendnf++; nflush = 0; flushi(); ckul(); return (0); } j = width(i); widthp = j; numtab[HP].val += j; storeline(i, j); } if (ce) { ce--; if ((i = quant(nel / 2, HOR)) > 0) un += i; } if (!nc) storeline((tchar)FILLER, 0); brflg = 2; tbreak(); ckul(); rtn: pendnf = nflush = 0; return (0); }
nofill(){ register i, j; if(!pendnf){ over = 0; tbreak(); if(trap)goto rtn; if(nlflg){ ch = nflush = 0; callsp(); return; } adsp = adrem = 0; nwd = 10000; } while((j = ((i = GETCH()) & CMASK)) != '\n'){ if(j == ohc)continue; if(j == CONT){ pendnf++; nflush = 0; flushi(); ckul(); return; } storeline(i,-1); } if(ce){ ce--; if((i=quant(nel/2,HOR)) > 0)un += i; } if(!nc)storeline(FILLER,0); brflg = 2; tbreak(); ckul(); rtn: pendnf = nflush = 0; }
void text(void) { Tchar i; static int spcnt; nflush++; numtabp[HP].val = 0; if ((dip == d) && (numtabp[NL].val == -1)) { newline(1); return; } setnel(); if (ce || !fi) { nofill(); return; } if (pendw) goto t4; if (pendt) if (spcnt) goto t2; else goto t3; pendt++; if (spcnt) goto t2; while ((cbits(i = GETCH())) == ' ') { spcnt++; numtabp[HP].val += sps; widthp = sps; } if (nlflg) { t1: nflush = pendt = ch = spcnt = 0; callsp(); return; } ch = i; if (spcnt) { t2: tbreak(); if (nc || wch) goto rtn; un += spcnt * sps; spcnt = 0; setnel(); if (trap) goto rtn; if (nlflg) goto t1; } t3: if (spread) goto t5; if (pendw || !wch) t4: if (getword(0)) goto t6; if (!movword()) goto t3; t5: if (nlflg) pendt = 0; adsp = adrem = 0; if (ad) { if (nwd == 1) adsp = nel; else adsp = nel / (nwd - 1); adsp = (adsp / HOR) * HOR; adrem = nel - adsp*(nwd-1); } brflg = 1; tbreak(); spread = 0; if (!trap) goto t3; if (!nlflg) goto rtn; t6: pendt = 0; ckul(); rtn: nflush = 0; }