2022年 8月 19日
ゲームクリア画面を作った。

メインルーチンでは 9番
while ;---------- メインルーチン ---------- switch mainf case 0 : gosub *initialize : swbreak ; 初期 ; case 1 : gosub *opening : mainf=2 : swbreak ; オープニング ; case 2 : gosub *titl : swbreak ; タイトル case 3 : gosub *game_start : swbreak ; ゲーム開始 ;case 4 : gosub *tutorial ; swbreak ; チュートリアル case 5 : gosub *game_main : swbreak ; ゲームメイン case 6 : gosub *option : swbreak ; オプション ;case 7 : gosub *plyer_cange: mainf=5 : swbreak ; 探索 ;case 8 : gosub *game_over : mainf=2 : swbreak ; ゲームオーバー case 9 : gosub *game_clear : swbreak ; ゲームクリア ;case 10 : gosub *ending : mainf=2 : swbreak ; エンディング swend if mainf=10 : _break ; END wend ;-------------------------------------
リプレイ、タイトルヘ、リスタートが選べる。

リプレイを選択すると

リプレイが始まる

リプレイはバグがあって、まだ完全じゃない。
リスタートはそのマップの始めからやりなおせる。


タイトルはまだ作ってない。
ソース
*game_clear
rep_add 5 ; リプレイデータの終端処理
gcf=0 ; モード
repeat
scr_key ; スクロール入力
repeat 1
if k=256 : break ; 放してない
if kf=0 : break ; 一度も押してない
if kf=2 : kf=0 : break ; スクロールモード
kf=0
if gcf=0 : gcf=1 : break
if gcf=1 {
if gcx1-25<mx and gcy1-10<my and gcx1+197>mx and gcy1+49>my : gcf=2 : break ; REPLAY
if gcx3-25<mx and gcy3-10<my and gcx3+284>mx and gcy3+49>my : gcf=4 : break ; GO TO TITL
if gcx5-25<mx and gcy5-10<my and gcx5+229>mx and gcy5+49>my : gcf=6 : break ; RESTART
gcf=0
}
; YES
if gcf=2 { ; REPLAY
if gcx2-25<mx and gcy2-10<my and gcx2+121>mx and gcy2+49>my {
gosub *replay ; リプレイ
}
gcf=0 : break
}
if gcf=4 { ; GO TO TITL
if gcx4-25<mx and gcy4-10<my and gcx4+121>mx and gcy4+49>my {
mainf=2 ; タイトルへ
}
gcf=0 : break
}
if gcf=6 { ; RESTART
if gcx6-25<mx and gcy6-10<my and gcx6+121>mx and gcy6+49>my {
gosub *start_data_load ; スタートデータロード
mainf=5 ; ゲームメインへ
}
gcf=0 : break
}
loop
if mainf!9 : break
redraw 0
sc_mput
gc_put
redraw 1
await 1000/50
loop
return
表示
#deffunc gc_put ; ゲームクリアエリア表示
; 背景
pos px,800+py : celput gs3Dw
; 文字
pos 78+px,825+py : celput gcft1w
pos 66+px,900+py : celput gcft2w
; エリア境界線
gmulcolor 240,240,240
pos px,gw3y-10+py : celput linew,0,0.815,0.4
if gcf=0 : return
pos gcx0+px,gcy0+py : celput sinfow
pos gcx1+px,gcy1+py : celput gcft3w
pos gcx3+px,gcy3+py : celput gcft4w
pos gcx5+px,gcy5+py : celput gcft5w
if gcf=2 {
pos gcx2+px ,gcy2+py : celput gcft6w
pos gcx2+187+px,gcy2+py : celput gcft7w
}
if gcf=4 {
pos gcx4+px ,gcy4+py : celput gcft6w
pos gcx4+187+px,gcy4+py : celput gcft7w
}
if gcf=6 {
pos gcx6+px ,gcy6+py : celput gcft6w
pos gcx6+187+px,gcy6+py : celput gcft7w
}
return
今はターン表示を作ってる。
後おおまかなのはタイトルと音関係。