#include "obaq.as"
    screen 0,320,240:title "OBAQ"
    qreset
    //[ʊOɂOǂ쐬
    qborder -40,-30,40,60 
    //ubN̒ǉ
    repeat 45
        qaddpoly obj,4,8+(cnt\9)*8,15+(cnt/9)*4,,3.5,2
        qtype obj,type_bind
        qweight obj,1,1
    loop
    //{[̐ݒ
    qaddpoly ball,16,40,48,,2,2
    qweight ball,1,1
    qdamper ball,1,0
    qinertia ball,1,0
    qgroup ball,2,,5 ;ubNƃo[̃RWO쐬
    qspeed ball,0.1,0.1
    //o[̐ݒ
    qaddpoly bar,4,40,53,,10,2
    qtype bar,type_bindY|type_bindR
    qdamper bar,1,0
    qinertia bar,1,0
    qgroup bar,4,1 ;ubNƂ͏Փ˂Ȃ
*main
    redraw 0
    color:boxf
    qexec
    qdraw
    //{[̏Փ
    qcollision ball
    repeat
        qgetcol obj,x,y
        if obj<0:break
        qgetcol2 depth,nx,ny
        if obj=bar{
            qspeed ball,nx*0.005,ny*0.005
        }
        else{
            qtype obj,type_normal
            qspeed ball,nx*0.01,ny*0.01
        }
    loop
    //{[̐^Ƀo[ړ
    qgetpos ball,x,y,a
    qpos bar,limitf(x,10,70),53
    redraw
    await 20
    goto *main