今回の追加部分を書いておく。
[MapEditor クラス]
public void eventStart(GameData gdt) {
case 1://総合メニュー if (pushKey==1) {
} if (pushKey==2) { mEditEnd=true; }
if (clickC==1) { //マップチップ配置フィールドでボタンを押したケース if (buttonCheck(0,0,544,544)) { //本来はチップ取得してから任意のチップを入力できるのだが、今回はテスト用に強制的に01を打ち込む。 int nmx=mouseX/32; int nmy=mouseY/32; maptipNumber[nmx+nowmx][nmy+nowmy]=nowChip;
} //マップのスクロール
if (buttonCheck(576,0,32,288)) nowmy--; if (buttonCheck(576,288,32,288)) nowmy++;; if (nowmy<=0) nowmy=0; if (nowmy>=82) nowmy=82; if (buttonCheck(0,576,288,32)) nowmx--; if (buttonCheck(288,576,288,32)) nowmx++;; if (nowmx<=0) nowmx=0; if (nowmx>=82) nowmx=82; //チップ取得フィールドでボタンを押したケース if (buttonCheck(608,0,160,320)) { //本来はチップ取得してから任意のチップを入力できるのだが、今回はテスト用に強制的に01を打ち込む。 int nmx=(mouseX-608)/32+nowcx; int nmy=mouseY/32+nowcy; nowChip=pick_maptipNumber[nmx+nowmx][nmy+nowmy]; } //チップ取得フィールドのスクロール if (buttonCheck(768,0,32,160)) nowcy--; if (buttonCheck(768,160,32,160)) nowcy++; if (nowcy<=0) nowcy=0; if (nowcy>=cyMax-10) nowcy=cyMax-10; if (buttonCheck(608,320,80,32)) nowcx--; if (buttonCheck(688,320,80,32)) nowcx++; if (nowcx<=0) nowcx=0; if (nowcx>=cxMax-4) nowcx=cxMax-4;
if (buttonCheck(600,500,60,30) ) mEditEnd=true; }
break;
}
for (int y=0;y<=9;y++) { for (int x=0;x<=4;x++) { //左上から順にチップの位置を探し、適合した座標を抜き取る。 String tString=pick_maptipNumber[nowcx+x][nowcy+y]; int[] txy=gSet.maptipSearch(tString); int dx=txy[0]*32; int dy=txy[1]*32; int zx=x*32+608; int zy=y*32;