Refactor removing extra space and add break line for { (#5533)

Co-authored-by: maiconpintoabreu <maicon@thinkpad02.exads.com>
This commit is contained in:
Maicon Santana
2026-02-05 14:10:55 +00:00
committed by GitHub
parent d4f636151b
commit f43e049444
18 changed files with 35 additions and 23 deletions

View File

@ -19,7 +19,8 @@ uniform float ampY;
uniform float speedX;
uniform float speedY;
void main() {
void main()
{
float pixelWidth = 1.0/size.x;
float pixelHeight = 1.0/size.y;
float aspect = pixelHeight/pixelWidth;

View File

@ -17,7 +17,8 @@ uniform float ampY;
uniform float speedX;
uniform float speedY;
void main() {
void main()
{
float pixelWidth = 1.0/size.x;
float pixelHeight = 1.0/size.y;
float aspect = pixelHeight/pixelWidth;

View File

@ -23,7 +23,8 @@ uniform vec3 viewPosition;
const float QUADRATIC = 0.032;
const float LINEAR = 0.09;
void main() {
void main()
{
vec3 fragPosition = texture(gPosition, texCoord).rgb;
vec3 normal = texture(gNormal, texCoord).rgb;
vec3 albedo = texture(gAlbedoSpec, texCoord).rgb;

View File

@ -5,7 +5,8 @@ layout (location = 1) in vec2 vertexTexCoord;
out vec2 texCoord;
void main() {
void main()
{
gl_Position = vec4(vertexPosition, 1.0);
texCoord = vertexTexCoord;
}

View File

@ -10,7 +10,8 @@ in vec3 fragNormal;
uniform sampler2D diffuseTexture;
uniform sampler2D specularTexture;
void main() {
void main()
{
// store the fragment position vector in the first gbuffer texture
gPosition = fragPosition;
// also store the per-fragment normals into the gbuffer

View File

@ -22,7 +22,8 @@ uniform float ampY;
uniform float speedX;
uniform float speedY;
void main() {
void main()
{
float pixelWidth = 1.0/size.x;
float pixelHeight = 1.0/size.y;
float aspect = pixelHeight/pixelWidth;

View File

@ -1,7 +1,8 @@
#include <math.h>
#include "raylib.h"
int main() {
int main()
{
int screenWidth = 800;
int screenHeight = 450;
@ -17,7 +18,8 @@ int main() {
SetTargetFPS(60);
while (!WindowShouldClose()) {
while (!WindowShouldClose())
{
cam.position.x = sin(GetTime())*10.0f;
cam.position.z = cos(GetTime())*10.0f;

View File

@ -894,7 +894,8 @@ void SwapScreenBuffer(void)
const canvas = Module.canvas;
const ctx = canvas.getContext('2d');
if (!Module.__img || (Module.__img.width !== width) || (Module.__img.height !== height)) {
if (!Module.__img || (Module.__img.width !== width) || (Module.__img.height !== height))
{
Module.__img = ctx.createImageData(width, height);
}

View File

@ -875,7 +875,8 @@ void SwapScreenBuffer(void)
//const canvas = Module['canvas'];
const ctx = canvas.getContext('2d');
if (!Module.__img || (Module.__img.width !== width) || (Module.__img.height !== height)) {
if (!Module.__img || (Module.__img.width !== width) || (Module.__img.height !== height))
{
Module.__img = ctx.createImageData(width, height);
}

View File

@ -721,7 +721,8 @@ int main(int argc, char *argv[])
char v = structs[i].fieldType[originalIndex][k];
if ((v == '*') || (v == ' ') || (v == ','))
{
if (nameEnd != -1) {
if (nameEnd != -1)
{
// Don't copy to last additional field
if (fieldsRemaining != additionalFields)
{
@ -1011,7 +1012,8 @@ int main(int argc, char *argv[])
((linePtr[c - 4] == 'v') &&
(linePtr[c - 3] == 'o') &&
(linePtr[c - 2] == 'i') &&
(linePtr[c - 1] == 'd'))) {
(linePtr[c - 1] == 'd')))
{
break;
}