dnf风战士详细装备,我记得是70cc加战神三件,但我看见有的剑神七伤6加散件的装备站街攻速能到6

dnf风战士

tutufj tutufj
回答
  • LindaSmith. LindaSmith.

    展开全部#include"stdafx.h
    include
    using namespace std;const int rows=8,cols=8;hinstance hinst;hbitmap ball;hdc hdc,mdc,bufdc;hwnd hwnd;dword tpre,tnow;char*str;int nowpos,prepos;bool find;stack<int>path;int mapindex[rows*cols]={ 0,2,0,0,0,0,0,0,/材1
    0,1,0,1,1,1,1,0,/材2
    0,1,0,1,0,1,1,0,/材3
    0,1,0,0,0,1,1,0,/材4
    0,1,1,1,1,1,1,0,/材5
    0,1,0,0,0,0,1,0,/材6
    0,0,1,1,1,1,1,0,/材7
    0,0,0,0,0,0,3,0 };材8
    int record[rows*cols];** myreg**terclass(hinstance hinstance);bool initinstance(hinstance,int);lresult callback wndproc(hwnd,uint,wparam,lparam);void mypaint(hdc hdc);int apientry winmain(hinstance hinstance,
    hinstance hprevinstance,
    lpstr lpcmdline,
    int ncmdshow)
    {
    msg msg;myreg**terclass(hinstance);if!initinstance(hinstance,ncmdshow))
    {
    return false;}
    while(msg.**!wm_quit)
    {
    if(peek**(&msg,**,0,0,pm_remove))
    {
    translate**(&msg);d**patch**(&msg);}
    else
    {
    tnow=gettickcount();if(tnow-tpre>=100)
    mypaint(hdc);}
    }
    return msg.wparam;}
    注册窗口*
    ** myreg**terclass(hinstance hinstance)
    {
    wndclassex wcex;wcex.cbsize=sizeof(wndclassex);wcex.style=cs_hredraw|cs_vredraw;wcex.lpfnwndproc=(wndproc)wndproc;wcex.cbclsextra=0;wcex.cbwndextra=0;wcex.hinstance=hinstance;wcex.hicon=**;wcex.hcursor=**;wcex.hcursor=loadcursor(**,idc_arrow);wcex.hbrbackground=(hbrush)(color_window+1);wcex.lpszmenuname=**;wcex.lpszclassname="canvas;wcex.hiconsm=**;return reg**terclassex(&wcex);}
    初始化*
    bool initinstance(hinstance hinstance,int ncmdshow)
    {
    hbitmap bmp;hinst=hinstance;hwnd=createwindow("canvas","迷宫",ws_overlappedwindow,
    cw_usedefault,0,cw_usedefault,0,**,**,hinstance,**);if!hwnd)
    {
    return false;}
    movewindow(hwnd,10,10,430,450,true);showwindow(hwnd,ncmdshow);updatewindow(hwnd);hdc=getdc(hwnd);mdc=createcompatibledc(hdc);bufdc=createcompatibledc(hdc);bmp=createcompatiblebitmap(hdc,cols*50,rows*50);selectobject(mdc,bmp);hbitmap tile;int rownum,colnum;int i,x,y;tile=(hbitmap)loadimage(**,"tile.bmp",image_bitmap,50,50,lr_loadfromfile);ball=(hbitmap)loadimage(**,"ball.bmp",image_bitmap,50,50,lr_loadfromfile);for(i=0;i*cols;i+)
    {
    record[i]=mapindex[i];rownum=i/cols;colnum=i%cols;x=colnum*50;y=rownum*50;selectobject(bufdc,tile);if!mapindex[i])
    bitblt(mdc,x,y,50,50,bufdc,0,0,srccopy);else
    {
    if(mapindex[i]=2)
    {
    nowpos=i;path.push(i);record[i]=0;}
    bitblt(mdc,x,y,50,50,bufdc,0,0,whiteness);}
    }
    prepos=cols*rows+1;mypaint(hdc);return true;}
    核心代码*
    void mypaint(hdc hdc)
    {
    int rownum,colnum;int x,y;int up,down,left,right;rownum=prepos/cols;colnum=prepos%cols;x=colnum*50;y=rownum*50;selectobject(bufdc,ball);bitblt(mdc,x,y,50,50,bufdc,0,0,whiteness);rownum=nowpos/cols;colnum=nowpos%cols;x=colnum*50;y=rownum*50;selectobject(bufdc,ball);bitblt(mdc,x,y,50,50,bufdc,0,0,srccopy);if!find)
    {
    str="迷宫入口;up=nowpos-cols;down=nowpos+cols;left=nowpos-1;right=nowpos+1;if(up>=0&record[up])
    {
    path.push(up);record[up]=0;prepos=nowpos;nowpos=up;if(mapindex[nowpos]=3)
    find=true;}
    else if(down*rows-1&record[down])
    {
    path.push(down);record[down]=0;prepos=nowpos;nowpos=down;if(mapindex[nowpos]=3)
    find=true;}
    else if(left>=rownum*cols&record[left])
    {
    path.push(left);record[left]=0;prepos=nowpos;nowpos=left;if(mapindex[nowpos]=3)
    find=true;}
    else if(right(rownum+1)*cols-1&record[right])
    {
    path.push(right);record[right]=0;prepos=nowpos;nowpos=right;if(mapindex[nowpos]=3)
    find=true;}
    else
    {
    if(path.size())/
    str="xxxxx;else
    {
    path.pop();prepos=nowpos;nowpos=path.top();}
    }
    }
    else
    {
    str="找到出口;}
    textout(mdc,0,0,str,strlen(str));bitblt(hdc,10,10,cols*50,rows*50,mdc,0,0,srccopy);tpre=gettickcount();}
    消息函数*
    lresult callback wndproc(hwnd hwnd,uint **,wparam wparam,lparam lparam)
    {
    switch(**)
    {
    case wm_keydown:
    if(wparam=vk_escape)
    postquit**(0);break;case wm_destroy:
    deletedc(mdc);deletedc(bufdc);deleteobject(ball);releasedc(hwnd,hdc);postquit**(0);break;default:
    return defwindowproc(hwnd,**,wparam,lparam);}
    return 0;}
    可以运行 请采纳
    有不懂的可以联系我
    这个可是标准c++的 这是结果
    这是源代码 http://pan.baidu.com/s/1i3kjntr

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活