タイトル画面からエディターへ移行する処理を変更している。
他のエディターもタイトル画面から立ち上げられるように5枠作っておいた。
まずはタイトル画面の変更箇所から見ていく。
[TitlePartクラス]
public void eventStart(GameData gdt) {
//PlayerPlatform pPlatform=gdt.pPlatform;
int pushKey=0;
int modeChange=999;
gData=gdt;
if (gData.pPlatform.keyPush[4]) { //space gData.pPlatform.keyPush[4]=false; pushKey=1; gData.sePlay(1); //sdPlay.sePlay(1);
}
if (gData.pPlatform.keyPush[5]) { //d gData.pPlatform.keyPush[5]=false; pushKey=2; gData.sePlay(2); //sdPlay.sePlay(2);
}
if (gData.pPlatform.keyPush[0]) { //up gData.pPlatform.keyPush[0]=false;
cursorPos[mode][0]--;
}
if (gData.pPlatform.keyPush[1]) { //down gData.pPlatform.keyPush[1]=false; cursorPos[mode][0]++;
}
if (mode==0) { if (pushKey==1) { int cp=cursorPos[0][0]; if (cp==0) {//はじめからスタート titlePartEnd=true; } if (cp==1) {//ロード modeChange=1; } if (cp==2) { //Editor選択モードに切り替える modeChange=2; } }
}
//ロードするファイルを選ぶモード
if (mode==1) { if (pushKey==1) { int cp=cursorPos[1][0]; dataLoad(); } if (pushKey==2) modeChange=0;
}
if (mode==2) { if (pushKey==1) { int cp=cursorPos[2][0]; //MapEditorを立ち上げる。 if (cp==0) mapEditorStart=true; } if (pushKey==2) modeChange=0;
}
if (modeChange<=10) { mode=modeChange;
}
if (cursorPos[mode][0] > cursorPos[mode][1]) cursorPos[mode][0]=0;
if (cursorPos[mode][0] < 0) cursorPos[mode][0]=cursorPos[mode][1];
//マップチップ配置/ブロック配置切り替え
int bcol=0;
String sword="MapTip";
if (setMode==1) { sword="Block"; bcol=2;
}
int fy=sty+32;
gSet.rectSet2(gr,stx,fy,90,30,bcol,0);
gSet.wordDisp_short2(gr,sword,stx,fy+20,0);
if (setMode==1) { gSet.rectSet2(gr,stx+90,fy,30,30,1,0); gSet.rectSet2(gr,stx+120,fy,30,30,1,0); String word=" 0"; if (selectBlockNumber==0) word="[0]"; gSet.wordDisp_short2(gr,word,stx+90,fy+20,0); word=" 1"; if (selectBlockNumber==1) word="[1]"; gSet.wordDisp_short2(gr,word,stx+120,fy+20,0);
}
int mspx=608;
int mspy=sty+96;//456
//ファイルナンバー設定
fy=360+64;
int col=0;
if (setMode==2) col=2;
gSet.rectSet2(gr,stx,fy,90,30,col,0);
gSet.wordDisp_short2(gr,"FileSet",stx,fy+20,0);
if (setMode==0) { gSet.rectSet2(gr,stx+90,fy,100,30,1,0); gSet.wordDisp_short2(gr,"M"+mapNumber+"-F"+floorNumber,stx+90,fy+20,0);
}
if (setMode==2) { int fstx=stx+90; for (int i=0;i<=1;i++) { int fy2=sty+64+i*32; String word="M"+mapNumber; if (i==1) word="F"+floorNumber; gSet.rectSet2(gr,fstx,fy2,20,30,1,0); gSet.wordDisp_short2(gr,"▲",fstx,fy2+20,0); gSet.rectSet2(gr,fstx+20,fy2,20,30,1,0); gSet.wordDisp_short2(gr,"▼",fstx+20,fy2+20,0);
gSet.rectSet2(gr,fstx+40,fy2,55,30,0,0); gSet.wordDisp_short2(gr,word,fstx+40,fy2+20,0); }
}
//マップサイズ変更
String word2="MapSize";
col=0;
if (setMode==3) col=2;
gSet.rectSet2(gr,mspx,mspy,90,30,col,0);
gSet.wordDisp_short2(gr,word2,mspx,mspy+20,0);
if (setMode==0) { gSet.rectSet2(gr,stx+90,sty+96,100,30,1,0); gSet.wordDisp_short2(gr,""+mapWidth+"*"+mapHeight,stx+90,sty+96+20,0);
}
if (setMode==3) { int fstx=stx+90; for (int i=0;i<=2;i++) { fy=sty+96+i*32; String word="W"+mapWidth; if (i==1) word="H"+mapHeight; if (i==2) word="+画面"; gSet.rectSet2(gr,fstx,fy,20,30,1,0); gSet.wordDisp_short2(gr,"▲",fstx,fy+20,0); gSet.rectSet2(gr,fstx+20,fy,20,30,1,0); gSet.wordDisp_short2(gr,"▼",fstx+20,fy+20,0); gSet.rectSet2(gr,fstx+40,fy,55,30,0,0); gSet.wordDisp_short2(gr,word,fstx+40,fy+20,0); }
}