void addScore(int s) { score += s; if ( score >= nextExtend ) { nextExtend += neAdd; neAdd = 500000; if ( extendShip() ) { playChunk(8); } } }
void addShot(Vector *pos) { int i; for ( i=0 ; i<SHOT_MAX ; i++ ) { shotIdx--; if ( shotIdx < 0 ) shotIdx = SHOT_MAX-1; if ( shot[i].cnt == NOT_EXIST ) break; } if ( i >= SHOT_MAX ) return; shot[i].pos = *pos; shot[i].cnt = 0; playChunk(0); }