other minor simplifications.
This commit is contained in:
parent
576139b448
commit
90f9766a87
5
balls.c
5
balls.c
@ -231,7 +231,7 @@ void c_index_build() {
|
|||||||
struct bt_node ** c_index_stack = 0;
|
struct bt_node ** c_index_stack = 0;
|
||||||
unsigned int c_index_stack_top = 0;
|
unsigned int c_index_stack_top = 0;
|
||||||
|
|
||||||
void c_index_stack_clear() {
|
static void c_index_stack_clear() {
|
||||||
c_index_stack_top = 0;
|
c_index_stack_top = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,9 +264,8 @@ void c_index_check_collisions() {
|
|||||||
do {
|
do {
|
||||||
ball_collision(n->ball, b);
|
ball_collision(n->ball, b);
|
||||||
if (c_index_must_check(n->left, b)) {
|
if (c_index_must_check(n->left, b)) {
|
||||||
if (c_index_must_check(n->right, b)) {
|
if (c_index_must_check(n->right, b))
|
||||||
c_index_stack_push(n->right);
|
c_index_stack_push(n->right);
|
||||||
}
|
|
||||||
n = n->left;
|
n = n->left;
|
||||||
} else if (c_index_must_check(n->right, b)) {
|
} else if (c_index_must_check(n->right, b)) {
|
||||||
n = n->right;
|
n = n->right;
|
||||||
|
Loading…
Reference in New Issue
Block a user