XmasゲーのHSPソース
HSP
あほべんとかれんだー2017に投稿した、Xmasゲーのソース貼っておきます。
http://doujin365.com/dish/xmas/start.html
一式ダウンロードは>>こちら。
■画像、音楽、効果音は再利用NGで。
HSP 3(.5) dishです。
#include "hsp3dish.as" randomize #cmpopt varname 1 x1=0:y1=0 ; 画面左上の座標 x2=ginfo_winx:y2=ginfo_winy ; 画面右下の座標 screen 0,x2,y2 title "XMAS" cls 4 *init //画像調達 scr_main = 0 scr_full = 2 scr_char = 3 scr_title = 4 scr_intro = 5 gsel scr_main celload "./player.png",scr_char celload "./title.png",scr_title celload "./intro.png",scr_intro //BGM調達 bgm_vol = -700 bgm_open = 0 bgm_stage = 1 bgm_over = 2 mmload "./bgm01.mp3",bgm_open,1 mmload "./bgm02.mp3",bgm_stage,1 mmload "./bgm03.mp3",bgm_over,1 //効果音調達 se_bomb = 10 se_shot = 11 se_start = 12 mmload "./bomb.wav",se_bomb,0 mmload "./shot.wav",se_shot,0 mmload "./start.wav",se_start,0 title_time = 0 kb_cl = 0 fps = 20 timee_wait = 1000/fps timer = 0 getreq timer,SYSREQ_TIMER setreq 0,SYSREQ_CLSMODE //MAX shot_max = 25 hamon_max = 25 enemy_max = 25 tree_max = 25 blast_max = 200 hi_score = 0 *title_start mmstop mmvol bgm_open,bgm_vol mmplay bgm_open *title_loop title_time = (title_time + 1 ) \ 1200 gmode 2 gsel scr_main redraw 0 gfilter FILTER_LINEAR2 color 220,220,255:boxf pos 100,30 gcopy scr_title,0,0,600,300 //フロントフレーム tmp_f = title_time / 50 \ 2 pos 0,0 gmode 3,192,192,90 gzoom x2,y2,scr_char,384 + tmp_f * 192,384,192,192 if title_time / 10 \ 3 < 1 { pos 140,330 gcopy scr_char,0,128,512,128 } gosub *sub_key if k_cl = 1 and kb_cl = 0 : goto *title_end redraw 1 gosub *sub_wait goto *title_loop *title_end score = 0 mmstop mmvol bgm_stage,bgm_vol mmplay bgm_stage mmplay se_start *stage_start p_a = 0 p_x = 3000 p_y = 3140 p_lr = 1 bk_p_lr = 1 p_g_x = 0 p_g_y = 0 scroll_x = 0 stage_step = 0 intro_cnt = 300 heiwa_cnt = 0 heiwa_tenjo = 100 base_speed = 100 base_max_speed = 150 base_kaku = 100 enemy_variation = 1 //ショット初期化 shot_ima = 0 dim shot_s,shot_max //存在 dim shot_x,shot_max //X軸 dim shot_y,shot_max //Y軸 dim shot_a,shot_max //X加速 dim shot_b,shot_max //Y加速 dim shot_t,shot_max //タイマー dim shot_i,shot_max //種類 //波紋初期化 hamon_ima = 0 dim hamon_s,hamon_max //存在 dim hamon_x,hamon_max //X軸 dim hamon_y,hamon_max //Y軸 dim hamon_a,hamon_max //X加速 dim hamon_b,hamon_max //Y加速 dim hamon_t,hamon_max //タイマー dim hamon_i,hamon_max //種類 //敵初期化 enemy_ima = 0 dim enemy_s,enemy_max //存在 dim enemy_x,enemy_max //X軸 dim enemy_y,enemy_max //Y軸 dim enemy_a,enemy_max //X加速 dim enemy_b,enemy_max //Y加速 dim enemy_t,enemy_max //タイマー dim enemy_i,enemy_max //種類 //ツリー初期化 tree_ima = 0 dim tree_s,tree_max //存在 dim tree_x,tree_max //X軸 dim tree_y,tree_max //Y軸 dim tree_a,tree_max //X加速 dim tree_b,tree_max //Y加速 dim tree_t,tree_max //タイマー dim tree_i,tree_max //種類 //爆風初期化 blast_ima = 0 dim blast_s,blast_max //存在 dim blast_x,blast_max //X軸 dim blast_y,blast_max //Y軸 dim blast_a,blast_max //X加速 dim blast_b,blast_max //Y加速 dim blast_t,blast_max //タイマー dim blast_i,blast_max //種類 game_mode = "main" ;######################## ;# # ;# # # ## ### # # # ;# ## ## # # # ## # # ;# # # # #### # # ## # ;# # # # # ### # # # ;# # ;######################## *main redraw 0 gfilter FILTER_LINEAR2 stage_step = (stage_step + 1) \ 1200 gosub *sub_key gosub *sub_move gosub *sub_hantei gosub *sub_main_draw gosub *sub_wait if game_mode = "over" { goto *over } redraw 1 goto *main ;######################## ;# GAME OVER # ;#============ *over redraw 0 gfilter FILTER_LINEAR2 stage_step = (stage_step + 1) \ 1200 gosub *sub_key gosub *sub_over_move gosub *sub_over_draw gosub *sub_wait if over_cnt > 30 { if k_cl = 1 and kb_cl = 0 : goto *title_start } redraw 1 goto *over ;######################## ;# SUB MOVE # ;############ *sub_move heiwa_cnt = heiwa_cnt + 1 //プレイヤーの向き bk_p_lr = p_lr //向きバックアップ if p_x / 10 > m_x + 64 { p_lr = 0 scroll_x = scroll_x + 5 if scroll_x >250 : scroll_x = scroll_x - 250 } if p_x / 10 < m_x - 64 { p_lr = 1 scroll_x = scroll_x - 5 if scroll_x < 0 : scroll_x = scroll_x + 250 } //プレイヤーを移動させる x_sa = p_x / 10 - m_x if x_sa > 300 : p_a = p_a - 100 if x_sa <-300 : p_a = p_a + 100 if x_sa > 200 : p_a = p_a - 50 if x_sa <-200 : p_a = p_a + 50 if x_sa > 100 : p_a = p_a - 20 if x_sa <-100 : p_a = p_a + 20 if x_sa > 30 : p_a = p_a - 10 if x_sa <-30 : p_a = p_a + 10 if x_sa > 0 : p_a = p_a - 1 if x_sa < 0 : p_a = p_a + 1 if p_a <-300 : p_a = -300 if p_a > 300 : p_a = 300 p_x = p_x + p_a if p_x < 0 : p_x = 0 : p_a = 0 if p_x > 8000 : p_x = 8000 : p_a = 0 //ショット打つか判定 if bk_p_lr ! p_lr { tmp_x = p_x tmp_y = p_y tmp_i = 1 gosub *sub_shot_create gosub *sub_hamon_create mmplay se_shot //難易度も少し上げる gosub *sub_baseup } //ショット移動 repeat shot_max cnt_i = cnt if shot_s(cnt_i) = 1 { shot_t(cnt_i) = shot_t(cnt_i) + 1 shot_x(cnt_i) = shot_x(cnt_i) + shot_a(cnt_i) shot_y(cnt_i) = shot_y(cnt_i) + shot_b(cnt_i) if shot_y(cnt_i) < -640 { tmp_cnt = cnt_i gosub *sub_shot_delete } } loop //波紋移動 repeat hamon_max cnt_i = cnt if hamon_s(cnt_i) = 1 { hamon_t(cnt_i) = hamon_t(cnt_i) + 1 if hamon_t(cnt_i) > 5 { tmp_cnt = cnt_i gosub *sub_hamon_delete } } loop //敵移動 danger_flg_l = 0 danger_flg_r = 0 repeat enemy_max cnt_i = cnt tmp_delete_flg = 0 if enemy_s(cnt_i) = 1 { enemy_t(cnt_i) = enemy_t(cnt_i) + 1 enemy_x(cnt_i) = enemy_x(cnt_i) + enemy_a(cnt_i) enemy_y(cnt_i) = enemy_y(cnt_i) + enemy_b(cnt_i) if enemy_a(cnt_i) < 0 { //左向き if (enemy_x(cnt_i) < 4000) and (enemy_i(cnt_i) = 1) { //オレンジターン enemy_a(cnt_i) = enemy_a(cnt_i) * -1 / 2 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) < 4000) and (enemy_i(cnt_i) = 2) { //イエローブースト enemy_a(cnt_i) = enemy_a(cnt_i) * 2 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) < 4000) and (enemy_i(cnt_i) = 3) { //ライムターン enemy_a(cnt_i) = enemy_a(cnt_i) * -1 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) < 4000) and (enemy_i(cnt_i) = 4) { //グリーンブレーキ enemy_a(cnt_i) = enemy_a(cnt_i) / 2 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) < 4000) and (enemy_i(cnt_i) = 5) { //ブルーダウン enemy_a(cnt_i) = enemy_a(cnt_i) * -1 enemy_b(cnt_i) = 30 enemy_i(cnt_i) = 0 } if enemy_x(cnt_i) < 1280 : danger_flg_l = 1 if enemy_x(cnt_i) < 0 : tmp_delete_flg = 1 } else { //右向き if (enemy_x(cnt_i) > 4000) and (enemy_i(cnt_i) = 1) { //オレンジターン enemy_a(cnt_i) = enemy_a(cnt_i) * -1 / 2 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) > 4000) and (enemy_i(cnt_i) = 2) { //イエローブースト enemy_a(cnt_i) = enemy_a(cnt_i) * 2 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) > 4000) and (enemy_i(cnt_i) = 3) { //ライムターン enemy_a(cnt_i) = enemy_a(cnt_i) * -1 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) > 4000) and (enemy_i(cnt_i) = 4) { //グリーンブレーキ enemy_a(cnt_i) = enemy_a(cnt_i) / 2 enemy_i(cnt_i) = 0 } if (enemy_x(cnt_i) > 4000) and (enemy_i(cnt_i) = 5) { //ブルーダウン enemy_a(cnt_i) = enemy_a(cnt_i) * -1 enemy_b(cnt_i) = 30 enemy_i(cnt_i) = 0 } if enemy_x(cnt_i) > (8000-1280) : danger_flg_r = 1 if enemy_x(cnt_i) > 8000 : tmp_delete_flg = 1 } if tmp_delete_flg = 1 { tmp_cnt = cnt_i gosub *sub_enemy_delete //ツリー発生 if intro_cnt = 0 { tmp_sa_x = p_x - enemy_x(cnt_i) tmp_sa_y = (p_y + 240) - enemy_y(cnt_i) tmp_x = enemy_x(cnt_i) tmp_y = enemy_y(cnt_i) tmp_a = tmp_sa_x / 20 tmp_b = tmp_sa_y / 20 gosub *sub_tree_create } tmp_cnt = cnt_i gosub *sub_enemy_delete } } loop //ツリー移動 repeat tree_max cnt_i = cnt if tree_s(cnt_i) = 1 { tree_t(cnt_i) = tree_t(cnt_i) + 1 tree_x(cnt_i) = tree_x(cnt_i) + tree_a(cnt_i) tree_y(cnt_i) = tree_y(cnt_i) + tree_b(cnt_i) } loop //爆風移動 repeat blast_max cnt_i = cnt if blast_s(cnt_i) = 1 { blast_t(cnt_i) = blast_t(cnt_i) + 1 if blast_i(cnt_i) = 1 { blast_b(cnt_i) = blast_b(cnt_i) + 5 } if blast_i(cnt_i) = 2 and stage_step \ 5 = 0{ tmp_tobicnt = rnd(2) + 2 repeat tmp_tobicnt tmp_x = blast_x(cnt_i) tmp_y = blast_y(cnt_i) tmp_i = 3 gosub *sub_blast_create loop } if blast_i(cnt_i) = 3 { if rnd(3) < 2 : blast_t(cnt_i) = blast_t(cnt_i) - 1 blast_b(cnt_i) = blast_b(cnt_i) + 15 } blast_x(cnt_i) = blast_x(cnt_i) + blast_a(cnt_i) blast_y(cnt_i) = blast_y(cnt_i) + blast_b(cnt_i) if blast_y(cnt_i) > 4320 { blast_y(cnt_i) = 4320 blast_b(cnt_i) = blast_b(cnt_i) * -1 / 5 } if blast_t(cnt_i) > 12{ tmp_cnt = cnt_i gosub *sub_blast_delete } } loop //敵生まれる if rnd(base_kaku) == 0 or heiwa_cnt > heiwa_tenjo { tmp_i = rnd(2) + 1 // 1:左向き 2:右向き if tmp_i = 1 { tmp_x = 8640 tmp_y = 400 tmp_a = base_speed * -1 tmp_b = 0 } else { tmp_x = 0 tmp_y = 600 tmp_a = base_speed tmp_b = 0 } tmp_i = rnd(enemy_variation) gosub *sub_enemy_create } if intro_cnt > 0 : intro_cnt = intro_cnt - 1 return ;######################## ;# SUB OVER MOVE # ;############ *sub_over_init mmstop mmvol bgm_vol mmplay bgm_over game_mode = "over" over_cnt = 0 return *sub_over_move if over_cnt < 100 : over_cnt = over_cnt + 1 //ツリー移動 repeat tree_max cnt_i = cnt if tree_s(cnt_i) = 1 { tree_y(cnt_i) = tree_y(cnt_i) + 20 if tree_y(cnt_i) > 6000 : tree_y(cnt_i) = 6000 } loop return ;######################## ;# SUB HANTEI # ;############## *sub_hantei //ショットと敵 repeat shot_max cnt_s = cnt if shot_s(cnt_s) = 1 { repeat enemy_max cnt_e = cnt if enemy_s(cnt_e) = 1 { sa_x = abs(shot_x(cnt_s) - enemy_x(cnt_e)) sa_y = abs(shot_y(cnt_s) - enemy_y(cnt_e)) sa_xy = sa_x + sa_y // ショットと敵の当たった時 if sa_xy < 640 { tmp_cnt = cnt_s: gosub *sub_shot_delete tmp_cnt = cnt_e: gosub *sub_enemy_delete //メイン爆風 repeat 2 tmp_x = shot_x(cnt_s) + rnd(640) -320 tmp_y = enemy_y(cnt_e) + rnd(640) -320 tmp_i = 1 gosub *sub_blast_create loop //飛び散り tmp_x = shot_x(cnt_s) tmp_y = enemy_y(cnt_e) tmp_i = 2 gosub *sub_blast_create score = score + 10 enemy_variation = int(score / 200) + 1 if enemy_variation > 7 : enemy_variation = 6 //難易度10あげる repeat 10 gosub *sub_baseup loop if hi_score < score : hi_score = score mmplay se_bomb } } loop } loop //ツリーとプレイヤー repeat tree_max cnt_t = cnt if tree_s(cnt_t) = 1 { sa_x = abs(tree_x(cnt_t) - p_x) sa_y = abs(tree_y(cnt_t) - (p_y + 240)) sa_xy = sa_x + sa_y // ツリーとプレイヤーが当たった時 if sa_xy < 640 { gosub *sub_over_init } } loop return ;######################## ;# SUB_MAIN_DRAW # ;################# *sub_main_draw gmode 2 // 背景 color 220,220,255:boxf //背景の木 gmode 3,64,64,32 repeat 5 pos cnt * 200 - 50,180 gzoom 192,192,scr_char,512,256,64,64 loop gmode 3,64,64,64 repeat 4 pos scroll_x + cnt * 250 - 250,100 gzoom 256,256,scr_char,512,256,64,64 loop gmode 2 //地面 color 200,20,40 boxf 0,400,800,500 //プレイヤー pos p_x / 10 - 64 ,p_y / 10 p_g_x = p_lr * 3 * 128 + (stage_step / 5 \ 3) * 128 gcopy scr_char,p_g_x,p_g_y,128,128 //毛 pos p_x / 10 + p_lr * 32 - 36,p_y / 10 - 6 p_g_x = stage_step / 8 \ 6 * 64 gcopy scr_char,p_g_x,320,64,64 //帽子 pos m_x - 30,p_y / 10-22+rnd(3) gcopy scr_char,0,256,64,64 gmode 2 //敵 repeat enemy_max cnt_i = cnt if enemy_s(cnt_i) = 1 { pos enemy_x(cnt_i) / 10 - 32,enemy_y(cnt_i) / 10 - 32 gzoom 64,64,scr_char,384 + enemy_i(cnt_i) * 64,320,64,64 } loop //ツリー repeat tree_max cnt_i = cnt if tree_s(cnt_i) = 1 { pos tree_x(cnt_i) / 10 - 32,tree_y(cnt_i) / 10 - 32 gzoom 64,64,scr_char,320,256,64,64 } loop //波紋 gmode 2 repeat hamon_max cnt_i = cnt if hamon_s(cnt_i) = 1 { tmp_t = hamon_t(cnt_i) * 5 gmode 3,64,64,100 - tmp_t * 3 pos hamon_x(cnt_i) / 10 - 32 - tmp_t / 2,hamon_y(cnt_i) / 10 - 32 gzoom 64 + tmp_t,64 + tmp,scr_char,384,256,64,64 } loop gmode 2 //ショット repeat shot_max cnt_i = cnt if shot_s(cnt_i) = 1 { tmp_t = shot_t(cnt_i) * 5 pos shot_x(cnt_i) / 10 - 32,shot_y(cnt_i) / 10 - 64 gzoom 64,128,scr_char,64,256,64,64 } loop //爆風 repeat blast_max cnt_i = cnt if blast_s(cnt_i) = 1 { //メイン爆発 if blast_i(cnt_i) = 1 { tmp_t = blast_t(cnt_i) * 5 gmode 3,64,64,128 pos blast_x(cnt_i) / 10 - 64,blast_y(cnt_i) / 10 - 64 gzoom 128,128,scr_char,(12 - blast_t(cnt_i)) / 2 * 64,384,64,64 } //飛び散り if blast_i(cnt_i) = 2 or blast_i(cnt_i) = 3{ tmp_t = blast_t(cnt_i) * 5 gmode 3,64,64,128 pos blast_x(cnt_i) / 10 - 64,blast_y(cnt_i) / 10 - 64 gzoom 64,64,scr_char,rnd(2)*64,384,64,64 } } loop //DANGERパネル if danger_flg_l = 1 and stage_step / 2 \ 2 = 0 and intro_cnt = 0 { gmode 3,32,256,128 repeat 3 pos 0,stage_step \ 256 + cnt * 256 - 256 gcopy scr_char,768,0,32,256 loop } if danger_flg_r = 1 and stage_step / 2 \ 2 = 0 and intro_cnt = 0 { gmode 3,32,256,128 repeat 3 pos x2-32,stage_step \ 256 - cnt * 256 + y2 - 256 gcopy scr_char,768,256,32,256 loop } //フロントフレーム tmp_f = stage_step / 50 \ 2 pos 0,0 gmode 3,192,192,90 gzoom x2,y2,scr_char,384 + tmp_f * 192,384,192,192 //イントロ表示 gmode 2 if intro_cnt > 0 { if intro_cnt / 10 \ 10 < 8 { tmp_bai = 15 pos 180,30 gzoom 320 * tmp_bai / 10,240 * tmp_bai / 10,scr_intro,0,0,320,240 } } gmode 2 color 0,55,55:pos 8,8:mes "SCORE:"+ score + " / HI_SCORE: " + hi_score // mes "heiwa_cnt: " + heiwa_cnt // mes "timer:" + timer + " bk_timer:" + bk_timer + " sa_timer:" + sa_timer return ;######################## ;# SUB_OVER_DRAW # ;################# *sub_over_draw gmode 2 // 背景 color 220,220,255:boxf //背景の木 gmode 3,64,64,32 repeat 5 pos cnt * 200 - 50,180 gzoom 192,192,scr_char,512,256,64,64 loop gmode 3,64,64,64 repeat 4 pos scroll_x + cnt * 250 - 250,100 gzoom 256,256,scr_char,512,256,64,64 loop gmode 2 //地面 color 200,20,40 boxf 0,400,800,500 //プレイヤー pos p_x / 10 - 64 ,p_y / 10 p_g_x = p_lr * 3 * 128 + (stage_step / 5 \ 3) * 128 gcopy scr_char,p_g_x,p_g_y,128,128 //ツリー if stage_step / 4 \ 2 = 0 { repeat tree_max cnt_i = cnt if tree_s(cnt_i) = 1 { sa_x = abs(tree_x(cnt_i) - p_x) sa_y = abs(tree_y(cnt_i) - (p_y + 240)) sa_xy = sa_x + sa_y // ツリーとプレイヤーが当たった時 if sa_xy < 640 { pos tree_x(cnt_i) / 10 - 48,tree_y(cnt_i) / 10 - 48 gzoom 96,96,scr_char,320,256,64,64 } else { pos tree_x(cnt_i) / 10 - 32,tree_y(cnt_i) / 10 - 32 gzoom 64,64,scr_char,320,256,64,64 } } loop } //毛 pos p_x / 10 + p_lr * 32 - 36,p_y / 10 - 6 p_g_x = stage_step / 8 \ 6 * 64 gcopy scr_char,p_g_x,320,64,64 //帽子 pos m_x - 30,p_y / 10-22+rnd(3) gcopy scr_char,0,256,64,64 //フロントフレーム tmp_f = stage_step / 50 \ 2 pos 0,0 gmode 3,192,192,90 gzoom x2,y2,scr_char,384 + tmp_f * 192,384,192,192 //終了表示 pos 280+rnd(16),30+rnd(16) gzoom 256,256,scr_char,512,128,128,128 gmode 2 color 0,55,55:pos 8,8:mes "SCORE:"+ score + " / HI_SCORE: " + hi_score return ;######################## ;# SUB SHOT # ;############# ;============================== ;SHOT_CREATE | | ;------------+ | ; interface tmp_x,tmp_y,tmp_i | ;-----------------------------+ *sub_shot_create shot_ima = (shot_ima + 1) \ shot_max shot_s(shot_ima) = 1 shot_i(shot_ima) = tmp_i shot_x(shot_ima) = tmp_x shot_y(shot_ima) = tmp_y shot_a(shot_ima) = 0 shot_b(shot_ima) = -320 shot_t(shot_ima) = 0 return ;============================== ;SHOT_DELETE | | ;------------+ | ; interface tmp_cnt | ;-----------------------------+ *sub_shot_delete shot_s(tmp_cnt) = 0 return ;######################## ;# SUB HAMON # ;############## ;============================== ; HAMON_CREATE | | ;--------------+ | ; interface tmp_x,tmp_y,tmp_i | ;-----------------------------+ *sub_hamon_create hamon_ima = (hamon_ima + 1) \ hamon_max hamon_s(hamon_ima) = 1 hamon_i(hamon_ima) = tmp_i hamon_x(hamon_ima) = tmp_x hamon_y(hamon_ima) = tmp_y hamon_a(hamon_ima) = 0 hamon_b(hamon_ima) = 0 hamon_t(hamon_ima) = 0 return ;============================== ;HAMON_DELETE | | ;-------------+ | ; interface tmp_cnt | ;-----------------------------+ *sub_hamon_delete hamon_s(tmp_cnt) = 0 return ;######################## ;# SUB ENEMY # ;############## ;============================== ;ENEMY_CREATE | | ;-------------+ | ; interface tmp_x,tmp_y,tmp_a,tmp_b,tmp_i | ;-----------------------------+ *sub_enemy_create //平和カウントをリセット heiwa_cnt = 0 heiwa_tenjo = rnd (50) + 50 enemy_ima = (enemy_ima + 1) \ enemy_max enemy_s(enemy_ima) = 1 enemy_i(enemy_ima) = tmp_i enemy_x(enemy_ima) = tmp_x enemy_y(enemy_ima) = tmp_y enemy_a(enemy_ima) = tmp_a enemy_b(enemy_ima) = tmp_b enemy_t(enemy_ima) = 0 return ;============================== ;ENEMY_DELETE | | ;-------------+ | ; interface tmp_cnt | ;-----------------------------+ *sub_enemy_delete enemy_s(tmp_cnt) = 0 return ;######################## ;# SUB TREE # ;############## ;============================== ;TREE_CREATE | | ;-------------+ | ; interface tmp_x,tmp_y,tmp_a,tmp_b,tmp_i | ;-----------------------------+ *sub_tree_create tree_ima = (tree_ima + 1) \ tree_max tree_s(tree_ima) = 1 tree_i(tree_ima) = tmp_i tree_x(tree_ima) = tmp_x tree_y(tree_ima) = tmp_y tree_a(tree_ima) = tmp_a tree_b(tree_ima) = tmp_b tree_t(tree_ima) = 0 return ;============================== ;TREE_DELETE | | ;-------------+ | ; interface tmp_cnt | ;-----------------------------+ *sub_tree_delete tree_s(tmp_cnt) = 0 return ;######################## ;# SUB BLAST # ;############## ;============================== ; BLAST_CREATE | | ;--------------+ | ; interface tmp_x,tmp_y,tmp_i | ;-----------------------------+ *sub_blast_create blast_ima = (blast_ima + 1) \ blast_max blast_s(blast_ima) = 1 blast_i(blast_ima) = tmp_i blast_x(blast_ima) = tmp_x blast_y(blast_ima) = tmp_y blast_a(blast_ima) = 0 blast_b(blast_ima) = 0 blast_t(blast_ima) = 0 //状態上書き //メイン爆発 if blast_i(blast_ima) = 1 { blast_b(blast_ima) = -30 } //飛び散り if blast_i(blast_ima) = 3 { blast_b(blast_ima) = -30 blast_a(blast_ima) = rnd(120) - 60 } return ;============================== ;BLAST_DELETE | | ;-------------+ | ; interface tmp_cnt | ;-----------------------------+ *sub_blast_delete blast_s(tmp_cnt) = 0 return ;######################## ;# SUB BASEUP # ;############### *sub_baseup //難易度を少しずつあげる base_speed = base_speed + 1 if base_speed > base_max_speed { base_max_speed = base_max_speed + 20 base_speed = 50 base_kaku = base_kaku - 1 if base_kaku < 10 : base_kaku = 10 } return ;######################## ;# SUB KEY # ;############ *sub_key kb_cl = k_cl getkey k_cl,1 tmp_x = mousex if tmp_x >= 0 : m_x = tmp_x m_y = mousey *key_end return ;######################## ;# SUB WAIT # ;############ *sub_wait bk_timer = timer getreq timer,SYSREQ_TIMER sa_timer = timer - bk_timer sa_timer = timee_wait - sa_timer await sa_timer return