java百度地图源代码 百度地图api源码( 四 )


}
map[pressedwidth][pressedheight] = temp_x;
pressedbutton.seticon((icon) pic.getimageicon(temp_x,
temp_y));
} else {
if (map[pressedwidth][pressedheight] == 0) {
jfm.showmessage("道具不能放在这!\nnot put item at this point!"/images/wink.gif[/img];
} else {
if (temp_x == 0) {
byte value = https://www.04ip.com/post/map[pressedwidth][pressedheight];
item[pressedwidth][pressedheight] = 0;
pressedbutton.seticon((icon) pic.getimageicon(
value, 0));
} else {
pressedbutton.seticon((icon) pic.getimageicon(
temp_x, temp_y));
item[pressedwidth][pressedheight] = temp_x;
}
}
}
}
};
请问两个中间值是什么呢?一目了然哦
最后是生成map
以下内容为程序代码:
public void createmap() throws ioexception {
try {
dataoutputstream mapbinaryfile = new dataoutputstream(
new fileoutputstream(mapeditor.filename + "map"/images/wink.gif[/img]);
dataoutputstream itembinaryfile = new dataoutputstream(
new fileoutputstream(mapeditor.filename + "item"/images/wink.gif[/img]);
mapbinaryfile.writebyte(width);
mapbinaryfile.writebyte(height);
for (byte i = 0; iheight; i++)
for (byte j = 0; jwidth; j++) {
//system.out.println(i+" "+j);
byte mapvalue = https://www.04ip.com/post/map[i][j];
byte itemvalue = https://www.04ip.com/post/item[i][j];
if (mapvalue != 0) {
system.out.println(i+" "+j+" "+ mapvalue);
mapbinaryfile.writebyte(j);
mapbinaryfile.writebyte(i);
mapbinaryfile.writebyte(mapvalue);
}
if (itemvalue != 0) {
itembinaryfile.writebyte(j);//x
itembinaryfile.writebyte(i);//y
itembinaryfile.writebyte(itemvalue);
}
}
mapbinaryfile.close();
itembinaryfile.close();
} catch (eofexception e) {
system.err.println("error"/images/wink.gif[/img];
}
}
【java百度地图源代码 百度地图api源码】关于java百度地图源代码和百度地图api源码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

推荐阅读