diff options
| -rw-r--r-- | examples/textures/textures_bunnymark.c | 13 | ||||
| -rw-r--r-- | src/external/jar_xm.h | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/examples/textures/textures_bunnymark.c b/examples/textures/textures_bunnymark.c index 6b91d646..784417d2 100644 --- a/examples/textures/textures_bunnymark.c +++ b/examples/textures/textures_bunnymark.c @@ -54,13 +54,16 @@ int main(void) // Create more bunnies for (int i = 0; i < 100; i++) { - bunnies[bunniesCount].position = GetMousePosition(); - bunnies[bunniesCount].speed.x = (float)GetRandomValue(-250, 250)/60.0f; - bunnies[bunniesCount].speed.y = (float)GetRandomValue(-250, 250)/60.0f; - bunnies[bunniesCount].color = (Color){ GetRandomValue(50, 240), + if (bunniesCount < MAX_BUNNIES) + { + bunnies[bunniesCount].position = GetMousePosition(); + bunnies[bunniesCount].speed.x = (float)GetRandomValue(-250, 250)/60.0f; + bunnies[bunniesCount].speed.y = (float)GetRandomValue(-250, 250)/60.0f; + bunnies[bunniesCount].color = (Color){ GetRandomValue(50, 240), GetRandomValue(80, 240), GetRandomValue(100, 240), 255 }; - bunniesCount++; + bunniesCount++; + } } } diff --git a/src/external/jar_xm.h b/src/external/jar_xm.h index 36b774d2..de6ad410 100644 --- a/src/external/jar_xm.h +++ b/src/external/jar_xm.h @@ -2670,7 +2670,7 @@ void jar_xm_reset(jar_xm_context_t* ctx) jar_xm_cut_note(&ctx->channels[i]); } ctx->current_row = 0; - ctx->current_table_index = 1; + ctx->current_table_index = ctx->module.restart_position; ctx->current_tick = 0; } |
