rayflap

A Flappy Bird clone written in C and compiled to WebAssembly.
git clone https://unitehenry.com/git/rayflap.git
Log | Files | Refs | README

commit d2027fab55328e50aa43b9cb2d28b85d33aac5b9
parent 3f21804dd6f4f452c610e60d39557512bd018553
Author: Henry Unite <unitehenry@gmail.com>
Date:   Sun, 19 Apr 2026 17:19:08 +0000

chore: format

Diffstat:
Msrc/game.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/game.c b/src/game.c @@ -209,7 +209,7 @@ void draw() { Vector2 random_pipe_y() { if (!IsTextureValid(pipeTexture)) { - Vector2 origin = { 0.0f, 0.0f }; + Vector2 origin = {0.0f, 0.0f}; return origin; } @@ -219,11 +219,12 @@ Vector2 random_pipe_y() { float upperBound = screenHeight - pipeTexture.height + (unit * 8); - float pipeY = lowerBound + fmodf(rand(), (upperBound - lowerBound + 1));; + float pipeY = lowerBound + fmodf(rand(), (upperBound - lowerBound + 1)); + ; Vector2 pipeVector = { - pipeY, // bottom pipe Y - pipeY - (unit * 4) - pipeTexture.height // top pipe Y + pipeY, // bottom pipe Y + pipeY - (unit * 4) - pipeTexture.height // top pipe Y }; return pipeVector;