From ab200e42bb88156ae8b47dbbb0e25337b298f64e Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sun, 22 Apr 2018 23:12:45 +0200 Subject: [PATCH] Code formating on Draw.c --- GameLib/Draw.c | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/GameLib/Draw.c b/GameLib/Draw.c index 4bab1b0..748289e 100644 --- a/GameLib/Draw.c +++ b/GameLib/Draw.c @@ -3,24 +3,24 @@ #ifdef WIN32 // Windows #define _WIN32_WINNT 0x0501 -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include #define USE_OpenGL 1 #define USE_OpenGLES 0 #include #else #ifdef EMSCRIPTEN // Emscripten -#include -#include -#include -#include #include +#include +#include +#include +#include #define GL_GLEXT_PROTOTYPES 1 #include #include @@ -30,11 +30,11 @@ #include #else // UNIX -#include -#include -#include -#include #include +#include +#include +#include +#include #define USE_OpenGL 1 #define USE_OpenGLES 0 #include @@ -47,12 +47,12 @@ #define GL_CLAMP_TO_EDGE 0x812F #endif +#include "Audio.h" +#include "Draw.h" +#include "Input.h" +#include "QuadArray2D.h" #include "Time.h" #include "Util.h" -#include "QuadArray2D.h" -#include "Audio.h" -#include "Input.h" -#include "Draw.h" //////////////////////////////////////////////// // DrawImage // @@ -747,7 +747,7 @@ void Draw_DrawImg(DrawImg img, int x, int y, float scale[2]) { y1 = y + (image->y * scale[1]); x2 = x1 + (image->w * scale[0]); y2 = y1 + (image->h * scale[1]); - + // Apply flipping if (image->flip & 1) { float t = u1; @@ -808,7 +808,8 @@ void Draw_DrawImgResized(DrawImg img, int x, int y, float w, float h) { // Draw_DrawImgPart // // Draws an image part. -void Draw_DrawImgPart(DrawImg img, int x, int y, int w, int h, int i, int j, float scale[2]) { +void Draw_DrawImgPart(DrawImg img, int x, int y, int w, int h, int i, int j, + float scale[2]) { DrawImage image = img; int x1, x2, y1, y2; float us, u1, u2; @@ -819,7 +820,7 @@ void Draw_DrawImgPart(DrawImg img, int x, int y, int w, int h, int i, int j, flo y1 = y + (image->y * scale[1]); x2 = x1 + (w * scale[0]); y2 = y1 + (h * scale[1]); - + // Prepare image coordinates us = 1.0f / image->w; u1 = us * i * w; @@ -852,7 +853,8 @@ void Draw_DrawImgPart(DrawImg img, int x, int y, int w, int h, int i, int j, flo // Draw_DrawImgPartHoriz // // Draws an image part horizontally. -void Draw_DrawImgPartHoriz(DrawImg img, int x, int y, int w, int i, float scale[2]) { +void Draw_DrawImgPartHoriz(DrawImg img, int x, int y, int w, int i, + float scale[2]) { DrawImage image = img; int x1, x2, y1, y2; float us, u1, u2; @@ -863,7 +865,7 @@ void Draw_DrawImgPartHoriz(DrawImg img, int x, int y, int w, int i, float scale[ y1 = y + (image->y * scale[1]); x2 = x1 + (w * scale[0]); y2 = y1 + (image->h * scale[1]); - + // Prepare image coordinates us = 1.0f / image->w; u1 = us * i * w; @@ -1041,7 +1043,8 @@ void Draw_DrawText(DrawFnt f, char *text, int x, int y) { ptr = text; while (*ptr) { if ((*ptr) < font->max) { - Draw_DrawImgPartHoriz(font->img, x, y, font->w, (*ptr) - font->min, font->scale); + Draw_DrawImgPartHoriz(font->img, x, y, font->w, (*ptr) - font->min, + font->scale); } x += font->w * font->scale[0]; ptr++;