let titleMenuY=0,titleAngle=0;let clear_flag=0;function title(){drawImgS(Graphs.BG_TITLE,0,0,DISPLAY_SIZE_X,DISPLAY_SIZE_Y);drawImg(Graphs.TITLE_LOGO,(DISPLAY_SIZE_X-586)>>1,64-10.0*cos(titleAngle));drawImg(Graphs.TITLE_LOGO2,(DISPLAY_SIZE_X-112)>>1,64+105+10.0*cos(titleAngle));titleAngle+=2;if(titleAngle>=360){titleAngle=0} if(clear_flag===1){let text=["LOAD","NEW GAME","FREE BATTLE"];let color;for(let num=0;num<text.length;num++){if(num===titleMenuY){color=colorRGB(255,64,64)}else{color=colorRGB(255,255,255)} fText(text[num],((DISPLAY_SIZE_X-text[1].length*30)>>1)+120,350+45*num,30,color)} titleMenuY=selectMenuY(titleMenuY,3)}else{let text=["LOAD","NEW GAME"];let color;for(let num=0;num<text.length;num++){if(num===titleMenuY){color=colorRGB(255,64,64)}else{color=colorRGB(255,255,255)} fText(text[num],((DISPLAY_SIZE_X-text[1].length*30)>>1)+120,350+45*num,30,color)} titleMenuY=selectMenuY(titleMenuY,2)} drawImg(Graphs.KEY_I,20,380);drawImg(Graphs.KEY_K,20,410);fText("メニュー選択",140,400,16,colorRGB(64,255,64));drawImg(Graphs.KEY_SPACE,20,440);fText("決定",140,450,16,colorRGB(64,255,64));fText("カーソルキーOK！[I][J][K][L]でより快適",220,422,16,colorRGB(255,255,255));fText("(C)2024 TETSUCOM",520,460,20,colorRGB(255,255,255));if(key[32]===1||key[13]===1){key[32]=2;key[13]=2;if(titleMenuY===0){if(gameLoad()===0){playSE(Sounds.SE_ESC)}else{gameScene=SCENE_TOWN;backScene=BS_TOWN;playSE(Sounds.SE_LOAD);help_flag=1}}else if(titleMenuY===1){input_chara=0;NameFlag=0;Name="";newName="";NameX=0,NameY=0;newGame();gameScene=SCENE_IN_NAME;backScene=BS_TITLE;help_flag=1;playSE(Sounds.SE_SAVE)}else{gameLoad();initItem2();gameScene=SCENE_FREE_BATTLE;backScene=BS_FREE} playSE(Sounds.SE_SPACE);for(let num=0;num<words.length;num++){words[num].alphabet=""} makeAlphabets()}}